Your IP : 216.73.216.85


Current Path : /home/smartconb/www/armencom33/media/quixnxt/js/
Upload File :
Current File : /home/smartconb/www/armencom33/media/quixnxt/js/qxfb.js

/*! For license information please see qxfb.js.LICENSE.txt */
(()=>{var e,t,n,r,o,i,a,l={39054:(e,t,n)=>{"use strict";n(77884);var r=n(67297),o=n(3209);const i=new(n.n(o)());n(60790);var a=n(28966),l=(n(31999),n(15699)),s=(n(3576),n(32444)),c=(n(18553),n(11820)),u=(n(88897),n(62257)),p=(n(55936),n(936)),f=n(45304),d=n.n(f),h=(n(46822),n(35381)),y=n(98819);h.default.config({placement:"bottomRight",bottom:50,duration:5,getContainer:function(){return window.document.body}});const m={log:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"qxuicon-smile";h.default.open({message:e,description:t,className:n,prefixCls:"qxui-notification",icon:(0,y.jsx)("i",{className:"".concat(r)})})},info:function(e){this.log("Info",e,"qxui-notification---info","qxuicon-meh")},warning:function(e){this.log("Warning",e,"qxui-notification---warning","qxuicon-meh")},success:function(e){this.log("Success",e,"qxui-notification---success")},error:function(e){this.log("Error",e,"qxui-notification---error","qxuicon-frown")}};var b=n(22960),v=n(41041),g="SET_CONTAINER_WIDTH",x="OPEN_EXPORT_IMPORT",j="OPEN_SAVE_AS_COLLECTION",w="OPEN_SEO",O="UPDATE_QID",S="REDO",P="UNDO",q="SET_STATE_FROM_HISTORY",C="UPDATE_NODE_FIELD",k="IMPORT_NODES",N="FORCE_COLUMN_RESIZE",E="UPDATE_TITLE",R="ADD_ROW_NODE",T="ADD_COLUMN_NODE",D="ADD_SECTION_NODE",A="ADD_ELEMENT_NODE",I="ADD_MY_ELEMENT_NODE",M="DUPLICATE_NODE",L="COPY_NODE",B="PASTE_NODE",F="INSERT_COPIED_NODES",U="DELETE_NODE",z="MOVE_NODE",H="CHANGE_ROW_LAYOUT",Q="WITHDRAW_ROW_LAYOUT",W="SET_NODE_VISIBILITY",G="APPLY_NODE_FORM",J="SET_DEVICE",V="PASTE_NODE_STYLE",Z="PASTE_NODE_STYLE_SPECIAL",X="RESET_NODE_STYLE",Y="DUPLICATE_COLUMN_NODE",K="APPEND_PRESET",ee="PREPEND_PRESET",te="REPLACE_PRESET",ne="SET_NODES",re="INSERT_NODES",oe="RESPONSIVE_MODE",ie="SAVED_NODES",ae="UPDATE_COLUMN_WIDTH",le="REPLACE_NODE",se="CHANGE_COLUMN_WIDTH",ce="SET_COLUMN_WIDTH",ue="EMPTY_NODES",pe="SET_ACTION",fe="SHOW_ELEMENT_MODAL",de="OPEN_JMEDIA",he="OPEN_TEMPLATES",ye="OPEN_SAVE_SECTION_MODAL",me="OPEN_ELEMENT_SAVE_MODAL",be="DISPLAY_CONDITIONS_MODAL",ve="DISPLAY_OPTIMIZATION_MODAL",ge="SHOW_FORM_MODAL",xe="SET_FORM_NODE",je="SET_DND_PLACEMENT";function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:pe,payload:{action:e?fe:null,path:e,index:t}}}function Oe(e){return{type:pe,payload:{action:e?ye:null,path:e}}}function _e(e){return{type:pe,payload:{action:e?me:null,path:e}}}function Se(e){return{type:pe,payload:{action:e?be:null}}}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:pe,payload:{action:e?he:null,path:e}}}function qe(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?w:null}}}function Ce(e){return{type:q,payload:e}}function ke(e,t,n){return{type:C,payload:{nodePath:e,valuePath:t,value:n}}}function Ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:re,payload:{index:e,newNodes:t}}}function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:D,payload:{index:e}}}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:R,payload:{path:e,index:t}}}function Te(e,t){return{type:H,payload:{path:e,layout:t}}}function De(e,t){return{type:z,payload:{from:e,to:t}}}function Ae(e,t){return{type:M,payload:{path:e,name:t}}}function Ie(e,t){return{type:le,payload:{path:e,node:t}}}function Me(e,t){return{type:L,payload:{path:e,node:t}}}function Le(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:B,payload:{path:e,bellow:t}}}function Be(e){return{type:V,payload:{path:e}}}function Fe(e,t){return{type:Z,payload:{nodePath:e,stylePath:t}}}function Ue(e,t){return{type:U,payload:{path:e,name:t}}}function ze(e,t){return{type:W,payload:{path:e,visibility:t}}}function He(e){return{type:J,payload:{device:e}}}function Qe(e){return{type:O,payload:e}}var We=n(79339),Ge=n.n(We),Je=n(63095),Ve=n.n(Je),$e="BEFORE",Ze="AFTER",Xe={0:"text-danger",1:"text-success",2:"text-mute"},Ye={0:"qxuicon-times-circle",1:"qxuicon-check-circle",2:"qxuicon-archive"},Ke={mobile:"sm",tablet:"md",desktop:"lg"},et={sm:"mobile",md:"tablet",lg:"desktop"};function tt(){return quix.url.endsWith("/")?quix.url.slice(0,-1):quix.url}function nt(){return window.QuixLicenseStatus}function rt(){return window.QuixCollectionList}function ot(){return window.QuixPageList}function it(){return window.QUIX_ROOT_URL}function at(){return window.QUIXNXT_URL}function lt(){return window.QUIXNXT_JMEDIA_PATH_URL}function st(){return jQuery("#jform_token").attr("name")}function ct(){var e;return null===(e=Dr("jform_title_hidden"))||void 0===e?void 0:e.value}function ut(){return window.QuixBuilderType}function pt(){return window.QUIX_API_VALIDATION.success}function ft(){return window.Joomla}var dt=function(e){var t=window.localStorage.getItem(e);try{return JSON.parse(t)}catch(e){return t}},ht=function(e,t){window.localStorage.setItem(e,JSON.stringify(t))},yt=function(e){window.localStorage.removeItem(e)},mt=n(1572),bt=n.n(mt),vt=n(34030),gt=n.n(vt),xt=n(6266),jt=n.n(xt),wt=n(22866);function Ot(e){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(e)}function _t(e){return!e||"string"==typeof e&&""===e.trim()||!(!Array.isArray(e)||0!==e.length)||"object"===Ot(e)&&0===Object.keys(e).length}function St(e){return e?e.split("_").map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join(" "):e}function Pt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null,r={lg:"Desktop",md:"Tablet",sm:"Phone",xs:"Phone"};return void 0!==r[e]&&(n=r[e]),!n&&Object.values(r).includes(e)&&(n=Object.keys(r)[Object.values(r).indexOf(e)]),n?t?n.toLowerCase():n:null}function qt(e){return _t(e)?"":("object"===Ot(e)&&void 0!==e.source&&(e=e.source),bt()(e,"data:image")||bt()(e,"http")||bt()(e,"//")?(t=e,(bt()(e,"https://getquix.net")||bt()(e,"http://getquix.net"))&&(t=(t=e.replace("https://getquix.net","https://quix.b-cdn.net")).replace("http://getquix.net","https://quix.b-cdn.net"))):t=bt()(e,"media")||bt()(e,window.quix.image_path)?tt()+"/"+e:lt()+e.replace(/^\//,""),t);var t}function Ct(e){var t=new URL(e);return t.host="quix.b-cdn.net",t.protocol="https:",t.toString()}var kt=n(55254),Nt=n.n(kt);Nt().config({driver:[Nt().WEBSQL,Nt().INDEXEDDB,Nt().LOCALSTORAGE],name:"Quix@v4.x.x Cache Storage"});var Et,Rt=function(e){return Nt().getItem(e)},Tt=function(e,t){return Nt().setItem(e,t)},Dt=function(e){return new Promise((function(t,n){var r=[];for(var o in e)if(e.hasOwnProperty(o))if("string"==typeof e[o]||Array.isArray(e[o]))r.push(Tt(o,e[o]));else for(var i in e[o])e[o].hasOwnProperty(i)&&e[o][i]&&r.push(Tt("".concat(o,"-").concat(i),e[o][i]));Promise.all(r).then((function(){t()})).catch(n)}))},At=function(){return ar(Et)},It=function(e){return Et.find((function(t){return t.slug===e})).thumb_file},Mt=function(e){return Rt("".concat(e,"-html"))},Lt=function(e){return Rt("".concat(e,"-schema"))},Bt=n(41578),Ft=n.n(Bt),Ut=n(22898),zt=n.n(Ut);function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){Gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vt(e,t):void 0}}(e,t)||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.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $t(){$t=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function p(){}function f(){}function d(){}var h={};l(h,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(_([])));m&&m!==t&&n.call(m,o)&&(h=m);var b=d.prototype=p.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function r(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,p=u.value;return p&&"object"==Ht(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(p).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=d,l(b,"constructor",d),l(d,"constructor",f),f.displayName=l(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,l(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),l(b,a,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=_,O.prototype={constructor:O,reset:function(e){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(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function Zt(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Xt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zt(i,r,o,a,l,"next",e)}function l(e){Zt(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Yt(e){return Kt.apply(this,arguments)}function Kt(){return Kt=Xt($t().mark((function e(t){var n,r,o,i,a,l,s,c,u,p;return $t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=function(){return a=Xt($t().mark((function e(t){var a,l,s,c,u;return $t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(zt()(t))for(a=Object.entries(t),l=0;l<a.length;l+=1)s=Jt(a[l],2),c=s[0],u=s[1],"image"==c||"src"==c||"poster"==c?""!=u&&u.base_domain!=it()&&function(){var e=Wt({},u),t=n.findIndex((function(t){return t.source===e.source}));""!=e.source&&null!=e.base_domain&&""!=e.base_domain&&e.base_domain!=it()&&-1===t&&(n.push(e),r++,o++),-1!=t&&(o++,console.log(e)),u.base_domain=it()}():i(u);else Ft()(t)&&t.map((function(e){i(e)}));case 1:case"end":return e.stop()}}),e)}))),a.apply(this,arguments)},i=function(e){return a.apply(this,arguments)},n=[],r=0,o=0,e.next=7,i(t);case 7:if(!(r>0)){e.next=14;break}return l=function(){var e=Xt($t().mark((function e(){var t,r;return $t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n[s],(r=new FormData).set("data",JSON.stringify(t)),""==t.base_domain||""==t.source){e.next=11;break}return e.next=6,jt()({method:"post",url:tt()+"/index.php?option=com_quix&task=api.downloadMedia&"+quix._token+"=1",data:r,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(e){0==e.data.data&&u++,504==e.status?m.warning("Failed to load resource: 504 (Gateway Time-out)"):200!=e.status&&m.warning(e.statusText,"Something is wrong."),p=!0})).catch((function(e){e&&m.warning(response.statusText,"Something is wrong.")}));case 6:if(!(++s>c-1)){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,l();case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),m.info("We are downloading remote images to your local. Please wait..."),s=0,c=n.length,u=0,p=!1,e.next=13,l();case 13:u>0&&u<c?1==u?m.warning("Remote images downloaded partially. "+o+" images are found! \n"+(o-u)+" successfully downloaded!But "+u+" is failed."):m.warning("Remote images downloaded partially. "+o+" images are found! \n"+(o-u)+" successfully downloaded!But "+u+" are failed."):p&&!u?1==o?m.success("Remote image downloaded successfully."):m.success(o+" remote images are found & downloaded successfully."):m.warning("Download process has failed. Please download your image manually.");case 14:case"end":return e.stop()}}),e)}))),Kt.apply(this,arguments)}var en,tn={};setInterval((function(){var e=new Date;for(var t in tn)tn.hasOwnProperty(t)&&tn[t].time<e-3600&&delete tn[t]}),1e4),document.addEventListener("DOMContentLoaded",(function(){var e=Dr("q-store");try{en=e.contentWindow}catch(t){en=e.contentWindow}en.postMessage({action:"init"},"*"),window.addEventListener("message",(function(e){if("https://getquix.net"===e.origin){var t=e.data,n=t.result,r=t.requestId;tn[r]&&tn[r].callback(n)}}))}));var nn=function(e,t,n){return new Promise((function(r){var o=Math.trunc(1e6*Math.random());en.postMessage({action:e,payload:{key:t,value:n,requestId:o}},"*"),tn[o]={callback:r,time:new Date}}))},rn=function(e){return nn("get",e)},on=function(e,t){return nn("set",e,t)};function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function ln(){ln=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function p(){}function f(){}function d(){}var h={};l(h,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(_([])));m&&m!==t&&n.call(m,o)&&(h=m);var b=d.prototype=p.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function r(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,p=u.value;return p&&"object"==an(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(p).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=d,l(b,"constructor",d),l(d,"constructor",f),f.displayName=l(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,l(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(b),l(b,a,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=_,O.prototype={constructor:O,reset:function(e){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(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function sn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){pn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){return!["section","row","column"].includes(e.slug)}function dn(e){var t=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["lg","md","xs"];Rr.click();for(var r=e.props,o=r.node.visibility,i=r.path,a=un({},o),l=0,s=Object.keys(a);l<s.length;l++){var c=s[l];n.includes(c)&&(a[c]=t)}e.props.setNodeVisibility(i,a)},n=e.props,r=n.device,o=n.node.visibility,i=Object.values(o).filter((function(e){return!!e})).length>2?(0,y.jsxs)(wt.ck,{onClick:function(){return t(!1)},children:[(0,y.jsx)("i",{className:"qxuicon-low-vision"})," Disable for all"]},"setNodeVisibilityDisable"):(0,y.jsxs)(wt.ck,{onClick:function(){return t(!0)},children:[(0,y.jsx)("i",{className:"qxif-eye"})," Enable for all"]},"setNodeVisibilityEnable"),a=function(e){return e?(0,y.jsx)("i",{className:"qxif-eye"}):(0,y.jsx)("i",{className:"qxuicon-low-vision"})};return(0,y.jsxs)(wt.rS,{label:(0,y.jsxs)("span",{onClick:function(){return t(!o[r],[r])},children:[a(o[r]),o[r]?"Disable for ".concat(Pt(r)):"Enable for ".concat(Pt(r))]}),arrow:(0,y.jsx)("i",{className:"qxif-caret-right"}),children:[i,["lg","md","xs"].map((function(e){return e!==r?(0,y.jsxs)(wt.ck,{onClick:function(){return t(!o[e],[e])},children:[a(o[e])," ",o[e]?"Disable":"Enable"," for ",Pt(e)]},e):null}))]},"visibilitySubmenu")}function hn(e){return["section","row","column","element"].indexOf(e)}function yn(e,t){var n=hn(e),r=hn(t);return n<=r&&r-n<=1}function mn(e){var t,n,r,o=[];if(e.props.node.id&&o.push((0,y.jsxs)(wt.ck,{onClick:function(){return e.props.copyNode(e.props.path)},children:[(0,y.jsx)("i",{className:"qxuicon-clipboard"})," Copy"]},"copy")),null===(t=e.props.copiedNode)||void 0===t||!t.id)return o;var i=function(){var t,n=(t=ln().mark((function t(){var n,r,o=arguments;return ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!(o.length>0&&void 0!==o[0])||o[0],t.next=3,rn("qx-node").then((function(e){return e}));case 3:return r=t.sent,t.next=6,Yt(r);case 6:e.props.pasteNode(e.props.path,n),m.success("Pasted successfully.");case 8:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){sn(i,r,o,a,l,"next",e)}function l(e){sn(i,r,o,a,l,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();return yn(fn(e.props.node)?"element":null===(n=e.props.node)||void 0===n?void 0:n.slug,fn(e.props.copiedNode)?"element":null===(r=e.props.copiedNode)||void 0===r?void 0:r.slug)&&o.push((0,y.jsxs)(wt.rS,{label:(0,y.jsxs)("span",{onClick:function(){i(!0),(0,(0,wt.av)({id:e.state.id}).hideAll)()},children:[" ",(0,y.jsx)("i",{className:"qxuicon-paste"})," Paste "]}),arrow:(0,y.jsx)("i",{className:"qxif-caret-right"}),children:[(0,y.jsxs)(wt.ck,{onClick:function(){return i(!1)},children:[(0,y.jsx)("i",{className:"qxuicon-paste"}),"Paste Above"]},"paste"),(0,y.jsxs)(wt.ck,{onClick:function(){return e.props.pasteNodeStyle(e.props.path)},children:[(0,y.jsx)("i",{className:"qxuicon-paint-brush"}),"Paste Style"]},"paste-style")]},"pasteSubmenu")),o}function bn(e){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(e)}function vn(e){return function(e){if(Array.isArray(e))return _n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||On(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gn(Object(n),!0).forEach((function(t){jn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=On(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function On(e,t){if(e){if("string"==typeof e)return _n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Sn=[],Pn=[],qn=[],Cn=[[[1,1]],[[1,2],[1,2]],[[1,3],[1,3],[1,3]],[[1,4],[1,4],[1,4],[1,4]],[[2,3],[1,3]],[[1,3],[2,3]],[[1,4],[3,4]],[[3,4],[1,4]],[[1,2],[1,4],[1,4]],[[1,4],[1,4],[1,2]],[[1,4],[1,2],[1,4]],[[1,5],[1,5],[1,5],[1,5],[1,5]]];function kn(e){return qn.indexOf(e)>=0}function Nn(e){return ar(Pn.find((function(t){return t.slug===e})))}function En(){var e=Nn("section"),t=lr(e.slug),n=e.form;return{id:t,hash:lr("edit-hash"),children:[],slug:e.slug,form:xn(xn({},n),{},{advanced:xn(xn({},n.advanced),{},{identifier:xn(xn({},n.advanced.identifier),{},{id:t})})}),visibility:xn({},e.visibility)}}function Rn(){var e=Nn("row"),t=lr(e.slug),n=e.form;return{id:t,hash:lr("edit-hash"),children:[],slug:e.slug,form:xn(xn({},n),{},{advanced:xn(xn({},n.advanced),{},{identifier:xn(xn({},n.advanced.identifier),{},{id:t})})}),visibility:xn({},e.visibility)}}function Tn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=Nn("column"),n=lr(t.slug),r=In(e),o=t.form;return{id:n,hash:lr("edit-hash"),children:[],slug:t.slug,form:xn(xn({},o),{},{general:xn(xn({},o.general),{},{layout_fields_group:xn(xn({},o.general.layout_fields_group),{},{col_width:r})}),advanced:xn(xn({},o.advanced),{},{identifier:xn(xn({},o.advanced.identifier),{},{id:n,label:o.name})})}),visibility:xn({},t.visibility)}}function Dn(e){var t=Nn(e.slug),n=lr(e.slug);return{id:n,name:t.name,group:t.group,hash:lr("edit-hash"),children:[],slug:t.slug,form:xn(xn({},t.form),{},{advanced:xn(xn({},t.form.advanced),{},{identifier:xn(xn({},t.form.advanced.identifier),{},{id:n,label:t.slug})})}),visibility:xn({},t.visibility)}}function An(e){var t=ar(e),n=lr(e.slug);return{id:n,name:t.name,group:t.group,hash:lr("edit-hash"),children:[],slug:t.slug,form:xn(xn({},t.form),{},{advanced:xn(xn({},t.form.advanced),{},{identifier:xn(xn({},t.form.advanced.identifier),{},{id:n,label:t.slug})})}),visibility:xn({},t.visibility)}}function In(e){return{desktop:e=parseFloat((100*e).toFixed(5)),tablet:e,phone:100,unit:"%"}}function Mn(e,t,n){return Xn(e,[].concat(vn(t),[n+1]),(function(e,t){var n=t.length+1;if(n>12)return vn(t);var r=Tn(1/n);return Ln(Vn(t,e,r),r.form.general.layout_fields_group.col_width)}))}function Ln(e,t){return e.map((function(e){return e.form.general.layout_fields_group.col_width=xn({},t),e.hash=lr("qx-edit"),e}))}function Bn(e,t,n){return Xn(vn(e),vn(t),(function(e,t){return t[e]=n,t}))}function Fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Xn(vn(e),vn(t),(function(e,t){var r=Vn(t,e+1,Gn(ar(t[e])));return n?Ln(r,In(1/r.length)):r}))}function Un(e,t,n){return $n(e,n,Gn(ar(t)))}function zn(e,t,n){var r=er(vn(e),vn(t));e=$n(vn(e),vn(n),r);var o=vn(t),i=o.pop(),a=vn(n),l=a.pop();if(o.join()===a.join()){var s=i>l?i+1:i;return Jn(vn(e),[].concat(vn(o),[s]))}return Jn(vn(e),vn(t))}function Hn(e,t){var n=e.form.advanced,r=t.form.advanced.identifier,o=r.id,i=r.class,a=r.acl;return xn(xn({},e),{},{form:xn(xn({},e.form),{},{advanced:xn(xn({},n),{},{identifier:xn(xn({},n.identifier),{},{id:o,class:i,acl:a})})})})}function Qn(e,t,n){return Xn(e,t,(function(e,t){return t[e]=Wn(t[e],n),t}))}function Wn(e,t){return t?Array.isArray(e)?e.map((function(e,n){return Wn(e,t[n])})):(Object.keys(e).forEach((function(n){void 0!==t[n]&&("object"===bn(e[n])?e[n]=Wn(e[n],t[n]):e[n]=t[n])})),e):e}function Gn(e){var t=Array.isArray(e);return t||(e=[e]),e=vn(e).map((function(e){var t;return e.id=lr(e.slug),e.form.advanced.identifier.id=e.id,null!==(t=e.children)&&void 0!==t&&t.length&&(e.children=Gn(e.children)),e})),t?e:e[0]}function Jn(e,t){return Xn(e,t,(function(e,t){return delete t[e],Array.isArray(t)?t.filter((function(e){return!!e})):t}))}function Vn(e,t,n){var r=e.slice(0,+t),o=e.slice(+t);return[].concat(vn(r),[n],vn(o))}function $n(e,t,n){return Xn(e,t,(function(e,t){return Vn(t,e,n)}))}function Zn(e,t,n){return Xn(e,t,(function(e,t){return t[e]=n,t}))}function Xn(e,t,n){var r=t.shift();return e=Array.isArray(e)?vn(e):xn({},e),0===t.length?n(r,e):(void 0===e[r]||(e[r]=Xn(e[r],t,n)),e)}function Yn(e,t,n,r){return Xn(e,t,(function(e,t){var o=t[e];return o.hash=lr("edit-hash"),t[e]=xn({},Kn(o,n,r)),t}))}function Kn(e,t,n){var r=t.shift();return void 0===e[r]?e:0===t.length?(e[r]=n,e):(e[r]=Kn(e[r],t,n),e)}function er(e,t){var n=t.shift();return e&&void 0!==e[n]?t.length>0?er(e[n],t):e[n]:null}function tr(e,t,n){return[].concat(vn(t),vn(Gn(n)))}function nr(e,t,n){return t.forEach((function(t,r){n=$n(vn(n),[].concat(vn(e),[r]),Tn(t))})),n}function rr(e,t){return Xn(e,t,(function(e,t){var n=t[e];if("row"!==n.slug)return t;var r=In(1/(n.children.length||1));return n.children=Ln(n.children,r),t[e]=n,t}))}function or(e){if(!Array.isArray(e)&&e.label&&(!e.schema||0===node.schema.length))return ir(e);var t={};return e.forEach((function(e,n){void 0===e.name?Array.isArray(e)?t[n]=ir(e):t[n]=e:t[e.name]=ir(e)})),0===Object.keys(t).filter((function(e){return!Number.isInteger(+e)})).length?Object.values(t):t}function ir(e){return"group-repeater"===e.type?e.value.map(or):e.value?Array.isArray(e.value)?((null===(t=e.units)||void 0===t?void 0:t.length)>0&&"object"===bn(e.value)&&e.units.includes(e.suffix)&&(e.value.unit=e.value.unit||e.suffix),or(e.value)):"object"===bn(e.value)&&e.value.label&&e.value.value?e.value.value:e.value:e.value;var t}function ar(e){if(void 0===e)return{};try{return JSON.parse(JSON.stringify(e))}catch(t){console.warn("JSON Object Parsing error.",e,t)}}function lr(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t="",n="abcdefghijklmnopqrstuvwxyz0123456789",r=0;r<5;r++)t+=n.charAt(Math.floor(Math.random()*n.length));return e?"qx-".concat(e.replace(/^qx-/,"").replace(/-\d+$/,""),"-").concat(t):t}function sr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image";if(!e||"object"!==bn(e))return[];if(Array.isArray(e))return e.flatMap((function(e){return sr(e,t)}));var n=[];for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];o&&"object"===bn(o)&&(o.type&&o.source&&o.type===t?n.push(o.source):n=[].concat(vn(n),vn(sr(o,t))))}return n}function cr(e){var t,n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e.props.copiedNode)return!1;var o=!1,i=fn(e.props.copiedNode)?"element":null===(t=e.props)||void 0===t||null===(n=t.copiedNode)||void 0===n?void 0:n.slug;if(e.props.copiedNode&&"element"===i&&r)o=!0;else if(e.props.node&&"element"===i){var a,l,s=fn(e.props.node)?"element":null===(a=e.props)||void 0===a||null===(l=a.node)||void 0===l?void 0:l.slug;o=yn(s,i)}return o}function ur(e){return function(e){if(Array.isArray(e))return pr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fr(e){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(e)}Ge().cache(!0),Ge().extendFilter("wrap",(function(e,t){return"<".concat(t,"> ").concat(e," </").concat(t,">")})),Ge().extendFilter("json_decode",(function(e){return gt()(e)?"":JSON.parse(e)})),Ge().extendFilter("removeLines",(function(e){return null==e?void 0:e.replace(/(\r\n|\n|\r)/gm,"")})),Ge().extendFilter("link",(function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=null===(t=o[0])||void 0===t?void 0:t.url,a=null===(n=o[0])||void 0===n?void 0:n.target,l=null===(r=o[0])||void 0===r?void 0:r.nofollow,s="",c="";return o[1]&&(s='class="'+o[1]+'"'),o[2]&&(c=" "+o[2]),a=a?'target="_blank"':"",l=l?'rel="nofollow"':"",i?"<a ".concat(s,' href="').concat(i,'" ').concat(a," ").concat(l).concat(c,"> ").concat(e," </a>"):"".concat(e)})),Ge().extendFunction("inlineEditor",(function(e){var t=this.context.path,n=lr(this.context.advanced.identifier.id);return'id="inline-editable-'.concat(n,'" data-node-path="').concat(t,'" data-value-path="').concat(e,'"')})),Ge().extendFunction("startTag",(function(e,t){return"<".concat(e," ").concat(t,">")})),Ge().extendFunction("replaceAll",(function(e,t,n){return null==e?void 0:e.replaceAll(t,n)})),Ge().extendFunction("loadSvg",(function(e){return bt()(e,"<svg")||bt()(e,"<?xml")?e:'<i class="'.concat(e,'"></i>')})),Ge().extendFunction("icon",(function(e){return bt()(e,"<svg")||bt()(e,"<?xml")?e:"svg"===e.split(".").pop()?'<img src="'+tt()+"/"+e+'" alt="icon-alt" class="qx-preserve" qx-svg="" />':'<i class="'.concat(e,'"></i>')})),Ge().extendFunction("prepareWidthValue",(function(e){return e.unit?e:{unit:"%",value:e}})),Ge().extendFunction("prepareResponsiveValue",(function(e){if("object"!==fr(e))return{value:{},unit:"px"};if(void 0!==e.desktop)return e.unit=gt()(e.unit)?"px":e.unit,e;var t=e.value;return t.unit=void 0===e.unit?"px":e.unit,t})),Ge().extendFunction("prepareSvgSizeValue",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"object"==fr(e)?e:{value:e,unit:"px"}})),Ge().extendFunction("visibilityClass",(function(){return""})),Ge().extendFunction("visibilityClassNode",(function(){return""})),Ge().extendFunction("image",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(gt()(e))return"";t=t.replace(/(<([^>]+)>)/gi,"");var i=qt(e);return null!==o&&o.dimension?'<img draggable="false" data-src="'.concat(i,'" alt="').concat(t,'" class="').concat(n,'" width="').concat(o.dimension.width,'" height="').concat(o.dimension.height,'" ').concat(r," qx-img/>"):'<img data-width="100" data-height="100" draggable="false" data-src="'.concat(i,'" alt="').concat(t,'" class="').concat(n,'" ').concat(r," qx-img/>")})),Ge().extendFunction("imageUrl",(function(e){return gt()(e)?"":("object"===fr(e)&&void 0!==e.source&&(e=e.source),bt()(e,"data:image")||bt()(e,"http")?e:bt()(e,"libraries")||bt()(e,"media")||bt()(e,"images")?quix.url+"/"+e:lt()+e.replace(/^\//,""))})),Ge().extendFunction("rootUrl",(function(){return it()})),Ge().extendFunction("video",(function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" playsInline controls ",o=t.link_type;if(["youtube","vimeo"].includes(o)){var i="youtube"===o?t.youtube_link:t.vimeo_link;return'<div id="video-'.concat(e,'" data-plyr-provider="').concat(o,'" data-plyr-embed-id="').concat(i,'"> Loading...</div>')}if("custom"===o&&null!==(n=t.custom_video)&&void 0!==n&&n.source){var a=t.custom_video.source,l=qt(t.video_poster.source),s=qt(a),c="video/"+a.split(".").pop();return'<video id="'.concat(e,'" poster="').concat(l,'" ').concat(r,'>\n    <source type="').concat(c,'" src="').concat(s,'" />\n    Your browser does not support the video tag.\n  </video>')}return'<p class="qx-alert qx-alert-warning qx-m-0">Please select video first!</p>'})),Ge().extendFunction("getJoomlaModule",(function(e,t){var n=st(),r="".concat(tt(),"/index.php?option=com_quix&task=api.getJoomlaModule&id=").concat(e,"&style=").concat(t,"&").concat(n,"=1");return new Promise((function(e,t){jt().get(r).then((function(t){var n=t.data.replace(/name=|form/gi,(function(e){return"x"+e}));e(n)})).catch((function(e){t(e)}))}))})),Ge().extendFunction("getQuixTemplate",(function(e){var t=st(),n="".concat(tt(),"/index.php?option=com_quix&task=api.getQuixTemplate&id=").concat(e,"&").concat(t,"=1");return new Promise((function(e,t){jt().get(n).then((function(t){var n=t.data.replace(/name=|form/gi,(function(e){return"x"+e}));e(n)})).catch((function(e){t(e)}))}))})),Ge().extendFunction("ElementApiCall",(function(e,t){var n=btoa(JSON.stringify(t)),r="".concat(tt(),"/index.php?option=com_quix&task=ajax&builder=frontend&element=").concat(e,"&").concat(st(),"=1&data=").concat(n);return new Promise((function(e,t){jt().get(r).then((function(t){(t=t.data).success?e(t.data):e(e.messages)})).catch((function(e){t(e)}))}))})),Ge().extendFunction("ajaxPostQuix",(function(e,t){var n=new FormData;for(var r in t)n.set(r,t[r]);var o="".concat(tt(),"/index.php?option=com_quix&task=ajax&builder=frontend&element=").concat(e,"&").concat(st(),"=1");return new Promise((function(e,t){jt().post(o,n).then((function(t){(t=t.data).success?e(t.data):e(e.messages)})).catch((function(e){t(e)}))}))})),Ge().extendFunction("prepareContent",(function(e,t){if(!t)return e;var n=st(),r="".concat(tt(),"/index.php?option=com_quix&task=api.prepareContent&").concat(n,"=1"),o=new FormData;return o.set("content",e),new Promise((function(e,t){jt()({method:"post",url:r,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(t){var n=t.data.replace(/name=|form/gi,(function(e){return"x"+e}));e(n)})).catch((function(e){t(e)}))}))})),Ge().extendFunction("startsWith",(function(e,t){return bt()(e,t)})),Ge().extendFunction("validateJoomlaCaptcha",(function(){return"true"})),Ge().extendFunction("captchaPublicKey",(function(){return dt("captcha-public-key")})),Ge().extendFunction("classNames",(function(){return Ve().apply(void 0,arguments).replace("_keys","")})),Ge().extendFunction("getOpacity",(function(e,t){return e.state[t].opacity})),Ge().extendFunction("wrapper",(function(e,t){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return n?"</"+e+">":"<"+e+">"})),Ge().extendFunction("formFooter",(function(){return""})),Ge().extendFunction("lazyBackground",(function(){var e,t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i||(i=null==o||null===(e=o.state)||void 0===e||null===(t=e.normal)||void 0===t||null===(n=t.properties)||void 0===n||null===(r=n.src)||void 0===r?void 0:r.source),i?"style=\"background-image:url('"+i+"');\"":""})),Ge().extendFunction("ifElementHasBackground",(function(){var e,t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=null==o||null===(e=o.state)||void 0===e||null===(t=e.normal)||void 0===t||null===(n=t.properties)||void 0===n||null===(r=n.src)||void 0===r?void 0:r.source;return console.log("ifElementHasBackground",i),!!i})),Ge().extendFunction("addIconStyle",(function(e,t){console.log("addIconStyle",t.properties.size);var n=t.properties.size;return"object"===fr(n)&&(n=n.value),'<style type="text/css">\n                    '.concat(e," i {color: ").concat(t.properties.color,";font-size: ").concat(n,"px;}\n                    ").concat(e," polygon,").concat(e," path {fill: ").concat(t.properties.color,";}\n                    ").concat(e," svg {width: ").concat(n,"px;}\n                </style>")})),Ge().extendFunction("allfield",(function(){return"[]"})),Ge().extendFunction("fieldsGroup",(function(e,t){return e[t]})),Ge().extendFunction("getQuixElementPath",(function(){return at()+"/app/visual-builder"})),Ge().extendFunction("raw",(function(e,t){var n=t||"";return'<img src="'.concat(at()+e,'" alt="').concat(n,'" />')})),Ge().extendFunction("mediaFile",(function(e,t){var n=t||"";return'<img src="'.concat(at()+e,'" alt="').concat(n,'" qx-svg=""/>')})),Ge().extendFunction("getFileContent",(function(e,t,n){var r=st(),o=btoa(t),i="".concat(tt(),"/index.php?option=com_quix&task=api.getFileContent&source=").concat(e,"&path=").concat(o,"&ext=").concat(n,"&").concat(r,"=1");return localStorage.getItem(i)||new Promise((function(e,t){jt().get(i).then((function(t){(t=t.data).success?(localStorage.setItem(i,t.data),e(t.data)):(localStorage.setItem(i,t.messages),e(e.messages))})).catch((function(e){t(e)}))}))})),window.lessThan=function(e,t){return e<t},Ge().extendFunction("lessThan",window.lessThan),window.greaterThan=function(e,t){return e>t},Ge().extendFunction("greaterThan",window.greaterThan),window.greaterThanSign=function(){return">"},Ge().extendFunction("greaterThanSign",window.greaterThanSign),Ge().extendFunction("field",(function(e){var t=this.context,n=t.advanced;return hr(e,{general:t.general,styles:t.styles,advanced:n})})),n.g.twig=Ge().twig;const dr=Ge().twig;function hr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(null===t)return!1;if(void 0!==t[e])return console.log("Found it","key: ".concat(e,", value: ").concat(t[e])),console.log([].concat(ur(n),[e]).join(".")),t[e];if("object"!==fr(t))return!1;for(var r=Object.keys(t),o=0,i=r;o<i.length;o++){var a=i[o],l=hr(e,t[a],[].concat(ur(n),[a]));if(l)return l}}function yr(e){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(e)}function mr(e,t){if(e){if("string"==typeof e)return br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?br(e,t):void 0}}function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vr={loadedElement:[]};function gr(e){return vr.Template.html[e]||null}function xr(e){var t=e.ctrlKey||e.metaKey,n=e.shiftKey,r=(e.altKey,String.fromCharCode(e.which).toLowerCase());function o(){jQuery("#page-save-btn").trigger("click")}function i(){jQuery("#page-preview").trigger("click")}t&&"s"===r?(o(),e.preventDefault()):t&&n&&"p"===r?(o(),i(),e.preventDefault()):t&&"p"===r?(i(),e.preventDefault()):t&&n&&"r"===r?(window.location.reload(!0),e.preventDefault()):t&&"r"===r&&(window.location.reload(!1),e.preventDefault())}vr.prepare=function(){return new Promise((function(e){if(vr._prepareCalled)e();else{var t=[];vr._prepareCalled=!0;var n=At().map((function(e){return e.slug}));vr.Template={html:{},styles:{},scripts:{},shared:{}};var r,o=function(e,t,n){return new Promise((function(r){e&&(vr.Template[t][n]=dr({id:"".concat(t,".").concat(n),allowInlineIncludes:!0,data:e})),r(!0)}))},i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=mr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(n);try{var a=function(){var e,n=r.value;t.push(new Promise((function(e){var t;Promise.all([(t=n,Rt("".concat(t,"-macro"))),Mt(n)]).then((function(t){var r,i,a=(i=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(r,i)||mr(r,i)||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.")}()),l=a[0],s=a[1];l&&(s=l+s),o(s,"html",n).then(e)}))}))),t.push((e=n,Rt("".concat(e,"-style"))).then((function(e){return o(e,"styles",n)}))),t.push(function(e){return Rt("".concat(e,"-script"))}(n).then((function(e){return o(e,"scripts",n)})))};for(i.s();!(r=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}t.push(Rt("animation.twig").then((function(e){dr({id:"animation.twig",data:e})}))),t.push(Rt("global.twig").then((function(e){dr({id:"global.twig",data:e})}))),Promise.all(t).then(e)}}))},vr._replaceAll=function(e,t,n){return e.replace(new RegExp(t,"g"),n)},vr.html=function(e,t,n){if(t=t||{},window.QUIX.Template.html[e])return window.QUIX.Template.html[e].renderAsync(Object.assign(t,{$,_,Assets:vr,QUIXNXT_JMEDIA_PATH_URL})).then((function(e){if(e=vr._replaceAll(e,"&lt;","<"),e=vr._replaceAll(e,"&gt;",">"),!n)return e;Fr(n,e)}))},vr.style=function(e,t,n){var r,o;if(t=t||{},window.QUIX.Template.styles[e]){var i=(r=window.QUIX.Template.styles[e]).render.apply(r,(o=t,function(e){if(Array.isArray(e))return br(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||mr(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{$,_,Assets:vr,QUIXNXT_JMEDIA_PATH_URL}])),a=document.createElement("script");a.innerHTML=i,a.id=n?n.replace("#",""):e.replace("#",""),document.querySelector("script#"+n.replace("#",""))&&document.querySelector("script#"+n.replace("#","")).remove(),document.body.appendChild(a),vr.load(e,n)}},vr.script=function(e,t,n){if(t=t||{},window.QUIX.Template.scripts[e]){var r,o=window.QUIX.Template.scripts[e].render(Object.assign(t,{$,_,Assets:vr,QUIXNXT_JMEDIA_PATH_URL})),i=document.createElement("script");i.innerHTML=o,n?(r=n.replace("#",""),r+="-script"):(r=e.replace("#",""),r+="-script"),i.id=r,document.querySelector("script#"+r)&&document.querySelector("script#"+r).remove(),document.body.appendChild(i),vr.loadedElement.push(e)}},vr.render=function(e,t,n){if(Ar(e.replace(/^#/,"").split("-").shift()),t=Object.assign(t,{$,_,Assets:vr,QUIXNXT_JMEDIA_PATH_URL}),-1===e.indexOf("#"))return dr({allowInlineIncludes:!0,data:e}).render(t);var r=vr.html(e,t);if(null!==r&&"object"===yr(r))r.then((function(r){if(!n)return r;Fr(n,r),vr.script(e,t)}));else{var o=Math.random().toFixed(4),i="<div id='"+e+"-"+o+"'><div>"+r+"</div></div>";if(!n)return i;Fr(n,i),vr.script(e,t)}};var jr,wr,Or={document:null,window:null,mount_node:null,onLoad:[],loaded:!1};function _r(){return new Promise((function(e){if(Or.document)return e(Or.document);Or.onLoad.push((function(){e(Or.document)}))}))}function Sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(n),!0).forEach((function(t){qr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cr(e,t){if(e){if("string"==typeof e)return kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kr(e,t):void 0}}function kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}window.addEventListener("message",(function(e){var t=e.data.event;if(!Or.loaded&&"iframe-loaded"===t){var n,r=document.getElementById("quix-iframe-wrapper");try{n=r.contentDocument}catch(e){n=r.contentDocument}Or.document=n,Or.window=r.contentWindow,Or.mount_node=n.querySelector("#qx-fb-mount"),Or.mount_node.style.userSelect="none",Or.mount_node.style.msUserSelect="none",Or.mount_node.style.mozUserSelect="none",Or.mount_node.style.oUserSelect="none",Or.mount_node.style.webKitUserSelect="none",Or.mount_node.setAttribute("unselectable","on"),Or.mount_node.setAttribute("onselect","return false;"),Or.onLoad.forEach((function(e){return e()}))}}));var Nr=null===(jr=window.document.getElementById("jform_token"))||void 0===jr?void 0:jr.getAttribute("name"),Er=null===(wr=window.document.getElementById("jform_template_type"))||void 0===wr?void 0:wr.value,Rr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.document,t=e.createElement("div");return t.width=1,t.height=1,t.style.opacity="0",e.body.appendChild(t),t}();function Tr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.document;return t.getElementsByClassName(e)}function Dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.document;return t.getElementById(e)}function Ar(e){var t;console.log("maybeInjectAssets");var n=null===(t=window.QUIX)||void 0===t?void 0:t.elementsAssets;n?Ir(e,n):Promise.all([Rt("js"),Rt("css")]).then((function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||Cr(n,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.")}()),i=o[0],a=o[1];window.QUIX.elementAssets={js:i,css:a},Ir(e,window.QUIX.elementAssets)}))}function Ir(e,t){var n,r,o=t.js.find((function(t){return t.includes(e)}));o&&(n=e,r=o,_r().then((function(e){if(!e.head.querySelector("#".concat(n,"-element-script"))){var t=e.createElement("script");t.src=r,t.id=n+"-element-script",e.head.append(t)}})));var i=t.css.find((function(t){return t.includes(e)}));i&&function(e,t){_r().then((function(n){var r=n.createElement("link");r.rel="stylesheet",r.href=t,r.id=e+"-element-style",n.head.append(r)}))}(e,i)}function Mr(e){_r().then((function(t){var n=t.head.querySelector("#".concat(e));n&&n.remove()}))}var Lr={items:[],timer:null},Br=0;function Fr(e,t){if(e)return clearTimeout(Lr.timer),Lr.items.push({targetID:e,content:t}),Lr.timer=setTimeout(Fr,20),void Br++;var n;if(1===Lr.items.length){var r=Lr.items[0];(n=jQuery(r.targetID)).html(r.content)}else{n=jQuery("#qx-fb-mount").detach();var o,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(Lr.items);try{for(i.s();!(o=i.n()).done;){var a=o.value,l=n.find(a.targetID);l?l.html(a.content):n.append(a.content)}}catch(e){i.e(e)}finally{i.f()}jQuery(".app-mount").html(n)}console.log("backoff",Br),Br=0,Lr.timer=null,Lr.items=[]}function Ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new Promise((function(n,r){var o=gr(e.slug);if(!o)return r();Qr(e,{path:t.join(".")}).then((function(t){o.renderAsync(t).then((function(t){_r().then((function(r){Dr("".concat(e.id,"-preview"),r).innerHTML=t.replaceAll(/&gt;/g,">").replaceAll(/&lt;/g,"<"),n()}))})).catch((function(e){console.error("Could not render html",e),r()}))}))}))}function zr(e){return new Promise((function(t,n){var r,o=(r=e.slug,vr.Template.styles[r]||null);if(!o)return n();var i=qxCss();Qr(e,{style:i}).then((function(e){o.renderAsync(e).then((function(e){e=e.replace(/\n+/g,"\n").trim(),console.log("Style output",e),t()})).catch((function(e){console.error("Could not render style",e),n()}))}))}))}function Hr(e){return new Promise((function(t,n){var r,o=(r=e.slug,vr.Template.scripts[r]||null);if(!o)return n(e.slug+" renderScript failed!");Qr(e).then((function(r){o.renderAsync(r).then((function(n){Wr(n,"".concat(e.id,"-script-preview")),t()})).catch((function(e){console.error("Could not render script",e),n()}))}))}))}function Qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){Lt(e.slug).then((function(r){n(Pr(Pr(Pr({},ar(e.form)),t),{},{mode:"builder",elementUrl:r.url}))})).catch(r)}))}function Wr(e,t){Mr(t),_r().then((function(n){var r=n.createElement("script");r.innerHTML=Gr(e),r.id=t,n.head.appendChild(r)}))}function Gr(e){var t=document.createElement("textarea");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}function Jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_r().then((function(r){var o=Dr(e,r);t?(t=n?t-1:t,o.setAttribute("style","flex: 0 0 ".concat(t,"px;max-width: ").concat(t,"px;"))):setTimeout((function(){o.removeAttribute("style")}),200)}))}function Vr(e,t){return"%"===e.unit?{unit:"px",desktop:t*e.desktop/100,tablet:t*e.tablet/100,phone:t*e.phone/100}:{unit:"%",desktop:+(100*e.desktop/t).toFixed(5),tablet:+(100*e.tablet/t).toFixed(5),phone:+(100*e.phone/t).toFixed(5)}}n(90610);var $r=n(74464),Zr=(n(17184),n(10364));function Xr(e){var t=Sn.find((function(t){return t.slug===e.slug}));if(!t)throw new Error("Could not find schema for ".concat(e.slug));return t}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Kr={lastAction:{},states:[]};function eo(){return Kr.states.slice().reverse()}var to,no=[ue,C,B,V,Z,X,M,Y,U,D,R,T,A,z,q,re,W],ro=function(e){var t=e.getState;return function(e){return function(n){var r,o,i,a,l,s,c=e(n);if(no.includes(n.type)){var u,p,f,d,h=t(),y=h.nodes,m=y.nodes,b=y.clipboard,v=h.form.node,g=!1;switch(n.type){case ue:u="Clear Page Content",f="Deleted",d="qxuicon-trash";break;case A:u="".concat(n.payload.element.name),f="Added",d="qxuicon-plus-square";break;case T:u="Column",f="Added ",d="qxuicon-plus-square";break;case R:u="Row",f="Added",d="qxuicon-plus-square";break;case D:u="Section",f="Added",d="qxuicon-plus-square";break;case re:u="Template",f="Imported";break;case U:u="".concat(St(n.payload.name)),f="Deleted",d="qxuicon-trash";break;case Y:u="Column",f="Duplicated",d="qxuicon-clone";break;case W:u="".concat(St(n.payload.name)),f="Visibility Changed",d="qxuicon-eye";break;case M:u="".concat(St(n.payload.name)),f="Duplicated",d="qxuicon-clone";break;case B:u="".concat(St(null===(r=b.node)||void 0===r?void 0:r.slug)),f="Pasted",d="qxuicon-clone";break;case V:u="".concat(St(null===(o=b.node)||void 0===o?void 0:o.slug)),f="Pasted Style",d="qxuicon-crosshairs";break;case X:u="".concat(St(n.payload.name)),f="Reset Style",d="qxuicon-undo";break;case z:u="Element",f="Moved",d="qxuicon-expand-arrows";break;case q:u="History",f="State Updated",d="qxuicon-history",g=Kr.states[Kr.states.length-1].act===f;break;case C:l=n,g=(a=Kr.lastAction).type===l.type&&a.payload.nodePath.join()===l.payload.nodePath.join()&&a.payload.valuePath.join()===l.payload.valuePath.join(),Kr.lastAction=ar(n);var x=St((s=n.payload.valuePath,function(e){if(Array.isArray(e))return Yr(e)}(s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,t):void 0}}(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).pop());u="".concat(St(null!==(i=null==v?void 0:v.slug)&&void 0!==i?i:"Element")),p="".concat(x),f="Updated",d="qxuicon-edit"}var j={state:ar(m),element:u,field:p,act:f,icon:d,id:lr("history")};g?Kr.states[Kr.states.length-1]=j:Kr.states.push(j),Kr.states.length>50&&Kr.states.shift(),console.log("Updated for",n,"Previous state",j,"All history",eo())}return n.type===ge&&(Kr.lastAction={}),0===Kr.states.length&&Kr.states.push({state:ar(t().nodes.nodes),element:"Editing Started",icon:"qxuicon-history",id:lr("history")}),c}}};function oo(e){return oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oo(e)}function io(e){return function(e){if(Array.isArray(e))return ao(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ao(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ao(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function so(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function co(e,t){return co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},co(e,t)}function uo(e,t){if(t&&("object"===oo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return po(e)}function po(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fo(e){return fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fo(e)}function ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yo=Zr.Z.Step,mo="OPEN_HISTORY_PANEL",bo=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?mo:null}}},vo={openHistoryPanel:bo,setNodes:Ce},go=(0,v.$j)((function(e){return{visible:e.action.action===mo}}),vo)(to=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&co(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fo(r);if(o){var n=fo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return uo(this,e)});function a(){var e;lo(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ho(po(e=i.call.apply(i,[this].concat(n))),"state",{histories:[],activeHistory:null}),ho(po(e),"setStateTo",(function(t){e.props.setNodes(t.state),e.setActiveHistory(t)})),ho(po(e),"setActiveHistory",(function(t){e.setState({activeHistory:t.id})})),ho(po(e),"setHistories",(function(){var t,n=eo(),r=null===(t=io(n).shift())||void 0===t?void 0:t.id;e.setState({histories:n,activeHistory:r})})),ho(po(e),"getHistoriesView",(function(){var t=e.state,n=t.histories;return t.activeHistory,(0,y.jsx)(y.Fragment,{children:n.map((function(t){return(0,y.jsx)(yo,{title:t.element,description:t.field?t.field+" "+t.act:t.act,icon:(0,y.jsx)("span",{className:t.icon}),onClick:function(n){e.setStateTo(t)}},t.id)}))})})),ho(po(e),"onClose",(function(){e.props.openHistoryPanel(!1)})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.setHistories()}},{key:"componentDidUpdate",value:function(e){this.props.visible&&!e.visible&&this.setHistories()}},{key:"render",value:function(){return console.log("Current active history",this.state.activeHistory),(0,y.jsx)($r.Z,{title:"History",width:320,onClose:this.onClose,visible:this.props.visible,className:"qx-history-panel",children:(0,y.jsx)(Zr.Z,{current:this.state.activeHistory,direction:"vertical",children:this.getHistoriesView()})})}}])&&so(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||to;n(637);var xo=n(75985);function jo(e,t){var n=e.name.split(".").pop(),r=-1!==t.indexOf(n);return new Promise((function(t,n){if(r){var o=new FileReader;o.onload=function(e){t(o.result)},o.readAsText(e)}else n("invalid file type!!")}))}n(7554);var wo=n(43152),Oo=n(38201),_o=n.n(Oo);function So(e){return So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},So(e)}function Po(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Co(e,t){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Co(e,t)}function ko(e,t){if(t&&("object"===So(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return No(e)}function No(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Eo(e)}function Ro(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var To=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Co(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Eo(r);if(o){var n=Eo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ko(this,e)});function a(){var e;Po(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ro(No(e=i.call.apply(i,[this].concat(n))),"shouldComponentUpdate",_o()),Ro(No(e),"state",{id:Math.random()}),Ro(No(e),"elRef",b.createRef()),Ro(No(e),"registerDragHandler",(function(){!e.dragHandlerRegistered&&e.elRef.current&&(e.modalHeader=e.elRef.current.closest(".qxui-modal-header"),e.modalHeader.removeEventListener("mousedown",e.startDrag),e.modalHeader.addEventListener("mousedown",e.startDrag),e.dragHandlerRegistered=!0)})),Ro(No(e),"startDrag",(function(t){e.modal=t.target.closest(".qxui-modal"),e.qxIframeWrapper=document.querySelector(".qx-fb-frame"),e.lastPosition={x:t.screenX,y:t.screenY},_r().then((function(t){t.addEventListener("mousemove",e.onDrag),t.addEventListener("mouseup",e.stopDrag)})),t.target.ownerDocument.addEventListener("mousemove",e.onDrag),t.target.ownerDocument.addEventListener("mouseup",e.stopDrag)})),Ro(No(e),"onDrag",(function(t){var n=No(e),r=n.modal,o=n.qxIframeWrapper,i=n.lastPosition,a=r.offsetLeft-(i.x-t.screenX),l=r.offsetTop-(i.y-t.screenY);a>=-250&&a<=o.clientWidth-250?r.style.left="".concat(a,"px"):e.stopDrag(t),l>=0&&l<=o.clientHeight-100?r.style.top="".concat(l,"px"):e.stopDrag(t),e.lastPosition={x:t.screenX,y:t.screenY}})),Ro(No(e),"stopDrag",(function(t){var n,r;_r().then((function(t){t.removeEventListener("mousemove",e.onDrag),t.removeEventListener("mouseup",e.stopDrag)})),null===(n=t.target.ownerDocument)||void 0===n||n.removeEventListener("mousemove",e.onDrag),null===(r=t.target.ownerDocument)||void 0===r||r.removeEventListener("mouseup",e.stopDrag),delete e.qxIframeWrapper,delete e.modal,delete e.lastPosition})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.registerDragHandler()}},{key:"componentDidUpdate",value:function(e,t,n){this.registerDragHandler()}},{key:"componentWillUnmount",value:function(){this.modalHeader&&this.modalHeader.removeEventListener("mousedown",this.startDrag)}},{key:"render",value:function(){var e,t=this.props,n=t.container,r=t.title,o=t.bodyStyle,i=t.children,a=t.className,l=t.classes,s=t.destroyOnClose,u=t.show,f=t.style,d=t.footer,h=t.close,m=t.onClose,b=t.width,v=t.closable,g=t.onCancel,x=(0,y.jsx)(p.default,{size:"large",icon:(0,y.jsx)("i",{className:"qxio-close"}),onClick:function(e){return h&&h(e)||m&&m(e)},children:"Close"},"close");d?d.push(x):d=x,l=Ve()(a,l);var j=this.props,w=j.expandable,O=j.overrideHeader,_=(0,y.jsxs)("div",{className:"qx-flex qx-flex-between",ref:this.elRef,children:[!0===O?r:(0,y.jsx)("span",{children:r}),!1!==w?(0,y.jsxs)(c.default,{title:"Toggle window size",children:[(0,y.jsx)(p.default,{type:"link",size:"small",onClick:function(){return window.adjustModalSize()},children:(0,y.jsx)("i",{className:"qxuicon-expand qx-light"})},"resize"),(0,y.jsx)(p.default,{id:"mdl-close",type:"link",size:"small",onClick:function(e){return h&&h(e)||m&&m(e)},children:(0,y.jsx)("i",{className:"qxio-close qx-light"})},"close")]},"resize"):null]});return(0,y.jsx)(wo.Z,{width:b||450,visible:!!u,wrapClassName:l,title:_,style:f,footer:d||null,onCancel:!0===v?g:function(){return jQuery("body").addClass("qx-settings-fixed-left")},closable:!0===v,destroyOnClose:s||!1,getContainer:n||function(){return window.document.body},zIndex:5,mask:null!==(e=this.props.mask)&&void 0!==e&&e,maskClosable:!1,bodyStyle:o||null,children:u?i:null})}}])&&qo(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Ro(To,"propTypes",{}),Ro(To,"defaultProps",{style:{},className:"",show:!1,bottom:!1,dismissible:!0});const Do=To;var Ao;function Io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Io(Object(n),!0).forEach((function(t){Wo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Io(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lo(e){return Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lo(e)}function Bo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uo(e,t){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uo(e,t)}function zo(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ho(e)}function Ho(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qo(e){return Qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qo(e)}function Wo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Go=xo.Z.Dragger,Jo="OPEN_NODE_IMPORTER",Vo=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?Jo:null}}},$o={openNodeImporter:Vo},Zo=(0,v.$j)((function(e){return{visible:e.action.action===Jo}}),$o)(Ao=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uo(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qo(r);if(o){var n=Qo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return zo(this,e)});function a(){var e;Bo(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wo(Ho(e=i.call.apply(i,[this].concat(n))),"state",{process:!1}),Wo(Ho(e),"onClose",(function(){e.props.openNodeImporter(!1)})),Wo(Ho(e),"onFileUploadDone",(function(t){jo(t,["json"]).then((function(t){var n=JSON.parse(t),r={type:n.type,data:n.data},o=st(),i=new FormData;i.set("jform[data]",JSON.stringify(r)),i.set("jform[title]",n.title),i.set("jform[builder]","frontend"),i.set("jform[type]",n.type),i.set("jform[state]","1"),i.set("jform[id]","0"),i.set("id","0"),i.set("type","collection"),i.set(o,"1"),jt()({method:"post",url:"".concat(tt(),"/index.php?option=com_quix&task=collection.save"),data:i,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(t){var n=t.data;"object"==Lo(n)?(n.success?m.success('Uploaded successfully to your collection! Visit "My Templates" to import.'):m.warning(n.message),e.onClose()):m.error(n)})).catch((function(){return e.setState({process:!1})}))}))})),e}return t=a,(n=[{key:"render",value:function(){var e={data:this.onFileUploadDone};return(0,y.jsx)(Do,{width:550,classes:"quix-library-importer",show:this.props.visible,close:this.onClose,title:"Import To Library",footer:!1,expandable:!1,style:{left:"calc(50vw - 225px)"},onCancel:this.onClose,closeModal:this.onClose,children:(0,y.jsxs)(Go,Mo(Mo({},e),{},{children:[(0,y.jsx)("p",{children:(0,y.jsx)("i",{className:"qxuicon-box-full qx-text-primary qx-text-large"})}),(0,y.jsx)("h5",{className:"qx-margin-small-top qx-margin-small-bottom",children:"Import Template To Library"}),(0,y.jsxs)("p",{children:["Click or drag ",(0,y.jsx)("em",{children:".json"})," file to this area to upload"]})]}))})}}])&&Fo(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Ao,Xo=(n(26713),n(59348)),Yo=quix.api;function Ko(e,t){return new Promise((function(n,r){var o=e?"".concat(Yo,"&id=").concat(e):Yo;jQuery.ajax({data:t,url:o,type:"POST",success:function(e){try{return(e=JSON.parse(e)).success?n(e):r(e)}catch(t){return r(e)}},error:function(e,t,n){return r(n)}})}))}var ei=function(e){return e.preventDefault(),e.returnValue="Are you sure you want to exit?"},ti=null;function ni(e){return Dr("jform_data").value=JSON.stringify(e),Dr("jform_metadata_icons").value=JSON.stringify(sr(e,"svg")),jQuery("#adminForm").serializeArray()}function ri(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e||null!==ti){var t=parseInt(document.getElementById("jform_id").value);if(0===t)return m.warning("Please save the page first! then see the preview."),!1;null===ti||null===ti.parent?ti=window.open(atob(document.getElementById("return_url").value)):ti&&(ti.location.href=atob(document.getElementById("return_url").value))}}function oi(){window.PageChanged=!1,removeEventListener("beforeunload",ei,{capture:!0})}function ii(){window.PageChanged=!0,addEventListener("beforeunload",ei,{capture:!0})}function ai(e){return ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(e)}var li,si=ut(),ci=jQuery;function ui(e){return new Promise((function(t,n){var r,o=e.state.title||ct();o||(o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"New Page",t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=new Date;return"".concat(e,"-").concat(n.getDate(),"-").concat(t[n.getMonth()]," ").concat(n.getHours(),":").concat(n.getSeconds())}()),Dr("jform_title_hidden").value=o;var i,a=null===(r=Dr("jform_template_type"))||void 0===r?void 0:r.value;if(!_t(a)&&["article","header","footer","mainbody"].includes(a)&&_t(null===(i=Dr("jform_conditions"))||void 0===i?void 0:i.value))return e.props.invokeDisplayConditionModal(!0),t();var l="page"===si?"page.apply":"collection.apply";if(ci('input[name="task"]').val(l),"page"===si){var s=e.props,c=s.nodes,u=s.qid;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=ni(e=ar(e));return Ko(t,n)}(c,u).then((function(t){if(!1===t.data){var n;m.error((null==t||null===(n=t.messages)||void 0===n?void 0:n.warning)||t)}else{var r=+t.data.id;m.success("Settings saved successfully"),0==+u&&(function(e,t,n,r){document.getElementById("jform_id").value=e,document.getElementById("return_url").value=t,history&&history.pushState?window.history.pushState(null,null,n):window.location.href=n}(r,t.data.view,t.data.url,t.data.edit),e.props.updateQid(r)),setTimeout((function(){console.log("Reloading..."),ri(!1)}),1e3),oi()}})).then((function(){ci(".savePage span.save-text").html("Save"),t()})).catch((function(e){ci(".savePage").removeClass("qxui-btn-success").addClass("qxui-btn-danger"),ci(".savePage span.save-text").html("!Save"),m.error((null==e?void 0:e.message)||"Something went wrong!!!"),n()}))}return"collection"===si?pi(e,o,ci("#jform_template_type").val(),!0,t):void 0}))}function pi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=e.props,a=i.nodes,l=i.qid,s=n?l:0,c={type:n=n||"layout",data:a};r&&(Dr("jform_data").value=JSON.stringify(c));var u=Dr("jform_token").getAttribute("name"),p=new FormData;p.set("jform[data]",JSON.stringify(c)),p.set("jform[title]",t),p.set("jform[builder]","frontend"),p.set("jform[type]",n),p.set("jform[state]","1"),p.set("jform[id]",s),p.set("id",s),p.set("type","collection"),r&&(p.set("jform[conditions]",Dr("jform_conditions").value),p.set("jform[params][image_optimized]",Dr("jform_params_image_optimized").value),p.set("jform[params][enabled_image_optimization]",Dr("jform_params_enabled_image_optimization").value),p.set("jform[params][enabled_webp_support]",Dr("jform_params_enabled_webp_support").value),p.set("jform[params][codecss]",Dr("jform_params_codecss").value),p.set("jform[params][codejs]",Dr("jform_params_codejs").value),p.set("jform[params][style]",Dr("jform_params_style").value),p.set("jform[metadata][title]",Dr("jform_metadata_title").value),p.set("jform[metadata][desc]",Dr("jform_metadata_desc").value),p.set("jform[metadata][seo_score]",Dr("jform_metadata_seo_score").value),p.set("jform[metadata][focus_keywords]",Dr("jform_metadata_focus_keywords").value),p.set("jform[state]",Dr("jform_state").value),p.set("jform[access]",Dr("jform_access").value),p.set("jform[language]",Dr("jform_language").value)),p.set(u,"1"),jt()({method:"post",url:"".concat(tt(),"/index.php?option=com_quix&task=collection.save"),data:p,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(e){ci(".savePage span.save-text").html("Save");var t=e.data;"object"===ai(t)?t.success?(oi(),m.success("Template saved"),setTimeout((function(){console.log("Reloading..."),ri(!1)}),1e3)):m.warning(t.message):m.error(t),o&&o()}))}function fi(e){return fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fi(e)}function di(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yi(e,t){return yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yi(e,t)}function mi(e,t){if(t&&("object"===fi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bi(e)}function bi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vi(e){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vi(e)}function gi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xi=Xo.default.Group,ji="OPEN_TEMPLATE_SAVER",wi=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?ji:null}}},Oi={openTemplateSaver:wi},_i=(0,v.$j)((function(e){var t=e.action.action,n=e.nodes.nodes;return{visible:t===ji,nodes:n}}),Oi)(li=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yi(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vi(r);if(o){var n=vi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return mi(this,e)});function a(){var e;di(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gi(bi(e=i.call.apply(i,[this].concat(n))),"state",{title:"",waiting:!1}),gi(bi(e),"titleChanged",(function(t){e.setState({title:t.target.value})})),gi(bi(e),"saveTemplate",(function(){e.state.title?(pi(bi(e),e.state.title),e.onClose()):m.error("Title can't be empty")})),gi(bi(e),"onClose",(function(){e.props.openTemplateSaver(!1)})),e}return t=a,(n=[{key:"render",value:function(){var e=this;return(0,y.jsx)(Do,{width:550,className:"modal--export-import",title:"Save To Library",show:this.props.visible,close:function(){return e.onClose()},expandable:!1,style:{left:"calc(50vw - 225px)"},footer:!1,children:(0,y.jsxs)("div",{className:"qx-fb-infobox sections-save-box",children:[(0,y.jsxs)("div",{className:"qx-margin-medium-bottom qx-text-center",children:[(0,y.jsx)("i",{className:"qxuicon-cubes qx-fb-title-icon"}),(0,y.jsx)("h2",{className:"qx-margin-small-top",children:"Save To Library"}),(0,y.jsx)("p",{className:"qx-text-meta",children:"You can reuse this template anywhere you want"})]}),(0,y.jsxs)(xi,{className:"qx-width-2-3 qx-margin-auto",children:[(0,y.jsx)(Xo.default,{placeholder:"Name",id:"export",value:this.state.title,onChange:this.titleChanged}),(0,y.jsxs)(p.default,{disabled:this.state.waiting,type:"primary",onClick:this.saveTemplate,children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-save"})," Save"]})]})]})})}}])&&hi(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||li;const Si=_i;n(70057);var Pi,qi=n(75235),Ci=(n(64832),n(36609));function ki(e){return ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(e)}function Ni(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ri(e,t){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ri(e,t)}function Ti(e,t){if(t&&("object"===ki(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Di(e)}function Di(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ai(e){return Ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ai(e)}function Ii(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mi="OPEN_PAGE_MANAGER",Li=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?Mi:null}}},Bi={openPageManager:Li,updateQid:Qe},Fi=(0,v.$j)((function(e){var t=e.action,n=e.nodes.nodes,r=e.meta.qid;return{visible:t.action===Mi,nodes:n,qid:r}}),Bi)(Pi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ri(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ai(r);if(o){var n=Ai(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ti(this,e)});function a(){var e;Ni(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ii(Di(e=i.call.apply(i,[this].concat(n))),"nodes",""),Ii(Di(e),"timer",void 0),Ii(Di(e),"offset",1e4),Ii(Di(e),"state",{title:ct(),type:ut()}),Ii(Di(e),"getQuixPages",(function(){var e=ot();return(0,y.jsx)(Ci.default,{children:e.length?e.map((function(e){var t=tt()+"/index.php?option=com_quix&task=page.edit&id="+e.id;return(0,y.jsx)(Ci.default.Item,{children:(0,y.jsx)(Ci.default.Item.Meta,{className:"qx-flex-row-reverse",avatar:(0,y.jsx)("i",{className:[Ye[e.state],Xe[e.state]].join(" ")}),title:(0,y.jsxs)("a",{href:t,className:"qxui-text-ellipsis",target:"_blank",children:[e.title," "]})})},e.id)})):(0,y.jsx)("div",{className:"qx-alert qx-alert-primary",children:"No page found!"})})})),Ii(Di(e),"getQuixCollectionList",(function(){var e=rt();return(0,y.jsx)(Ci.default,{children:e.length?e.map((function(e){var t=tt()+"/index.php?option=com_quix&task=collection.edit&id="+e.id;return(0,y.jsx)(Ci.default.Item,{children:(0,y.jsx)(Ci.default.Item.Meta,{className:"qx-flex-row-reverse",avatar:(0,y.jsx)("i",{className:"qx-label",children:e.type}),title:(0,y.jsx)("a",{href:t,target:"_blank",children:e.title})})},e.id)})):(0,y.jsx)("div",{className:"qx-alert qx-alert-primary",children:"No template found!"})})})),Ii(Di(e),"saveDraft",(function(){console.warn("Save this page as draft now")})),Ii(Di(e),"savePageAjax",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null==t||t.preventDefault(),e.props.onSaveStateChange&&e.props.onSaveStateChange(!0),ui(Di(e)).then((function(){e.props.onSaveStateChange&&e.props.onSaveStateChange(!1)}))})),Ii(Di(e),"addPage",(function(e){e.preventDefault(),qxUIkit.modal.prompt("Page Name:","New Page").then((function(e){if(e.length){var t={title:e};t[Joomla.getOptions("csrf.token")]=1,jQuery.ajax({url:tt()+"/index.php?option=com_quix&task=page.pageCreateAjax",type:"POST",data:t,success:function(e){var t=JSON.parse(e);t.success||alert(t.message),window.location=t.data}})}else alert("Page name is required!")}))})),Ii(Di(e),"addCollection",(function(e){e.preventDefault(),confirm("Save this page before creating new page. Ready to proceed?")&&(window.location=tt()+"/index.php?option=com_quix&task=collection.add")})),Ii(Di(e),"onTitleChange",(function(t){e.setState({title:t.target.value})})),Ii(Di(e),"onClose",(function(){e.props.openPageManager(!1)})),e}return t=a,n=[{key:"componentDidMount",value:function(){this.nodes=JSON.stringify(this.props.nodes)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"componentDidUpdate",value:function(e,t,n){var r=this,o=JSON.stringify(this.props.nodes);this.nodes!==o&&(clearTimeout(this.timer),this.nodes=o,this.timer=setTimeout((function(){return r.saveDraft()}),this.offset))}},{key:"render",value:function(){var e=this.getQuixPages(),t=this.getQuixCollectionList(),n=this.state,r=n.title,o=n.type;return(0,y.jsxs)($r.Z,{title:"Manage Pages",placement:"left",width:320,onClose:this.onClose,visible:this.props.visible,className:"manage-pages",children:[(0,y.jsx)("div",{className:"qx-margin-bottom",children:(0,y.jsxs)(Xo.default.Group,{children:[(0,y.jsx)(Xo.default,{name:"jform[title]",placeholder:"Page name",defaultValue:r||"New page",id:"jform_title",onChange:this.onTitleChange}),(0,y.jsx)(p.default,{type:"success",onClick:this.savePageAjax,disabled:this.props.isSaving,loading:this.props.isSaving,children:(0,y.jsx)("i",{className:"qxuicon-check"})})]})}),(0,y.jsxs)(qi.default,{defaultActiveKey:"collection"===o?"2":"1",children:[(0,y.jsxs)(qi.default.TabPane,{tab:"Pages",children:[(0,y.jsx)(p.default,{className:"qx-margin-small-bottom",block:!0,type:"primary",onClick:this.addPage,children:"Create Page"}),(0,y.jsx)("span",{className:"qx-text-truncate",children:e})]},"1"),(0,y.jsx)(qi.default.TabPane,{tab:"Templates",children:t},"2")]})]})}}],n&&Ei(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Pi;function Ui(e){return Ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ui(e)}function zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qi(e,t){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qi(e,t)}function Wi(e,t){if(t&&("object"===Ui(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Gi(e){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gi(e)}var Ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qi(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Gi(r);if(o){var n=Gi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Wi(this,e)});function a(){return zi(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){return(0,y.jsx)("div",{children:this.props.pro?null:(0,y.jsxs)("div",{className:"qx-fb-field-code qx-fb-gopro",children:[(0,y.jsxs)("div",{className:"qx-fb-gopro__icon",children:[(0,y.jsx)("i",{className:"qxuicon-unlock"}),(0,y.jsx)("sup",{className:"qxui-label qxui-label-success",children:"License"})]}),(0,y.jsxs)("p",{children:["This features requires you to activate your license. Please insert your username and API key ",(0,y.jsx)("a",{target:"_blank",href:"administrator/index.php?option=com_quix&action=license",children:"here"})," to activate it."]})]})})}}])&&Hi(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),Vi=(n(60028),n(32397)),$i=n(33962),Zi=n.n($i);function Xi(e){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(e)}function Yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ki(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ea(e,t){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ea(e,t)}function ta(e,t){if(t&&("object"===Xi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return na(e)}function na(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ra(e){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ra(e)}function oa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ia=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ea(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ra(r);if(o){var n=ra(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ta(this,e)});function a(){var e;Yi(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return oa(na(e=i.call.apply(i,[this].concat(n))),"onChange",(function(t){var n=e.props.onChange;n&&n(t.target.value,t)})),oa(na(e),"getLabelMarkup",(function(){var t=e.props.label;return e.props.onlyBaseText||!t?null:(0,y.jsx)("span",{children:t})})),e}return t=a,(n=[{key:"getHelpMarkup",value:function(){var e=this.props.help;return this.props.onlyBaseText?null:e?(0,y.jsx)(Vi.Z,{content:e,placement:"right",popupStyle:{width:"300px"},children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-question-circle"})})}):void 0}},{key:"getResetMarkup",value:function(){return this.props.onlyBaseText||Zi()(this.props.default,this.props.value)?null:(0,y.jsx)(c.default,{title:"Reset to default",children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-undo",onClick:this.props.onReset})})})}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.placeholder,r=e.onClick,o=e.style,i=e.id,a=e.addonBefore,l=e.addonAfter,s=e.readOnly,c=e.allowClear;return i=i||"_"+Math.random().toString(36).substr(2,9),(0,y.jsxs)("div",{className:"qx-fb-field-text",style:o,children:[this.props.onlyBaseText?null:(0,y.jsxs)("div",{className:"qx-fb-field__label qx-flex qx-flex-middle",children:[this.getLabelMarkup(),this.getHelpMarkup(),this.props.onReset?this.getResetMarkup():null]}),(0,y.jsx)(Xo.default,{ref:i,id:i,placeholder:n||"",value:t,onChange:this.onChange,onClick:r||function(){},addonBefore:a,addonAfter:l,disabled:s,allowClear:c||!1})]})}}])&&Ki(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);oa(ia,"propTypes",{}),oa(ia,"defaultProps",{}),ia.Group=Xo.default.Group,ia.Search=Xo.default.Search;const aa=ia;function la(e){return la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},la(e)}var sa;function ca(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ua(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(n),!0).forEach((function(t){ma(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ca(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fa(e,t){return fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fa(e,t)}function da(e,t){if(t&&("object"===la(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ha(e)}function ha(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.e(325).then(n.bind(n,27325));var ba="OPEN_SEO_PANEL",va=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?ba:null}}},ga={openSEOPanel:va,setNodes:Ce},xa=(0,v.$j)((function(e){return{visible:e.action.action===ba}}),ga)(sa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fa(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ya(r);if(o){var n=ya(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return da(this,e)});function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),ma(ha(t=i.call(this,e)),"presentSeoResult",(function(){if(t.setState({visibleSeoModal:!0}),!t.state.is_pro_user)return m.info("Please validate your license to use SEO feature.");_r().then((function(e){var n,r=null===(n=e.querySelector("#qx-fb-mount .frontend-blocks"))||void 0===n?void 0:n.innerHTML,o={title:Dr("jform_metadata_title").value,description:Dr("jform_metadata_desc").value,keyword:t.state.focusKeyword||Dr("jform_metadata_focus_keywords").value,content:r};t.loadAndRenderSEOResult(o)}))})),ma(ha(t),"loadAndRenderSEOResult",(function(e){t.setState({loadingSeoResult:!0}),new Promise((function(e,t){if(window.qxSEO)return e(window.qxSEO);var n=document.createElement("script");n.onload=function(){e(window.qxSEO)},n.onerror=function(){t()},n.src=pkg_quix_public_path+"/builder/seo/seo.js",document.head.appendChild(n)})).then((function(n){t.renderSEOResult(n,e)}))})),ma(ha(t),"renderSEOResult",(function(e,n){var r=ua({},t.state),o={title:n.title||"Quix SEO title of this page.",metaDesc:n.description||"Your Quix SEO meta description will show here.",urlPath:window.QuixPageAlias||"quix-seo-page"},i=function(){return ua({keyword:n.keyword,text:n.content,titleWidth:n.title.length},o)};r.app?(r.app.snippetPreview.data=ua({},i()),r.app.callbacks={getData:i}):(r.i18n=new e.Jed({domain:"js-text-analysis",locale_data:{"js-text-analysis":{"":{}}}}),r.snippetPreview=new e.SnippetPreview({i18n:r.i18n,data:o,baseURL:it(),previewMode:"desktop",targetElement:Dr("snippet")}),r.app=new e.App({snippetPreview:r.snippetPreview,targets:{output:"output"},callbacks:{getData:i}})),r.app.refresh();var a=r.app.seoAssessor.calculateOverallScore(),l=Math.max(0,a);Dr("jform_metadata_seo_score").value=l,t.setSeoScore(l),t.setState(ua(ua({},r),{},{loadingSeoResult:!1}))})),ma(ha(t),"setSeoScore",(function(e){t.props.onChangeSeoScore&&t.props.onChangeSeoScore(e)})),ma(ha(t),"seoToolbar",(function(){return(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Preview"}),(0,y.jsx)("div",{id:"snippet"}),(0,y.jsx)("p",{className:"qx-fb-field__label",children:"SEO Assessment"}),(0,y.jsx)("p",{id:"output"}),(0,y.jsx)("button",{className:"seo-snippet qxui-drawer-close seo-snippet-reload",onClick:t.presentSeoResult,children:(0,y.jsx)("span",{className:"seo-snippet qxui-drawer-close-x seo-snippet-icon",children:(0,y.jsx)(c.default,{title:"Re-Check",getTooltipContainer:function(){return window.document.body},children:(0,y.jsx)("i",{className:"qxuicon-undo"})})})}),(0,y.jsx)("div",{className:t.state.loadingSeoResult?"preloader":"preloader hide",children:(0,y.jsxs)("div",{className:"wrap",children:[(0,y.jsx)("div",{className:"ball"}),(0,y.jsx)("div",{className:"ball"}),(0,y.jsx)("div",{className:"ball"}),(0,y.jsx)("div",{className:"ball"})]})})]})})),ma(ha(t),"seoRankTitle",(function(){return(0,y.jsx)(aa,{label:"SEO Focus Keyword",placeholder:"Write your keyword & Re-Check",value:t.state.focusKeyword,onChange:function(e){return t.setState({focusKeyword:e})},onReset:function(){return t.setState({focusKeyword:""})}})})),ma(ha(t),"onClose",(function(){t.props.openSEOPanel(!1)}));var n,r,o=(null===(n=Dr("jform_metadata_seo_score"))||void 0===n?void 0:n.value)||0;return t.state={is_pro_user:pt(),loadingSeoResult:!1,focusKeyword:(null===(r=Dr("jform_metadata_focus_keywords"))||void 0===r?void 0:r.value)||"",seoScore:o,i18n:"",visibleSeoModal:!1},t.setSeoScore(o),t}return t=a,(n=[{key:"componentDidUpdate",value:function(e,t,n){e.visible!==this.props.visible&&this.props.visible&&this.presentSeoResult()}},{key:"render",value:function(){return(0,y.jsx)($r.Z,{title:this.state.is_pro_user?this.seoRankTitle():null,id:"quix-seo-snippet",placement:"right",closable:!0,width:480,onClose:this.onClose,visible:this.props.visible,maskClosable:!1,prefixCls:"seo-snippet qxui-drawer",style:this.props.visible?{overflow:"auto",height:"100vh",width:"480px",paddingBottom:"55px"}:null,children:this.state.is_pro_user?(0,y.jsx)(y.Fragment,{children:this.seoToolbar()}):(0,y.jsx)(Ji,{pro:this.state.is_pro_user})})}}])&&pa(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||sa;function ja(e){return ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ja(e)}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oa(e,t){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oa(e,t)}function _a(e,t){if(t&&("object"===ja(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sa(e)}var Pa,qa,Ca=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oa(e,t)}(l,e);var t,n,r,o,i,a=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Sa(o);if(i){var n=Sa(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _a(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).state={hasError:!1,message:null},t}return t=l,r=[{key:"getDerivedStateFromError",value:function(e){return console.error("Error occurred",e),{hasError:!0,message:e.message}}}],(n=[{key:"componentDidCatch",value:function(e,t){console.log("Error occurred",e,t)}},{key:"render",value:function(){return this.state.hasError?(0,y.jsxs)("p",{style:{background:"red",color:"#fff",padding:"10px 20px"},children:["This component had an error and crashed ",(0,y.jsxs)("i",{children:['"',this.state.message,'"']})]}):this.props.children}}])&&wa(t.prototype,n),r&&wa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(b.Component),ka=(n(13981),n(16256));function Na(e){return Na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Na(e)}function Ea(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ta(e,t){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ta(e,t)}function Da(e,t){if(t&&("object"===Na(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Aa(e)}function Aa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ia(e){return Ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ia(e)}function Ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function La(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ma(Object(n),!0).forEach((function(t){Ba(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ma(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fa(e){return function(e){if(Array.isArray(e))return Ua(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ua(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ua(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var za,Ha={section:["section","row"],row:["row","column"],column:["column","element"],element:["element"]},Qa={moveNode:De},Wa=(Pa=(0,v.$j)((function(e){var t=e.nodes.nodes,n=function e(t,n){var r={children:[]};t.children&&t.children.length>0&&(r.children=t.children.map((function(t,r){return e(t,[].concat(Fa(n),["children",r]))})));var o=fn(t)?"element":t.slug;return La(La({},r),{},{key:t.id,title:t.name||St(t.slug),path:n,type:o,slug:t.slug,dropTypes:Ha[o]})};return{treeData:t.map((function(e,t){return n(e,[t])}))}}),Qa),Pa(qa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ta(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ia(r);if(o){var n=Ia(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Da(this,e)});function a(){var e;Ea(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ba(Aa(e=i.call.apply(i,[this].concat(n))),"onDragStart",(function(t){var n=t.node;e.node=n})),Ba(Aa(e),"allowDrop",(function(t){return t.dropNode.dropTypes.includes(e.node.type)})),Ba(Aa(e),"onDrop",(function(t){var n=t.dragNode,r=t.node,o=t.dropPosition;if(delete e.node,0===r.dropTypes.indexOf(n.type)){var i=Fa(r.path);i.pop()===o&&(o+=1),e.props.moveNode(n.path,[].concat(Fa(i),[o]))}else e.props.moveNode(n.path,[].concat(Fa(r.path),["children",0===o?o:r.children.length]))})),Ba(Aa(e),"onSelect",(function(e){_r().then((function(t){var n,r=null===(n=Dr(e,t))||void 0===n?void 0:n.parentNode;console.log(r),null==r||r.scrollIntoView({behavior:"smooth"})}))})),Ba(Aa(e),"getIcon",(function(e){var t=e.slug,n=e.name;return(0,y.jsx)("img",{src:It(t),alt:n})})),Ba(Aa(e),"onChange",(function(t){var n=t.target.value,r=e.props.treeData.map((function(e){return e.title.indexOf(n)>-1?getParentKey(e.key,gData):null})).filter((function(e,t,n){return e&&n.indexOf(e)===t}));e.setState({expandedKeys:r,searchValue:n,autoExpandParent:!0})})),e}return t=a,(n=[{key:"render",value:function(){return(0,y.jsxs)("div",{className:"navigator",children:[(0,y.jsxs)("div",{className:"qx-flex qx-flex-middle qx-flex-between",style:{padding:"8px"},children:[(0,y.jsxs)(p.default,{children:[(0,y.jsx)("i",{className:"qxuicon-plus qx-margin-small-right"}),"Expand All"]}),(0,y.jsx)("div",{className:"qx-margin-auto-left",children:(0,y.jsx)(Xo.default,{onChange:this.onChange,placeholder:"Search",size:"small",className:"qx-form-blank"})})]}),(0,y.jsx)(ka.default,{showIcon:!0,draggable:!0,blockNode:!0,selectable:!0,multiple:!1,checkable:!1,className:"draggable-navigator",onDragStart:this.onDragStart,allowDrop:this.allowDrop,onDrop:this.onDrop,onSelect:this.onSelect,icon:this.getIcon,treeData:this.props.treeData})]})}}])&&Ra(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||qa);function Ga(e){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(e)}function Ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Va(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $a(e,t){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$a(e,t)}function Za(e,t){if(t&&("object"===Ga(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xa(e)}var Ya="OPEN_NAVIGATOR_MODAL",Ka=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?Ya:null}}},el={openNavigatorModal:Ka};const tl=(0,v.$j)((function(e){return{visible:e.action.action===Ya}}),el)(za=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$a(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xa(r);if(o){var n=Xa(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Za(this,e)});function a(){return Ja(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this;return(0,y.jsx)(Do,{show:this.props.visible,close:function(){return e.props.openNavigatorModal(!1)},expandable:!1,width:520,className:"qxui-modal--with-tab qxui-modal--elements",style:{left:"calc(50vw - 260px)",display:this.props.visible?"block":"none"},title:(0,y.jsx)("h4",{className:"qxui-modal-title",children:"Navigator"}),children:this.props.visible?(0,y.jsx)(Wa,{}):(0,y.jsx)("span",{style:{minHeight:"100px"}})})}}])&&Va(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||za;function nl(e,t,n){var r=new Blob([e],{type:n||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(r,t);else{var o=window.URL.createObjectURL(r),i=window.document.createElement("a");i.style.display="none",i.href=o,i.setAttribute("download",t),void 0===i.download&&i.setAttribute("target","_blank"),window.document.body.appendChild(i),i.click(),window.document.body.removeChild(i),window.URL.revokeObjectURL(o)}}function rl(){var e="".concat(tt(),"/index.php?option=com_quix&task=api.exportCollection&type=").concat(quix.type,"&").concat(quix._token,"=1"),t="0"!==quix.id?quix.id:jQuery("#jform_id").val();jt().get(e+"&id=".concat(t)).then((function(e){var t,n,r="".concat(QuixPageAlias,".json"),o=e.data.data.config,i={groups:[],title:QuixPageAlias,type:"section"!==o.type?"layout":"section",data:null!==(t=o.data)&&void 0!==t?t:o,builder_version:null!==(n=o.builder_version)&&void 0!==n?n:"2.0.0"};nl(JSON.stringify(i),r,"application/json")}))}n(36159);var ol=n(86715),il=(n(12280),n(24298));function al(e){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},al(e)}function ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sl(e,t){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sl(e,t)}function cl(e,t){if(t&&("object"===al(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ul(e)}function ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pl(e)}function fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dl=Xo.default.TextArea,hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sl(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=pl(r);if(o){var n=pl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return cl(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),fl(ul(t=i.call(this,e)),"getHelpMarkup",(function(){var e=t.props.help;if(e)return(0,y.jsx)(Vi.Z,{content:e,placement:"right",popupStyle:{width:"300px"},children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-question-circle"})})})})),fl(ul(t),"getResetMarkup",(function(){return t.props.onlyBaseText||Zi()(t.props.default,t.props.value)?null:(0,y.jsx)(c.default,{title:"Reset to default",children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-undo",onClick:function(){return t.onCodeChange("")}})})})})),t.state={code:"",modes:[{value:"javascript",label:"JavaScript"},{value:"css",label:"CSS"},{value:"html",label:"HTML"}]},t.onCodeChange=t.onCodeChange.bind(ul(t)),t}return t=a,n=[{key:"onCodeChange",value:function(e){this.setState({code:e}),this.props.onChange({code:e,mode:this.props.value.mode?this.props.value.mode:"css"})}},{key:"getLabelMarkup",value:function(){var e=this.props.label;return(0,y.jsx)("span",{children:e})}},{key:"render",value:function(){var e=this;return(0,y.jsxs)("div",{className:"qx-fb-field-code",children:[(0,y.jsxs)("div",{className:"qx-fb-field__label qx-flex qx-flex-middle",children:[this.getLabelMarkup(),this.getHelpMarkup(),this.getResetMarkup()]}),(0,y.jsx)(dl,{rows:4,value:this.props.value.code,onChange:function(t){return e.onCodeChange(t.target.value)},prefixCls:"qxui-input"})]})}}],n&&ll(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);hl.propTypes={},hl.defaultProps={};const yl=hl;function ml(e){return ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ml(e)}var bl,vl;function gl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xl(e,t){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xl(e,t)}function jl(e,t){if(t&&("object"===ml(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wl(e)}function wl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ol(e){return Ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ol(e)}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sl=il.Z.Panel,Pl=qi.default.TabPane,ql=ol.default.Option,Cl="OPEN_PAGE_MODAL",kl=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:pe,payload:{action:e?Cl:null,tab:t}}},Nl={openPageSettings:kl},El=(0,v.$j)((function(e){var t=e.action,n=t.action,r=t.tab;return{visible:n===Cl,tab:r}}),Nl)((vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xl(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ol(r);if(o){var n=Ol(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return jl(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),_l(wl(t=i.call(this,e)),"state",{CSS_Code:"",JS_Code:"",color:"",accessListArray:[],LanguageListArray:[],globalStyles:"",enabledImageOptimization:!0,enable_amp:!0,enabledWebpSupport:!0}),t}return t=a,n=[{key:"componentDidMount",value:function(){var e=this;this.setState({CSS_Code:{code:Dr("jform_params_codecss").value,mode:"css"}}),this.setState({JS_Code:{code:Dr("jform_params_codejs").value,mode:"javascript"}});for(var t=Dr("jform_access").options,n=[],r=t.length,o=0;o<r;o++)""!==t[o].value&&n.push({text:t[o].text,value:t[o].value});this.setState({accessListArray:n});for(var i=Dr("jform_language").options,a=[],l=i.length,s=0;s<l;s++)a.push({text:i[s].text,value:i[s].value});this.setState({LanguageListArray:a}),Dr("jform_access").value=Dr("jform_access").value?Dr("jform_access").value:Dr("jform_access").options[0].value,Dr("jform_language").value=Dr("jform_language").value?Dr("jform_language").value:Dr("jform_language").options[0].value,setTimeout((function(){e.setState({enabledImageOptimization:!!_t(Dr("jform_params_enabled_image_optimization").value)||JSON.parse(Dr("jform_params_enabled_image_optimization").value),enabledWebpSupport:!!_t(Dr("jform_params_enabled_webp_support").value)||JSON.parse(Dr("jform_params_enabled_webp_support").value),enable_amp:!!_t(Dr("jform_metadata_enable_amp").value)||JSON.parse(Dr("jform_metadata_enable_amp").value)})}),100)}},{key:"onGlobalStylesChange",value:function(e){this.setState({globalStyles:e})}},{key:"saveGlobalStyles",value:function(){"function"==typeof this.state.globalStyles.toJS&&jQuery("#jform_params_style").val(JSON.stringify(this.state.globalStyles.toJS()))}},{key:"onChange",value:function(e){ii()}},{key:"render",value:function(){var e=this,t=Dr("jform_type").value;return(0,y.jsx)(Do,{className:"qxui-modal--with-tab page-options",title:"collection"===t?"Settings":"Page Settings",show:!0,close:function(){return e.props.openPageSettings(!1)},expandable:!1,style:{left:"calc(50vw - 250px)",display:this.props.visible?"block":"none"},footer:[(0,y.jsxs)("button",{className:"qxui-btn qxui-btn-primary qxui-btn-lg",onClick:function(){ii(),e.saveGlobalStyles(),e.props.openPageSettings(!1)},children:[(0,y.jsx)("i",{className:"qxuicon-check"})," Apply "]},"save")],children:(0,y.jsxs)(qi.default,{defaultActiveKey:this.state.tab,onChange:function(t){ht("qx-page-tab",t),e.setState({tab:t})},children:[(0,y.jsx)(Pl,{tab:"General",children:(0,y.jsx)(il.Z,{defaultActiveKey:["1"],accordion:!0,ghost:!0,expandIconPosition:"end",children:(0,y.jsxs)(Sl,{header:"General Options",children:[(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Status"}),(0,y.jsxs)(ol.default,{label:"Page status",defaultValue:Dr("jform_state").value,onChange:function(e){Dr("jform_state").value=e,ii()},children:[(0,y.jsx)(ql,{value:"1",children:"Published"}),(0,y.jsx)(ql,{value:"0",children:"Unpublished"}),(0,y.jsx)(ql,{value:"2",children:"Archived"}),(0,y.jsx)(ql,{value:"-2",children:"Trashed"})]})]}),(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Access"}),(0,y.jsx)(ol.default,{label:"Page Access",defaultValue:Dr("jform_access").value,style:{width:"100%"},onChange:function(e){Dr("jform_access").value=e,ii()},children:this.state.accessListArray.map((function(e){return(0,y.jsx)(ql,{value:e.value,children:e.text},e.value)}))})]}),(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Language"}),(0,y.jsx)(ol.default,{label:"Language",defaultValue:Dr("jform_language").value,style:{width:"100%"},onChange:function(e){Dr("jform_language").value=e,ii()},children:this.state.LanguageListArray.map((function(e){return(0,y.jsx)(ql,{value:e.value,children:e.text},e.value)}))})]})]},"1")})},"general"),(0,y.jsx)(Pl,{tab:"Advanced",children:(0,y.jsxs)(il.Z,{defaultActiveKey:["1"],accordion:!0,ghost:!0,expandIconPosition:"end",children:[(0,y.jsx)(Sl,{header:"CSS",children:(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(yl,{label:"Custom CSS",name:"jform[params][codecss]",value:this.state.CSS_Code,onChange:function(t){var n;e.setState({CSS_Code:{code:t.code}}),Dr("jform_params_codecss").value=t.code,n=t.code,Mr("page-custom-code-style"),_r().then((function(e){var t=e.createElement("style");t.innerHTML=Gr(n),t.id="page-custom-code-style",e.head.appendChild(t)})),ii()}})})},"1"),(0,y.jsx)(Sl,{header:"JS",children:(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(yl,{label:"Custom JS",mode:"javascript",name:"jform[params][codejs]",value:this.state.JS_Code,onChange:function(t){e.setState({JS_Code:{code:t.code}}),Dr("jform_params_codejs").value=t.code,Wr(t.code,"page-custom-code-script"),ii()}})})},"2")]})},"advanced")]})})}}],n&&gl(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),_l(vl,"propTypes",{}),_l(vl,"defaultProps",{}),bl=vl))||bl;const Rl=El;n(238);var Tl,Dl,Al=n(70933),Il=tt();function Ml(e){return Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ml(e)}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bl(e,t){return Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bl(e,t)}function Fl(e,t){if(t&&("object"===Ml(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ul(e)}function Ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zl(e){return zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zl(e)}function Hl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ql=ol.default.Option,Wl="OPEN_LINK_PAGE_MODAL",Gl=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?Wl:null}}},Jl={openLinkMenuPicker:Gl},Vl=(0,v.$j)((function(e){return{visible:e.action.action===Wl}}),Jl)((Dl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=zl(r);if(o){var n=zl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fl(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Hl(Ul(t=i.call(this,e)),"state",{MenuList:[],ParentList:[],mainmenu:"",parentmenu:"1",noMenu:!0,pageLink:"",Itemid:""}),Hl(Ul(t),"onChange",(function(){ii()})),Hl(Ul(t),"makeMenuLink",(function(){if(t.state.title)if(t.state.alias){if(t.state.mainmenu){t.state.parentmenu||t.setState({parentmenu:"1"});var e,n,r,o,i=(e=t.state.title,n=t.state.alias,r=t.state.mainmenu,o=t.state.parentmenu,new Promise((function(t,i){var a=document.getElementById("jform_token").name,l="".concat(Il,"/index.php?option=com_quix&task=api.createMenu&").concat(a,"=1"),s=document.getElementById("jform_id").value;console.log(l);var c={title:e,link:"index.php?option=com_quix&view=page&id="+s,alias:n,menu:r,parentid:o};console.log(c),jQuery.ajax({data:c,url:l,type:"POST",success:function(e){return(e=JSON.parse(e)).success?t(e):i(e)}})})));return i.then((function(e){if(!1===e.success)m.error(e.message);else{var n=e.data;m.success("Menu created successfully."),t.setState({noMenu:!1}),t.setState({Itemid:n.Itemid}),t.setState({pageLink:n.link}),Dr("return_url").value=btoa(n.link)}}),(function(e){m.error(e.message)})),i}m.warning("Please select menu group")}else m.warning("Alias is required");else m.warning("Title is required")})),Hl(Ul(t),"updateParentItem",(function(e){t.setState({ParentList:e})})),Hl(Ul(t),"handleChange",(function(e,n){t.setState({mainmenu:e}),jQuery.ajax({url:tt()+"/index.php?option=com_quix&task=api.getParentItem&menutype="+e,dataType:"json"}).done((function(e){var t=[],r=e.length,o=0,i=[];for(i.value="1",i.text="Menu Item Root",t.push(i);o<r;o++){var a=[];a.value=e[o].id,a.text=e[o].title,t.push(a)}return n(t)}))})),t}return t=a,(n=[{key:"componentDidMount",value:function(){for(var e=Dr("jform_menutype").options,t=[],n=e.length,r=0;r<n;r++){var o=[];o.value=e[r].value,o.text=e[r].text,t.push(o)}this.setState({MenuList:t});var i=[],a=[];a.value="1",a.text="Menu Item Root",i.push(a),this.setState({ParentList:i}),1==!!+window.QuixPageHasMenu&&(this.setState({noMenu:!1}),this.setState({pageLink:atob(Dr("return_url").value)})),this.setState({Itemid:Dr("jform_Itemid").value})}},{key:"render",value:function(){var e=this;return this.props.visible,(0,y.jsxs)(Do,{className:"modal--small",title:"Add To Menu",show:this.props.visible,close:function(){return e.props.openLinkMenuPicker(!1)},dismisible:!0,expandable:!1,style:{left:"calc(50vw - 250px)"},footer:[(0,y.jsxs)(p.default,{type:"primary",style:{display:this.state.noMenu?"initial":"none"},size:"large",onClick:this.makeMenuLink,children:[(0,y.jsx)("i",{className:"qxuicon-link"})," Create Menu"]},Math.random())],children:[(0,y.jsxs)("div",{style:{display:this.state.noMenu?"initial":"none"},children:[(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"Menu Title",placeholder:"Home",value:this.state.title,onChange:function(t){e.setState({title:t})},onReset:function(){e.setState({title:""})}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"Menu alias",placeholder:"menu-alias",value:this.state.alias,onChange:function(t){e.setState({alias:t})},onReset:function(){e.setState({alias:""})}})}),(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Select Menu"}),(0,y.jsx)(ol.default,{label:"Select Menu",defaultValue:this.state.mainmenu,style:{width:"100%"},onChange:function(t){e.handleChange(t,e.updateParentItem)},prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:this.state.MenuList.map((function(e,t){return(0,y.jsxs)(Ql,{value:e.value.toString(),children:[" ",e.text," "]},t)}))})]}),(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Select Parent Item"}),(0,y.jsx)(ol.default,{label:"Parent Item",defaultValue:this.state.parentmenu,style:{width:"100%"},onChange:function(t){e.setState({parentmenu:t})},prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:this.state.ParentList.map((function(e,t){return(0,y.jsxs)(Ql,{value:e.value.toString(),children:[" ",e.text," "]},t)}))})]})]}),(0,y.jsx)(Al.ZP,{status:"success",title:"Page Linked To Menu",subTitle:"This page is already linked to a menu item",style:{display:this.state.noMenu?"none":"block"},extra:[(0,y.jsx)("a",{className:"qx-button qx-button-primary",target:"_blank",href:"".concat(quix.url,"/administrator/index.php?option=com_menus&task=item.edit&id=").concat(this.state.Itemid),children:"Update Menu"},"1"),(0,y.jsxs)("a",{className:"qx-button qx-button-default qx-margin-small-left",target:"_blank",href:this.state.pageLink,children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Visit Page"]},"2")]})]})}}])&&Ll(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),Hl(Dl,"propTypes",{}),Hl(Dl,"defaultProps",{}),Tl=Dl))||Tl;const $l=Vl;function Zl(e){return Zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zl(e)}var Xl;function Yl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function es(e,t){return es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},es(e,t)}function ts(e,t){if(t&&("object"===Zl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ns(e)}function ns(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rs(e)}function os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var is=p.default.Group,as={openNodeImporter:Vo,openHistoryPanel:bo,openPageManager:Li,openSEOPanel:va,openNavigatorPanel:Ka,openExportImportModal:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:x,payload:e}},openSaveAsCollectionModal:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e&&!t)throw new Error("Data is required when state is true for openSaveAsCollectionModal");return{type:j,payload:{visible:e,data:t}}},invokeSEORankModal:qe,openPageSettings:kl,openTemplateSaver:wi,invokeDisplayConditionModal:Se,invokeElementPickerModal:we,updateQid:Qe,setDevice:He,emptyNodes:function(){return{type:ue}},openLinkMenuPicker:Gl,invokeOptimizationModal:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:pe,payload:{action:e?ve:null}}}},ls=(0,v.$j)((function(e){var t=e.meta.qid,n=e.nodes;return{qid:t,nodes:n.nodes,device:n.device}}),as)(Xl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&es(e,t)}(f,e);var t,n,r,o,i=(r=f,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rs(r);if(o){var n=rs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ts(this,e)});function f(){var e;Yl(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return os(ns(e=i.call.apply(i,[this].concat(n))),"state",{title:"",loading:!1,device:"desktop",iconLoading:!1,outputType:"html",visibleSeoModal:!1,showSaveModal:!1,showImportModal:!1,isSaving:!1}),os(ns(e),"setDevice",(function(t){var n;n=void 0===t.currentTarget?t.target.value:t.currentTarget.value,e.props.setDevice(Ke[n])})),os(ns(e),"changeIframeWidth",(function(){var t=e.props.device,n=et[t];document.querySelector("body").setAttribute("data-device",n),document.querySelectorAll("div[data-".concat(n,"]")).forEach((function(e){var t=e.attributes["data-".concat(n)].value;e.style.maxWidth=t,e.style.flex="0 0 ".concat(t)})),updateBodyDeviceClass(n)})),os(ns(e),"changeOutputFrame",(function(t){t.preventDefault();var n=confirm("This will reload the builder, make sure you have saved the changes"),r=new URL(window.location.href).searchParams.get("output"),o="component";if(!0!==n)return!1;"html"===r?o="component":"component"===r&&(o="html");var i=new URL(window.location.href);i.searchParams.set("output",o),window.location.href=i.href,e.setState({outputType:o})})),os(ns(e),"closePage",(function(){var e="page"===Dr("jform_type").value?"page.cancel":"collection.cancel";ft().submitform(e)})),os(ns(e),"backToAdmin",(function(){window.location=tt()+"/administrator/index.php?option=com_quix"})),os(ns(e),"onChange",(function(t){e.setState({title:t}),Dr("jform_title_hidden").value=t,ii()})),os(ns(e),"showTemplateSaveModal",(function(){e.setState({showSaveModal:!0})})),os(ns(e),"showImportModal",(function(){e.setState({showImportModal:!0})})),os(ns(e),"settingsDropdown",(function(e,t,n){return(0,y.jsx)(u.default,{overlay:"collection"===e?t:n,prefixCls:"qxui-dropdown",getPopupContainer:function(){return window.document.body},placement:"bottomCenter",children:(0,y.jsx)(p.default,{children:(0,y.jsx)("i",{className:"qxuicon-cog"})})})})),os(ns(e),"savePageAjax",(function(t){t.preventDefault(),e.onSaveStateChange(!0),ui(ns(e)).then((function(){e.onSaveStateChange(!1)})).catch((function(t){e.onSaveStateChange(!1)}))})),os(ns(e),"getDeviceToolbar",(function(){return(0,y.jsx)("div",{children:(0,y.jsxs)(is,{children:[(0,y.jsx)(c.default,{title:"All",children:(0,y.jsx)(p.default,{type:"text",className:"desktop"===e.state.device?"active":"",value:"desktop",onClick:e.setDevice,children:(0,y.jsx)("i",{className:"qxuicon-desktop"})})}),(0,y.jsx)(c.default,{title:"Tablet: @media screen and (max-width:768px)",children:(0,y.jsx)(p.default,{type:"text",className:"tablet"===e.state.device?"active":"",value:"tablet",onClick:e.setDevice,children:(0,y.jsx)("i",{className:"qxuicon-tablet"})})}),(0,y.jsx)(c.default,{title:"@media screen and (max-width:480px)",children:(0,y.jsx)(p.default,{type:"text",className:"mobile"===e.state.device?"active":"",value:"mobile",onClick:e.setDevice,children:(0,y.jsx)("i",{className:"qxuicon-mobile"})})})]})})})),os(ns(e),"getSaveToolbar",(function(){var t=e.saveButtonsOptions(ns(e)),n=new URLSearchParams(window.location.search).get("output");return(0,y.jsxs)("div",{className:"qx-flex qx-flex-middle",children:[(0,y.jsx)(c.default,{title:"Toggle Distraction free mode",placement:"bottom",children:(0,y.jsxs)("div",{className:"qx-distraction-mode",style:{marginRight:"15px"},onClick:e.changeOutputFrame,children:[(0,y.jsx)("span",{children:"Distraction"}),(0,y.jsx)(s.Z,{size:"small",defaultChecked:"component"===n?1:0,checked:"component"===e.state.outputType})]})}),(0,y.jsx)(c.default,{title:"SEO Score",children:(0,y.jsx)(p.default,{type:"text",onClick:e.props.openSEOPanel,style:{borderLeft:"1px solid #eee"},children:(0,y.jsx)(l.default,{status:"active",type:"circle",width:30,strokeColor:{"0%":"#fdf260","100%":"#87d068"},percent:parseInt(e.state.seoScore)})})}),(0,y.jsx)(c.default,{title:"Browse all your edits history from here.",placement:"bottom",children:(0,y.jsx)(p.default,{id:"quix-builder-history-cta",type:"text",onClick:e.props.openHistoryPanel,style:{borderLeft:"1px solid #eee"},children:(0,y.jsx)("i",{className:"qxuicon-history"})})}),(0,y.jsx)(c.default,{title:"Page Preview",children:(0,y.jsx)(p.default,{id:"page-preview",type:"text",value:"preview",onClick:function(){return ri(!0)},style:{borderLeft:"1px solid #eee"},children:(0,y.jsx)("i",{className:"qxuicon-eye preview"},"preview")})}),(0,y.jsx)(p.default,{type:"success",id:"page-save-btn",className:e.state.isSaving?"savePage qxui-btn-loading":"savePage",onClick:e.savePageAjax,style:{paddingLeft:"25px",paddingRight:"25px"},children:(0,y.jsxs)("div",{className:"qx-flex qx-flex-middle",children:[(0,y.jsx)("span",{className:"qx-margin-small-right qx-icon cloud-upload",children:e.state.isSaving?(0,y.jsx)("div",{"qx-spinner":"ratio:0.5",className:"qx-icon qx-spinner"}):(0,y.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","data-svg":"cloud-upload",children:[(0,y.jsx)("path",{fill:"none",stroke:"#000",strokeWidth:"1.1",d:"M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.31,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.31,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6"}),(0,y.jsx)("polyline",{fill:"none",stroke:"#000",points:"7.25 11.75 9.5 9.5 11.75 11.75"}),(0,y.jsx)("path",{fill:"none",stroke:"#000",d:"M9.5,18 L9.5,9.5"})]})}),(0,y.jsx)("span",{className:"save-text",children:"Save"})]})},"save"),(0,y.jsx)(u.default,{overlay:t,prefixCls:"qxui-dropdown",trigger:"click",overlayStyle:{minWidth:"185px"},children:(0,y.jsx)(p.default,{type:"text",id:"quix-builder-settings-dropdown",children:(0,y.jsx)("i",{className:"qxuicon-bars"})})})]})})),os(ns(e),"getPageNavToolbar",(function(){var t=ct();return(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:"qx-fb-toolbar__logo"}),(0,y.jsxs)(p.default,{id:"quix-builder-page-title",type:"link",onClick:e.props.openPageManager,children:[(0,y.jsx)("i",{className:"qxuicon-pencil qx-text-primary qx-margin-small-right"}),(0,y.jsx)("strong",{children:t||"New page"})]})]})})),os(ns(e),"onExportPageJson",(function(){"0"===Dr("jform_id").value?m.warning("Please save the page first!"):rl()})),os(ns(e),"onLinkToMenu",(function(){0===Dr("jform_id").value?m.warning("Please save the page first! then create menu link."):e.props.openLinkMenuPicker(!0)})),os(ns(e),"onSaveStateChange",(function(t){e.setState({isSaving:t})})),e}return t=f,n=[{key:"componentDidMount",value:function(){var e=new URL(window.location.href).searchParams.get("output");this.setState({is_pro_user:pt(),device:et[this.props.device],outputType:e})}},{key:"componentDidUpdate",value:function(e,t,n){e.device!==this.props.device&&(this.setState({device:et[this.props.device]}),this.changeIframeWidth())}},{key:"saveButtonsOptions",value:function(){var e=ut(),t=null;return d()(Dr("jform_template_type"))||["article","header","footer","mainbody"].includes(Dr("jform_template_type").value)&&(t=(0,y.jsxs)(a.default.Item,{onClick:this.props.invokeDisplayConditionModal,children:[(0,y.jsx)("i",{className:"qxuicon-adjust qx-margin-small-right"})," Display Condition"]},"1")),(0,y.jsxs)(a.default,{children:["collection"===e?(0,y.jsxs)(a.default.Item,{onClick:this.props.openPageSettings,children:[(0,y.jsx)("i",{className:"qxuicon-window-alt qx-margin-small-right"})," Template Options"]},"page"):null,"page"===e?(0,y.jsxs)(a.default.Item,{onClick:this.props.openPageSettings,children:[(0,y.jsx)("i",{className:"qxuicon-window-alt qx-margin-small-right"})," Page Settings"]},"page"):null,(0,y.jsxs)(a.default.Item,{onClick:this.props.invokeSEORankModal,children:[(0,y.jsx)("i",{className:"qxuicon-binoculars qx-margin-small-right"})," SEO Settings"]},"seo"),t,(0,y.jsx)(a.default.Divider,{}),"page"===e?(0,y.jsxs)(a.default.Item,{onClick:this.onLinkToMenu,children:[(0,y.jsx)("i",{className:"qxuicon-link qx-margin-small-right"})," Link To Menu"]},"menu"):null,(0,y.jsxs)(a.default.Item,{onClick:this.props.openTemplateSaver,children:[(0,y.jsx)("i",{className:"qxuicon-save qx-margin-small-right"})," Save as Template"]},"saveTemplate"),(0,y.jsxs)(a.default.Item,{onClick:this.props.openNodeImporter,children:[(0,y.jsx)("i",{className:"qxuicon-upload qx-margin-small-right"},"import-json")," Import JSON"]},"importJson"),(0,y.jsxs)(a.default.Item,{onClick:this.onExportPageJson,children:[(0,y.jsx)("i",{className:"qxuicon-parachute-box qx-margin-small-right"},"export-page")," Export JSON"]},"exportJson"),(0,y.jsxs)(a.default.Item,{onClick:this.props.emptyNodes,children:[(0,y.jsx)("i",{className:"qxuicon-trash-alt qx-margin-small-right"},"empty-node")," Clear Page Content"]},"emptyNode"),(0,y.jsx)(a.default.Divider,{}),(0,y.jsxs)(a.default.Item,{onClick:this.closePage,children:[(0,y.jsx)("i",{className:"qxuicon-times qx-margin-small-right"})," Close Builder"]},"close"),(0,y.jsxs)(a.default.Item,{onClick:this.backToAdmin,children:[(0,y.jsx)("i",{className:"qxuicon-arrow-left qx-margin-small-right"})," Back to Admin"]},"back2Admin")]})}},{key:"render",value:function(){var e=this;return(0,y.jsxs)(y.Fragment,{children:[this.getPageNavToolbar(),this.getDeviceToolbar(),this.getSaveToolbar(),(0,y.jsx)(Ca,{name:"SEOPanel",children:(0,y.jsx)(xa,{onChangeSeoScore:function(t){return e.setState({seoScore:t})}})}),(0,y.jsx)(Ca,{name:"ManagePages",children:(0,y.jsx)(Fi,{isSaving:this.state.isSaving,onSaveStateChange:this.onSaveStateChange})}),(0,y.jsx)(Ca,{name:"HistoryPanel",children:(0,y.jsx)(go,{})}),(0,y.jsx)(Ca,{name:"SaveTemplate",children:(0,y.jsx)(Si,{})}),(0,y.jsx)(Ca,{name:"TemplateImportModal",children:(0,y.jsx)(Zo,{})}),(0,y.jsx)(Ca,{name:"NavigatorModal",children:(0,y.jsx)(tl,{})})]})}}],n&&Kl(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(b.Component))||Xl;const ss=ls;n(73098);var cs=n(74518),us=JSON.parse(window.QUIX_SHAPES);function ps(e){var t=null;try{t=window.atob(us[e])}catch(e){t=null}return t}var fs=n(3468),ds=n.n(fs);function hs(e){return hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hs(e)}function ys(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bs(e,t){return bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bs(e,t)}function vs(e,t){if(t&&("object"===hs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gs(e)}function gs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xs(e)}function js(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ws=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bs(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xs(r);if(o){var n=xs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vs(this,e)});function a(){var e;ys(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return js(gs(e=i.call.apply(i,[this].concat(n))),"state",{width:0,mousePosition:0}),js(gs(e),"onResize",(function(t){var n=e.props,r=n.min,o=n.max,i=e.state.width+(t.screenX-e.state.mousePosition);i<=r&&i<e.props.width||i>=o&&i>e.props.width||(e.setState({width:i,mousePosition:t.screenX}),e.props.onResize(i))})),js(gs(e),"onResizeStart",(function(t){e.setState({mousePosition:t.screenX}),e.props.onResizeStart(t),_r().then((function(t){t.addEventListener("mousemove",e.onResize,!1),t.addEventListener("mouseup",e.onResizeStop,!1)}))})),js(gs(e),"onResizeStop",(function(){e.props.onResizeStop(),_r().then((function(t){t.removeEventListener("mousemove",e.onResize),t.removeEventListener("mouseup",e.onResizeStop)}))})),e}return t=a,(n=[{key:"componentDidUpdate",value:function(e,t,n){this.props.width!==e.width&&this.setState({width:this.props.width})}},{key:"render",value:function(){return(0,y.jsx)("div",{className:"qx-fb-resizable-grid react-resizable",children:(0,y.jsxs)("div",{className:"qx-fb-resizable-grid",children:[this.props.children,(0,y.jsx)("span",{className:"react-resizable-handle react-resizable-handle-se",onMouseDown:this.onResizeStart})]})})}}])&&ms(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);js(ws,"propTypes",{}),js(ws,"defaultProps",{});const Os=ws;var _s=function(e){var t=e.id,n=e.children,r=e.menu,o=(0,wt.av)({id:t}).show,i=function(e){e.preventDefault(),e.stopPropagation(),o(e)};return r&&r({handleEvent:i}),(0,y.jsx)("div",{className:"qx-context-menu",onContextMenu:i,children:n})};function Ss(e,t){return{type:ge,payload:{node:t,path:e}}}function Ps(e,t){return{type:je,payload:{path:e,placement:t}}}function qs(e){return!e.props.device||e.props.node.visibility[e.props.device]}function Cs(e,t){var n;e.setState({inserting:!0,loading:!0});var r=e.state.originItems.find((function(e){return e.id===t})),o=+r.min_version.replace(".","");if(+window.QUIXNXT_VERSION.replace(".","")<o)return m.warning("Quix version ".concat(r.min_version," is required to use this template. Please update Quix first.")),void e.setState({inserting:!1,loading:!1});var i=new URL(r.json_url);i.protocol="https","pro"===e.state.is_pro_user&&i.searchParams.append("auth","1");var a=null===(n=i.search.match(/id=(\d+)/))||void 0===n?void 0:n[1];jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getRemoteTemplate&v=").concat(r.min_version,"&id=").concat(a)).then((function(t){try{var n=t.data;e.props.insertNodes(e.props.sectionPath,n)}catch(e){m.error("Something went wrong! Possible reason:  ".concat(e.message)),console.log(e)}})).then((function(){m.success("Template inserted"),e._mounted&&e.setState({inserting:!1,loading:!1}),e.props.closeModal()}))}var ks=n(18840),Ns=n.n(ks);function Es(e){return function(e){if(Array.isArray(e))return Rs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Rs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rs(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ts(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ts(Object(n),!0).forEach((function(t){As(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ts(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Is,Ms,Ls=function(e){e.createDragPreview=function(e,t){var n=Dr(fn(e)?"".concat(e.id,"-preview"):e.id,t),r=n,o=r.clientHeight,i=r.clientWidth;return window.QUIX.drag=Ds(Ds({},window.QUIX.drag),{},{el:n}),(n=n.cloneNode(!0)).style.width="".concat(i,"px"),n.style.height="".concat(o,"px"),n.style.zoom=i>o?300/i:300/o,n.style.position="absolute",n.style.top="-700px",n.style.right="-700px",n.style.overflow="hidden",n.id="drag-preview-image",t.body.appendChild(n),n},e.removeDragPreview=function(){_r().then((function(e){Dr("drag-preview-image",e).remove()}))},e.startDrag=function(t){t.persist(),_r().then((function(n){var r=e.createDragPreview(e.props.node,n);window.QUIX.drag=Ds(Ds({},window.QUIX.drag),{},{path:Es(e.props.path),type:e.getType()}),t.dataTransfer.setDragImage(r,0,0)}))},e.onDragOver=function(t){var n=window.QUIX.drag;if(e.getDropTypes().includes(null==n?void 0:n.type)){t.preventDefault(),t.stopPropagation();var r=t.currentTarget.offsetTop+44,o=t.pageY-r;t.currentTarget.offsetHeight/2>o?e.showDragPlaceholder($e):e.showDragPlaceholder(Ze)}},e.onDragLeave=function(){e.showDragPlaceholder(null)},e.showDragPlaceholder=Ns()((function(t){t&&(window.QUIX.drag.placement=t),_r().then((function(n){var r=Dr("".concat(e.getId(),"-drop-before"),n),o=Dr("".concat(e.getId(),"-drop-after"),n);t===$e?(null==r||r.classList.remove("qx-hidden"),null==o||o.classList.add("qx-hidden")):t===Ze?(null==r||r.classList.add("qx-hidden"),null==o||o.classList.remove("qx-hidden")):(null==r||r.classList.add("qx-hidden"),null==o||o.classList.add("qx-hidden"))}))}),10),e.onDrop=function(t){e.showDragPlaceholder(null),e.removeDragPreview();var n=window.QUIX.drag;if(console.log(e.getDropTypes(),e.getType(),n),e.getDropTypes().includes(null==n?void 0:n.type)){t.preventDefault(),t.stopPropagation();var r=n.path;e.handleDrop(Es(r),n.placement,n.type),delete window.QUIX.drag}}};function Bs(e){return Bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bs(e)}function Fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Us(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fs(Object(n),!0).forEach((function(t){$s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zs(e){return function(e){if(Array.isArray(e))return Hs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hs(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ws(e,t){return Ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ws(e,t)}function Gs(e,t){if(t&&("object"===Bs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Js(e)}function Js(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vs(e){return Vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vs(e)}function $s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zs={invokeElementPickerModal:we,showFormModal:Ss,replaceNode:Ie,deleteNode:Ue,duplicateNode:Ae,copyNode:Me,pasteNode:Le,pasteNodeStyle:Be,pasteNodeStyleSpecial:Fe,resetNodeStyle:function(e,t){return{type:X,payload:{path:e,name:t}}},setNodeVisibility:ze,setDndPlacement:Ps,moveNode:De,invokeElementSaveModal:_e},Xs=(0,v.$j)(null,Zs)((Ms=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ws(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vs(r);if(o){var n=Vs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gs(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),$s(Js(t=i.call(this,e)),"hash",void 0),$s(Js(t),"getId",(function(){var e;return null===(e=t.props.node)||void 0===e?void 0:e.id})),$s(Js(t),"getDropTypes",(function(){return["element"]})),$s(Js(t),"getType",(function(){return"element"})),$s(Js(t),"handleDrop",(function(e,n){var r=zs(t.props.path);if(n===$e)t.props.moveNode(e,zs(r));else{var o=r.pop();t.props.moveNode(e,[].concat(zs(r),[o+1]))}})),$s(Js(t),"injectStyleAndScript",(function(){Ar(t.props.node.slug)})),$s(Js(t),"removeStyleAndScript",(function(){jQuery("script#"+t.props.node.id+"-preview").remove(),jQuery("style#"+t.props.node.id+"-preview").remove()})),$s(Js(t),"loadElement",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(n||t.props.isModalOpen||t.hash!==e.hash)&&("column"!==e.slug?("form"===e.slug&&(n=!0),t.hash=e.hash,console.log("Rendering element",e.slug,n),!n&&t.props.isModalOpen&&"general"===window.QUIX.formTab?(console.log("Rendering Element HTML and SCRIPT",e.id,e),Ur(e,t.props.path).then((function(){Hr(e).catch((function(e){return e}))}))):t.props.isModalOpen&&"styles"===window.QUIX.formTab?(console.log("Rendering Element STYLES",e.id,e),zr(e).catch((function(e){return e}))):(console.log("Rendering Element ALL",e.id,e),Ur(e,t.props.path).then((function(){Hr(e).catch((function(e){return e})),zr(e).catch((function(e){return e}))})))):zr(e).catch((function(e){return e})))})),$s(Js(t),"goPro",(function(){window.open("https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=context-menu&utm_content=go-pro","_blank")})),$s(Js(t),"deleteNode",(function(){t.props.deleteNode(t.props.path,t.props.node.slug)})),$s(Js(t),"duplicateNode",(function(){t.props.duplicateNode(t.props.path,t.props.node.slug)})),$s(Js(t),"resetNodeStyle",(function(){t.props.resetNodeStyle(t.props.path,t.props.node.slug)})),$s(Js(t),"openSettingsModal",(function(){var e=t.props,n=e.path,r=e.isModalOpen,o=e.formPath,i=e.formNode,a=t.props.node;r&&t.props.replaceNode(o,i),t.props.showFormModal(n,a)})),$s(Js(t),"saveElement",(function(){t.props.invokeElementSaveModal(t.props.path)})),$s(Js(t),"elementContextMenu",(function(){if(!qs(Js(t)))return(0,y.jsx)(wt.v2,{id:t.state.id,theme:wt.dw.light,style:{zIndex:99999},children:dn(Js(t))});var e=(0,y.jsxs)(wt.ck,{onClick:t.resetNodeStyle,children:[(0,y.jsx)("i",{className:"qxuicon-redo"})," Reset Style"]},"reset-style"),n=null,r=null;return"free"===t.state.is_pro_user&&(r=(0,y.jsx)(wt.Z0,{},"separatorPro"),n=(0,y.jsxs)(wt.ck,{onClick:t.goPro,className:"goProLink",children:[(0,y.jsx)("i",{className:"qxuicon-trash-alt"}),"Go Pro Xyz"]},"goPro")),(0,y.jsxs)(wt.v2,{id:t.state.id,theme:wt.dw.light,style:{zIndex:99999},children:[(0,y.jsx)(wt.ck,{disabled:!0,title:"Element",children:"Element"},"title"),(0,y.jsxs)(wt.ck,{onClick:t.openSettingsModal,children:[(0,y.jsx)("i",{className:"qxuicon-pencil"})," Edit"]},"edit"),(0,y.jsxs)(wt.ck,{onClick:t.duplicateNode,children:[(0,y.jsx)("i",{className:"qxuicon-clone"})," Duplicate"]},"duplicate"),(0,y.jsx)(wt.Z0,{},"separator1"),mn(Js(t)),e,(0,y.jsx)(wt.Z0,{},"separator2"),(0,y.jsxs)(wt.ck,{onClick:t.saveElement,children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-save"})," Save to Library"]},"save-to-library"),dn(Js(t)),(0,y.jsx)(wt.Z0,{},"separator3"),(0,y.jsxs)(wt.ck,{onClick:t.deleteNode,children:[(0,y.jsx)("i",{className:"qxuicon-trash-alt"})," Delete"]},"delete"),r,n]})})),$s(Js(t),"enableVisibility",(function(){var e=t.props,n=e.setNodeVisibility,r=e.path,o=e.node.visibility,i=e.device;n(r,Us(Us({},o),{},$s({},i,!0)))})),$s(Js(t),"renderSettings",(function(e){var n=qs(Js(t)),r=(0,y.jsxs)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small","qx-tooltip":"Edit",onClick:t.openSettingsModal,children:[(0,y.jsx)("i",{className:"qxuicon-pencil"})," "]},e+"-setting"),o=n?(0,y.jsxs)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small","qx-tooltip":"Delete",onClick:t.deleteNode,children:[" ",(0,y.jsx)("i",{className:"qxuicon-trash-alt"})]},e+"-delete"):"",i="column"===t.props.node.slug?null:(0,y.jsx)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small","qx-tooltip":"Options",onClick:function(e){e.stopPropagation(),t.menu.handleEvent(e)},children:(0,y.jsx)("i",{className:"qxuicon-bars"})},"options"),a="column"===t.props.node.slug?null:(0,y.jsx)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small","qx-tooltip":"Close",onClick:t.deleteNode,children:(0,y.jsx)("i",{className:"qxuicon-trash-alt"})},"deleteNodeElement"),l="column"===t.props.node.slug?null:(0,y.jsx)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small","qx-tooltip":"Duplicate",onClick:t.duplicateNode,children:(0,y.jsx)("i",{className:"qxuicon-clone"})},"duplicateNodeElement");if(!n)return(0,y.jsx)("div",{className:"qx-fb-settings-wrap",children:(0,y.jsx)(cs.default,{className:"qx-fb-settings qx-fb-settings--element",children:(0,y.jsx)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small","qx-tooltip":n?"Disable":"Enable",onClick:t.enableVisibility,children:(0,y.jsx)("i",{className:n?"qxuicon-low-vision":"qxuicon-eye"})},"enable-visibility")})});var s=t.props.node.slug.charAt(0).toUpperCase()+t.props.node.slug.slice(1);return(0,y.jsx)("div",{className:"qx-fb-settings-wrap",children:(0,y.jsxs)(cs.default,{size:1,className:"qx-fb-settings qx-fb-settings--element",children:["column"===t.props.node.slug?o:null,"column"===t.props.node.slug?null:r,i,l,(0,y.jsx)(p.default,{type:"text",size:"small",className:"qx-animation-slide-right-small",draggable:!0,onDragStart:t.startDrag,"data-qx-tooltip":"Move ".concat(s),children:(0,y.jsx)("i",{className:"qxuicon-arrows"})},"drag-button"),a]})})})),$s(Js(t),"getDevice",(function(){var e=dt("qx-device");return void 0===e&&(e="desktop"),"mobile"===e?"phone":e})),Ls(Js(t)),t.state={needPasteOption:!1,enableEdit:!1,elementRawHTML:"",elementRawStyle:"",elementRawScript:"",elementRawScripts:[],id:lr("qx-element-id-"),field:{},draggingEnabled:!0,forceRender:null,modalOpen:!1,is_pro_user:window.QuixLicenseStatus},t}return t=a,(n=[{key:"componentDidMount",value:function(){this.injectStyleAndScript(),this.loadElement(this.props.node,!0)}},{key:"shouldComponentUpdate",value:function(e,t,n){var r,o,i;return"column"===e.node.slug||!!(this.props.isModalOpen&&(this,this.props.node.id===(null===(i=this.props.formNode)||void 0===i?void 0:i.id))||this.hash!==e.node.hash||this.props.device!==e.device)||(null===(r=this.props.copiedNode)||void 0===r?void 0:r.id)!==(null===(o=e.copiedNode)||void 0===o?void 0:o.id)}},{key:"componentDidUpdate",value:function(e,t,n){this.loadElement(this.props.node)}},{key:"componentWillUnmount",value:function(){this.removeStyleAndScript()}},{key:"render",value:function(){var e=this,t=this.props.node,n=qs(this),r=null==t?void 0:t.id,o=Ve()("qx-fb-element",{"qx-fb-dragging":!1,"qx-fb-column--nested":"column"===t.slug,"qx-fb-disabled":!n}),i=Ve()({"qx-fb-disabled":!n});if("column"===this.props.node.slug){var a=(0,y.jsx)(Tu,{elementPath:this.props.path,children:t.children,path:[].concat(zs(this.props.path),["children"]),device:this.props.device,resize:this.props.resize,hidePlusIcon:!0});return(0,y.jsx)("div",{className:o,style:{flex:"0 0 100%",maxWidth:"100%"},children:(0,y.jsx)("div",{id:r,children:(0,y.jsxs)("div",{className:i,children:[(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-top-small qx-animation-fast"}),this.renderSettings(r),a]})})})}return(0,y.jsxs)("div",{className:o,tabIndex:"0",children:[(0,y.jsxs)(_s,{id:this.state.id,menu:function(t){return e.menu=t},children:[this.renderSettings(r),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-top-small qx-animation-fast",id:"".concat(this.getId(),"-drop-before")}),(0,y.jsx)("div",{id:r+"-preview"}),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-bottom-small qx-animation-fast",id:"".concat(this.getId(),"-drop-after")})]}),this.elementContextMenu()]})}}])&&Qs(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),$s(Ms,"propTypes",{path:ds().array.isRequired}),Is=Ms))||Is;const Ys=Xs;function Ks(e){return Ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ks(e)}var ec,tc;function nc(e){return function(e){if(Array.isArray(e))return rc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return rc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ic(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ac(e,t){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ac(e,t)}function lc(e,t){if(t&&("object"===Ks(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return sc(e)}function sc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cc(e){return cc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cc(e)}function uc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pc={invokeElementPickerModal:we,setDndPlacement:Ps,moveNode:De,pasteNode:Le,insertCopiedNodes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:F,payload:{targetPath:e}}}},fc=(0,v.$j)(null,pc)((tc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ac(e,t)}(l,e);var t,n,r,o,a=(r=l,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=cc(r);if(o){var n=cc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return lc(this,e)});function l(){var e;oc(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uc(sc(e=a.call.apply(a,[this].concat(n))),"state",{id:lr("qx"),needPasteOption:!1,is_pro_user:!1}),uc(sc(e),"goPro",(function(e){return window.open("https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=context-menu&utm_content=go-pro","_blank"),e})),uc(sc(e),"handleInsertElementClick",(function(){var t=e.props,n=t.path,r=t.children;e.props.invokeElementPickerModal(nc(n),r.length)})),uc(sc(e),"renderElement",(function(t,n){var r=e.props,o=r.path,i=r.formNode,a=r.formPath,l=r.device,s=r.copiedNode,c=r.dnd,u=r.isModalOpen,p=r.resize,f=[].concat(nc(o),[n]);if(kn(t.slug))return(0,y.jsx)(Ys,{path:f,formNode:i,formPath:a,device:l,copiedNode:s,dnd:c,isModalOpen:u,index:n,node:t,columnId:e.props.columnId,rowId:e.props.rowId,rowPath:e.props.rowPath,resize:p},t.id)})),uc(sc(e),"renderFooter",(function(t){return(0,y.jsxs)("div",{className:t?"qx-fb-area-blank":"qx-fb-button--add",children:[(0,y.jsx)(p.default,{type:"primary",shape:"circle",className:"qxui-btn--small","qx-tooltip":"Add New Element",onClick:e.handleInsertElementClick,children:(0,y.jsx)("i",{className:"qxuicon-plus"})}),e.props.children.length?null:cr(sc(e),!0)?(0,y.jsx)(p.default,{type:"primary",shape:"circle",className:"qxui-btn--small qx-margin-small-left","qx-tooltip":"Paste Element",onClick:function(){e.props.insertCopiedNodes(e.props.path.concat(0))},children:(0,y.jsx)("i",{className:"qxuicon-paste"})}):null]})})),uc(sc(e),"renderElements",(function(t){return t.map(e.renderElement)})),e}return t=l,n=[{key:"componentDidMount",value:function(){this.setState({is_pro_user:nt()})}},{key:"render",value:function(){var e=this,t=this.props.children,n=0===t.length,r=null,o=null;return"free"===this.state.is_pro_user&&(o=(0,y.jsx)(wt.Z0,{}),r=(0,y.jsxs)(wt.ck,{onClick:this.goPro.bind(this),className:"goProLink",children:[(0,y.jsx)("i",{className:"qxuicon-trash-alt"}),"Go Pro"]})),(0,y.jsxs)("div",{className:"qx-fb-elements",children:[this.renderElements(t),this.renderFooter(n),this.state.needPasteOption?(0,y.jsx)(_s,{id:this.state.id,children:(0,y.jsxs)(wt.v2,{id:this.state.id,theme:wt.dw.dark,style:{zIndex:99999},children:[(0,y.jsx)(wt.ck,{disabled:!0,title:"Element",children:"Element"},"title"),(0,y.jsxs)(wt.ck,{onClick:function(){Le(e.props.path.concat(0)),i.emit("Element_WANT_TO_COPY")},children:[(0,y.jsx)("i",{className:"qxuicon-paste"})," Paste"]}),o,r]})}):null]})}}],n&&ic(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(b.Component),uc(tc,"propTypes",{path:ds().array.isRequired,children:ds().array.isRequired}),ec=tc))||ec;const dc=fc;function hc(e,t,n){var r,o;if(null!==(r=this.props.resize.column1)&&void 0!==r&&r.id||null!==(o=e.resize.column1)&&void 0!==o&&o.id){var i,a=null!==(i=this.props.resize.column1)&&void 0!==i&&i.id?this.props.resize:e.resize,l=Math.min(a.rowPath.length,this.props.path.length);return a.rowPath.slice(0,l).join()===this.props.path.slice(0,l).join()}if(e.isModalOpen){var s=Math.min(e.formPath.length,e.path.length);return e.formPath.slice(0,s).join()===e.path.slice(0,s).join()}return!("section"===this.props.node.slug&&this.props.isModalOpen&&!e.isModalOpen)}function yc(e){return yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yc(e)}var mc,bc;function vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vc(Object(n),!0).forEach((function(t){qc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xc(e){return function(e){if(Array.isArray(e))return jc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return jc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oc(e,t){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oc(e,t)}function _c(e,t){if(t&&("object"===yc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sc(e)}function Sc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pc(e){return Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pc(e)}function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cc={addColumnNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:T,payload:{path:e,index:t}}},showFormModal:Ss,deleteNode:Ue,pasteNode:Le,pasteNodeStyle:Be,pasteNodeStyleSpecial:Fe,setNodeVisibility:ze,duplicateColumnNode:function(e){return{type:Y,payload:{path:e}}},changeColumnWidth:function(e,t){return{type:se,payload:{path:e,width:t}}},setColumnWidth:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:ce,payload:{path:e,width:t}}},setDndPlacement:Ps,moveNode:De},kc=(0,v.$j)(null,Cc)((bc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pc(r);if(o){var n=Pc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _c(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),qc(Sc(t=i.call(this,e)),"hash",lr()),qc(Sc(t),"getId",(function(){var e;return null===(e=t.props.node)||void 0===e?void 0:e.id})),qc(Sc(t),"getDropTypes",(function(){return["column","element"]})),qc(Sc(t),"getType",(function(){return"column"})),qc(Sc(t),"handleDrop",(function(e,n,r){var o=xc(t.props.path);"element"===r&&(n===$e?t.props.moveNode(e,[].concat(xc(o),["children",0])):t.props.moveNode(e,[].concat(xc(o),["children",t.props.node.children.length])))})),qc(Sc(t),"shouldComponentUpdate",hc),qc(Sc(t),"getDevice",(function(){return Pt(t.props.device).toLowerCase()})),qc(Sc(t),"loadColumn",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(n||t.hash!==e.hash)&&(t.hash=e.hash,console.log("Re-render",e.id,e.hash),zr(e))})),qc(Sc(t),"copyNode",(function(){t.props.copyNode(t.props.path,t.props.node)})),qc(Sc(t),"pasteNode",(function(){t.props.pasteNode(t.props.path)})),qc(Sc(t),"duplicateNode",(function(){t.props.duplicateColumnNode(t.props.path)})),qc(Sc(t),"openSettingsModal",(function(){t.props.showFormModal(t.props.path,t.props.node)})),qc(Sc(t),"deleteNode",(function(){t.props.deleteNode(t.props.path,"Column")})),qc(Sc(t),"handleResizeStart",(function(){_r().then((function(e){var n=Dr(t.props.rowId,e).offsetWidth;t.props.changeColumnWidth(t.props.path,n)}))})),qc(Sc(t),"handleResize",(function(e){t.w=t.getUpdatedWidth(e),Jr(t.w.column1.id,t.w.column1.width[t.w.device]),Jr(t.w.column2.id,t.w.column2.width[t.w.device],!0)})),qc(Sc(t),"getUpdatedWidth",(function(e){var n=t.getDevice(),r=t.getWidth();r[n]=e;var o=r[n],i=t.props.resize,a=i.column1,l=a.width,s=a.id,c=i.column2,u=c.width,p=c.id,f=gc({},l),d=gc({},u),h=f[n]+d[n];return f[n]=o,d[n]=h-o,{column1:{id:s,width:f},column2:{id:p,width:d},device:n}})),qc(Sc(t),"handleResizeStop",(function(){t.w&&(delete t.w.device,t.props.setColumnWidth(t.props.path,t.w),Jr(t.w.column1.id),Jr(t.w.column2.id),delete t.w)})),qc(Sc(t),"addColumn",(function(){var e=xc(t.props.path),n=e.pop();t.props.addColumnNode(e,n)})),qc(Sc(t),"getWidth",(function(){var e,n=t.props,r=n.node,o=r.id,i=r.form,a=n.node,l=n.resize,s=l.column1,c=l.column2;return gc({},(null==s?void 0:s.id)===a.id||(null===(e=a.column2)||void 0===e?void 0:e.id)===a.id?s.id===o?s.width:c.width:i.general.layout_fields_group.col_width)})),qc(Sc(t),"renderElements",(function(){var e=t.props,n=e.path,r=e.device,o=e.formNode,i=e.formPath,a=e.copiedNode,l=e.dnd,s=e.node,c=(s.id,s.children),u=s.form,p=e.isModalOpen,f=e.resize;return t.props.rowPath.length>9?null:(0,y.jsx)(dc,{path:[].concat(xc(n),["children"]),device:r,formNode:o,formPath:i,copiedNode:a,dnd:l,isModalOpen:p,children:c,columnId:u.advanced.identifier.id,rowId:t.props.rowId,rowPath:t.props.rowPath,resize:f},"elements")})),qc(Sc(t),"toggleNodeVisibility",(function(){var e=t.props,n=e.setNodeVisibility,r=e.node.visibility,o=e.path,i=e.device;n(o,gc(gc({},r),{},qc({},i,!r[i])))})),qc(Sc(t),"renderSettings",(function(){var e=t.props.node.children,n=qs(Sc(t)),r=null;(e.length||1)<12&&(r=(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Add Column",onClick:t.addColumn,children:(0,y.jsx)("i",{className:"qxuicon-plus"})})),r=n?r:"";var o=(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Column Settings",onClick:t.openSettingsModal,children:(0,y.jsx)("i",{className:"qxuicon-cog"})}),i=n?(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Duplicate Column",onClick:t.duplicateNode,children:(0,y.jsx)("i",{className:"qxuicon-clone"})}):"",a=n?(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Delete Column",onClick:t.deleteNode,children:(0,y.jsx)("i",{className:"qxuicon-trash-alt"})}):"";return(0,y.jsx)("div",{className:"qx-fb-settings-wrap",children:(0,y.jsxs)(cs.default,{size:1,className:"qx-fb-settings qx-fb-settings--column",children:[o,i,r,(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":n?"Disable Column":"Enable Column",onClick:t.toggleNodeVisibility,children:(0,y.jsx)("i",{className:n?"qxuicon-low-vision":"qxuicon-eye"})}),a]})})})),Ls(Sc(t)),t.state={needPasteOption:!1,showCols:!1,enableEdit:!1,columnRawHtml:"",columnRawStyle:"",id:lr("qx-column-id-"),elementKey:lr("qx-element-key-"),flex:null,maxWidth:null,showWidth:!1,align:null,field:{},resizeDone:!0,hash:null,columns:{left:{id:"",path:[]},right:{id:"",path:[]}}},t}return t=a,n=[{key:"componentDidMount",value:function(){this.loadColumn(this.props.node,!0)}},{key:"componentDidUpdate",value:function(e,t,n){this.loadColumn(this.props.node)}},{key:"render",value:function(){for(var e=this.props,t=e.isDragging,n=e.node,r=n.children,o=n.form,i=e.prentNodes,a=e.resize,l=a.column1,s=a.column2,c=(e.device,qs(this)),u=o.advanced.identifier.id,p=this.getWidth(),f=0,d=Object.keys(p);f<d.length;f++){var h=d[f],m=p[h];(null===m||Number.isNaN(m)||void 0===m)&&(p[h]=i/100)}var b=p[this.getDevice()],v=window.column[u]?window.column[u]:{classes:"lg"},g=0===r.length?"qx-fb-column--empty":"",x=[this.renderElements(),(0,y.jsx)("div",{className:"qx-hidden qx-fb-column__width "+this.state.align},"width-spacer")],j=0,w=0,O=0;null!=l&&l.id&&null!=s&&s.id&&(O=(j=l.width[this.getDevice()]+s.width[this.getDevice()])-(w=.1*j));var _=(0,y.jsx)(Os,{onResizeStart:this.handleResizeStart,onResizeStop:this.handleResizeStop,onResize:this.handleResize,min:w,max:O,width:b,children:(0,y.jsx)(Ca,{children:x})}),S=Ve()("qx-fb-column","qx-column",g,v.classes,{"qx-fb-disabled":!c,"qx-fb-dragging":t}),P=o.styles.background_overlay_fields_group.background_overlay;if(P){var q="qx-background-overlay "+u+"-background-overlay";P=(0,y.jsx)("div",{className:q})}var C=o.advanced.animation_fields_group.animation,k=o.advanced.animation_fields_group.animation_repeat,N=o.advanced.animation_fields_group.animation_delay,E={};return"none"!==C&&(_t(C)||(C="cls:"+C+";"),k&&(C+="repeat:ture;"),N&&(C=C+"delay:"+N),E["qx-scrollspy"]=C),(0,y.jsxs)("div",gc(gc({id:u,className:S},E),{},{onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop,children:[this.renderSettings(),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-bottom-small qx-animation-fast",id:"".concat(this.getId(),"-drop-before")}),(0,y.jsxs)("div",{className:"qx-col-wrap",children:[P,_]}),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-bottom-small qx-animation-fast",id:"".concat(this.getId(),"-drop-after")})]}),u+"-"+C)}}],n&&wc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),qc(bc,"propTypes",{path:ds().array.isRequired}),mc=bc))||mc;const Nc=kc;function Ec(e){return Ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ec(e)}var Rc,Tc;function Dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ac(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ic(e,t){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ic(e,t)}function Mc(e,t){if(t&&("object"===Ec(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lc(e)}function Lc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bc(e){return Bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bc(e)}function Fc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uc={setDndPlacement:Ps,moveNode:De},zc=(0,v.$j)(null,Uc)((Tc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ic(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bc(r);if(o){var n=Bc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Mc(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Fc(Lc(t=i.call(this,e)),"getId",(function(){return t.props.rowId+"-column"})),Fc(Lc(t),"getDropTypes",(function(){return["column"]})),Fc(Lc(t),"getType",(function(){return"column"})),Fc(Lc(t),"renderColumn",(function(e,n){var r,o=t.props,i=o.path,a=o.children,l=o.formNode,s=o.formPath,c=o.device,u=o.copiedNode,p=o.dnd,f=o.isModalOpen,d=o.resize,h=o.responsive,m=a.length;return i=[].concat(function(e){if(Array.isArray(e))return Dc(e)}(r=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Dc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dc(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[n]),(0,y.jsx)(Ca,{children:(0,y.jsx)(Nc,{path:i,node:e,formNode:l,formPath:s,device:c,copiedNode:u,dnd:p,isModalOpen:f,resize:d,responsive:h,rowId:t.props.rowId,rowPath:t.props.rowPath,prentNodes:m})},e.id)})),Fc(Lc(t),"renderColumns",(function(e){return e.map((function(e,n){return t.renderColumn(e,n)}))})),Fc(Lc(t),"renderEmptyRow",(function(){return(0,y.jsxs)("div",{className:"qx-fb-area-blank",onDragOver:t.onDragOver,onDragLeave:t.onDragLeave,onDrop:t.onDrop,children:[(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-bottom-small qx-animation-fast",id:"".concat(t.props.rowId,"-drop-before")}),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-bottom-small qx-animation-fast",id:"".concat(t.props.rowId,"-drop-after")})," ",t.props.layoutTooltip]})})),Fc(Lc(t),"deviceListMapper",(function(e){return{lg:"desktop",md:"tablet",xs:"phone"}[e]})),Ls(Lc(t)),t}return t=a,n=[{key:"render",value:function(){var e=this.props.children,t=0===e.length;return(0,y.jsx)(y.Fragment,{children:t?this.renderEmptyRow():this.renderColumns(e)})}}],n&&Ac(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),Fc(Tc,"propTypes",{path:ds().array.isRequired,children:ds().array.isRequired}),Rc=Tc))||Rc;const Hc=zc;function Qc(e){var t=e.name;return t="1-1"===t?"1":t,(0,y.jsx)("div",{title:t,className:"qx-fb-col qx-fb-col-layout-".concat(t)})}function Wc(e){var t=e.onSelect,n=e.sizes,r=e.layout;return(0,y.jsx)("div",{className:"qx-padding-small qx-box-shadow-hover-small",onClick:function(){return t(n)},children:r.map((function(e,t){return(0,y.jsx)(Qc,{name:e.join("-")},t)}))})}function Gc(e){return Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gc(e)}var Jc;function Vc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zc(e,t){return Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zc(e,t)}function Xc(e,t){if(t&&("object"===Gc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yc(e)}function Yc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kc(e){return Kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kc(e)}function eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tu={changeRowLayout:Te},nu=(0,v.$j)(null,tu)(Jc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zc(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Kc(r);if(o){var n=Kc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Xc(this,e)});function a(){var e;Vc(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return eu(Yc(e=i.call.apply(i,[this].concat(n))),"handleSelectLayout",(function(t){var n=e.props.callbackParams,r=n.rowPath,o=n.index,i=n.ignoreRowNode,a=e.props.callback(r,o,i);e.props.changeRowLayout(a,t),jQuery(".qxui-popover").addClass("qxui-popover  qxui-popover-placement-top  qxui-popover-hidden")})),eu(Yc(e),"renderLayout",(function(t,n){var r=t.map((function(e){return e[0]/e[1]}));return(0,y.jsx)(Wc,{sizes:r,onSelect:e.handleSelectLayout,layout:t},n)})),e}return t=a,(n=[{key:"render",value:function(){return(0,y.jsx)(Vi.Z,{trigger:this.props.trigger,button:this.props.button,bottom:!0,dismissible:!1,className:"qxui-popover--col-layout",children:(0,y.jsx)("div",{className:"qx-new-column-layouts",children:Cn.map(this.renderLayout)})})}}])&&$c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Jc;nu.defaultProps={visible:ds().bool.isRequired,layouts:ds().object.isRequired};const ru=nu;function ou(e){return ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ou(e)}var iu,au;function lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function su(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(n),!0).forEach((function(t){mu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cu(e){return function(e){if(Array.isArray(e))return uu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return uu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uu(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fu(e,t){return fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fu(e,t)}function du(e,t){if(t&&("object"===ou(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hu(e)}function hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yu(e){return yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yu(e)}function mu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bu={addRowNode:Re,copyNode:Me,pasteNode:Le,pasteNodeStyle:Be,pasteNodeStyleSpecial:Fe,deleteNode:Ue,duplicateNode:Ae,showFormModal:Ss,setNodeVisibility:ze,forceColumnResize:function(e,t){return{type:N,payload:{path:e,size:t}}},setDndPlacement:Ps,moveNode:De},vu=(0,v.$j)(null,bu)((au=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fu(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yu(r);if(o){var n=yu(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return du(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),mu(hu(t=i.call(this,e)),"hash",lr()),mu(hu(t),"getId",(function(){var e;return null===(e=t.props.node)||void 0===e?void 0:e.id})),mu(hu(t),"getDropTypes",(function(){return["row"]})),mu(hu(t),"getType",(function(){return"row"})),mu(hu(t),"handleDrop",(function(e,n){var r=cu(t.props.path);if(n===$e)t.props.moveNode(e,cu(r));else{var o=r.pop();t.props.moveNode(e,[].concat(cu(r),[o+1]))}})),mu(hu(t),"shouldComponentUpdate",hc),mu(hu(t),"getDevice",(function(e){switch(e||t.props.device){case"md":return"tablet";case"xs":return"phone";default:return"desktop"}})),mu(hu(t),"loadRow",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(n||t.hash!==e.hash)&&(t.hash=e.hash,zr(e))})),mu(hu(t),"openSettingsModal",(function(){t.props.showFormModal(t.props.path,t.props.node)})),mu(hu(t),"deleteNode",(function(){t.props.deleteNode(t.props.path,"Row")})),mu(hu(t),"duplicateNode",(function(){t.props.duplicateNode(t.props.path,"Row")})),mu(hu(t),"copyNode",(function(){t.props.copyNode(t.props.path)})),mu(hu(t),"pasteNode",(function(){t.props.pasteNode(t.props.path)})),mu(hu(t),"handleAddRowClick",(function(){var e=t.props.path.slice(),n=e.pop()+1;t.props.addRowNode(e,n)})),mu(hu(t),"handleDuplicateClick",(function(){var e=t.props,n=e.path;(0,e.duplicateNode)(n,"Row")})),mu(hu(t),"goPro",(function(e){return window.open("https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=context-menu&utm_content=go-pro","_blank"),e})),mu(hu(t),"forceColumnResize",(function(){t.props.forceColumnResize(t.props.path)})),mu(hu(t),"enableVisibility",(function(){var e=t.props,n=e.setNodeVisibility,r=e.path,o=e.node.visibility,i=e.device;n(r,su(su({},o),{},mu({},i,!0)))})),mu(hu(t),"rowContextMenu",(function(){var e,n;return qs(hu(t))?((null===(e=t.props.copiedNode)||void 0===e?void 0:e.id)!==t.props.node.id&&(wt.ck,t.copyNode),(null===(n=t.props.copiedNode)||void 0===n?void 0:n.slug)===t.props.node.slug&&(wt.ck,t.pasteNode),(0,y.jsxs)(wt.v2,{id:t.state.id,theme:wt.dw.light,style:{zIndex:99999},children:[(0,y.jsx)(wt.ck,{disabled:!0,title:"Row",children:"Row"},"title"),(0,y.jsxs)(wt.ck,{onClick:t.openSettingsModal,children:[(0,y.jsx)("i",{className:"qxuicon-cog"})," Settings"]}),(0,y.jsxs)(wt.ck,{onClick:t.handleAddRowClick,children:[(0,y.jsx)("i",{className:"qxuicon-plus"})," Add"]}),(0,y.jsxs)(wt.ck,{onClick:t.duplicateNode,children:[(0,y.jsx)("i",{className:"qxuicon-clone"})," Duplicate"]}),(0,y.jsx)(wt.Z0,{}),mn(hu(t)),(0,y.jsx)(wt.Z0,{}),(0,y.jsxs)(wt.ck,{onClick:t.forceColumnResize,children:[(0,y.jsx)("i",{className:"qxuicon-columns"})," Grid Reset"]}),dn(hu(t)),(0,y.jsx)(wt.Z0,{}),(0,y.jsxs)(wt.ck,{onClick:t.deleteNode,children:[(0,y.jsx)("i",{className:"qxuicon-trash-alt"})," Delete"]}),null,null]})):(0,y.jsx)(wt.v2,{id:t.state.id,theme:wt.dw.light,style:{zIndex:99999},children:dn(hu(t))})})),mu(hu(t),"renderSettings",(function(e){var n=qs(hu(t)),r=null;t.props.hidePlusIcon||(r=(0,y.jsx)("div",{className:"qx-fb-button--add",children:(0,y.jsx)(p.default,{type:"primary",shape:"circle","qx-tooltip":"Add New Row",onClick:t.handleAddRowClick,children:(0,y.jsx)("i",{className:"qxuicon-plus"})})}));var o=n?(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Row Settings",onClick:t.openSettingsModal,children:(0,y.jsx)("i",{className:"qxuicon-cog"})},e+"-settings"):"",i=n?(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Delete Row",onClick:t.deleteNode,children:(0,y.jsx)("i",{className:"qxio-close qx-light"})},e+"-delete"):"";return(0,y.jsxs)("div",{className:"qx-fb-settings-wrap",children:[(0,y.jsxs)(cs.default,{size:1,className:"qx-fb-settings qx-fb-settings--row",children:[o,(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Options",onClick:function(e){e.stopPropagation(),t.menu.handleEvent&&t.menu.handleEvent(e)},children:(0,y.jsx)("i",{className:"qxuicon-bars"})}),(0,y.jsx)(p.default,{type:"text",size:"small",draggable:!0,onDragStart:t.startDrag,"data-qx-tooltip":"Move Row",children:(0,y.jsx)("i",{className:"qxuicon-arrows"})}),i]}),r]})})),Ls(hu(t)),t.state={needPasteOption:!1,enableEdit:!1,rowRawHtml:"",rowRawStyle:"",id:lr("qx-row-id-"),btnId:lr("btn-id-"),field:{}},t}return t=a,n=[{key:"componentDidMount",value:function(){jQuery("#"+this.state.btnId).click(),this.loadRow(this.props.node,!0)}},{key:"componentDidUpdate",value:function(e,t,n){this.loadRow(this.props.node)}},{key:"render",value:function(){var e=this,t=this.props,n=t.node,r=n.children,o=n.form,i=t.device,a=t.formNode,l=t.formPath,s=t.copiedNode,u=t.dnd,f=t.isModalOpen,d=t.isDragging,h=t.resize,m=t.responsive,b=t.path,v=qs(this);b=[].concat(cu(b),["children"]);var g=o.advanced.identifier.id,x=Ve()("qx-fb-row",{"qx-fb-dragging":d,"qx-fb-no-column":r.length,"qx-fb-disabled":!v}),j=(Ve()({"qx-fb-disabled":!v}),Ve()("qx-row",{"qx-no-gutters":"no-gutters"===o.general.layout_fields_group.columns_gap,"qx-flex-md-row qx-flex-column-reverse":!0===o.general.layout_fields_group.mobile_reverse},this.state.field.class?this.state.field.class:"",o.general.layout_fields_group.v_align)),w=[(0,y.jsx)(c.default,{"qx-tooltip":"Add Column",placement:"bottom",children:(0,y.jsx)(p.default,{id:this.state.btnId,type:"primary",shape:"circle",children:(0,y.jsx)("i",{className:"qxuicon-plus"})},this.state.btnId+"-button")},this.state.btnId+"-tolltip")],O=(0,y.jsx)(ru,{deleteNode:this.deleteNode,trigger:"click",callback:this.props.callback,callbackParams:{rowPath:this.props.rowPath,index:this.props.index,ignoreRowNode:!0},button:w}),_=null;if(!_t(o.styles.background_overlay_fields_group.background_overlay)){var S="qx-background-overlay "+g+"-background-overlay";_=(0,y.jsx)("div",{className:S})}var P=o.styles.background_fields_group.background;if(!_t(P)&&!_t(P.state.normal.properties.parallax_method)&&"js"===P.state.normal.properties.parallax_method){var q={};_t(P.state.normal.properties.js_parallax_y)||(q.bgy=P.state.normal.properties.js_parallax_y),_t(P.state.normal.properties.js_parallax_x)||(q.bgx=P.state.normal.properties.js_parallax_x),setTimeout((function(){qxUIkit.parallax("#"+g,q)}),2e3)}return(0,y.jsxs)("div",{className:x,children:[(0,y.jsxs)(_s,{id:this.state.id,menu:function(t){return e.menu=t},children:[this.renderSettings(g),(0,y.jsx)("div",{id:g,className:"qx-row-wrap",children:(0,y.jsxs)("div",{className:j,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop,children:[(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder",id:"".concat(this.getId(),"-drop-before")}),_,(0,y.jsx)(Ca,{children:(0,y.jsx)(Hc,{nested:!!this.props.elementPath,rowPath:this.props.path,layoutTooltip:O,path:b,formNode:a,formPath:l,copiedNode:s,dnd:u,isModalOpen:f,device:i,resize:h,responsive:m,children:r,rowId:g})}),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder",id:"".concat(this.getId(),"-drop-after")})]})})]}),this.rowContextMenu()]})}}],n&&pu(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),mu(au,"propTypes",{path:ds().array.isRequired}),mu(au,"defaultProps",{hidePlusIcon:!1}),iu=au))||iu;const gu=vu;function xu(e){return xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xu(e)}var ju,wu;function Ou(e){return function(e){if(Array.isArray(e))return _u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Su(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pu(e,t){return Pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pu(e,t)}function qu(e,t){if(t&&("object"===xu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Cu(e)}function Cu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ku(e){return ku=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ku(e)}function Nu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Eu={addRowNode:Re,changeRowLayout:Te,duplicateNode:Ae,setDndPlacement:Ps,moveNode:De},Ru=(0,v.$j)(null,Eu)((wu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pu(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ku(r);if(o){var n=ku(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return qu(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Nu(Cu(t=i.call(this,e)),"getId",(function(){return t.props.sectionId+"-row"})),Nu(Cu(t),"getDropTypes",(function(){return["row"]})),Nu(Cu(t),"getType",(function(){return"row"})),Nu(Cu(t),"handleDrop",(function(e,n){var r=Ou(t.props.path);t.props.moveNode(e,[].concat(Ou(r),[0]))})),Nu(Cu(t),"handleAddRowClick",(function(e,n,r){return e=e.slice(),r||t.props.addRowNode(e,n),[].concat(Ou(e),[n,"children"])})),Nu(Cu(t),"renderEmptySection",(function(){return(0,y.jsx)("div",{className:"qx-fb-area-blank",onDragOver:t.onDragOver,onDragLeave:t.onDragLeave,onDrop:t.onDrop,children:(0,y.jsx)(ru,{trigger:"click",callback:t.handleAddRowClick,callbackParams:{rowPath:t.props.path,index:0},button:[(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder",id:"".concat(t.getId(),"-drop-before")},"placeholder-before"),(0,y.jsx)(c.default,{title:"Add Columns",children:(0,y.jsx)(p.default,{id:t.getId()+"-button",type:"primary",shape:"circle",children:(0,y.jsx)("i",{className:"qxuicon-plus"})},"button")},"tooltip"),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder",id:"".concat(t.getId(),"-drop-after")},"placeholder-after")]})})})),Nu(Cu(t),"renderRow",(function(e,n){var r=t.props,o=r.path,i=r.formNode,a=r.formPath,l=r.copiedNode,s=r.device,c=r.dnd,u=r.isModalOpen,p=r.resize,f=r.responsive,d=[].concat(Ou(o),[n]);return(0,y.jsx)(Ca,{children:(0,y.jsx)(gu,{hidePlusIcon:t.props.hidePlusIcon,elementPath:t.props.elementPath,path:d,node:e,formNode:i,formPath:a,device:s,copiedNode:l,dnd:c,isModalOpen:u,index:n,resize:p,responsive:f,callback:t.handleAddRowClick,rowPath:t.props.path})},e.id)})),Ls(Cu(t)),t}return t=a,n=[{key:"componentDidMount",value:function(){var e=this;_r().then((function(t){var n;null===(n=Dr(e.getId()+"-button",t))||void 0===n||n.click()}))}},{key:"render",value:function(){var e=this.props.children,t=0===e.length;return(0,y.jsx)("div",{className:"qx-fb-rows",children:t?this.renderEmptySection():e.map(this.renderRow)})}}],n&&Su(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),Nu(wu,"propTypes",{path:ds().array.isRequired,children:ds().array.isRequired}),ju=wu))||ju;const Tu=Ru;var Du,Au,Iu=n(46013);function Mu(e){return Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mu(e)}function Lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(n),!0).forEach((function(t){Ju(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fu(e){return function(e){if(Array.isArray(e))return Uu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Uu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uu(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hu(e,t){return Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hu(e,t)}function Qu(e,t){if(t&&("object"===Mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wu(e)}function Wu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gu(e){return Gu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gu(e)}function Ju(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vu={addSectionNode:Ee,copyNode:Me,pasteNode:Le,pasteNodeStyle:Be,pasteNodeStyleSpecial:Fe,duplicateNode:Ae,deleteNode:Ue,setNodeVisibility:ze,showFormModal:Ss,setDndPlacement:Ps,moveNode:De,invokeTemplateModal:Pe,invokeSectionSaveModal:Oe},$u=(0,v.$j)(null,Vu)((Au=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hu(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Gu(r);if(o){var n=Gu(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qu(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Ju(Wu(t=i.call(this,e)),"hash",lr()),Ju(Wu(t),"getId",(function(){return t.props.node.id})),Ju(Wu(t),"getDropTypes",(function(){return["section"]})),Ju(Wu(t),"getType",(function(){return"section"})),Ju(Wu(t),"handleDrop",(function(e,n){var r=Fu(t.props.path);if(n===$e)t.props.moveNode(e,Fu(r));else{var o=r.pop();t.props.moveNode(e,[].concat(Fu(r),[o+1]))}})),Ju(Wu(t),"shouldComponentUpdate",hc),Ju(Wu(t),"showBlocks",(function(){var e=+t.props.path.slice().pop()+1;t.props.invokeTemplateModal([e])})),Ju(Wu(t),"addSectionNode",(function(){t.props.addSectionNode(t.props.index)})),Ju(Wu(t),"deleteNode",(function(){t.props.deleteNode(t.props.path,"Section")})),Ju(Wu(t),"duplicateNode",(function(){t.props.duplicateNode(t.props.path,"Section")})),Ju(Wu(t),"copyNode",(function(){t.props.copyNode(t.props.path)})),Ju(Wu(t),"pasteNode",(function(){t.props.pasteNode(t.props.path)})),Ju(Wu(t),"goPro",(function(e){return window.open("https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=context-menu&utm_content=go-pro","_blank"),e})),Ju(Wu(t),"settingsNode",(function(){t.props.showFormModal(t.props.path,t.props.node)})),Ju(Wu(t),"handleAddSectionClick",(function(e){var n=+t.props.path.slice().pop()+1;return t.props.addSectionNode(n),e})),Ju(Wu(t),"handleUpdateTitle",(function(e){return(0,t.props.updateTitle)(e.target.value),e})),Ju(Wu(t),"showModal",(function(){t.props.invokeSectionSaveModal(t.props.path)})),Ju(Wu(t),"renderRows",(function(){var e=t.props,n=e.node,r=n.children,o=n.id,i=e.formNode,a=e.formPath,l=e.device,s=e.copiedNode,c=e.dnd,u=e.isModalOpen,p=e.resize,f=e.responsive,d=[].concat(Fu(t.props.path),["children"]);return(0,y.jsx)(Tu,{path:d,formNode:i,formPath:a,device:l,copiedNode:s,dnd:c,isModalOpen:u,resize:p,responsive:f,children:r,sectionId:o})})),Ju(Wu(t),"enableVisibility",(function(){var e=t.props,n=e.setNodeVisibility,r=e.path,o=e.node.visibility,i=e.device;n(r,Bu(Bu({},o),{},Ju({},i,!0)))})),Ju(Wu(t),"renderSettings",(function(e,n){var r=qs(Wu(t)),o=r?(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Section Settings",onClick:t.settingsNode,children:(0,y.jsx)("i",{className:"qxuicon-cog"})},n+"-settings"):"",i=r?(0,y.jsx)(p.default,{type:"text",size:"small","qx-tooltip":"Delete Section",onClick:t.deleteNode,children:(0,y.jsx)("i",{className:"qxio-close qx-light"})},n+"-delete"):"";return(0,y.jsx)("div",{className:"qx-fb-settings-wrap",children:(0,y.jsxs)(cs.default,{size:1,className:"qx-fb-settings qx-fb-settings--section",children:[o,(0,y.jsx)(p.default,{type:"text",size:"small",className:"contextMenu-dropdown","qx-tooltip":"Options",onClick:function(e){e.stopPropagation(),t.menu.handleEvent(e)},children:(0,y.jsx)("i",{className:"qxuicon-bars"})}),(0,y.jsx)(p.default,{type:"text",size:"small",className:"cursor-move",draggable:!0,onDragStart:t.startDrag,"data-qx-tooltip":"Move Section",children:(0,y.jsx)("i",{className:"qxuicon-arrows"})}),i]})})})),window.contextMenu={needPasteOption:!1},Ls(Wu(t)),t.state={id:lr("qx"),needPasteOption:window.contextMenu.needPasteOption,enableEdit:!1,sectionRawStyle:"",sectionRawHtml:{class:""},field:{},style:{},modalId:null},t}return t=a,n=[{key:"componentDidMount",value:function(){this.loadSection(this.props.node,!0)}},{key:"componentDidUpdate",value:function(e,t,n){this.loadSection(this.props.node)}},{key:"componentWillUnmount",value:function(){jQuery(this.state.modalId).remove()}},{key:"loadSection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t||this.hash!==e.hash){this.hash=e.hash,zr(e);var n={};if(e.form.general.layout_fields_group.section_stretch){var r=jQuery(window).width(),o=jQuery("html").attr("dir"),i=Iu.findDOMNode(this).getBoundingClientRect().left;n={position:"relative",width:r},"rtl"===o?n.marginRight=i:n.marginLeft=-i,this.setState({style:n})}else this.setState({style:{}})}}},{key:"sectionContextMenu",value:function(){return qs(this)?(0,y.jsxs)(wt.v2,{id:this.state.id,theme:wt.dw.light,style:{zIndex:99999},children:[(0,y.jsx)(wt.ck,{disabled:!0,title:"Section",children:"Section"},"title"),(0,y.jsxs)(wt.ck,{onClick:this.settingsNode,children:[(0,y.jsx)("i",{className:"qxuicon-cog"}),"Settings"]}),(0,y.jsxs)(wt.ck,{onClick:this.addSectionNode,children:[(0,y.jsx)("i",{className:"qxuicon-plus"}),"Add"]}),(0,y.jsxs)(wt.ck,{onClick:this.duplicateNode,children:[(0,y.jsx)("i",{className:"qxuicon-clone"}),"Duplicate"]}),(0,y.jsx)(wt.Z0,{}),mn(this),(0,y.jsx)(wt.Z0,{}),(0,y.jsxs)(wt.ck,{onClick:this.showModal,children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-save"}),"Save"]}),(0,y.jsx)(wt.Z0,{}),dn(this),(0,y.jsx)(wt.Z0,{}),(0,y.jsxs)(wt.ck,{onClick:this.deleteNode,children:[(0,y.jsx)("i",{className:"qxuicon-trash-alt"}),"Delete"]}),null,null]}):(0,y.jsx)(wt.v2,{id:this.state.id,theme:wt.dw.light,style:{zIndex:99999},children:dn(this)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.isDragging,o=t.node.form,i=qs(this),a=o.advanced.identifier.id,l=0===(null==n?void 0:n.length),s=document.getElementById("jform_template_type")||!1;s&&(s=s.value);var c=(0,y.jsxs)("div",{className:"qx-fb-new-section-btns qx-fb-new-section-group qx-padding-small qx-flex qx-flex-center",children:[(0,y.jsx)(p.default,{type:"primary",onClick:this.handleAddSectionClick,children:"Add Section"}),(0,y.jsx)(p.default,{id:"quix-builder-add-template-cta",className:"qx-margin-small-left",onClick:function(){return e.showBlocks(e.props.path)},children:"Add Templates"})]});if(!a||"object"===Mu(a))return console.warn("Section rendering problem found!",this.props.node),(0,y.jsx)("div",{className:"qx-alert qx-alert-danger",children:(0,y.jsx)("h3",{children:"Section rendering problem found! check console for details."})});var u=Ve()("qx-fb-section",{"qx-fb-empty-section":l,"qx-fb-dragging":r,"qx-fb-disabled":!i}),f=o.styles.background_fields_group.background,d=Ve()("qx-section",{"qx-section--stretch":o.general.layout_fields_group.section_stretch,"qx-section-height-full":"full"===o.general.layout_fields_group.height,"qx-section-height-custom":"custom"===o.general.layout_fields_group.height,"qx-cover-container":"video"===f.state.normal.type,"qx-section-has-divider":"none"!==o.styles.divider_top_fields_group.top_divider_style||"none"!==o.styles.divider_bottom_fields_group.bottom_divider_style},this.state.field.class?this.state.field.class.value:""),h=(Ve()({"qx-fb-disabled":!i}),o.advanced.identifier.class),m="qx-container";"fluid"!==o.general.layout_fields_group.container_type&&"custom"!==o.general.layout_fields_group.container_type||(m="qx-container-fluid"),("full"===o.general.layout_fields_group.height||"custom"===o.general.layout_fields_group.height&&!_t(o.general.layout_fields_group.v_align))&&(m+=" "+o.general.layout_fields_group.v_align);var b=ps(o.styles.divider_top_fields_group.top_divider_style),v=ps(o.styles.divider_bottom_fields_group.bottom_divider_style),g="none"!==o.styles.divider_top_fields_group.top_divider_style?(0,y.jsx)("div",{className:"qx-shape qx-shape-top",dangerouslySetInnerHTML:{__html:b}}):"",x="none"!==o.styles.divider_bottom_fields_group.bottom_divider_style?(0,y.jsx)("div",{className:"qx-shape qx-shape-bottom",dangerouslySetInnerHTML:{__html:v}}):"",j=null;_t(o.styles.background_fields_group.background)||(j="video"===f.state.normal.type?(0,y.jsx)("video",{className:"qx-background-video",src:f.state.normal.properties.url.source,autoPlay:"",loop:"",muted:"",playsInline:"","data-qx-cover":"","data-qx-video":"automute: true;autoplay: inview"}):null);var w=null;if(!_t(o.styles.background_overlay_fields_group.background_overlay)){var O="qx-background-overlay ".concat(o.advanced.identifier.id,"-background-overlay");w=(0,y.jsx)("div",{className:O})}var _={};_t(o.styles.background_fields_group.background)||_t(o.styles.background_fields_group.background.state.normal.properties.parallax_method)||"js"===o.styles.background_fields_group.background.state.normal.properties.parallax_method&&(_t(o.styles.background_fields_group.background.state.normal.properties.js_parallax_y)||(_.bgy=o.styles.background_fields_group.background.state.normal.properties.js_parallax_y),_t(o.styles.background_fields_group.background.state.normal.properties.js_parallax_x)||(_.bgx=o.styles.background_fields_group.background.state.normal.properties.js_parallax_x));var S="";void 0!==(null==_?void 0:_.bgx)&&(S="bgy:".concat(null==_?void 0:_.bgy,";bgx:").concat(null==_?void 0:_.bgx));var P="section"!==s?this.props.size-1===this.props.index?c:null:(0,y.jsxs)("div",{className:"qx-alert qx-alert-danger qx-text-center",children:["For ",(0,y.jsx)("strong",{children:"Section"})," Template, More then one section is not allowed. Please Create a Layout template, If you want multiple section."]});return(0,y.jsxs)("div",{children:[(0,y.jsxs)("div",{id:"".concat(a,"-wrapper"),className:u,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop,children:[(0,y.jsx)(_s,{id:this.state.id,menu:function(t){return e.menu=t},children:(0,y.jsxs)("div",{id:a,className:[d,h].join(" "),style:this.state.style,"data-qx-parallax":S,children:[this.renderSettings(a),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-top-small qx-animation-fast",id:"".concat(this.getId(),"-drop-before")}),j,w,g,x,(0,y.jsx)("div",{className:m,children:this.renderRows()}),(0,y.jsx)("div",{className:"qx-hidden qx-fb-drop-placeholder qx-scrollspy-inview qx-animation-slide-top-small qx-animation-fast",id:"".concat(this.getId(),"-drop-after")})]})}),this.sectionContextMenu()]}),P]})}}],n&&zu(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),Ju(Au,"propTypes",{path:ds().array.isRequired}),Du=Au))||Du;const Zu=$u;function Xu(e){return Xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xu(e)}var Yu;function Ku(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tp(e,t){return tp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tp(e,t)}function np(e,t){if(t&&("object"===Xu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rp(e){return rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rp(e)}var op={addSectionNode:Ee,invokeTemplateModal:Pe};const ip=(0,v.$j)(null,op)(Yu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tp(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rp(r);if(o){var n=rp(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return np(this,e)});function a(){return Ku(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this;return(0,y.jsxs)("div",{className:"qx-fb-blank-page__section qx-container",style:{border:"1px dashed rgb(185,186,185, 1)",padding:"40px",lineHeight:"1.5"},children:[(0,y.jsxs)("div",{children:[(0,y.jsxs)("h1",{className:"qx-h3 qx-text-bold",children:["Create a new Section",(0,y.jsx)("em",{className:"qx-text-small qx-display-block qx-text-muted",children:"or Import from Templates"})]}),(0,y.jsx)("p",{className:"qx-lead qx-margin-bottom-large",children:"Start designing by adding Section, Columns (with Container) and Elements"}),(0,y.jsx)("div",{className:"qx-margin qx-padding",style:{borderBottom:"1px dashed rgb(185,186,185, 1)",marginBottom:"40px"},children:(0,y.jsxs)("div",{className:"qx-fb-section__empty qx-fb-new-section-group",children:[(0,y.jsxs)(p.default,{type:"primary",size:"large",onClick:function(){return e.props.addSectionNode()},children:[(0,y.jsx)("i",{className:"qxuicon-plus"}),"Add Section"]}),(0,y.jsxs)(p.default,{size:"large",onClick:function(){return e.props.invokeTemplateModal([0])},children:[(0,y.jsx)("i",{className:"qxuicon-columns"}),"Add Template"]})]})})]}),(0,y.jsx)("div",{className:"qx-container-fluid",style:{fontSize:"14px"},children:(0,y.jsxs)("div",{className:"qx qx-grid qx-text-left qx-child-width-1-2","qx-grid":"",children:[(0,y.jsx)("div",{className:"qx-first-column",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("h4",{className:"qx-h4",children:"Control Icons"}),(0,y.jsxs)("ul",{className:"qx-list qx-margin-remove-left",style:{columnCount:"2"},children:[(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-clipboard"}),"Copy"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-trash-alt"}),"Delete"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-arrows"}),"Move"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-low-vision"}),"Disable"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-clone"}),"Duplicate"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-save"}),"Save as Library"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-columns"}),"Grid Reset"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-eye-dropper"}),"Copy Style"]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-bars"}),"Context Menu"]})]})]})}),(0,y.jsx)("div",{children:(0,y.jsxs)("div",{className:"qx-grid qx-child-width-1-2","qx-grid":"",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h4",{className:"qx-h4",children:"Quix Guide"}),(0,y.jsxs)("ul",{className:"qx-list qx-margin-remove-left",children:[(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-angle-right"}),(0,y.jsx)("a",{href:"https://www.themexpert.com/docs/quix-builder/basics",target:"_blank",children:"Quix Basic"})]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-angle-right"}),(0,y.jsx)("a",{href:"https://www.themexpert.com/docs/quix-builder/features",target:"_blank",children:"Features"})]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-angle-right"}),(0,y.jsx)("a",{href:"https://www.themexpert.com/docs/quix-builder/seo",target:"_blank",children:"SEO"})]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-angle-right"}),(0,y.jsx)("a",{href:"https://www.themexpert.com/docs/quix-builder/optimization",target:"_blank",children:"QuixRank"})]})]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h4",{className:"qx-h4",children:"Resources"}),(0,y.jsx)("a",{href:"https://www.themexpert.com/video-tutorials",children:(0,y.jsx)("img",{src:it()+"media/quixnxt/images/banners/thumb_video.jpg",style:{backgroundColor:"purple",width:"190px"},alt:"Welcome to Quix"})})]})]})})]})})]})}}])&&ep(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Yu;function ap(e){return ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ap(e)}var lp;function sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function up(e,t){return up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},up(e,t)}function pp(e,t){if(t&&("object"===ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fp(e)}function fp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dp(e){return dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dp(e)}function hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yp={addSectionNode:Ee,invokeTemplateModal:Pe},mp=(0,v.$j)((function(e){var t=e.meta.qid,n=e.nodes,r=n.nodes,o=n.device,i=n.responsive,a=n.clipboard.node,l=n.resize,s=e.form,c=s.node,u=s.path,p=e.action.action;return{responsive:i,formPath:u,formNode:c,copiedNode:a,device:o,dnd:e.dnd,qid:t,isModalOpen:!(null==c||!c.id),resize:l,sections:r,action:p}}),yp)(lp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&up(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=dp(r);if(o){var n=dp(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return pp(this,e)});function a(){var e;sp(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return hp(fp(e=i.call.apply(i,[this].concat(n))),"shouldComponentUpdate",_o()),hp(fp(e),"addBodyClass",(function(){_r().then((function(t){0===e.props.sections.length?t.querySelector(".app-mount").classList.add("qx-fb-blank-page"):t.querySelector(".app-mount").classList.remove("qx-fb-blank-page")}))})),hp(fp(e),"renderSection",(function(t,n){var r=e.props,o=r.sections,i=r.formNode,a=r.formPath,l=r.device,s=r.copiedNode,c=r.dnd,u=r.isModalOpen,p=r.resize,f=r.responsive,d=r.qid;return(0,y.jsx)(Ca,{children:(0,y.jsx)(Zu,{size:o.length,path:[n],index:n,node:t,formNode:i,formPath:a,device:l,copiedNode:s,dnd:c,isModalOpen:u,resize:p,responsive:f,qid:d})},t.id)})),hp(fp(e),"renderSections",(function(t){return t.map(e.renderSection)})),e}return t=a,n=[{key:"componentDidMount",value:function(){this.addBodyClass()}},{key:"componentDidUpdate",value:function(e,t,n){e.sections.length!==this.props.sections.length&&this.addBodyClass()}},{key:"render",value:function(){var e=this.props.sections;return 0===e.length?(0,y.jsx)(ip,{}):(0,y.jsx)("div",{children:this.renderSections(e)})}}],n&&cp(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||lp;const bp=mp;n(33322);var vp=n(11597);function gp(e){return gp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gp(e)}function xp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wp(e,t){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wp(e,t)}function Op(e,t){if(t&&("object"===gp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _p(e){return _p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_p(e)}const Sp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wp(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_p(r);if(o){var n=_p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Op(this,e)});function a(){return xp(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){return(0,y.jsxs)("div",{className:"qx-section-fluid qx-p-5 qx-card qx-card-body",children:[(0,y.jsx)(l.default,{prefixCls:"qxui-progress",strokeColor:{from:"#108ee9",to:"#87d068"},percent:99.99,status:"active",showInfo:!1}),(0,y.jsx)("h1",{className:"qx-text-center qx-mt-5",children:"Building your Layouts"}),(0,y.jsx)("p",{className:"qx-text-center qx-m-1 qx-text-muted",children:"Please wait for a moment, awesome things are happening here..."}),(0,y.jsx)("hr",{}),(0,y.jsx)("div",{style:{marginLeft:"-30px"},children:(0,y.jsx)(vp.default,{title:!1,active:!0,paragraph:{rows:4}})})]})}}])&&jp(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);function Pp(e){return Pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pp(e)}function qp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cp(e,t){return Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cp(e,t)}function kp(e,t){if(t&&("object"===Pp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Np(e)}function Np(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ep(e){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ep(e)}var Rp=ol.default.Option;const Tp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cp(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ep(r);if(o){var n=Ep(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return kp(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o={accessListArray:[]},(r="state")in(n=Np(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t}return t=a,(n=[{key:"UNSAFE_componentWillMount",value:function(){for(var e=document.getElementById("jform_access").options,t=[],n=e.length,r=0;r<n;r++)""!=e[r].value&&t.push({text:e[r].text,value:e[r].value});this.setState({accessListArray:t})}},{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.value;return(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:n}),(0,y.jsx)(ol.default,{label:n,defaultValue:"1",value:r,style:{width:"100%"},onChange:function(t){return e.props.onChange(t)},onReset:function(){return e.props.onChange("")},prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:this.state.accessListArray.map((function(e){return(0,y.jsx)(Rp,{children:e.text},e.value)}))})]})}}])&&qp(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);n(817);var Dp=n(1009);function Ap(e){return Ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ap(e)}function Ip(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lp(e,t){return Lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lp(e,t)}function Bp(e,t){if(t&&("object"===Ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fp(e)}function Fp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Up(e){return Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Up(e)}function zp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hp=Xo.default.Group,Qp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lp(e,t)}(l,e);var t,n,r,o,i=(r=l,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Up(r);if(o){var n=Up(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Bp(this,e)});function l(){var e;Ip(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return zp(Fp(e=i.call.apply(i,[this].concat(n))),"state",{visible:!1}),zp(Fp(e),"onChange",(function(t,n){void 0!==e.props.url&&"url"===t&&e.props.onChange({text:e.props.text,url:n,target:e.props.target,nofollow:e.props.nofollow})})),zp(Fp(e),"onNoFollowChange",(function(t){var n=!1;t.target.checked&&(n=!0),e.props.onChange({target:e.props.target,url:e.props.url,nofollow:n})})),zp(Fp(e),"onTargetChange",(function(t){var n="";t.target.checked&&(n=t.target.value),e.props.onChange({target:n,url:e.props.url,nofollow:e.props.nofollow})})),zp(Fp(e),"renderUrl",(function(t){return(0,y.jsx)(Xo.default,{label:"URL",placeholder:"https://www.yoursite.com",value:t,"data-for":"link-url",prefixCls:"qxui-input",onChange:function(t){e.onChange("url",t.target.value,Fp(e))}})})),zp(Fp(e),"getLabelMarkup",(function(){var t=e.props.label;return(0,y.jsx)("span",{children:t})})),zp(Fp(e),"getHelpMarkup",(function(){var t=e.props.help;if(t)return(0,y.jsx)(Vi.Z,{content:t,placement:"right",popupStyle:{width:"300px"},children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-question-circle"})})})})),zp(Fp(e),"getOptions",(function(){var t=e.props,n=t.target,r=t.nofollow;return(0,y.jsxs)(a.default,{prefixCls:"qxui-menu",children:[(0,y.jsx)(a.default.Item,{children:(0,y.jsx)(Dp.default,{checked:"new_window"===n,onChange:function(t){return e.onTargetChange(t)},value:"new_window",children:"Open in new window"})},"target"),(0,y.jsx)(a.default.Item,{children:(0,y.jsx)(Dp.default,{checked:r,onChange:function(t){return e.onNoFollowChange(t)},value:"nofollow",children:"Add nofollow"})},"nofollow")]})})),zp(Fp(e),"handleVisibleChange",(function(t){e.setState({visible:t})})),e}return t=l,(n=[{key:"render",value:function(){var e=this.props.url;return(0,y.jsxs)("div",{className:"qx-fb-field-link",children:[(0,y.jsxs)("div",{className:"qx-fb-field__label qx-flex qx-flex-middle",children:[this.getLabelMarkup(),this.getHelpMarkup()]}),(0,y.jsxs)(Hp,{children:[void 0===e?null:this.renderUrl(e),(0,y.jsx)(u.default,{overlay:this.getOptions(),placement:"bottomRight",prefixCls:"qxui-dropdown",onVisibleChange:this.handleVisibleChange,visible:this.state.visible,getPopupContainer:function(){return window.document.body},children:(0,y.jsx)(p.default,{style:{width:"10%",padding:"0"},children:(0,y.jsx)("i",{className:"qxuicon-cog"})})})]})]})}}])&&Mp(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(b.Component);Qp.propTypes={label:ds().string,url:ds().string,target:ds().string};const Wp=Qp;n(70883);var Gp=n(6347),Jp=n(49323),Vp=n.n(Jp),$p=n(71811),Zp=n.n($p),Xp=(n(67801),n(58404)),Yp=(n(17585),n(60761)),Kp=n(45854),ef=n.n(Kp),tf=n(32112),nf=n.n(tf);const rf=function(e){e.getTabName=function(){return"mobile"===dt("qx-device")?"phone":dt("qx-device")}};function of(e){return of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},of(e)}function af(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?af(Object(n),!0).forEach((function(t){df(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):af(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cf(e,t){return cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cf(e,t)}function uf(e,t){if(t&&("object"===of(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pf(e)}function pf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ff(e){return ff=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ff(e)}function df(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cf(e,t)}(i,e);var t,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ff(n);if(r){var o=ff(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return uf(this,e)});function i(){var e;sf(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return df(pf(e=o.call.apply(o,[this].concat(n))),"onResponsive",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setState(lf({responsive:!e.state.responsive,tab:e.state.tab},t))})),df(pf(e),"getPlaceholder",(function(t){var n,r=e.props.value;return null!==(n=r)&&void 0!==n&&n.desktop&&(r=r.desktop),r[t]||St(t)})),df(pf(e),"getResponsiveTogglePreview",(function(){if(!e.props.responsive)return null;var t=(0,y.jsxs)(a.default,{onClick:function(t){var n=t.key;e.props.setDevice(Pt(n))},className:"qx-text-center",children:[(0,y.jsx)(a.default.Item,{children:(0,y.jsx)("span",{className:"qxuicon-desktop"})},"Desktop"),(0,y.jsx)(a.default.Item,{children:(0,y.jsx)("span",{className:"qxuicon-tablet"})},"Tablet"),(0,y.jsx)(a.default.Item,{children:(0,y.jsx)("span",{className:"qxuicon-mobile"})},"Phone")]}),n="phone"===e.props.device?"mobile":e.props.device;return(0,y.jsx)(u.default,{overlay:t,trigger:"click",children:(0,y.jsx)(p.default,{size:"small",type:"text",className:"device-"+n,children:(0,y.jsx)("span",{className:"qxuicon-"+n})})})})),df(pf(e),"getUnitMarkup",(function(){var t=e.props,n=t.units,r=t.value,o=t.suffix;if(void 0===n)return null;if(!1===n||null===n)return o?(0,y.jsx)("div",{className:"qxui-units-switcher",children:(0,y.jsx)("span",{className:"qxui-units__value",children:o})}):null;n=n||["%","px"];var i=(0,y.jsx)(a.default,{onClick:function(t){var n=t.key;e.onUnitChange(n)},children:n.map((function(e){return(0,y.jsxs)(a.default.Item,{children:[" ",e," "]},e)}))});return(0,y.jsxs)("div",{className:"qxui-units-switcher",children:[(0,y.jsx)("span",{className:"qxui-units__value",children:null==r?void 0:r.unit}),n.length>1?(0,y.jsx)(u.default,{overlay:i,trigger:["click"],children:(0,y.jsx)(p.default,{size:"small",type:"link",children:(0,y.jsx)("span",{className:"qxuicon-ellipsis-h-alt"})})}):null]})})),df(pf(e),"getLabelMarkup",(function(){var t=e.props.label;return(0,y.jsx)("div",{className:"qx-fb-field-label-group",children:(0,y.jsxs)("div",{className:"qx-fb-field__label qx-flex qx-flex-between",children:[(0,y.jsxs)("div",{className:"qx-flex qx-flex-middle",children:[(0,y.jsx)("span",{children:t}),e.getHelpMarkup(),e.getResponsiveTogglePreview(),e.getResetMarkup()]}),(0,y.jsx)("div",{children:e.getUnitMarkup()})]})})})),df(pf(e),"getHelpMarkup",(function(){var t=e.props.help;if(t)return(0,y.jsx)(Vi.Z,{content:t,placement:"right",popupStyle:{width:"300px"},children:(0,y.jsx)(p.default,{size:"small",type:"text",style:{paddingRight:"2px"},children:(0,y.jsx)("i",{className:"qxuicon-question-circle"})})})})),df(pf(e),"getResetMarkup",(function(){var t,n=e.props,r=n.device,o=n.default;return o&&!Zi()((null==o?void 0:o[r])||o,(null===(t=e.props.value)||void 0===t?void 0:t[r])||e.props.value)?(0,y.jsx)(c.default,{title:"Reset Settings",onClick:function(){return e.onReset(r)},children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-undo"})})}):null})),df(pf(e),"onReset",(function(){throw new Error("Must implement onReset")})),e}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(b.Component);var yf,mf;function bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bf(Object(n),!0).forEach((function(t){Sf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gf(e){return gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gf(e)}function xf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jf(e,t){return jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jf(e,t)}function wf(e,t){if(t&&("object"===gf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Of(e)}function Of(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _f(e){return _f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_f(e)}function Sf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pf={setDevice:He};const qf=(0,v.$j)((function(e){return{device:Pt(e.nodes.device,!0)}}),Pf)((mf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jf(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_f(r);if(o){var n=_f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wf(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Sf(Of(t=i.call(this,e)),"handleChange",(function(e){var n=t.props,r=n.value,o=n.units,i=n.onChange,a=n.responsive;"object"===gf(r)||a?a?(r=vf(vf({},r),{},Sf({},t.props.device,e[0])),t.props.onChange(r)):!o||_t(nf()(o))?i(vf({},e[0])):i({value:e[0],unit:o[0]}):i(e[0])})),Sf(Of(t),"onReset",(function(e){if(!1!==t.props.responsive){var n,r={};r[e]=t.props.default[e],n=ef()(t.props.value,r),t.props.onChange(n),t.setState({reset:!0,desktop:t.props.default})}else t.props.onReset()})),Sf(Of(t),"onUnitChange",(function(e){t.props.onChange(vf(vf({},t.props.value),{},{unit:e}))})),Sf(Of(t),"getValue",(function(e){return!1===t.props.responsive?zt()(t.props.value)?void 0===t.props.value.desktop?t.props.value.value:t.props.value.desktop:t.props.value:t.props.value[e]})),Sf(Of(t),"renderDeviceContent",(function(){var e,n,r=t.props,o=r.min,i=r.max,a=r.step,l=r.device,s=r.suffix,c=(null===(e=t.props.value)||void 0===e?void 0:e.unit)||s||t.props.default;({close:t.state.responsive})[l]=!t.state.responsive;var u=t.getValue(l)<o?o:t.getValue(l);return"desktop"!==l&&(u=t.getValue(l)),i="%"===c?100:i,n="%"===c&&u>100?u=100:u,(0,y.jsx)("div",{className:"qx-flex",children:(0,y.jsxs)(Xo.default.Group,{children:[(0,y.jsx)(Yp.Z,{min:o,max:i,range:!0,defaultValue:n?[parseFloat(n)]:[0],value:n?[parseFloat(n)]:[0],step:a,onChange:t.handleChange,style:{width:"100%",marginRight:"10px"}}),(0,y.jsx)(Xp.Z,{min:o,max:i,step:a,value:zt()(u)?u.value:u||0,onChange:function(e){if(e<=i&&e>=o){var n=[];n.push(e),t.handleChange(n)}}})]})})})),rf(Of(t)),t.state={responsive:"desktop"!==t.getTabName(),reset:!1},t}return t=a,(n=[{key:"render",value:function(){return(0,y.jsxs)("div",{className:"qx-fb-field-slider ".concat(this.props.responsive?"hasResponsive":""," clearfix"),children:[this.getLabelMarkup(),this.renderDeviceContent()]})}}])&&xf(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(hf),Sf(mf,"propTypes",{step:ds().number,min:ds().number,max:ds().number,suffix:ds().string}),Sf(mf,"defaultProps",{min:0,max:100,step:1,reset:!0}),yf=mf))||yf;var Cf=n(55651),kf=n(16765),Nf=n(83933),Ef=["color"];function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,kf.l7)([Nf.Z]);var Df=function(e){var t=e.color,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ef),r=(0,b.useMemo)((function(){return t.startsWith("rgba")?t:(0,kf.Vi)(t).toRgbString()}),[t]);return(0,y.jsx)(Cf.ef,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(n),!0).forEach((function(t){Tf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({color:r},n))};function Af(e){return Af="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Af(e)}function If(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mf(e,t){return Mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mf(e,t)}function Lf(e,t){if(t&&("object"===Af(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bf(e)}function Bf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ff(e){return Ff=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ff(e)}function Uf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zf=["#007bff","#6f42c1","#e83e8c","#dc3545","#ffc107","#28a745"],Hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mf(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ff(r);if(o){var n=Ff(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Lf(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Uf(Bf(t=i.call(this,e)),"shouldComponentUpdate",_o()),Uf(Bf(t),"handleClose",(function(){t.setState({displayColorPicker:!1})})),Uf(Bf(t),"openColorPicker",(function(){t.setState({displayColorPicker:!t.state.displayColorPicker,color:t.props.value})})),Uf(Bf(t),"handleChangeComplete",(function(e){t.setState({color:e}),window.quix_preset_color=e,t.props.onChange(e)})),Uf(Bf(t),"resetColor",(function(){t.props.onChange("")})),Uf(Bf(t),"removeColor",(function(){t.props.onChange("")})),Uf(Bf(t),"getLabelMarkup",(function(){var e=t.props.label;return t.props.onlyBaseText?null:(0,y.jsxs)("p",{className:"qx-fb-field__label",children:[e," ",t.getHelpMarkup()," "]})})),Uf(Bf(t),"getHelpMarkup",(function(){var e=t.props.help;return t.props.onlyBaseText?null:e?(0,y.jsx)(Vi.Z,{content:e,placement:"right",popupStyle:{width:"300px"},getPopupContainer:function(){return window.document.body},children:(0,y.jsx)("i",{className:"qxuicon-question-circle qx-fb-field__help"})}):void 0})),t.state={defaultPresetColors:zf,displayColorPicker:!1,color:t.props.value},t}return t=a,(n=[{key:"componentDidMount",value:function(){if(dt("quix-preset-colors")){var e=JSON.parse(dt("quix-preset-colors"));this.setState({defaultPresetColors:e})}}},{key:"usePresetColor",value:function(e){this.props.onChange(e),window.quix_preset_color=e}},{key:"render",value:function(){var e=this,t=(0,y.jsxs)("div",{className:"picker",children:[" ",this.state.defaultPresetColors.map((function(t){return(0,y.jsx)("div",{className:"qxui-btn-round",style:{background:t,visibility:"visible",width:"32px",height:"32px",padding:"0px",display:"inline-block",margin:"0px 5px"},onClick:function(){return e.handleChangeComplete(t)}},t)}))," "]}),n=(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{children:(0,y.jsx)(Df,{color:this.state.color,onChange:this.handleChangeComplete})}),(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Value"}),(0,y.jsx)(Xo.default,{placeholder:this.state.color,value:this.state.color,onChange:function(t){return e.handleChangeComplete(t.target.value)},allowClear:!0,className:"qx-width-max"})]})]}),r=(0,y.jsxs)("div",{className:"qx-flex qx-flex-between qx-flex-middle",children:[(0,y.jsx)("div",{children:"Color Picker"}),(0,y.jsx)("div",{children:(0,y.jsx)(c.default,{title:"Reset Color",placement:"bottom",children:(0,y.jsx)(p.default,{className:"qx-box-shadow-small",size:"small",onClick:this.resetColor,children:(0,y.jsx)("span",{className:"qxuicon-undo",style:{fontSize:"10px"}})})})})]});return(0,y.jsxs)("div",{className:"qx-fb-field-color qx-grid qx-flex-middle",children:[(0,y.jsx)("div",{children:this.getLabelMarkup()}),(0,y.jsx)("div",{className:"qx-margin-auto-left",children:(0,y.jsxs)(Xo.default.Group,{children:[(0,y.jsx)(Vi.Z,{content:t,title:"Preset Colors",trigger:"click",children:(0,y.jsx)(p.default,{children:(0,y.jsx)("span",{className:"qxuicon-globe"})})}),(0,y.jsx)(Vi.Z,{content:n,title:r,trigger:"click",children:(0,y.jsx)(p.default,{onClick:this.openColorPicker,style:{backgroundColor:this.props.value},children:(0,y.jsx)("span",{className:"qxuicon-eye-dropper qx-blend-difference qx-light"})})})]})})]})}}])&&If(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Hf.propTypes={},Hf.defaultProps={};const Qf=Hf;function Wf(e){return Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wf(e)}var Gf;function Jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $f(e,t){return $f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$f(e,t)}function Zf(e,t){if(t&&("object"===Wf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xf(e)}function Xf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yf(e){return Yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yf(e)}function Kf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ed=st(),td=function(e,t){return{type:de,payload:{config:e,callback:t,show:!!e}}},nd={openMediaPicker:td};const rd=(0,v.$j)((function(e){var t=e.action,n=t.jmedia,r=void 0===n?{}:n;return{visible:t.openJMedia,config:null==r?void 0:r.config,callback:null==r?void 0:r.callback}}),nd)(Gf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$f(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Yf(r);if(o){var n=Yf(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Zf(this,e)});function a(){var e;Jf(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kf(Xf(e=i.call.apply(i,[this].concat(n))),"onClose",(function(){e.props.openMediaPicker(!1)})),e}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this;window.getJMediaValue=function(t){window.fCallback&&(fCallback(t),e.onClose())}}},{key:"render",value:function(){var e=this,t=this.props.config,n="";_t(t)||(n=t.filters);var r=quix.url+quix.url.endsWith("/")?"":"/",o="".concat(r,"index.php?option=com_jmedia&view=images&source=quix&tmpl=component&filters=").concat(n.replaceAll(",","-"),"&callback=onSelectJMedia&").concat(ed,"=1"),i=(0,y.jsxs)("div",{className:"qx-flex qx-flex-between qx-width-1-1",children:[(0,y.jsx)("span",{children:"JMedia - File Manager for Joomla!"}),(0,y.jsxs)(c.default,{title:"Toggle window size",children:[(0,y.jsx)(p.default,{type:"link",size:"small",onClick:function(){return document.getElementById("jmedia-builder-iframe").contentDocument.location.reload(!0)},children:(0,y.jsx)("i",{className:"qxuicon-redo qx-light"})},"resize"),(0,y.jsx)(p.default,{type:"link",size:"small",onClick:this.onClose,children:(0,y.jsx)("i",{className:"qxio-close qx-light"})},"close")]},"resize")]});return(0,y.jsx)(Do,{className:"jmedia-filemanager fm-modal",title:i,show:!0,wrapClassName:"",onCancel:this.onClose,closable:!1,width:1080,close:function(){return e.props.openMediaPicker(!1)},style:{left:"calc(50vw - 540px)",display:this.props.visible?"block":"none"},expandable:!1,overrideHeader:!0,bodyStyle:{margin:"0px",padding:"0px"},destroyOnClose:!1,children:(0,y.jsx)("iframe",{id:"jmedia-builder-iframe","data-src":o,src:"",width:"1080px",height:"500px"})})}}])&&Vf(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Gf;function od(e){return od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},od(e)}var id;function ad(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ld(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ad(Object(n),!0).forEach((function(t){dd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ad(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cd(e,t){return cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cd(e,t)}function ud(e,t){if(t&&("object"===od(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pd(e)}function pd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fd(e){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fd(e)}function dd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hd="rgba(0, 0, 0, 1)",yd=["svg","image","video"],md={openMediaPicker:td},bd=(0,v.$j)(null,md)(id=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cd(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fd(r);if(o){var n=fd(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ud(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),dd(pd(t=i.call(this,e)),"fileSelectCallback",(function(e){var n,r,o,i;if(-1!==Zp()(yd,e.type))return e={type:e.type,base_domain:it(),source:e[e.type],dimension:null!==(n=null===(r=t.props.value)||void 0===r?void 0:r.dimension)&&void 0!==n?n:{width:"",height:""},properties:null!==(o=null===(i=t.props.value)||void 0===i?void 0:i.properties)&&void 0!==o?o:{color:hd,size:30}},t.props.onChange(ld({},e)),!0;m.error("Only you can select [ "+yd.join(", ")+" ]. Current format is "+e.type)})),dd(pd(t),"handleChange",(function(e){var n,r=e.target.value,o=void 0===r?"":r;switch(o.split(".").pop().toLowerCase()){case"svg":n="svg";break;case"jpg":case"jpeg":case"png":case"webp":case"gif":case"bmp":case"ico":n="image";break;case"mp4":case"mov":case"flv":case"mkv":case"movie":case"mpeg":case"mpg":n="video";break;default:n=t.getTypeFromFilters()}t.props.onChange(ld(ld({},t.props.value),{},{source:o,type:n}))})),dd(pd(t),"handleChangeWidth",(function(e){var n=e.target.value,r=void 0===n?"":n;t.props.onChange(ld(ld({},t.props.value),{},{dimension:ld(ld({},t.props.value.dimension),{},{width:r})}))})),dd(pd(t),"handleChangeHeight",(function(e){var n=e.target.value,r=void 0===n?"":n;t.props.onChange(ld(ld({},t.props.value),{},{dimension:ld(ld({},t.props.value.dimension),{},{height:r})}))})),dd(pd(t),"getTypeFromFilters",(function(){return t.props.filters.includes("image")?"image":t.props.filters.includes("video")?"video":t.props.filters.includes("icon")?"svg":"unknown"})),dd(pd(t),"handleReset",(function(){t.props.onChange({type:t.getTypeFromFilters(),source:"",dimension:{width:"",height:""}})})),dd(pd(t),"loadSvg",(function(e){return bt()(e,"<svg")||bt()(e,"<?xml")?e:"svg"===e.split(".").pop()?'<img src="'+tt()+"/"+e+'" alt="icon-alt" class="qx-preserve" qx-svg="" />':'<i class="'+e+'"/>'})),dd(pd(t),"handleSvgChange",(function(e){var n=e.size,r=e.color,o=t.props.value,i=o.properties;n&&(i=Vp()(i,{size:n})),r&&(r="null"===r?"":r,i=Vp()(i,{color:r})),t.props.onChange(ld({},Vp()(o,{properties:i})))})),dd(pd(t),"getPickerPlaceholder",(function(){var e=t.props.value,n=t.props.filters,r=qt(e.source);if(_t(r)){var o=t.props.filters.split(",").join(" qx-picker-");return(0,y.jsx)(Gp.default,{className:o,image:qt("media/quixnxt/images/empty.svg"),imageStyle:{height:60},description:(0,y.jsx)("span",{children:"Click here to add your media"}),onClick:function(){t.getFileManagerModal(t.fileSelectCallback,{filters:t.props.filters})},style:{cursor:"pointer"}})}var i=(0,y.jsx)("img",{className:"qx-cover",alt:"qx-image",src:r,onClick:function(){t.getFileManagerModal(t.fileSelectCallback,{filters:t.props.filters})}});if(e&&"svg"===e.type&&(i=(0,y.jsx)("div",{className:"media-component-svg-icon qx-cover",style:{fontSize:"100px"},onClick:function(){t.getFileManagerModal(t.fileSelectCallback,{filters:n})},dangerouslySetInnerHTML:{__html:t.loadSvg(e.source)}})),e&&"video"===e.type){var a="video/"+r.split(".").pop();i=(0,y.jsx)("video",{playsInline:!0,controls:!0,children:(0,y.jsx)("source",{type:a,src:r})})}var l="qx-position-relative qx-transition-toggle qx-height-small qx-cover-container qx-dot-background "+t.props.filters.split(",").join(" qx-picker-");return(0,y.jsxs)("div",{className:l,children:[i,(0,y.jsx)("div",{className:"qx-position-cover qx-overlay qx-overlay-default qx-transition-fade"}),(0,y.jsxs)("div",{className:"qx-flex qx-flex-center qx-flex-middle h-100 qx-transition-scale-up qx-position-cover",children:[(0,y.jsx)(c.default,{title:"Add Image",children:(0,y.jsx)(p.default,{type:"text",onClick:function(){t.getFileManagerModal(t.fileSelectCallback,{filters:t.props.filters})},children:(0,y.jsx)("span",{className:"qxuicon-plus"})})}),(0,y.jsx)(c.default,{title:"Remove Image",children:(0,y.jsx)(p.default,{danger:!0,type:"text",onClick:t.handleReset,children:(0,y.jsx)("span",{className:"qxuicon-trash-alt"})})})]})]})})),dd(pd(t),"onReset",(function(e){var n=e.color,r=t.props.value,o=r.properties;o=n?Vp()(o,{color:hd}):Vp()(o,{size:30}),t.props.onChange(ld({},Vp()(r,{properties:o})))})),dd(pd(t),"renderSvgSettings",(function(){var e=t.props.value,n=e.properties,r=["px"];e.source||(n={color:hd,size:30},r=["px","%"]);var o=n,i=o.color,a=o.size;return(0,y.jsxs)("div",{className:"qx-fb-field-image__svg-settings",children:[(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{units:r,defaultUnit:"px",label:"Size",min:0,max:500,value:a,default:0,onChange:function(e){return t.handleSvgChange({size:e})},responsive:!1,onReset:function(){return t.onReset({})}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(Qf,{label:"Color",onlyColorPicker:!0,labelFor:"background__color",value:i,onChange:function(e){e?t.handleSvgChange({color:e}):t.handleSvgChange({color:"null"})},onReset:function(){return t.onReset({color:!0})}})})]})})),dd(pd(t),"getLabelMarkup",(function(){var e=t.props.label;return(0,y.jsxs)("p",{className:"qx-fb-field__label",children:[e," ",t.getHelpMarkup()," "]})})),dd(pd(t),"getHelpMarkup",(function(){var e=t.props.help;if(e)return(0,y.jsx)(Vi.Z,{content:e,placement:"right",popupStyle:{width:"350px"},children:(0,y.jsx)("i",{className:"qxuicon-question-circle qx-fb-field__help"})})})),dd(pd(t),"getFileManagerModal",(function(e,n){window.fCallback=e,t.props.openMediaPicker(n,e),setTimeout((function(){var e,t,n,r=Dr("jmedia-builder-iframe"),o=null===(e=Dr("jmedia-builder-iframe").attributes)||void 0===e||null===(t=e.src)||void 0===t?void 0:t.value,i=null===(n=Dr("jmedia-builder-iframe").dataset)||void 0===n?void 0:n.src;o!==i&&(r.attributes.src.value=i)}),100)})),t.state={url:null,visible:!0,id:lr("qx-jmedia-")},t}return t=a,n=[{key:"render",value:function(){var e,t,n=this.props,r=n.value,o=n.showStyle,i=null;return r&&"svg"===r.type&&!1!==o&&(i=this.renderSvgSettings()),(0,y.jsxs)("div",{className:"qx-fb-field-image",children:[this.getLabelMarkup(),(0,y.jsxs)("div",{className:"qx-padding-small qx-box-shadow-small qx-margin-small-bottom",style:{border:"1px solid #eee"},children:[this.getPickerPlaceholder(),"svg"!==r.type?(0,y.jsx)(Xo.default,{value:r.source,onChange:this.handleChange,className:"qx-form-blank qx-margin-small-top",size:"small",prefix:"URL:"}):(0,y.jsx)(Xo.default,{value:r.source,className:"qx-form-blank qx-margin-small-top",size:"small",prefix:"SVG"}),i]}),"image"===r.type?(0,y.jsxs)("div",{className:"qx-flex",style:{columnGap:"5px"},children:[(0,y.jsx)(Xo.default,{style:{border:"1px solid #ddd"},value:null==r||null===(e=r.dimension)||void 0===e?void 0:e.width,onChange:this.handleChangeWidth,className:"qx-form-blank qx-margin-small-top",size:"small",prefix:"WIDTH:"}),(0,y.jsx)(Xo.default,{value:null==r||null===(t=r.dimension)||void 0===t?void 0:t.height,onChange:this.handleChangeHeight,className:"qx-form-blank qx-margin-small-top",size:"small",prefix:"HEIGHT:",style:{border:"1px solid #ddd"}})]}):null]})}}],n&&sd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||id;bd.propTypes={},bd.defaultProps={};const vd=bd;function gd(e){return gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gd(e)}var xd;function jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wd(e,t){return wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wd(e,t)}function Od(e,t){if(t&&("object"===gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _d(e)}function _d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sd(e){return Sd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sd(e)}function Pd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qd=(0,v.$j)((function(e){var t=e.form.node;return{id:null==t?void 0:t.id}}))(xd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wd(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Sd(r);if(o){var n=Sd(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Od(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Pd(_d(t=i.call(this,e)),"setEditorState",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=t.props.value;e={editorId:t.eId,editorState:r,activeEditor:"draft-js"},n?(t.setState(e),t.editor.setContent(e.editorState)):t.state=e})),Pd(_d(t),"onChange",(function(e){var n=null!=e&&e.target?null==e?void 0:e.target.value:e.getContent();t.setState({content:n}),t.state.editorState=n,t.props.onChange(n)})),t.eId=lr("editor"),t.setEditorState(),t}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this,t=this.state.editorId,n=WFEditor.settings.plugins;n=n.replace("preview,",""),jQuery.extend(WFEditor.settings,{height:"200",plugins:n,setup:function(t){t.onNodeChange.add(e.onChange),t.onChange.add(e.onChange),t.onKeyUp.add(e.onChange),t.onPaste.add(e.onChange),t.onSetContent.add(e.onChange),e.editor=t}}),WFEditor.create(t)}},{key:"componentDidUpdate",value:function(e,t,n){e.id!==this.props.id&&this.props.id&&this.setEditorState(!0)}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.help,r=this.state.editorState;return(0,y.jsxs)("div",{className:"qx-fb-field-editor",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:t}),(0,y.jsx)("div",{children:(0,y.jsx)("textarea",{value:r,id:this.state.editorId,onChange:this.onChange,disabled:"disabled",className:"qx-textarea qx-input mce_editable wf-editor qx-background-muted qx-form-blank"})}),(0,y.jsx)("p",{className:Ve()("qx-fb-field__help",{hide:!n}),children:n})]})}}])&&jd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||xd;function Cd(e){return Cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cd(e)}var kd;function Nd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ed(e,t){return Ed=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ed(e,t)}function Rd(e,t){if(t&&("object"===Cd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Td(e)}function Td(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dd(e){return Dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dd(e)}function Ad(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Id=(0,v.$j)((function(e){var t=e.form.node;return{id:null==t?void 0:t.id}}))(kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ed(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Dd(r);if(o){var n=Dd(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Rd(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Ad(Td(t=i.call(this,e)),"setEditorState",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=t.props.value;e={editorId:t.eId,editorState:r,activeEditor:"draft-js"},n?(t.setState(e),t.editor.setContent(e.editorState)):t.state=e})),Ad(Td(t),"onChange",(function(e){var n=e.getContent();t.setState({content:n}),t.props.onChange(n)})),t.eId=lr("editor"),t.setEditorState(),t}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this,t=this.state.editorId;tinymce.init({selector:"textarea#".concat(t),force_br_newlines:!0,force_p_newlines:!1,forced_root_block:"",toolbar_items_size:"small",invalid_elements:"script,applet",menubar:!1,setup:function(t){t.on("change keyup cut paste redo undo",(function(n){e.onChange(t)})),e.editor=t},plugins:["advlist autolink lists link charmap preview image table","searchreplace code fullscreen","media contextmenu paste"],relative_urls:!0,document_base_url:tt(),image_class_list:[{title:"None",value:""},{title:"Left",value:"pull-left"},{title:"Right",value:"pull-right"}],toolbar:"undo redo | bold italic alignleft aligncenter alignright alignjustify | bullist numlist | blockquote fontsizeselect | link image code table"})}},{key:"componentDidUpdate",value:function(e,t,n){e.id!==this.props.id&&this.props.id&&this.setEditorState(!0)}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.help,r=this.state.editorState;return(0,y.jsxs)("div",{className:"qx-fb-field-editor",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:t}),(0,y.jsx)("div",{children:(0,y.jsx)("textarea",{value:r,id:this.state.editorId,onChange:this.onChange,disabled:"disabled",className:"qx-textarea qx-input mce_editable wf-editor qx-background-muted qx-form-blank"})}),(0,y.jsx)("p",{className:Ve()("qx-fb-field__help",{hide:!n}),children:n})]})}}])&&Nd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||kd;function Md(e){return Md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Md(e)}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(n),!0).forEach((function(t){Fd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ud(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hd(e,t){return Hd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hd(e,t)}function Qd(e,t){if(t&&("object"===Md(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wd(e){return Wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wd(e)}const Gd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hd(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wd(r);if(o){var n=Wd(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qd(this,e)});function a(){return Ud(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){return"undefined"!=typeof WFEditor?(0,y.jsx)(qd,Bd({},this.props)):(0,y.jsx)(Id,Bd({},this.props))}}])&&zd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);function Jd(e){return Jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jd(e)}function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vd(Object(n),!0).forEach((function(t){th(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xd(e,t){return Xd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xd(e,t)}function Yd(e,t){if(t&&("object"===Jd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kd(e)}function Kd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eh(e){return eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eh(e)}function th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nh=ol.default.Option,rh=[{label:"Outside",value:"outline"},{label:"Inset",value:"inset"}];const oh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xd(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=eh(r);if(o){var n=eh(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yd(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),th(Kd(t=i.call(this,e)),"onChange",(function(e){t.props.onChange($d($d({},t.props.value),e))})),th(Kd(t),"onReset",(function(){t.props.onChange($d($d({},t.props.value),t.props.default))})),th(Kd(t),"getFields",(function(){var e=t.props.value,n=e.color,r=e.blur,o=e.spread,i=e.position,a=e.horizontal,l=e.vertical,s=t.props.default;return(0,y.jsx)("div",{className:"shadowfieldsContentWrapper",children:(0,y.jsxs)("div",{className:"shadowfields clearfix",children:[(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(Qf,{onlyColorPicker:!0,addonAfter:"Select",label:"Color",value:n,onChange:function(e){return t.onChange({color:e})}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{responsive:!1,reset:!1,label:"Horizontal",min:-100,units:["px"],value:a,onChange:function(e){return t.onChange({horizontal:e})}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{responsive:!1,reset:!1,label:"Vertical",min:-100,units:["px"],value:l,onChange:function(e){return t.onChange({vertical:e})}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{responsive:!1,reset:!1,label:"Blur",value:r,units:["px"],onChange:function(e){return t.onChange({blur:e})}})}),void 0!==o?(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{responsive:!1,reset:!1,label:"Spread",value:o,units:["px"],onChange:function(e){return t.onChange({spread:e})}})}):null,void 0!==i?(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsxs)(ol.default,{value:i,default:s.position,responsive:"false",label:"Position",options:rh,prefixCls:"qxui-select",onChange:function(e){return t.onChange({position:e})},onReset:function(e){return t.onChange({position:s.position})},dropdownClassName:"qxui-zi-l",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(nh,{value:"outline",children:"Outside"},0),(0,y.jsx)(nh,{value:"inset",children:"Inset"},1)]})}):null]})})})),t}return t=a,(n=[{key:"render",value:function(){var e=!Zi()(this.props.default,this.props.value);return(0,y.jsxs)("div",{className:"qx-flex qx-flex-between qx-flex-middle",children:[(0,y.jsx)("div",{children:(0,y.jsx)("label",{className:"qx-fb-field__label qx-mb-0",htmlFor:"text_shadow",children:this.props.label})}),(0,y.jsxs)("div",{children:[e?(0,y.jsxs)(p.default,{type:"link",className:"qx-text-meta",onClick:this.onReset,children:[" ",(0,y.jsx)("i",{className:"qxuicon-undo"})," "]}):null,(0,y.jsx)(Vi.Z,{content:this.getFields(),trigger:"click",placement:"left",popupStyle:{width:"300px"},children:(0,y.jsx)(p.default,{className:e?"qx-text-primary":"",children:(0,y.jsx)("i",{className:"qxuicon-window-restore"})})})]})]})}}])&&Zd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);var ih,ah=n(53038),lh=n.n(ah);function sh(e){return sh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sh(e)}function ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ch(Object(n),!0).forEach((function(t){mh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ch(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ph(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fh(e,t){return fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fh(e,t)}function dh(e,t){if(t&&("object"===sh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hh(e)}function hh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yh(e){return yh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yh(e)}function mh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bh=Xo.default.Group,vh={setDevice:He},gh=(0,v.$j)((function(e){return{device:Pt(e.nodes.device,!0)}}),vh)(ih=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fh(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yh(r);if(o){var n=yh(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return dh(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),mh(hh(t=i.call(this,e)),"sync",(function(){var e=t.props.device,n={};n[e]=!t.state.sync[e],t.setState({sync:ef()(t.state.sync,n)})})),mh(hh(t),"renderSyncJsx",(function(){var e=t.props.device,n=t.state.sync[e];return(0,y.jsx)(c.default,{title:"Link values together",overlayClassName:"qxui-zi-l",placement:"bottom",children:(0,y.jsx)(p.default,{type:n?"primary":"",onClick:t.sync.bind(hh(t),e),style:{width:"8%",padding:0},children:(0,y.jsx)("i",{className:n?"qxuicon-link":"qxuicon-unlink"})})})})),mh(hh(t),"toggleSyncMode",(function(e){var t=e.top,n=e.bottom,r=e.right,o=e.left;if(t===n&&n===r&&r===o)return!!lh()(t)})),mh(hh(t),"handleChange",(function(e,n){var r=t.props.device,o={};if(e||0===e||(e=""),t.state.sync[r])o=t.props.value.desktop?mh({},r,{top:e,bottom:e,right:e,left:e}):{top:e,bottom:e,right:e,left:e};else{var i={};i[n]=e,o=t.props.value.desktop?mh({},r,uh(uh({},t.props.value[r]),i)):uh(uh({},t.props.value),i)}o=ef()({responsive_preview:!0},o),e=ef()(t.props.value,o),console.log("dimensions update",e),t.props.onChange(e)})),mh(hh(t),"onUnitChange",(function(e){t.props.onChange(ef()(t.props.value,{unit:e}))})),mh(hh(t),"onReset",(function(){var e=t.props.device;t.props.value.desktop?t.props.onChange(uh(uh({},t.props.value),mh({},e,{top:"",bottom:"",right:"",left:""}))):t.props.onChange(uh(uh({},t.props.value),{top:"",bottom:"",right:"",left:""})),t.setState({reset:!0})})),mh(hh(t),"renderDimensionsFields",(function(e){var n=e.top,r=e.right,o=e.bottom,i=e.left,a=t.getPlaceholder("top"),l=t.getPlaceholder("bottom"),s=t.getPlaceholder("right"),c=t.getPlaceholder("left");return(0,y.jsx)("div",{children:(0,y.jsxs)(bh,{compact:!0,children:[void 0!==n?(0,y.jsx)(Xp.Z,{placeholder:a,value:n,style:{width:"23%"},onChange:function(e){return t.handleChange(e,"top")}}):null,void 0!==r?(0,y.jsx)(Xp.Z,{placeholder:s,value:r,style:{width:"23%"},onChange:function(e){return t.handleChange(e,"right")}}):null,void 0!==o?(0,y.jsx)(Xp.Z,{placeholder:l,value:o,style:{width:"23%"},onChange:function(e){return t.handleChange(e,"bottom")}}):null,void 0!==i?(0,y.jsx)(Xp.Z,{placeholder:c,value:i,style:{width:"23%"},onChange:function(e){return t.handleChange(e,"left")}}):null,t.renderSyncJsx()]})})})),rf(hh(t)),t.state={responsive:"desktop"!==t.getTabName(),valueFor:t.getTabName(),tab:t.getTabName(),sync:{desktop:!1,tablet:!1,phone:!1}},t}return t=a,n=[{key:"componentDidMount",value:function(){var e=ef()(this.props.default,this.props.value);Zi()(this.props.default,this.props.value)||this.props.onChange(e);var t={desktop:!1,tablet:!1,phone:!1};t.desktop=this.toggleSyncMode(e.desktop||e),this.props.responsive&&(t.tablet=this.toggleSyncMode(e.tablet),t.phone=this.toggleSyncMode(e.phone)),this.setState({sync:t})}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.responsive,r=e.device,o=t;return n&&(o=o[r]),(0,y.jsxs)("div",{className:"qx-fb-field-dimensions ".concat(n?"hasResponsive":""," "),children:[this.getLabelMarkup(),this.renderDimensionsFields(o)]})}}],n&&ph(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(hf))||ih;gh.propTypes={},gh.defaultProps={responsive:!0};const xh=gh;var jh=n(88374),wh=n.n(jh);function Oh(e){return Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oh(e)}function _h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sh(e,t){return Sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sh(e,t)}function Ph(e,t){if(t&&("object"===Oh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qh(e)}function qh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ch(e){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ch(e)}var kh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sh(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ch(r);if(o){var n=Ch(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ph(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),n=qh(t=i.call(this,e)),r="shouldComponentUpdate",o=_o(),r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.state={id:lr("quix-select-"),value:"",fallbackImageSrc:"/media/quixnxt/images/",options:[]},t.getImageUrl=t.getImageUrl.bind(qh(t)),t.getImageSrc=t.getImageSrc.bind(qh(t)),t.imageExists=t.imageExists.bind(qh(t)),t.handleChange=t.handleChange.bind(qh(t)),t.renderOption=t.renderOption.bind(qh(t)),t.getFallbackImageUrl=t.getFallbackImageUrl.bind(qh(t)),void 0===window.checkedImages&&(window.checkedImages=[]),t}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this;this.props.value&&this.setState({value:this.props.value});var t=this.props.path+"/"+window.FORM.ELEMENT_SLUG+"/images/";this.props.options.length,this.props.options.map((function(n,r){e.getImageSrc(n.value,t).then((function(t){n.imgSrc=t;var o=e.state.options;o[r]=n,e.setState({options:o}),e.forceUpdate(),e.render()}),(function(t){n.imgSrc=t;var o=e.state.options;o[r]=n,e.setState({options:o}),e.forceUpdate(),e.render()}))})),this.bindImagePickerPlugin()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({value:e.value})}},{key:"componentDidUpdate",value:function(e,t){this.bindImagePickerPlugin()}},{key:"bindImagePickerPlugin",value:function(){var e=this;jQuery("#"+this.state.id).imagepicker({show_label:!0,changed:function(t,n,r){e.props.multiple?e.props.onChange(n):e.props.onChange(n[0]),e.setState({value:n})}})}},{key:"imageExists",value:function(e,t){var n=this;return new Promise((function(r,o){if(n.imageExistenceChecked(e,t))window.checkedImages[n.getImageUrl(e,t)]&&r(response.success),o(!response.success);else{var i=new XMLHttpRequest;i.open("GET","index.php?option=com_quix&view=pages&task=api.checkImage&path="+n.getImageUrl(e,t)),i.onreadystatechange=function(){try{var e=JSON.parse(this.responseText);e.success?r(e.success):o(!e.success)}catch(e){}},i.send()}}))}},{key:"imageExistenceChecked",value:function(e,t){return void 0!==window.checkedImages[this.getImageUrl(e,t)]}},{key:"getImageUrl",value:function(e,t){return t+this.props.name+"_"+e+".png"}},{key:"getFallbackImageUrl",value:function(e){return this.state.fallbackImageSrc+this.props.name+"_"+e+".png"}},{key:"getImageSrc",value:function(e,t){var n=this;return new Promise((function(r,o){n.imageExists(e,t).then((function(o){r(n.getImageUrl(e,t))}),(function(t){o(n.getFallbackImageUrl(e))}))}))}},{key:"handleChange",value:function(e){this.setState({value:e.target.value}),this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this;return(0,y.jsx)("div",{className:this.props.name+" input-col qx-image-select",children:(0,y.jsx)("select",{id:this.state.id,multiple:!!this.props.multiple&&"multiple",className:"image-picker",value:this.state.value,onChange:this.handleChange,children:this.state.options.map((function(t){return e.renderOption(t)}))})})}},{key:"renderOption",value:function(e){return(0,y.jsxs)("option",{"data-img-src":window.jRoot+e.imgSrc,"data-img-class":"quix-select__image-picker","data-img-alt":e.value,value:e.value,children:["  ",e.label,"  "]},e.value)}}])&&_h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);kh.propTypes={},kh.defaultProps={};const Nh=kh;function Eh(e){return Eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eh(e)}var Rh;function Th(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dh(e,t){return Dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dh(e,t)}function Ah(e,t){if(t&&("object"===Eh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ih(e)}function Ih(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mh(e){return Mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mh(e)}function Lh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bh=ol.default.Option,Fh={setDevice:He},Uh=(0,v.$j)((function(e){return{device:Pt(e.nodes.device,!0)}}),Fh)(Rh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dh(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Mh(r);if(o){var n=Mh(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ah(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Lh(Ih(t=i.call(this,e)),"shouldComponentUpdate",_o()),Lh(Ih(t),"preserveType",(function(e){return+e===e?+e:e})),Lh(Ih(t),"getValue",(function(e){return e?wh()(t.props.value,e)?t.props.value[e]:{desktop:t.props.value,tablet:"",phone:""}:wh()(t.props.value,"desktop")?t.props.value:{desktop:t.props.value,tablet:"",phone:""}})),Lh(Ih(t),"handleChange",(function(e){if(e=t.props.multiple?Ft()(e)?e.map(t.preserveType):e.split(",").map(t.preserveType):t.preserveType(e),t.props.responsive){var n=t.props.device;"desktop"===n?e=ef()(t.getValue(),{responsive_preview:!0,desktop:e}):"tablet"===n?e=ef()(t.getValue(),{responsive_preview:!0,tablet:e}):"phone"===n&&(e=ef()(t.getValue(),{responsive_preview:!0,phone:e})),t.props.onChange(e)}else t.props.onChange(e)})),Lh(Ih(t),"onReset",(function(e){if(t.props.responsive){var n={};n[e]=void 0===t.props.default[e]?"":t.props.default[e];var r=ef()(t.props.value,n);t.props.onChange(r),t.setState({reset:!0})}else t.props.onChange(t.props.default)})),Lh(Ih(t),"getSelectView",(function(e,n,r,o){var i=!1,a=t.props.tags;e.image&&(i=e.image);var l=(0,y.jsx)(ol.default,{showSearch:!0,mode:o?"multiple":a?"tags":"",optionFilterProp:"children",filterOption:function(e,t){if(void 0!==t.props.children)return t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0},value:n?o||a?n:n.toString():o||a?[]:"",onChange:t.handleChange,getPopupContainer:function(){return window.document.body},dropdownClassName:"qxui-zi-l",isrequired:0,children:r.map((function(e,t){return(0,y.jsx)(Bh,{value:e.value.toString(),children:e.label},t)}))});return i&&(l=(0,y.jsx)(Nh,{onChange:t.handleChange,path:t.props.path,value:n,options:r,responsive:t.props.responsive,multiple:o,name:t.props.name})),l})),Lh(Ih(t),"renderDeviceContent",(function(){var e,n=t.props,r=n.value,o=n.options,i=n.select,a=n.multiple,l=n.responsive,s=n.device;return e=l?void 0===r[s]?r:r[s]:r,(0,y.jsx)("div",{children:t.getSelectView(i,e,o,a)})})),rf(Ih(t)),t.state={responsive:"desktop"!==t.getTabName(),reset:!1},t}return t=a,(n=[{key:"render",value:function(){return(0,y.jsxs)("div",{className:"qx-fb-field-select ".concat(this.props.responsive?"hasResponsive":""," clearfix"),children:[this.getLabelMarkup(),this.renderDeviceContent()]})}}])&&Th(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(hf))||Rh;Uh.defaultProps={responsive:!0,select:{}};const zh=Uh;function Hh(e){return Hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hh(e)}function Qh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wh(e,t){return Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wh(e,t)}function Gh(e,t){if(t&&("object"===Hh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jh(e)}function Jh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vh(e)}var $h=[{label:"None",value:"none"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"}];const Zh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wh(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vh(r);if(o){var n=Vh(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gh(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).onChange=t.onChange.bind(Jh(t)),t.borderType=t.borderType.bind(Jh(t)),t.borderRadius=t.borderRadius.bind(Jh(t)),t}return t=a,(n=[{key:"onChange",value:function(e){var t={state:{}},n="normal";"normal"===this.props.state&&(n="hover"),t.state[this.props.state]={properties:ef()(this.props.value.state[this.props.state].properties,e)},t.state[n]=this.props.value.state[n],this.props.onChange(ef()(this.props.value,t))}},{key:"borderType",value:function(){var e=this,t=this.props.value.state[this.props.state].properties.border_type,n=this.props.default.state[this.props.state].properties.border_type;return(0,y.jsx)(zh,{label:"Border Type",value:t,default:n,responsive:!1,onChange:function(t){e.onChange({border_type:t})},options:$h})}},{key:"borderRadius",value:function(){var e=this,t=this.props.value.state[this.props.state].properties.border_radius,n=this.props.default.state[this.props.state].properties.border_radius;return(0,y.jsx)(xh,{className:"quix-border-raduis",responsive:!1,default:n,value:t,label:"Border Radius",onChange:function(t){e.onChange({border_radius:t})},onReset:function(){e.onChange({border_radius:n})},reset:!0,units:["px","em","%"]})}},{key:"borderWidth",value:function(){var e=this,t=this.props.value.state[this.props.state].properties.border_width,n=this.props.default.state[this.props.state].properties.border_width;return"none"!=this.props.value.state[this.props.state].properties.border_type?(0,y.jsx)(xh,{className:"quix-border-width",responsive:!1,default:n,value:t,label:"Border Width",onChange:function(t){e.onChange({border_width:t})},onReset:function(){e.onChange({border_width:n})},reset:!0,units:["px","em"]}):null}},{key:"borderColor",value:function(){var e=this,t=this.props.value.state[this.props.state].properties.border_color,n=this.props.default.state[this.props.state].properties.border_color;return"none"!=this.props.value.state[this.props.state].properties.border_type?(0,y.jsx)(Qf,{onlyColorPicker:!0,label:"Color",value:t,onChange:function(t){e.onChange({border_color:t})},onReset:function(){e.onChange({border_color:n})}}):null}},{key:"boxShadow",value:function(){var e=this,t=this.props.value.state[this.props.state].properties.box_shadow,n=this.props.default.state[this.props.state].properties.box_shadow;return(0,y.jsx)(oh,{label:"Box Shadow",value:t,default:n,onChange:function(t){e.onChange({box_shadow:t})}})}},{key:"hoverTransition",value:function(){var e=this,t=this.props.value.state[this.props.state].properties.transition,n=this.props.default.state[this.props.state].properties.transition;return"hover"==this.props.state?(0,y.jsx)(qf,{responsive:!1,label:"Transition",units:["s"],defaultUnit:"s",min:0,max:3,step:.1,value:t,onChange:function(t){e.onChange({transition:t})},onReset:function(){e.onChange({transition:n})}}):null}},{key:"render",value:function(){return(0,y.jsx)("div",{children:(0,y.jsxs)("div",{className:"qx-fb-field-border__fields",children:[(0,y.jsx)("div",{className:"qx-fb-field",children:this.borderType()}),(0,y.jsx)("div",{className:"qx-fb-field",children:this.borderWidth()}),(0,y.jsx)("div",{className:"qx-fb-field",children:this.borderColor()}),(0,y.jsx)("div",{className:"qx-fb-field",children:this.borderRadius()}),(0,y.jsx)("div",{className:"qx-fb-field",children:this.boxShadow()}),(0,y.jsx)("div",{className:"qx-fb-field",children:this.hoverTransition()})]})})}}])&&Qh(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);function Xh(e){return Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xh(e)}function Yh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kh(e,t){return Kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kh(e,t)}function ey(e,t){if(t&&("object"===Xh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ty(e)}function ty(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ny(e)}var ry=qi.default.TabPane;const oy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kh(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ny(r);if(o){var n=ny(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ey(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={state:"normal",visible:!1},t.onReset=t.onReset.bind(ty(t)),t.onTabChange=t.onTabChange.bind(ty(t)),t.getFields=t.getFields.bind(ty(t)),t.showPopover=t.showPopover.bind(ty(t)),t}return t=a,(n=[{key:"onTabChange",value:function(e){this.setState({state:e})}},{key:"onReset",value:function(){this.props.onChange(this.props.default)}},{key:"getFields",value:function(){return(0,y.jsx)("div",{className:"qx-fb-field-border",children:(0,y.jsxs)(qi.default,{defaultActiveKey:"normal",onChange:this.onTabChange,children:[(0,y.jsx)(ry,{tab:"Normal",children:(0,y.jsx)(Zh,{for:"normal",state:this.state.state,value:this.props.value,onChange:this.props.onChange,onReset:this.onReset,default:this.props.default})},"normal"),(0,y.jsx)(ry,{tab:"Hover",children:(0,y.jsx)(Zh,{for:"hover",state:this.state.state,value:this.props.value,onChange:this.props.onChange,onReset:this.onReset,default:this.props.default})},"hover")]})})}},{key:"showPopover",value:function(){this.setState({visible:!this.state.visible})}},{key:"render",value:function(){var e=!Zi()(this.props.default,this.props.value);return this.props.popover?(0,y.jsxs)("div",{className:"qx-flex qx-flex-between qx-flex-middle",children:[(0,y.jsx)("div",{children:(0,y.jsx)("label",{className:"qx-fb-field__label qx-mb-0",htmlFor:"text_shadow",children:this.props.label})}),(0,y.jsxs)("div",{children:[e?(0,y.jsx)("i",{className:"qxuicon-undo",onClick:this.onReset}):null,(0,y.jsx)(Vi.Z,{prefixCls:"qxui-popover",placement:"left",popupStyle:{width:"320px"},content:this.getFields(),trigger:"click",children:(0,y.jsx)(p.default,{className:e?"active":"",children:(0,y.jsx)("i",{className:"qxuicon-square-full"})})})]})]}):this.getFields()}}])&&Yh(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);n(42756);var iy,ay=n(80155),ly=n(60873),sy=n.n(ly);function cy(e){return cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cy(e)}function uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function py(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uy(Object(n),!0).forEach((function(t){by(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dy(e,t){return dy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dy(e,t)}function hy(e,t){if(t&&("object"===cy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yy(e)}function yy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function my(e){return my=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},my(e)}function by(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vy=ay.default.Button,gy=ay.default.Group,xy={setDevice:He};const jy=(0,v.$j)((function(e){return{device:Pt(e.nodes.device,!0)}}),xy)(iy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dy(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=my(r);if(o){var n=my(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return hy(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),by(yy(t=i.call(this,e)),"handleChange",(function(e){var n=t.props.value,r=e.target.value;!1!==t.props.responsive?(n=py(py({},n),by({},t.props.device,r)),t.props.onChange(n)):t.props.onChange(r)})),by(yy(t),"onReset",(function(e){if(!1!==t.props.responsive)return t.props.onChange(t.props.default);t.props.onReset()})),by(yy(t),"getValue",(function(e){return!1===t.props.responsive?zt()(t.props.value)&&t.props.value.desktop?t.props.value.desktop:t.props.value:t.props.value[e]})),by(yy(t),"renderDeviceContent",(function(){var e=t.props.device,n=zt()(t.getValue(e))?t.getValue(e).value:t.getValue(e);return{close:t.state.responsive}[e]=!t.state.responsive,(0,y.jsxs)("div",{children:[(0,y.jsx)(gy,{value:n,onChange:t.handleChange,children:sy()(t.props.options,(function(e,t){return(0,y.jsxs)(vy,{value:t,children:[(0,y.jsx)("span",{className:e.icon,style:{fontSize:"12px"}})," ",e.label]},t)}))}),t.getResetMarkup(e)]})})),rf(yy(t)),t.state={responsive:"desktop"!==t.getTabName(),reset:!1},t}return t=a,(n=[{key:"render",value:function(){return(0,y.jsxs)("div",{className:"qx-fb-field-choose ".concat(this.props.responsive?"hasResponsive":""," clearfix"),children:[this.getLabelMarkup(),this.renderDeviceContent()]})}}])&&fy(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(hf))||iy;function wy(e){return wy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wy(e)}function Oy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _y(e,t){return _y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_y(e,t)}function Sy(e,t){if(t&&("object"===wy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Py(e)}function Py(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qy(e){return qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qy(e)}var Cy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_y(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=qy(r);if(o){var n=qy(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Sy(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).onChange=t.onChange.bind(Py(t)),t.state={id:lr("switch-")},t}return t=a,(n=[{key:"onChange",value:function(e){this.props.onChange(e)}},{key:"getLabelMarkup",value:function(){var e=this.props.label;return(0,y.jsxs)("p",{className:"qx-fb-field__label",children:[e," ",this.getHelpMarkup()," "]})}},{key:"getHelpMarkup",value:function(){var e=this.props.help;if(e)return(0,y.jsx)(Vi.Z,{content:e,overlayClassName:"qxui-zi-l",placement:"right",popupStyle:{width:"300px"},getPopupContainer:function(){return window.document.body},children:(0,y.jsx)("i",{className:"qxuicon-question-circle qx-fb-field__help"})})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.checked,r=(e.help,this.state.id),o=!0===n;return(0,y.jsxs)("div",{className:"qx-fb-field-switch",children:[this.getLabelMarkup(),(0,y.jsx)(s.Z,{checkedChildren:"Yes",unCheckedChildren:"No",defaultChecked:o,onChange:this.onChange,id:r,"data-for":t})]})}}])&&Oy(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);const ky=Cy;function Ny(e){return Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(e)}function Ey(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ry(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ty(e,t){return Ty=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ty(e,t)}function Dy(e,t){if(t&&("object"===Ny(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ay(e){return Ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ay(e)}const Iy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ty(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ay(r);if(o){var n=Ay(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Dy(this,e)});function a(){return Ey(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"createMarkup",value:function(e){return{__html:e}}},{key:"render",value:function(){return this.props.reset&&this.props.label,this.props.help?(0,y.jsx)("p",{className:"qx-text-muted qx-small",style:{margin:"-10px 0 0 0"},dangerouslySetInnerHTML:this.createMarkup(this.props.help)}):(0,y.jsx)("div",{className:"qx-fb-field-divider",children:(0,y.jsx)("span",{children:this.props.label})})}}])&&Ry(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),My=function(){return""};function Ly(e){return Ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ly(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uy(e,t){return Uy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uy(e,t)}function zy(e,t){if(t&&("object"===Ly(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hy(e)}function Hy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qy(e){return Qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qy(e)}function Wy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gy=Xo.default.TextArea,Jy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uy(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qy(r);if(o){var n=Qy(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return zy(this,e)});function a(){var e;By(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wy(Hy(e=i.call.apply(i,[this].concat(n))),"onChange",(function(t){e.props.onChange(t.target.value)})),Wy(Hy(e),"getLabelMarkup",(function(){var t=e.props.label;return(0,y.jsx)("span",{children:t})})),Wy(Hy(e),"getHelpMarkup",(function(){var t=e.props.help;if(t)return(0,y.jsx)(Vi.Z,{content:t,placement:"right",popupStyle:{width:"300px"},children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-question-circle"})})})})),Wy(Hy(e),"getResetMarkup",(function(){return e.props.onlyBaseText||Zi()(e.props.default,e.props.value)?null:(0,y.jsx)(c.default,{title:"Reset to default",children:(0,y.jsx)(p.default,{size:"small",type:"text",children:(0,y.jsx)("i",{className:"qxuicon-undo",onClick:e.props.onReset})})})})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props.value;return(0,y.jsxs)("div",{className:"qx-fb-field-textarea",children:[(0,y.jsxs)("div",{className:"qx-fb-field__label qx-flex qx-flex-middle",children:[this.getLabelMarkup(),this.getHelpMarkup(),this.props.onReset?this.getResetMarkup():null]}),(0,y.jsx)(Gy,{rows:4,value:e,onChange:this.onChange,prefixCls:"qxui-input"})]})}}])&&Fy(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Wy(Jy,"propTypes",{}),Wy(Jy,"defaultProps",{});const Vy=Jy,$y={text_shadow:{color:"",blur:0,horizontal:0,vertical:0}};var Zy=ol.default.Option,Xy=ol.default.OptGroup;function Yy(e){var t=e.fontFamilies.map((function(e){return{label:e,value:e,clearable:!1}}));return(0,y.jsxs)("div",{className:"qx-fb-field-typography__typeface",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:e.label}),(0,y.jsxs)(ol.default,{defaultValue:e.family?e.family.toString():"",onChange:e.onChange,allowClear:!1,showSearch:!0,value:e.family,style:{width:"100%"},prefixCls:"qxui-select",dropdownClassName:"qxui-zi-l",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(Xy,{label:"Custom Fonts",children:(0,y.jsx)(Zy,{value:"",children:"Default"},"default")}),(0,y.jsx)(Xy,{label:"Google Fonts",children:t.map((function(e,t){return(0,y.jsx)(Zy,{value:e.value.toString(),children:e.label},t)}))})]})]})}function Ky(e){return Ky="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ky(e)}function em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tm(e,t){return tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tm(e,t)}function nm(e,t){if(t&&("object"===Ky(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rm(e)}function rm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function om(e){return om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},om(e)}var im=ol.default.Option,am=["100","200","300","400","500","600","700","800","900"],lm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tm(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=om(r);if(o){var n=om(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return nm(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={value:e.value,expand:!1,fontFamilies:[],weights:[],family:null,weight:{label:"",value:"",clearable:!0},visible:!1},t.handleChange=t.handleChange.bind(rm(t)),t.token=jQuery("#jform_token").attr("name"),t.getFields=t.getFields.bind(rm(t)),t.showPopover=t.showPopover.bind(rm(t)),t.onReset=t.onReset.bind(rm(t)),t}return t=a,(n=[{key:"UNSAFE_componentWillMount",value:function(){var e=this;if(localStorage.getItem("qx-fonts"))this.setState(JSON.parse(localStorage.getItem("qx-fonts")));else{var t="".concat(tt(),"/index.php?option=com_quix&task=api.getWebFonts&").concat(this.token,"=1");jt().get(t).then((function(t){var n=[],r={};t.data.items.forEach((function(e){n.push(e.family),r[e.family]=e.variants})),localStorage.setItem("qx-fonts",JSON.stringify({fontFamilies:n,weights:r})),e.setState({fontFamilies:n,weights:r})}))}}},{key:"UNSAFE_componentWillReceiveProps",value:function(e,t){null!==e.value.family&&this.state.family!==e.value.family&&this.setState({family:e.value.family}),null===e.value.family&&this.props.onChange(ef()(e.value,{weight:{label:"",value:"",clearable:!0}}))}},{key:"handleChange",value:function(e){var t=ef()(this.props.value,e);this.state=t,this.setState({value:t}),this.props.onChange(t)}},{key:"getValue",value:function(){return this.state.value}},{key:"getFontWeights",value:function(e){var t=[];return _t(e)?am.map((function(e){return{label:e,value:e,clearable:!0}})):(this.state.weights[e]&&(t=this.state.weights[e].map((function(e){return{label:e,value:e,clearable:!0}}))),t)}},{key:"onReset",value:function(){this.props.onChange(this.props.default)}},{key:"getFields",value:function(){var e=this,t=this.props,n=(t.label,t.value);t.name,t.help,console.log("family",n);var r=n.family,o=n.size,i=n.spacing,a=n.height,l=n.weight,s=n.transform,c=n.style,u=n.text_shadow,p=n.decoration;return(0,y.jsxs)("div",{className:"qx-fb-field-typography",children:[(0,y.jsxs)("div",{className:"qx-grid qx-grid-small",children:[(0,y.jsx)("div",{className:"qx-width-2-3",children:(0,y.jsx)(Yy,{label:"Font",family:r,value:r,default:this.props.default.family,fontFamilies:this.state.fontFamilies,onChange:function(t){return e.handleChange({family:t})}})}),(0,y.jsxs)("div",{className:"qx-width-1-3",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Weight"}),(0,y.jsx)(ol.default,{defaultValue:l?l.toString():"400",onChange:function(t){return e.handleChange({weight:t})},allowClear:!0,value:l,getPopupContainer:function(){return window.document.body},children:this.getFontWeights(r).map((function(e,t){return(0,y.jsx)(im,{value:e.value.toString(),children:e.label},t)}))})]})]}),(0,y.jsx)("div",{className:"qx-fb-field-typography__size",children:(0,y.jsx)(qf,{label:"Size",min:0,max:200,value:o,units:["px","em","rem"],default:this.props.default.size,onChange:function(t){return e.handleChange({size:t})},responsive:!0})}),(0,y.jsxs)("div",{className:"qx-grid qx-grid-small",children:[(0,y.jsxs)("div",{className:"qx-width-1-3",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Transform"}),(0,y.jsxs)(ol.default,{defaultValue:s.toString(),value:s.toString(),onChange:function(t){return e.handleChange({transform:t})},children:[(0,y.jsx)(im,{value:"",children:"None"}),(0,y.jsx)(im,{value:"uppercase",children:"Uppercase"}),(0,y.jsx)(im,{value:"lowercase",children:"Lowercase"}),(0,y.jsx)(im,{value:"capitalize",children:"Capitalize"})]})]}),(0,y.jsxs)("div",{className:"qx-width-1-3",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Style"}),(0,y.jsxs)(ol.default,{defaultValue:c.toString(),value:c.toString(),onChange:function(t){return e.handleChange({style:t})},children:[(0,y.jsx)(im,{value:"",children:"Normal"}),(0,y.jsx)(im,{value:"italic",children:"Italic"}),(0,y.jsx)(im,{value:"oblique",children:"Oblique"})]})]}),(0,y.jsxs)("div",{className:"qx-width-1-3",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Decoration"}),(0,y.jsxs)(ol.default,{defaultValue:p.toString(),value:p.toString(),onChange:function(t){return e.handleChange({decoration:t})},children:[(0,y.jsx)(im,{value:"",children:"None"}),(0,y.jsx)(im,{value:"overline",children:"Overline"}),(0,y.jsx)(im,{value:"line-through",children:"Line Through"}),(0,y.jsx)(im,{value:"underline",children:"Underline"})]})]})]}),(0,y.jsx)("div",{className:"qx-fb-field-typograpy__height",children:(0,y.jsx)(qf,{label:"Line Height",max:40,step:.1,value:a,units:["px","em","rem"],default:this.props.default.height,onChange:function(t){return e.handleChange({height:t})},responsive:!0})}),(0,y.jsx)("div",{className:"qx-fb-field-typograpy__height",children:(0,y.jsx)(qf,{label:"Letter Spacing",min:-5,max:10,step:.1,value:i,units:["px","em","rem"],default:this.props.default.spacing,onChange:function(t){return e.handleChange({spacing:t})},responsive:!0})}),(0,y.jsx)("div",{className:"qx-fb-field-typograpy__text_shadow",children:(0,y.jsx)(oh,{label:"Text Shadow",value:u||(this.props.default.text_shadow?this.props.default.text_shadow:$y.text_shadow),default:this.props.default.text_shadow?this.props.default.text_shadow:$y.text_shadow,onChange:function(t){return e.handleChange({text_shadow:t})}})})]})}},{key:"showPopover",value:function(){this.setState({visible:!this.state.visible})}},{key:"render",value:function(){var e=!Zi()(this.props.default,this.props.value);return(0,y.jsxs)("div",{className:"qx-flex qx-flex-between qx-flex-middle",children:[(0,y.jsx)("div",{children:(0,y.jsx)("label",{className:"qx-fb-field__label qx-mb-0",htmlFor:"text_shadow",children:this.props.label})}),(0,y.jsxs)("div",{children:[e?(0,y.jsx)(p.default,{type:"link",className:"qx-text-meta",onClick:this.onReset,children:(0,y.jsx)("i",{className:"qxuicon-undo"})}):null,(0,y.jsx)(Vi.Z,{placement:"left",popupStyle:{width:"350px"},content:this.getFields(),trigger:"click",children:(0,y.jsx)(p.default,{className:e?"active":"",children:(0,y.jsx)("i",{className:"qxuicon-font"})})})]})]})}}])&&em(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);lm.propTypes={},lm.defaultProps={};const sm=lm;var cm=n(33023),um=n.n(cm);function pm(e){return pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pm(e)}function fm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dm(e,t){return dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dm(e,t)}function hm(e,t){if(t&&("object"===pm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ym(e)}function ym(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mm(e){return mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mm(e)}var bm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dm(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=mm(r);if(o){var n=mm(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return hm(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={},t.onChange=t.onChange.bind(ym(t)),t}return t=a,(n=[{key:"onChange",value:function(e){this.props.onChange({type:"video",properties:ef()(this.props.properties,e)})}},{key:"render",value:function(){var e=this,t=this.props.properties,n=this.props.default;return(0,y.jsx)("div",{className:"qx-fb-field-background__image",children:(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(vd,{filters:"video",value:t.url,label:"",onChange:function(t){e.onChange({url:t})},onReset:this.onChange.bind(this,{url:n.url})})})})}}])&&fm(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);bm.type="qxuicon-video";const vm=bm;function gm(e){return gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gm(e)}function xm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jm(e,t){return jm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jm(e,t)}function wm(e,t){if(t&&("object"===gm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Om(e)}function Om(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_m(e)}var Sm=[{label:"Center",value:"center"},{label:"Top Left",value:"top left"},{label:"Top",value:"top"},{label:"Top Right",value:"top right"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"},{label:"Bottom Left",value:"bottom left"},{label:"Bottom Right",value:"bottom right"},{label:"Left",value:"left"}],Pm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jm(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_m(r);if(o){var n=_m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wm(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={},t.onChange=t.onChange.bind(Om(t)),t}return t=a,(n=[{key:"onChange",value:function(e){this.props.onChange({type:"classic",properties:Vp()(this.props.properties,e)})}},{key:"render",value:function(){var e=this,t=this.props.properties,n=t.color,r=this.props.default,o=t.parallax?[{label:"CSS Based",value:"css"},{label:"JS Based",value:"js"}]:[{label:"CSS Based",value:"css"}],i=t.parallax?(0,y.jsx)("div",{className:"qx-margin-small-bottom",children:(0,y.jsx)(zh,{label:"Parallax Method",help:"Define the method, used for the parallax effect. CSS used background-fixed properties while JS gives you the true parallax effect using javascript libaray.",value:t.parallax_method,default:"true_parallax",responsive:!1,onChange:function(t){e.onChange({parallax_method:t})},onReset:this.onChange.bind(this,{parallax_method:r.parallax_method}),options:o})}):null,a="js"===t.parallax_method?(0,y.jsxs)("div",{children:[(0,y.jsxs)("div",{className:"qx-fb-field qx-margin-small-bottom",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"Y-Axis"}),(0,y.jsx)(Xo.default,{default:0,value:t.js_parallax_y,prefixCls:"qxui-input",placeholder:"-50",onChange:function(t){e.onChange({js_parallax_y:t.target.value})}})]}),(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)("p",{className:"qx-fb-field__label",children:"X-Axis"}),(0,y.jsx)(Xo.default,{value:t.js_parallax_x,placeholder:"-50",prefixCls:"qxui-input",onChange:function(t){e.onChange({js_parallax_x:t.target.value})}})]})]}):null;return(0,y.jsxs)("div",{className:"qx-fb-field-background__image",children:[(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(Qf,{onlyColorPicker:!0,label:"Color",value:n,onChange:function(t){return e.onChange({color:t})},onReset:this.onChange.bind(this,{color:r.color})})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(vd,{filters:"image",value:t.src,label:"",onChange:function(t){e.onChange({src:t})},onReset:this.onChange.bind(this,{src:r.src})})}),t.src&&t.required_parallax?(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(ky,{label:"Use Parallax Effect",help:"If enabled, your background image will stay fixed as your scroll, creating a fun parallax-like effect.",name:"parallax",checked:t.parallax,onChange:function(t){e.onChange({parallax:t})},onReset:this.onChange.bind(this,{parallax:r.size})})}):null,t.required_parallax?i:null,t.required_parallax?a:null,(0,y.jsxs)("div",{className:"qx-grid qx-grid-small qx-child-width-1-2",children:[t.src?(0,y.jsx)("div",{className:"qx-margin-small-bottom",children:(0,y.jsx)(zh,{label:"Size",value:t.size,default:"initial",responsive:!1,onChange:function(t){e.onChange({size:t})},options:[{label:"Cover",value:"cover"},{label:"Fit",value:"contain"},{label:"Actual Size",value:"initial"}]})}):null,t.src?(0,y.jsx)("div",{className:"qx-margin-small-bottom",children:(0,y.jsx)(zh,{label:"Position",value:t.position,default:"center",responsive:!1,onChange:function(t){e.onChange({position:t})},options:Sm})}):null,t.src?(0,y.jsx)("div",{children:(0,y.jsx)(zh,{label:"Repeat",value:t.repeat,default:"no-repeat",responsive:!1,onChange:function(t){e.onChange({repeat:t})},options:[{label:"No Repeat",value:"no-repeat"},{label:"Repeat",value:"repeat"},{label:"Repeat X ( Horizontal )",value:"repeat-x"},{label:"Repeat Y ( Vertical )",value:"repeat-y"},{label:"Space",value:"space"},{label:"Round",value:"round"}]})}):null,t.src?(0,y.jsx)("div",{children:(0,y.jsx)(zh,{label:"Blend Mode",value:t.blend,default:"normal",responsive:!1,onChange:function(t){e.onChange({blend:t})},help:"Set background color in order to use blend mode properly",options:[{label:"Normal",value:"normal"},{label:"Multiply",value:"multiply"},{label:"Screen",value:"screen"},{label:"Overlay",value:"overlay"},{label:"Darken",value:"darken"},{label:"Lighten",value:"lighten"},{label:"Color Dodge",value:"color-dodge"},{label:"Saturation",value:"saturation"},{label:"Color",value:"color"},{label:"Luminosity",value:"luminosity"}]})}):null]})]})}}])&&xm(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Pm.type="qxuicon-paint-brush";const qm=Pm;var Cm=n(41957),km=n.n(Cm);function Nm(e){return Nm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nm(e)}function Em(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tm(e,t){return Tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tm(e,t)}function Dm(e,t){if(t&&("object"===Nm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Am(e)}function Am(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Im(e){return Im=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Im(e)}function Mm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lm=[{label:"Center Center",value:"center center"},{label:"Center left",value:"center left"},{label:"Center right",value:"center right"},{label:"Top Center",value:"top center"},{label:"Top left",value:"top left"},{label:"Top Right",value:"top right"},{label:"Bottom Center",value:"bottom center"},{label:"Bottom Left",value:"bottom left"},{label:"Bottom Right",value:"bottom right"}],Bm=[{label:"Linear",value:"linear"},{label:"Radial",value:"radial"}],Fm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tm(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Im(r);if(o){var n=Im(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Dm(this,e)});function a(){var e;Em(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Mm(Am(e=i.call.apply(i,[this].concat(n))),"state",{defaultPosition:0}),Mm(Am(e),"onChange",(function(t){e.props.onChange({type:"gradient",properties:ef()(e.props.properties,t)})})),Mm(Am(e),"onReset",(function(){e.props.onReset&&e.props.onReset()})),Mm(Am(e),"renderDirection",(function(){return"linear"===e.props.properties.type?e.renderLinearDirection():e.renderRadialDirection()})),Mm(Am(e),"renderLinearDirection",(function(){var t=e.props.default,n="linear"===e.props.properties.type&&(lh()(e.props.properties.direction)||lh()(e.props.properties.direction.value))?km()(e.props.properties.direction.value)?e.props.properties.direction:e.props.properties.direction.value:e.state.defaultPosition;return(0,y.jsx)(qf,{responsive:!1,default:t.direction,units:["deg"],label:"Direction",value:n,max:360,onChange:function(t){e.onChange({direction:t})},onReset:e.onChange.bind(Am(e),{direction:t.direction})})})),Mm(Am(e),"renderRadialDirection",(function(){var t="radial"!==e.props.properties.type||lh()(e.props.properties.direction)?"center center":e.props.properties.direction,n=e.props.default;return(0,y.jsx)(zh,{label:"Direction",value:t,default:"center center",responsive:!1,onChange:function(t){e.onChange({direction:t})},onReset:e.onChange.bind(Am(e),{direction:n.direction}),options:Lm})})),Mm(Am(e),"getGradientPreview",(function(){var t={},n=e.props.properties,r=n.type,o=n.color_1,i=n.color_2,a=n.start_position,l=n.end_position,s=n.direction;return"linear"===r?t.backgroundImage="linear-gradient(".concat(s,"deg, ").concat(o," ").concat(a,"%, ").concat(i," ").concat(l,"%)"):"radial"===r&&(t.backgroundImage="radial-gradient(at ".concat(s,", ").concat(o," ").concat(a,"%, ").concat(i," ").concat(l,"%)")),(0,y.jsx)("div",{className:"gradient-preview qx-box-shadow-medium qx-margin-small-bottom qx-height-small qx-position-relative qx-transition-toggle qx-border-rounded",style:t,children:(0,y.jsx)(p.default,{className:"qx-position-top-right qx-transition-scale-up",type:"text",onClick:e.onReset,children:(0,y.jsx)("span",{className:"qxuicon-trash-alt qx-blend-difference"})})})})),e}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props.properties,n=t.color_1,r=t.color_2,o=this.props.default;return(0,y.jsxs)("div",{className:"qx-background__gradient",children:[this.getGradientPreview(),(0,y.jsxs)("div",{className:"qx-flex qx-margin-small-bottom",children:[(0,y.jsx)("div",{children:(0,y.jsx)(Qf,{addonAfter:"Select",value:n,label:"Color 1",onChange:function(t){e.onChange({color_1:t})},onReset:this.onChange.bind(this,{color_1:o.color_1,color_2:o.color_2})})}),(0,y.jsx)("div",{className:"qx-margin-auto-left",children:(0,y.jsx)(Qf,{addonAfter:"Select",value:r,label:"Color 2",onChange:function(t){e.onChange({color_2:t})},onReset:this.onChange.bind(this,{color_1:o.color_1,color_2:o.color_2})})})]}),(0,y.jsxs)("div",{className:"qx-flex qx-margin-small-bottom",children:[(0,y.jsx)("div",{className:"qx-margin-small-right",children:(0,y.jsx)(zh,{value:this.props.properties.type,default:"linear",responsive:!1,label:"Type",onChange:function(t){var n=0;"radial"===t&&(n="center center"),e.onChange({type:t,direction:n})},onReset:this.onChange.bind(this,{type:o.type}),options:Bm})}),(0,y.jsx)("div",{className:"qx-width-expand qx-margin-small-left",children:this.renderDirection()})]}),(0,y.jsxs)("div",{className:"qx-fllex",children:[(0,y.jsx)("div",{children:(0,y.jsx)(qf,{responsive:!1,default:o.start_position,label:"Start Position",units:null,value:this.props.properties.start_position?km()(this.props.properties.start_position.value)?this.props.properties.start_position:this.props.properties.start_position.value:this.state.defaultPosition,onChange:function(t){return e.onChange({start_position:t})},onReset:this.onChange.bind(this,{start_position:o.start_position})})}),(0,y.jsx)("div",{children:(0,y.jsx)(qf,{responsive:!1,default:o.end_position,label:"End Position",units:null,value:this.props.properties.end_position?km()(this.props.properties.end_position.value)?this.props.properties.end_position:this.props.properties.end_position.value:this.state.defaultPosition,onChange:function(t){e.onChange({end_position:t})},onReset:this.onChange.bind(this,{end_position:o.end_position})})})]})]})}}])&&Rm(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Fm.type="qxuicon-adjust";const Um=Fm;function zm(e){return zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zm(e)}function Hm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(e,t){return Wm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wm(e,t)}function Gm(e,t){if(t&&("object"===zm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jm(e)}function Jm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vm(e){return Vm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vm(e)}function $m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zm=p.default.Group,Xm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wm(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vm(r);if(o){var n=Vm(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gm(this,e)});function a(){var e;Hm(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $m(Jm(e=i.call.apply(i,[this].concat(n))),"state",{type:"classic",types:{classic:qm,gradient:Um,video:vm}}),$m(Jm(e),"setType",(function(t){e.setState({type:t})})),$m(Jm(e),"onChange",(function(t){var n={state:{}},r="normal";"normal"===e.props.state&&(r="hover"),n.state[e.props.state]=ef()(e.props.value.state[e.props.state],t),n.state[r]=e.props.value.state[r],e.props.onChange(ef()(e.props.value,n))})),$m(Jm(e),"onReset",(function(){e.props.onReset&&e.props.onReset()})),$m(Jm(e),"onCommonPropertyChange",(function(t){var n=e.props.value.state[e.props.state];n=Vp()(n,t);var r={state:{}};r.state[e.props.state]=n;var o="normal";"normal"===e.props.state&&(o="hover"),r.state[o]=e.props.value.state[o],e.props.onChange(ef()(e.props.value,r))})),$m(Jm(e),"renderBackgroundType",(function(){return(0,y.jsxs)("div",{className:"qx-fb-field-background__types",children:[(0,y.jsx)("label",{className:"qx-fb-field__label",children:"Background Type"}),(0,y.jsx)(Zm,{prefixCls:"qxui-btn-group",children:e.props.supportedTypes.map((function(t,n){return(0,y.jsx)(c.default,{title:t.toUpperCase(),children:(0,y.jsx)(p.default,{onClick:e.setType.bind(Jm(e),t),className:e.state.type===t?"active":"",children:(0,y.jsx)("i",{className:e.state.types[t].type})},n)},n)}))})]})})),$m(Jm(e),"renderBackgroundProperties",(function(){var t;switch(t=e.state.type===e.props.value.state[e.props.state].type?e.props.value.state[e.props.state].properties:e.props.types[e.state.type].properties,e.state.type){case"classic":return(0,y.jsx)(qm,{properties:t,default:e.props.types.classic.properties,onChange:e.onChange,onReset:e.onReset});case"gradient":return(0,y.jsx)(Um,{properties:t,default:e.props.types.gradient.properties,onChange:e.onChange,onReset:e.onReset});case"video":return(0,y.jsx)(vm,{properties:t,default:e.props.types.video.properties,onChange:e.onChange,onReset:e.onReset});default:return""}})),$m(Jm(e),"renderCommonProperties",(function(){var t=e.props.value.state[e.props.state],n=e.props.default.state[e.props.for];return(0,y.jsxs)("div",{className:"qx-fb-field-background__common",children:[t.required_opacity?(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{units:!1,responsive:!1,label:"Opacity",min:0,max:1,step:.01,value:t.opacity,onChange:function(t){return e.onCommonPropertyChange({opacity:t})},onReset:function(){var r={};r[e.props.state]=ef()(t,{opacity:n.opacity}),e.props.onReset(r)}})}):null,"hover"===e.props.state&&t.required_transition?(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(qf,{units:!1,responsive:!1,label:"Transition",defaultUnit:"s",min:0,max:3,step:.1,value:t.transition,onChange:function(t){return e.onCommonPropertyChange({transition:t})},onReset:function(){var r={};r[e.props.state]=ef()(t,{transition:n.transition}),e.props.onReset(r)}})}):null]})})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.setState({type:this.props.value.state[this.props.state].type})}},{key:"render",value:function(){return(0,y.jsxs)("div",{children:[this.renderBackgroundType(),(0,y.jsxs)("div",{className:"qx-fb-field-background__fields",children:[this.renderBackgroundProperties(),this.renderCommonProperties()]})]})}}])&&Qm(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);const Ym=Xm;function Km(e){return Km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Km(e)}function eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tb(e,t){return tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tb(e,t)}function nb(e,t){if(t&&("object"===Km(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return rb(e)}function rb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ob(e){return ob=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ob(e)}var ib=qi.default.TabPane;const ab=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tb(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ob(r);if(o){var n=ob(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return nb(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={state:"normal",visible:!1},t.onReset=t.onReset.bind(rb(t)),t.onTabChange=t.onTabChange.bind(rb(t)),t.getFields=t.getFields.bind(rb(t)),t.showPopover=t.showPopover.bind(rb(t)),t}return t=a,(n=[{key:"onTabChange",value:function(e){this.setState({state:e})}},{key:"onReset",value:function(){this.props.onChange(this.props.default)}},{key:"getFields",value:function(){var e=this.props.tab;return um()(e)?(0,y.jsx)(Ym,{for:e,state:this.state.state,value:this.props.value,onChange:this.props.onChange,supportedTypes:this.props.supportedTypes,types:this.props.types,onReset:this.onReset,default:this.props.default}):(0,y.jsx)("div",{className:"qx-fb-field-background",children:(0,y.jsxs)(qi.default,{defaultActiveKey:"normal",onChange:this.onTabChange,children:[(0,y.jsx)(ib,{tab:"Normal",children:(0,y.jsx)(Ym,{for:"normal",state:this.state.state,value:this.props.value,onChange:this.props.onChange,supportedTypes:this.props.supportedTypes,types:this.props.types,onReset:this.onReset,default:this.props.default})},"normal"),(0,y.jsx)(ib,{tab:"Hover",children:(0,y.jsx)(Ym,{for:"hover",state:this.state.state,value:this.props.value,onChange:this.props.onChange,supportedTypes:this.props.supportedTypes,types:this.props.types,onReset:this.onReset,default:this.props.default})},"hover")]})})}},{key:"showPopover",value:function(){this.setState({visible:!this.state.visible})}},{key:"render",value:function(){var e=!Zi()(this.props.default,this.props.value);return this.props.popover?(0,y.jsxs)("div",{className:"qx-flex qx-flex-between qx-flex-middle",children:[(0,y.jsx)("div",{children:(0,y.jsx)("label",{className:"qx-fb-field__label",children:this.props.label})}),(0,y.jsxs)("div",{children:[e?(0,y.jsx)(c.default,{title:"Reset to default",children:(0,y.jsx)(p.default,{type:"link",className:"qx-text-meta",onClick:this.onReset,children:(0,y.jsx)("i",{className:"qxuicon-undo"})})}):null,(0,y.jsx)(Vi.Z,{placement:"left",popupStyle:{width:"350px"},content:this.getFields(),trigger:"click",children:(0,y.jsx)(p.default,{className:e?"active":"",children:(0,y.jsx)("i",{className:"qxuicon-paint-brush"})})})]})]}):this.getFields()}}])&&eb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);function lb(e){return lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lb(e)}function sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cb(e,t){return cb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cb(e,t)}function ub(e,t){if(t&&("object"===lb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pb(e)}function pb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fb(e){return fb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fb(e)}var db=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cb(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fb(r);if(o){var n=fb(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ub(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o=function(){var e=st(),n="".concat(tt(),"/index.php?option=com_quix&task=api.getJoomlaModules&").concat(e,"=1");jt().get(n).then((function(e){var n=e.data.data;n=n.map((function(e){return{label:e.title,value:e.id}})),t.setState({options:n})}))},(r="getModuleList")in(n=pb(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.state={options:[]},t.getModuleList(),t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.value;return(0,y.jsx)(zh,{label:n,value:r,default:"",responsive:!1,onChange:function(t){return e.props.onChange(t)},onReset:function(){return e.props.onChange("")},options:this.state.options})}}])&&sb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);const hb=db;function yb(e){return yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yb(e)}function mb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bb(e,t){return bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bb(e,t)}function vb(e,t){if(t&&("object"===yb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gb(e)}function gb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xb(e){return xb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xb(e)}var jb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bb(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xb(r);if(o){var n=xb(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vb(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o=function(){var e=st(),n="".concat(tt(),"/index.php?option=com_quix&task=api.getJoomlaCategories&").concat(e,"=1");jt().get(n).then((function(e){var n=e.data.data;n=n.map((function(e){return{label:e.text,value:e.value}})),t.setState({options:n})}))},(r="getCategoryList")in(n=gb(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.state={options:[]},t.getCategoryList(),t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.value;return(0,y.jsx)(zh,{label:n,value:r,default:"",responsive:!1,onChange:function(t){return e.props.onChange(t)},onReset:function(){return e.props.onChange("")},options:this.state.options})}}])&&mb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);const wb=jb;function Ob(e){return Ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ob(e)}function _b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sb(e,t){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sb(e,t)}function Pb(e,t){if(t&&("object"===Ob(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qb(e)}function qb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cb(e){return Cb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cb(e)}var kb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sb(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Cb(r);if(o){var n=Cb(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Pb(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o=function(){var e=st(),n="".concat(tt(),"/index.php?option=com_quix&task=api.getJoomlaArticles&").concat(e,"=1");jt().get(n).then((function(e){var n=e.data.data;n=n.map((function(e){return{label:e.title,value:e.id}})),t.setState({options:n})}))},(r="getArticleList")in(n=qb(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.state={options:[]},t.getArticleList(),t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.value;return(0,y.jsx)(zh,{label:n,value:r,default:"",responsive:!1,onChange:function(t){return e.props.onChange(t)},onReset:function(){return e.props.onChange("")},options:this.state.options})}}])&&_b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);const Nb=kb;function Eb(e){return Eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eb(e)}function Rb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tb(e,t){return Tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tb(e,t)}function Db(e,t){if(t&&("object"===Eb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ab(e)}function Ab(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ib(e){return Ib=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ib(e)}const Mb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tb(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ib(r);if(o){var n=Ib(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Db(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o=function(){for(var e=document.getElementById("jform_menutype").options,t=[],n=e.length,r=0;r<n;r++){var o=[];o.value=e[r].value,o.label=e[r].text,t.push(o)}return t},(r="getApiData")in(n=Ab(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.state={options:t.getApiData()},t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.value;return(0,y.jsx)(zh,{label:n,value:r,default:"",responsive:!1,onChange:function(t){return e.props.onChange(t)},onReset:function(){return e.props.onChange("")},options:this.state.options})}}])&&Rb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);var Lb=n(38268),Bb=n(99749);n(83140);const Fb=(0,Bb.default)(Lb.Z);var Ub=n(44477);function zb(e){return zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zb(e)}function Hb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wb(e,t){return Wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wb(e,t)}function Gb(e,t){if(t&&("object"===zb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jb(e)}function Jb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vb(e){return Vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vb(e)}function $b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wb(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vb(r);if(o){var n=Vb(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gb(this,e)});function a(){var e;Hb(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $b(Jb(e=i.call.apply(i,[this].concat(n))),"state",{open:!1}),$b(Jb(e),"getLabelMarkup",(function(){var t=e.props.label;return(0,y.jsxs)("p",{className:"qx-fb-field__label",children:[t," ",e.getHelpMarkup()," "]})})),$b(Jb(e),"getHelpMarkup",(function(){var t=e.props.help;if(t)return(0,y.jsx)(Vi.Z,{content:t,prefixCls:"qxui-popover",overlayClassName:"qxui-zi-l",placement:"right",popupStyle:{width:"350px"},children:(0,y.jsx)("i",{className:"qxuicon-question-circle qx-fb-field__help"})})})),$b(Jb(e),"handleDateChange",(function(t){if(null!==t){var n,r=t.format(null!==(n=e.props.format)&&void 0!==n?n:"YYYY-MM-DD HH:mm:ss");e.props.onChange(JSON.stringify({string:r}))}else e.props.onChange(JSON.stringify({}));e.setState({open:!1})})),e}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props.value,n=this.props.format||"YYYY-MM-DD HH:mm:ss",r=(t=t?JSON.parse(t).string:"")?Ub.Z.locale.parse("en",t,[n]):null;return(0,y.jsxs)("div",{className:"qx-fb-field-text",children:[this.getLabelMarkup(),(0,y.jsx)(Fb,{showTime:!0,format:n,defaultValue:r,getContainer:function(){return window.document.body},prefixCls:"qxui-picker",style:{width:"100%"},getPopupContainer:function(){return window.document.body},getCalendarContainer:function(){return window.document.body},open:this.state.open,onChange:this.handleDateChange,onOpenChange:function(t){e.state.open||e.setState({open:t})},onOk:function(t){return e.setState({open:!1}),t}})]})}}])&&Qb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Zb.propTypes={},Zb.defaultProps={};const Xb=Zb;function Yb(e){return Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yb(e)}function Kb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ev(e,t)}function tv(e,t){if(t&&("object"===Yb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nv(e)}function nv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rv(e){return rv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rv(e)}const ov=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ev(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rv(r);if(o){var n=rv(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return tv(this,e)});function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o=function(){var e=rt().map((function(e){return{label:e.title,value:e.id}}));t.setState({options:e})},(r="getTemplateList")in(n=nv(t=i.call(this,e)))?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.state={options:[]},t}return t=a,(n=[{key:"componentDidMount",value:function(){this.getTemplateList()}},{key:"render",value:function(){var e=this,t=this.props,n=t.label,r=t.value;return(0,y.jsx)(zh,{label:n,value:r,default:"",responsive:!1,onChange:function(t){return e.props.onChange(t)},onReset:function(){return e.props.onChange("")},options:this.state.options})}}])&&Kb(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);var iv;function av(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lv(e,t){return lv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lv(e,t)}function sv(e,t){if(t&&("object"===fv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cv(e)}function cv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uv(e){return uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uv(e)}function pv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fv(e){return fv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fv(e)}function dv(e){return function(e){if(Array.isArray(e))return hv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var yv=(0,v.$j)((function(e,t){var n=e.form.node,r=t.control,o=t.path,i=!0;if(r.depends&&Object.keys(r.depends).length>0){var a=dv(o).slice(0,-1),l=er(n,["form"].concat(dv(a)));for(var s in r.depends)if(r.depends.hasOwnProperty(s)){var c=er(l,s.split(".")),u=r.depends[s];if("object"!==fv(u)){if("*"===u){if(!c){i=!1;break}}else if(c!==r.depends[s]){i=!1;break}}else if(Array.isArray(u)&&!u.includes(c)){i=!1;break}}}return{shouldShow:i,value:r.value}}))(iv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lv(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=uv(r);if(o){var n=uv(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return sv(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),pv(cv(t=i.call(this,e)),"onReset",(function(){var e=t.props;(0,e.update)(e.options.default)})),pv(cv(t),"onChange",(function(e){t.setState({value:e}),t.bubbleChange(e)})),pv(cv(t),"bubbleChange",Ns()((function(e){(0,t.props.update)(e)}),20)),t.state={value:e.value,parentValue:null},t}return t=a,n=[{key:"componentDidUpdate",value:function(e,t,n){this.props.value!==this.state.parentValue&&this.setState({value:this.props.value,parentValue:this.props.value})}},{key:"render",value:function(){var e=this.props,t=e.hidden;if(!e.shouldShow)return null;var n,r,o=this.state.value,i=this.props.options,a=i.help,l=i.name,s=i.label,c=i.type,u=i.placeholder,p=i.reset;switch(c){case"border":r=(0,y.jsx)(oy,{name:l,label:s,help:a,value:o,onChange:this.onChange,onReset:this.onReset,reset:p,default:this.props.options.default,popover:i.popover});break;case"media":r=(0,y.jsx)(vd,{value:o,label:s,name:l,help:a,className:i.class,showstyle:i.showstyle,onChange:this.onChange,onReset:this.onReset,reset:p,filters:this.props.options.filters});break;case"date":r=(0,y.jsx)(Xb,{value:o,label:s,name:l,help:a,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"time":r=(0,y.jsx)(TimePicker,{value:o,label:s,name:l,help:a,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"acl":r=(0,y.jsx)(Tp,{value:o,label:s,name:l,help:a,default:this.props.options.default,select:this.props.options.select,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"jmenu":r=(0,y.jsx)(Mb,{value:o,label:s,name:l,help:a,default:this.props.options.default,select:this.props.options.select,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"jmodule":r=(0,y.jsx)(hb,{value:o,label:s,name:l,help:a,default:this.props.options.default,select:this.props.options.select,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"jcategory":r=(0,y.jsx)(wb,{value:o,label:s,name:l,help:a,default:this.props.options.default,select:this.props.options.select,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"jarticle":r=(0,y.jsx)(Nb,{value:o,label:s,name:l,help:a,default:this.props.options.default,select:this.props.options.select,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"templates":r=(0,y.jsx)(ov,{value:o,label:s,name:l,help:a,default:this.props.options.default,select:this.props.options.select,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"editor":r=(0,y.jsx)(Gd,{value:o,label:s,name:l,help:a,onChange:this.onChange,onReset:this.onReset,reset:p,className:i.class});break;case"color":r=(0,y.jsx)(Qf,{value:o,label:s,name:l,help:a,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"slider":r=(0,y.jsx)(qf,{value:o,default:this.props.options.default,units:this.props.options.units,responsive:this.props.options.responsive,label:s,help:a,step:i.step,min:i.min,max:i.max,suffix:i.suffix,className:i.class,onChange:this.onChange,onReset:this.onReset});break;case"typography":r=(0,y.jsx)(sm,{value:o,default:this.props.options.default,units:this.props.options.units,label:s,name:l,help:a,className:i.class,popover:i.popover,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"dimensions":r=(0,y.jsx)(xh,{className:i.class,default:this.props.options.default,units:this.props.options.units,value:o,label:s,help:a,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"link":r=(0,y.jsx)(Wp,{name:l,label:s,help:a,text:o.text,url:o.url,target:o.target,nofollow:o.nofollow,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"select":r=(0,y.jsx)(zh,{value:o,default:this.props.options.default,select:this.props.options.select,responsive:this.props.options.responsive,path:this.props.options.element_path,label:s,name:l,help:a,multiple:i.multiple,tags:i.tags,className:i.class,options:i.options,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"switch":r=(0,y.jsx)(ky,{name:l,label:s,help:a,checked:o,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"text":r=(0,y.jsx)(aa,{help:a,label:s,value:o,default:this.props.options.default,placeholder:u,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p,readOnly:"readonly"===i.advanced});break;case"textarea":r=(0,y.jsx)(Vy,{help:a,label:s,value:o,placeholder:u,rows:i.rows,className:i.class,onChange:this.onChange,onReset:this.onReset,reset:p});break;case"divider":r=(0,y.jsx)(Iy,{label:s,help:a,reset:p});break;case"hidden":r=(0,y.jsx)(My,{});break;case"background":r=(0,y.jsx)(ab,{name:l,label:s,help:a,value:o,onChange:this.onChange,onReset:this.onReset,reset:p,supportedTypes:this.props.options.supportedTypes,tab:this.props.options.tab,types:this.props.options.types,default:this.props.options.default,popover:i.popover});break;case"choose":r=(0,y.jsx)(jy,{name:l,label:s,help:a,value:o,onChange:this.onChange,onReset:this.onReset,reset:p,responsive:this.props.options.responsive,options:this.props.options.options,default:this.props.options.default});break;case"code":r=(0,y.jsx)(yl,{name:l,label:s,help:a,value:o,onChange:this.onChange,onReset:this.onReset,reset:p,default:this.props.options.default})}return n=Ve()("qx-fb-field",{hide:t}),(0,y.jsx)("div",{className:n,children:r})}}],n&&av(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||iv;yv.propTypes={options:ds().object,onChange:ds().func};const mv=yv;function bv(e){return bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bv(e)}var vv;function gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gv(Object(n),!0).forEach((function(t){qv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ov(e,t){return Ov=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ov(e,t)}function _v(e,t){if(t&&("object"===bv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sv(e)}function Sv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pv(e)}function qv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cv={updateNodeField:ke},kv=(0,v.$j)((function(e){return{nodePath:e.form.path}}),Cv)(vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ov(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pv(r);if(o){var n=Pv(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _v(this,e)});function a(){var e;jv(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qv(Sv(e=i.call.apply(i,[this].concat(n))),"updateNodeField",(function(t){var n=e.props,r=n.nodePath,o=n.path;(0,n.updateNodeField)(r,o,t)})),e}return t=a,(n=[{key:"shouldComponentUpdate",value:function(e,t,n){return this.props.control!==e.control}},{key:"render",value:function(){var e=this.props.control;return e.hidden?null:(0,y.jsx)(mv,xv(xv({},this.props),{},{options:e,update:this.updateNodeField}))}}])&&wv(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||vv;kv.propTypes={},kv.defaultProps={};const Nv=kv;function Ev(e){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ev(e)}var Rv;function Tv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Av(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Iv(e,t){return Iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Iv(e,t)}function Mv(e,t){if(t&&("object"===Ev(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lv(e)}function Lv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bv(e)}function Fv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uv=il.Z.Panel,zv={updateNodeField:ke},Hv=(0,v.$j)((function(e){return{nodePath:e.form.path}}),zv)(Rv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Iv(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bv(r);if(o){var n=Bv(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Mv(this,e)});function a(){var e;Dv(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Fv(Lv(e=i.call.apply(i,[this].concat(n))),"sortable",null),Fv(Lv(e),"state",{activeKey:null}),e}return t=a,n=[{key:"componentDidMount",value:function(){var e=this;window.qxUIkit.util.on(".qx-sortable","moved",(function(t){e.sortGroups(t)})),console.log("remount")}},{key:"componentDidUpdate",value:function(e,t,n){if(this.sortable){var r=this.sortable.children().toArray().sort((function(e,t){var n=+e.getAttribute("data-index"),r=+t.getAttribute("data-index");return n>r?1:n<r?-1:0}));this.sortable.html(r),this.sortable=null}}},{key:"sortGroups",value:function(e){var t=this;console.log("Set groups called"),this.sortable=jQuery(e.target);var n=this.sortable.children().map((function(e,t){return t.getAttribute("data-index")})).toArray().map((function(e){return t.props.form[e]}));this.props.updateNodeField(this.props.nodePath,this.props.path,n)}},{key:"activateTab",value:function(e){e===this.state.activeKey&&(e=null),this.setState({activeKey:e})}},{key:"handleCopyClick",value:function(e,t){t.stopPropagation(),t.preventDefault();var n=this.props,r=n.form,o=n.nodePath,i=n.path,a=n.updateNodeField,l=ar(r[e]);l.title="".concat(l.title," (copy)"),a(o,i,Vn(r,e+1,l))}},{key:"handleDeleteClick",value:function(e,t){t.stopPropagation(),t.preventDefault();var n=this.props,r=n.form,o=n.nodePath,i=n.path,a=n.updateNodeField;if(1!==r.length){var l=function(e,t){var n=e.slice(0,+t),r=e.slice(+t+1);return[].concat(vn(n),vn(r))}(r,e);a(o,i,l)}else m.error("You can't remove the last item")}},{key:"renderGroup",value:function(e,t){var n,r,o=this.props,i=o.path,a=o.removeGroup,l=o.copyGroup,s=o.form,u=null===(n=s[t])||void 0===n?void 0:n[Object.keys(s[t])[0]],f=(0,y.jsxs)("div",{className:"qx-repeater-controls qx-transition-slide-right-small qx-position-right",children:[(0,y.jsx)(c.default,{title:"Duplicate",children:(0,y.jsx)(p.default,{type:"text",onClick:this.handleCopyClick.bind(this,t),children:(0,y.jsx)("i",{className:"qxuicon-clone"})})}),(0,y.jsx)(c.default,{title:"Delete",children:(0,y.jsx)(p.default,{type:"text",onClick:this.handleDeleteClick.bind(this,t),children:(0,y.jsx)("i",{className:"qxuicon-trash-alt"})})})]}),d=(0,y.jsxs)("div",{className:"qx-transition-toggle qx-position-relative qx-overflow-hidden",children:[(0,y.jsx)("div",{className:"qx-text-truncate",children:u}),f]});return i=[].concat(function(e){if(Array.isArray(e))return Tv(e)}(r=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Tv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tv(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[t]),(0,y.jsx)(Uv,{index:t,header:d,showArrow:!1,children:(0,y.jsx)(kg,{index:t,path:i,control:e,fields:e,form:s[t],copyGroup:l,removeGroup:a})},i.join())}},{key:"render",value:function(){var e=this,t=this.props.groups.map((function(t,n){return e.renderGroup(t,n)}));return(0,y.jsx)(il.Z,{accordion:!0,className:"qx-background-default qx-sortable","qx-sortable":"handle: .qx-drag",children:t})}}],n&&Av(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Rv;Hv.propTypes={groups:ds().array.isRequired,path:ds().array.isRequired};const Qv=Hv;function Wv(e){return Wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wv(e)}var Gv;function Jv(e){return function(e){if(Array.isArray(e))return Vv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Vv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xv(e,t){return Xv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xv(e,t)}function Yv(e,t){if(t&&("object"===Wv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kv(e)}function Kv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eg(e){return eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eg(e)}function tg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ng={updateNodeField:ke},rg=(0,v.$j)((function(e){return{nodePath:e.form.path}}),ng)(Gv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xv(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=eg(r);if(o){var n=eg(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yv(this,e)});function a(){var e;$v(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tg(Kv(e=i.call.apply(i,[this].concat(n))),"handleAddNewGroup",(function(){var t=e.props,n=t.control,r=t.form,o=t.nodePath,i=t.path,a=t.updateNodeField,l=ir(n);a(o,i,[].concat(Jv(r),[l[0]]))})),tg(Kv(e),"getMappedGroupForForm",(function(){var t=e.props,n=t.control.value,r=t.form,o=ar(n[0]);return r.map((function(){return o}))})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.path,n=e.form,r=this.getMappedGroupForForm();return(0,y.jsxs)("div",{className:"qx-fb-group-repeater",children:[(0,y.jsx)(Qv,{groups:r,path:t,form:n}),(0,y.jsx)(c.default,{title:"Add Item",children:(0,y.jsx)(p.default,{type:"primary",shape:"circle",className:"qx-margin-small-top qx-margin-auto qx-display-block",style:{fontSize:"10px"},onClick:this.handleAddNewGroup,children:(0,y.jsx)("i",{className:"qxuicon-plus"})})})]})}}])&&Zv(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Gv;rg.propTypes={control:ds().object.isRequired,path:ds().array.isRequired};const og=rg;function ig(e){return ig="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ig(e)}function ag(e){return function(e){if(Array.isArray(e))return lg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return lg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lg(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ug(e,t){return ug=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ug(e,t)}function pg(e,t){if(t&&("object"===ig(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fg(e)}function fg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dg(e)}function hg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ug(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=dg(r);if(o){var n=dg(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return pg(this,e)});function a(){var e;sg(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return hg(fg(e=i.call.apply(i,[this].concat(n))),"shouldComponentUpdate",_o()),hg(fg(e),"renderField",(function(e,t,n,r){return(0,y.jsx)(a,{index:t,className:"row",control:e,form:r[e.name],path:[].concat(ag(n),[e.name])},t)})),e}return t=a,n=[{key:"render",value:function(){var e=this,t=this.props,n=t.control,r=t.path,o=t.form,i=n.ref,a=n.type;return 0===(null==n?void 0:n.schema.length)&&(void 0!==o?n.value=ar(o):"object"===ig(n.value)&&(n.value=ar(n.value))),"group-repeater"===a?(0,y.jsx)(og,{path:r,control:n,form:o},i):"fields-group"===a?n.value.map((function(t,n){return e.renderField(t,n,r,o)})):(0,y.jsx)(Nv,{hidden:n.hidden,control:n,path:r},i)}}],n&&cg(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);hg(yg,"propTypes",{control:ds().object.isRequired,path:ds().array.isRequired});const mg=yg;function bg(e){return bg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bg(e)}function vg(e){return function(e){if(Array.isArray(e))return gg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gg(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wg(e,t){return wg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wg(e,t)}function Og(e,t){if(t&&("object"===bg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _g(e)}function _g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sg(e){return Sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sg(e)}function Pg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qg=il.Z.Panel,Cg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wg(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Sg(r);if(o){var n=Sg(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Og(this,e)});function a(){var e;xg(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Pg(_g(e=i.call.apply(i,[this].concat(n))),"shouldComponentUpdate",_o()),Pg(_g(e),"renderComponent",(function(t,n){var r=e.props,o=r.path,i=r.form,a=[].concat(vg(o),[t.name]),l=[].concat(vg(a),[n]).join(","),s=(0,y.jsx)(mg,{control:t,form:i[t.name],index:n,path:a},l);return 1===o.length?(0,y.jsx)(qg,{header:t.label,children:s},l):s})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.fields,n=e.path;return 1===n.length?(0,y.jsx)(il.Z,{defaultActiveKey:[[].concat(vg(n),[t[0].name,0]).join(",")],default:!0,accordion:!0,ghost:!0,expandIconPosition:"end",children:t.map(this.renderComponent)}):(0,y.jsx)(y.Fragment,{children:t.map(this.renderComponent)})}}])&&jg(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Cg.propTypes={path:ds().array.isRequired};const kg=Cg;function Ng(e){return Ng="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ng(e)}var Eg;function Rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rg(Object(n),!0).forEach((function(t){Fg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ig(e,t){return Ig=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ig(e,t)}function Mg(e,t){if(t&&("object"===Ng(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lg(e)}function Lg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bg(e){return Bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bg(e)}function Fg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ug=qi.default.TabPane,zg={hideFormModal:function(){return{type:ge,payload:{node:null,path:null}}},replaceNode:Ie};const Hg=(0,v.$j)((function(e){var t=e.form,n=t.node,r=t.schema,o=t.path;return{form:null==n?void 0:n.form,node:n,path:o,schema:r}}),zg)(Eg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ig(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bg(r);if(o){var n=Bg(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Mg(this,e)});function a(){var e;Dg(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Fg(Lg(e=i.call.apply(i,[this].concat(n))),"state",{active:"general",show:!0,id:lr("qx")}),Fg(Lg(e),"shouldComponentUpdate",_o()),Fg(Lg(e),"handleTabClick",(function(t){e.setState({active:t})})),Fg(Lg(e),"handleTabChange",(function(e){window.QUIX=Tg(Tg({},window.QUIX||{}),{},{formTab:e})})),Fg(Lg(e),"handleCloseClick",(function(){e.props.isDirty&&console.log("you did not save!"),window.QUIX=Tg(Tg({},window.QUIX||{}),{},{formTab:null}),e.props.hideFormModal()})),Fg(Lg(e),"renderTabContent",(function(t,n){var r=e.props.form;return(0,y.jsx)(Ug,{tab:n,"data-simplebar":!0,children:(0,y.jsx)(kg,{fields:t,path:[n],form:null==r?void 0:r[n]})},n)})),e}return t=a,(n=[{key:"componentDidMount",value:function(){window.QUIX=Tg(Tg({},window.QUIX||{}),{},{formTab:"general"})}},{key:"componentDidUpdate",value:function(e,t,n){var r=Object.keys(this.props.form||{}).shift()||"general";this.state.active!==r&&this.handleTabClick(r)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.show,o=n.schema||{form:{}},i=o.form,a=o.slug,l=o.name,s=Object.keys(i),c=Object.values(i);return e="section"===a||"columns"===a||"row"===a?a+"-modal ":"element-modal ",(0,y.jsx)(Do,{width:450,className:e+"qxui-modal--with-tab",dismissible:!1,show:r,close:this.handleCloseClick,title:l,style:{left:"calc(50vw - 250px)",top:"100px"},children:(0,y.jsx)(qi.default,{animated:{inkBar:!0,tabPane:!1},onChange:this.handleTabChange,children:c.map((function(e,n){return t.renderTabContent(e,s[n])}))})})}}])&&Ag(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Eg;function Qg(e){return Qg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qg(e)}var Wg;function Gg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vg(e,t){return Vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vg(e,t)}function $g(e,t){if(t&&("object"===Qg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Zg(e)}function Zg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xg(e){return Xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xg(e)}function Yg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Kg=(0,v.$j)((function(e){return{visible:e.form.showForm}}),{})(Wg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vg(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xg(r);if(o){var n=Xg(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return $g(this,e)});function a(){var e;Gg(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yg(Zg(e=i.call.apply(i,[this].concat(n))),"shouldComponentUpdate",_o()),e}return t=a,(n=[{key:"render",value:function(){var e=this.props.visible;return(0,y.jsx)(Hg,{show:e,isDirty:!0})}}])&&Jg(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Wg;n(71205);var ex,tx=n(78740);function nx(e){return nx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nx(e)}function rx(e){return function(e){if(Array.isArray(e))return ox(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ox(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ox(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ox(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ix(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ax(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lx(e,t){return lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lx(e,t)}function sx(e,t){if(t&&("object"===nx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cx(e)}function cx(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ux(e){return ux=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ux(e)}function px(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fx={addElementNode:function(e,t){return{type:A,payload:{path:e,element:t}}},addMyElementNode:function(e,t){return{type:I,payload:{path:e,element:t}}},invokeElementPickerModal:we},dx=(0,v.$j)((function(e){var t=e.action;return{path:t.path,index:t.index}}),fx)(ex=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lx(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ux(r);if(o){var n=ux(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return sx(this,e)});function a(){var e;ix(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return px(cx(e=i.call.apply(i,[this].concat(n))),"handleClick",(function(){var t=e.props,n=t.element,r=t.path,o=t.index,i=t.addElementNode,a=t.addMyElementNode,l=t.invokeElementPickerModal;n.groups.includes("my elements")?a([].concat(rx(r),[o]),n):i([].concat(rx(r),[o]),n),l()})),px(cx(e),"removeFromMyElements",(function(t){var n=t.core_id,r=t.name,o=JSON.parse(dt("MY_ELEMENTS"));if(o){var i="".concat(tt(),"/index.php?option=com_quix&task=collection.updateState&state=2&id=").concat(n,"&").concat(st(),"=1");jt().get(i).then((function(n){var i=n.data;if(!0===i.data){var a=o.filter((function(e){return e.id!==t.id}));ht("MY_ELEMENTS",JSON.stringify(a)),e.props.updateElementList(a),m.success("".concat(r," element removed"))}else m.warning(i.data)}))}})),e}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props.element,n=t.groups.includes("my elements"),r=t.thumb_file;return parseInt(JVERSION)>=4&&(r=QUIX_ROOT_URL+"media/quixnxt/images/elements/"+t.slug+".svg"),n?(0,y.jsxs)("div",{className:"my-element",children:[(0,y.jsxs)(tx.Z,{onClick:this.handleClick,prefixCls:"qxui-card",children:[(0,y.jsx)("img",{className:"qx-fb-elements__icon",src:r,alt:t.name}),(0,y.jsx)("span",{className:"qx-fb-elements__name",children:t.name})]}),(0,y.jsx)("button",{type:"button",onClick:function(){return e.removeFromMyElements(t)},className:"qx-fb-elements__remove qx-btn qx-btn-light",title:"Delete",children:(0,y.jsx)("i",{className:"qxuicon-trash-alt"})})]}):(0,y.jsxs)(tx.Z,{onClick:this.handleClick,prefixCls:"qxui-card",children:[(0,y.jsx)("img",{className:"qx-fb-elements__icon",src:r,alt:t.name}),(0,y.jsx)("span",{className:"qx-fb-elements__name",children:t.name})]})}}])&&ax(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||ex;dx.propTypes={element:ds().object.isRequired};const hx=dx;function yx(e){return yx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yx(e)}function mx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bx(e,t){return bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bx(e,t)}function vx(e,t){if(t&&("object"===yx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gx(e)}function gx(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xx(e){return xx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xx(e)}function jx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wx=qi.default.TabPane,Ox=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bx(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xx(r);if(o){var n=xx(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vx(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),jx(gx(t=i.call(this,e)),"onGroupSelect",(function(e){t.setState({tab:e}),t.props.onGroupSelect(e)})),jx(gx(t),"renderElement",(function(e,n){return(0,y.jsx)(hx,{element:e,updateElementList:t.props.updateElementList},e.slug+n)})),jx(gx(t),"renderElements",(function(e){return t.props.elements.length?(0,y.jsx)("div",{className:"qx-fb-elements ".concat(e.toLowerCase()),children:t.props.elements.map(t.renderElement)}):(0,y.jsx)("div",{className:"qx-alert",children:"No matching element found."})})),jx(gx(t),"renderGroup",(function(e){return(0,y.jsxs)(wx,{tab:e,children:[t.renderElements(e)," "]},e)})),t.state={tab:"All"},t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props.groups;return t=["All"].concat(t),(0,y.jsx)(qi.default,{animated:{inkBar:!0,tabPane:!1},defaultActiveKey:this.state.tab,onChange:function(t){return e.onGroupSelect(t)},prefixCls:"qxui-tabs",children:t.map(this.renderGroup)})}}])&&mx(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Ox.propTypes={onGroupSelect:ds().func.isRequired},Ox.defaultProps={};const _x=Ox;function Sx(e){return Sx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sx(e)}function Px(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cx(e,t){return Cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cx(e,t)}function kx(e,t){if(t&&("object"===Sx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Nx(e){return Nx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nx(e)}var Ex=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cx(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Nx(r);if(o){var n=Nx(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return kx(this,e)});function a(){return Px(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.onSearch,n=e.groups,r=e.context,o=e.onGroupSelect;return(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:"elements-list-search",children:(0,y.jsx)(Xo.default,{onChange:function(e){return t(e.target.value)},placeholder:r||"Search Element...",value:r,id:"search-elements",onReset:function(){return t("")}})}),(0,y.jsx)(_x,{groups:n,elements:this.props.elements,onGroupSelect:o,updateElementList:this.props.updateElementList})]})}}])&&qx(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);Ex.propTypes={groups:ds().array.isRequired,context:ds().string,onSearch:ds().func.isRequired},Ex.defaultProps={};const Rx=Ex;function Tx(e){return Tx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tx(e)}var Dx;function Ax(e){return function(e){if(Array.isArray(e))return Ix(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ix(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ix(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ix(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bx(e,t){return Bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bx(e,t)}function Fx(e,t){if(t&&("object"===Tx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ux(e)}function Ux(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zx(e){return zx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zx(e)}function Hx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qx=At(),Wx={invokeElementPickerModal:we},Gx=(0,v.$j)((function(e){return{visible:e.action.action===fe}}),Wx)(Dx=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bx(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=zx(r);if(o){var n=zx(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fx(this,e)});function a(){var e;Mx(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hx(Ux(e=i.call.apply(i,[this].concat(n))),"state",{groups:[],elements:[],group:"all",context:"",filteredElements:[],url:"".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&type=element&details=true&").concat(Nr,"=1")}),Hx(Ux(e),"loadMyElements",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&yt("MY_ELEMENTS");var n=JSON.parse(dt("MY_ELEMENTS"))||[];n.length?e.updateElementList(n):jt().get(e.state.url).then((function(t){if(t.data){var r=t.data;n=r.map((function(e){var t,n=JSON.parse(e.data).data[0];return n.core_id=e.id,n.name=null!==(t=null==n?void 0:n.name)&&void 0!==t?t:e.title,n.builder_version=e.builder_version,n})),ht("MY_ELEMENTS",JSON.stringify(n)),e.updateElementList(n)}else ht("MY_ELEMENTS",JSON.stringify([]))}))})),Hx(Ux(e),"updateElementList",(function(t){if(t.length){Qx=At();for(var n=function(e){var n=Qx.find((function(n){return n.slug===t[e].slug}));t[e].groups=["my elements"],t[e].type=n.type,t[e].thumb_file=n.thumb_file,Qx.push(t[e])},r=0;r<t.length;r++)n(r)}else Qx=At();e.filterSetElements({elements:Qx})})),Hx(Ux(e),"filterElementByType",(function(e,t){return("all"===t||e.groups.includes(t))&&(!e.type||Er&&("core"===e.type||e.type===Er))})),Hx(Ux(e),"handleSearch",(function(t){e.filterSetElements({context:t})})),Hx(Ux(e),"handleGroupSelect",(function(t){e.filterSetElements({group:t.toLowerCase()})})),Hx(Ux(e),"filterSetElements",(function(t){var n=t.context,r=void 0===n?e.state.context:n,o=t.group,i=void 0===o?e.state.group:o,a=t.elements,l=void 0===a?e.state.elements:a,s=t.groups,c=void 0===s?e.state.groups:s,u=Ax(l).filter((function(t){return e.filterElementByType(t,i)})).filter((function(e){return"section"!==e.slug&&"row"!==e.slug})).filter((function(e){return e.name.toLowerCase().includes(r.toLowerCase())}));0===c.length&&(c=u.flatMap((function(e){return e.groups})).filter((function(e,t,n){return n.indexOf(e)===t})).sort()),e.setState({filteredElements:u,group:i,context:r,elements:l,groups:c})})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.loadMyElements()}},{key:"componentDidUpdate",value:function(){null===dt("MY_ELEMENTS")&&this.loadMyElements()}},{key:"render",value:function(){var e=this,t=this.state.context;return(0,y.jsx)(Do,{dismissible:!1,show:this.props.visible,close:function(){return e.props.invokeElementPickerModal()},closable:!1,footer:!1,width:520,className:"qxui-modal--with-tab qxui-modal--elements",style:{left:"calc(50vw - 260px)"},title:(0,y.jsx)("h4",{className:"qxui-modal-title",children:"Elements List"}),children:(0,y.jsx)(Rx,{elements:this.state.filteredElements,groups:this.state.groups,context:t,onGroupSelect:this.handleGroupSelect,onSearch:this.handleSearch,updateElementList:this.updateElementList})})}}])&&Lx(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Dx;const Jx=Gx;var Vx=n(9291),$x=n.n(Vx),Zx=n(29288);function Xx(e){return Xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xx(e)}function Yx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ej(e,t){return ej=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ej(e,t)}function tj(e,t){if(t&&("object"===Xx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nj(e){return nj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nj(e)}const rj=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ej(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=nj(r);if(o){var n=nj(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return tj(this,e)});function a(){return Yx(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){return(0,y.jsx)("div",{className:"qx-position-cover qx-overlay qx-flex qx-flex-center qx-flex-middle qx-height-large",children:(0,y.jsx)("div",{role:"progressbar",mode:"indeterminate",className:"mat-spinner mat-progress-spinner mat-primary mat-progress-spinner-indeterminate-animation",style:{width:"100px",height:"100px"},children:(0,y.jsx)("svg",{preserveAspectRatio:"xMidYMid meet",focusable:"false",viewBox:"0 0 100 100",style:{width:"100px",height:"100px"},children:(0,y.jsx)("circle",{cx:"50%",cy:"50%",r:"45",className:"ng-star-inserted",style:{animationName:"mat-progress-spinner-stroke-rotate-100",strokeDasharray:"282.743px",strokeWidth:"10%"}})})})})}}])&&Kx(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);function oj(e){return oj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oj(e)}var ij;function aj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lj(e,t){return lj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lj(e,t)}function sj(e,t){if(t&&("object"===oj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return cj(e)}function cj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uj(e){return uj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uj(e)}function pj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fj=ol.default.Option,dj=null,hj={insertNodes:Ne},yj=(0,v.$j)((function(e){return{sectionPath:e.action.path}}),hj)(ij=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lj(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=uj(r);if(o){var n=uj(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return sj(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),pj(cj(t=i.call(this,e)),"loadData",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t.setState({loading:!0}),e||!dt("qx-page-template"))jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&").concat(t.token,"=1&source=remote&type=layout&&min_version=2.0.0")).then((function(e){e.data.items?(t.setState({loading:!1,error:!1,items:e.data.items,originItems:e.data.items,itemTags:e.data.itemTags}),ht("qx-page-template",{items:e.data.items,itemTags:e.data.itemTags})):t.setState({loading:!1,error:!0})}));else{var n=dt("qx-page-template");t.setState({loading:!1,items:n.items,originItems:n.items,itemTags:n.itemTags})}})),pj(cj(t),"handleSearchTerm",(function(e){if(_t(e))t.setState({items:t.state.originItems});else if(!(e.length<3)){var n=new Zx.Z(t.state.originItems,{shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,keys:["title","tags"]}).search(e).map((function(e){return e.item}));t.setState({items:n})}})),pj(cj(t),"arrayContainsArray",(function(e,t){if(0===t.length)return!1;var n=!1;return t.every((function(t){return-1===e.indexOf(t)||(n=!0,!1)})),n})),pj(cj(t),"onCategoryChange",(function(e){var n;n="all"===e||_t(e)?t.state.originItems:$x()(t.state.originItems,(function(n){if(n.tags){var r=sy()(n.tags,(function(e){return e.alias}));if(t.arrayContainsArray(e,r))return n}})),t.setState({items:n,category:e})})),pj(cj(t),"insert",(function(e){Cs(cj(t),e)})),pj(cj(t),"goToPreviewPage",(function(e){null===dj?dj=window.open("https://getquix.net"+e):dj.location.href="https://getquix.net"+e})),pj(cj(t),"renderPageTemplate",(function(e){var n="true"===e.license||"pro"===e.license,r=Ve()("qx-fb-template-item qx-fb-template-item--page qx-box-shadow-small qx-box-shadow-hover-large",{"qx-fb-template--pro":n}),o=(0,y.jsxs)("button",{onClick:t.insert.bind(cj(t),e.id),className:"qx-button qx-button-small qx-button-primary qx-btn--insert qx-width-1-2",children:[(0,y.jsx)("i",{className:"qxuicon-download"})," Insert"]});return n&&"free"===t.state.is_pro_user&&(o=(0,y.jsxs)("a",{target:"_blank",href:"https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=section-modal",className:"qx-button qx-button-small qx-button-danger qx-fb-template-action qx-btn--gopro qx-width-1-2 qx-flex qx-flex-middle",children:[(0,y.jsx)("i",{className:"qxuicon-external-link qx-margin-right"})," Go Pro"]})),n&&"inactive"===t.state.is_pro_user&&(o=(0,y.jsxs)("a",{target:"_blank",href:it()+"administrator/index.php?option=com_quix",className:"qx-button qx-button-small qx-button-danger qx-fb-template-action qx-btn--gopro qx-width-1-2 qx-flex qx-flex-middle",children:[(0,y.jsx)("i",{className:"qxuicon-lock qx-margin-right"})," Locked"]})),(0,y.jsx)("div",{className:"qx-width-1-3@m qx-width-1-2@s",style:{height:"381px"},children:(0,y.jsxs)("div",{className:r,children:[(0,y.jsx)("div",{className:"qx-fb-template-item__thumb",children:(0,y.jsx)("img",{src:Ct(e.images),alt:"preview"})}),(0,y.jsxs)("div",{className:"qx-fb-template-item__footer",children:[(0,y.jsx)("span",{className:"qx-fb-template-name qx-mb-2 qx-mt-2 qx-text-dark",children:e.title}),(0,y.jsxs)("div",{className:"qx-btn-group qx-flex",children:[(0,y.jsxs)("button",{onClick:t.goToPreviewPage.bind(cj(t),e.previewurl),className:"qx-button qx-button-small qx-button-secondary qx-btn--preview qx-width-1-2",children:[(0,y.jsx)("i",{className:"qxuicon-eye"})," Preview"]}),o]})]})]})},e.id)})),t.state={items:[],itemTags:[],category:"all",originItems:[],loading:!1,inserting:!1,error:!1,is_pro_user:"free"},t.token=st(),t._mounted=!1,t}return t=a,(n=[{key:"componentDidMount",value:function(){this._mounted=!0,this.setState({is_pro_user:nt()}),this.loadData()}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"render",value:function(){var e=this,t=(0,y.jsx)("div",{className:"qx-data-loading-error",children:"Please check your internet connection"});return(0,y.jsxs)("div",{className:"qx-fb-template qx-container-fluid",children:[(0,y.jsxs)("div",{className:"qx-fb-template__header qx-grid",children:[(0,y.jsx)("div",{className:"qx-column qx-width-3-5 ",children:(0,y.jsxs)(ol.default,{disabled:this.state.loading,value:this.state.category,onChange:this.onCategoryChange,style:{width:"auto",minWidth:"200px"},showSearch:!0,allowClear:!0,autoFocus:!0,mode:"default",placeholder:"Category",prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(fj,{value:"all",children:"All"},"all"),this.state.itemTags.map((function(e){return(0,y.jsx)(fj,{value:e.alias,children:e.title},e.alias)}))]})}),(0,y.jsxs)("div",{className:"qx-column qx-flex qx-flex-middle qx-width-2-5 qx-flex-right",children:[(0,y.jsx)(c.default,{title:"Reload",children:(0,y.jsx)("button",{className:"qxui-btn qxui-btn-link qx-mr-2",onClick:function(){e.loadData(!0)},children:(0,y.jsx)("i",{className:"qxio-refresh"})})}),(0,y.jsx)(aa,{disabled:this.state.loading,onlyBaseText:!0,placeholder:"Search",onChange:this.handleSearchTerm,prefixCls:"qxui-input-search",inputPrefixCls:"qxui-input",allowClear:!0})]})]}),(0,y.jsx)("div",{className:"qx-fb-template__body",children:this.state.loading?(0,y.jsx)(rj,{}):(0,y.jsx)("div",{id:"pageTemplateWrapper",className:"qx-background-default qx-padding",children:(0,y.jsxs)("div",{className:"qx-grid","data-qx-grid":"",children:[this.state.error?t:null,console.log(this.state.items),this.state.items.map(this.renderPageTemplate)]})})})]})}}])&&aj(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||ij;const mj=yj;function bj(e){return bj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bj(e)}var vj;function gj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xj(e,t){return xj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xj(e,t)}function jj(e,t){if(t&&("object"===bj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wj(e)}function wj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oj(e){return Oj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oj(e)}function _j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sj=ol.default.Option,Pj=null,qj={insertNodes:Ne},Cj=(0,v.$j)((function(e){return{sectionPath:e.action.path}}),qj)(vj=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xj(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Oj(r);if(o){var n=Oj(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return jj(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),_j(wj(t=i.call(this,e)),"loadData",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.setState({loading:!0});var n=dt("qx-page-template");if(!e&&n&&null!=n&&n.items&&null!=n&&n.layoutCategory){var r=t.prepareGroupBundle(n.items,n.layoutCategory),o=t.getItemsCategory(n.items,n.layoutCategory);t.setState({loading:!1,items:r,itemsCategory:o,originItems:n.items,itemTags:n.itemTags,layoutCategory:n.layoutCategory})}else jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&").concat(t.token,"=1&source=remote&type=layout&min_version=2.0.0")).then((function(e){if(e.data.items){var n,r,o=t.prepareGroupBundle(e.data.items,e.data.layout_category);t.getItemsCategory(e.data.items,e.data.layout_category),t.setState({loading:!1,error:!1,items:o,itemsCategory:o,originItems:e.data.items,itemTags:e.data.itemTags,layoutCategory:null===(n=e.data)||void 0===n?void 0:n.layout_category}),ht("qx-page-template",{items:e.data.items,itemTags:e.data.itemTags,layoutCategory:null===(r=e.data)||void 0===r?void 0:r.layout_category})}else t.setState({loading:!1,error:!0})}))})),_j(wj(t),"prepareGroupBundle",(function(e,t){var n={};return e.filter((function(e){return e.parent_category===t.id})).forEach((function(e){if(void 0===n[e.catid]){var t={id:e.catid,title:e.category_title,alias:e.category_alias,preview:"",items:[]};n[e.catid]=t}"1"===e.featured&&(n[e.catid].preview=e.images),n[e.catid].items.push(e)})),Object.values(n)})),_j(wj(t),"getItemsCategory",(function(e,t){var n={};return e.filter((function(e){return e.parent_category===t.id})).forEach((function(e){if(void 0===n[e.catid]){var t={id:e.catid,title:e.category_title,alias:e.category_alias};n[e.catid]=t}})),Object.values(n)})),_j(wj(t),"handleSearchTerm",(function(e){var n=new Zx.Z(t.state.originItems,{shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,keys:["title"]}).search(e);_t(e)?t.setState({items:t.state.originItems,category:"all"}):t.setState({items:n,category:"all"})})),_j(wj(t),"arrayContainsArray",(function(e,t){if(0===t.length)return!1;var n=!1;return t.every((function(t){return-1===e.indexOf(t)||(n=!0,!1)})),n})),_j(wj(t),"onCategoryChange",(function(e){var n;n=t.prepareGroupBundle(t.state.originItems,t.state.layoutCategory),"all"===e||_t(e)||(n=$x()(n,(function(t){if(e===t.alias)return t}))),t.setState({items:n,category:e})})),_j(wj(t),"insert",(function(e){Cs(wj(t),e)})),_j(wj(t),"goToPreviewPage",(function(e){null===Pj?Pj=window.open("https://getquix.net"+e):Pj.location.href="https://getquix.net"+e})),_j(wj(t),"renderLayoutClick",(function(e){t.setState({showLayoutItem:e})})),_j(wj(t),"renderLayout",(function(e,n){var r;if(e.items)return(0,y.jsx)("div",{className:"qx-margin-bottom",style:{height:"381px"},onClick:function(){return t.renderLayoutClick(e)},children:(0,y.jsxs)("div",{className:"qx-bundle-layouts-item qx-fb-template-item qx-fb-template-item--page",children:[(0,y.jsx)("div",{className:"qx-fb-template-item__thumb",children:e.preview?(0,y.jsx)("img",{src:e.preview,alt:"preview"}):(0,y.jsx)("img",{src:"https://quix.b-cdn.net/images/sample.png",alt:"preview"})}),(0,y.jsxs)("div",{className:"qx-fb-template-item__footer",children:[(0,y.jsx)("span",{className:"qx-fb-template-name qx-mt-2",children:e.title}),(0,y.jsxs)("span",{className:"qx-display-block qx-text-center qx-text-muted",children:[null==e||null===(r=e.items)||void 0===r?void 0:r.length," Layouts"]})]})]})},e.id)})),_j(wj(t),"renderActiveLayout",(function(){var e=t.state.showLayoutItem;return(0,y.jsxs)("div",{className:"qx-container-fluid",children:[(0,y.jsxs)("h3",{className:"qx-margin-bottom",style:{marginTop:"-10px"},children:[e.title,(0,y.jsx)("button",{type:"button",className:"qxui-btn qx-align-right",onClick:function(){t.setState({showLayoutItem:!1})},children:(0,y.jsx)("i",{className:"qxuicon-arrow-left"})})]}),(0,y.jsx)("div",{className:"qx-grid qx-child-width-1-3","qx-grid":"true",children:e.items.map((function(e){var n="true"===e.license||"pro"===e.license,r=Ve()("qx-fb-template-item qx-fb-template-item--page qx-box-shadow-small qx-box-shadow-hover-large",{"qx-fb-template--pro":n}),o=(0,y.jsxs)("button",{onClick:function(){return t.insert(e.id)},className:"qx-button qx-button-small qx-button-primary qx-btn--insert qx-width-1-2",children:[(0,y.jsx)("i",{className:"qxuicon-download"})," Insert"]});return n&&"free"===t.state.is_pro_user?o=(0,y.jsxs)("a",{target:"_blank",href:"https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=section-modal",className:"qx-button qx-button-small qx-button-danger qx-fb-template-action qx-btn--gopro qx-width-1-2 qx-flex qx-flex-middle",children:[(0,y.jsx)("i",{className:"qxuicon-external-link qx-margin-small-right"})," Go Pro"]}):n&&"inactive"===t.state.is_pro_user&&(o=(0,y.jsxs)("a",{target:"_blank",href:it()+"administrator/index.php?option=com_quix",className:"qx-button qx-button-small qx-button-danger qx-fb-template-action qx-btn--gopro qx-width-1-2 qx-flex qx-flex-middle",children:[(0,y.jsx)("i",{className:"qxuicon-lock qx-margin-small-right"})," Locked"]})),(0,y.jsx)("div",{className:"qx-width-1-3@m qx-width-1-2@s",children:(0,y.jsxs)("div",{className:r,children:[(0,y.jsx)("div",{className:"qx-text-center",children:(0,y.jsx)("img",{src:Ct(e.images),alt:"preview",width:"288",height:"311"})}),(0,y.jsxs)("div",{className:"qx-fb-template-item__footer",children:[(0,y.jsx)("span",{className:"qx-fb-template-name qx-text-muted",children:e.title}),(0,y.jsxs)("div",{className:"qx-flex",children:[(0,y.jsxs)("button",{onClick:t.goToPreviewPage.bind(wj(t),e.previewurl),className:"qx-button qx-button-small qx-button-secondary qx-btn--preview qx-width-1-2 qx-flex qx-flex-middle",children:[(0,y.jsx)("i",{className:"qxuicon-eye qx-margin-small-right"}),"Preview"]}),o]})]})]})},e.id)}))})]})})),t.state={items:[],itemsCategory:[],itemTags:[],category:"all",originItems:[],loading:!1,inserting:!1,error:!1,is_pro_user:"free",layoutCategory:{id:0},showLayoutItem:!1},t.token=st(),t._mounted=!1,t}return t=a,(n=[{key:"componentDidMount",value:function(){this._mounted=!0,this.setState({is_pro_user:nt()}),this.loadData()}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"render",value:function(){var e=this,t=(0,y.jsx)("div",{className:"qx-data-loading-error",children:"Please check your internet connection"});return(0,y.jsxs)("div",{className:"qx-fb-template qx-container-fluid qx-cover-container",children:[(0,y.jsxs)("div",{className:"qx-fb-template__header qx-grid",children:[(0,y.jsx)("div",{className:"qx-column qx-width-3-5 ",children:(0,y.jsxs)(ol.default,{disabled:this.state.loading,value:this.state.category,onChange:this.onCategoryChange,style:{width:"auto",minWidth:"200px"},showSearch:!0,allowClear:!0,autoFocus:!0,mode:"default",placeholder:"Category",prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(Sj,{value:"all",children:"All"},"all"),this.state.itemsCategory.map((function(e){return(0,y.jsx)(Sj,{value:e.alias,children:e.title},e.alias)}))]})}),(0,y.jsx)("div",{className:"qx-column qx-flex qx-flex-middle qx-width-2-5 qx-flex-right",children:(0,y.jsx)(c.default,{title:"Reload",children:(0,y.jsxs)("button",{className:"qxui-btn qx-mr-2",onClick:function(){e.loadData(!0)},children:[(0,y.jsx)("i",{className:"qxio-refresh"})," Reload List"]})})})]}),(0,y.jsx)("div",{className:"qx-fb-template__body",children:this.state.loading?(0,y.jsx)(rj,{}):(0,y.jsxs)("div",{id:"layoutTemplateWrapper",className:"qx-position-relative qx-background-default qx-padding",children:[(0,y.jsxs)("div",{className:"qx-grid qx-child-width-1-3@m qx-child-width-1-2@s ","qx-grid":"true",style:{display:this.state.showLayoutItem?"none":"flex"},children:[this.state.error?t:null,this.state.items.map(this.renderLayout)]}),(0,y.jsx)("div",{id:"layouts-all-items",style:{display:this.state.showLayoutItem?"block":"none"},children:this.state.showLayoutItem?this.renderActiveLayout():null})]})})]})}}])&&gj(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||vj;const kj=Cj;var Nj,Ej=n(47253),Rj=n.n(Ej);function Tj(e){return Tj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tj(e)}function Dj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Aj(e,t){return Aj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Aj(e,t)}function Ij(e,t){if(t&&("object"===Tj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Mj(e)}function Mj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lj(e){return Lj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lj(e)}function Bj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fj=ol.default.Option,Uj={insertNodes:Ne},zj=(0,v.$j)((function(e){return{sectionPath:e.action.path}}),Uj)(Nj=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Aj(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Lj(r);if(o){var n=Lj(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ij(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Bj(Mj(t=i.call(this,e)),"loadData",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t.setState({loading:!0}),e||!dt("qx-section-template"))jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&").concat(t.token,"=1&source=remote&type=section&min_version=2.0.0")).then((function(e){if(e.data.items){var n=Rj()(e.data.itemTags,"title");t.setState({loading:!1,error:!1,items:e.data.items,originItems:e.data.items,itemTags:n}),ht("qx-section-template",{items:e.data.items,itemTags:n})}else t.setState({loading:!1,error:!0})}));else{var n=dt("qx-section-template");t.setState({loading:!1,items:n.items,originItems:n.items,itemTags:n.itemTags})}})),Bj(Mj(t),"handleSearchTerm",(function(e){if(_t(e)&&t.setState({items:t.state.originItems}),!(e.length<3)){var n=new Zx.Z(t.state.originItems,{shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,keys:["title","tags"]}).search(e).map((function(e){return e.item}));t.setState({items:n})}})),Bj(Mj(t),"arrayContainsArray",(function(e,t){if(0===t.length)return!1;var n=!1;return t.every((function(t){return-1===e.indexOf(t)||(n=!0,!1)})),n})),Bj(Mj(t),"onCategoryChange",(function(e){var n;n="all"===e||_t(e)?t.state.originItems:$x()(t.state.originItems,(function(n){if(n.tags){var r=sy()(n.tags,(function(e){return e.alias}));if(t.arrayContainsArray(e,r))return n}})),t.setState({items:n,category:e})})),Bj(Mj(t),"insert",(function(e){Cs(Mj(t),e)})),Bj(Mj(t),"renderSectionTemplate",(function(e){var n="true"===e.license||"pro"===e.license,r=Ve()("qx-fb-template-item qx-fb-template-item--section qx-margin",{"qx-fb-template--pro":n}),o=(0,y.jsxs)("a",{onClick:function(){return t.insert(e.id)},className:"qx-btn qx-btn-success qx-fb-template-action",children:[(0,y.jsx)("i",{className:"qxuicon-download"})," Insert"]}),i=null;return n&&"free"===t.state.is_pro_user&&(i=(0,y.jsxs)("a",{target:"_blank",href:"https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=section-modal",className:"qx-btn qx-btn-warning qx-fb-template-action qx-btn--gopro",children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Go Pro"]})),n&&"inactive"===t.state.is_pro_user&&(i=(0,y.jsxs)("a",{target:"_blank",href:it()+"administrator/index.php?option=com_quix",className:"qx-btn qx-btn-info qx-fb-template-action qx-btn--gopro",children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Activate License"]})),(0,y.jsx)("div",{children:(0,y.jsxs)("div",{className:r,children:[(0,y.jsx)("div",{className:"qx-fb-template-item__thumb",children:(0,y.jsx)("img",{className:"qx-img qx-sortable-empty",src:Ct(e.images),width:"100%",alt:"preview"})}),(0,y.jsxs)("div",{className:"qx-fb-template-item__footer qx-flex-column",children:[i||o,(0,y.jsx)("span",{className:"qx-fb-template-name",children:e.title}),i&&n?(0,y.jsxs)("span",{className:"qx-fb-template-pro qx-mark qx-text-center",children:["Available only with the ",(0,y.jsx)("strong",{children:"Quix Pro"})," active license"]}):null]})]})},e.id)})),t.state={items:[],itemTags:[],category:"all",originItems:[],loading:!1,inserting:!1,error:!1,is_pro_user:"free"},t.token=st(),t._mounted=!1,t}return t=a,(n=[{key:"componentDidMount",value:function(){this._mounted=!0,this.setState({is_pro_user:nt()}),this.loadData()}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"render",value:function(){var e=this,t=(0,y.jsx)("div",{className:"qx-data-loading-error",children:"Please check your internet connection"});return(0,y.jsxs)("div",{className:"qx-fb-template qx-container-fluid",children:[(0,y.jsxs)("div",{className:"qx-fb-template__header qx-grid",children:[(0,y.jsx)("div",{className:"qx-column qx-width-3-5 qx-flex",children:(0,y.jsxs)(ol.default,{disabled:this.state.loading,value:this.state.category,onChange:this.onCategoryChange,style:{width:"auto",minWidth:"200px"},showSearch:!0,allowClear:!0,autoFocus:!0,mode:"default",placeholder:"Category",prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(Fj,{value:"all",children:"All"},"all"),this.state.itemTags.map((function(e){return(0,y.jsx)(Fj,{value:e.alias,children:e.title},e.alias)}))]})}),(0,y.jsxs)("div",{className:"qx-column qx-flex qx-flex-middle qx-width-2-5 qx-flex-right",children:[(0,y.jsx)(c.default,{title:"Reload",children:(0,y.jsx)("button",{className:"qxui-btn qxui-btn-link qx-mr-2",onClick:function(){e.loadData(!0)},children:(0,y.jsx)("i",{className:"qxio-refresh"})})}),(0,y.jsx)(aa,{disabled:this.state.loading,onlyBaseText:!0,placeholder:"Search",onChange:this.handleSearchTerm,prefixCls:"qxui-input-search",inputPrefixCls:"qxui-input",allowClear:!0})]})]}),"inactive"===this.state.is_pro_user?(0,y.jsxs)("p",{className:"qx-alert qx-alert-warning qx-text-center",style:{margin:"0px auto",lineHeight:1},children:["Your license is not activated. Please active your license from ",(0,y.jsx)("a",{href:it()+"administrator/index.php?option=com_quix",target:"_blank",children:"Dashboard"})]}):null,(0,y.jsxs)("div",{className:"qx-fb-template__body qx-row",children:[this.state.error?t:null,this.state.loading?(0,y.jsx)(rj,{}):(0,y.jsx)("div",{id:"sectionTemplateWrapper",className:"qx-padding",children:this.state.items.map(this.renderSectionTemplate)})]})]})}}])&&Dj(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Nj;const Hj=zj;n(39909);var Qj=n(62435);function Wj(e){return Wj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wj(e)}function Gj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jj(e,t){return Jj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jj(e,t)}function Vj(e,t){if(t&&("object"===Wj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $j(e)}function $j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zj(e){return Zj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zj(e)}function Xj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Yj=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jj(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Zj(r);if(o){var n=Zj(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Vj(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Xj($j(t=i.call(this,e)),"handleChange",(function(e){var n=e.target.value;t.setState({value:n})})),Xj($j(t),"check",(function(){t.setState({editable:!1}),t.props.onChange&&t.props.onChange(t.state.value)})),Xj($j(t),"edit",(function(){t.setState({editable:!0})})),t.state={value:t.props.value,editable:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this.state,t=e.value,n=e.editable;return(0,y.jsx)("div",{className:"editable-cell",children:n?(0,y.jsxs)("div",{className:"editable-cell-input-wrapper",children:[(0,y.jsx)(Xo.default,{value:t,onChange:this.handleChange,onPressEnter:this.check}),(0,y.jsx)("i",{className:"qxuicon-check editable-cell-icon-check",onClick:this.check})]}):(0,y.jsxs)("div",{className:"editable-cell-text-wrapper",children:[t||" ",(0,y.jsx)("i",{className:"qxuicon-edit editable-cell-icon",onClick:this.edit})]})})}}])&&Gj(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component);var Kj;function ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ew(Object(n),!0).forEach((function(t){sw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nw(e){return nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nw(e)}function rw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ow(e,t){return ow=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ow(e,t)}function iw(e,t){if(t&&("object"===nw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return aw(e)}function aw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lw(e){return lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lw(e)}function sw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cw=xo.Z.Dragger,uw=(0,v.$j)((function(e){return{action:e.action.action}}),{})(Kj=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ow(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=lw(r);if(o){var n=lw(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return iw(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),sw(aw(t=i.call(this,e)),"onFileUploadDone",(function(e){jo(e,["json"]).then((function(e){var n,r=JSON.parse(e),o={type:r.type,data:r.data},i=jQuery("#jform_token").attr("name"),a=new FormData;a.set("jform[data]",JSON.stringify(o)),a.set("jform[title]",r.title),a.set("jform[builder]","frontend"),a.set("jform[type]",r.type),a.set("jform[state]","1"),a.set("jform[id]","0"),a.set("id","0"),a.set("builder_version",null!==(n=r.builder_version)&&void 0!==n?n:"2.0.0"),a.set("importing",1),a.set("type","collection"),a.set(i,"1"),jt()({method:"post",url:"".concat(tt(),"/index.php?option=com_quix&task=collection.save"),data:a,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(e){var n=e.data;"object"==nw(n)?(n.success?m.success("Imported successfully!"):m.warning(n.message),t.props.onImportDone(o)):m.error(n)})).catch((function(){return t.setState({process:!1})}))}))})),t}return t=a,(n=[{key:"render",value:function(){var e=this,t={data:this.onFileUploadDone};return(0,y.jsx)(Do,{width:550,classes:"quix-library-importer",show:this.props.show,close:function(){return e.props.onClose()},title:"Import To Library",footer:!1,expandable:!1,style:{left:"calc(50vw - 225px)"},onCancel:function(){return e.props.onClose()},closeModal:function(){return e.props.onClose()},children:(0,y.jsxs)(cw,tw(tw({},t),{},{children:[(0,y.jsx)("p",{children:(0,y.jsx)("i",{className:"qxuicon-box-full qx-text-primary qx-text-large"})}),(0,y.jsx)("h5",{className:"qx-margin-small-top qx-margin-small-bottom",children:"Import Template To Library"}),(0,y.jsxs)("p",{children:["Click or drag ",(0,y.jsx)("em",{children:".json"})," file to this area to upload"]})]}))})}}])&&rw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Kj;const pw=uw;var fw;function dw(e){return dw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dw(e)}function hw(e){return function(e){if(Array.isArray(e))return yw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return yw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yw(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bw(e,t){return bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bw(e,t)}function vw(e,t){if(t&&("object"===dw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gw(e)}function gw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xw(e){return xw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xw(e)}function jw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ww=null,Ow={insertNodes:Ne},_w=(0,v.$j)((function(e){var t=e.action;return{action:t.action,sectionPath:t.path}}),Ow)(fw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bw(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xw(r);if(o){var n=xw(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vw(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),jw(gw(t=i.call(this,e)),"loadData",(function(e){jt().get(e).then((function(e){var n=sy()(e.data,(function(e){return e.type="layout"===e.type.toLowerCase()?"page":e.type,e}));t.setState({loadingDone:!0,data:n,originData:n,reloadData:!1})}))})),jw(gw(t),"preview",(function(e){null===ww?ww=window.open("index.php?option=com_quix&view=collection&id=".concat(e)):ww.location.href="index.php?option=com_quix&view=collection&id=".concat(e)})),jw(gw(t),"onCellChange",(function(e,n){return function(r){var o=hw(t.state.originData),i=o.find((function(t){return t.key===e}));i&&(i[n]=r,t.setState({data:o,originData:o}),jt().get(t.updateNameApi+"&name=".concat(i.title,"&id=").concat(i.id)).then((function(){m.success("Template name updated")})))}})),jw(gw(t),"onDelete",(function(e){var n=hw(t.state.originData).filter((function(t){return t.id!==e}));t.setState({originData:n,data:n}),jt().get(t.templateDeleteApi+"&id=".concat(e)).then((function(){m.success("Template deleted")}))})),jw(gw(t),"handleFilterChange",(function(e){var n;n="all"===e?t.state.originData:$x()(t.state.originData,(function(t){if(t.type===e)return t})),t.setState({filterBy:e,data:n})})),jw(gw(t),"handleSearchTerm",(function(e){if(_t(e)&&t.setState({data:t.state.originData}),!(e.length<3)){var n=new Zx.Z(t.state.originData,{shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:1,keys:["title"]}).search(e).map((function(e){return e.item}));t.setState({data:n})}})),jw(gw(t),"insert",(function(e){t.setState({loading:!0}),jt().get("".concat(t.getTemplate,"&id=").concat(e)).then((function(e){var n=JSON.parse(e.data.data);if(void 0===dw(n)||!n.data)return m.warning("[ ".concat(e.data.title," ] is an empty section. Can't process the request.")),void t.setState({loading:!1});if("layout"===n.type)t.props.insertNodes(t.props.sectionPath,n.data),t.setState({loading:!1}),m.success("[ ".concat(e.data.title," ] template inserted"));else{var r=n.data;Array.isArray(r)||(r=[r]),t.props.insertNodes(t.props.sectionPath,hw(r)),t.setState({loading:!1}),m.success("[ ".concat(e.data.title," ] template inserted"))}}))})),jw(gw(t),"importModal",(function(){t.setState({showImportModal:!0})})),jw(gw(t),"onExport",(function(e,n){jt().get(t.exportApi+"&id=".concat(e)).then((function(e){var t,r="".concat(n,".json"),o=e.data.data.config,i={groups:[],title:n,type:o.type,builder_version:null!==(t=o.builder_version)&&void 0!==t?t:"2.0.0",data:o.data};nl(JSON.stringify(i),r,"application/json")}))})),jw(gw(t),"onClose",(function(){t.props.closeModal&&t.props.closeModal()})),t.token=st(),t.url="".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&").concat(t.token,"=1"),t.getTemplate="".concat(tt(),"/index.php?option=com_quix&task=api.getTemplate&").concat(t.token,"=1"),t.updateNameApi="".concat(tt(),"/index.php?option=com_quix&task=collection.updateName&").concat(t.token,"=1"),t.templateDeleteApi="".concat(tt(),"/index.php?option=com_quix&task=collection.updateState&state=2&").concat(t.token,"=1"),t.exportApi="".concat(tt(),"/index.php?option=com_quix&task=api.exportCollection&").concat(t.token,"=1"),t.state={loadingDone:!1,filter:"all",data:[],originData:[],columns:[{title:"Title",dataIndex:"title",key:"title",render:function(e,n){return(0,y.jsx)(Yj,{value:e,onChange:t.onCellChange(n.key,"title")})}},{title:"Type",dataIndex:"type",key:"type",render:function(e){return"page"===e||"section"===e||"layout"===e?(0,y.jsx)("span",{className:"label",children:e}):(0,y.jsx)("span",{className:"label label-warning",children:e})}},{title:"Created By",dataIndex:"created_by",key:"created_by"},{title:"Action",key:"action",render:function(e,n){return(0,y.jsxs)("span",{children:[(0,y.jsxs)("button",{type:"button",onClick:function(){return t.insert(n.id)},className:"qxui-btn qxui-btn-default",children:[(0,y.jsx)("i",{className:"qxuicon-download"})," Insert"]}),(0,y.jsxs)("div",{className:"qxui-btn-group qx-float-right",children:[(0,y.jsx)("button",{type:"button",onClick:function(){return t.onDelete(n.id)},className:"qxui-btn qxui-btn-default",title:"Delete",children:(0,y.jsx)("i",{className:"qxuicon-trash-alt"})}),(0,y.jsx)("button",{type:"button",onClick:function(){return t.onExport(n.id,n.title)},className:"qxui-btn qxui-btn-default",title:"Export",children:(0,y.jsx)("i",{className:"qxuicon-sign-out"})})]})]})}}],showImportModal:!1,reloadData:!1},t}return t=a,(n=[{key:"componentDidMount",value:function(){this.loadData(this.url)}},{key:"componentDidUpdate",value:function(e,t,n){this.state.reloadData&&this.loadData(this.url)}},{key:"render",value:function(){var e=this;return(0,y.jsxs)("div",{className:"qx-fb-template qx-container-fluid my-templates-list",children:[(0,y.jsxs)("div",{className:"qx-fb-template__header qx-flex qx-flex-between",children:[(0,y.jsx)("div",{className:"qx-column",children:(0,y.jsxs)("div",{className:"qxui-btn-group",role:"group","aria-label":"Basic example",children:[(0,y.jsx)("button",{type:"button",onClick:function(){return e.handleFilterChange("all")},className:Ve()("qxui-btn qxui-btn-default",{"qx-active":"all"===this.state.filter}),children:"All"}),(0,y.jsx)("button",{type:"button",onClick:function(){return e.handleFilterChange("section")},className:Ve()("qxui-btn qxui-btn-default",{"qx-active":"section"===this.state.filter}),children:"Section"}),(0,y.jsx)("button",{type:"button",onClick:function(){return e.handleFilterChange("page")},className:Ve()("qxui-btn qxui-btn-default",{"qx-active":"page"===this.state.filter}),children:"Page"}),(0,y.jsx)("button",{type:"button",onClick:function(){return e.handleFilterChange("header")},className:Ve()("qxui-btn qxui-btn-default",{"qx-active":"header"===this.state.filter}),children:"Header"}),(0,y.jsx)("button",{type:"button",onClick:function(){return e.handleFilterChange("footer")},className:Ve()("qxui-btn qxui-btn-default",{"qx-active":"footer"===this.state.filter}),children:"Footer"})]})}),(0,y.jsxs)("div",{className:"qx-column",children:[(0,y.jsx)(p.default,{type:"button",className:"qxui-btn qxui-btn-link",onClick:function(){e.setState({reloadData:!0})},children:(0,y.jsx)("i",{className:"qxio-ios-reload"})}),(0,y.jsx)(p.default,{disabled:!this.state.loadingDone,onClick:this.importModal,className:"qxui-btn qxui-btn-primary qx-margin-small-right",children:(0,y.jsx)("i",{className:"qxuicon-upload"})}),(0,y.jsx)(aa,{placeholder:"Search",onlyBaseText:!0,onChange:this.handleSearchTerm,prefixCls:"qxui-input-search",inputPrefixCls:"qxui-input",allowClear:!0})]})]}),this.state.loading?(0,y.jsx)(rj,{}):(0,y.jsx)("div",{className:"qx-template__list",children:(0,y.jsx)(Qj.Z,{pagination:!1,rowKey:function(e){return e.id},columns:this.state.columns,dataSource:this.state.data,prefixCls:"qxui-table",className:"qx-padding"})}),(0,y.jsx)(pw,{show:this.state.showImportModal,onClose:function(){return e.setState({showImportModal:!1})},onImportDone:function(){return e.setState({showImportModal:!1,reloadData:!0})}})]})}}])&&mw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||fw;const Sw=_w;function Pw(e){return Pw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pw(e)}var qw;function Cw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kw(e,t){return kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kw(e,t)}function Nw(e,t){if(t&&("object"===Pw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ew(e)}function Ew(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rw(e){return Rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rw(e)}function Tw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dw=ol.default.Option,Aw={insertNodes:Ne},Iw=(0,v.$j)((function(e){return{sectionPath:e.action.path}}),Aw)(qw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kw(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rw(r);if(o){var n=Rw(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Nw(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Tw(Ew(t=i.call(this,e)),"loadData",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t.setState({loading:!0}),e||!dt("qx-header-template"))jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&").concat(t.token,"=1&source=remote&type=header&min_version=4.0.0")).then((function(e){if(e.data.items){var n=Rj()(e.data.itemTags,"title");t.setState({loading:!1,error:!1,items:e.data.items,originItems:e.data.items,itemTags:n}),ht("qx-header-template",{items:e.data.items,itemTags:n})}else t.setState({loading:!1,error:!0})}));else{var n=dt("qx-header-template");t.setState({loading:!1,items:n.items,originItems:n.items,itemTags:n.itemTags})}})),Tw(Ew(t),"handleSearchTerm",(function(e){if(_t(e)&&t.setState({items:t.state.originItems}),!(e.length<3)){var n=new Zx.Z(t.state.originItems,{shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,keys:["title","tags"]}).search(e).map((function(e){return e.item}));t.setState({items:n})}})),Tw(Ew(t),"arrayContainsArray",(function(e,t){if(0===t.length)return!1;var n=!1;return t.every((function(t){return-1===e.indexOf(t)||(n=!0,!1)})),n})),Tw(Ew(t),"onCategoryChange",(function(e){var n;n="all"===e||_t(e)?t.state.originItems:$x()(t.state.originItems,(function(n){if(n.tags){var r=sy()(n.tags,(function(e){return e.alias}));if(t.arrayContainsArray(e,r))return n}})),t.setState({items:n,category:e})})),Tw(Ew(t),"insert",(function(e){Cs(Ew(t),e)})),Tw(Ew(t),"renderSectionTemplate",(function(e){var n="true"===e.license||"pro"===e.license,r=Ve()("qx-fb-template-item qx-fb-template-item--section qx-margin",{"qx-fb-template--pro":n}),o=(0,y.jsxs)("a",{onClick:function(){return t.insert(e.id)},className:"qx-btn qx-btn-success qx-fb-template-action",children:[(0,y.jsx)("i",{className:"qxuicon-download"})," Insert"]}),i=null;return n&&"free"===t.state.is_pro_user&&(i=(0,y.jsxs)("a",{target:"_blank",href:"https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=section-modal",className:"qx-btn qx-btn-warning qx-fb-template-action qx-btn--gopro",children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Go Pro"]})),n&&"inactive"===t.state.is_pro_user&&(i=(0,y.jsxs)("a",{target:"_blank",href:it()+"administrator/index.php?option=com_quix",className:"qx-btn qx-btn-info qx-fb-template-action qx-btn--gopro",children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Activate License"]})),(0,y.jsx)("div",{children:(0,y.jsxs)("div",{className:r,children:[(0,y.jsx)("div",{className:"qx-fb-template-item__thumb",children:(0,y.jsx)("img",{className:"qx-img qx-sortable-empty",src:Ct(e.images),width:"100%",alt:"preview"})}),(0,y.jsxs)("div",{className:"qx-fb-template-item__footer qx-flex-column",children:[i||o,(0,y.jsx)("span",{className:"qx-fb-template-name",children:e.title}),i&&n?(0,y.jsxs)("span",{className:"qx-fb-template-pro qx-mark qx-text-center",children:["Available only with the ",(0,y.jsx)("strong",{children:"Quix Pro"})," active license"]}):null]})]})},e.id)})),t.state={items:[],itemTags:[],category:"all",originItems:[],loading:!1,inserting:!1,error:!1,is_pro_user:"free"},t.token=st(),t._mounted=!1,t}return t=a,(n=[{key:"componentDidMount",value:function(){this._mounted=!0,this.setState({is_pro_user:nt()}),this.loadData()}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"render",value:function(){var e=this,t=(0,y.jsx)("div",{className:"qx-data-loading-error",children:"Please check your internet connection"});return(0,y.jsxs)("div",{className:"qx-fb-template qx-container-fluid",children:[(0,y.jsxs)("div",{className:"qx-fb-template__header qx-grid",children:[(0,y.jsx)("div",{className:"qx-column qx-width-3-5 qx-flex",children:(0,y.jsxs)(ol.default,{disabled:this.state.loading,value:this.state.category,onChange:this.onCategoryChange,style:{width:"auto",minWidth:"200px"},showSearch:!0,allowClear:!0,autoFocus:!0,mode:"default",placeholder:"Category",prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(Dw,{value:"all",children:"All"},"all"),this.state.itemTags.map((function(e){return(0,y.jsx)(Dw,{value:e.alias,children:e.title},e.alias)}))]})}),(0,y.jsxs)("div",{className:"qx-column qx-flex qx-flex-middle qx-width-2-5 qx-flex-right",children:[(0,y.jsx)(c.default,{title:"Reload",children:(0,y.jsx)("button",{className:"qxui-btn qxui-btn-link qx-mr-2",onClick:function(){e.loadData(!0)},children:(0,y.jsx)("i",{className:"qxio-refresh"})})}),(0,y.jsx)(aa,{disabled:this.state.loading,onlyBaseText:!0,placeholder:"Search",onChange:this.handleSearchTerm,prefixCls:"qxui-input-search",inputPrefixCls:"qxui-input",allowClear:!0})]})]}),"inactive"===this.state.is_pro_user?(0,y.jsxs)("p",{className:"qx-alert qx-alert-warning qx-text-center",style:{margin:"0px auto",lineHeight:1},children:["Your license is not activated. Please active your license from ",(0,y.jsx)("a",{href:it()+"administrator/index.php?option=com_quix",target:"_blank",children:"Dashboard"})]}):null,(0,y.jsxs)("div",{className:"qx-fb-template__body qx-row",children:[this.state.error?t:null,this.state.loading?(0,y.jsx)(rj,{}):(0,y.jsx)("div",{id:"sectionTemplateWrapper",className:"qx-padding",children:this.state.items.map(this.renderSectionTemplate)})]})]})}}])&&Cw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||qw;const Mw=Iw;function Lw(e){return Lw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lw(e)}var Bw;function Fw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uw(e,t){return Uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uw(e,t)}function zw(e,t){if(t&&("object"===Lw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hw(e)}function Hw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qw(e){return Qw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qw(e)}function Ww(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gw=ol.default.Option,Jw={insertNodes:Ne},Vw=(0,v.$j)((function(e){return{sectionPath:e.action.path}}),Jw)(Bw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uw(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qw(r);if(o){var n=Qw(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return zw(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Ww(Hw(t=i.call(this,e)),"loadData",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t.setState({loading:!0}),e||!dt("qx-footer-template"))jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getTemplates&").concat(t.token,"=1&source=remote&type=footer&min_version=4.0.0")).then((function(e){if(e.data.items){var n=Rj()(e.data.itemTags,"title");t.setState({loading:!1,error:!1,items:e.data.items,originItems:e.data.items,itemTags:n}),ht("qx-footer-template",{items:e.data.items,itemTags:n})}else t.setState({loading:!1,error:!0})}));else{var n=dt("qx-footer-template");t.setState({loading:!1,items:n.items,originItems:n.items,itemTags:n.itemTags})}})),Ww(Hw(t),"handleSearchTerm",(function(e){if(_t(e)&&t.setState({items:t.state.originItems}),!(e.length<3)){var n=new Zx.Z(t.state.originItems,{shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,keys:["title","tags"]}).search(e).map((function(e){return e.item}));t.setState({items:n})}})),Ww(Hw(t),"arrayContainsArray",(function(e,t){if(0===t.length)return!1;var n=!1;return t.every((function(t){return-1===e.indexOf(t)||(n=!0,!1)})),n})),Ww(Hw(t),"onCategoryChange",(function(e){var n;n="all"===e||_t(e)?t.state.originItems:$x()(t.state.originItems,(function(n){if(n.tags){var r=sy()(n.tags,(function(e){return e.alias}));if(t.arrayContainsArray(e,r))return n}})),t.setState({items:n,category:e})})),Ww(Hw(t),"insert",(function(e){Cs(Hw(t),e)})),Ww(Hw(t),"renderSectionTemplate",(function(e){var n="true"===e.license||"pro"===e.license,r=Ve()("qx-fb-template-item qx-fb-template-item--section qx-margin",{"qx-fb-template--pro":n}),o=(0,y.jsxs)("a",{onClick:function(){return t.insert(e.id)},className:"qx-btn qx-btn-success qx-fb-template-action",children:[(0,y.jsx)("i",{className:"qxuicon-download"})," Insert"]}),i=null;return n&&"free"===t.state.is_pro_user&&(i=(0,y.jsxs)("a",{target:"_blank",href:"https://www.themexpert.com/quix-pagebuilder?utm_medium=button&utm_campaign=quix-pro&utm_source=section-modal",className:"qx-btn qx-btn-warning qx-fb-template-action qx-btn--gopro",children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Go Pro"]})),n&&"inactive"===t.state.is_pro_user&&(i=(0,y.jsxs)("a",{target:"_blank",href:it()+"administrator/index.php?option=com_quix",className:"qx-btn qx-btn-info qx-fb-template-action qx-btn--gopro",children:[(0,y.jsx)("i",{className:"qxuicon-external-link"})," Activate License"]})),(0,y.jsx)("div",{children:(0,y.jsxs)("div",{className:r,children:[(0,y.jsx)("div",{className:"qx-fb-template-item__thumb",children:(0,y.jsx)("img",{className:"qx-img qx-sortable-empty",src:Ct(e.images),width:"100%",alt:"preview"})}),(0,y.jsxs)("div",{className:"qx-fb-template-item__footer qx-flex-column",children:[i||o,(0,y.jsx)("span",{className:"qx-fb-template-name",children:e.title}),i&&n?(0,y.jsxs)("span",{className:"qx-fb-template-pro qx-mark qx-text-center",children:["Available only with the ",(0,y.jsx)("strong",{children:"Quix Pro"})," active license"]}):null]})]})},e.id)})),t.state={items:[],itemTags:[],category:"all",originItems:[],loading:!1,inserting:!1,error:!1,is_pro_user:"free"},t.token=st(),t._mounted=!1,t}return t=a,(n=[{key:"componentDidMount",value:function(){this._mounted=!0,this.setState({is_pro_user:nt()}),this.loadData()}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"render",value:function(){var e=this,t=(0,y.jsx)("div",{className:"qx-data-loading-error",children:"Please check your internet connection"});return(0,y.jsxs)("div",{className:"qx-fb-template qx-container-fluid",children:[(0,y.jsxs)("div",{className:"qx-fb-template__header qx-grid",children:[(0,y.jsx)("div",{className:"qx-column qx-width-3-5 qx-flex",children:(0,y.jsxs)(ol.default,{disabled:this.state.loading,value:this.state.category,onChange:this.onCategoryChange,style:{width:"auto",minWidth:"200px"},showSearch:!0,allowClear:!0,autoFocus:!0,mode:"default",placeholder:"Category",prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},children:[(0,y.jsx)(Gw,{value:"all",children:"All"},"all"),this.state.itemTags.map((function(e){return(0,y.jsx)(Gw,{value:e.alias,children:e.title},e.alias)}))]})}),(0,y.jsxs)("div",{className:"qx-column qx-flex qx-flex-middle qx-width-2-5 qx-flex-right",children:[(0,y.jsx)(c.default,{title:"Reload",children:(0,y.jsx)("button",{className:"qxui-btn qxui-btn-link qx-mr-2",onClick:function(){e.loadData(!0)},children:(0,y.jsx)("i",{className:"qxio-refresh"})})}),(0,y.jsx)(aa,{disabled:this.state.loading,onlyBaseText:!0,placeholder:"Search",onChange:this.handleSearchTerm,prefixCls:"qxui-input-search",inputPrefixCls:"qxui-input",allowClear:!0})]})]}),"inactive"===this.state.is_pro_user?(0,y.jsxs)("p",{className:"qx-alert qx-alert-warning qx-text-center",style:{margin:"0px auto",lineHeight:1},children:["Your license is not activated. Please active your license from ",(0,y.jsx)("a",{href:it()+"administrator/index.php?option=com_quix",target:"_blank",children:"Dashboard"})]}):null,(0,y.jsxs)("div",{className:"qx-fb-template__body qx-row",children:[this.state.error?t:null,this.state.loading?(0,y.jsx)(rj,{}):(0,y.jsx)("div",{id:"sectionTemplateWrapper",className:"qx-padding",children:this.state.items.map(this.renderSectionTemplate)})]})]})}}])&&Fw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Bw;const $w=Vw;function Zw(e){return Zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zw(e)}var Xw;function Yw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eO(e,t){return eO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eO(e,t)}function tO(e,t){if(t&&("object"===Zw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nO(e)}function nO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rO(e){return rO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rO(e)}function oO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iO=qi.default.TabPane,aO={invokeTemplateModal:Pe},lO=(0,v.$j)((function(e){return{visible:e.action.action===he}}),aO)(Xw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eO(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rO(r);if(o){var n=rO(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return tO(this,e)});function a(){var e;Yw(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return oO(nO(e=i.call.apply(i,[this].concat(n))),"state",{tabDisabled:!1}),oO(nO(e),"handleCloseClick",(function(){e.props.invokeTemplateModal()})),oO(nO(e),"handleOpenClick",(function(){e.setState({show:!0})})),oO(nO(e),"onTabChange",(function(t){e.setState({tab:t}),ht("qx-template-tab",t)})),e}return t=a,(n=[{key:"render",value:function(){return(0,y.jsx)(Do,{width:"1000px",className:"qxui-modal--with-tab qxui-modal--template qxui-modal--template-collection",show:this.props.visible,title:"Load From Library",footer:!1,closable:!1,onCancel:this.handleCloseClick,onClose:this.handleCloseClick,expandable:!1,style:{left:"calc(50vw - 500px)",maxWidth:"100%",minWidth:"1000px"},children:(0,y.jsxs)(qi.default,{animated:{inkBar:!0,tabPane:!1},activeKey:this.state.tab,onChange:this.onTabChange,prefixCls:"qxui-tabs",children:[(0,y.jsx)(iO,{disabled:this.state.tabDisabled,tab:"Layout Bundles","data-simplebar":!0,children:(0,y.jsx)(kj,{openModal:this.handleOpenClick,closeModal:this.handleCloseClick})},"Bundles"),(0,y.jsx)(iO,{disabled:this.state.tabDisabled,tab:"Pages",children:(0,y.jsx)(mj,{openModal:this.handleOpenClick,closeModal:this.handleCloseClick})},"Pages"),(0,y.jsx)(iO,{disabled:this.state.tabDisabled,tab:"Sections","data-simplebar":!0,children:(0,y.jsx)(Hj,{openModal:this.handleOpenClick,closeModal:this.handleCloseClick})},"Sections"),(0,y.jsx)(iO,{disabled:this.state.tabDisabled,tab:"Headers","data-simplebar":!0,children:(0,y.jsx)(Mw,{openModal:this.handleOpenClick,closeModal:this.handleCloseClick})},"Headers"),(0,y.jsx)(iO,{disabled:this.state.tabDisabled,tab:"Footers","data-simplebar":!0,children:(0,y.jsx)($w,{openModal:this.handleOpenClick,closeModal:this.handleCloseClick})},"Footers"),(0,y.jsx)(iO,{disabled:this.state.tabDisabled,tab:"My Templates",children:(0,y.jsx)(Sw,{openModal:this.handleOpenClick,closeModal:this.handleCloseClick})},"My Templates")]})})}}])&&Kw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||Xw;const sO=lO;function cO(e){return cO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cO(e)}var uO,pO;function fO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hO(e,t){return hO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hO(e,t)}function yO(e,t){if(t&&("object"===cO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return mO(e)}function mO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bO(e){return bO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bO(e)}function vO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gO=qi.default.TabPane,xO=il.Z.Panel,jO={invokeSEORankModal:qe},wO=(0,v.$j)((function(e){var t=e.action,n=t.action,r=t.tab;return{visible:n===w,tab:r}}),jO)((pO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hO(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=bO(r);if(o){var n=bO(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return yO(this,e)});function a(){var e;fO(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vO(mO(e=i.call.apply(i,[this].concat(n))),"state",{title:"",desc:"",image:"",tuser:"",appid:"",addog:"",addtw:"",imageIntroWarning:""}),vO(mO(e),"onChange",(function(){ii()})),vO(mO(e),"updateIntroImage",(function(t){e.setState({imageIntroWarning:" "});var n="";if(t.source)n=t.source;else if(t.type&&"svg"===t.type)return e.setState({imageIntroWarning:"Please select image only!"}),!1;return Dr("jform_metadata_image_intro").value=n,!0})),e}return t=a,n=[{key:"componentDidMount",value:function(){var e=this;setTimeout((function(){var t;e.setState({title:Dr("jform_metadata_title").value}),e.setState({desc:Dr("jform_metadata_desc").value}),e.setState({focusKeywords:Dr("jform_metadata_focus_keywords").value}),t=Dr("jform_metadata_image_intro").value?{type:"image",source:Dr("jform_metadata_image_intro").value}:{type:"",source:""},e.setState({image:t}),e.setState({tuser:Dr("jform_metadata_twitter_username").value}),e.setState({appid:Dr("jform_metadata_fb_appid").value}),e.setState({addog:Boolean(Dr("jform_metadata_addog").value)}),e.setState({addtw:Boolean(Dr("jform_metadata_addtw").value)})}),100)}},{key:"render",value:function(){var e=this,t=Dr("jform_type").value;return(0,y.jsx)(Do,{className:"qxui-modal--with-tab modal--small",title:"SEO settings",show:this.props.visible,close:function(){return e.props.invokeSEORankModal(!1)},style:{left:"calc(50vw - 250px)"},dismisible:!0,footer:[(0,y.jsxs)("button",{className:"qxui-btn qxui-btn-primary qxui-btn-lg",onClick:function(){ii(),e.props.invokeSEORankModal(!1)},children:[(0,y.jsx)("i",{className:"qxuicon-check"})," Apply "]},"save")],children:"collection"===t?(0,y.jsx)(qi.default,{defaultActiveKey:"general",prefixCls:"qxui-tabs",children:(0,y.jsx)(gO,{tab:"General",children:(0,y.jsx)(il.Z,{defaultActiveKey:["1"],accordion:!0,prefixCls:"qxui-collapse",className:"qxui-collapse--fields-group",expandIconPosition:"end",children:(0,y.jsxs)(xO,{header:"General Options",children:[(0,y.jsxs)("p",{className:"qx-alert qx-alert-info qx-small qx-p-1",children:["SEO Settings are mainly for Pages. This view will help you to understand better content quality.",(0,y.jsx)("strong",{children:"These settings will not be implemented in preview page."})]}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"SEO Title",name:"jform[metadata][title]",placeholder:"SEO title",value:this.state.title,id:"jform_metadata_title",onChange:function(t){e.setState({title:t}),Dr("jform_metadata_title").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(Vy,{label:"SEO Desc",name:"jform[metadata][desc]",rows:4,value:this.state.desc,id:"jform_metadata_desc",onChange:function(t){e.setState({desc:t}),Dr("jform_metadata_desc").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"SEO Focus Keywords",name:"jform[metadata][focus_keywords]",placeholder:"SEO Focus Keywords",value:this.state.focusKeywords,id:"jform_metadata_focus_keywords",onChange:function(t){e.setState({focusKeywords:t}),Dr("jform_metadata_focus_keywords").value=t,ii()}})})]},"1")})},"general")}):(0,y.jsxs)(qi.default,{defaultActiveKey:"general",prefixCls:"qxui-tabs",children:[(0,y.jsx)(gO,{tab:"General",children:(0,y.jsx)(il.Z,{defaultActiveKey:["1"],accordion:!0,prefixCls:"qxui-collapse",className:"qxui-collapse--fields-group",expandIconPosition:"end",children:(0,y.jsxs)(xO,{header:"General Options",children:[(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"SEO Title",name:"jform[metadata][title]",placeholder:"SEO title",value:this.state.title,id:"jform_metadata_title",onChange:function(t){e.setState({title:t}),Dr("jform_metadata_title").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(Vy,{label:"SEO Desc",name:"jform[metadata][desc]",rows:4,value:this.state.desc,id:"jform_metadata_desc",onChange:function(t){e.setState({desc:t}),Dr("jform_metadata_desc").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"SEO Focus Keywords",name:"jform[metadata][focus_keywords]",placeholder:"SEO Focus Keywords",value:this.state.focusKeywords,id:"jform_metadata_focus_keywords",onChange:function(t){e.setState({focusKeywords:t}),Dr("jform_metadata_focus_keywords").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"Twitter Username",name:"jform[metadata][twitter_username]",placeholder:"twitter_username",value:this.state.tuser,id:"jform_metadata_twitter_username",onChange:function(t){e.setState({tuser:t}),Dr("jform_metadata_twitter_username").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(aa,{label:"Facebook AppID",name:"jform[metadata][fb_appid]",placeholder:"fb_appid",value:this.state.appid,id:"jform_metadata_fb_appid",onChange:function(t){e.setState({appid:t}),Dr("jform_metadata_fb_appid").value=t,ii()}})})]},"1")})},"general"),(0,y.jsx)(gO,{tab:"Image",children:(0,y.jsx)(il.Z,{defaultActiveKey:["1"],accordion:!0,prefixCls:"qxui-collapse",className:"qxui-collapse--fields-group",expandIconPosition:"end",children:(0,y.jsx)(xO,{header:"SEO Image",children:(0,y.jsxs)("div",{className:"qx-fb-field",children:[(0,y.jsx)(vd,{label:"Image Intro",name:"jform[metadata][image_intro]",value:this.state.image,id:"jform_metadata_image_intro",filters:"image",onChange:function(t){if(!e.updateIntroImage(t))return!1;e.setState({image:t}),ii()}}),(0,y.jsx)("div",{id:"imageIntroWarning",style:{color:"red",fontWeight:"bold"},children:this.state.imageIntroWarning})]})},"1")})},"image"),(0,y.jsx)(gO,{tab:"Settings",children:(0,y.jsx)(il.Z,{defaultActiveKey:["1"],accordion:!0,prefixCls:"qxui-collapse",className:"qxui-collapse--fields-group",expandIconPosition:"end",children:(0,y.jsxs)(xO,{header:"Other Options",children:[(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(ky,{label:"Add OpenGraph data",name:"jform[metadata][addog]",checked:this.state.addog,onChange:function(t){e.setState({addog:t}),Dr("jform_metadata_addog").value=t,ii()}})}),(0,y.jsx)("div",{className:"qx-fb-field",children:(0,y.jsx)(ky,{label:"Add Twitter card",name:"jform[metadata][addtw]",checked:this.state.addtw,onChange:function(t){e.setState({addtw:t}),Dr("jform_metadata_addtw").value=t,ii()}})})]},"1")})},"settings")]})})}}],n&&dO(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component),vO(pO,"propTypes",{}),vO(pO,"defaultProps",{}),uO=pO))||uO;const OO=wO;var _O;function SO(e){return SO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SO(e)}function PO(e){return function(e){if(Array.isArray(e))return qO(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return qO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qO(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function NO(e,t){return NO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},NO(e,t)}function EO(e,t){if(t&&("object"===SO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return RO(e)}function RO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TO(e){return TO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TO(e)}function DO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AO=Xo.default.Group,IO={invokeSectionSaveModal:Oe},MO=(0,v.$j)((function(e){var t=e.action,n=t.action,r=t.path,o=e.nodes.nodes;return{visible:n===ye,path:r,nodes:o}}),IO)(_O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NO(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=TO(r);if(o){var n=TO(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return EO(this,e)});function a(){var e;CO(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return DO(RO(e=i.call.apply(i,[this].concat(n))),"state",{process:!1,path:null}),DO(RO(e),"saveSection",(function(){var t={type:"section",data:[er(PO(e.props.nodes),PO(e.props.path))]};e.setState({process:!0});var n=st(),r=new FormData;r.set("jform[data]",JSON.stringify(t)),r.set("jform[title]",e.state.sectionName),r.set("jform[builder]","frontend"),r.set("jform[type]","section"),r.set("jform[state]","1"),r.set("jform[id]",0),r.set("id",0),r.set("type","collection"),r.set(n,"1"),jt()({method:"post",url:"".concat(tt(),"/index.php?option=com_quix&task=collection.save"),data:r,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(t){var n=t.data;"object"==SO(n)?n.success?(e.setState({sectionName:"",process:!1}),m.success("Template saved"),e.props.invokeSectionSaveModal()):m.warning(n.message):m.error(n)})).catch((function(){return e.setState({process:!1})}))})),e}return t=a,(n=[{key:"render",value:function(){var e=this;return(0,y.jsx)(Do,{width:550,show:this.props.visible,title:"Add Section To Library",footer:!1,closable:!0,onCancel:function(){return e.props.invokeSectionSaveModal()},style:{left:"calc(50vw - 225px)"},children:(0,y.jsxs)("div",{className:"qx-fb-infobox qx-text-center sections-save-box",children:[(0,y.jsxs)("div",{className:"qx-mt-3",children:[(0,y.jsx)("i",{className:"qxuicon-conveyor-belt-alt qx-fb-title-icon"}),(0,y.jsx)("h2",{children:"Save Your Section To Library"}),(0,y.jsx)("p",{className:"qx-mb-4",children:"Your designs will be available for export and reuse on any page or website"})]}),(0,y.jsxs)(AO,{prefixCls:"qxui-input-group",children:[(0,y.jsx)(Xo.default,{size:"large",placeholder:"Enter Section Name",value:this.state.sectionName,style:{width:"75%"},prefixCls:"qxui-input",onChange:function(t){return e.setState({sectionName:t.target.value})}}),(0,y.jsxs)(p.default,{type:"primary",disabled:this.state.process,size:"large",style:{width:"25%"},onClick:this.saveSection,children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-save"})," Save"]})]})]})})}}])&&kO(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||_O;const LO=MO;var BO;function FO(e){return FO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FO(e)}function UO(e){return function(e){if(Array.isArray(e))return zO(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zO(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function WO(e,t){return WO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},WO(e,t)}function GO(e,t){if(t&&("object"===FO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return JO(e)}function JO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VO(e){return VO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},VO(e)}function $O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ZO=Xo.default.Group,XO={invokeElementSaveModal:_e},YO=(0,v.$j)((function(e){var t=e.action,n=t.action,r=t.path,o=e.nodes.nodes;return{visible:n===me,path:r,nodes:o}}),XO)(BO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WO(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=VO(r);if(o){var n=VO(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return GO(this,e)});function a(){var e;HO(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $O(JO(e=i.call.apply(i,[this].concat(n))),"state",{process:!1,element:{},elementName:""}),$O(JO(e),"saveElement",(function(){var t=er(UO(e.props.nodes),UO(e.props.path));t.name=e.state.elementName,e.setState({elementName:""});var n=st(),r={type:"element",data:[t]},o=new FormData;o.set("jform[data]",JSON.stringify(r)),o.set("jform[title]",e.state.elementName),o.set("jform[builder]","frontend"),o.set("jform[type]","element"),o.set("jform[state]","1"),o.set("jform[id]","0"),o.set("id","0"),o.set("type","collection"),o.set(n,"1"),jt()({method:"post",url:"".concat(tt(),"/index.php?option=com_quix&task=collection.save"),data:o,config:{headers:{"Content-Type":"multipart/form-data"}}}).then((function(t){window.jQuery(".savePage i").removeClass("anticon-loading").removeClass("anticon-spin").addClass("anticon-save");var n=t.data;"object"==FO(n)?n.success?(m.success("Template saved"),yt("MY_ELEMENTS"),e.props.invokeElementSaveModal()):m.warning(n.message):m.error(n)}))})),e}return t=a,(n=[{key:"render",value:function(){var e=this;return(0,y.jsx)(Do,{width:550,show:this.props.visible,close:function(){return e.props.invokeElementSaveModal()},title:"Add Element To Library",footer:!1,closable:!0,onCancel:function(){return e.props.invokeElementSaveModal()},closeModal:function(){return e.props.invokeElementSaveModal()},style:{left:"calc(50vw - 225px)"},children:(0,y.jsxs)("div",{className:"qx-fb-infobox qx-text-center sections-save-box",children:[(0,y.jsxs)("div",{className:"qx-mt-3",children:[(0,y.jsx)("i",{className:"qxuicon-conveyor-belt-alt qx-fb-title-icon"}),(0,y.jsx)("h2",{children:"Save Your Element To My Elements"}),(0,y.jsx)("p",{className:"qx-mb-4",children:"Your designs will be available for export and reuse on any page or website"})]}),(0,y.jsxs)(ZO,{prefixCls:"qxui-input-group",children:[(0,y.jsx)(Xo.default,{size:"large",placeholder:"Enter Element Name",value:this.state.elementName,style:{width:"75%"},prefixCls:"qxui-input",onChange:function(t){return e.setState({elementName:t.target.value})}}),(0,y.jsxs)(p.default,{type:"primary",disabled:this.state.process,size:"large",style:{width:"25%"},onClick:this.saveElement,children:[(0,y.jsx)("i",{className:"qx-margin-small-right qxuicon-save"})," Save"]})]})]})})}}])&&QO(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||BO;const KO=YO;function e_(e){return e_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e_(e)}var t_;function n_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o_(e,t){return o_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o_(e,t)}function i_(e,t){if(t&&("object"===e_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a_(e)}function a_(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l_(e){return l_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l_(e)}function s_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c_=Xo.default.Group,u_=ol.default.Option,p_=function(e){return(0,y.jsx)("i",{className:e.type,style:null==e?void 0:e.style})},f_={invokeDisplayConditionModal:Se};const d_=(0,v.$j)((function(e){return{visible:e.action.action===be}}),f_)(t_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o_(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l_(r);if(o){var n=l_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i_(this,e)});function a(){var e;n_(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return s_(a_(e=i.call.apply(i,[this].concat(n))),"state",{stack:[],settings:"",oldSettings:[],settingOptions:[],subSettingOptions:[],selectedType:"all-menu",selectedSubType:"",subMenus:[],selectedMenuType:"",warning:!1,conditionData:[]}),s_(a_(e),"closeModal",(function(){e.props.invokeDisplayConditionModal(!1)})),s_(a_(e),"loadMenu",(function(t){var n=e.state.subMenus;n[t]||(n[t]=[],jt().get("".concat(tt(),"/index.php?option=com_quix&task=api.getParentItem&menutype=").concat(t)).then((function(r){n[t]=r.data,e.setState({subMenus:n})})))})),s_(a_(e),"dataSave",(function(){var t=e.state.conditionData;return Dr("jform_conditions").value=JSON.stringify(t),!0})),s_(a_(e),"save",(function(){e.dataSave(),e.closeModal()})),s_(a_(e),"remove",(function(t){var n=ar(e.state.conditionData);n.splice(t,1),e.setState({conditionData:n})})),s_(a_(e),"addCondition",(function(){var t=ar(e.state.conditionData);t.push({typeCondition:"include",type:"all-menu",subType:"",parent_menu:""}),e.setState({conditionData:t})})),s_(a_(e),"changeVal",(function(t,n){var r=n.name,o=n.parentindex,i=ar(e.state.conditionData);"menus"===i[o].type&&"subType"===r&&(e.state.subMenus[t]||e.loadMenu(t)),i[o][r]=t,e.setState({conditionData:i})})),s_(a_(e),"showCondition",(function(t,n){var r,o=Dr("jform_template_type");r=null!=o?o.value:"section";var i=null;return"menus"===t.type&&t.subType&&(e.state.subMenus[t.subType]||e.loadMenu(t.subType),e.state.subMenus[t.subType]&&(i=(0,y.jsx)(ol.default,{prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},value:t.parent_menu,onChange:e.changeVal,className:"qx-margin-right",children:e.state.subMenus[t.subType].map((function(e){return(0,y.jsx)(u_,{parentindex:n,value:e.id,name:"parent_menu",children:e.title},e.id)}))}))),(0,y.jsx)("div",{className:"publish-settings__condition qx-margin-small-bottom qx-background-muted qx-padding-small",style:{borderRadius:"4px",padding:"5px"},children:(0,y.jsxs)(c_,{prefixCls:"qxui-input-group",children:[(0,y.jsxs)(ol.default,{prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},value:t.typeCondition,onChange:e.changeVal,className:"qx-margin-right",children:[(0,y.jsx)(u_,{parentindex:n,value:"include",name:"typeCondition",children:"Include"},"include"),(0,y.jsx)(u_,{parentindex:n,value:"exclude",name:"typeCondition",children:"Exclude"},"exclude")]}),(0,y.jsxs)(ol.default,{prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},value:t.type,onChange:e.changeVal,className:"qx-margin-right",children:[(0,y.jsx)(u_,{parentindex:n,value:"all-menu",name:"type",children:"Default - Entire Site"},"all-menu"),(0,y.jsx)(u_,{parentindex:n,value:"menus",name:"type",children:"Menus"},"menus"),"article"===r?(0,y.jsx)(u_,{parentindex:n,value:"article",name:"type",children:"All Articles"},"article"):null,"article"===r?(0,y.jsx)(u_,{parentindex:n,value:"categories",name:"type",children:"Categories"},"categories"):null]}),"article"!==t.type&&"all-menu"!==t.type?(0,y.jsx)(ol.default,{prefixCls:"qxui-select",getPopupContainer:function(){return window.document.body},value:t.subType,onChange:e.changeVal,className:"qx-margin-right",children:e.state.settingOptions[t.type]?e.state.settingOptions[t.type].map((function(e){return(0,y.jsx)(u_,{parentindex:n,value:e.value,name:"subType",children:e.text},e.value)})):null}):null,"menus"===t.type&&t.subType?i:null,(0,y.jsx)("span",{href:"#",onClick:function(){return e.remove(n)},className:"qx-flex qx-flex-middle qx-text-muted qx-link",style:{marginLeft:"-10px"},children:(0,y.jsx)(p_,{type:"qxio-close"})})]})},n)})),e}return t=a,(n=[{key:"componentDidMount",value:function(){this.setState({settingOptions:window.QUIX_API_GETJOOMLACATEGORIES});for(var e=Dr("jform_menutype").options,t=[],n=e.length,r=0;r<n;r++)if("select menu"!==e[r].text.toLowerCase()){var o=[];o.value=e[r].value,o.text=e[r].text,t.push(o)}var i=this.state.settingOptions;i.menus=t,this.setState({settingOptions:i});var a=Dr("jform_conditions").value||"[]";this.setState({conditionData:JSON.parse(a)})}},{key:"render",value:function(){var e=this;return(0,y.jsx)(Do,{className:"qxui-modal--with-tab modal--small theme-joomla-layouts-modal",title:"Publish Settings",show:this.props.visible,close:this.closeModal,dismisible:!0,style:{left:"calc(50vw - 400px)"},footer:[(0,y.jsxs)("button",{className:"qxui-btn qxui-btn-primary qxui-btn-lg",onClick:this.save,children:[(0,y.jsx)("i",{className:"qxuicon-check"})," Save "]},"save")],children:(0,y.jsx)(tx.Z,{prefixCls:"qx-card",bordered:!0,style:{maxHeight:"420px",overflow:"auto"},children:(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{className:"qx-padding-small qx-qx-margin-bottom qx-text-center",children:(0,y.jsx)(p_,{type:"qxif-rocket",style:{fontSize:"70px",color:"#08c"}})}),(0,y.jsx)("div",{className:"qx-card-head qx-margin-bottom",children:(0,y.jsxs)("div",{className:"qx-card-head-wrapper",children:[(0,y.jsx)("h2",{className:"qx-card-head-title qx-text-center",style:{fontSize:"30px",marginBottom:"40px"},children:"Where do you want to display your layout?"}),(0,y.jsxs)("div",{className:"qx-text-muted qx-text-center",style:{fontFamily:"Roboto,Arial,Helvetica,Verdana,sans-serif",fontSize:"18px",fontWeight:300},children:["Set the conditions that determine where your Template is used throughout your site.",(0,y.jsx)("br",{}),"For example, choose 'Entire Site' to display the template across your site."]})]})}),(0,y.jsxs)("div",{className:"qx-fb-field",children:[this.state.conditionData.map(this.showCondition),this.state.warning?(0,y.jsx)("p",{className:"qx-alert qx-alert-warning qx-small qx-padding-small",children:" Please complete your selection first"}):null,(0,y.jsx)("div",{className:"qx-padding qx-text-center",children:(0,y.jsx)("button",{onClick:function(){e.addCondition()},className:"qxui-btn qxui-btn-primary",children:"Add Condition"})})]})]})})})}}])&&r_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||t_,h_=function(){return(0,y.jsxs)("div",{children:[(0,y.jsx)(Ca,{children:(0,y.jsx)(Rl,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(Kg,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(OO,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)($l,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(rd,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(sO,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(LO,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(KO,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(d_,{})}),(0,y.jsx)(Ca,{children:(0,y.jsx)(Jx,{})})]})};function y_(e){return y_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y_(e)}var m_;function b_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g_(e,t){return g_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g_(e,t)}function x_(e,t){if(t&&("object"===y_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j_(e)}function j_(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w_(e){return w_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w_(e)}function O_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var __={copyNode:Me,setContainerWidth:function(e){return{type:g,payload:{width:e}}},setDevice:He};const S_=(0,v.$j)(null,__)(m_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g_(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w_(r);if(o){var n=w_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return x_(this,e)});function a(){var e;b_(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return O_(j_(e=i.call.apply(i,[this].concat(n))),"shouldComponentUpdate",_o()),O_(j_(e),"readFromClipboard",(function(){rn("qx-node").then((function(t){t&&t.id!==window.QUIX.lastCopiedNodeId&&(window.QUIX.lastCopiedNodeId=t.id,e.props.copyNode(null,t))}))})),e}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this;this.props.setContainerWidth(jQuery(".app-mount").width()),_r().then((function(t){return t.addEventListener("mouseenter",e.readFromClipboard)})),this.readFromClipboard()}},{key:"componentWillUnmount",value:function(){var e=this;_r().then((function(t){return t.removeEventListener("mouseenter",e.readFromClipboard)}))}},{key:"render",value:function(){return(0,y.jsx)("div",{className:"frontend-blocks",children:(0,y.jsxs)(b.Suspense,{fallback:(0,y.jsx)(Sp,{}),children:[(0,y.jsx)(bp,{}),(0,y.jsx)(h_,{})]})})}}])&&v_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(b.Component))||m_;var P_=n(92966),q_=n(82006);function C_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C_(Object(n),!0).forEach((function(t){N_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E_={url:quix.url,qid:"0"===quix.id?null:quix.id,grid:12,col:8.333333333333334,blocks:JSON.parse(quix.blocks),saveCollectionScreen:{visible:!1,data:null,category:null},jmedia:{visible:!1,options:{}},exportImportScreen:{visible:!1},seoScreen:{visible:!1},pageModal:{visible:!1},linkMenuModal:{visible:!1},joomlaLayouts:{visible:!1}};function R_(e){return function(e){if(Array.isArray(e))return T_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return T_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T_(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D_(Object(n),!0).forEach((function(t){I_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M_=ar(window.QUIX_PAGE);if(window.QUIX_PAGE=null,!Array.isArray(M_))throw new Error("Source nodes must be type of array");var L_={nodes:(M_=function e(t){return t.map((function(t){return t.children=e(t.children),t.id=t.form.advanced.identifier.id,t}))}(M_)).slice(),saved:M_.slice(),clipboard:{node:null},responsive:!1,device:"lg",resize:{rowPath:null,column1:{id:null,index:0,width:50},column2:{id:null,index:1,width:50},meLeft:!0,width:0}};function B_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B_(Object(n),!0).forEach((function(t){U_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}M_=null;var z_={path:null,index:0,action:null,openJMedia:!1};function H_(e){return function(e){if(Array.isArray(e))return Q_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Q_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q_(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W_(Object(n),!0).forEach((function(t){J_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V_={showForm:!1,path:null,node:null,initialNode:null,schema:null};function $_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$_(Object(n),!0).forEach((function(t){X_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y_={path:[],placement:"AFTER"},K_=(0,P_.UY)({meta:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E_,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;switch(n){case g:return k_(k_({},e),{},{col:r/e.grid});case j:return k_(k_({},e),{},{saveCollectionScreen:k_(k_({},e.saveCollectionScreen),r)});case x:return k_(k_({},e),{},{exportImportScreen:k_(k_({},e.exportImportScreen),{},{visible:r})});case O:return k_(k_({},e),{},{qid:"0"===r?null:r});default:return e}},nodes:function(){var e,t,n,r,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L_,l=arguments.length>1?arguments[1]:void 0,s=l.type,c=l.payload;switch(ii(),s){case P:case S:return A_({},a);case q:return A_(A_({},a),{},{nodes:ar(c)});case re:return e=tr(R_(n=c.index||a.nodes.length),R_(a.nodes),R_(c.newNodes)),A_(A_({},a),{},{nodes:e});case F:return m=c.targetPath,t=a.clipboard.node,e=Un(R_(a.nodes),t,R_(m)),A_(A_({},a),{},{nodes:e});case D:return n=c.index||a.nodes.length,e=$n(R_(a.nodes),[n],En()),A_(A_({},a),{},{nodes:e});case C:return e=Yn(R_(a.nodes),R_(c.nodePath),["form"].concat(R_(c.valuePath)),c.value),A_(A_({},a),{},{nodes:e});case R:return e=$n(R_(a.nodes),[].concat(R_(c.path),[c.index]),Rn()),A_(A_({},a),{},{nodes:e});case T:return e=Mn(R_(a.nodes),c.path,c.index),A_(A_({},a),{},{nodes:e});case Y:return e=Fn(R_(a.nodes),c.path,!0),A_(A_({},a),{},{nodes:e});case A:return t=Dn(c.element),c.node=t,e=$n(R_(a.nodes),R_(c.path),t),A_(A_({},a),{},{nodes:e});case I:return t=An(c.element),e=$n(R_(a.nodes),R_(c.path),t),A_(A_({},a),{},{nodes:e});case H:return e=nr(c.path,c.layout,R_(a.nodes)),A_(A_({},a),{},{nodes:e});case U:var u=er(R_(a.nodes),R_(c.path));if(e=Jn(R_(a.nodes),R_(c.path)),"column"===u.slug){var p=R_(c.path).slice(0,-2);e=rr(R_(e),p)}return A_(A_({},a),{},{nodes:e});case ue:return e=[],A_(A_({},a),{},{nodes:e});case le:return e=Bn(R_(a.nodes),R_(c.path),c.node),A_(A_({},a),{},{nodes:e});case M:return e=Fn(R_(a.nodes),c.path),A_(A_({},a),{},{nodes:e});case J:return A_(A_({},a),{},{device:c.device});case W:return e=Zn(R_(a.nodes),[].concat(R_(c.path),["visibility"]),c.visibility),e=Zn(e,[].concat(R_(c.path),["hash"]),lr("qx-hash")),A_(A_({},a),{},{nodes:e});case L:return t=c.node||er(a.nodes,R_(c.path)),on("qx-node",t),A_(A_({},a),{},{clipboard:A_(A_({},a.clipboard),{},{node:ar(t)})});case B:var f=R_(c.path);t=a.clipboard.node;var d=er(R_(a.nodes),R_(f)),h=fn(d)?"element":d.slug,y=fn(t)?"element":t.slug;if(!yn(h,y))return console.warn("Incompatible overlap"),A_({},a);var m=R_(f),b=hn(h),v=hn(y);if(b<v)m=[].concat(R_(m),["children",c.bellow?d.children.length:0]);else if(c.bellow){var g=m.pop();g++,m=[].concat(R_(m),[g])}return e=Un(R_(a.nodes),t,R_(m)),A_(A_({},a),{},{nodes:e,clipboard:A_(A_({},a.clipboard),{},{node:t})});case V:return(r=a.clipboard.node)?(o=Hn(r,t=er(R_(a.nodes),R_(c.path))),e=Zn(e=Qn(R_(a.nodes),R_(c.path),{form:{styles:ar(o.form.styles),advanced:ar(o.form.advanced)},hash:lr("qx-hash")}),[].concat(R_(c.path),["hash"]),lr("qx-hash")),A_(A_({},a),{},{nodes:e})):A_({},a);case Z:return(r=a.clipboard.node)?(i=er(r,["form"].concat(R_(c.stylePath))),e=Zn(e=Qn(R_(a.nodes),[].concat(R_(c.nodePath),["form"],R_(c.stylePath)),i),[].concat(R_(c.nodePath),["hash"]),lr("qx-hash")),A_(A_({},a),{},{nodes:e})):A_({},a);case X:var x=Hn(Nn((t=er(a.nodes,R_(c.path))).slug),t);return t=A_(A_({},t),{},{hash:lr(t.slug),form:A_(A_({},t.form),{},{styles:ar(x.form.styles),advanced:ar(x.form.advanced)})}),e=Bn(R_(a.nodes),R_(c.path),t),A_(A_({},a),{},{nodes:e});case E:return A_({},a);case z:return e=zn(R_(a.nodes),R_(c.from),R_(c.to)),A_(A_({},a),{},{nodes:e});case N:return e=rr(R_(a.nodes),R_(c.path)),A_(A_({},a),{},{nodes:e});case se:var j,w,O,_=+c.path.slice().pop(),$=R_(c.path).slice(0,c.path.length-2),pe=!0,fe=er(R_(a.nodes),R_($));if("row"!==fe.slug)return A_({},a);_>fe.children.length-2?(j=fe.children[_],O=_-1,w=fe.children[O],pe=!1):(j=fe.children[_],O=_+1,w=fe.children[O]);var de={column1:{id:j.form.advanced.identifier.id,index:_,width:Vr(j.form.general.layout_fields_group.col_width,c.width)},column2:{id:w.form.advanced.identifier.id,index:O,width:Vr(w.form.general.layout_fields_group.col_width,c.width)}};return A_(A_({},a),{},{resize:A_(A_({rowPath:$},de),{},{meLeft:pe,width:c.width})});case ce:return e=Yn(R_(a.nodes),[].concat(R_(a.resize.rowPath),["children",a.resize.column1.index]),["form","general","layout_fields_group","col_width"],Vr(c.width.column1.width,a.resize.width)),e=Yn(R_(a.nodes),[].concat(R_(a.resize.rowPath),["children",a.resize.column2.index]),["form","general","layout_fields_group","col_width"],Vr(c.width.column2.width,a.resize.width)),A_(A_({},a),{},{nodes:e,resize:{rowPath:null,column1:null,column2:null,meLeft:!0}});case Q:case G:case k:case K:case ee:case te:case ne:case oe:case ie:case ae:return A_({},a);default:return a}},action:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z_,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;switch(n){case pe:return F_(F_({},e),r);case de:return F_(F_({},e),{},{jmedia:{callback:r.callback,config:r.config},openJMedia:r.show});default:return e}},form:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V_,o=arguments.length>1?arguments[1]:void 0,i=o.type,a=o.payload;switch(i){case A:case ge:if(!a.path)return G_(G_({},r),{},{showForm:!1,path:null,node:null,initialNode:null});n=Xr(a.node);var l=!0;return i===A&&"column"===(null===(e=a.node)||void 0===e?void 0:e.slug)&&(l=!1),G_(G_({},r),{},{showForm:l,path:a.path,node:ar(a.node),initialNode:ar(a.node),schema:n});case xe:return n=Xr(a.node),{path:a.path,node:ar(a.node),initialNode:ar(a.node),schema:n};case C:return t=G_({},r.node),r.node&&t?(t.form=Kn(G_({},r.node.form),H_(a.valuePath),a.value),G_(G_({},r),{},{node:G_({},t)})):G_({},r);default:return r}},dnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y_,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;return n===je?r.path.join()===e.path.join()&&r.placement===e.placement?e:Z_(Z_({},e),{},{path:r.path,placement:r.placement}):e}}),eS=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||P_.qC;function tS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}window.qxUIkit=n(86799);function rS(){vr.prepare().then((function(){return new Promise((function(e,t){var n,r=[],o=wn(At());try{var i=function(){var e=n.value;r.push(new Promise((function(t){return Promise.all([Lt(e.slug),(n=e.slug,Rt("".concat(n,"-default_node")))]).then((function(n){return t({slug:e.slug,schema:n[0],node:n[1]})}));var n})))};for(o.s();!(n=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}Promise.all(r).then((function(t){var n,r=wn(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;Sn.push(o.schema),Pn.push(o.node),qn.push(o.slug)}}catch(e){r.e(e)}finally{r.f()}e()})).catch(t)}))})).then((function(){var e,t=(0,P_.MT)(K_,eS((0,P_.md)(ro,q_.Z)));!function(e){var t=function(){return(0,y.jsx)(v.zt,{store:e,children:(0,y.jsx)(r.default,{prefixCls:"qxui",children:(0,y.jsx)(ss,{})})})};jQuery("#loaderMessage").addClass("step2").html("Preparing Assets"),window.loadedQuixComponentBuilder=!0,(0,Iu.render)((0,y.jsx)(t,{}),Dr("qx-fb-frame-toolbar"))}(t),document.querySelectorAll('link[disabled="true"]').forEach((function(e){return e.removeAttribute("disabled")})),function(e){var t=function(){return(0,y.jsx)(v.zt,{store:e,children:(0,y.jsx)(r.default,{prefixCls:"qxui",children:(0,y.jsx)(S_,{})})})};new Promise((function(e,t){if(Or.mount_node)return Or.document.addEventListener("keydown",xr),e(Or.mount_node);Or.onLoad.push((function(){e(Or.mount_node)}))})).then((function(e){(0,Iu.render)((0,y.jsx)(t,{}),e),function(e){var t=Tr(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.document);return t.length>0?t[0]:null}("preloader").style.display="none"})).catch((function(e){console.log("Could not load mount node",e)}))}(t),_r().then((function(e){e.addEventListener("click",(function(e){e.target.closest(".contextMenu-dropdown")||Rr.click()})),e.addEventListener("contextmenu",(function(e){e.target.closest("#qx-fb-mount")||Rr.click()}))})),window.document.addEventListener("contextmenu",(function(){Rr.click()})),jQuery((function(){setTimeout((function(){_t(document.getElementById("jform_template_type"))||["editor","section","page","article","header","footer","mainbody"].includes(document.getElementById("jform_template_type").value)&&0===window.quix_initial_nodes_size&&i.emit("SHOW_TEMPLATE_MODAL",{path:null,tab:"Sections"})}),3e3)})),e=t.dispatch,window.addEventListener("message",(function(t){var n=t.data,r=n.type,o=n.path,i=n.content;"INLINE_EDITED_CONTENT"===r&&e(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tS(Object(n),!0).forEach((function(t){nS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},ke(o.node,o.value,i)))}))})).catch((function(e){console.log(e)}))}function oS(){(Et=ar(window.qx_elements),delete window.qx_elements,new Promise((function(e,t){Promise.all(Et.map((function(e){return new Promise((function(t,n){var r;(r="".concat(e.slug,"-schema"),new Promise((function(e,t){return Nt().getItem(r).then((function(t){return e(!!t)})).catch(t)}))).then((function(n){t({key:e.slug,loaded:n})})).catch(n)}))}))).then((function(n){var r=n.filter((function(e){return!e.loaded})).map((function(e){return e.key}));r.length>0?t(r):e()})).catch(t)}))).then((function(e){rS()})).catch((function(e){var t;e.length===At().length?Dr("loaderMessage").innerText="Preparing for first load...":Dr("loaderMessage").innerText="Loading missing elements...",(t=e,new Promise((function(e,n){jt().get("".concat(tt(),"/index.php?option=com_quix&task=element.getElements&elements=").concat(t.join(","))).then((function(t){e(t.data.data)})).catch(n)}))).then((function(e){for(var t in e.elements)e.elements.hasOwnProperty(t)&&(e.elements[t].default_node=JSON.parse(e.elements[t].default_node),e.elements[t].schema=JSON.parse(e.elements[t].schema));Promise.all([Dt(e.elements),Dt(e.special),Dt({js:e.js,css:e.css})]).then((function(){Dr("loaderMessage").innerText="Loaded",rS()})).catch((function(e){console.warn(e)}))})).catch((function(e){console.warn(e)}))}))}window.addEventListener("DOMContentLoaded",(function(){window.QUIXNXT_DEBUG?Nt().clear().then(oS):oS()})),window.addEventListener("load",(function(){window.document.body.style.height="100vh",window.document.body.style.overflow="hidden",window.document.body.querySelector("form.qx-fb")})),window.addEventListener("keydown",xr)},23032:(e,t,n)=>{window.pkg_quix_public_path=`${window.quix.url}/index.php?version=${window.quix.version}&quix-asset=`,n.p=pkg_quix_public_path},19135:()=>{}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return l[e].call(n.exports,n,n.exports,c),n.loaded=!0,n.exports}c.m=l,e=[],c.O=(t,n,r,o)=>{if(!n){var i=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,l=0;l<n.length;l++)(!1&o||i>=o)&&Object.keys(c.O).every((e=>c.O[e](n[l])))?n.splice(l--,1):(a=!1,o<i&&(i=o));if(a){e.splice(u--,1);var s=r();void 0!==s&&(t=s)}}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]=[n,r,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>{if(325===e)return"js/325.js"},c.miniCssF=e=>325===e?"js/325.css":"builder/vendor.css",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="pkg_quix:",c.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var a,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==o+n){a=p;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",o+n),a.src=e),r[e]=[t];var f=(t,n)=>{a.onerror=a.onload=null,clearTimeout(d);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),l&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.j=850,c.p="/",i=e=>new Promise(((t,n)=>{var r=c.miniCssF(e),o=c.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(o===e||o===t))return a}var i=document.getElementsByTagName("style");for(r=0;r<i.length;r++){var a;if((o=(a=i[r]).getAttribute("data-href"))===e||o===t)return a}})(r,o))return t();((e,t,n,r)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=i=>{if(o.onerror=o.onload=null,"load"===i.type)n();else{var a=i&&("load"===i.type?"missing":i.type),l=i&&i.target&&i.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+l+")");s.code="CSS_CHUNK_LOAD_FAILED",s.type=a,s.request=l,o.parentNode.removeChild(o),r(s)}},o.href=t,document.head.appendChild(o)})(e,o,t,n)})),a={850:0},c.f.miniCss=(e,t)=>{a[e]?t.push(a[e]):0!==a[e]&&{325:1}[e]&&t.push(a[e]=i(e).then((()=>{a[e]=0}),(t=>{throw delete a[e],t})))},(()=>{var e={850:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,l]=n,s=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(l)var u=l(c)}for(t&&t(n);s<i.length;s++)o=i[s],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return c.O(u)},n=self.webpackChunkpkg_quix=self.webpackChunkpkg_quix||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),c.nc=void 0,c.O(void 0,[610],(()=>c(30435))),c.O(void 0,[610],(()=>c(23032))),c.O(void 0,[610],(()=>c(54250)));var u=c.O(void 0,[610],(()=>c(39054)));u=c.O(u)})();