/
home
/
assocoweys
/
sompe
/
administrator
/
components
/
com_sppagebuilder
/
assets
/
editor
/
dist
/
js
/
Upload File
HOME
/*! For license information please see 470.ba6ff8751cdcf07775a4.min.js.LICENSE.txt */ "use strict";(self.webpackChunkreact_typescript_webpack_backend_editor=self.webpackChunkreact_typescript_webpack_backend_editor||[]).push([[470],{6184:(t,e,r)=>{r.d(e,{U:()=>D});var n=r(824),o=r(4185),i=r(917),a=r(7264),c=r(5944);const l=function(t){var e=t.type,r=void 0===e?"primary":e,n=t.message,o=void 0===n?"":n;return(0,c.tZ)("div",{css:u.modalWrapper(r),children:(0,c.BX)("div",{css:u.content(r),children:[(0,c.tZ)(a.Z,{name:r,width:20,height:20}),o]})})};var u={modalWrapper:function(t){return(0,i.iv)("max-width:450px;min-height:30px;background:",n.qo.background[t],";border-radius:",n.E0[4],";;label:modalWrapper;")},content:function(t){return(0,i.iv)("padding:",n.W0[8]," ",n.W0[12],";",o.c.body()," color:",n.qo.text[t],";display:flex;align-items:center;gap:",n.W0[4],";;label:content;")}},s=r(3871),d=r(7870),p=r(7898),f=r(1234),h=r(2328),y=r(7602),v=r(7294),g=r(1709),E=r(9781);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function b(){b=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new I(o||[]);return n(a,"_invoke",{value:w(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function p(){}function f(){}function h(){}var y={};l(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(D([])));g&&g!==e&&r.call(g,i)&&(y=g);var E=h.prototype=p.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function o(n,i,a,c){var l=s(t[n],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==m(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function P(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function D(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return f.prototype=h,n(E,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},_(O.prototype),l(O.prototype,a,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(E),l(E,c,"Generator"),l(E,i,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=D,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:D(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function _(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function O(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function w(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==m(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===m(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function L(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){P(i,n,o,a,c,"next",t)}function c(t){P(i,n,o,a,c,"throw",t)}a(void 0)}))}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var I=function(t){var e,r,n=t.title,o=t.label,i=t.bulkAction,a=t.confirmButtonText,u=t.closeModal,g=t.mutationFn,m=t.invalidateKeys,_=t.skipMutation,w=void 0!==_&&_,P=t.payload,I=(0,f.$)(),D=(0,h.v)((function(t){return t.appConfig})),A={language:"languages",access:"access_levels",category:"categories"},T=(e=(0,v.useState)({label:(0,y.$K)(D[A[i]])&&D[A[i]].length>0?D[A[i]][0].label:"",value:(0,y.$K)(D[A[i]])&&D[A[i]].length>0?D[A[i]][0].value:""}),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=T[0],R=T[1],G=(0,p.A)({mutationFn:g,invalidateKeys:m});return(0,c.tZ)(E.Z,{onClose:function(){return u({action:"CLOSE"})},title:n,headerCss:x.modalHeaderCss,contentCss:x.modalContentCss,wrapperCss:x.modalWrapper,children:(0,c.BX)("div",{children:[(0,c.BX)("div",{css:x.content,children:[D[A[i]].length>0?(0,c.tZ)(l,{type:"primary",message:I("COM_SPPAGEBUILDER_EDITOR_BULK_ACTION_MODAL_INFO")}):(0,c.tZ)(l,{type:"warning",message:I("COM_SPPAGEBUILDER_EDITOR_BULK_ACTION_MODAL_WARNING")}),(0,c.tZ)(d.Z,{options:D[A[i]],value:C,label:o,onChange:function(t){R(t)},clearOption:function(){return R({label:"",value:""})}})]}),(0,c.BX)("div",{css:x.footerWrapper,children:[(0,c.tZ)(s.Z,{variant:"secondary",onClick:function(){return u({action:"CLOSE"})},children:I("COM_SPPAGEBUILDER_EDITOR_CANCEL")}),(0,c.tZ)(s.Z,{disabled:0===D[A[i]].length||""===C.value,onClick:L(b().mark((function t(){var e,r;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w){t.next=3;break}return u({action:"CONFIRM"}),t.abrupt("return");case 3:if(!P){t.next=11;break}return t.next=6,G.mutateAsync(O(O({},P),{},{value:C.value}));case 6:if(e=t.sent,r=e.data,!((0,y.$K)(r.status)?r.status:r)){t.next=11;break}return u({action:"CONFIRM"}),t.abrupt("return");case 11:u({action:"CLOSE"});case 12:case"end":return t.stop()}}),t)}))),loading:G.isLoading,children:a||I("COM_SPPAGEBUILDER_EDITOR_UPDATE")})]})]})})},D=function(){var t=(0,g.d)().showModal;return function(e){return t({component:I,props:e,closeOnOutsideClick:!0})}},x={modalWrapper:{name:"1utdhwa-modalWrapper",styles:"max-width:450px;label:modalWrapper;"},content:(0,i.iv)("display:flex;flex-direction:column;gap:",n.W0[16],";padding:",n.W0[16]," ",n.W0[24],";p{",o.c.body(),";};label:content;"),footerWrapper:(0,i.iv)("display:flex;justify-content:end;gap:",n.W0[8],";padding:",n.W0[12]," ",n.W0[16],";box-shadow:",n.AF.dividerTop,";;label:footerWrapper;"),modalHeaderCss:(0,i.iv)("padding:",n.W0[12]," ",n.W0[24],";;label:modalHeaderCss;"),modalContentCss:(0,i.iv)("background-color:",n.qo.background.white,";;label:modalContentCss;"),labelCss:(0,i.iv)("width:fit-content;",o.c.body("medium"),";;label:labelCss;")}},6929:(t,e,r)=>{r.d(e,{Z:()=>pt});var n=r(9085),o=r(9313),i=r(824),a=r(4185),c=r(917),l=r(1234),u=r(7602),s=r(4101),d=r(5785),p=r(7264),f=r(1731),h=r(5350),y=r(3871),v=r(935),g=r(8122),E=r(802),m=r(6537),b=r(6492),_=r(4469),O=r(5501),w=function(t){return O.u.put(m.H.ADD_TO_MENU,t.data)},P=r(7294),L=r(7536),S=r(9781),I=r(5944);function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){T(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function T(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==D(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===D(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C(){C=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new L(o||[]);return n(a,"_invoke",{value:_(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function p(){}function f(){}function h(){}var y={};l(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==e&&r.call(g,i)&&(y=g);var E=h.prototype=p.prototype=Object.create(y);function m(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,c){var l=s(t[n],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==D(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=h,n(E,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},m(b.prototype),l(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(E),l(E,c,"Generator"),l(E,i,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function R(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}const G=function(t){var e,r=t.closeModal,n=t.title,o=t.id,i=(0,l.$)(),a=(0,E.O)({defaultValues:{page_id:o,menu_id:0,parent_id:1,menu_type:"mainmenu",title:"",alias:"",ordering:0}}),c=a.setValue,u=a.reset,s=a.getValues,d=a.watch,p=function(t){var e=(0,f.p)().showToast;return(0,b.a)({queryKey:["MenuByPageId",t],queryFn:function(){return function(t){return O.u.get(m.H.MENU_BY_PAGE_ID,{params:{id:t}})}(t).then((function(t){return t.data}))},onError:function(t){e({type:"danger",message:t.message})}})}(o),D=(e=(0,f.p)().showToast,(0,b.a)({queryKey:["MenuList"],queryFn:function(){return O.u.get(m.H.MENU_LIST).then((function(t){return t.data}))},onError:function(t){e({type:"danger",message:t.message})}})),x=function(t){var e=t.menutype,r=t.id,n=(0,f.p)().showToast;return(0,b.a)({queryKey:["MenuParentItems",e,r],queryFn:function(){return function(t){var e=t.menutype,r=t.id;return O.u.get(m.H.MENU_PARENT_ITEMS,{params:{menutype:e,id:r}})}({menutype:e,id:r}).then((function(t){return t.data}))},onError:function(t){n({type:"danger",message:t.message})}})}({menutype:d("menu_type"),id:s("menu_id")}),T=function(){var t=(0,f.p)().showToast,e=(0,l.$)();return(0,_.D)({mutationFn:w,onSuccess:function(){t({type:"success",message:e("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_SUCCESS_MESSAGE")})},onError:function(e){t({type:"danger",message:e.message})}})}();return(0,P.useEffect)((function(){p.data&&u({menu_id:p.data.id,parent_id:p.data.parent_id,menu_type:p.data.menutype,title:p.data.title,alias:p.data.alias,ordering:p.data.id})}),[p.data,u]),p.isLoading||D.isLoading?(0,I.tZ)(v.fz,{}):(0,I.tZ)(S.Z,{onClose:function(){return r({action:"CLOSE"})},title:n,wrapperCss:Z.wrapper,children:(0,I.BX)("form",{onSubmit:a.handleSubmit(function(){var t,e=(t=C().mark((function t(e){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T.mutateAsync({id:o,data:e});case 2:t.sent.data&&r({action:"CONFIRM"});case 4:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,c,"next",t)}function c(t){R(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),children:[(0,I.BX)("div",{css:Z.fieldWrapper,children:[(0,I.tZ)(L.Qr,{name:"title",control:a.control,render:function(t){return(0,I.tZ)(h.Z,A(A({},t),{},{label:i("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU_TITLE")}))}}),(0,I.tZ)(L.Qr,{name:"alias",control:a.control,render:function(t){return(0,I.tZ)(h.Z,A(A({},t),{},{label:i("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU_ALIAS")}))}}),(0,I.tZ)(L.Qr,{name:"menu_type",control:a.control,render:function(t){var e;return(0,I.tZ)(g.Z,A(A({},t),{},{label:i("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU"),options:null!==(e=D.data)&&void 0!==e?e:[],isClearable:!1,onChange:function(){c("parent_id",1)}}))}}),(0,I.tZ)(L.Qr,{name:"parent_id",control:a.control,render:function(t){var e;return(0,I.tZ)(g.Z,A(A({},t),{},{label:i("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_MENU_PARENT"),options:null!==(e=x.data)&&void 0!==e?e:[],isClearable:!1}))}})]}),(0,I.BX)("div",{css:Z.buttonWrapper,children:[(0,I.tZ)(y.Z,{variant:"secondary",onClick:function(){return r({action:"CLOSE"})},children:i("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_CANCEL")}),(0,I.tZ)(y.Z,{type:"submit",loading:T.isLoading,children:i("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_SAVE_CHANGES")})]})]})})};var Z={wrapper:{name:"1vd4vqj-wrapper",styles:"max-width:500px;label:wrapper;"},fieldWrapper:(0,c.iv)("background-color:",i.qo.base.white,";padding:",i.W0[20],";display:flex;flex-direction:column;gap:",i.W0[12],";;label:fieldWrapper;"),buttonWrapper:(0,c.iv)("background-color:",i.qo.background.white,";box-shadow:",i.AF.dividerTop,";padding:",i.W0[12]," ",i.W0[16],";display:flex;justify-content:end;gap:",i.W0[8],";;label:buttonWrapper;")},k=r(3816),B=r(5827),M=r(1709),j=r(1974),U=r(3106),N=r(8138),F=r(5587),W=r(4285),q=r(111),X=r(2811),H=r(908),K=r(9101),Y=r(1073),$=r(2328),Q=r(7184),V=r(7679),z=r(6731),J=r(1921),tt=r(9655);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(r),!0).forEach((function(e){ot(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ot(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==et(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===et(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function it(){it=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new L(o||[]);return n(a,"_invoke",{value:_(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function p(){}function f(){}function h(){}var y={};l(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==e&&r.call(g,i)&&(y=g);var E=h.prototype=p.prototype=Object.create(y);function m(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,c){var l=s(t[n],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==et(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=h,n(E,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},m(b.prototype),l(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(E),l(E,c,"Generator"),l(E,i,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function at(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function ct(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){at(i,n,o,a,c,"next",t)}function c(t){at(i,n,o,a,c,"throw",t)}a(void 0)}))}}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const ut=function(t){var e,r,o,c=t.selectedItems,s=t.index,y=t.page,v=t.data,g=t.lastSelectedIndex,m=t.setLastSelectedIndex,b=t.setSelectedItems,_=t.columns,O=t.isPopup,w=(0,l.$)(),S=(0,q.K)(),D=(0,M.d)().showModal,x=(0,f.p)().showToast,A=(0,k.g)(),T=(r=(0,P.useState)(!1),o=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(r,o)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=T[0],R=T[1],Z=(0,$.v)((function(t){return t.appConfig})),et=(0,V.R4)(),rt=(0,V.es)(),ot=(0,Q.Xu)(),at=(0,V.J5)(),ut=(0,X.T)().closeSettingPanel,st=(0,Y.j)((function(t){return t.setActiveAction})),pt=(0,B.L)(),ft=(0,H.Q)(),ht=(0,E.O)({defaultValues:{title:y.title}}),yt=(0,F.nB)({id:y.id}),vt=yt.attributes,gt=yt.listeners,Et=yt.setNodeRef,mt=yt.transform,bt=yt.transition,_t=yt.isDragging,Ot={transform:W.ux.Transform.toString(mt),transition:bt,zIndex:_t?i.W5.positive:i.W5.level,backgroundColor:_t?i.qo.background.hover:""};(0,P.useEffect)((function(){var t=function(t){"Escape"===t.key&&(R(!1),ht.reset({title:y.title}))};return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}}),[]);var wt=y.permissions.page.edit,Pt=ft.edit_own&&y.created_by===Z.user_id,Lt=wt||Pt,St=ft.create&&Lt,It=y.permissions.page.edit_state,Dt=y.permissions.page.delete,xt=[{id:"view",icon:"eye",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_VIEW"},{id:"rename",icon:"pencil",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_RENAME",isDisabled:!Lt},{id:"duplicate",icon:"cloneLine",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_DUPLICATE",isDisabled:!St},{id:"copyLink",icon:"link",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_COPY_LINK"},{id:"addToMenu",icon:"plus",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_ADD_TO_MENU",isDisabled:!Lt},{id:"export",icon:"upload",title:"COM_SPPAGEBUILDER_EDITOR_PAGE_EXPORT",isDisabled:!Lt},{id:"remove",icon:"trash",title:-2===y.published?"COM_SPPAGEBUILDER_EDITOR_PAGE_DELETE":"COM_SPPAGEBUILDER_EDITOR_PAGE_TRASH",variant:"critical",isDisabled:!Dt}],At=[{label:w("COM_SPPAGEBUILDER_EDITOR_FILTER_PUBLISHED"),value:1,disabled:!It},{label:w("COM_SPPAGEBUILDER_EDITOR_FILTER_UNPUBLISHED"),value:0,disabled:!It},{label:w("COM_SPPAGEBUILDER_EDITOR_FILTER_TRASHED"),value:-2,disabled:!It||!Dt}],Tt=function(){var t=ct(it().mark((function t(){var e,r,n,o;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pt({title:w("COM_SPPAGEBUILDER_EDITOR_PAGE_EXPORT_TITLE")});case 2:e=t.sent,r=e.action,n=e.seoChecked,o=e.mediaChecked,"CONFIRM"===r&&(o?(0,Q.xW)(String(y.id),n):ot.mutateAsync({pageId:String(y.id),isSeoChecked:n}));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,I.BX)("tr",{css:dt.bodyTr({isSelected:c.ids.includes(y.id),isShownFrontendButton:Z.enable_frontend_editing&&Lt}),ref:Et,style:Ot,children:[(0,I.BX)("td",{css:dt.checkboxWrapper,children:[(0,I.tZ)("div",nt(nt(nt({css:dt.dragPoint,"data-drag-point":!0},vt),gt),{},{children:(0,I.tZ)(p.Z,{name:"dragger",height:32,width:32})})),(0,I.tZ)(n.Z,{onChange:function(t){var e=(0,u.R5)({itemId:y.id,isShiftHolding:S,lastSelectedIndex:g,currentIndex:s,isChecked:t,selectedItemIds:c.ids,selectedItemsIndex:c.indexes,totalItemsList:v}),r=e.updatedItemIds,n=e.updatedItemIndexes;b({ids:r,indexes:n}),m(s)},checked:c.ids.includes(y.id)})]}),(0,I.tZ)("td",{children:(0,I.tZ)("div",{css:dt.pageName,children:C?(0,I.tZ)("form",{onSubmit:ht.handleSubmit((0,z.GI)(ht,function(){var t=ct(it().mark((function t(e){var r;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.title,t.next=3,et.mutateAsync({ids:y.id.toString(),type:"rename",value:r});case 3:R(!1);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),children:(0,I.tZ)(L.Qr,{control:ht.control,name:"title",render:function(t){return(0,I.tZ)(h.Z,nt(nt({},t),{},{hasAutoFocus:!0}))}})}):(0,I.BX)(I.HY,{children:[Lt?function(t){return(0,I.tZ)(tt.rU,{css:dt.titleButton({canEdit:Lt}),to:t?N.F.PopupEditor.buildLink({id:y.id.toString(),type:""}):N.F.PageEditor.buildLink({id:y.id.toString(),type:""}),state:{prevPageName:U.lr},onClick:function(){at.mutate({id:y.id,action:"check-in"}),st(void 0),ut()},children:y.title})}(O):(0,I.tZ)("span",{css:dt.titleButton({canEdit:Lt}),children:y.title}),0!==y.checked_out&&(0,I.tZ)("button",{type:"button",css:dt.lockButton,onClick:function(){et.mutate({type:"check-out",ids:y.id.toString()})},children:(0,I.tZ)(p.Z,{name:"lock",width:24,height:24})}),Z.enable_frontend_editing&&Lt&&(0,I.BX)("a",{"data-frontend-editor-button":!0,css:dt.frontendEditorButton,href:y.url,target:"_blank",rel:"noopener noreferrer",children:[(0,I.tZ)(p.Z,{name:"parmaLink",width:16,height:16}),(0,I.tZ)("span",{children:w("COM_SPPAGEBUILDER_EDITOR_FRONTEND_EDITOR")})]})]})})}),(0,I.tZ)("td",{css:dt.widthStyles({width:200}),children:(0,I.tZ)("pre",{children:y.page_type})}),_.includes("author")&&(0,I.tZ)("td",{css:dt.widthStyles({width:200}),children:(0,I.tZ)("p",{children:y.author})}),_.includes("categories")&&(0,I.tZ)("td",{children:(0,I.tZ)("p",{children:y.category})}),_.includes("access")&&(0,I.tZ)("td",{css:dt.access,children:(0,I.tZ)("p",{children:y.access_title})}),_.includes("id")&&(0,I.tZ)("td",{css:[a.c.body("medium"),J.iZ.textCenter,";label:PageListItem;"],children:(0,I.tZ)("p",{children:y.id})}),_.includes("hits")&&(0,I.tZ)("td",{css:[a.c.body("medium"),J.iZ.textCenter,";label:PageListItem;"],children:y.hits}),_.includes("language")&&(0,I.tZ)("td",{css:J.iZ.textCenter,children:(0,I.tZ)("p",{children:null!==(e=y.language_title)&&void 0!==e?e:w("COM_SPPAGEBUILDER_EDITOR_LANGUAGE_ALL")})}),(0,I.tZ)("td",{css:dt.status,children:(0,I.tZ)(d.Z,{value:y.published,options:At,onChange:function(t){et.mutate({type:{1:"published",0:"unpublished","-2":"trash"}[t.value],ids:y.id.toString()})},disabled:!It})}),(0,I.tZ)("td",{css:dt.actionColumn,children:(0,I.tZ)(K.Z,{actions:xt,triggerButtonContent:(0,I.tZ)(p.Z,{name:"ellipsisX",width:24,height:24,style:dt.triggerIcon}),onSelect:function(){var t=ct(it().mark((function t(e){return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="remove"===t.t0?3:"addToMenu"===t.t0?12:"view"===t.t0?14:"copyLink"===t.t0?16:"duplicate"===t.t0?18:"export"===t.t0?20:"rename"===t.t0?22:25;break;case 3:if(-2===y.published){t.next=6;break}return et.mutate({type:"trash",ids:y.id.toString()}),t.abrupt("break",25);case 6:return t.next=8,A({title:w("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_TITLE"),confirmationMessage:w("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_MESSAGE_SINGLE_PAGE"),confirmButtonText:w("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_DELETE_MODAL_DELETE_BUTTON_TEXT_SINGLE_ITEM"),mutationFn:V.hh,payload:{ids:y.id.toString(),type:"delete"},invalidateKeys:[["PageList"]]});case 8:return"CONFIRM"===t.sent.action&&x({type:"success",message:w("COM_SPPAGEBUILDER_EDITOR_BULK_ACTION_PERFORMED_SUCCESSFULLY")}),t.abrupt("break",25);case 12:return D({component:G,props:{title:w("COM_SPPAGEBUILDER_EDITOR_ADD_TO_MENU_MODAL_TITLE"),id:y.id}}),t.abrupt("break",25);case 14:return window.open(y.preview,"_blank","noopener=true,noreferrer=true"),t.abrupt("break",25);case 16:return r="".concat(j.Z.APPLICATION_ROOT,"index.php?option=com_sppagebuilder&view=page&id=").concat(y.id),n=void 0,(n=document.createElement("textarea")).value=r,n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),x({type:"success",message:w("COM_SPPAGEBUILDER_EDITOR_PAGE_COPY_LINK_MESSAGE")}),t.abrupt("break",25);case 18:return rt.mutate({id:y.id}),t.abrupt("break",25);case 20:return Tt(),t.abrupt("break",25);case 22:return ht.setValue("title",y.title),R(!0),t.abrupt("break",25);case 25:case"end":return t.stop()}var r,n}),t)})));return function(e){return t.apply(this,arguments)}}()})})]},y.id)};var st={name:"1qe2gq2-bodyTr",styles:"[data-frontend-editor-button]{display:flex;};label:bodyTr;"},dt={bodyTr:function(t){var e=t.isSelected,r=t.isShownFrontendButton;return(0,c.iv)("height:80px;border-bottom:1px solid ",i.qo.stroke.neutral,";position:relative;pre{margin-bottom:0;}&:hover{background-color:",i.qo.background.hover,";",r&&st," [data-drag-point]{opacity:1;}}",e&&(0,c.iv)("background-color:",i.qo.background.disabled,";;label:bodyTr;"),";;label:bodyTr;")},lockButton:(0,c.iv)(J.iZ.resetButton,";svg{color:",i.qo.icon.default,";};label:lockButton;"),titleButton:function(t){var e=t.canEdit;return(0,c.iv)(a.c.heading6(),";padding-inline:0;",e&&(0,c.iv)(":hover{color:",i.qo.text.primary,";};label:titleButton;")," ",!e&&(0,c.iv)("cursor:not-allowed;color:",i.qo.text.disabled,";;label:titleButton;"),";;label:titleButton;")},widthStyles:function(t){var e=t.width;return(0,c.iv)("width:",e,"px;;label:widthStyles;")},pageName:(0,c.iv)("position:relative;display:flex;gap:",i.W0[12],";align-items:center;max-width:400px;width:100%;;label:pageName;"),frontendEditorButton:(0,c.iv)(a.c.body(),";background-color:",i.qo.base.white,";border-radius:",i.E0[24],";padding:",i.W0[4]," ",i.W0[12]," ",i.W0[4]," ",i.W0[4],";width:fit-content;align-items:center;gap:",i.W0[8],";color:",i.qo.text.neutral,";display:none;position:absolute;left:100%;white-space:nowrap;svg{fill:none;}&:hover{color:",i.qo.text.hover,";}&::before,&::after{content:''!important;all:unset!important;};label:frontendEditorButton;"),checkboxWrapper:{name:"l0wqz3-checkboxWrapper",styles:"position:relative;label:checkboxWrapper;"},dragPoint:(0,c.iv)("position:absolute;top:0;left:0;height:100%;width:32px;display:flex;align-items:center;opacity:0;cursor:grab;svg{color:",i.qo.icon.default,";};label:dragPoint;"),access:{name:"sx074l-access",styles:"text-align:center;label:access;"},status:{name:"1n9i8ph-status",styles:"display:grid;place-content:center;height:inherit;label:status;"},triggerIcon:(0,c.iv)("color:",i.qo.icon.hints,";;label:triggerIcon;"),actionColumn:{name:"1m7ix2e-actionColumn",styles:"text-align:right;label:actionColumn;"}};const pt=function(t){var e=t.data,r=t.selectedItems,i=t.setSelectedItems,a=t.lastSelectedIndex,c=t.setLastSelectedIndex,s=t.isLoading,d=void 0!==s&&s,p=t.columns,f=t.isPopup,h=(0,l.$)(),y=e.length,v=r.ids.length,g=p.length+3;return(0,I.tZ)("div",{css:ht.tableContainer,children:(0,I.BX)("table",{css:ht.table({selectedColumns:p.length}),children:[(0,I.tZ)("thead",{children:(0,I.BX)("tr",{css:ht.headRow,children:[(0,I.tZ)("th",{css:ht.widthStyles({width:70}),children:(0,I.tZ)(n.Z,{checked:v>0&&v===y,isIndeterminate:v>0&&v<y,onChange:function(){var t=v===y?[]:(0,u.x9)(e),r=v===y?[]:(0,u.w6)(y);i({ids:t,indexes:r}),c(-1)}})}),(0,I.tZ)("th",{css:ht.widthStyles({width:250}),children:h(f?"COM_SPPAGEBUILDER_EDITOR_POPUP_LIST_POPUP_NAME":"COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_PAGE_NAME")}),(0,I.tZ)("th",{css:ht.widthStyles({width:180}),children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_TYPE")}),p.includes("author")&&(0,I.tZ)("th",{css:ht.widthStyles({width:180}),children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_AUTHOR")}),p.includes("categories")&&(0,I.tZ)("th",{children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_CATEGORIES")}),p.includes("access")&&(0,I.tZ)("th",{css:ht.textCenter,children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_ACCESS")}),p.includes("id")&&(0,I.tZ)("th",{css:ht.textCenter,children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_ID")}),p.includes("hits")&&(0,I.tZ)("th",{css:ht.textCenter,children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_HITS")}),p.includes("language")&&(0,I.tZ)("th",{css:ht.textCenter,children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_LANGUAGE")}),(0,I.tZ)("th",{css:[ht.widthStyles({width:160}),ht.textCenter,";label:PageListTable;"],children:h("COM_SPPAGEBUILDER_EDITOR_PAGE_LIST_STATUS")}),(0,I.tZ)("th",{css:ht.widthStyles({width:100})})]})}),(0,I.tZ)("tbody",{children:d?Array(10).fill(0).map((function(t,e){return(0,I.tZ)("tr",{css:ht.skeletonWrapper,children:Array(g).fill(0).map((function(t,e){return(0,I.tZ)("td",{css:ht.widthStyles({width:0===e?70:(0,u.sZ)(100,250)}),children:(0,I.tZ)(o.Z,{animation:!0,height:20,width:"".concat(0===e?100:(0,u.sZ)(90,100),"%")})},e)}))},e)})):e.map((function(t,n){return(0,I.tZ)(ut,{index:n,data:e,page:t,lastSelectedIndex:a,setLastSelectedIndex:function(t){return c(t)},selectedItems:r,setSelectedItems:function(t){i(t)},columns:p,isPopup:"popup"===t.extension_view},t.id)}))})]})})};var ft={name:"3vid4o-table",styles:"tr:hover{td{:nth-of-type(3)>*{visibility:hidden;}}};label:table;"},ht={tableContainer:{name:"1c7p8s-tableContainer",styles:"display:block;width:100%;overflow-x:auto;label:tableContainer;"},table:function(t){var e=t.selectedColumns;return(0,c.iv)("width:100%;th{background-color:",(0,s.m4)(i.qo.base.primary,.15),";color:",i.qo.text.default,";height:49px;}th,td{",a.c.body(),";padding:",i.W0[16],";:first-of-type{padding-left:",i.W0[32],";}:last-of-type{padding-right:",i.W0[24],";}}",e>0&&ft,";;label:table;")},headRow:(0,c.iv)("th{",a.c.body(),";};label:headRow;"),paginatorWrapper:(0,c.iv)("margin-top:",i.W0[32],";;label:paginatorWrapper;"),widthStyles:function(t){var e=t.width;return(0,c.iv)("width:",e,"px;;label:widthStyles;")},textCenter:{name:"lfnssf-textCenter",styles:"text-align:center;label:textCenter;"},skeletonWrapper:(0,c.iv)("border-bottom:1px solid ",i.qo.stroke.neutral,";height:80px;;label:skeletonWrapper;")}},7902:(t,e,r)=>{r.d(e,{Z:()=>y});var n=r(618),o=r(3871),i=r(7264),a=r(824),c=r(917),l=r(1234),u=r(2328),s=r(5944);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==d(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===d(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const y=function(t){var e=t.values,r=t.onChange,a=t.wrapperCss,c=t.clearButtonStatus,d=t.onClearFilter,p=(0,l.$)(),h=(0,u.v)((function(t){return t.appConfig})),y=e.status,g=e.access,E=e.category,m=e.language,b=e.type,_=[{label:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PUBLISHED"),value:1},{label:p("COM_SPPAGEBUILDER_EDITOR_FILTER_UNPUBLISHED"),value:0},{label:p("COM_SPPAGEBUILDER_EDITOR_FILTER_TRASHED"),value:-2}];return(0,s.BX)("div",{css:[v.wrapper,a,";label:FilterSelectGroup;"],children:[(0,s.BX)(n.$x,{onSelect:function(t){r(f(f({},e),{},{type:t}))},value:b,children:[(0,s.tZ)(n.i4,{"data-page-type":!0,children:(0,s.tZ)(n.ki,{placeholder:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_PAGE_TYPES")})}),(0,s.BX)(n.Bw,{children:[(0,s.tZ)(n.Ql,{value:"page",children:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PAGE_TYPE_PAGE")}),(0,s.tZ)(n.Ql,{value:"popup",children:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PAGE_TYPE_POPUP")}),(0,s.tZ)(n.U$,{}),(0,s.BX)(n.Ql,{value:"dynamic_content:index",children:[(0,s.tZ)(i.Z,{name:"dynamicContent",width:16,height:16}),p("COM_SPPAGEBUILDER_EDITOR_FILTER_PAGE_TYPE_INDEX")]}),(0,s.BX)(n.Ql,{value:"dynamic_content:detail",children:[(0,s.tZ)(i.Z,{name:"dynamicContent",width:16,height:16}),p("COM_SPPAGEBUILDER_EDITOR_FILTER_PAGE_TYPE_DETAIL")]}),(0,s.tZ)(n.fK,{children:p("COM_SPPAGEBUILDER_EDITOR_FORM_SELECT_CLEAR")})]})]}),(0,s.BX)(n.$x,{onSelect:function(t){r(f(f({},e),{},{status:t}))},value:y,children:[(0,s.tZ)(n.i4,{"data-page-type":!0,children:(0,s.tZ)(n.ki,{placeholder:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_STATUS")})}),(0,s.BX)(n.Bw,{children:[_.map((function(t,e){return(0,s.tZ)(n.Ql,{value:t.value,children:t.label},e)})),(0,s.tZ)(n.fK,{children:p("COM_SPPAGEBUILDER_EDITOR_FORM_SELECT_CLEAR")})]})]}),(0,s.BX)(n.$x,{onSelect:function(t){r(f(f({},e),{},{access:t}))},value:g,disabled:0===h.access_levels.length,children:[(0,s.tZ)(n.i4,{"data-page-type":!0,children:(0,s.tZ)(n.ki,{placeholder:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_ACCESS")})}),(0,s.BX)(n.Bw,{children:[h.access_levels.map((function(t,e){return(0,s.tZ)(n.Ql,{value:t.value,children:t.label},e)})),(0,s.tZ)(n.fK,{children:p("COM_SPPAGEBUILDER_EDITOR_FORM_SELECT_CLEAR")})]})]}),(0,s.BX)(n.$x,{onSelect:function(t){r(f(f({},e),{},{category:t}))},value:E,disabled:0===h.categories.length,children:[(0,s.tZ)(n.i4,{"data-page-type":!0,children:(0,s.tZ)(n.ki,{placeholder:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_CATEGORY")})}),(0,s.BX)(n.Bw,{children:[h.categories.map((function(t,e){return(0,s.tZ)(n.Ql,{value:t.value,children:t.label},e)})),(0,s.tZ)(n.fK,{children:p("COM_SPPAGEBUILDER_EDITOR_FORM_SELECT_CLEAR")})]})]}),(0,s.BX)(n.$x,{onSelect:function(t){r(f(f({},e),{},{language:t}))},value:m,disabled:0===h.languages.length,children:[(0,s.tZ)(n.i4,{"data-page-type":!0,children:(0,s.tZ)(n.ki,{placeholder:p("COM_SPPAGEBUILDER_EDITOR_FILTER_PLACEHOLDER_LANGUAGE")})}),(0,s.BX)(n.Bw,{children:[h.languages.map((function(t,e){return(0,s.tZ)(n.Ql,{value:t.value,children:t.label},e)})),(0,s.tZ)(n.fK,{children:p("COM_SPPAGEBUILDER_EDITOR_FORM_SELECT_CLEAR")})]})]}),(0,s.tZ)(o.Z,{variant:"secondary",disabled:!c,buttonCss:v.itemCss,onClick:function(){r({status:null,access:null,category:null,language:null,type:null}),d()},children:p("COM_SPPAGEBUILDER_EDITOR_CLEAR")})]})};var v={wrapper:(0,c.iv)("display:flex;border:1px solid ",a.qo.stroke.neutral,";border-radius:",a.E0[5],";overflow:hidden;box-shadow:",a.AF.input,";input,button,[data-page-type]{border:none;border-radius:0;box-shadow:none;}input,[data-page-type]{border-right:1px solid ",a.qo.stroke.neutral,";:focus{box-shadow:none;}}button:last-of-type{display:flex;justify-content:center;align-items:center;}[data-placeholder='true']{color:",a.qo.text.hints,";};label:wrapper;"),itemCss:{name:"ebky32-itemCss",styles:"min-width:140px;label:itemCss;"}}}}]);