(()=>{"use strict";var e,t={3622:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=i(r(5311));(0,a.default)((function(){(0,a.default)("button[data-action-set-privacy]").on("click",(function(){return ModalWorkflow({url:this.getAttribute("data-url"),onload:{set_privacy:function(e){(0,a.default)("form",e.body).on("submit",(function(){return e.postForm(this.action,(0,a.default)(this).serialize()),!1}));var t=(0,a.default)("input[name='restriction_type'][value='password']",e.body),r=(0,a.default)("input[name='restriction_type'][value='groups']",e.body),i=(0,a.default)(".password-field",e.body),o=(0,a.default)("#groups-fields",e.body);function n(){t.is(":checked")?(i.show(),o.hide()):r.is(":checked")?(i.hide(),o.show()):(i.hide(),o.hide())}n(),(0,a.default)("input[name='restriction_type']",e.body).on("change",n)},set_privacy_done:function(e,t){e.respond("setPermission",t.is_public),e.close()}},responses:{setPermission:function(e){e?((0,a.default)("[data-privacy-sidebar-public]").removeClass("w-hidden"),(0,a.default)("[data-privacy-sidebar-private]").addClass("w-hidden"),(0,a.default)(".privacy-indicator").removeClass("private").addClass("public"),(0,a.default)(".privacy-indicator-icon use").attr("href","#icon-view")):((0,a.default)("[data-privacy-sidebar-public]").addClass("w-hidden"),(0,a.default)("[data-privacy-sidebar-private]").removeClass("w-hidden"),(0,a.default)(".privacy-indicator").removeClass("public").addClass("private"),(0,a.default)(".privacy-indicator-icon use").attr("href","#icon-no-view"))}}}),!1}))}))},5311:e=>{e.exports=jQuery}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e].call(o.exports,o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,a,o]=e[u],d=!0,s=0;s<r.length;s++)(!1&o||n>=o)&&Object.keys(i.O).every((e=>i.O[e](r[s])))?r.splice(s--,1):(d=!1,o<n&&(n=o));if(d){e.splice(u--,1);var l=a();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=8598,(()=>{var e={8598:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[n,d,s]=r,l=0;if(n.some((t=>0!==e[t]))){for(a in d)i.o(d,a)&&(i.m[a]=d[a]);if(s)var u=s(i)}for(t&&t(r);l<n.length;l++)o=n[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(u)},r=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[2751],(()=>i(3622)));a=i.O(a)})();