@hashtagcms/admin-ui-kit 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/admin-ui-kit.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see admin-ui-kit.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("vue")):"function"==typeof define&&define.amd?define(["axios","vue"],t):"object"==typeof exports?exports.HashtagCmsAdminUI=t(require("axios"),require("vue")):e.HashtagCmsAdminUI=t(e.axios,e.vue)}(this,(__WEBPACK_EXTERNAL_MODULE__742__,__WEBPACK_EXTERNAL_MODULE__380__)=>(()=>{var __webpack_modules__={127(e){e.exports=function(){var e=[],t=[],n={},o={},r={};function a(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function l(e,t){return e.replace(t[0],function(n,o){var r,a,l=(r=t[1],a=arguments,r.replace(/\$(\d{1,2})/g,function(e,t){return a[t]||""}));return i(""===n?e[o-1]:n,l)})}function s(e,t,o){if(!e.length||n.hasOwnProperty(e))return t;for(var r=o.length;r--;){var a=o[r];if(a[0].test(t))return l(t,a)}return t}function c(e,t,n){return function(o){var r=o.toLowerCase();return t.hasOwnProperty(r)?i(o,r):e.hasOwnProperty(r)?i(o,e[r]):s(r,o,n)}}function d(e,t,n,o){return function(o){var r=o.toLowerCase();return!!t.hasOwnProperty(r)||!e.hasOwnProperty(r)&&s(r,r,n)===r}}function u(e,t,n){return(n?t+" ":"")+(1===t?u.singular(e):u.plural(e))}return u.plural=c(r,o,e),u.isPlural=d(r,o,e),u.singular=c(o,r,t),u.isSingular=d(o,r,t),u.addPluralRule=function(t,n){e.push([a(t),n])},u.addSingularRule=function(e,n){t.push([a(e),n])},u.addUncountableRule=function(e){"string"!=typeof e?(u.addPluralRule(e,"$0"),u.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},u.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),r[e]=t,o[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return u.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return u.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return u.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(u.addUncountableRule),u}()},262(e,t){"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n}},380(e){"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__380__},602(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={mounted:function(){this.normalizeData()},props:["dataOptions","dataSelected","dataParser","dataOnChange","dataBtnCss"],data:function(){return{display:"",formatter:this.dataParser,lists:void 0!==this.dataOptions&&"string"==typeof this.dataOptions?JSON.parse(this.dataOptions):this.dataOptions,current:{},selectedIndex:void 0===this.dataSelected?0:parseInt(this.dataSelected),openCSS:"",btnCss:void 0===this.dataBtnCss?"":this.dataBtnCss}},computed:{onChange:function onChange(){var method=void 0===this.dataOnChange?null:this.dataOnChange;return"string"==typeof method?eval(method):method}},methods:{toggleMenu:function(){this.display=""===this.display?"display:block":"",""!==this.display&&this.bindDocumentClick()},isActive:function(e){return this.current.value===e.value?"dropdown-item active hand":"dropdown-item hand"},normalizeData:function(){var e=this.formatter,t=[];this.lists.forEach(function(n,o){"function"==typeof e?t.push(e(n)):"number"==typeof o&&t.push({label:n,value:n})}),this.lists=t,this.current=this.lists[this.selectedIndex]},setCurrent:function(e){this.current=this.lists[e],this.current.index=e,null!=this.onChange&&"function"==typeof this.onChange&&this.onChange(this.current),this.$emit("change",this.current)},mangeShowHide:function(e){var t=this.$refs.dropdownMenu,n=e.target;t===n||t.contains(n)||(this.display="",this.unBindDocumentClick())},bindDocumentClick:function(){document.addEventListener("mouseup",this.mangeShowHide)},unBindDocumentClick:function(){document.removeEventListener("mouseup",this.mangeShowHide)},setData:function(e){this.lists=[],this.lists=e,this.normalizeData()}}}},648(e,t,n){var o,r,a,i;function l(e,t,n,o,r,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,r)}function s(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var a=e.apply(t,n);function i(e){l(a,o,r,i,s,"next",e)}function s(e){l(a,o,r,i,s,"throw",e)}i(void 0)})}}function c(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(D(e)+" is not iterable")}function d(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,o,r,a){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,o,r){var a,l,s,c=0,d=r||[],u=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return a=t,l=0,s=e,f.n=n,i}};function h(n,o){for(l=n,s=o,t=0;!u&&c&&!r&&t<d.length;t++){var r,a=d[t],h=f.p,m=a[2];n>3?(r=m===o)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=o,f.n=a[1]):h<m&&(r=n<3||a[0]>o||o>m)&&(a[4]=n,a[5]=o,f.n=m,l=0))}if(r||n>1)return i;throw u=!0,o}return function(r,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,m),l=d,s=m;(t=l<2?e:s)||!u;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),t=a[r]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=e}else if((t=(u=f.n<0)?s:n.call(o,f))!==i)break}catch(t){a=e,l=1,s=t}finally{c=1}}return{value:t,done:u}}}(n,r,a),!0),c}var i={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var f=[][o]?t(t([][o]())):(u(t={},o,function(){return this}),t),h=c.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,u(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return s.prototype=c,u(h,"constructor",c),u(c,"constructor",s),s.displayName="GeneratorFunction",u(c,r,"GeneratorFunction"),u(h),u(h,r,"Generator"),u(h,o,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:a,m}})()}function u(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}u=function(e,t,n,o){function a(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},u(e,t,n,o)}function f(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(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 h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,b(o.key),o)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}function w(e,t,n){return t=C(t),function(e,t){if(t&&("object"==D(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)}(e,k()?Reflect.construct(t,n||[],C(e).constructor):t.apply(e,n))}function S(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&&_(e,t)}function E(e){var t="function"==typeof Map?new Map:void 0;return E=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(k())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&_(r,n.prototype),r}(e,arguments,C(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_(n,e)},E(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function N(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 o,r,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=a.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}(e,t)||A(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 A(e,t){if(e){if("string"==typeof e)return B(e,t);var n={}.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)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function D(e){return D="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},D(e)}function x(e){return function(){return new V(e.apply(this,arguments))}}function V(e){var t,n;function o(t,n){try{var a=e[t](n),i=a.value,l=i instanceof O;Promise.resolve(l?i.v:i).then(function(n){if(l){var s="return"===t?"return":"next";if(!i.k||n.done)return o(s,n);n=e[s](n).value}r(a.done?"return":"normal",n)},function(e){o("throw",e)})}catch(e){r("throw",e)}}function r(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?o(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(a,i){var l={key:e,arg:r,resolve:a,reject:i,next:null};n?n=n.next=l:(t=n=l,o(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}function T(e){return new O(e,0)}function M(e){var t={},n=!1;function o(t,o){return n=!0,o=new Promise(function(n){n(e[t](o))}),{done:!1,value:new O(o,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):o("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return o("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):o("return",e)}),t}function O(e,t){this.v=e,this.k=t}function I(e){var t,n,o,r=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,o=Symbol.iterator);r--;){if(n&&null!=(t=e[n]))return t.call(e);if(o&&null!=(t=e[o]))return new j(t.call(e));n="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function j(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return j=function(e){this.s=e,this.n=e.next},j.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new j(e)}e=n.nmd(e),V.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},V.prototype.next=function(e){return this._invoke("next",e)},V.prototype.throw=function(e){return this._invoke("throw",e)},V.prototype.return=function(e){return this._invoke("return",e)},i=function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==("undefined"==typeof globalThis?"undefined":D(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":D(window)))return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{AdminConfig:function(){return u},CleanForUrl:function(){return Ln},CopyToClipboard:function(){return On},Dashboard:function(){return cn},Errors:function(){return Gt},Fetcher:function(){return zt},Form:function(){return Zt},Humanize:function(){return Fn},IsJson:function(){return Pn},LeftMenu:function(){return fn},MapAPI:function(){return tn},PasteFromClipboard:function(){return In},Storage:function(){return gn},Store:function(){return vn},TitleCase:function(){return Rn},Utils:function(){return Mn},default:function(){return Hn},parseProp:function(){return xn},queryBuilder:function(){return Tn},safeErrorData:function(){return Vn}});var n={};function o(e){return o="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},o(e)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}e.r(n),e.d(n,{hasBrowserEnv:function(){return Ie},hasStandardBrowserEnv:function(){return Pe},hasStandardBrowserWebWorkerEnv:function(){return Fe},navigator:function(){return je},origin:function(){return Le}});var u=function(){return e=function e(){var t,n,o,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appConfig=null!==(t=null!==(n="undefined"!=typeof window&&(null===(o=window.HashtagCms)||void 0===o?void 0:o.adminConfig))&&void 0!==n?n:"undefined"!=typeof window&&(null===(r=window.Laravel)||void 0===r?void 0:r.adminConfig))&&void 0!==t?t:{}},t=[{key:"get",value:function(e,t){var n;return null!==(n=this.appConfig[e])&&void 0!==n?n:t}},{key:"has",value:function(e){return null!=this.appConfig[e]}},{key:"all",value:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.appConfig)}},{key:"admin_path",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="";return null!==t&&"[object Object]"===Object.prototype.toString.call(t)&&(n="?"+Object.entries(t).map(function(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,r,a,i=[],l=!0,s=!1;try{for(r=(t=t.call(e)).next;!(l=(n=r.call(t)).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw o}}return i}}(e)||function(e){if(e){if("string"==typeof e)return r(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,2):void 0}}(e)||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.")}()}(e),n=t[0],o=t[1];return"".concat(n,"=").concat(encodeURIComponent(o))}).join("&")),this.get("base_path","")+"/"+e+n}},{key:"admin_asset",value:function(e){return this.get("app_url","")+"/"+this.get("theme_assets","")+"/"+e}},{key:"get_media",value:function(e){return this.get("media_path","")+"/"+e}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function h(e,t){return function(){return e.apply(t,arguments)}}new u;var v,b=Object.prototype.toString,k=Object.getPrototypeOf,_=Symbol.iterator,C=Symbol.toStringTag,B=(v=Object.create(null),function(e){var t=b.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())}),V=function(e){return e=e.toLowerCase(),function(t){return B(t)===e}},O=function(e){return function(t){return D(t)===e}},j=Array.isArray,P=O("undefined");function F(e){return null!==e&&!P(e)&&null!==e.constructor&&!P(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var L=V("ArrayBuffer"),R=O("string"),U=O("function"),H=O("number"),$=function(e){return null!==e&&"object"==D(e)},q=function(e){if("object"!==B(e))return!1;var t=k(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||C in e||_ in e)},z=V("Date"),K=V("File"),W=V("Blob"),J=V("FileList"),X=V("URLSearchParams"),Y=N(["ReadableStream","Request","Response","Headers"].map(V),4),G=Y[0],Z=Y[1],Q=Y[2],ee=Y[3];function te(e,t){var n,o,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==r&&r;if(null!=e)if("object"!=D(e)&&(e=[e]),j(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(F(e))return;var i,l=a?Object.getOwnPropertyNames(e):Object.keys(e),s=l.length;for(n=0;n<s;n++)i=l[n],t.call(null,e[i],i,e)}}function ne(e,t){if(F(e))return null;t=t.toLowerCase();for(var n,o=Object.keys(e),r=o.length;r-- >0;)if(t===(n=o[r]).toLowerCase())return n;return null}var oe,re,ae,ie,le,se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,ce=function(e){return!P(e)&&e!==se},de=(oe="undefined"!=typeof Uint8Array&&k(Uint8Array),function(e){return oe&&e instanceof oe}),ue=V("HTMLFormElement"),fe=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),he=V("RegExp"),me=function(e,t){var n=Object.getOwnPropertyDescriptors(e),o={};te(n,function(n,r){var a;!1!==(a=t(n,r,e))&&(o[r]=a||n)}),Object.defineProperties(e,o)},pe=V("AsyncFunction"),ge=(re="function"==typeof setImmediate,ae=U(se.postMessage),re?setImmediate:ae?(ie="axios@".concat(Math.random()),le=[],se.addEventListener("message",function(e){var t=e.source,n=e.data;t===se&&n===ie&&le.length&&le.shift()()},!1),function(e){le.push(e),se.postMessage(ie,"*")}):function(e){return setTimeout(e)}),ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(se):"undefined"!=typeof process&&process.nextTick||ge,ye={isArray:j,isArrayBuffer:L,isBuffer:F,isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||U(e.append)&&("formdata"===(t=B(e))||"object"===t&&U(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&L(e.buffer)},isString:R,isNumber:H,isBoolean:function(e){return!0===e||!1===e},isObject:$,isPlainObject:q,isEmptyObject:function(e){if(!$(e)||F(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:G,isRequest:Z,isResponse:Q,isHeaders:ee,isUndefined:P,isDate:z,isFile:K,isBlob:W,isRegExp:he,isFunction:U,isStream:function(e){return $(e)&&U(e.pipe)},isURLSearchParams:X,isTypedArray:de,isFileList:J,forEach:te,merge:function e(){for(var t=ce(this)&&this||{},n=t.caseless,o=t.skipUndefined,r={},a=function(t,a){var i=n&&ne(r,a)||a;q(r[i])&&q(t)?r[i]=e(r[i],t):q(t)?r[i]=e({},t):j(t)?r[i]=t.slice():o&&P(t)||(r[i]=t)},i=0,l=arguments.length;i<l;i++)arguments[i]&&te(arguments[i],a);return r},extend:function(e,t,n){return te(t,function(t,o){n&&U(t)?Object.defineProperty(e,o,{value:h(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,o){e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,o){var r,a,i,l={};if(t=t||{},null==e)return t;do{for(a=(r=Object.getOwnPropertyNames(e)).length;a-- >0;)i=r[a],o&&!o(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&k(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:B,kindOfTest:V,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var o=e.indexOf(t,n);return-1!==o&&o===n},toArray:function(e){if(!e)return null;if(j(e))return e;var t=e.length;if(!H(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,o=(e&&e[_]).call(e);(n=o.next())&&!n.done;){var r=n.value;t.call(e,r[0],r[1])}},matchAll:function(e,t){for(var n,o=[];null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:ue,hasOwnProperty:fe,hasOwnProp:fe,reduceDescriptors:me,freezeMethods:function(e){me(e,function(t,n){if(U(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var o=e[n];U(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:function(e,t){var n={},o=function(e){e.forEach(function(e){n[e]=!0})};return j(e)?o(e):o(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ne,global:se,isContextDefined:ce,isSpecCompliantForm:function(e){return!!(e&&U(e.append)&&"FormData"===e[C]&&e[_])},toJSONObject:function(e){var t=new Array(10),n=function(e,o){if($(e)){if(t.indexOf(e)>=0)return;if(F(e))return e;if(!("toJSON"in e)){t[o]=e;var r=j(e)?[]:{};return te(e,function(e,t){var a=n(e,o+1);!P(a)&&(r[t]=a)}),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:pe,isThenable:function(e){return e&&($(e)||U(e))&&U(e.then)&&U(e.catch)},setImmediate:ge,asap:ve,isIterable:function(e){return null!=e&&U(e[_])}},be=function(e){function t(e,n,o,r,a){var i;return g(this,t),(i=w(this,t,[e])).name="AxiosError",i.isAxiosError=!0,n&&(i.code=n),o&&(i.config=o),r&&(i.request=r),a&&(i.response=a,i.status=a.status),i}return S(t,e),y(t,[{key:"toJSON",value:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}}],[{key:"from",value:function(e,n,o,r,a,i){var l=new t(e.message,n||e.code,o,r,a);return l.cause=e,l.name=e.name,i&&Object.assign(l,i),l}}])}(E(Error));be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL";var we=be;function Se(e){return ye.isPlainObject(e)||ye.isArray(e)}function Ee(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function ke(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ee(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var _e=ye.toFlatObject(ye,{},null,function(e){return/^is[A-Z]/.test(e)}),Ce=function(e,t,n){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var o=(n=ye.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ye.isUndefined(t[e])})).metaTokens,r=n.visitor||c,a=n.dots,i=n.indexes,l=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(r))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(ye.isDate(e))return e.toISOString();if(ye.isBoolean(e))return e.toString();if(!l&&ye.isBlob(e))throw new we("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(e)||ye.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){var l=e;if(e&&!r&&"object"==D(e))if(ye.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(ye.isArray(e)&&function(e){return ye.isArray(e)&&!e.some(Se)}(e)||(ye.isFileList(e)||ye.endsWith(n,"[]"))&&(l=ye.toArray(e)))return n=Ee(n),l.forEach(function(e,o){!ye.isUndefined(e)&&null!==e&&t.append(!0===i?ke([n],o,a):null===i?n:n+"[]",s(e))}),!1;return!!Se(e)||(t.append(ke(r,n,a),s(e)),!1)}var d=[],u=Object.assign(_e,{defaultVisitor:c,convertValue:s,isVisitable:Se});if(!ye.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!ye.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+o.join("."));d.push(n),ye.forEach(n,function(n,a){!0===(!(ye.isUndefined(n)||null===n)&&r.call(t,n,ye.isString(a)?a.trim():a,o,u))&&e(n,o?o.concat(a):[a])}),d.pop()}}(e),t};function Ne(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ae(e,t){this._pairs=[],e&&Ce(e,this,t)}var Be=Ae.prototype;Be.append=function(e,t){this._pairs.push([e,t])},Be.toString=function(e){var t=e?function(t){return e.call(this,t,Ne)}:Ne;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var De=Ae;function xe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ve(e,t,n){if(!t)return e;var o,r=n&&n.encode||xe,a=ye.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;if(o=i?i(t,a):ye.isURLSearchParams(t)?t.toString():new De(t,a).toString(r)){var l=e.indexOf("#");-1!==l&&(e=e.slice(0,l)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}var Te=function(){return y(function e(){g(this,e),this.handlers=[]},[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ye.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:De,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ie="undefined"!=typeof window&&"undefined"!=typeof document,je="object"==("undefined"==typeof navigator?"undefined":D(navigator))&&navigator||void 0,Pe=Ie&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),Fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Le=Ie&&window.location.href||"http://localhost",Re=m(m({},n),Oe),Ue=function(e){function t(e,n,o,r){var a=e[r++];if("__proto__"===a)return!0;var i=Number.isFinite(+a),l=r>=e.length;return a=!a&&ye.isArray(o)?o.length:a,l?(ye.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!i):(o[a]&&ye.isObject(o[a])||(o[a]=[]),t(e,n,o[a],r)&&ye.isArray(o[a])&&(o[a]=function(e){var t,n,o={},r=Object.keys(e),a=r.length;for(t=0;t<a;t++)o[n=r[t]]=e[n];return o}(o[a])),!i)}if(ye.isFormData(e)&&ye.isFunction(e.entries)){var n={};return ye.forEachEntry(e,function(e,o){t(function(e){return ye.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),o,n,0)}),n}return null},He={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var n,o=t.getContentType()||"",r=o.indexOf("application/json")>-1,a=ye.isObject(e);if(a&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return r?JSON.stringify(Ue(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ce(e,new Re.classes.URLSearchParams,m({visitor:function(e,t,n,o){return Re.isNode&&ye.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=ye.isFileList(e))||o.indexOf("multipart/form-data")>-1){var i=this.env&&this.env.FormData;return Ce(n?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e){if(ye.isString(e))try{return(0,JSON.parse)(e),ye.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||He.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(n&&!this.responseType||o)){var r=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw we.from(e,we.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Re.classes.FormData,Blob:Re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],function(e){He.headers[e]={}});var $e=He,qe=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ze=Symbol("internals");function Ke(e){return e&&String(e).trim().toLowerCase()}function We(e){return!1===e||null==e?e:ye.isArray(e)?e.map(We):String(e)}function Je(e,t,n,o,r){return ye.isFunction(o)?o.call(this,t,n):(r&&(t=n),ye.isString(t)?ye.isString(o)?-1!==t.indexOf(o):ye.isRegExp(o)?o.test(t):void 0:void 0)}var Xe=function(){return y(function e(t){g(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,n){var o=this;function r(e,t,n){var r=Ke(t);if(!r)throw new Error("header name must be a non-empty string");var a=ye.findKey(o,r);(!a||void 0===o[a]||!0===n||void 0===n&&!1!==o[a])&&(o[a||t]=We(e))}var a=function(e,t){return ye.forEach(e,function(e,n){return r(e,n,t)})};if(ye.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ye.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a(function(e){var t,n,o,r={};return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),t=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!t||r[t]&&qe[t]||("set-cookie"===t?r[t]?r[t].push(n):r[t]=[n]:r[t]=r[t]?r[t]+", "+n:n)}),r}(e),t);else if(ye.isObject(e)&&ye.isIterable(e)){var i,l,s,c={},d=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=A(e))){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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 r,a=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){i=!0,r=e},f:function(){try{a||null==t.return||t.return()}finally{if(i)throw r}}}}(e);try{for(d.s();!(s=d.n()).done;){var u=s.value;if(!ye.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(i=c[l])?ye.isArray(i)?[].concat(f(i),[u[1]]):[i,u[1]]:u[1]}}catch(e){d.e(e)}finally{d.f()}a(c,t)}else null!=e&&r(t,e,n);return this}},{key:"get",value:function(e,t){if(e=Ke(e)){var n=ye.findKey(this,e);if(n){var o=this[n];if(!t)return o;if(!0===t)return function(e){for(var t,n=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=o.exec(e);)n[t[1]]=t[2];return n}(o);if(ye.isFunction(t))return t.call(this,o,n);if(ye.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Ke(e)){var n=ye.findKey(this,e);return!(!n||void 0===this[n]||t&&!Je(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,o=!1;function r(e){if(e=Ke(e)){var r=ye.findKey(n,e);!r||t&&!Je(0,n[r],r,t)||(delete n[r],o=!0)}}return ye.isArray(e)?e.forEach(r):r(e),o}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,o=!1;n--;){var r=t[n];e&&!Je(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}},{key:"normalize",value:function(e){var t=this,n={};return ye.forEach(this,function(o,r){var a=ye.findKey(n,r);if(a)return t[a]=We(o),void delete t[r];var i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})}(r):String(r).trim();i!==r&&delete t[r],t[i]=We(o),n[i]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return ye.forEach(this,function(n,o){null!=n&&!1!==n&&(t[o]=e&&ye.isArray(n)?n.join(", "):n)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=N(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[ze]=this[ze]={accessors:{}}).accessors,n=this.prototype;function o(e){var o=Ke(e);t[o]||(function(e,t){var n=ye.toCamelCase(" "+t);["get","set","has"].forEach(function(o){Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[o]=!0)}return ye.isArray(e)?e.forEach(o):o(e),this}}])}();Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Xe.prototype,function(e,t){var n=e.value,o=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[o]=e}}}),ye.freezeMethods(Xe);var Ye=Xe;function Ge(e,t){var n=this||$e,o=t||n,r=Ye.from(o.headers),a=o.data;return ye.forEach(e,function(e){a=e.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function Ze(e){return!(!e||!e.__CANCEL__)}var Qe=function(e){function t(e,n,o){var r;return g(this,t),(r=w(this,t,[null==e?"canceled":e,we.ERR_CANCELED,n,o])).name="CanceledError",r.__CANCEL__=!0,r}return S(t,e),y(t)}(we);function et(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}var tt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,o=0,r=function(e,t){e=e||10;var n,o=new Array(e),r=new Array(e),a=0,i=0;return t=void 0!==t?t:1e3,function(l){var s=Date.now(),c=r[i];n||(n=s),o[a]=l,r[a]=s;for(var d=i,u=0;d!==a;)u+=o[d++],d%=e;if((a=(a+1)%e)===i&&(i=(i+1)%e),!(s-n<t)){var f=c&&s-c;return f?Math.round(1e3*u/f):void 0}}}(50,250);return function(e,t){var n,o,r=0,a=1e3/t,i=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();r=a,n=null,o&&(clearTimeout(o),o=null),e.apply(void 0,f(t))};return[function(){for(var e=Date.now(),t=e-r,l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];t>=a?i(s,e):(n=s,o||(o=setTimeout(function(){o=null,i(n)},a-t)))},function(){return n&&i(n)}]}(function(n){var a=n.loaded,i=n.lengthComputable?n.total:void 0,l=a-o,s=r(l);o=a,e(p({loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:s||void 0,estimated:s&&i&&a<=i?(i-a)/s:void 0,event:n,lengthComputable:null!=i},t?"download":"upload",!0))},n)},nt=function(e,t){var n=null!=e;return[function(o){return t[0]({lengthComputable:n,total:e,loaded:o})},t[1]]},ot=function(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ye.asap(function(){return e.apply(void 0,n)})}},rt=Re.hasStandardBrowserEnv?function(e,t){return function(n){return n=new URL(n,Re.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)}}(new URL(Re.origin),Re.navigator&&/(msie|trident)/i.test(Re.navigator.userAgent)):function(){return!0},at=Re.hasStandardBrowserEnv?{write:function(e,t,n,o,r,a,i){if("undefined"!=typeof document){var l=["".concat(e,"=").concat(encodeURIComponent(t))];ye.isNumber(n)&&l.push("expires=".concat(new Date(n).toUTCString())),ye.isString(o)&&l.push("path=".concat(o)),ye.isString(r)&&l.push("domain=".concat(r)),!0===a&&l.push("secure"),ye.isString(i)&&l.push("SameSite=".concat(i)),document.cookie=l.join("; ")}},read:function(e){if("undefined"==typeof document)return null;var t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove:function(e){this.write(e,"",Date.now()-864e5,"/")}}:{write:function(){},read:function(){return null},remove:function(){}};function it(e,t,n){var o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var lt=function(e){return e instanceof Ye?m({},e):e};function st(e,t){t=t||{};var n={};function o(e,t,n,o){return ye.isPlainObject(e)&&ye.isPlainObject(t)?ye.merge.call({caseless:o},e,t):ye.isPlainObject(t)?ye.merge({},t):ye.isArray(t)?t.slice():t}function r(e,t,n,r){return ye.isUndefined(t)?ye.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function a(e,t){if(!ye.isUndefined(t))return o(void 0,t)}function i(e,t){return ye.isUndefined(t)?ye.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function l(n,r,a){return a in t?o(n,r):a in e?o(void 0,n):void 0}var s={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:function(e,t,n){return r(lt(e),lt(t),0,!0)}};return ye.forEach(Object.keys(m(m({},e),t)),function(o){var a=s[o]||r,i=a(e[o],t[o],o);ye.isUndefined(i)&&a!==l||(n[o]=i)}),n}var ct,dt=function(e){var t=st({},e),n=t.data,o=t.withXSRFToken,r=t.xsrfHeaderName,a=t.xsrfCookieName,i=t.headers,l=t.auth;if(t.headers=i=Ye.from(i),t.url=Ve(it(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ye.isFormData(n))if(Re.hasStandardBrowserEnv||Re.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(ye.isFunction(n.getHeaders)){var s=n.getHeaders(),c=["content-type","content-length"];Object.entries(s).forEach(function(e){var t=N(e,2),n=t[0],o=t[1];c.includes(n.toLowerCase())&&i.set(n,o)})}if(Re.hasStandardBrowserEnv&&(o&&ye.isFunction(o)&&(o=o(t)),o||!1!==o&&rt(t.url))){var d=r&&a&&at.read(a);d&&i.set(r,d)}return t},ut="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){var o,r,a,i,l,s,c,d=dt(e),u=d.data,f=Ye.from(d.headers).normalize(),h=d.responseType,m=d.onUploadProgress,p=d.onDownloadProgress;function g(){s&&s(),c&&c(),d.cancelToken&&d.cancelToken.unsubscribe(a),d.signal&&d.signal.removeEventListener("abort",a)}var v=new XMLHttpRequest;function y(){if(v){var o=Ye.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());et(function(e){t(e),g()},function(e){n(e),g()},{data:h&&"text"!==h&&"json"!==h?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:o,config:e,request:v}),v=null}}v.open(d.method.toUpperCase(),d.url,!0),v.timeout=d.timeout,"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(y)},v.onabort=function(){v&&(n(new we("Request aborted",we.ECONNABORTED,e,v)),v=null)},v.onerror=function(t){var o=t&&t.message?t.message:"Network Error",r=new we(o,we.ERR_NETWORK,e,v);r.event=t||null,n(r),v=null},v.ontimeout=function(){var t=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",o=d.transitional||Me;d.timeoutErrorMessage&&(t=d.timeoutErrorMessage),n(new we(t,o.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,e,v)),v=null},void 0===u&&f.setContentType(null),"setRequestHeader"in v&&ye.forEach(f.toJSON(),function(e,t){v.setRequestHeader(t,e)}),ye.isUndefined(d.withCredentials)||(v.withCredentials=!!d.withCredentials),h&&"json"!==h&&(v.responseType=d.responseType),p&&(l=(o=N(tt(p,!0),2))[0],c=o[1],v.addEventListener("progress",l)),m&&v.upload&&(i=(r=N(tt(m),2))[0],s=r[1],v.upload.addEventListener("progress",i),v.upload.addEventListener("loadend",s)),(d.cancelToken||d.signal)&&(a=function(t){v&&(n(!t||t.type?new Qe(null,e,v):t),v.abort(),v=null)},d.cancelToken&&d.cancelToken.subscribe(a),d.signal&&(d.signal.aborted?a():d.signal.addEventListener("abort",a)));var b=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d.url);b&&-1===Re.protocols.indexOf(b)?n(new we("Unsupported protocol "+b+":",we.ERR_BAD_REQUEST,e)):v.send(u||null)})},ft=function(e,t){var n=(e=e?e.filter(Boolean):[]).length;if(t||n){var o,r=new AbortController,a=function(e){if(!o){o=!0,l();var t=e instanceof Error?e:this.reason;r.abort(t instanceof we?t:new Qe(t instanceof Error?t.message:t))}},i=t&&setTimeout(function(){i=null,a(new we("timeout of ".concat(t,"ms exceeded"),we.ETIMEDOUT))},t),l=function(){e&&(i&&clearTimeout(i),i=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",a)});var s=r.signal;return s.unsubscribe=function(){return ye.asap(l)},s}},ht=d().m(function e(t,n){var o,r,a;return d().w(function(e){for(;;)switch(e.n){case 0:if(o=t.byteLength,n&&!(o<n)){e.n=2;break}return e.n=1,t;case 1:return e.a(2,void e.v);case 2:a=0;case 3:if(!(a<o)){e.n=6;break}return r=a+n,e.n=4,t.slice(a,r);case 4:a=r;case 5:e.n=3;break;case 6:return e.a(2)}},e)}),mt=function(e,t,n,o){var r,a,i=(r=x(d().m(function e(t,n){var o,r,a,i,l,s,u;return d().w(function(e){for(;;)switch(e.p=e.n){case 0:o=!1,r=!1,e.p=1,i=I(function(){var e=x(d().m(function e(t){var n,o,r,a;return d().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(c(M(I(t))),1);case 1:return e.a(2,void e.v);case 2:n=t.getReader(),e.p=3;case 4:return e.n=5,T(n.read());case 5:if(o=e.v,r=o.done,a=o.value,!r){e.n=6;break}return e.a(3,8);case 6:return e.n=7,a;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,T(n.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}()(t));case 2:return e.n=3,T(i.next());case 3:if(!(o=!(l=e.v).done)){e.n=5;break}return s=l.value,e.d(c(M(I(ht(s,n)))),4);case 4:o=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,u=e.v,r=!0,a=u;case 7:if(e.p=7,e.p=8,!o||null==i.return){e.n=9;break}return e.n=9,T(i.return());case 9:if(e.p=9,!r){e.n=10;break}throw a;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])})),function(e,t){return r.apply(this,arguments)})(e,t),l=0,u=function(e){a||(a=!0,o&&o(e))};return new ReadableStream({pull:function(e){return s(d().m(function t(){var o,r,a,s,c,f;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,i.next();case 1:if(o=t.v,r=o.done,a=o.value,!r){t.n=2;break}return t.a(2,(u(),void e.close()));case 2:s=a.byteLength,n&&(c=l+=s,n(c)),e.enqueue(new Uint8Array(a)),t.n=4;break;case 3:throw t.p=3,f=t.v,u(f),f;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return u(e),i.return()}},{highWaterMark:2})},pt=ye.isFunction,gt={Request:(ct=ye.global).Request,Response:ct.Response},vt=ye.global,yt=vt.ReadableStream,bt=vt.TextEncoder,wt=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return!!e.apply(void 0,n)}catch(e){return!1}},St=function(e){var t=e=ye.merge.call({skipUndefined:!0},gt,e),n=t.fetch,o=t.Request,r=t.Response,a=n?pt(n):"function"==typeof fetch,i=pt(o),l=pt(r);if(!a)return!1;var c,u=a&&pt(yt),f=a&&("function"==typeof bt?(c=new bt,function(e){return c.encode(e)}):function(){var e=s(d().m(function e(t){var n,r;return d().w(function(e){for(;;)switch(e.n){case 0:return n=Uint8Array,e.n=1,new o(t).arrayBuffer();case 1:return r=e.v,e.a(2,new n(r))}},e)}));return function(t){return e.apply(this,arguments)}}()),h=i&&u&&wt(function(){var e=!1,t=new o(Re.origin,{body:new yt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),p=l&&u&&wt(function(){return ye.isReadableStream(new r("").body)}),g={stream:p&&function(e){return e.body}};return a&&["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!g[e]&&(g[e]=function(t,n){var o=t&&t[e];if(o)return o.call(t);throw new we("Response type '".concat(e,"' is not supported"),we.ERR_NOT_SUPPORT,n)})}),function(){var e=s(d().m(function e(t){var a,l,c,u,v,y,b,w,S,E,k,_,C,A,B,D,x,V,T,M,O,I,j,P,F,L,R,U,H,$,q,z,K,W,J,X,Y,G,Z;return d().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a=dt(t),l=a.url,c=a.method,u=a.data,v=a.signal,y=a.cancelToken,b=a.timeout,w=a.onDownloadProgress,S=a.onUploadProgress,E=a.responseType,k=a.headers,_=a.withCredentials,C=void 0===_?"same-origin":_,A=a.fetchOptions,B=n||fetch,E=E?(E+"").toLowerCase():"text",D=ft([v,y&&y.toAbortSignal()],b),x=null,V=D&&D.unsubscribe&&function(){D.unsubscribe()},e.p=1,!(Y=S&&h&&"get"!==c&&"head"!==c)){e.n=3;break}return e.n=2,function(){var e=s(d().m(function e(t,n){var r;return d().w(function(e){for(;;)if(0===e.n)return r=ye.toFiniteNumber(t.getContentLength()),e.a(2,null==r?function(){var e=s(d().m(function e(t){var n,r,a;return d().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!ye.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!ye.isSpecCompliantForm(t)){e.n=4;break}return n=new o(Re.origin,{method:"POST",body:t}),e.n=3,n.arrayBuffer();case 3:return e.a(2,e.v.byteLength);case 4:if(!ye.isArrayBufferView(t)&&!ye.isArrayBuffer(t)){e.n=5;break}r=t.byteLength,e.n=9;break;case 5:if(ye.isURLSearchParams(t)&&(t+=""),!ye.isString(t)){e.n=7;break}return e.n=6,f(t);case 6:a=e.v.byteLength,e.n=8;break;case 7:a=void 0;case 8:r=a;case 9:return e.a(2,r)}},e)}));return function(t){return e.apply(this,arguments)}}()(n):r)},e)}));return function(t,n){return e.apply(this,arguments)}}()(k,u);case 2:G=T=e.v,Y=0!==G;case 3:if(!Y){e.n=4;break}O=new o(l,{method:"POST",body:u,duplex:"half"}),ye.isFormData(u)&&(M=O.headers.get("content-type"))&&k.setContentType(M),O.body&&(I=nt(T,tt(ot(S))),j=N(I,2),P=j[0],F=j[1],u=mt(O.body,65536,P,F));case 4:return ye.isString(C)||(C=C?"include":"omit"),L=i&&"credentials"in o.prototype,R=m(m({},A),{},{signal:D,method:c.toUpperCase(),headers:k.normalize().toJSON(),body:u,duplex:"half",credentials:L?C:void 0}),x=i&&new o(l,R),e.n=5,i?B(x,A):B(l,R);case 5:return U=e.v,H=p&&("stream"===E||"response"===E),p&&(w||H&&V)&&($={},["status","statusText","headers"].forEach(function(e){$[e]=U[e]}),q=ye.toFiniteNumber(U.headers.get("content-length")),z=w&&nt(q,tt(ot(w),!0))||[],K=N(z,2),W=K[0],J=K[1],U=new r(mt(U.body,65536,W,function(){J&&J(),V&&V()}),$)),E=E||"text",e.n=6,g[ye.findKey(g,E)||"text"](U,t);case 6:return X=e.v,!H&&V&&V(),e.n=7,new Promise(function(e,n){et(e,n,{data:X,headers:Ye.from(U.headers),status:U.status,statusText:U.statusText,config:t,request:x})});case 7:return e.a(2,e.v);case 8:if(e.p=8,Z=e.v,V&&V(),!Z||"TypeError"!==Z.name||!/Load failed|fetch/i.test(Z.message)){e.n=9;break}throw Object.assign(new we("Network Error",we.ERR_NETWORK,t,x),{cause:Z.cause||Z});case 9:throw we.from(Z,Z&&Z.code,t,x);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()},Et=new Map,kt=function(e){for(var t,n,o=e&&e.env||{},r=o.fetch,a=[o.Request,o.Response,r],i=a.length,l=Et;i--;)t=a[i],void 0===(n=l.get(t))&&l.set(t,n=i?new Map:St(o)),l=n;return n},_t=(kt(),{http:null,xhr:ut,fetch:{get:kt}});ye.forEach(_t,function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var Ct=function(e){return"- ".concat(e)},Nt=function(e){return ye.isFunction(e)||null===e||!1===e},At=function(e,t){for(var n,o,r=(e=ye.isArray(e)?e:[e]).length,a={},i=0;i<r;i++){var l=void 0;if(o=n=e[i],!Nt(n)&&void 0===(o=_t[(l=String(n)).toLowerCase()]))throw new we("Unknown adapter '".concat(l,"'"));if(o&&(ye.isFunction(o)||(o=o.get(t))))break;a[l||"#"+i]=o}if(!o){var s=Object.entries(a).map(function(e){var t=N(e,2),n=t[0],o=t[1];return"adapter ".concat(n," ")+(!1===o?"is not supported by the environment":"is not available in the build")}),c=r?s.length>1?"since :\n"+s.map(Ct).join("\n"):" "+Ct(s[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o};function Bt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qe(null,e)}function Dt(e){return Bt(e),e.headers=Ye.from(e.headers),e.data=Ge.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),At(e.adapter||$e.adapter,e)(e).then(function(t){return Bt(e),t.data=Ge.call(e,e.transformResponse,t),t.headers=Ye.from(t.headers),t},function(t){return Ze(t)||(Bt(e),t&&t.response&&(t.response.data=Ge.call(e,e.transformResponse,t.response),t.response.headers=Ye.from(t.response.headers))),Promise.reject(t)})}var xt="1.13.4",Vt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Vt[e]=function(n){return D(n)===e||"a"+(t<1?"n ":" ")+e}});var Tt={};Vt.transitional=function(e,t,n){function o(e,t){return"[Axios v"+xt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new we(o(r," has been removed"+(t?" in "+t:"")),we.ERR_DEPRECATED);return t&&!Tt[r]&&(Tt[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},Vt.spelling=function(e){return function(t,n){return console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0}};var Mt={assertOptions:function(e,t,n){if("object"!=D(e))throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(e),r=o.length;r-- >0;){var a=o[r],i=t[a];if(i){var l=e[a],s=void 0===l||i(l,a,e);if(!0!==s)throw new we("option "+a+" must be "+s,we.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new we("Unknown option "+a,we.ERR_BAD_OPTION)}},validators:Vt},Ot=Mt.validators,It=function(){return y(function e(t){g(this,e),this.defaults=t||{},this.interceptors={request:new Te,response:new Te}},[{key:"request",value:(e=s(d().m(function e(t,n){var o,r,a;return d().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,n);case 1:return e.a(2,e.v);case 2:if(e.p=2,(a=e.v)instanceof Error){o={},Error.captureStackTrace?Error.captureStackTrace(o):o=new Error,r=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?r&&!String(a.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(a.stack+="\n"+r):a.stack=r}catch(e){}}throw a;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,n){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=st(this.defaults,t),o=n.transitional,r=n.paramsSerializer,a=n.headers;void 0!==o&&Mt.assertOptions(o,{silentJSONParsing:Ot.transitional(Ot.boolean),forcedJSONParsing:Ot.transitional(Ot.boolean),clarifyTimeoutError:Ot.transitional(Ot.boolean)},!1),null!=r&&(ye.isFunction(r)?t.paramsSerializer={serialize:r}:Mt.assertOptions(r,{encode:Ot.function,serialize:Ot.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mt.assertOptions(t,{baseUrl:Ot.spelling("baseURL"),withXsrfToken:Ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var i=a&&ye.merge(a.common,a[t.method]);a&&ye.forEach(["delete","get","head","post","put","patch","common"],function(e){delete a[e]}),t.headers=Ye.concat(i,a);var l=[],s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});var c,d=[];this.interceptors.response.forEach(function(e){d.push(e.fulfilled,e.rejected)});var u,f=0;if(!s){var h=[Dt.bind(this),void 0];for(h.unshift.apply(h,l),h.push.apply(h,d),u=h.length,c=Promise.resolve(t);f<u;)c=c.then(h[f++],h[f++]);return c}u=l.length;for(var m=t;f<u;){var p=l[f++],g=l[f++];try{m=p(m)}catch(e){g.call(this,e);break}}try{c=Dt.call(this,m)}catch(e){return Promise.reject(e)}for(f=0,u=d.length;f<u;)c=c.then(d[f++],d[f++]);return c}},{key:"getUri",value:function(e){return Ve(it((e=st(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var e}();ye.forEach(["delete","get","head","options"],function(e){It.prototype[e]=function(t,n){return this.request(st(n||{},{method:e,url:t,data:(n||{}).data}))}}),ye.forEach(["post","put","patch"],function(e){function t(t){return function(n,o,r){return this.request(st(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}It.prototype[e]=t(),It.prototype[e+"Form"]=t(!0)});var jt=It,Pt=function(){function e(t){if(g(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(e){n=e});var o=this;this.promise.then(function(e){if(o._listeners){for(var t=o._listeners.length;t-- >0;)o._listeners[t](e);o._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){o.subscribe(e),t=e}).then(e);return n.cancel=function(){o.unsubscribe(t)},n},t(function(e,t,r){o.reason||(o.reason=new Qe(e,t,r),n(o.reason))})}return y(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}(),Ft=Pt,Lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Lt).forEach(function(e){var t=N(e,2),n=t[0],o=t[1];Lt[o]=n});var Rt=Lt,Ut=function e(t){var n=new jt(t),o=h(jt.prototype.request,n);return ye.extend(o,jt.prototype,n,{allOwnKeys:!0}),ye.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(st(t,n))},o}($e);Ut.Axios=jt,Ut.CanceledError=Qe,Ut.CancelToken=Ft,Ut.isCancel=Ze,Ut.VERSION=xt,Ut.toFormData=Ce,Ut.AxiosError=we,Ut.Cancel=Ut.CanceledError,Ut.all=function(e){return Promise.all(e)},Ut.spread=function(e){return function(t){return e.apply(null,t)}},Ut.isAxiosError=function(e){return ye.isObject(e)&&!0===e.isAxiosError},Ut.mergeConfig=st,Ut.AxiosHeaders=Ye,Ut.formToJSON=function(e){return Ue(ye.isHTMLForm(e)?new FormData(e):e)},Ut.getAdapter=At,Ut.HttpStatusCode=Rt,Ut.default=Ut;var Ht=Ut;function $t(e){return $t="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},$t(e)}function qt(e){var t=function(e){if("object"!=$t(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$t(t)?t:t+""}var zt=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"get",value:function(e,t){return Ht.get(e,t)}},{key:"post",value:function(e,t,n){return Ht.post(e,t,n)}},{key:"put",value:function(e,t,n){return Ht.put(e,t,n)}},{key:"delete",value:function(e,t){return Ht.delete(e,t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,qt(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},Kt(e)}function Wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Yt(o.key),o)}}function Xt(e,t,n){return t&&Jt(e.prototype,t),n&&Jt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yt(e){var t=function(e){if("object"!=Kt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kt(t)?t:t+""}var Gt=Xt(function e(){Wt(this,e),this.errors={}},[{key:"has",value:function(e){return this.errors.hasOwnProperty(e)}},{key:"any",value:function(){return Object.keys(this.errors).length>0}},{key:"get",value:function(e){if(this.errors[e])return this.errors[e][0]}},{key:"record",value:function(e){this.errors=e}},{key:"clear",value:function(e){e?delete this.errors[e]:this.errors={}}}]),Zt=Xt(function e(t){for(var n in Wt(this,e),this.originalData=t,t)this[n]=t[n];this.errors=new Gt},[{key:"data",value:function(){var e={};for(var t in this.originalData)e[t]=this[t];return e}},{key:"reset",value:function(){for(var e in this.originalData){var t="[object Array]"===Object.prototype.toString.call(this[e]);this[e]=t?[]:""}this.errors.clear()}},{key:"post",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("post",e,t)}},{key:"put",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("put",e,t)}},{key:"patch",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("patch",e,t)}},{key:"delete",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("delete",e,t)}},{key:"submit",value:function(e,t){var n=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Promise(function(r,a){axios[e](t,n.data()).then(function(e){r(e.data),n.onSuccess(e.data,o)}).catch(function(e){var t=e.response?e.response.data:{message:e.message};n.onFail(t),a(t)})})}},{key:"onSuccess",value:function(e){1==(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&this.reset()}},{key:"onFail",value:function(e){this.errors.record(e)}}]);function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},Qt(e)}function en(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}var tn=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var o=new u;this.apiKey=t||o.get("mapquest_api_key"),this.apiUrl=n.apiUrl||o.get("mapquest_api_url")||"http://www.mapquestapi.com/geocoding/v2/",this.jsUrl=n.jsUrl||o.get("mapquest_js_url")||"https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js",this.cssUrl=n.cssUrl||o.get("mapquest_css_url")||"https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css",this.callback=[],this.isInit=!1,this.apiKey||console.warn("HashtagCms MapAPI: No API key provided. Set mapquest_api_key in adminConfig or pass to constructor.")},t=[{key:"init",value:function(){if("undefined"==typeof document)return console.warn("HashtagCms MapAPI: Cannot initialize outside browser environment."),!1;if(this.isInit)return!1;var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("script");t.src=this.jsUrl,t.async=!0,e.appendChild(t);var n=document.createElement("link");return n.setAttribute("type","text/css"),n.setAttribute("rel","stylesheet"),n.href=this.cssUrl,e.appendChild(n),this.isInit=!0,!0}},{key:"getLatLong",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.apiKey)return Promise.reject(new Error("MapQuest API key is not configured"));var o="".concat(this.apiUrl,"address?key=").concat(encodeURIComponent(this.apiKey),"&location=").concat(encodeURIComponent(e));return new Promise(function(e,r){axios.get(o).then(function(o){e(o),null!=n&&"function"==typeof n&&n.call(t,o)}).catch(function(e){r(e),null!=n&&"function"==typeof n&&n.call(t,e)})})}},{key:"parseResults",value:function(e){var t,n=[],o=null==e||null===(t=e.data)||void 0===t||null===(t=t.results)||void 0===t?void 0:t[0];return o?((o.locations||[]).forEach(function(e){n.push({country:e.adminArea1,state:e.adminArea3,city:e.adminArea5,latLng:e.latLng,displayLatLng:e.displayLatLng,postalCode:e.postalCode,street:e.street,sideOfStreet:e.sideOfStreet})}),n):n}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,en(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function nn(e){return nn="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},nn(e)}function on(e){return function(e){if(Array.isArray(e))return rn(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 rn(e,t);var n={}.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)?rn(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 rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function an(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach(function(t){sn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sn(e,t,n){return(t=function(e){var t=function(e){if("object"!=nn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn={data:[],labelsCategories:[],datasCategories:[],labelsContent:[],datasContent:[],bgColors:["rgba(93, 128, 96, 0.7)","rgba(135, 188, 118, 0.7)","rgba(146, 222, 184, 0.7)","rgba(135, 131, 222, 0.7)","rgba(128, 57, 5, 0.7)","rgba(231, 191, 200, 0.7)","rgba(255, 99, 132, 0.7)","rgba(54, 162, 235, 0.7)","rgba(255, 206, 86, 0.7)","rgba(75, 192, 192, 0.7)","rgba(153, 102, 255, 0.7)","rgba(255, 159, 64, 0.7)"],borderColors:["rgba(82, 117, 85, 1)","rgba(115, 172, 96, 1)","rgba(113, 204, 158, 1)","rgba(103, 99, 206, 1)","rgba(112, 51, 7, 1)","rgba(213, 158, 170, 1)","rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)","rgba(153, 102, 255, 1)","rgba(255, 159, 64, 1)"],createChart:function(e,t,n,o,r){if("undefined"!=typeof document){var a=document.getElementById(e);a?"undefined"!=typeof Chart?new Chart(a,{type:"bar",data:{labels:t,datasets:[{label:"# of Reads",data:n,backgroundColor:o,borderColor:r,borderWidth:1}]},options:{scales:{y:{beginAtZero:!0}}}}):console.error("Chart.js is not loaded."):console.warn("Chart canvas with id '".concat(e,"' not found."))}},makeChartData:function(e){var t=[],n=[];if(e&&Array.isArray(e))for(var o=0,r=e.length;o<r;o++){var a=e[o].link_rewrite;"/"!==a&&""!==a&&null!==a||(a="Home (/)"),t.push(a),n.push(e[o].read_count)}return{labels:t,datas:n}},init:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ln(ln({},{topCategoriesId:"topCatgories",topContentsId:"topContents"}),t);if(e){var o=this.makeChartData(e.categories);o.labels.length>0&&this.createChart(n.topCategoriesId,o.labels,o.datas,this.bgColors,this.borderColors);var r=this.makeChartData(e.pages);r.labels.length>0&&this.createChart(n.topContentsId,r.labels,r.datas,on(this.bgColors).reverse(),on(this.borderColors).reverse())}}};function dn(e){return dn="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},dn(e)}function un(e){var t=function(e){if("object"!=dn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dn(t)?t:t+""}var fn=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.eventEmitter=e,this.config=Object.assign({leftPanelSelector:".js_left_panel",rightPanelSelector:".js_right_panel",hiddenCss:["hidden-md","hidden-xs"]},t),this.visible=!0,"undefined"!=typeof document){var n=document.querySelector(this.config.leftPanelSelector);if(n){var o=n.style.display;""===o||"inline-block"===o?(this.emit("left-menu-on-show"),this.visible=!0):(this.emit("left-menu-on-hide"),this.visible=!1)}}}},{key:"emit",value:function(e,t){this.eventEmitter&&"function"==typeof this.eventEmitter.emit&&this.eventEmitter.emit(e,t)}},{key:"isVisible",value:function(){return this.visible}},{key:"toggleShow",value:function(e){if("undefined"!=typeof document){var t=document.querySelector(this.config.leftPanelSelector);if(t){var n=t.style.display,o=t.clientWidth;""!==n&&"inline-block"!==n||0===o?(this.visible=!0,t.style.display="",this.emit("left-menu-on-show")):(this.visible=!1,t.style.display="none",this.emit("left-menu-on-hide"))}}}},{key:"dispatch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.emit(e,t)}},{key:"reload",value:function(){this.emit("re-fetch-modules")}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,un(o.key),o)}}(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function hn(e){return hn="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},hn(e)}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function pn(e){var t=function(e){if("object"!=hn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hn(t)?t:t+""}var gn=function(){return e=function e(){var t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.obj={},this.counter=1,this.persistent=null!==(t=o.persistent)&&void 0!==t&&t,this.prefix=null!==(n=o.prefix)&&void 0!==n?n:"htcms_"},t=[{key:"nextCounter",value:function(){return this.counter++}},{key:"store",value:function(e,t){if(this.obj[e]=t,this.persistent&&"undefined"!=typeof localStorage)try{localStorage.setItem(this.prefix+e,JSON.stringify(t))}catch(e){console.warn("HashtagCms Storage: Failed to persist to localStorage:",e.message)}return t}},{key:"fetch",value:function(e,t){if(void 0!==this.obj[e])return this.obj[e];if(this.persistent&&"undefined"!=typeof localStorage)try{var n=localStorage.getItem(this.prefix+e);if(null!==n){var o=JSON.parse(n);return this.obj[e]=o,o}}catch(e){console.warn("HashtagCms Storage: Failed to read from localStorage:",e.message)}return t}},{key:"has",value:function(e){return void 0!==this.obj[e]||!(!this.persistent||"undefined"==typeof localStorage)&&null!==localStorage.getItem(this.prefix+e)}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e){if(this.obj={},this.counter=1,this.persistent&&"undefined"!=typeof localStorage){for(var t=[],n=0;n<localStorage.length;n++){var o=localStorage.key(n);null!=o&&o.startsWith(this.prefix)&&t.push(o)}t.forEach(function(e){return localStorage.removeItem(e)})}return!0}return delete this.obj[e],this.persistent&&"undefined"!=typeof localStorage&&localStorage.removeItem(this.prefix+e),!0}},{key:"keys",value:function(){var e=Object.keys(this.obj);if(this.persistent&&"undefined"!=typeof localStorage){for(var t=[],n=0;n<localStorage.length;n++){var o=localStorage.key(n);null!=o&&o.startsWith(this.prefix)&&t.push(o.substring(this.prefix.length))}return function(e){return function(e){if(Array.isArray(e))return mn(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 mn(e,t);var n={}.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)?mn(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.")}()}(new Set([].concat(e,t)))}return e}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,pn(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),vn=new gn;function yn(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,o,r,a){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return bn(c,"_invoke",function(n,o,r){var a,l,s,c=0,d=r||[],u=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return a=t,l=0,s=e,f.n=n,i}};function h(n,o){for(l=n,s=o,t=0;!u&&c&&!r&&t<d.length;t++){var r,a=d[t],h=f.p,m=a[2];n>3?(r=m===o)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=o,f.n=a[1]):h<m&&(r=n<3||a[0]>o||o>m)&&(a[4]=n,a[5]=o,f.n=m,l=0))}if(r||n>1)return i;throw u=!0,o}return function(r,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,m),l=d,s=m;(t=l<2?e:s)||!u;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),t=a[r]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=e}else if((t=(u=f.n<0)?s:n.call(o,f))!==i)break}catch(t){a=e,l=1,s=t}finally{c=1}}return{value:t,done:u}}}(n,r,a),!0),c}var i={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(bn(t={},o,function(){return this}),t),u=c.prototype=l.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,bn(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,bn(u,"constructor",c),bn(c,"constructor",s),s.displayName="GeneratorFunction",bn(c,r,"GeneratorFunction"),bn(u),bn(u,r,"Generator"),bn(u,o,function(){return this}),bn(u,"toString",function(){return"[object Generator]"}),(yn=function(){return{w:a,m:f}})()}function bn(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}bn=function(e,t,n,o){function a(t,n){bn(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},bn(e,t,n,o)}function wn(e,t,n,o,r,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,r)}function Sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function En(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,An(o.key),o)}}function kn(e,t,n){return t&&En(e.prototype,t),n&&En(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(n),!0).forEach(function(t){Nn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){var t=function(e){if("object"!=Bn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bn(t)?t:t+""}function Bn(e){return Bn="function"==typeof Symbol&&"symbol"==D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},Bn(e)}var Dn="htcms_cps";function xn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==e||""===e)return t;if("object"===Bn(e))return e;try{return JSON.parse(e)}catch(e){return console.warn("HashtagCms: Failed to parse prop:",e.message),t}}function Vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==(t=e.response)&&void 0!==t&&t.data?Cn(Cn({},n),e.response.data):Cn({message:e.message||"An unexpected error occurred"},n)}var Tn=kn(function e(){Sn(this,e)},null,[{key:"cache",get:function(){return{}}},{key:"get",value:function(e,t){if(this.cache[e])return this.cache[e];for(var n=(void 0===t?"undefined"!=typeof window?window.location.search.substring(1):"":t).split("&"),o={},r=0;r<n.length;r++){var a=n[r].split("="),i=a[0],l=a[1];if(a.length>2&&(a.shift(),l=a.join("=")),o[i]=l,i===e){var s=decodeURIComponent(l);return this.cache[e]=s,s}}return null==e?o:""}},{key:"all",value:function(e){return this.get(null,e)}}]),Mn=kn(function e(){Sn(this,e)},[{key:"serializeFormArray",value:function(e){if("undefined"==typeof document)return[];var t,n,o=[];if("object"==Bn(e="string"==typeof e?document.getElementById(e):e)&&e&&"FORM"===e.nodeName)for(var r=e.elements.length,a=0;a<r;a++)if((t=e.elements[a]).name&&!t.disabled&&"file"!==t.type&&"reset"!==t.type&&"submit"!==t.type&&"button"!==t.type)if("select-multiple"===t.type){n=e.elements[a].options.length;for(var i=0;i<n;i++)t.options[i].selected&&(o[o.length]={name:t.name,value:t.options[i].value})}else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(o[o.length]={name:t.name,value:t.value});return o}}]);function On(e){if("undefined"!=typeof navigator&&navigator.clipboard)navigator.clipboard.writeText(e);else if("undefined"!=typeof window){window.localStorage.setItem(Dn,e);var t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-99999px",t.style.top="-99999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}function In(){return jn.apply(this,arguments)}function jn(){var e;return e=yn().m(function e(){return yn().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,"undefined"!=typeof navigator){e.n=1;break}throw new Error("Navigator not available");case 1:return e.n=2,navigator.permissions.query({name:"clipboard-read"});case 2:if("denied"!==e.v.state){e.n=3;break}throw new Error("Not allowed to read clipboard.");case 3:return e.a(2,navigator.clipboard.read());case 4:return e.p=4,e.v,e.a(2,new Promise(function(e,t){"undefined"!=typeof window&&window.localStorage.getItem(Dn)?e(window.localStorage.getItem(Dn)):t(null)}))}},e,null,[[0,4]])}),jn=function(){var t=this,n=arguments;return new Promise(function(o,r){var a=e.apply(t,n);function i(e){wn(a,o,r,i,l,"next",e)}function l(e){wn(a,o,r,i,l,"throw",e)}i(void 0)})},jn.apply(this,arguments)}function Pn(e){try{JSON.parse(e)}catch(e){return!1}return!0}function Fn(e){return e?(e=e.toString().replace(/_/g," ")).charAt(0).toUpperCase()+e.slice(1):""}function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(/\s|'/g,t)}function Rn(e){return(e=e.replace(/\.|_/g," ")).charAt(0).toUpperCase()+e.slice(1)}var Un={AdminConfig:u,Fetcher:zt,Form:Zt,Errors:Gt,MapAPI:tn,Dashboard:cn,LeftMenu:fn,Storage:gn,Store:vn,queryBuilder:Tn,Utils:Mn,CopyToClipboard:On,PasteFromClipboard:In,IsJson:Pn,Humanize:Fn,CleanForUrl:Ln,TitleCase:Rn,parseProp:xn,safeErrorData:Vn};"undefined"!=typeof window&&(window.HashtagCmsAdmin=Un);var Hn=Un;return t}()},"object"==D(t)&&"object"==D(e)?e.exports=i():(r=[],void 0===(a="function"==typeof(o=i)?o.apply(t,r):o)||(e.exports=a))},742(e){"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__742__},846(e){var t;t=()=>(()=>{var e={"./src/Base64.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const o={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){let t,n,r,a,i,l,s,c="",d=0;for(e=o._utf8Encode(e);d<e.length;)t=e.charCodeAt(d++),n=e.charCodeAt(d++),r=e.charCodeAt(d++),a=t>>2,i=(3&t)<<4|n>>4,l=(15&n)<<2|r>>6,s=63&r,isNaN(n)?l=s=64:isNaN(r)&&(s=64),c=c+this._keyStr.charAt(a)+this._keyStr.charAt(i)+this._keyStr.charAt(l)+this._keyStr.charAt(s);return c},decode:function(e){let t,n,r,a,i,l,s,c="",d=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");d<e.length;)a=this._keyStr.indexOf(e.charAt(d++)),i=this._keyStr.indexOf(e.charAt(d++)),l=this._keyStr.indexOf(e.charAt(d++)),s=this._keyStr.indexOf(e.charAt(d++)),t=a<<2|i>>4,n=(15&i)<<4|l>>2,r=(3&l)<<6|s,c+=String.fromCharCode(t),64!==l&&(c+=String.fromCharCode(n)),64!==s&&(c+=String.fromCharCode(r));return c=o._utf8Decode(c),c},_utf8Encode:function(e){e=e.replace(/\r\n/g,"\n");let t="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8Decode:function(e){let t,n,o,r="",a=0;for(t=n=0;a<e.length;)t=e.charCodeAt(a),t<128?(r+=String.fromCharCode(t),a++):t>191&&t<224?(n=e.charCodeAt(a+1),r+=String.fromCharCode((31&t)<<6|63&n),a+=2):(n=e.charCodeAt(a+1),o=e.charCodeAt(a+2),r+=String.fromCharCode((15&t)<<12|(63&n)<<6|63&o),a+=3);return r}},r=o},"./src/SecureLS.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{SecureLS:()=>v});var o=n("./src/constants.js"),r=n("./src/enc-utf8.js"),a=n("./src/utils.js"),i=n("./node_modules/crypto-js/aes.js"),l=n.n(i),s=n("./node_modules/crypto-js/rabbit.js"),c=n.n(s),d=n("./node_modules/crypto-js/rc4.js"),u=n.n(d),f=n("./node_modules/crypto-js/tripledes.js"),h=n.n(f),m=n("./node_modules/lz-string/libs/lz-string.js"),p=n("./src/Base64.js");const g={[o.default.EncrytionTypes.AES]:l(),[o.default.EncrytionTypes.DES]:h(),[o.default.EncrytionTypes.RABBIT]:c(),[o.default.EncrytionTypes.RC4]:u()};class v{constructor({encryptionSecret:e="",encryptionNamespace:t="",isCompression:n=!0,encodingType:a=o.default.EncrytionTypes.BASE64,storage:i=localStorage,metaKey:s=o.default.metaKey}={}){Object.assign(this,{_name:"secure-ls",Base64:p.default,LZString:{compressToUTF16:m.compressToUTF16,decompressFromUTF16:m.decompressFromUTF16},AES:l(),DES:h(),RABBIT:c(),RC4:u(),enc:r.default}),this.config={encryptionSecret:e,encryptionNamespace:t,isCompression:n,encodingType:a.toLowerCase(),storage:i,metaKey:s},this.encryptionSecret=e,this.storage=i,this.metaKey=s,this.init()}init(){let e=this.getMetaData();this._isBase64=this._isBase64EncryptionType(),this._isAES=this._isAESEncryptionType(),this._isDES=this._isDESEncryptionType(),this._isRabbit=this._isRabbitEncryptionType(),this._isRC4=this._isRC4EncryptionType(),this._isCompression=this._isDataCompressionEnabled(),this.allKeys=e.keys||this.resetAllKeys()}_isBase64EncryptionType(){return p.default&&(void 0===this.config.encodingType||this.config.encodingType===o.default.EncrytionTypes.BASE64)}_isAESEncryptionType(){return l()&&this.config.encodingType===o.default.EncrytionTypes.AES}_isDESEncryptionType(){return h()&&this.config.encodingType===o.default.EncrytionTypes.DES}_isRabbitEncryptionType(){return c()&&this.config.encodingType===o.default.EncrytionTypes.RABBIT}_isRC4EncryptionType(){return u()&&this.config.encodingType===o.default.EncrytionTypes.RC4}_isDataCompressionEnabled(){return this.config.isCompression}getEncryptionSecret(e){let t=this.getMetaData(),n=a.default.getObjectFromKey(t.keys,e);n&&(this._isAES||this._isDES||this._isRabbit||this._isRC4)&&(void 0===this.config.encryptionSecret?(this.encryptionSecret=n.s,this.encryptionSecret||(this.encryptionSecret=a.default.generateSecretKey(),this.setMetaData())):this.encryptionSecret=this.config.encryptionSecret||n.s||"")}getEncryptionType(){const e=this.config.encodingType;return e?e.toLowerCase():o.default.EncrytionTypes.BASE64}getDataFromLocalStorage(e){return this.storage.getItem(e,!0)}setDataToLocalStorage(e,t){this.storage.setItem(e,t)}setMetaData(){let e=this.processData({keys:this.allKeys},!0);this.setDataToLocalStorage(this.getMetaKey(),e)}getMetaData(){return this.get(this.getMetaKey(),!0)||{}}getMetaKey(){return this.metaKey+(this.config.encryptionNamespace?"__"+this.config.encryptionNamespace:"")}resetAllKeys(){return this.allKeys=[],[]}processData(e,t){if(null==e||""===e)return"";let n;try{n=JSON.stringify(e)}catch(e){throw new Error("Could not stringify data",e)}let o=n;if(this._isBase64||t)o=p.default.encode(n);else{const e=g[this.getEncryptionType()];e&&(o=e.encrypt(n,this.encryptionSecret)),o=o&&o.toString()}let r=o;return(this._isCompression||t)&&(r=this.LZString.compressToUTF16(o)),r}getAllKeys(){let e=this.getMetaData();return a.default.extractKeyNames(e)||[]}get(e,t){let n="",i="";if(!a.default.is(e))return a.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED),i;let l=this.getDataFromLocalStorage(e);if(!l)return i;let s=l;if((this._isCompression||t)&&(s=this.LZString.decompressFromUTF16(l)),n=s,this._isBase64||t)n=p.default.decode(s);else{this.getEncryptionSecret(e);const t=g[this.getEncryptionType()];if(t){const e=t.decrypt(s.toString(),this.encryptionSecret);e&&(n=e.toString(r.default._Utf8))}}try{i=JSON.parse(n)}catch(e){throw new Error("Could not parse JSON",e)}return i}set(e,t){let n="";a.default.is(e)?(this.getEncryptionSecret(e),String(e)!==String(this.metaKey)&&(a.default.isKeyPresent(this.allKeys,e)||(this.allKeys.push({k:e,s:this.encryptionSecret}),this.setMetaData())),n=this.processData(t),this.setDataToLocalStorage(e,n)):a.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED)}remove(e){a.default.is(e)?e===this.metaKey&&this.getAllKeys().length?a.default.warn(o.default.WarningEnum.META_KEY_REMOVE):(a.default.isKeyPresent(this.allKeys,e)&&(a.default.removeFromKeysList(this.allKeys,e),this.setMetaData()),this.storage.removeItem(e)):a.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED)}removeAll(){let e=this.getAllKeys();for(let t=0;t<e.length;t++)this.storage.removeItem(e[t]);this.storage.removeItem(this.metaKey),this.resetAllKeys()}clear(){this.storage.clear(),this.resetAllKeys()}}},"./src/WordArray.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});let o={random:function(e){let t=[],n=function(e){let t=987654321,n=4294967295;return function(){t=36969*(65535&t)+(t>>16)&n;let o=(t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return o/=4294967296,o+=.5,o*(Math.random()>.5?1:-1)}};for(let o,r=0;r<e;r+=4){let e=n(4294967296*(o||Math.random()));o=987654071*e(),t.push(4294967296*e()|0)}return new o.Set(t,e)},Set:function(e,t){e=this.words=e||[],this.sigBytes=void 0!==t?t:8*e.length}};const r=o},"./src/constants.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const o={KEY_NOT_PROVIDED:"keyNotProvided",META_KEY_REMOVE:"metaKeyRemove",DEFAULT_TEXT:"defaultText"},r={};r[o.KEY_NOT_PROVIDED]="Secure LS: Key not provided. Aborting operation!",r[o.META_KEY_REMOVE]="Secure LS: Meta key can not be removed\nunless all keys created by Secure LS are removed!",r[o.DEFAULT_TEXT]="Unexpected output";const a={WarningEnum:o,WarningTypes:r,EncrytionTypes:{BASE64:"base64",AES:"aes",DES:"des",RABBIT:"rabbit",RC4:"rc4"},metaKey:"_secure__ls__metadata",secretPhrase:"s3cr3t$#@135^&*246"}},"./src/enc-utf8.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const o={Latin1:{stringify:e=>{let t,n,o=e.words,r=e.sigBytes,a=[];for(t=0;t<r;t++)n=o[t>>>2]>>>24-t%4*8&255,a.push(String.fromCharCode(n));return a.join("")}},_Utf8:{stringify:e=>{try{return decodeURIComponent(escape(o.Latin1.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data",e)}}}},r=o},"./src/utils.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var o=n("./node_modules/crypto-js/pbkdf2.js"),r=n.n(o),a=n("./src/constants.js"),i=n("./src/WordArray.js");const l={is:e=>!!e,warn:(e=a.default.WarningEnum.DEFAULT_TEXT)=>{console.warn(a.default.WarningTypes[e])},generateSecretKey:()=>{const e=i.default.random(16);return r()(a.default.secretPhrase,e,{keySize:4}).toString()},getObjectFromKey:(e=[],t)=>e.find(e=>e.k===t)||{},extractKeyNames:({keys:e=[]}={})=>e.map(({k:e})=>e),isKeyPresent:(e=[],t)=>e.some(e=>String(e.k)===String(t)),removeFromKeysList:(e=[],t)=>{const n=e.findIndex(e=>e.k===t);return-1!==n&&e.splice(n,1),n}}},"./node_modules/crypto-js/aes.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.BlockCipher,n=e.algo,r=[],a=[],i=[],l=[],s=[],c=[],d=[],u=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,o=0;for(t=0;t<256;t++){var m=o^o<<1^o<<2^o<<3^o<<4;m=m>>>8^255&m^99,r[n]=m,a[m]=n;var p=e[n],g=e[p],v=e[g],y=257*e[m]^16843008*m;i[n]=y<<24|y>>>8,l[n]=y<<16|y>>>16,s[n]=y<<8|y>>>24,c[n]=y,y=16843009*v^65537*g^257*p^16843008*n,d[m]=y<<24|y>>>8,u[m]=y<<16|y>>>16,f[m]=y<<8|y>>>24,h[m]=y,n?(n=p^e[e[e[v^p]]],o^=e[e[o]]):n=o=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],p=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],i=0;i<o;i++)i<n?a[i]=t[i]:(c=a[i-1],i%n?n>6&&i%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=m[i/n|0]<<24),a[i]=a[i-n]^c);for(var l=this._invKeySchedule=[],s=0;s<o;s++){if(i=o-s,s%4)var c=a[i];else c=a[i-4];l[s]=s<4||i<=4?c:d[r[c>>>24]]^u[r[c>>>16&255]]^f[r[c>>>8&255]]^h[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,l,s,c,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,d,u,f,h,a),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,o,r,a,i,l){for(var s=this._nRounds,c=e[t]^n[0],d=e[t+1]^n[1],u=e[t+2]^n[2],f=e[t+3]^n[3],h=4,m=1;m<s;m++){var p=o[c>>>24]^r[d>>>16&255]^a[u>>>8&255]^i[255&f]^n[h++],g=o[d>>>24]^r[u>>>16&255]^a[f>>>8&255]^i[255&c]^n[h++],v=o[u>>>24]^r[f>>>16&255]^a[c>>>8&255]^i[255&d]^n[h++],y=o[f>>>24]^r[c>>>16&255]^a[d>>>8&255]^i[255&u]^n[h++];c=p,d=g,u=v,f=y}p=(l[c>>>24]<<24|l[d>>>16&255]<<16|l[u>>>8&255]<<8|l[255&f])^n[h++],g=(l[d>>>24]<<24|l[u>>>16&255]<<16|l[f>>>8&255]<<8|l[255&c])^n[h++],v=(l[u>>>24]<<24|l[f>>>16&255]<<16|l[c>>>8&255]<<8|l[255&d])^n[h++],y=(l[f>>>24]<<24|l[c>>>16&255]<<16|l[d>>>8&255]<<8|l[255&u])^n[h++],e[t]=p,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(p)}(),o.AES)},"./node_modules/crypto-js/cipher-core.js":function(e,t,n){var o,r,a,i,l,s,c,d,u,f,h,m,p,g,v,y,b,w,S;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/evpkdf.js"),void(o.lib.Cipher||(r=o,a=r.lib,i=a.Base,l=a.WordArray,s=a.BufferedBlockAlgorithm,c=r.enc,c.Utf8,d=c.Base64,u=r.algo.EvpKDF,f=a.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?S:b}return function(t){return{encrypt:function(n,o,r){return e(o).encrypt(t,n,o,r)},decrypt:function(n,o,r){return e(o).decrypt(t,n,o,r)}}}}()}),a.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),h=r.mode={},m=a.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=h.CBC=function(){var e=m.extend();function t(e,t,n){var o,r=this._iv;r?(o=r,this._iv=void 0):o=this._prevBlock;for(var a=0;a<n;a++)e[t+a]^=o[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var o=this._cipher,r=o.blockSize;t.call(this,e,n,r),o.encryptBlock(e,n),this._prevBlock=e.slice(n,n+r)}}),e.Decryptor=e.extend({processBlock:function(e,n){var o=this._cipher,r=o.blockSize,a=e.slice(n,n+r);o.decryptBlock(e,n),t.call(this,e,n,r),this._prevBlock=a}}),e}(),g=(r.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,o=n-e.sigBytes%n,r=o<<24|o<<16|o<<8|o,a=[],i=0;i<o;i+=4)a.push(r);var s=l.create(a,o);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},a.BlockCipher=f.extend({cfg:f.cfg.extend({mode:p,padding:g}),reset:function(){var e;f.reset.call(this);var t=this.cfg,n=t.iv,o=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=o.createEncryptor:(e=o.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(o,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),v=a.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?l.create([1398893684,1701076831]).concat(n).concat(t):t).toString(d)},parse:function(e){var t,n=d.parse(e),o=n.words;return 1398893684==o[0]&&1701076831==o[1]&&(t=l.create(o.slice(2,4)),o.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:t})}},b=a.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,o){o=this.cfg.extend(o);var r=e.createEncryptor(n,o),a=r.finalize(t),i=r.cfg;return v.create({ciphertext:a,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:o.format})},decrypt:function(e,t,n,o){return o=this.cfg.extend(o),t=this._parse(t,o.format),e.createDecryptor(n,o).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),w=(r.kdf={}).OpenSSL={execute:function(e,t,n,o,r){if(o||(o=l.random(8)),r)a=u.create({keySize:t+n,hasher:r}).compute(e,o);else var a=u.create({keySize:t+n}).compute(e,o);var i=l.create(a.words.slice(t),4*n);return a.sigBytes=4*t,v.create({key:a,iv:i,salt:o})}},S=a.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(e,t,n,o){var r=(o=this.cfg.extend(o)).kdf.execute(n,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=r.iv;var a=b.encrypt.call(this,e,t,r.key,o);return a.mixIn(r),a},decrypt:function(e,t,n,o){o=this.cfg.extend(o),t=this._parse(t,o.format);var r=o.kdf.execute(n,e.keySize,e.ivSize,t.salt,o.hasher);return o.iv=r.iv,b.decrypt.call(this,e,t,r.key,o)}}))))},"./node_modules/crypto-js/core.js":function(e,t,n){var o;e.exports=(o=o||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n("?9157")}catch(e){}var o=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},i=a.lib={},l=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=l.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,r=e.sigBytes;if(this.clamp(),o%4)for(var a=0;a<r;a++){var i=n[a>>>2]>>>24-a%4*8&255;t[o+a>>>2]|=i<<24-(o+a)%4*8}else for(var l=0;l<r;l+=4)t[o+l>>>2]=n[l>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new s.init(t,e)}}),c=a.enc={},d=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var a=t[r>>>2]>>>24-r%4*8&255;o.push((a>>>4).toString(16)),o.push((15&a).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new s.init(n,t/2)}},u=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var a=t[r>>>2]>>>24-r%4*8&255;o.push(String.fromCharCode(a))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new s.init(n,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,o=this._data,r=o.words,a=o.sigBytes,i=this.blockSize,l=a/(4*i),c=(l=t?e.ceil(l):e.max((0|l)-this._minBufferSize,0))*i,d=e.min(4*c,a);if(c){for(var u=0;u<c;u+=i)this._doProcessBlock(r,u);n=r.splice(0,c),o.sigBytes-=d}return new s.init(n,d)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),m=(i.Hasher=h.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new m.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math),o)},"./node_modules/crypto-js/enc-base64.js":function(e,t,n){var o,r,a;e.exports=(o=n("./node_modules/crypto-js/core.js"),a=(r=o).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,o=this._map;e.clamp();for(var r=[],a=0;a<n;a+=3)for(var i=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<n;l++)r.push(o.charAt(i>>>6*(3-l)&63));var s=o.charAt(64);if(s)for(;r.length%4;)r.push(s);return r.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var r=0;r<n.length;r++)o[n.charCodeAt(r)]=r}var i=n.charAt(64);if(i){var l=e.indexOf(i);-1!==l&&(t=l)}return function(e,t,n){for(var o=[],r=0,i=0;i<t;i++)if(i%4){var l=n[e.charCodeAt(i-1)]<<i%4*2|n[e.charCodeAt(i)]>>>6-i%4*2;o[r>>>2]|=l<<24-r%4*8,r++}return a.create(o,r)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"./node_modules/crypto-js/evpkdf.js":function(e,t,n){var o,r,a,i,l,s,c,d;e.exports=(d=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/sha1.js"),n("./node_modules/crypto-js/hmac.js"),a=(r=(o=d).lib).Base,i=r.WordArray,s=(l=o.algo).MD5,c=l.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,o=this.cfg,r=o.hasher.create(),a=i.create(),l=a.words,s=o.keySize,c=o.iterations;l.length<s;){n&&r.update(n),n=r.update(e).finalize(t),r.reset();for(var d=1;d<c;d++)n=r.finalize(n),r.reset();a.concat(n)}return a.sigBytes=4*s,a}}),o.EvpKDF=function(e,t,n){return c.create(n).compute(e,t)},d.EvpKDF)},"./node_modules/crypto-js/hmac.js":function(e,t,n){var o,r,a;e.exports=(r=(o=n("./node_modules/crypto-js/core.js")).lib.Base,a=o.enc.Utf8,void(o.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),l=r.words,s=i.words,c=0;c<n;c++)l[c]^=1549556828,s[c]^=909522486;r.sigBytes=i.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},"./node_modules/crypto-js/md5.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),function(e){var t=o,n=t.lib,r=n.WordArray,a=n.Hasher,i=t.algo,l=[];!function(){for(var t=0;t<64;t++)l[t]=4294967296*e.abs(e.sin(t+1))|0}();var s=i.MD5=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var o=t+n,r=e[o];e[o]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,i=e[t+0],s=e[t+1],h=e[t+2],m=e[t+3],p=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],S=e[t+10],E=e[t+11],k=e[t+12],_=e[t+13],C=e[t+14],N=e[t+15],A=a[0],B=a[1],D=a[2],x=a[3];A=c(A,B,D,x,i,7,l[0]),x=c(x,A,B,D,s,12,l[1]),D=c(D,x,A,B,h,17,l[2]),B=c(B,D,x,A,m,22,l[3]),A=c(A,B,D,x,p,7,l[4]),x=c(x,A,B,D,g,12,l[5]),D=c(D,x,A,B,v,17,l[6]),B=c(B,D,x,A,y,22,l[7]),A=c(A,B,D,x,b,7,l[8]),x=c(x,A,B,D,w,12,l[9]),D=c(D,x,A,B,S,17,l[10]),B=c(B,D,x,A,E,22,l[11]),A=c(A,B,D,x,k,7,l[12]),x=c(x,A,B,D,_,12,l[13]),D=c(D,x,A,B,C,17,l[14]),A=d(A,B=c(B,D,x,A,N,22,l[15]),D,x,s,5,l[16]),x=d(x,A,B,D,v,9,l[17]),D=d(D,x,A,B,E,14,l[18]),B=d(B,D,x,A,i,20,l[19]),A=d(A,B,D,x,g,5,l[20]),x=d(x,A,B,D,S,9,l[21]),D=d(D,x,A,B,N,14,l[22]),B=d(B,D,x,A,p,20,l[23]),A=d(A,B,D,x,w,5,l[24]),x=d(x,A,B,D,C,9,l[25]),D=d(D,x,A,B,m,14,l[26]),B=d(B,D,x,A,b,20,l[27]),A=d(A,B,D,x,_,5,l[28]),x=d(x,A,B,D,h,9,l[29]),D=d(D,x,A,B,y,14,l[30]),A=u(A,B=d(B,D,x,A,k,20,l[31]),D,x,g,4,l[32]),x=u(x,A,B,D,b,11,l[33]),D=u(D,x,A,B,E,16,l[34]),B=u(B,D,x,A,C,23,l[35]),A=u(A,B,D,x,s,4,l[36]),x=u(x,A,B,D,p,11,l[37]),D=u(D,x,A,B,y,16,l[38]),B=u(B,D,x,A,S,23,l[39]),A=u(A,B,D,x,_,4,l[40]),x=u(x,A,B,D,i,11,l[41]),D=u(D,x,A,B,m,16,l[42]),B=u(B,D,x,A,v,23,l[43]),A=u(A,B,D,x,w,4,l[44]),x=u(x,A,B,D,k,11,l[45]),D=u(D,x,A,B,N,16,l[46]),A=f(A,B=u(B,D,x,A,h,23,l[47]),D,x,i,6,l[48]),x=f(x,A,B,D,y,10,l[49]),D=f(D,x,A,B,C,15,l[50]),B=f(B,D,x,A,g,21,l[51]),A=f(A,B,D,x,k,6,l[52]),x=f(x,A,B,D,m,10,l[53]),D=f(D,x,A,B,S,15,l[54]),B=f(B,D,x,A,s,21,l[55]),A=f(A,B,D,x,b,6,l[56]),x=f(x,A,B,D,N,10,l[57]),D=f(D,x,A,B,v,15,l[58]),B=f(B,D,x,A,_,21,l[59]),A=f(A,B,D,x,p,6,l[60]),x=f(x,A,B,D,E,10,l[61]),D=f(D,x,A,B,h,15,l[62]),B=f(B,D,x,A,w,21,l[63]),a[0]=a[0]+A|0,a[1]=a[1]+B|0,a[2]=a[2]+D|0,a[3]=a[3]+x|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var a=e.floor(o/4294967296),i=o;n[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var l=this._hash,s=l.words,c=0;c<4;c++){var d=s[c];s[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return l},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,o,r,a,i){var l=e+(t&n|~t&o)+r+i;return(l<<a|l>>>32-a)+t}function d(e,t,n,o,r,a,i){var l=e+(t&o|n&~o)+r+i;return(l<<a|l>>>32-a)+t}function u(e,t,n,o,r,a,i){var l=e+(t^n^o)+r+i;return(l<<a|l>>>32-a)+t}function f(e,t,n,o,r,a,i){var l=e+(n^(t|~o))+r+i;return(l<<a|l>>>32-a)+t}t.MD5=a._createHelper(s),t.HmacMD5=a._createHmacHelper(s)}(Math),o.MD5)},"./node_modules/crypto-js/pbkdf2.js":function(e,t,n){var o,r,a,i,l,s,c,d,u;e.exports=(u=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/sha256.js"),n("./node_modules/crypto-js/hmac.js"),a=(r=(o=u).lib).Base,i=r.WordArray,s=(l=o.algo).SHA256,c=l.HMAC,d=l.PBKDF2=a.extend({cfg:a.extend({keySize:4,hasher:s,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,o=c.create(n.hasher,e),r=i.create(),a=i.create([1]),l=r.words,s=a.words,d=n.keySize,u=n.iterations;l.length<d;){var f=o.update(t).finalize(a);o.reset();for(var h=f.words,m=h.length,p=f,g=1;g<u;g++){p=o.finalize(p),o.reset();for(var v=p.words,y=0;y<m;y++)h[y]^=v[y]}r.concat(f),s[0]++}return r.sigBytes=4*d,r}}),o.PBKDF2=function(e,t,n){return d.create(n).compute(e,t)},u.PBKDF2)},"./node_modules/crypto-js/rabbit.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.StreamCipher,n=e.algo,r=[],a=[],i=[],l=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var o=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)s.call(this);for(n=0;n<8;n++)r[n]^=o[n+4&7];if(t){var a=t.words,i=a[0],l=a[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),d=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),u=c>>>16|4294901760&d,f=d<<16|65535&c;for(r[0]^=c,r[1]^=u,r[2]^=d,r[3]^=f,r[4]^=c,r[5]^=u,r[6]^=d,r[7]^=f,n=0;n<4;n++)s.call(this)}},_doProcessBlock:function(e,t){var n=this._X;s.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)r[o]=16711935&(r[o]<<8|r[o]>>>24)|4278255360&(r[o]<<24|r[o]>>>8),e[t+o]^=r[o]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var o=e[n]+t[n],r=65535&o,l=o>>>16,s=((r*r>>>17)+r*l>>>15)+l*l,c=((4294901760&o)*o|0)+((65535&o)*o|0);i[n]=s^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}e.Rabbit=t._createHelper(l)}(),o.Rabbit)},"./node_modules/crypto-js/rc4.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.StreamCipher,n=e.algo,r=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,o=this._S=[],r=0;r<256;r++)o[r]=r;r=0;for(var a=0;r<256;r++){var i=r%n,l=t[i>>>2]>>>24-i%4*8&255;a=(a+o[r]+l)%256;var s=o[r];o[r]=o[a],o[a]=s}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,o=0,r=0;r<4;r++){n=(n+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[n],e[n]=a,o|=e[(e[t]+e[n])%256]<<24-8*r}return this._i=t,this._j=n,o}e.RC4=t._createHelper(r);var i=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(i)}(),o.RC4)},"./node_modules/crypto-js/sha1.js":function(e,t,n){var o,r,a,i,l,s,c,d;e.exports=(r=(o=d=n("./node_modules/crypto-js/core.js")).lib,a=r.WordArray,i=r.Hasher,l=o.algo,s=[],c=l.SHA1=i.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],r=n[1],a=n[2],i=n[3],l=n[4],c=0;c<80;c++){if(c<16)s[c]=0|e[t+c];else{var d=s[c-3]^s[c-8]^s[c-14]^s[c-16];s[c]=d<<1|d>>>31}var u=(o<<5|o>>>27)+l+s[c];u+=c<20?1518500249+(r&a|~r&i):c<40?1859775393+(r^a^i):c<60?(r&a|r&i|a&i)-1894007588:(r^a^i)-899497514,l=i,i=a,a=r<<30|r>>>2,r=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+i|0,n[4]=n[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(o+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),o.SHA1=i._createHelper(c),o.HmacSHA1=i._createHmacHelper(c),d.SHA1)},"./node_modules/crypto-js/sha256.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),function(e){var t=o,n=t.lib,r=n.WordArray,a=n.Hasher,i=t.algo,l=[],s=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,r=0;r<64;)t(o)&&(r<8&&(l[r]=n(e.pow(o,.5))),s[r]=n(e.pow(o,1/3)),r++),o++}();var c=[],d=i.SHA256=a.extend({_doReset:function(){this._hash=new r.init(l.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],r=n[1],a=n[2],i=n[3],l=n[4],d=n[5],u=n[6],f=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var m=c[h-15],p=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=c[h-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[h]=p+c[h-7]+v+c[h-16]}var y=o&r^o&a^r&a,b=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=f+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&d^~l&u)+s[h]+c[h];f=u,u=d,d=l,l=i+w|0,i=a,a=r,r=o,o=w+(b+y)|0}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+i|0,n[4]=n[4]+l|0,n[5]=n[5]+d|0,n[6]=n[6]+u|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(o/4294967296),n[15+(r+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(d),t.HmacSHA256=a._createHmacHelper(d)}(Math),o.SHA256)},"./node_modules/crypto-js/tripledes.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib,n=t.WordArray,r=t.BlockCipher,a=e.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=a.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var o=i[n]-1;t[n]=e[o>>>5]>>>31-o%32&1}for(var r=this._subKeys=[],a=0;a<16;a++){var c=r[a]=[],d=s[a];for(n=0;n<24;n++)c[n/6|0]|=t[(l[n]-1+d)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(l[n+24]-1+d)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var u=this._invSubKeys=[];for(n=0;n<16;n++)u[n]=r[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],f.call(this,4,252645135),f.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),f.call(this,1,1431655765);for(var o=0;o<16;o++){for(var r=n[o],a=this._lBlock,i=this._rBlock,l=0,s=0;s<8;s++)l|=c[s][((i^r[s])&d[s])>>>0];this._lBlock=i,this._rBlock=a^l}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,f.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function h(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=r._createHelper(u);var m=a.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),o=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(n.create(t)),this._des2=u.createEncryptor(n.create(o)),this._des3=u.createEncryptor(n.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(m)}(),o.TripleDES)},"./node_modules/lz-string/libs/lz-string.js":(e,t,n)=>{var o,r=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function r(e,t){if(!o[e]){o[e]={};for(var n=0;n<e.length;n++)o[e][e.charAt(n)]=n}return o[e][t]}var a={compressToBase64:function(e){if(null==e)return"";var n=a._compress(e,6,function(e){return t.charAt(e)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:a._decompress(e.length,32,function(n){return r(t,e.charAt(n))})},compressToUTF16:function(t){return null==t?"":a._compress(t,15,function(t){return e(t+32)})+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:a._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=a.compress(e),n=new Uint8Array(2*t.length),o=0,r=t.length;o<r;o++){var i=t.charCodeAt(o);n[2*o]=i>>>8,n[2*o+1]=i%256}return n},decompressFromUint8Array:function(t){if(null==t)return a.decompress(t);for(var n=new Array(t.length/2),o=0,r=n.length;o<r;o++)n[o]=256*t[2*o]+t[2*o+1];var i=[];return n.forEach(function(t){i.push(e(t))}),a.decompress(i.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":a._compress(e,6,function(e){return n.charAt(e)})},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),a._decompress(e.length,32,function(t){return r(n,e.charAt(t))}))},compress:function(t){return a._compress(t,16,function(t){return e(t)})},_compress:function(e,t,n){if(null==e)return"";var o,r,a,i={},l={},s="",c="",d="",u=2,f=3,h=2,m=[],p=0,g=0;for(a=0;a<e.length;a+=1)if(s=e.charAt(a),Object.prototype.hasOwnProperty.call(i,s)||(i[s]=f++,l[s]=!0),c=d+s,Object.prototype.hasOwnProperty.call(i,c))d=c;else{if(Object.prototype.hasOwnProperty.call(l,d)){if(d.charCodeAt(0)<256){for(o=0;o<h;o++)p<<=1,g==t-1?(g=0,m.push(n(p)),p=0):g++;for(r=d.charCodeAt(0),o=0;o<8;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}else{for(r=1,o=0;o<h;o++)p=p<<1|r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r=0;for(r=d.charCodeAt(0),o=0;o<16;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}0==--u&&(u=Math.pow(2,h),h++),delete l[d]}else for(r=i[d],o=0;o<h;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1;0==--u&&(u=Math.pow(2,h),h++),i[c]=f++,d=String(s)}if(""!==d){if(Object.prototype.hasOwnProperty.call(l,d)){if(d.charCodeAt(0)<256){for(o=0;o<h;o++)p<<=1,g==t-1?(g=0,m.push(n(p)),p=0):g++;for(r=d.charCodeAt(0),o=0;o<8;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}else{for(r=1,o=0;o<h;o++)p=p<<1|r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r=0;for(r=d.charCodeAt(0),o=0;o<16;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}0==--u&&(u=Math.pow(2,h),h++),delete l[d]}else for(r=i[d],o=0;o<h;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1;0==--u&&(u=Math.pow(2,h),h++)}for(r=2,o=0;o<h;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1;for(;;){if(p<<=1,g==t-1){m.push(n(p));break}g++}return m.join("")},decompress:function(e){return null==e?"":""==e?null:a._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,o){var r,a,i,l,s,c,d,u=[],f=4,h=4,m=3,p="",g=[],v={val:o(0),position:n,index:1};for(r=0;r<3;r+=1)u[r]=r;for(i=0,s=Math.pow(2,2),c=1;c!=s;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(l>0?1:0)*c,c<<=1;switch(i){case 0:for(i=0,s=Math.pow(2,8),c=1;c!=s;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(l>0?1:0)*c,c<<=1;d=e(i);break;case 1:for(i=0,s=Math.pow(2,16),c=1;c!=s;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(l>0?1:0)*c,c<<=1;d=e(i);break;case 2:return""}for(u[3]=d,a=d,g.push(d);;){if(v.index>t)return"";for(i=0,s=Math.pow(2,m),c=1;c!=s;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(l>0?1:0)*c,c<<=1;switch(d=i){case 0:for(i=0,s=Math.pow(2,8),c=1;c!=s;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(l>0?1:0)*c,c<<=1;u[h++]=e(i),d=h-1,f--;break;case 1:for(i=0,s=Math.pow(2,16),c=1;c!=s;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(l>0?1:0)*c,c<<=1;u[h++]=e(i),d=h-1,f--;break;case 2:return g.join("")}if(0==f&&(f=Math.pow(2,m),m++),u[d])p=u[d];else{if(d!==h)return null;p=a+a.charAt(0)}g.push(p),u[h++]=a+p.charAt(0),a=p,0==--f&&(f=Math.pow(2,m),m++)}}};return a}();void 0===(o=function(){return r}.call(t,n,t,e))||(e.exports=o)},"?9157":()=>{}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{default:()=>e});const e=n("./src/SecureLS.js").SecureLS})(),o})(),e.exports=t()}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ActionBar:()=>Z,AdminConfig:()=>g.AdminConfig,CategoryPlatform:()=>ce,CategorySettings:()=>Gn,CmsModuleDropdown:()=>C,CopyPaste:()=>Af,CopyToClipboard:()=>g.CopyToClipboard,Dashboard:()=>g.Dashboard,DownloadButton:()=>Qn,EditorHelper:()=>sh,ErrorMessage:()=>hh,Fetcher:()=>g.Fetcher,FileUploader:()=>po,Form:()=>Sr,FrontendModuleCreator:()=>kr,GlobalSiteButton:()=>Br,Homepage:()=>Wa,HtmlSlot:()=>Xa,ImageGallery:()=>si,InfoBox:()=>bi,InfoBoxes:()=>Ei,InfoPopup:()=>za,IsJson:()=>g.IsJson,LanguageButton:()=>B,LanguageCopier:()=>Oi,LeftMenu:()=>g.LeftMenu,LeftMenuShowHide:()=>xf,LeftNav:()=>$i,Loader:()=>Yf,MapAPI:()=>mh,MenuSorter:()=>ol,Modal:()=>Y,ModalBox:()=>le,ModuleCreator:()=>xs,ModulePermission:()=>ac,PageManager:()=>ch,Pagination:()=>gc,PasteFromClipboard:()=>g.PasteFromClipboard,PlatformButton:()=>Sc,SearchBar:()=>U,SiteButton:()=>Cc,SiteCloner:()=>Uc,SitewiseCopier:()=>_d,SitewiseData:()=>Ed,Sorter:()=>Td,SplitButton:()=>k,Storage:()=>g.Storage,TabularView:()=>pf,TimerButton:()=>Zf,TitleBar:()=>Tf,TitleCase:()=>g.TitleCase,Toast:()=>J,ToastBox:()=>nh,TopNav:()=>zf,Utils:()=>g.Utils,default:()=>wh,parseProp:()=>g.parseProp,queryBuilder:()=>g.queryBuilder,safeErrorData:()=>g.safeErrorData});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{CopyToClipboard:()=>g.CopyToClipboard,Fetcher:()=>g.Fetcher,IsJson:()=>g.IsJson,LeftMenu:()=>g.LeftMenu,Loader:()=>X,Modal:()=>Y,PasteFromClipboard:()=>g.PasteFromClipboard,Storage:()=>g.Storage,TitleCase:()=>g.TitleCase,Toast:()=>J,Utils:()=>g.Utils,parseProp:()=>g.parseProp,queryBuilder:()=>g.queryBuilder,safeErrorData:()=>g.safeErrorData});var t=__webpack_require__(380);function n(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var n={}.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)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var r={class:"container-fluid border-bottom mb-2 pb-2"},a={class:"row"},i={class:"col"},l={class:"btn-toolbar justify-content-between",role:"toolbar","aria-label":"Toolbar with button groups"},s={class:"btn-group",role:"group"},c={class:"moduleTitle"},d={class:"input-group actionToolbar"},u=["href","title"],f={key:1},h=["href"],m={class:"row"},p={key:0,class:"col"},g=__webpack_require__(648);const v=new g.AdminConfig;var y={class:"dropdown"},b=["onClick"],w=__webpack_require__(602),S=__webpack_require__(262);const E=(0,S.A)(w.A,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",y,[(0,t.createElementVNode)("a",{class:(0,t.normalizeClass)("btn btn-secondary dropdown-toggle "+a.btnCss),href:"#",role:"button","data-bs-toggle":"dropdown","aria-expanded":"false",onClick:n[0]||(n[0]=function(e){return i.toggleMenu()})},(0,t.toDisplayString)(a.current.label),3),(0,t.createElementVNode)("ul",{class:"dropdown-menu shadow",style:(0,t.normalizeStyle)(a.display),ref:"dropdownMenu"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.lists,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:(0,t.normalizeClass)(i.isActive(e)),onClick:function(e){return i.setCurrent(n)}},(0,t.toDisplayString)(e.label),11,b)}),256))],4)])}]]),k=E,_={components:{"split-button":k},props:["dataModules","dataCurrentModule"],mounted:function(){},data:function(){return{modules:void 0===this.dataModules?[]:"string"==typeof this.dataModules?JSON.parse(this.dataModules):this.dataModules,selectedModule:void 0===this.dataCurrentModule?"":this.dataCurrentModule}},computed:{currentIndex:function(){if(this.allModules.length>0)for(var e=0;e<this.allModules.length;e++)if(this.allModules[e].controller_name.toLowerCase()==this.selectedModule.toLowerCase())return e;return 0},allModules:function(){var e=this.modules.child;return e.splice(0,0,{name:this.modules.name,controller_name:this.modules.controller_name}),e}},methods:{hasChild:function(){return 0==this.modules.parent_id&&this.allModules.length>1},parseData:function(e){return{label:e.name,value:e.controller_name}},onChange:function(e){var t=v.admin_path(e.value);window.location=t}}},C=(0,S.A)(_,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("split-button");return i.hasChild()?((0,t.openBlock)(),(0,t.createBlock)(l,{key:0,"data-options":i.allModules,onChange:i.onChange,"data-parser":i.parseData,"data-selected":i.currentIndex,"data-btn-css":"btn-success"},{default:(0,t.withCtx)(function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.selectedModule),1)]}),_:1},8,["data-options","onChange","data-parser","data-selected"])):(0,t.createCommentVNode)("v-if",!0)}]]);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const A={components:{"split-button":k},props:["dataLanguages","dataSelectedLanguage"],mounted:function(){},data:function(){return{languages:void 0===this.dataLanguages?null:JSON.parse(this.dataLanguages),currentLang:void 0===this.dataSelectedLanguage?1:parseInt(this.dataSelectedLanguage)}},computed:{currentIndex:function(){if(null!=this.languages)for(var e=0;e<this.languages.length;e++)if(this.languages[e].id==this.currentLang)return e;return 0}},methods:{hasLanguage:function(){return null!=this.languages&&this.languages.length>1},parseLang:function(e){return{label:e.name,value:e.id}},setLanguage:function(e){var t=v.admin_path("ajax/setLanguage/".concat(e.value));axios.get(t).then(function(e){window.location.reload()}).catch(function(e){console.log(e)})}}},B=(0,S.A)(A,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("split-button");return i.hasLanguage()?((0,t.openBlock)(),(0,t.createBlock)(l,{key:0,"data-options":o.dataLanguages,onChange:i.setLanguage,"data-parser":i.parseLang,"data-selected":i.currentIndex,"data-btn-css":"lang"},{default:(0,t.withCtx)(function(){return function(e){if(Array.isArray(e))return N(e)}(e=n[0]||(n[0]=[(0,t.createTextVNode)("English",-1)]))||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 N(e,t);var n={}.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}}(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.")}();var e}),_:1},8,["data-options","onChange","data-parser","data-selected"])):(0,t.createCommentVNode)("v-if",!0)}]]);var D=["action"],x={class:"row searchForm justify-content-end"},V={class:"col-auto space-between"},T={class:"form-group"},M=["value"],O={class:"col-auto space-between"},I=["value"],j={class:"col-auto space-between"},P=["type"],F={class:"col-auto space-between"},L={class:"input-group-btn"};const R={mounted:function(){this.init()},props:["dataSelectedParams","dataControllerName","dataFields","dataActionFields"],data:function(){return{searchParams:{q:"",f:"id",o:"="},actionUrl:v.admin_path(this.dataControllerName+"/search"),searchFields:this.dataFields&&"null"!=this.dataFields?JSON.parse(this.dataFields):[],operators:["=","!=",">","<",">=","<=","like%","%like%"],hasAction:!(!this.dataActionFields||"null"==this.dataActionFields)&&JSON.parse(this.dataActionFields).length>0,defaultSearchParams:{q:"",f:"id",o:"="},inputType:"text"}},methods:{searchNow:function(){var e;if(""==this.searchParams.q.trim())e=v.admin_path(this.dataControllerName);else{var t=encodeURI(JSON.stringify(this.searchParams)),n=-1==this.actionUrl.indexOf("?")?"?":"&";e=this.actionUrl+n+"q="+t}return window.location.href=e,!1},resetForm:function(){var e=v.admin_path(this.dataControllerName);window.location.href=e},getFieldName:function(e,t){return t=t||"label","string"==typeof e||null==e[t]?e:e[t]},changeInputText:function(){this.searchParams.f.endsWith("_date")||this.searchParams.f.endsWith("_at")?this.inputType="date":this.inputType="text"},init:function(){this.hasAction&&this.searchFields.pop(),this.searchParams=JSON.parse(this.dataSelectedParams),null==this.searchParams.f&&(this.searchParams=this.defaultSearchParams)}}},U=(0,S.A)(R,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("form",{action:a.actionUrl,method:"get",onSubmit:n[5]||(n[5]=(0,t.withModifiers)(function(){return i.searchNow&&i.searchNow.apply(i,arguments)},["prevent"])),class:"form-inline",role:"form"},[(0,t.createElementVNode)("div",x,[(0,t.createElementVNode)("div",V,[(0,t.createElementVNode)("div",T,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:"fields","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.searchParams.f=e}),class:"form-select",onChange:n[1]||(n[1]=function(e){return i.changeInputText()})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.searchFields,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:i.getFieldName(e,"key")},(0,t.toDisplayString)(i.getFieldName(e)),9,M)}),256))],544),[[t.vModelSelect,a.searchParams.f]])])]),(0,t.createElementVNode)("div",O,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:"fields","onUpdate:modelValue":n[2]||(n[2]=function(e){return a.searchParams.o=e}),class:"form-select"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.operators,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e},(0,t.toDisplayString)(e),9,I)}),256))],512),[[t.vModelSelect,a.searchParams.o]])]),(0,t.createElementVNode)("div",j,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:a.inputType,"onUpdate:modelValue":n[3]||(n[3]=function(e){return a.searchParams.q=e}),class:"form-control",placeholder:"Search for..."},null,8,P),[[t.vModelDynamic,a.searchParams.q]])]),(0,t.createElementVNode)("div",F,[(0,t.createElementVNode)("span",L,[n[6]||(n[6]=(0,t.createElementVNode)("input",{type:"submit",name:"submit",value:"Search",class:"btn btn-success space-between btn-space"},null,-1)),(0,t.createElementVNode)("input",{type:"reset",name:"reset",onClick:n[4]||(n[4]=function(e){return i.resetForm()}),value:"Reset",class:"btn btn-outline-secondary btn-space"})])])])],40,D)}]]);var H=new function(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(e){e(n)}),(o=e.get("*"))&&o.slice().map(function(e){e(t,n)})}}};function $(e){return $="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)}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,W(o.key),o)}}function K(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e){var t=function(e){if("object"!=$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$(t)?t:t+""}g.LeftMenu&&"function"==typeof g.LeftMenu.init&&g.LeftMenu.init(H);var J=function(){return K(function e(){q(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,o=arguments.length>3?arguments[3]:void 0;e.$root.$refs.globalToaster.show(t,n,o)}},{key:"hide",value:function(e){e.$root.$refs.globalToaster.hide()}}])}(),X=function(){return K(function e(){q(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.$root.$refs.globalLoader.show(t,n)}},{key:"hide",value:function(e){e.$root.$refs.globalLoader.hide()}}])}(),Y=function(){return K(function e(){q(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;e.$root.$refs.globalModalBox.show(t,n,o,r)}},{key:"hide",value:function(e){e.$root.$refs.globalModalBox.hide()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null!=e&&null!=t&&e.$refs[t].open(n)}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null!=e&&null!=t&&e.$refs[t].hide()}}])}();const G={components:{"cms-module-dropdown":C,"language-button":B,"search-bar":U},mounted:function(){this.shouldShowSearchPanel()},props:["dataSelectedParams","dataControllerName","dataControllerTitle","dataFields","dataActionFields","dataLanguages","dataSelectedLanguage","dataMoreActions","dataShowAdd","dataHasLangMethod","dataCmsModules","dataShowSearch","dataShowBack","dataLayoutType"],computed:{backURL:function(){return v.admin_path(this.controllerName)},layoutIcon:function(){return"grid"===this.layoutType?"fa fa-th-list":"fa fa-table"},showAddButtonBasedOnAction:function(){return-1!==this.actionFields.indexOf("edit")}},data:function(){return{canAdd:!0,showSearchButton:!(void 0===this.dataShowSearch||""===this.dataShowSearch||"false"===this.dataShowSearch),showSearchPanel:!1,isActive:"btn btn-outline-secondary",searchAnim:"",moreActionButtons:void 0===this.dataMoreActions||""===this.dataMoreActions?[]:JSON.parse(this.dataMoreActions),showAdd:void 0===this.dataShowAdd||"true"===this.dataShowAdd,hasLangMethod:!(void 0===this.dataHasLangMethod||"false"===this.dataHasLangMethod),cmsModules:void 0===this.dataCmsModules||""===this.dataCmsModules?[]:JSON.parse(this.dataCmsModules),selectedParams:void 0===this.dataSelectedParams?"":this.dataSelectedParams,controllerName:void 0===this.dataControllerName?"":this.dataControllerName,controllerTitle:void 0===this.dataControllerTitle?"":this.dataControllerTitle,fields:void 0===this.dataFields||""===this.dataFields?[]:this.dataFields,actionFields:void 0===this.dataActionFields||""===this.dataActionFields?[]:this.dataActionFields,showBack:"true"===this.dataShowBack,layoutType:void 0===this.dataLayoutType||""===this.dataLayoutType?"table":this.dataLayoutType}},methods:{changeLayout:function(){if(J.show(this,"Please wait. Changing listing style for you...",5e3),this.layoutType="table"===this.layoutType?"grid":"table","URLSearchParams"in window){var e=new URLSearchParams(window.location.search);e.set("layout",this.layoutType),window.location.search=e.toString()}},getAction:function(e){return 0===e.indexOf("http")?e:v.admin_path(e)},maintainActiveSearch:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isActive=!0===this.showSearchPanel?"btn btn-success":"btn btn-outline-secondary",this.searchAnim=!0===this.showSearchPanel&&1==e?"animated flipInX":""},showHideSearch:function(){this.showSearchPanel=!this.showSearchPanel,this.maintainActiveSearch()},shouldShowSearchPanel:function(){""!==this.selectedParams&&(JSON.parse(this.selectedParams).q&&(this.showSearchPanel=!0),this.maintainActiveSearch(!1))},addNew:function(){if(""!==this.controllerName){var e=v.admin_path(this.controllerName);window.location.href=e+"/create"}},getButtonType:function(e){return e.as&&"button"!==e.as?e.as:"button"},getTitle:function(e){return"string"!=typeof(t=e)?"":t.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,function(e){return e.toUpperCase()});var t}}},Z=(0,S.A)(G,[["render",function(e,o,g,v,y,b){var w=(0,t.resolveComponent)("language-button"),S=(0,t.resolveComponent)("search-bar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",r,[(0,t.createElementVNode)("div",a,[(0,t.createElementVNode)("div",i,[(0,t.createElementVNode)("div",l,[(0,t.createElementVNode)("div",s,[(0,t.createElementVNode)("h4",c,(0,t.toDisplayString)(b.getTitle(y.controllerTitle)),1)]),(0,t.createElementVNode)("div",d,[y.hasLangMethod?((0,t.openBlock)(),(0,t.createBlock)(w,{key:0,"data-languages":g.dataLanguages,"data-selected-language":g.dataSelectedLanguage},{default:(0,t.withCtx)(function(){return n(o[3]||(o[3]=[(0,t.createTextVNode)("English",-1)]))}),_:1},8,["data-languages","data-selected-language"])):(0,t.createCommentVNode)("v-if",!0),y.showAdd&&b.showAddButtonBasedOnAction?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,title:"Add New",onClick:o[0]||(o[0]=function(){return b.addNew&&b.addNew.apply(b,arguments)}),type:"button",class:"btn btn-outline-secondary","aria-label":"Add New"},n(o[4]||(o[4]=[(0,t.createElementVNode)("i",{class:"fa fa-plus","aria-hidden":"true"},null,-1),(0,t.createTextVNode)(" Add New ",-1)])))):(0,t.createCommentVNode)("v-if",!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(y.moreActionButtons,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("a",{class:"btn btn-outline-secondary",href:b.getAction(e.action),title:e.label},[e.icon_css?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:(0,t.normalizeClass)(e.icon_css),"aria-hidden":"true"},null,2)):(0,t.createCommentVNode)("v-if",!0),"button"==b.getButtonType(e)?((0,t.openBlock)(),(0,t.createElementBlock)("span",f,(0,t.toDisplayString)(e.label),1)):(0,t.createCommentVNode)("v-if",!0)],8,u)}),256)),y.showSearchButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:2,title:"Search",onClick:o[1]||(o[1]=function(){return b.showHideSearch&&b.showHideSearch.apply(b,arguments)}),type:"button",class:(0,t.normalizeClass)(y.isActive),"aria-label":"Search"},n(o[5]||(o[5]=[(0,t.createElementVNode)("i",{class:"fa fa-search","aria-hidden":"true"},null,-1)])),2)):(0,t.createCommentVNode)("v-if",!0),y.fields.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:3,title:"Change Layout",onClick:o[2]||(o[2]=function(e){return b.changeLayout()}),type:"button",class:"btn btn-outline-secondary","aria-label":"Layout"},[(0,t.createElementVNode)("i",{class:(0,t.normalizeClass)(b.layoutIcon),"aria-hidden":"true"},null,2)])):(0,t.createCommentVNode)("v-if",!0),y.showBack?((0,t.openBlock)(),(0,t.createElementBlock)("a",{key:4,class:"btn btn-outline-secondary",href:b.backURL},"Back",8,h)):(0,t.createCommentVNode)("v-if",!0)])])])]),(0,t.createElementVNode)("div",m,[y.showSearchPanel?((0,t.openBlock)(),(0,t.createElementBlock)("div",p,[(0,t.createVNode)(S,{class:(0,t.normalizeClass)(y.searchAnim),"data-controller-name":y.controllerName,"data-selected-params":y.selectedParams,"data-fields":y.fields,"data-action-fields":y.actionFields},null,8,["class","data-controller-name","data-selected-params","data-fields","data-action-fields"])])):(0,t.createCommentVNode)("v-if",!0)])])}]]);function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var ee={class:"row"},te={class:"col-auto"},ne=["value"],oe={class:"col-auto"},re={class:"modal-content"},ae={class:"modal-title",style:{width:"100%"}};const ie={emits:["onClose"],props:["dataShowModal","dataShowFooter","dataTitleCss","dataContentCss","dataFooterCss","dataModalCss","dataWidth"],mounted:function(){this.visible&&this.open()},data:function(){return{modelCss:"modal modal-lg fade show",titleCss:void 0===this.dataTitleCss?"":this.dataTitleCss,contentCss:void 0===this.dataContentCss?"":this.dataContentCss,footerCss:void 0===this.dataFooterCss?"":this.dataFooterCss,visible:void 0!==this.dataShowModal&&"true"===this.dataShowModal.toString(),style:"",toBeReturned:{},title:"Alert",content:"Modal Content",footerContent:"",backDropStyle:"display:none"}},computed:{showFooter:function(){return void 0!==this.dataShowFooter&&"true"===this.dataShowFooter.toString()||""!==this.footerContent},modalWidth:function(){return void 0!==this.dataWidth&&""!==this.dataWidth?"width:".concat(this.dataWidth):""}},methods:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.visible=!0,this.backDropStyle=this.style="display:block",this.modelCss="modal modal-lg fade show animated bounceInDown",this.toBeReturned=e},close:function(){this.visible=!1,this.modelCss="modal modal-lg animated bounceOutUp",this.backDropStyle="display:none","function"==typeof this.toBeReturned&&this.toBeReturned()},sendData:function(e){this.close(),this.$emit("onClose",e,this.toBeReturned)},show:function(e,t,n,o){"string"==typeof e?this.content=e:(e.title&&(this.title=e.title),e.content&&(this.content=e.content),e.footerContent&&(this.footerContent=e.footerContent)),this.open(n)},hide:function(){this.close()}}},le=(0,S.A)(ie,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.modelCss),tabindex:"-1","aria-hidden":"true",style:(0,t.normalizeStyle)(a.style)},[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)("modal-dialog modal-dialog-centered modal-dialog-scrollable "+o.dataModalCss),style:(0,t.normalizeStyle)(i.modalWidth)},[(0,t.createElementVNode)("div",re,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.titleCss+" modal-header")},[(0,t.createElementVNode)("h5",ae,[(0,t.renderSlot)(e.$slots,"title",{},function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.title),1)]})]),(0,t.createElementVNode)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",onClick:n[0]||(n[0]=function(e){return i.sendData(0)})})],2),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.contentCss+" modal-body")},[(0,t.renderSlot)(e.$slots,"content",{},function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.content),1)]})],2),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.footerCss+" modal-footer")},[(0,t.renderSlot)(e.$slots,"footer",{},function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.footerContent),1)]})],2),[[t.vShow,i.showFooter]])])],6)],6),(0,t.createElementVNode)("div",{class:"modal-backdrop fade show",style:(0,t.normalizeStyle)(a.backDropStyle)},null,4)],64)}]]),se={components:{"modal-box":le},mounted:function(){this.verifyAction()},props:["dataPlatforms"],data:function(){return{modelCss:"modal",showHide:!0,platforms:this.dataPlatforms&&"null"!=this.dataPlatforms?JSON.parse(this.dataPlatforms):[],currentPlatform:"",currentTarget:null}},methods:{verifyAction:function(){var e=this;H.on("list-view-pre-edit",function(t){e.currentTarget=t,e.open()})},editNow:function(){var e=this.currentPlatform;if(""===e)return J.show(this,"Please select a platform"),!1;var t=this.currentTarget.getAttribute("data-rowid");window.location=v.admin_path("category/edit/".concat(t,"/").concat(e))},open:function(){this.platforms.length>1?this.$refs.platformbox.open():(this.currentPlatform=this.platforms[0].id,this.editNow())},close:function(){this.$refs.platformbox.close()},hideSpinner:function(){H.emit("list-view-hide-spinner",this)}}},ce=(0,S.A)(se,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("modal-box");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(l,{ref:"platformbox",onOnClose:i.hideSpinner},{title:(0,t.withCtx)(function(){return function(e){if(Array.isArray(e))return Q(e)}(e=n[3]||(n[3]=[(0,t.createTextVNode)(" Select Platform ",-1)]))||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={}.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.")}();var e}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",ee,[(0,t.createElementVNode)("div",te,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.currentPlatform=e}),class:"form-select select-medium",onChange:n[1]||(n[1]=function(e){return i.editNow()})},[n[4]||(n[4]=(0,t.createElementVNode)("option",{value:""},"Select a platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ne)}),256))],544),[[t.vModelSelect,a.currentPlatform]])]),(0,t.createElementVNode)("div",oe,[(0,t.createElementVNode)("button",{class:"btn btn-success btn-from-submit",type:"button",onClick:n[2]||(n[2]=function(e){return i.editNow()})}," Edit Now ")])])]}),_:1},8,["onOnClose"])])}]]);function de(e){return function(e){if(Array.isArray(e))return ue(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 ue(e,t);var n={}.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)?ue(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 ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var fe={class:"row"},he={class:"col-auto"},me=["value"],pe={class:"col-auto"},ge=["value"],ve={class:"col-auto"},ye={title:"It will be inserted or deleted for all platforms if checks."},be={key:0,class:"row mt-3"},we={class:"row mt-3"},Se={class:"col-4"},Ee={class:"panel panel-success shadow border"},ke={class:"panel-heading p-4"},_e={key:0,class:"panel-body p-3",style:{"background-color":"#f3f3f3"}},Ce=["value"],Ne={key:1,class:"panel-sub-heading",style:{padding:"4px"}},Ae={class:"input-group"},Be={ref:"droppableArea",class:"list-group category-items js_category",style:{"min-height":"200px"}},De=["data-cache-category","data-category-id","data-theme-id"],xe=["onUpdate:modelValue"],Ve={class:"text-danger"},Te={class:"btn-toolbar pull-right toolbar-category",role:"toolbar"},Me={class:"btn-group"},Oe={key:0,"aria-label":"Delete from this platform",class:"btn btn-default icon-btn js_delete",title:"Delete from this platform",type:"button"},Ie={key:1,"aria-label":"More Info",class:"btn btn-default js_info icon-btn",title:"More Info",type:"button"},je={class:"col-3"},Pe={class:"panel panel-info margin-top-20"},Fe={key:0,class:"panel-sub-heading",style:{padding:"4px"}},Le={class:"input-group"},Re={id:"draggableItems",class:"list-group"},Ue=["data-category-id"],He={ref:"popover",class:"popover hide bs-popover-end shadow","data-popper-placement":"right",role:"tooltip"},$e={class:"popover-header"},qe={class:"popover-body"},ze=["value"],Ke={class:"text-center"};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach(function(t){Ye(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xe(e){return Xe="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},Xe(e)}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(){return Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)}function Ze(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var Qe=Ze(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),et=Ze(/Edge/i),tt=Ze(/firefox/i),nt=Ze(/safari/i)&&!Ze(/chrome/i)&&!Ze(/android/i),ot=Ze(/iP(ad|od|hone)/i),rt=Ze(/chrome/i)&&Ze(/android/i),at={capture:!1,passive:!1};function it(e,t,n){e.addEventListener(t,n,!Qe&&at)}function lt(e,t,n){e.removeEventListener(t,n,!Qe&&at)}function st(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function ct(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function dt(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&st(e,t):st(e,t))||o&&e===n)return e;if(e===n)break}while(e=ct(e))}return null}var ut,ft=/\s+/g;function ht(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(ft," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(ft," ")}}function mt(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function pt(e,t){var n="";if("string"==typeof e)n=e;else do{var o=mt(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function gt(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,a=o.length;if(n)for(;r<a;r++)n(o[r],r);return o}return[]}function vt(){return document.scrollingElement||document.documentElement}function yt(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var a,i,l,s,c,d,u;if(e!==window&&e.parentNode&&e!==vt()?(i=(a=e.getBoundingClientRect()).top,l=a.left,s=a.bottom,c=a.right,d=a.height,u=a.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Qe))do{if(r&&r.getBoundingClientRect&&("none"!==mt(r,"transform")||n&&"static"!==mt(r,"position"))){var f=r.getBoundingClientRect();i-=f.top+parseInt(mt(r,"border-top-width")),l-=f.left+parseInt(mt(r,"border-left-width")),s=i+a.height,c=l+a.width;break}}while(r=r.parentNode);if(o&&e!==window){var h=pt(r||e),m=h&&h.a,p=h&&h.d;h&&(s=(i/=p)+(d/=p),c=(l/=m)+(u/=m))}return{top:i,left:l,bottom:s,right:c,width:u,height:d}}}function bt(e,t,n){for(var o=_t(e,!0),r=yt(e)[t];o;){var a=yt(o)[n];if(!("top"===n||"left"===n?r>=a:r<=a))return o;if(o===vt())break;o=_t(o,!1)}return!1}function wt(e,t,n,o){for(var r=0,a=0,i=e.children;a<i.length;){if("none"!==i[a].style.display&&i[a]!==Bn.ghost&&(o||i[a]!==Bn.dragged)&&dt(i[a],n.draggable,e,!1)){if(r===t)return i[a];r++}a++}return null}function St(e,t){for(var n=e.lastElementChild;n&&(n===Bn.ghost||"none"===mt(n,"display")||t&&!st(n,t));)n=n.previousElementSibling;return n||null}function Et(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Bn.clone||t&&!st(e,t)||n++;return n}function kt(e){var t=0,n=0,o=vt();if(e)do{var r=pt(e),a=r.a,i=r.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function _t(e,t){if(!e||!e.getBoundingClientRect)return vt();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=mt(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return vt();if(o||t)return n;o=!0}}}while(n=n.parentNode);return vt()}function Ct(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Nt(e,t){return function(){if(!ut){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),ut=setTimeout(function(){ut=void 0},t)}}}function At(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Bt(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function Dt(e,t,n){var o={};return Array.from(e.children).forEach(function(r){var a,i,l,s;if(dt(r,t.draggable,e,!1)&&!r.animated&&r!==n){var c=yt(r);o.left=Math.min(null!==(a=o.left)&&void 0!==a?a:1/0,c.left),o.top=Math.min(null!==(i=o.top)&&void 0!==i?i:1/0,c.top),o.right=Math.max(null!==(l=o.right)&&void 0!==l?l:-1/0,c.right),o.bottom=Math.max(null!==(s=o.bottom)&&void 0!==s?s:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var xt="Sortable"+(new Date).getTime();var Vt=[],Tt={initializeByDefault:!0},Mt={mount:function(e){for(var t in Tt)Tt.hasOwnProperty(t)&&!(t in e)&&(e[t]=Tt[t]);Vt.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Vt.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";Vt.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](Je({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](Je({sortable:t},n)))})},initializePlugins:function(e,t,n,o){for(var r in Vt.forEach(function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var a=new o(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,Ge(n,a.defaults)}}),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return Vt.forEach(function(o){"function"==typeof o.eventProperties&&Ge(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return Vt.forEach(function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))}),o}};var Ot=["evt"],It=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,Ot);Mt.pluginEvent.bind(Bn)(e,t,Je({dragEl:Pt,parentEl:Ft,ghostEl:Lt,rootEl:Rt,nextEl:Ut,lastDownEl:Ht,cloneEl:$t,cloneHidden:qt,dragStarted:on,putSortable:Yt,activeSortable:Bn.active,originalEvent:o,oldIndex:zt,oldDraggableIndex:Wt,newIndex:Kt,newDraggableIndex:Jt,hideGhostForTarget:_n,unhideGhostForTarget:Cn,cloneNowHidden:function(){qt=!0},cloneNowShown:function(){qt=!1},dispatchSortableEvent:function(e){jt({sortable:t,name:e,originalEvent:o})}},r))};function jt(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,r=e.targetEl,a=e.cloneEl,i=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,f=e.originalEvent,h=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[xt]){var p,g=t.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Qe||et?(p=document.createEvent("Event")).initEvent(o,!0,!0):p=new CustomEvent(o,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=l||n,p.item=r||n,p.clone=a,p.oldIndex=s,p.newIndex=c,p.oldDraggableIndex=d,p.newDraggableIndex=u,p.originalEvent=f,p.pullMode=h?h.lastPutMode:void 0;var y=Je(Je({},m),Mt.getEventProperties(o,t));for(var b in y)p[b]=y[b];n&&n.dispatchEvent(p),g[v]&&g[v].call(t,p)}}(Je({putSortable:Yt,cloneEl:$t,targetEl:Pt,rootEl:Rt,oldIndex:zt,oldDraggableIndex:Wt,newIndex:Kt,newDraggableIndex:Jt},e))}var Pt,Ft,Lt,Rt,Ut,Ht,$t,qt,zt,Kt,Wt,Jt,Xt,Yt,Gt,Zt,Qt,en,tn,nn,on,rn,an,ln,sn,cn=!1,dn=!1,un=[],fn=!1,hn=!1,mn=[],pn=!1,gn=[],vn="undefined"!=typeof document,yn=ot,bn=et||Qe?"cssFloat":"float",wn=vn&&!rt&&!ot&&"draggable"in document.createElement("div"),Sn=function(){if(vn){if(Qe)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),En=function(e,t){var n=mt(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=wt(e,0,t),a=wt(e,1,t),i=r&&mt(r),l=a&&mt(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+yt(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+yt(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&i.float&&"none"!==i.float){var d="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=o&&"none"===n[bn]||a&&"none"===n[bn]&&s+c>o)?"vertical":"horizontal"},kn=function(e){function t(e,n){return function(o,r,a,i){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,a,i),n)(o,r,a,i);var s=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==Xe(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},_n=function(){!Sn&&Lt&&mt(Lt,"display","none")},Cn=function(){!Sn&&Lt&&mt(Lt,"display","")};vn&&!rt&&document.addEventListener("click",function(e){if(dn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),dn=!1,!1},!0);var Nn=function(e){if(Pt){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,a=e.clientY,un.some(function(e){var t=e[xt].options.emptyInsertThreshold;if(t&&!St(e)){var n=yt(e),o=r>=n.left-t&&r<=n.right+t,l=a>=n.top-t&&a<=n.bottom+t;return o&&l?i=e:void 0}}),i);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[xt]._onDragOver(n)}}var r,a,i},An=function(e){Pt&&Pt.parentNode[xt]._isOutsideThisEl(e.target)};function Bn(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ge({},t),e[xt]=this;var n,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return En(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bn.supportPointer&&"PointerEvent"in window&&(!nt||ot),emptyInsertThreshold:5};for(var a in Mt.initializePlugins(this,e,r),r)!(a in t)&&(t[a]=r[a]);for(var i in kn(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&wn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?it(e,"pointerdown",this._onTapStart):(it(e,"mousedown",this._onTapStart),it(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(it(e,"dragover",this),it(e,"dragenter",this)),un.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ge(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==mt(e,"display")&&e!==Bn.ghost){o.push({target:e,rect:yt(e)});var t=Je({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=pt(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}})},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var r=!1,a=0;o.forEach(function(e){var n=0,o=e.target,i=o.fromRect,l=yt(o),s=o.prevFromRect,c=o.prevToRect,d=e.rect,u=pt(o,!0);u&&(l.top-=u.f,l.left-=u.e),o.toRect=l,o.thisAnimationDuration&&Ct(s,l)&&!Ct(i,l)&&(d.top-l.top)/(d.left-l.left)===(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(d,s,c,t.options)),Ct(l,i)||(o.prevFromRect=i,o.prevToRect=l,n||(n=t.options.animation),t.animate(o,d,l,n)),n&&(r=!0,a=Math.max(a,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},n),o.thisAnimationDuration=n)}),clearTimeout(n),r?n=setTimeout(function(){"function"==typeof e&&e()},a):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){mt(e,"transition",""),mt(e,"transform","");var r=pt(this.el),a=r&&r.a,i=r&&r.d,l=(t.left-n.left)/(a||1),s=(t.top-n.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,mt(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),mt(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),mt(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){mt(e,"transition",""),mt(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}))}function Dn(e,t,n,o,r,a,i,l){var s,c,d=e[xt],u=d.options.onMove;return!window.CustomEvent||Qe||et?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=r||t,s.relatedRect=a||yt(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),u&&(c=u.call(d,s,i)),c}function xn(e){e.draggable=!1}function Vn(){pn=!1}function Tn(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Mn(e){return setTimeout(e,0)}function On(e){return clearTimeout(e)}Bn.prototype={constructor:Bn,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(rn=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Pt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){gn.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&gn.push(o)}}(n),!Pt&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!nt||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=dt(l,o.draggable,n,!1))&&l.animated||Ht===l)){if(zt=Et(l),Wt=Et(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return jt({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),It("filter",t,{evt:e}),void(r&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(o){if(o=dt(s,o.trim(),n,!1))return jt({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),It("filter",t,{evt:e}),!0})))return void(r&&e.preventDefault());o.handle&&!dt(s,o.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,a=r.el,i=r.options,l=a.ownerDocument;if(n&&!Pt&&n.parentNode===a){var s=yt(n);if(Rt=a,Ft=(Pt=n).parentNode,Ut=Pt.nextSibling,Ht=n,Xt=i.group,Bn.dragged=Pt,Gt={target:Pt,clientX:(t||e).clientX,clientY:(t||e).clientY},tn=Gt.clientX-s.left,nn=Gt.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Pt.style["will-change"]="all",o=function(){It("delayEnded",r,{evt:e}),Bn.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!tt&&r.nativeDraggable&&(Pt.draggable=!0),r._triggerDragStart(e,t),jt({sortable:r,name:"choose",originalEvent:e}),ht(Pt,i.chosenClass,!0))},i.ignore.split(",").forEach(function(e){gt(Pt,e.trim(),xn)}),it(l,"dragover",Nn),it(l,"mousemove",Nn),it(l,"touchmove",Nn),i.supportPointer?(it(l,"pointerup",r._onDrop),!this.nativeDraggable&&it(l,"pointercancel",r._onDrop)):(it(l,"mouseup",r._onDrop),it(l,"touchend",r._onDrop),it(l,"touchcancel",r._onDrop)),tt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Pt.draggable=!0),It("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(et||Qe))o();else{if(Bn.eventCanceled)return void this._onDrop();i.supportPointer?(it(l,"pointerup",r._disableDelayedDrag),it(l,"pointercancel",r._disableDelayedDrag)):(it(l,"mouseup",r._disableDelayedDrag),it(l,"touchend",r._disableDelayedDrag),it(l,"touchcancel",r._disableDelayedDrag)),it(l,"mousemove",r._delayedDragTouchMoveHandler),it(l,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&it(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Pt&&xn(Pt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;lt(e,"mouseup",this._disableDelayedDrag),lt(e,"touchend",this._disableDelayedDrag),lt(e,"touchcancel",this._disableDelayedDrag),lt(e,"pointerup",this._disableDelayedDrag),lt(e,"pointercancel",this._disableDelayedDrag),lt(e,"mousemove",this._delayedDragTouchMoveHandler),lt(e,"touchmove",this._delayedDragTouchMoveHandler),lt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?it(document,"pointermove",this._onTouchMove):it(document,t?"touchmove":"mousemove",this._onTouchMove):(it(Pt,"dragend",this),it(Rt,"dragstart",this._onDragStart));try{document.selection?Mn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(cn=!1,Rt&&Pt){It("dragStarted",this,{evt:t}),this.nativeDraggable&&it(document,"dragover",An);var n=this.options;!e&&ht(Pt,n.dragClass,!1),ht(Pt,n.ghostClass,!0),Bn.active=this,e&&this._appendGhost(),jt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Zt){this._lastX=Zt.clientX,this._lastY=Zt.clientY,_n();for(var e=document.elementFromPoint(Zt.clientX,Zt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Zt.clientX,Zt.clientY))!==t;)t=e;if(Pt.parentNode[xt]._isOutsideThisEl(e),t)do{if(t[xt]&&t[xt]._onDragOver({clientX:Zt.clientX,clientY:Zt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=ct(t));Cn()}},_onTouchMove:function(e){if(Gt){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=Lt&&pt(Lt,!0),i=Lt&&a&&a.a,l=Lt&&a&&a.d,s=yn&&sn&&kt(sn),c=(r.clientX-Gt.clientX+o.x)/(i||1)+(s?s[0]-mn[0]:0)/(i||1),d=(r.clientY-Gt.clientY+o.y)/(l||1)+(s?s[1]-mn[1]:0)/(l||1);if(!Bn.active&&!cn){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Lt){a?(a.e+=c-(Qt||0),a.f+=d-(en||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");mt(Lt,"webkitTransform",u),mt(Lt,"mozTransform",u),mt(Lt,"msTransform",u),mt(Lt,"transform",u),Qt=c,en=d,Zt=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Lt){var e=this.options.fallbackOnBody?document.body:Rt,t=yt(Pt,!0,yn,!0,e),n=this.options;if(yn){for(sn=e;"static"===mt(sn,"position")&&"none"===mt(sn,"transform")&&sn!==document;)sn=sn.parentNode;sn!==document.body&&sn!==document.documentElement?(sn===document&&(sn=vt()),t.top+=sn.scrollTop,t.left+=sn.scrollLeft):sn=vt(),mn=kt(sn)}ht(Lt=Pt.cloneNode(!0),n.ghostClass,!1),ht(Lt,n.fallbackClass,!0),ht(Lt,n.dragClass,!0),mt(Lt,"transition",""),mt(Lt,"transform",""),mt(Lt,"box-sizing","border-box"),mt(Lt,"margin",0),mt(Lt,"top",t.top),mt(Lt,"left",t.left),mt(Lt,"width",t.width),mt(Lt,"height",t.height),mt(Lt,"opacity","0.8"),mt(Lt,"position",yn?"absolute":"fixed"),mt(Lt,"zIndex","100000"),mt(Lt,"pointerEvents","none"),Bn.ghost=Lt,e.appendChild(Lt),mt(Lt,"transform-origin",tn/parseInt(Lt.style.width)*100+"% "+nn/parseInt(Lt.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;It("dragStart",this,{evt:e}),Bn.eventCanceled?this._onDrop():(It("setupClone",this),Bn.eventCanceled||(($t=Bt(Pt)).removeAttribute("id"),$t.draggable=!1,$t.style["will-change"]="",this._hideClone(),ht($t,this.options.chosenClass,!1),Bn.clone=$t),n.cloneId=Mn(function(){It("clone",n),Bn.eventCanceled||(n.options.removeCloneOnHide||Rt.insertBefore($t,Pt),n._hideClone(),jt({sortable:n,name:"clone"}))}),!t&&ht(Pt,r.dragClass,!0),t?(dn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(lt(document,"mouseup",n._onDrop),lt(document,"touchend",n._onDrop),lt(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,Pt)),it(document,"drop",n),mt(Pt,"transform","translateZ(0)")),cn=!0,n._dragStartId=Mn(n._dragStarted.bind(n,t,e)),it(document,"selectstart",n),on=!0,window.getSelection().removeAllRanges(),nt&&mt(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,r,a=this.el,i=e.target,l=this.options,s=l.group,c=Bn.active,d=Xt===s,u=l.sort,f=Yt||c,h=this,m=!1;if(!pn){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=dt(i,l.draggable,a,!0),D("dragOver"),Bn.eventCanceled)return m;if(Pt.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||h._ignoreWhileAnimating===i)return V(!1);if(dn=!1,c&&!l.disabled&&(d?u||(o=Ft!==Rt):Yt===this||(this.lastPutMode=Xt.checkPull(this,c,Pt,e))&&s.checkPut(this,c,Pt,e))){if(r="vertical"===this._getDirection(e,i),t=yt(Pt),D("dragOverValid"),Bn.eventCanceled)return m;if(o)return Ft=Rt,x(),this._hideClone(),D("revert"),Bn.eventCanceled||(Ut?Rt.insertBefore(Pt,Ut):Rt.appendChild(Pt)),V(!0);var p=St(a,l.draggable);if(!p||function(e,t,n){var o=yt(St(n.el,n.options.draggable)),r=Dt(n.el,n.options,Lt);return t?e.clientX>r.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>r.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,r,this)&&!p.animated){if(p===Pt)return V(!1);if(p&&a===e.target&&(i=p),i&&(n=yt(i)),!1!==Dn(Rt,a,Pt,t,i,n,e,!!i))return x(),p&&p.nextSibling?a.insertBefore(Pt,p.nextSibling):a.appendChild(Pt),Ft=a,T(),V(!0)}else if(p&&function(e,t,n){var o=yt(wt(n.el,0,n.options,!0)),r=Dt(n.el,n.options,Lt);return t?e.clientX<r.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<r.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,r,this)){var g=wt(a,0,l,!0);if(g===Pt)return V(!1);if(n=yt(i=g),!1!==Dn(Rt,a,Pt,t,i,n,e,!1))return x(),a.insertBefore(Pt,g),Ft=a,T(),V(!0)}else if(i.parentNode===a){n=yt(i);var v,y,b,w=Pt.parentNode!==a,S=!function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,i=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===i||r===l||o+a/2===i+s/2}(Pt.animated&&Pt.toRect||t,i.animated&&i.toRect||n,r),E=r?"top":"left",k=bt(i,"top","top")||bt(Pt,"top","top"),_=k?k.scrollTop:void 0;if(rn!==i&&(y=n[E],fn=!1,hn=!S&&l.invertSwap||w),v=function(e,t,n,o,r,a,i,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,f=!1;if(!i)if(l&&ln<c*r){if(!fn&&(1===an?s>d+c*a/2:s<u-c*a/2)&&(fn=!0),fn)f=!0;else if(1===an?s<d+ln:s>u-ln)return-an}else if(s>d+c*(1-r)/2&&s<u-c*(1-r)/2)return function(e){return Et(Pt)<Et(e)?1:-1}(t);return(f=f||i)&&(s<d+c*a/2||s>u-c*a/2)?s>d+c/2?1:-1:0}(e,i,n,r,S?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,hn,rn===i),0!==v){var C=Et(Pt);do{C-=v,b=Ft.children[C]}while(b&&("none"===mt(b,"display")||b===Lt))}if(0===v||b===i)return V(!1);rn=i,an=v;var N=i.nextElementSibling,A=!1,B=Dn(Rt,a,Pt,t,i,n,e,A=1===v);if(!1!==B)return 1!==B&&-1!==B||(A=1===B),pn=!0,setTimeout(Vn,30),x(),A&&!N?a.appendChild(Pt):i.parentNode.insertBefore(Pt,A?N:i),k&&At(k,0,_-k.scrollTop),Ft=Pt.parentNode,void 0===y||hn||(ln=Math.abs(y-yt(i)[E])),T(),V(!0)}if(a.contains(Pt))return V(!1)}return!1}function D(l,s){It(l,h,Je({evt:e,isOwner:d,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:u,fromSortable:f,target:i,completed:V,onMove:function(n,o){return Dn(Rt,a,Pt,t,n,yt(n),e,o)},changed:T},s))}function x(){D("dragOverAnimationCapture"),h.captureAnimationState(),h!==f&&f.captureAnimationState()}function V(t){return D("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(h),h!==f&&(ht(Pt,Yt?Yt.options.ghostClass:c.options.ghostClass,!1),ht(Pt,l.ghostClass,!0)),Yt!==h&&h!==Bn.active?Yt=h:h===Bn.active&&Yt&&(Yt=null),f===h&&(h._ignoreWhileAnimating=i),h.animateAll(function(){D("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(i===Pt&&!Pt.animated||i===a&&!i.animated)&&(rn=null),l.dragoverBubble||e.rootEl||i===document||(Pt.parentNode[xt]._isOutsideThisEl(e.target),!t&&Nn(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function T(){Kt=Et(Pt),Jt=Et(Pt,l.draggable),jt({sortable:h,name:"change",toEl:a,newIndex:Kt,newDraggableIndex:Jt,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){lt(document,"mousemove",this._onTouchMove),lt(document,"touchmove",this._onTouchMove),lt(document,"pointermove",this._onTouchMove),lt(document,"dragover",Nn),lt(document,"mousemove",Nn),lt(document,"touchmove",Nn)},_offUpEvents:function(){var e=this.el.ownerDocument;lt(e,"mouseup",this._onDrop),lt(e,"touchend",this._onDrop),lt(e,"pointerup",this._onDrop),lt(e,"pointercancel",this._onDrop),lt(e,"touchcancel",this._onDrop),lt(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Kt=Et(Pt),Jt=Et(Pt,n.draggable),It("drop",this,{evt:e}),Ft=Pt&&Pt.parentNode,Kt=Et(Pt),Jt=Et(Pt,n.draggable),Bn.eventCanceled||(cn=!1,hn=!1,fn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),On(this.cloneId),On(this._dragStartId),this.nativeDraggable&&(lt(document,"drop",this),lt(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),nt&&mt(document.body,"user-select",""),mt(Pt,"transform",""),e&&(on&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Lt&&Lt.parentNode&&Lt.parentNode.removeChild(Lt),(Rt===Ft||Yt&&"clone"!==Yt.lastPutMode)&&$t&&$t.parentNode&&$t.parentNode.removeChild($t),Pt&&(this.nativeDraggable&<(Pt,"dragend",this),xn(Pt),Pt.style["will-change"]="",on&&!cn&&ht(Pt,Yt?Yt.options.ghostClass:this.options.ghostClass,!1),ht(Pt,this.options.chosenClass,!1),jt({sortable:this,name:"unchoose",toEl:Ft,newIndex:null,newDraggableIndex:null,originalEvent:e}),Rt!==Ft?(Kt>=0&&(jt({rootEl:Ft,name:"add",toEl:Ft,fromEl:Rt,originalEvent:e}),jt({sortable:this,name:"remove",toEl:Ft,originalEvent:e}),jt({rootEl:Ft,name:"sort",toEl:Ft,fromEl:Rt,originalEvent:e}),jt({sortable:this,name:"sort",toEl:Ft,originalEvent:e})),Yt&&Yt.save()):Kt!==zt&&Kt>=0&&(jt({sortable:this,name:"update",toEl:Ft,originalEvent:e}),jt({sortable:this,name:"sort",toEl:Ft,originalEvent:e})),Bn.active&&(null!=Kt&&-1!==Kt||(Kt=zt,Jt=Wt),jt({sortable:this,name:"end",toEl:Ft,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){It("nulling",this),Rt=Pt=Ft=Lt=Ut=$t=Ht=qt=Gt=Zt=on=Kt=Jt=zt=Wt=rn=an=Yt=Xt=Bn.dragged=Bn.ghost=Bn.clone=Bn.active=null,gn.forEach(function(e){e.checked=!0}),gn.length=Qt=en=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Pt&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)dt(e=n[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Tn(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(e,t){var r=o.children[t];dt(r,this.options.draggable,o,!1)&&(n[e]=r)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return dt(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Mt.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&kn(n)},destroy:function(){It("destroy",this);var e=this.el;e[xt]=null,lt(e,"mousedown",this._onTapStart),lt(e,"touchstart",this._onTapStart),lt(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(lt(e,"dragover",this),lt(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),un.splice(un.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!qt){if(It("hideClone",this),Bn.eventCanceled)return;mt($t,"display","none"),this.options.removeCloneOnHide&&$t.parentNode&&$t.parentNode.removeChild($t),qt=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(qt){if(It("showClone",this),Bn.eventCanceled)return;Pt.parentNode!=Rt||this.options.group.revertClone?Ut?Rt.insertBefore($t,Ut):Rt.appendChild($t):Rt.insertBefore($t,Pt),this.options.group.revertClone&&this.animate(Pt,$t),mt($t,"display",""),qt=!1}}else this._hideClone()}},vn&&it(document,"touchmove",function(e){(Bn.active||cn)&&e.cancelable&&e.preventDefault()}),Bn.utils={on:it,off:lt,css:mt,find:gt,is:function(e,t){return!!dt(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:Nt,closest:dt,toggleClass:ht,clone:Bt,index:Et,nextTick:Mn,cancelNextTick:On,detectDirection:En,getChild:wt,expando:xt},Bn.get=function(e){return e[xt]},Bn.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Bn.utils=Je(Je({},Bn.utils),e.utils)),Mt.mount(e)})},Bn.create=function(e,t){return new Bn(e,t)},Bn.version="1.15.6";var In,jn,Pn,Fn,Ln,Rn,Un=[],Hn=!1;function $n(){Un.forEach(function(e){clearInterval(e.pid)}),Un=[]}function qn(){clearInterval(Rn)}var zn=Nt(function(e,t,n,o){if(t.scroll){var r,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=vt(),d=!1;jn!==n&&(jn=n,$n(),In=t.scroll,r=t.scrollFn,!0===In&&(In=_t(n,!0)));var u=0,f=In;do{var h=f,m=yt(h),p=m.top,g=m.bottom,v=m.left,y=m.right,b=m.width,w=m.height,S=void 0,E=void 0,k=h.scrollWidth,_=h.scrollHeight,C=mt(h),N=h.scrollLeft,A=h.scrollTop;h===c?(S=b<k&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),E=w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(S=b<k&&("auto"===C.overflowX||"scroll"===C.overflowX),E=w<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var B=S&&(Math.abs(y-a)<=l&&N+b<k)-(Math.abs(v-a)<=l&&!!N),D=E&&(Math.abs(g-i)<=l&&A+w<_)-(Math.abs(p-i)<=l&&!!A);if(!Un[u])for(var x=0;x<=u;x++)Un[x]||(Un[x]={});Un[u].vx==B&&Un[u].vy==D&&Un[u].el===h||(Un[u].el=h,Un[u].vx=B,Un[u].vy=D,clearInterval(Un[u].pid),0==B&&0==D||(d=!0,Un[u].pid=setInterval(function(){o&&0===this.layer&&Bn.active._onTouchMove(Ln);var t=Un[this.layer].vy?Un[this.layer].vy*s:0,n=Un[this.layer].vx?Un[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(Bn.dragged.parentNode[xt],n,t,e,Ln,Un[this.layer].el)||At(Un[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&f!==c&&(f=_t(f,!1)));Hn=d}},30),Kn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||r;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(a("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Wn(){}function Jn(){}Wn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=wt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Kn},Ge(Wn,{pluginName:"revertOnSpill"}),Jn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Kn},Ge(Jn,{pluginName:"removeOnSpill"}),Bn.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?it(document,"dragover",this._handleAutoScroll):this.options.supportPointer?it(document,"pointermove",this._handleFallbackAutoScroll):t.touches?it(document,"touchmove",this._handleFallbackAutoScroll):it(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?lt(document,"dragover",this._handleAutoScroll):(lt(document,"pointermove",this._handleFallbackAutoScroll),lt(document,"touchmove",this._handleFallbackAutoScroll),lt(document,"mousemove",this._handleFallbackAutoScroll)),qn(),$n(),clearTimeout(ut),ut=void 0},nulling:function(){Ln=jn=In=Hn=Rn=Pn=Fn=null,Un.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,r);if(Ln=e,t||this.options.forceAutoScrollFallback||et||Qe||nt){zn(e,this.options,a,t);var i=_t(a,!0);!Hn||Rn&&o===Pn&&r===Fn||(Rn&&qn(),Rn=setInterval(function(){var a=_t(document.elementFromPoint(o,r),!0);a!==i&&(i=a,$n()),zn(e,n.options,a,t)},10),Pn=o,Fn=r)}else{if(!this.options.bubbleScroll||_t(a,!0)===vt())return void $n();zn(e,this.options,_t(a,!1),!1)}}},Ge(e,{pluginName:"scroll",initializeByDefault:!0})}),Bn.mount(Jn,Wn);const Xn=Bn,Yn={mounted:function(){this.init()},props:["dataSiteId","dataSitePlatforms","dataSiteCategories","dataSiteThemes","dataSiteMicrosites","dataPlatformId","dataMicrositeId","dataCategories","dataUserRights"],data:function(){return{checkAll:!1,showCheckbox:!1,sitePlatforms:void 0===this.dataSitePlatforms||""===this.dataSitePlatforms?[]:JSON.parse(this.dataSitePlatforms),siteCategories:void 0===this.dataSiteCategories||""===this.dataSiteCategories?[]:JSON.parse(this.dataSiteCategories),siteThemes:void 0===this.dataSiteThemes||""===this.dataSiteThemes?[]:JSON.parse(this.dataSiteThemes),siteMicrosites:void 0===this.dataSiteMicrosites||""===this.dataSiteMicrosites?[]:JSON.parse(this.dataSiteMicrosites),categories:void 0===this.dataCategories||""===this.dataCategories?[]:JSON.parse(this.dataCategories),platformId:void 0===this.dataPlatformId||""===this.dataPlatformId?1:parseInt(this.dataPlatformId),micrositeId:void 0===this.dataMicrositeId||""===this.dataMicrositeId?0:parseInt(this.dataMicrositeId),searchKeyPlatformCategory:"",searchKeyCategory:"",applicableForAllPlatforms:!1,categoryId:0,currentSelection:{category_id:0,theme_id:"",cache_category:""},allCategories:[],allCategoriesInfo:{},allSiteCategories:[],siteId:void 0===this.dataSiteId?1:parseInt(this.dataSiteId),showUpdateAllBtn:!0,showUpdateAllDiv:!1,globalTheme:"",userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[]}},computed:{hasPlatformsMoreThanOne:function(){return this.sitePlatforms.length>1},hasMicrosites:function(){return this.siteMicrosites.length>0},canEdit:function(){return this.userRights.indexOf("edit")>=0},canDelete:function(){return this.userRights.indexOf("delete")>=0}},methods:{init:function(){this.makeData(),this.canEdit&&this.enableSorting()},selectAllData:function(){var e=arguments.length>1?arguments[1]:void 0,t=this,n="allCategories"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories")?this.allCategories:this.allSiteCategories,o=e.checked;n.forEach(function(e){t.$set(e,"selected",o)})},makeData:function(){var e=this,t=this.categories,n=!1;t.length>0&&t.forEach(function(t){var o=t.category_id,r={category_id:o,category_name:t.lang.name||t.category_name,theme_id:t.theme_id,cache_category:t.cache_category,selected:n};e.allCategories.push(r),e.allCategoriesInfo[o.toString()]=r}),(t=this.siteCategories).length>0&&t.forEach(function(t){var o={category_id:t.category_id,category_name:t.name,theme_id:"",cache_category:"",selected:n};e.allSiteCategories.push(o)})},getWhere:function(){return{microsite_id:this.micrositeId,platform_id:this.platformId,category_id:this.categoryId,site_id:this.siteId}},saveNow:function(e,t){return new Promise(function(n,o){axios.post(e,t).then(function(e){n(e)}).catch(function(e){o(e.response)})})},updateIndex:function(){for(var e=this,t=document.querySelectorAll(".js_category li"),n=this.platformId,o=[],r=0;r<t.length;r++){var a=t[r],i={position:r+1},l={category_id:this.getCategoryInfo(a.getAttribute("data-category-id"),"allCategories").category_id,platform_id:n};o.push({where:l,data:i})}if(o.length>0){var s=v.admin_path("category/updateIndex"),c={};c.data=o,this.saveNow(s,c).then(function(t){J.show(e,"Saved...")}).catch(function(t){J.show(e,t.data.message,2e3)})}},showSearch:function(){return("allCategories"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories")?this.allCategories:this.allSiteCategories).length>10},filterData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories",t="allCategories"===e?this.searchKeyPlatformCategory:this.searchKeyCategory,n="allCategories"===e?this.allCategories:this.allSiteCategories;return""!==t&&null!=t?(t=t.toLowerCase(),n.filter(function(e){var n=e.category_name.toLowerCase();if(e.category_id.toString()===t.toString()||n.includes(t))return e})):"allCategories"===e?this.allCategories:this.allSiteCategories},setCurrentSelection:function(e){var t=e.currentTarget,n=e.target,o=t.getAttribute("data-category-id"),r=t.getAttribute("data-theme-id"),a=this.getCategoryInfo(o,"allCategories");this.currentSelection.theme_id=r,this.currentSelection.category_id=o,this.currentSelection.cache_category=a.cache_category,n.classList.contains("js_info")&&function(e,t){var n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"center-right";(n=t.classList).remove.apply(n,["animated","fadeOut","hide"]);var a=t,i=e.getBoundingClientRect(),l=a.getBoundingClientRect(),s=i.left+i.width,c=i.top+i.height-l.height/2;"center-right"===((o=t.classList).add.apply(o,["animated","jello"]),r)&&(a.style.position="absolute",a.style.left=s+"px",a.style.top=c+"px")}(t,this.$refs.popover),n.classList.contains("js_delete")},closePopup:function(){var e;(e=this.$refs.popover.classList).add.apply(e,["animated","fadeOut","hide"]),setTimeout(function(){})},fetchNewData:function(){var e=this.getWhere();delete e.category_id,0===e.microsite_id&&delete e.microsite_id,window.location.href=v.admin_path("category/settings",e)},enableSorting:function(){var e=this;this.$nextTick(function(){document.querySelectorAll(".js_category").forEach(function(t){Xn.create(t,{animation:200,filter:".js_delete",group:{name:"droppable",put:"modulesBox"},onFilter:function(t){var n=t.item,o=t.target,r=n.getAttribute("data-category-id");Xn.utils.is(o,".js_delete")&&e.removeCategory(r)},onUpdate:function(t){e.updateIndex()}})})});var t=document.getElementById("draggableItems");Xn.create(t,{animation:200,draggable:".js_item",group:{name:"modulesBox",pull:"clone",revertClone:!0},sort:!1,ghostClass:".js_category",onEnd:function(t){t.to;var n=t.item,o=n.getAttribute("data-category-id");if(o){var r,a=e.getCategoryInfo(o,"allSiteCategories");null!==a&&(r=e.addCategory(a)),n.parentNode.removeChild(n),e.highlightEagerDrop("remove"),!1===r&&J.show(e,"Category is already added in this platform...")}},onStart:function(t){e.highlightEagerDrop("add")}})},highlightEagerDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";document.querySelectorAll(".js_category").forEach(function(t){t.classList[e]("module-drop-eager")})},getCategoryInfo:function(e){for(var t=null,n="allSiteCategories"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"allSiteCategories")?this.allSiteCategories:this.allCategories,o=0;o<n.length;o++){var r=n[o];if(parseInt(r.category_id)===parseInt(e)){t=r;break}}return t},findIndex:function(e){var t=-1,n="allCategories"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"allCategories")?this.allCategories:this.allSiteCategories;if(n.length>0)for(var o=0;o<n.length;o++){var r=n[o];if(parseInt(r.category_id)===parseInt(e)){t=o;break}}return t},addCategory:function(e){var t=this,n=this.findIndex(e.category_id),o=!1;return-1===n&&(this.allCategoriesInfo[e.category_id.toString()]={index:n,info:e},setTimeout(function(){var n,o,r;n=v.admin_path("category/insertCategory"),o=t.getWhere(),r={},delete e.name,e.platform_id=o.platform_id,r.data={category_id:e.category_id,platform_id:o.platform_id,site_id:o.site_id},r.applicableForAllPlatforms=t.applicableForAllPlatforms,t.saveNow(n,r).then(function(e){J.show(t,"Saved...")}).catch(function(e){J.show(t,e.data.message,2e3)})},1),o=this.allCategories.push(e)),o},setThemeEtc:function(){var e=this,t=this.currentSelection,n=this.findIndex(t.category_id);if(-1!==n){this.allCategories[n].theme_id=t.theme_id,this.allCategories[n].cache_category=t.cache_category,this.categoryId=parseInt(t.category_id);var o={};o.where=this.getWhere(),o.data={cache_category:t.cache_category||"",theme_id:t.theme_id},o.applicableForAllPlatforms=e.applicableForAllPlatforms;var r=v.admin_path("category/updateThemeAndEtc");this.saveNow(r,o).then(function(t){J.show(e,"Saved...")}).catch(function(t){J.show(e,t.data.message,2e3)})}this.closePopup()},removeCategory:function(e){var t=this,n=this.findIndex(e);if(-1!==n){var o=this.allCategories.splice(n,1);return function(e){var n=v.admin_path("category/deleteCategory"),o={},r=t.getWhere();o.where={category_id:e.category_id,microsite_id:r.microsite_id},t.applicableForAllPlatforms||(o.where.platform_id=r.platform_id),t.saveNow(n,o).then(function(e){J.show(t,"Saved...")}).catch(function(e){J.show(t,e.data.message,2e3)})}(o[0]),o}},getThemeName:function(e){for(var t=0;t<this.siteThemes.length;t++)if(this.siteThemes[t].id==e)return this.siteThemes[t].name;return""},updateThemeToAllCategories:function(){var e=this,t=v.admin_path("category/updateThemeForAllCategories"),n=this.filterData("allCategories");if(""!==this.globalTheme&&n.length>0){var o=this.getWhere();delete o.category_id,delete o.microsite_id;var r={data:{theme_id:this.globalTheme},where:o};J.show(e,"Please wait..."),this.saveNow(t,r).then(function(t){if(t.data.error)J.show(e,t.data.message,5e3);else{J.show(e,"Saved");for(var o=0;o<n.length;o++)n[o].theme_id=e.globalTheme}}).catch(function(t){J.show(e,t.data.message,2e3)})}}}},Gn=(0,S.A)(Yn,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("div",fe,[(0,t.withDirectives)((0,t.createElementVNode)("div",he,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.micrositeId=e}),class:"form-select select",onChange:n[1]||(n[1]=function(e){return i.fetchNewData()})},[n[16]||(n[16]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteMicrosites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,me)}),256))],544),[[t.vModelSelect,a.micrositeId]])],512),[[t.vShow,i.hasMicrosites]]),(0,t.createElementVNode)("div",pe,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.platformId=e}),class:"form-select select",onChange:n[3]||(n[3]=function(e){return i.fetchNewData()})},[n[17]||(n[17]=(0,t.createElementVNode)("option",null,"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sitePlatforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ge)}),256))],544),[[t.vShow,i.hasPlatformsMoreThanOne],[t.vModelSelect,a.platformId]])]),(0,t.createElementVNode)("div",ve,[(0,t.withDirectives)((0,t.createElementVNode)("label",ye,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return a.applicableForAllPlatforms=e}),name:"applicableForAll",type:"checkbox"},null,512),[[t.vModelCheckbox,a.applicableForAllPlatforms]]),n[18]||(n[18]=(0,t.createTextVNode)(" Enable add/delete for all platforms",-1))],512),[[t.vShow,i.hasPlatformsMoreThanOne]])])],512),[[t.vShow,i.hasMicrosites||i.hasPlatformsMoreThanOne||i.hasPlatformsMoreThanOne]]),i.canEdit?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",be,de(n[19]||(n[19]=[(0,t.createElementVNode)("div",{class:"col-auto"},[(0,t.createElementVNode)("p",{class:"alert alert-warning"},"You have read only access.")],-1)])))),(0,t.createElementVNode)("div",we,[(0,t.createElementVNode)("div",Se,[(0,t.createElementVNode)("div",Ee,[(0,t.createElementVNode)("div",ke,[(0,t.createElementVNode)("input",{class:"hide",type:"checkbox",onClick:n[5]||(n[5]=function(e){return i.selectAllData("allCategories",e.target)})}),n[21]||(n[21]=(0,t.createTextVNode)(" Drop in below panel to enable the category for this site. ",-1)),a.showUpdateAllBtn?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"More Info",class:"btn btn-default js_info icon-btn pull-right",style:{top:"-7px",position:"relative",right:"-9px"},title:"Update in all categories",type:"button",onClick:n[6]||(n[6]=function(e){return a.showUpdateAllDiv=!a.showUpdateAllDiv})},de(n[20]||(n[20]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-ellipsis-v js_info"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0)]),a.showUpdateAllDiv?((0,t.openBlock)(),(0,t.createElementBlock)("div",_e,[n[23]||(n[23]=(0,t.createElementVNode)("p",{class:"text-danger"}," Be careful while using this. Changing this dropdown will effect to all categories. ",-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return a.globalTheme=e}),class:"form-select margin-bottom-05",onChange:n[8]||(n[8]=function(e){return i.updateThemeToAllCategories()})},[n[22]||(n[22]=(0,t.createElementVNode)("option",{value:""},"Select a Theme",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteThemes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Ce)}),256))],544),[[t.vModelSelect,a.globalTheme]])])):(0,t.createCommentVNode)("v-if",!0),i.showSearch("allCategories")?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ne,[(0,t.createElementVNode)("div",Ae,[n[24]||(n[24]=(0,t.createElementVNode)("span",{class:"input-group-addon"},"Search",-1)),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[9]||(n[9]=function(e){return a.searchKeyPlatformCategory=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id or name",type:"text"},null,512),[[t.vModelText,a.searchKeyPlatformCategory]])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",Be,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterData("allCategories"),function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-cache-category":e.cache_category,"data-category-id":e.category_id,"data-theme-id":e.theme_id,class:"list-group-item js_item",onClick:n[10]||(n[10]=function(e){return i.setCurrentSelection(e)})},[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":function(t){return e.selected=t},type:"checkbox"},null,8,xe),[[t.vShow,a.showCheckbox],[t.vModelCheckbox,e.selected]]),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(e.category_name)+" ",1),(0,t.withDirectives)((0,t.createElementVNode)("small",{class:"text-info",title:"Theme"}," - "+(0,t.toDisplayString)(i.getThemeName(e.theme_id)),513),[[t.vShow,e.theme_id>0]]),(0,t.withDirectives)((0,t.createElementVNode)("small",Ve,de(n[25]||(n[25]=[(0,t.createElementVNode)("br",null,null,-1),(0,t.createTextVNode)("Theme is missing",-1)])),512),[[t.vShow,e.theme_id<=0]]),(0,t.createElementVNode)("span",Te,[(0,t.createElementVNode)("span",Me,[i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("button",Oe,de(n[26]||(n[26]=[(0,t.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-trash-o js_delete"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0),i.canEdit?((0,t.openBlock)(),(0,t.createElementBlock)("button",Ie,de(n[27]||(n[27]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-ellipsis-v js_info"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0)])])],8,De)}),256))],512)])]),(0,t.createElementVNode)("div",je,[(0,t.createElementVNode)("div",Pe,[n[29]||(n[29]=(0,t.createElementVNode)("div",{class:"panel-heading p-4"},"Drag and drop from here",-1)),i.showSearch("allSiteCategories")?((0,t.openBlock)(),(0,t.createElementBlock)("div",Fe,[(0,t.createElementVNode)("div",Le,[n[28]||(n[28]=(0,t.createElementVNode)("span",{class:"input-group-addon"},"Search",-1)),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return a.searchKeyCategory=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id or name",type:"text"},null,512),[[t.vModelText,a.searchKeyCategory]])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",Re,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterData("allSiteCategories"),function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-category-id":e.category_id,class:"list-group-item js_item"},(0,t.toDisplayString)(e.category_name),9,Ue)}),256))])])])]),(0,t.createElementVNode)("div",He,[(0,t.createElementVNode)("p",$e,[n[30]||(n[30]=(0,t.createTextVNode)(" Set theme etc for this category ",-1)),(0,t.createElementVNode)("span",{"aria-label":"Close",class:"pull-right fa fa-close close",title:"Close",onClick:n[12]||(n[12]=function(e){return i.closePopup()})})]),(0,t.createElementVNode)("div",qe,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return a.currentSelection.theme_id=e}),class:"form-select mb-2"},[n[31]||(n[31]=(0,t.createElementVNode)("option",{value:""},"Select a Theme",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteThemes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ze)}),256))],512),[[t.vModelSelect,a.currentSelection.theme_id]]),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[14]||(n[14]=function(e){return a.currentSelection.cache_category=e}),class:"form-control mb-2",name:"cache_category",placeholder:"Enter cache category",type:"text"},null,512),[[t.vModelText,a.currentSelection.cache_category]]),(0,t.createElementVNode)("div",Ke,[(0,t.createElementVNode)("button",{class:"btn btn-primary text-center",onClick:n[15]||(n[15]=function(e){return i.setThemeEtc()})}," Save Settings ")])])],512)])}]]),Zn={mounted:function(){},props:["dataControllerName"],methods:{downloadNow:function(){window.location.href=v.admin_path(this.dataControllerName+"/download")}}},Qn=(0,S.A)(Zn,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("button",{onClick:n[0]||(n[0]=function(e){return i.downloadNow()}),type:"button",class:"btn btn-dark"},[(0,t.renderSlot)(e.$slots,"default",{},function(){return[n[1]||(n[1]=(0,t.createTextVNode)("Download",-1))]})])}]]);var eo={ref:"uploaderForm",name:"uploaderForm",enctype:"multipart/form-data"},to={class:"row"},no={class:"col-5"},oo=["accept"],ro={key:0,class:"alert alert-danger mt-1"},ao={class:"col-5"},io={key:0,class:"alert alert-danger mt-1"},lo={class:"col-2"},so={key:0,class:"row"},co={class:"progress p-0"},uo=["aria-valuenow"],fo={key:1,class:"row"},ho={class:"col"};const mo={mounted:function(){},props:["dataTitle","dataAccept"],data:function(){return{title:this.dataTitle,form:{tags:"",files:""},isUploading:!1,errors:{files:!1,tags:!1},percent:0,message:"",msgType:"alert-success",acceptFileType:void 0!==this.dataAccept?this.dataAccept:"image/*"}},methods:{goBack:function(){window.location.href=this.backUrl},checkErrors:function(){this.errors.files=!1,this.errors.tags=!1},resetForm:function(){this.form.tags="",this.form.files="",this.errors.tags=!1,this.errors.files=!1,this.percent=0,this.$refs.uploaderForm.reset()},showMsg:function(e,t){var n=this;this.message=e,t?this.msgType="alert-danger":(this.msgType="alert-success",setTimeout(function(){n.message=""},2e3))},uploadNow:function(){var e,t,n=this,o=v.admin_path("gallery/uploadFiles");this.message="";var r=this.$refs.allFilesC.files,a=!1;if(0===r.length&&(a=this.errors.files=!0),""===this.form.tags&&(a=this.errors.tags=!0),a)return!1;this.isUploading=!0;for(var i=new FormData,l=0;l<r.length;l++)i.append("images[]",r[l]);i.append("tags",this.form.tags),i.append("groupName","content"),i.append("mediaType",this.acceptFileType.replace(/[^a-zA-Z,]/g,"")),i.append("_csrf",(null===(e=window.HashtagCms)||void 0===e?void 0:e.csrfToken)||(null===(t=window.Laravel)||void 0===t?void 0:t.csrfToken)),axios.post(o,i,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(e){!function(e){n.percent=Math.round(100*e.progress)}(e)}}).then(function(e){!function(e){H.emit("gallery-image-uploaded",e.data),n.resetForm(),n.showMsg(e.data.message,!1)}(e)}).catch(function(e){!function(e){var t;n.showMsg((null===(t=e.response)||void 0===t?void 0:t.statusText)||e.message||"There is some error while uploading. Please try again.",!0),n.resetForm()}(e)}).finally(function(){n.isUploading=!1})}}},po=(0,S.A)(mo,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("form",eo,[(0,t.withDirectives)((0,t.createElementVNode)("div",to,[(0,t.createElementVNode)("div",no,[(0,t.createElementVNode)("input",{type:"file",ref:"allFilesC",name:"msFiles__[]",multiple:"",class:"form-control",required:"",onChange:n[0]||(n[0]=function(){return i.checkErrors&&i.checkErrors.apply(i,arguments)}),accept:a.acceptFileType},null,40,oo),a.errors.files?((0,t.openBlock)(),(0,t.createElementBlock)("div",ro," Please select at least one file. ")):(0,t.createCommentVNode)("v-if",!0)]),(0,t.createElementVNode)("div",ao,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"text",name:"msTags__",id:"msTags__",required:"","onUpdate:modelValue":n[1]||(n[1]=function(e){return a.form.tags=e}),class:"form-control",placeholder:"Please enter keyword to search later. User comma for multiple keywords",onChange:n[2]||(n[2]=function(){return i.checkErrors&&i.checkErrors.apply(i,arguments)})},null,544),[[t.vModelText,a.form.tags]]),a.errors.tags?((0,t.openBlock)(),(0,t.createElementBlock)("div",io," Please enter keywords to search later. ")):(0,t.createCommentVNode)("v-if",!0)]),(0,t.createElementVNode)("div",lo,[(0,t.createElementVNode)("input",{type:"button",value:"Upload",class:"btn btn-primary",onClick:n[3]||(n[3]=function(){return i.uploadNow&&i.uploadNow.apply(i,arguments)})})])],512),[[t.vShow,!a.isUploading]])],512),a.isUploading?((0,t.openBlock)(),(0,t.createElementBlock)("div",so,[(0,t.createElementVNode)("div",co,[(0,t.createElementVNode)("div",{class:"progress-bar progress-bar-striped bg-success",role:"progressbar",style:(0,t.normalizeStyle)("width:"+a.percent+"%"),"aria-valuenow":a.percent,"aria-valuemin":"0","aria-valuemax":"100"},(0,t.toDisplayString)(a.percent)+"% ",13,uo)])])):(0,t.createCommentVNode)("v-if",!0),""!==a.message?((0,t.openBlock)(),(0,t.createElementBlock)("div",fo,[(0,t.createElementVNode)("div",ho,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)("alert m-1 "+a.msgType)},(0,t.toDisplayString)(a.message),3)])])):(0,t.createCommentVNode)("v-if",!0)],64)}]]);var go=["action"],vo={class:"form-group row mb-3"},yo={class:"col-sm-7"},bo={class:"text text-danger"},wo={class:"form-group row mb-3"},So={class:"col-sm-7"},Eo={class:"text text-danger"},ko={class:"form-group row mb-3"},_o={class:"col-sm-7"},Co={class:"text text-danger"},No={class:"form-group row mb-3"},Ao={class:"col-sm-7"},Bo={class:"text text-danger"},Do={class:"form-group row mb-3"},xo={class:"col-sm-7"},Vo={class:"form-group row mb-3"},To={class:"col-sm-7"},Mo=["value"],Oo={class:"text text-danger"},Io=["innerHTML"],jo={class:"form-group row mb-3"},Po={class:"col-sm-7"},Fo={class:"form-group row mb-3"},Lo={class:"col-sm-7"},Ro=["value"],Uo={class:"text text-danger"},Ho={class:"form-group row mb-3"},$o={class:"col-sm-7"},qo={class:"text text-danger"},zo={class:"form-group row mb-3"},Ko={class:"col-sm-7"},Wo={class:"text text-danger"},Jo={class:"form-group row mb-3"},Xo={class:"col-sm-7"},Yo={class:"form-group row mb-3"},Go={class:"col-sm-7"},Zo={class:"form-group row mb-3"},Qo={class:"col-sm-7"},er={class:"form-group row mb-3"},tr={class:"col-sm-7"},nr={class:"form-group row mb-3"},or={class:"col-sm-7"},rr={class:"form-group row mb-3"},ar={class:"col-sm-7"},ir={class:"form-group row mb-3"},lr={class:"border"},sr={class:"form-group"},cr={class:"col-sm-7"},dr={class:"form-group row mb-3"},ur={class:"col-sm-7"},fr=["value"],hr={class:"text text-danger"},mr={class:"form-group row mb-3"},pr={class:"col-sm-7"},gr={class:"form-group row mb-3"},vr={class:"col-sm-7"},yr={class:"row mb-3"},br={class:"form-group center-align"},wr=["href"];const Sr=g.Form,Er={mounted:function(){"edit"===this.dataActionPerformed?this.setFormData(this.formData):this.form.site_id=this.dataSiteId},props:["dataControllerName","dataBackUrl","dataSite","dataResults","dataActionPerformed","dataDataTypes","dataDataTypesInfo","dataFormAction","dataSiteId"],data:function(){return{sFont:{"font-size":"14px"},fluidCol:{width:"100%"},allQueryDataTypes:[{name:"param",value:"param"},{name:"data",value:"data"}],conventional:!1,formData:void 0!==this.dataResults?JSON.parse(this.dataResults):[],siteData:void 0!==this.dataSite?JSON.parse(this.dataSite):[],showExtraData:{},allDataTypes:void 0!==this.dataDataTypes?JSON.parse(this.dataDataTypes):[],allMethodTypes:[{name:"GET",value:"GET"},{name:"POST",value:"POST"}],form:new Sr({id:0,name:"",icon_css:"",alias:"",view_name:"",cache_group:"",data_type:"",method_type:"",data_handler:"",data_key_map:"",query_statement:"",query_as:"",description:"",site_id:1,is_seo_module:0,individual_cache:0,shared:0,update_inAllSites:0,is_mandatory:0,service_params:"",actionPerformed:this.dataActionPerformed,backURL:this.dataBackUrl,headers:"",live_edit:0,linked_module:""}),errors:{},cacheData:{},sortable:null,sortingInterval:-1,errorMessage:"",dataTypesInfo:void 0!==this.dataDataTypesInfo?JSON.parse(this.dataDataTypesInfo):[],saveURL:this.dataFormAction}},computed:{showQueryForm:function(){return this.form.data_type.toLowerCase().indexOf("queryservice")>-1},showServiceForm:function(){return this.form.data_type.toLowerCase().indexOf("service")>-1},showAllUpdateSection:function(){return"edit"===this.dataActionPerformed&&this.siteData.length>1}},methods:{fillCopiedData:function(){var e=this;(0,g.PasteFromClipboard)().then(function(t){(0,g.IsJson)(e.form.name)&&e.setFormData(JSON.parse(e.form.name))}).catch(function(e){console.log("unable to paste")})},goConventional:function(e){if(!1===this.conventional){var t=this.form.name;this.form.title=t,this.form.alias=("MODULE_"+t.toUpperCase()).replace(/\s/g,"_"),this.form.view_name=t.toLowerCase().replace(/\s/g,"-")}},setFormData:function(e){Object.keys(e).length;var t=document.querySelector("#addEditFrm");for(var n in e){var o=e[n];void 0!==this.form[n]&&"function"!=typeof this.form[n]&&(this.form[n]=o);var r=t[n]||document.getElementById(n);if(r){var a=r.type;"checkbox"!==a&&"radio"!==a||"submit"===a||(this.form[n]=1===o)}}},checkForService:function(e){this.showExtraData.show=""!==e&&(e.indexOf("Service")>-1||e.indexOf("service")>-1)},createModule:function(){var e=this,t=this;t.form.is_seo_module=t.form.is_seo_module?t.form.is_seo_module:0,t.form.individual_cache=t.form.individual_cache?t.form.individual_cache:0,t.form.update_inAllSites=t.form.update_inAllSites?t.form.update_inAllSites:0,t.form.is_mandatory=t.form.is_mandatory?t.form.is_mandatory:0,t.form.service_params=t.form.service_params?t.form.service_params:"",t.form.shared=t.form.shared?t.form.shared:0,t.form.live_edit=t.form.live_edit?t.form.live_edit:0,this.form.post(this.saveURL).then(function(t){e.resetForm(t)}).catch(function(t){e.showError(t)})},showError:function(e){for(var t in e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},resetForm:function(e){function t(e){return"true"===e.toString()||"1"===e.toString()}t(e.isSaved)?(this.errorMessage="",this.dataActionPerformed.toUpperCase(),J.show(this,"Saved..."),t(e.isSaved)&&(window.location.href=e.backURL)):(this.errorMessage={},J.show(this,"There is some error..."),this.errorMessage=e.message)}}},kr=(0,S.A)(Er,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("form",{id:"addEditFrm",action:a.saveURL,class:"form-group",method:"post",role:"form",onKeyup:n[24]||(n[24]=function(e){return i.hideErrorMessage(e)}),onSubmit:n[25]||(n[25]=(0,t.withModifiers)(function(){return i.createModule&&i.createModule.apply(i,arguments)},["prevent"]))},[(0,t.createElementVNode)("div",vo,[n[27]||(n[27]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"name"},"Name",-1)),(0,t.createElementVNode)("div",yo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{onBlur:n[0]||(n[0]=function(){return i.fillCopiedData&&i.fillCopiedData.apply(i,arguments)}),id:"name","onUpdate:modelValue":n[1]||(n[1]=function(e){return a.form.name=e}),class:"form-control",name:"name",placeholder:"Module name",required:"",type:"text"},null,544),[[t.vModelText,a.form.name]]),(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.conventional=e}),type:"checkbox",onClick:n[3]||(n[3]=function(e){return i.goConventional()})},null,512),[[t.vModelCheckbox,a.conventional]]),n[26]||(n[26]=(0,t.createTextVNode)(" Go Conventional",-1))]),(0,t.createElementVNode)("div",bo,(0,t.toDisplayString)(this.errors.name),1)])]),(0,t.createElementVNode)("div",wo,[n[28]||(n[28]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"alias"},"Alias",-1)),(0,t.createElementVNode)("div",So,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"alias","onUpdate:modelValue":n[4]||(n[4]=function(e){return a.form.alias=e}),class:"form-control",name:"alias",placeholder:"Alias",required:"",type:"text"},null,512),[[t.vModelText,a.form.alias]]),(0,t.createElementVNode)("div",Eo,(0,t.toDisplayString)(this.errors.alias),1)])]),(0,t.createElementVNode)("div",ko,[n[29]||(n[29]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"view_name"},"View Name",-1)),(0,t.createElementVNode)("div",_o,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"view_name","onUpdate:modelValue":n[5]||(n[5]=function(e){return a.form.view_name=e}),class:"form-control",name:"view_name",placeholder:"View name",required:"",type:"text"},null,512),[[t.vModelText,a.form.view_name]]),(0,t.createElementVNode)("div",Co,(0,t.toDisplayString)(this.errors.view_name),1)])]),(0,t.createElementVNode)("div",No,[n[30]||(n[30]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"cache_group"},"Cache Group",-1)),(0,t.createElementVNode)("div",Ao,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"cache_group","onUpdate:modelValue":n[6]||(n[6]=function(e){return a.form.cache_group=e}),class:"form-control",maxlength:"60",name:"cache_group",placeholder:"Cache Category",type:"text"},null,512),[[t.vModelText,a.form.cache_group]]),(0,t.createElementVNode)("div",Bo,(0,t.toDisplayString)(this.errors.cache_group),1)])]),(0,t.createElementVNode)("div",Do,[n[31]||(n[31]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"individual_cache"},"Is Individual Cache?",-1)),(0,t.createElementVNode)("label",xo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"individual_cache","onUpdate:modelValue":n[7]||(n[7]=function(e){return a.form.individual_cache=e}),name:"individual_cache",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.individual_cache]])])]),(0,t.createElementVNode)("div",Vo,[n[33]||(n[33]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"data_type"},"Data Type",-1)),(0,t.createElementVNode)("div",To,[(0,t.withDirectives)((0,t.createElementVNode)("select",{id:"data_type","onUpdate:modelValue":n[8]||(n[8]=function(e){return a.form.data_type=e}),class:"form-select select-big",name:"data_type",onChange:n[9]||(n[9]=function(e){return i.checkForService(a.form.data_type)})},[n[32]||(n[32]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allDataTypes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e},(0,t.toDisplayString)(e),9,Mo)}),256))],544),[[t.vModelSelect,a.form.data_type]]),(0,t.createElementVNode)("div",Oo,(0,t.toDisplayString)(this.errors.data_type),1),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-info",innerHTML:this.dataTypesInfo[a.form.data_type]||""},null,8,Io),[[t.vShow,""!=a.form.data_type&&this.dataTypesInfo[a.form.data_type]]])])]),(0,t.createElementVNode)("div",jo,[n[34]||(n[34]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"data_handler"},"Data Handler",-1)),(0,t.createElementVNode)("label",Po,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"data_handler","onUpdate:modelValue":n[10]||(n[10]=function(e){return a.form.data_handler=e}),class:"form-control input","mb-2s":"5",name:"data_handler",placeholder:"Query or Service URL or filteration for this module",row:"",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.data_handler]])])]),(0,t.withDirectives)((0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",Fo,[n[36]||(n[36]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"method_type"},"Method Type",-1)),(0,t.createElementVNode)("div",Lo,[(0,t.withDirectives)((0,t.createElementVNode)("select",{id:"method_type","onUpdate:modelValue":n[11]||(n[11]=function(e){return a.form.method_type=e}),class:"form-select select-big",name:"method_type"},[n[35]||(n[35]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allMethodTypes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.value},(0,t.toDisplayString)(e.name),9,Ro)}),256))],512),[[t.vModelSelect,a.form.method_type]]),(0,t.createElementVNode)("div",Uo,(0,t.toDisplayString)(this.errors.data_type),1)])]),(0,t.createElementVNode)("div",Ho,[n[37]||(n[37]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"service_params"},"Service Params",-1)),(0,t.createElementVNode)("div",$o,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"service_params","onUpdate:modelValue":n[12]||(n[12]=function(e){return a.form.service_params=e}),class:"form-control",name:"service_params",placeholder:"Service Params",type:"text"},null,512),[[t.vModelText,a.form.service_params]]),(0,t.createElementVNode)("div",qo,(0,t.toDisplayString)(this.errors.service_params),1)])]),(0,t.createElementVNode)("div",zo,[n[38]||(n[38]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"service_params"},"Service Headers",-1)),(0,t.createElementVNode)("div",Ko,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"headers","onUpdate:modelValue":n[13]||(n[13]=function(e){return a.form.headers=e}),class:"form-control input",name:"headers",placeholder:"Service header as json",rows:"5"},null,512),[[t.vModelText,a.form.headers]]),(0,t.createElementVNode)("div",Wo,(0,t.toDisplayString)(this.errors.headers),1)])])],512),[[t.vShow,i.showServiceForm]]),(0,t.createElementVNode)("div",Jo,[n[39]||(n[39]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"data_key_map"},"Data Key Map",-1)),(0,t.createElementVNode)("label",Xo,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"data_key_map","onUpdate:modelValue":n[14]||(n[14]=function(e){return a.form.data_key_map=e}),class:"form-control input",name:"data_key_map",placeholder:"key to be replaced in comma seperated. ie: :site_id, :lang_id ",rows:"5",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.data_key_map]])])]),(0,t.createElementVNode)("div",Yo,[n[40]||(n[40]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"is_seo_module"},"Use this module as seo module",-1)),(0,t.createElementVNode)("label",Go,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"is_seo_module","onUpdate:modelValue":n[15]||(n[15]=function(e){return a.form.is_seo_module=e}),name:"is_seo_module",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.is_seo_module]])])]),(0,t.createElementVNode)("div",Zo,[n[41]||(n[41]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"is_mandatory"},"Is Mandatory?",-1)),(0,t.createElementVNode)("label",Qo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"is_mandatory","onUpdate:modelValue":n[16]||(n[16]=function(e){return a.form.is_mandatory=e}),name:"is_mandatory",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.is_mandatory]])])]),(0,t.createElementVNode)("div",er,[n[42]||(n[42]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"shared"},"Is Shared?",-1)),(0,t.createElementVNode)("label",tr,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"shared","onUpdate:modelValue":n[17]||(n[17]=function(e){return a.form.shared=e}),name:"shared",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.shared]])])]),(0,t.createElementVNode)("div",nr,[n[43]||(n[43]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"linked_module"},"Linked Module Alias",-1)),(0,t.createElementVNode)("label",or,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"linked_module","onUpdate:modelValue":n[18]||(n[18]=function(e){return a.form.linked_module=e}),name:"linked_module",type:"text",class:"form-control"},null,512),[[t.vModelText,a.form.linked_module]])])]),(0,t.createElementVNode)("div",rr,[n[44]||(n[44]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"live_edit"},"Live Edit?",-1)),(0,t.createElementVNode)("label",ar,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"live_edit","onUpdate:modelValue":n[19]||(n[19]=function(e){return a.form.live_edit=e}),name:"live_edit",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.live_edit]])])]),(0,t.withDirectives)((0,t.createElementVNode)("div",ir,[(0,t.createElementVNode)("fieldset",lr,[n[46]||(n[46]=(0,t.createElementVNode)("legend",null,"Query Service Properties",-1)),(0,t.createElementVNode)("div",sr,[(0,t.createElementVNode)("label",{class:"col-sm-2",for:"query_statement",style:(0,t.normalizeStyle)(a.sFont)},"Query",4),(0,t.createElementVNode)("label",cr,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"query_statement","onUpdate:modelValue":n[20]||(n[20]=function(e){return a.form.query_statement=e}),class:"form-control input",name:"query_statement",rows:"5",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.query_statement]])])]),(0,t.createElementVNode)("div",dr,[(0,t.createElementVNode)("label",{class:"col-sm-2",for:"query_as",style:(0,t.normalizeStyle)(a.sFont)},"Get query data as",4),(0,t.createElementVNode)("div",ur,[(0,t.withDirectives)((0,t.createElementVNode)("select",{id:"query_as","onUpdate:modelValue":n[21]||(n[21]=function(e){return a.form.query_as=e}),class:"form-select select-big",name:"query_as"},[n[45]||(n[45]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allQueryDataTypes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.value},(0,t.toDisplayString)(e.name),9,fr)}),256))],512),[[t.vModelSelect,a.form.query_as]]),(0,t.createElementVNode)("div",hr,(0,t.toDisplayString)(this.errors.query_as),1)])])])],512),[[t.vShow,i.showQueryForm]]),(0,t.createElementVNode)("div",mr,[n[47]||(n[47]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"description"},"Description or different database connection name if it is a query module",-1)),(0,t.createElementVNode)("label",pr,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"description","onUpdate:modelValue":n[22]||(n[22]=function(e){return a.form.description=e}),class:"form-control input",name:"description",rows:"5",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.description]])])]),(0,t.withDirectives)((0,t.createElementVNode)("div",gr,[n[49]||(n[49]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"update_inAllSites"},"Update in all sites?",-1)),(0,t.createElementVNode)("label",vr,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"update_inAllSites","onUpdate:modelValue":n[23]||(n[23]=function(e){return a.form.update_inAllSites=e}),name:"update_inAllSites",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.update_inAllSites]]),n[48]||(n[48]=(0,t.createElementVNode)("div",{class:"alert alert-info"}," Be careful by clicking this checkbox. Content will be updated in all sites based on alias. If you are changing alias it will be updated only in this site. ",-1))])],512),[[t.vShow,this.showAllUpdateSection]]),(0,t.createElementVNode)("div",yr,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-danger"},(0,t.toDisplayString)(a.errorMessage),513),[[t.vShow,"string"==typeof a.errorMessage&&""!==a.errorMessage]]),(0,t.createElementVNode)("div",br,[n[50]||(n[50]=(0,t.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Back",8,wr)])])],40,go)])}]]);var _r=["value"],Cr=__webpack_require__(846),Nr=__webpack_require__.n(Cr);const Ar={components:{"split-button":k},props:["dataSites","dataCurrentSite","dataSupportedSites","dataIsAdmin"],mounted:function(){this.init()},data:function(){return{sites:void 0===this.dataSites?[]:JSON.parse(this.dataSites),currentSite:void 0===this.dataCurrentSite?1:parseInt(this.dataCurrentSite),supportedSite:void 0===this.dataSupportedSites?[]:JSON.parse(this.dataSupportedSites)}},methods:{init:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this,n=new(Nr()),o=n.get("allSites");if(0===o.length||!0===e){var r=v.admin_path("site/getSitesForUsers");axios.get(r,{withCredentials:!1}).then(function(e){t.sites=e.data,n.set("allSites",JSON.stringify(t.sites))}).catch(function(e){console.log(e)})}else t.sites=JSON.parse(o)},hasSites:function(){return null!=this.sites&&this.sites.length>1},parseSite:function(e){return{label:e.name,value:e.id}},setSite:function(e){var t=v.admin_path("ajax/setSiteId/".concat(this.currentSite));axios.get(t).then(function(e){window.location.href=window.location.pathname}).catch(function(e){console.log(e)})}}},Br=(0,S.A)(Ar,[["render",function(e,n,o,r,a,i){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("select",{onClick:n[0]||(n[0]=function(e){return i.init(!0)}),name:"site_combo",class:"form-select",id:"site_combo",onChange:n[1]||(n[1]=function(){return i.setSite&&i.setSite.apply(i,arguments)}),"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.currentSite=e})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,_r)}),256))],544)),[[t.vModelSelect,a.currentSite]])}]]);function Dr(e){return function(e){if(Array.isArray(e))return xr(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 xr(e,t);var n={}.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)?xr(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 xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Vr={class:"row mt-2 pb-2 border-bottom"},Tr={class:"col-auto"},Mr=["value"],Or={class:"col-auto"},Ir=["value"],jr={class:"col-auto"},Pr=["value"],Fr={class:"col-auto"},Lr={class:"col d-flex justify-content-end"},Rr={key:0,class:"btn-group"},Ur={key:0,class:"row mt-3"},Hr={class:"col left-zero"},$r={class:"alert alert-danger col-md-8"},qr=["innerHTML"],zr={class:"row mt-3"},Kr={class:"col col-9"},Wr={class:"row homepage-modules"},Jr={class:"non-selectable shadow-sm card mb-3"},Xr=["onDblclick"],Yr={class:"pull-right small"},Gr=["onClick"],Zr=["onClick"],Qr=["onClick"],ea=["data-hook-id"],ta=["data-module-id"],na=["onClick"],oa=["data-hook-id"],ra={key:0,class:"card-footer bg-gradient border-light"},aa=["onClick","data-hook-id"],ia={key:0,ref:"savePanel",class:"clearboth text-center pt-5"},la={key:0,class:"col col-3"},sa={class:"panel-sub-heading"},ca={class:"input-group"},da={id:"draggableModules",class:"modules-list all-modules-right"},ua=["data-module-id"],fa=["innerHTML"],ha={class:"row"},ma={key:0,class:"col-auto p-1"},pa=["value"],ga={key:1,class:"col-auto p-1"},va=["value"],ya={key:2,class:"col-auto p-1"},ba=["value"],wa={class:"col-auto p-1"},Sa=["value"],Ea={class:"row mt-2"},ka={key:0,class:"col-auto p-1"},_a=["value"],Ca={key:1,class:"col-auto p-1"},Na=["value"],Aa={key:2,class:"col-auto p-1"},Ba=["value"],Da={class:"col-auto p-1"},xa=["value"],Va={class:"row"},Ta={class:"plr5 v-space"},Ma={class:"loader"},Oa={class:"p-2",title:"Delete from other platforms too"},Ia={style:{"text-transform":"capitalize"}},ja={class:"row",style:{"max-height":"500px",overflow:"scroll"}},Pa={class:"table table-striped"},Fa={key:0},La=["innerHTML"],Ra=["textContent"],Ua={key:0},Ha={style:{"background-color":"#fff",border:"none"}},$a={class:"text text-danger"};const qa={components:{"modal-box":le},props:["dataModel","dataModuleRelations","dataId"],mounted:function(){},data:function(){return{model:void 0===this.dataModel||""===this.dataModel?null:this.dataModel,relation:void 0===this.dataModuleRelations||""===this.dataModuleRelations?"":this.dataModuleRelations,id:void 0===this.dataId||""===this.dataId?0:parseInt(this.dataId),resData:[],errorMessage:"",isEditable:!0,excludeFields:[]}},methods:{shouldExclude:function(e){return this.excludeFields.indexOf(e)>=0},getValue:function(e,t){if(!this.isEditable)return t;if("id"===e&&this.isEditable){var n="edit/".concat(t);return n=v.admin_path("".concat(this.model,"/").concat(n)),'<a href="'.concat(n,'">').concat(t,"</a>")}return t},showInfo:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.isEditable="true"===o.toString(),this.excludeFields=n,this.model=e;var r=this;X.show(this),axios.get(v.get("base_path")+"/ajax/getInfo/".concat(e,"/").concat(t)).then(function(e){r.errorMessage="",r.resData={},r.resData=e.data.results,!0===e.data.error&&(r.errorMessage=e.data.message),r.open(),X.hide(r)}).catch(function(e){J.show(r,e.message),X.hide(r)})},open:function(){this.$refs.infoModal.open(),H.emit("info-popup-open")},close:function(){this.$refs.infoModal.close(),H.emit("info-popup-close")}}},za=(0,S.A)(qa,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("modal-box");return(0,t.openBlock)(),(0,t.createBlock)(l,{ref:"infoModal","data-show-footer":"true"},{title:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Ia,(0,t.toDisplayString)(a.model)+" Info",1)]}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",ja,[(0,t.createElementVNode)("table",Pa,[(0,t.createElementVNode)("tbody",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.resData,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[i.shouldExclude(n)?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("tr",Fa,[(0,t.createElementVNode)("td",null,(0,t.toDisplayString)(n),1),(0,t.createElementVNode)("td",null,["id"===n?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,innerHTML:i.getValue(n,e)},null,8,La)):(0,t.createCommentVNode)("v-if",!0),"id"!==n?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,textContent:(0,t.toDisplayString)(i.getValue(n,e))},null,8,Ra)):(0,t.createCommentVNode)("v-if",!0)])]))],64)}),256)),""!==a.errorMessage?((0,t.openBlock)(),(0,t.createElementBlock)("tr",Ua,[(0,t.createElementVNode)("td",Ha,[(0,t.createElementVNode)("div",$a,(0,t.toDisplayString)(a.errorMessage),1)])])):(0,t.createCommentVNode)("v-if",!0)])])])]}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[0]||(n[0]=function(e){return i.close()})},"Close")]}),_:1},512)}]]),Ka={components:{"info-popup":za,"modal-box":le},mounted:function(){this.init()},created:function(){},props:["dataCategories","dataMicrosites","dataPlatforms","dataSiteId","dataMicrositeId","dataCategoryId","dataPlatformId","dataSiteInfo","dataHookInfo","dataAllModules","dataCategoryModules","dataCategoryInfo","dataThemeInfo","dataUserRights","dataIsModuleReadonly","dataAllSites"],computed:{hasSiteMoreThanOne:function(){return this.allSites.length>1},hasMicrosites:function(){return this.microsites.length>0},hasPlatformMoreThanOne:function(){return this.platforms.length>1},hasTheme:function(){return this.themeInfo&&this.themeInfo.id},saveButtonCss:function(){return"btn btn-success btn-form-submit"+(!0===this.enableDisableSave()?"":" disabled")},canEdit:function(){return this.userRights.indexOf("edit")>=0&&!1===this.isModuleReadonly},canDelete:function(){return this.userRights.indexOf("delete")>=0&&!1===this.isModuleReadonly},modalCss:function(){return"modal-lg"},fromCategories:function(){return this.categoriesData[this.fromData.site_id]||[]},toCategories:function(){return this.categoriesData[this.toData.site_id]||[]},hasError:function(){return this.errors.length>0},filterModules:function(){var e=this.searchKey;return""!==e&&null!=e?(e=e.toLowerCase(),this.allModules.filter(function(t){var n=t.alias.toLowerCase(),o=t.name.toLowerCase();if(t.id.toString()===e||n.includes(e)||o.includes(e))return!0})):(this.searchKey="",this.allModules)}},data:function(){return{categoriesData:{},categories:void 0===this.dataCategories||""===this.dataCategories?[]:JSON.parse(this.dataCategories),microsites:void 0===this.dataMicrosites||""===this.dataMicrosites?[]:JSON.parse(this.dataMicrosites),platforms:void 0===this.dataPlatforms||""===this.dataPlatforms?[]:JSON.parse(this.dataPlatforms),siteId:void 0===this.dataSiteId||""===this.dataSiteId?1:parseInt(this.dataSiteId),microSiteId:void 0===this.dataMicrositeId||""===this.dataMicrositeId?0:parseInt(this.dataMicrositeId),platformId:void 0===this.dataPlatformId||""===this.dataPlatformId?1:parseInt(this.dataPlatformId),categoryId:void 0===this.dataCategoryId||""===this.dataCategoryId?0:parseInt(this.dataCategoryId),siteInfo:void 0===this.dataSiteInfo||""===this.dataSiteInfo?[]:JSON.parse(this.dataSiteInfo),hookInfo:void 0===this.dataHookInfo||""===this.dataHookInfo?[]:JSON.parse(this.dataHookInfo),allModules:void 0===this.dataAllModules||""===this.dataAllModules?[]:JSON.parse(this.dataAllModules),categoryModules:void 0===this.dataCategoryModules||""===this.dataCategoryModules?[]:JSON.parse(this.dataCategoryModules),categoryInfo:void 0===this.dataCategoryInfo||""===this.dataCategoryInfo?[]:JSON.parse(this.dataCategoryInfo),themeInfo:void 0===this.dataThemeInfo||""===this.dataThemeInfo?[]:JSON.parse(this.dataThemeInfo),hooks:[],hooksInfoCache:{},moduleInfoCache:{},noHookFound:!1,errors:[],enableSave:!1,searchKey:"",applicableForAllPlatforms:!1,fromData:{site_id:0,microsite_id:0,platform_id:0,category_id:0},toData:{site_id:0,microsite_id:0,platform_id:0,category_id:0},isWorking:!1,sortObj:{draggable:null},userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[],isModuleReadonly:"1"===this.dataIsModuleReadonly,allSites:void 0===this.dataAllSites||""===this.dataAllSites?[]:JSON.parse(this.dataAllSites),copyForAllPlatforms:!1}},methods:{init:function(){if(0===this.categories.length&&this.addErrorMessage("No category found!"),0===this.categoryInfo.length&&this.addErrorMessage("There is a mismatch in site default category. Please fix that."),this.hasTheme)this.parseTheme(),this.populateModules(),this.enableSorting(),this.makeCategories();else{var e=v.admin_path("category/settings",{platform_id:this.platformId});this.addErrorMessage("This category/platform/theme is not available in category_site table.\n You need to drag and drop in <a href='".concat(e,"'>category settings</a>.")),this.addErrorMessage("Dont' forget the set the theme there.")}},makeCategories:function(){var e=this.allSites.length;if(e>0)for(var t=0;t<e;t++){var n=this.allSites[t];this.categoriesData[n.id]=n.category}this.setDefaultFromTo()},setDefaultFromTo:function(){this.allSites.length>0?(this.fromData.site_id=this.allSites[0].id,this.toData.site_id=this.siteId):(this.fromData.site_id=this.siteId,this.toData.site_id=this.siteId),this.fromData.platform_id=this.platformId,this.toData.platform_id=this.platformId,this.toData.category_id=this.categoryId},saveNow:function(e,t){var n=this;return X.show(this),new Promise(function(o,r){axios.post(e,t).then(function(e){o(e)}).catch(function(e){r((0,g.safeErrorData)(e))}).finally(function(){X.hide(n)})})},getWhere:function(){return{site_id:this.siteId,microsite_id:this.microSiteId,platform_id:this.platformId,category_id:this.categoryId}},saveModules:function(){if(!1===this.enableDisableSave())return!1;var e=this,t={},n=document.querySelectorAll(".js_hook_modules"),o=[];if(n.forEach(function(e){var t=e.querySelectorAll("li.js_item"),n=e.getAttribute("data-hook-id");if(t.length>0){for(var r=[],a=0;a<t.length;a++){var i=t[a].getAttribute("data-module-id");r.push({module_id:i,position:a+1})}var l={hook_id:n,modules:r};o.push(l)}}),o.length>0){var r=e.getWhere();t.data=o,t.where=r,t.applicableForAllPlatforms=!1,this.saveNow(v.admin_path("homepage/saveSettings"),t).then(function(t){J.show(e,"Saved..."),e.enableDisableSave(!1)}).catch(function(t){e.showError(t)})}},populateModules:function(){var e=this,t=this.categoryModules;if(t.length>0)for(var n=0;n<t.length;n++){var o=t[n],r=e.getHookInfoCache(o.hook_id);try{var a=e.getModuleInfo(o.module_id);this.addModule(r.hookIndex,a)}catch(t){console.error("@populateModules: "+t.message),e.showError("@populateModules: "+t.message)}}else console.info("There is no module added for this category."),J.show(this,"There is no module added for this category. Drag from the right panel to the left boxes. ",5e3)},parseTheme:function(){if(this.hasTheme){var e=this,t=this.themeInfo.skeleton.match(/(%{cms.+}%)/gim);if(t&&t.length>0){var n=0;t.forEach(function(t,o){var r=t.replace("%{cms.",""),a=(r=r.replace("}%","")).split("."),i=a[0],l=a[1];if("hook"===i){var s=e.getHookInfo(l);null!==s?(e.addHook({name:l,modules:[],info:s}),e.setHookInfoCache(s.id,{info:s,hookIndex:n}),n++):console.error("@parseTheme "+l+". You need to add in your site")}})}else this.addErrorMessage("There is no hook defined in for this theme (".concat(this.themeInfo.name,"})"))}else this.addErrorMessage("There is no theme available for this category")},addErrorMessage:function(e){this.errors.push({message:e})},findModuleIndex:function(e,t){return null!==this.getHook(e)?this.getHook(e).modules.findIndex(function(e){return t.id===e.id}):-1},removeModules:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"module_id",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("[object Object]"===Object.prototype.toString.call(e)?t=e:(t=this.getWhere())[n]=parseInt(e),null!==o){t.hook_id=parseInt(o);var r=this.getHookInfoCache(o),a=this.getModuleInfo(e),i=this.findModuleIndex(r.hookIndex,a);this.getHook(r.hookIndex).modules.splice(i,1)}var l={};l.where=t,l.applicableForAllPlatforms=this.applicableForAllPlatforms,this.enableDisableSave(!0)},addModule:function(e,t){if(-1===this.findModuleIndex(e,t)){var n=this.getHook(e);return n.modules.push(t),n.modules.length}return!1},refreshRightSide:function(){this.allModules.push(this.allModules[0]),this.allModules.pop()},highlightEagerDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";document.querySelectorAll(".js_hook_modules").forEach(function(t){t.classList[e]("module-drop-eager"),t.closest("div.js_modules").classList[e]("p-0","m-0")})},setHookInfoCache:function(e,t){return this.hooksInfoCache[e]=t},getHookInfoCache:function(e){return this.hooksInfoCache[e]},getHookInfo:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"alias",n=this.hookInfo,o=0;o<n.length;o++){var r=n[o];if(r[t]===e)return r}return null},addHook:function(e){this.hooks.push(e)},getHook:function(e){return this.hooks[e]||null},getModuleInfo:function(e){if(this.moduleInfoCache[e])return this.moduleInfoCache[e];for(var t=null,n=0;n<this.allModules.length;n++){var o=this.allModules[n];if(o.id.toString()===e.toString()){this.moduleInfoCache[e]=o,t=o;break}}return t},enableDragging:function(){if(!this.canEdit)return!1;var e=this,t=document.getElementById("draggableModules");this.sortObj.draggable=Xn.create(t,{animation:200,draggable:".js_item",group:{name:"modulesBox"},sort:!1,ghostClass:"js_modules",onEnd:function(t){var n=t.to,o=t.item,r=n.getAttribute("data-hook-id"),a=o.getAttribute("data-module-id");if(r){var i=e.getHookInfoCache(r),l=e.getModuleInfo(a),s=e.addModule(i.hookIndex,l);o.parentNode.removeChild(o),e.highlightEagerDrop("remove"),!1===s&&J.show(e,"Module is already added in this hook...")}e.enableDisableSave(!0)},onStart:function(t){e.highlightEagerDrop("add")}})},enableSorting:function(){if(!this.canEdit)return!1;var e=this;this.$nextTick(function(){document.querySelectorAll(".js_modules").forEach(function(t){Xn.create(t,{animation:200,filter:".js_delete",group:{name:"droppable",put:"modulesBox"},onFilter:function(t){var n=t.item,o=t.target,r=n.parentNode.getAttribute("data-hook-id"),a=n.getAttribute("data-module-id");Xn.utils.is(o,".js_delete")&&e.removeModules(a,"module_id",r)},onUpdate:function(t){e.enableDisableSave(!0)}})}),e.enableDragging(!0)})},deleteAllModuleFromHook:function(e){var t=this.getHookInfoCache(e);this.getHook(t.hookIndex).modules=[],this.removeModules(e,"hook_id")},hasAnyModulesInAHook:function(e){return void 0!==e.modules&&e.modules.length>0},enableDisableSave:function(e){if(void 0===e)return this.enableSave;this.enableSave=e},showHideDeleteAlert:function(e){e?Y.open(this,"deleteBox"):Y.close(this,"deleteBox")},deleteAllFromCategory:function(){this.showHideDeleteAlert(!1);for(var e=this.hooks,t=0;t<e.length;t++)e[t].modules=[];this.removeModules(this.categoryId,"category_id")},showHideCopyAlert:function(){arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?Y.close(this,"copyBox"):(this.setDefaultFromTo(),Y.open(this,"copyBox"))},copyDataFromCategory:function(){this.isWorking=!0;var e=this,t={fromData:this.fromData,toData:this.toData},n=v.admin_path("homepage/copyData");this.saveNow(n,t).then(function(t){t.data.error?J.show(e,t.data.message,5e3):t.data.success&&(e.showHideCopyAlert(!1),J.show(e,"Copied. Reloading..."),window.location.href=window.location.href),e.isWorking=!1}).catch(function(t){e.showHideCopyAlert(!1),e.isWorking=!1,e.showError(t)})},setWorking:function(){},isValidModule:function(e){var t=null!=e&&void 0!==e&&e.id>0;return!1===t&&console.error("There is some error in db entries for this category. This can be fixed by deleting all modules and drag and drop again."),t},fetchNewData:function(){var e=this.getWhere();delete e.site_id,0===e.microsite_id&&delete e.microsite_id,window.location.href=v.admin_path("homepage/ui",e)},showInfo:function(e,t){this.$refs.infoPopup.showInfo(e,t)},showHideHookPanel:function(e){var t=this.$refs["hook_panel_"+e][0];-1===t.className.indexOf("hide")?t.classList.add("hide"):t.classList.remove("hide")},onlyMe:function(e,t){var n=this,o=this.$refs["panel_"+e][0];function r(e){for(var t=n.$refs.savePanel,o=0;o<n.hooks.length;o++){var r=n.hooks[o],a=n.$refs["panel_"+r.info.id][0];!0===e?(a.classList.add("hide"),a.classList.remove("fixed")):(a.classList.remove("hide"),a.classList.remove("fixed"))}!0===e?t.classList.add("hide"):t.classList.remove("hide")}-1===o.className.indexOf("fixed")?(r(!0),o.classList.remove("hide"),o.classList.add("fixed")):r(!1)},showError:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t="string"==typeof e?e:e&&e.data&&e.data.message?e.data.message:"Unknown error!",J.show(this,t,5e3),n&&setTimeout(function(){window.location.reload()},1e3)}}},Wa=(0,S.A)(Ka,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("modal-box"),s=(0,t.resolveComponent)("info-popup");return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Vr,[(0,t.withDirectives)((0,t.createElementVNode)("div",Tr,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.microSiteId=e}),class:"form-select select",onChange:n[1]||(n[1]=function(e){return i.fetchNewData()})},[n[24]||(n[24]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.microsites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Mr)}),256))],544),[[t.vModelSelect,a.microSiteId]])],512),[[t.vShow,i.hasMicrosites]]),(0,t.createElementVNode)("div",Or,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.categoryId=e}),class:"form-select select",onChange:n[3]||(n[3]=function(e){return i.fetchNewData()})},[n[25]||(n[25]=(0,t.createElementVNode)("option",null,"Select a Category",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.categories,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.category_id},(0,t.toDisplayString)(e.name),9,Ir)}),256))],544),[[t.vModelSelect,a.categoryId]])]),(0,t.createElementVNode)("div",jr,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return a.platformId=e}),class:"form-select select",onChange:n[5]||(n[5]=function(e){return i.fetchNewData()})},[n[26]||(n[26]=(0,t.createElementVNode)("option",null,"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Pr)}),256))],544),[[t.vShow,i.hasPlatformMoreThanOne],[t.vModelSelect,a.platformId]])]),(0,t.withDirectives)((0,t.createElementVNode)("div",Fr,[(0,t.createElementVNode)("span",{class:"hand",title:"Click to see theme info",onClick:n[6]||(n[6]=function(e){return i.showInfo("theme",a.themeInfo.id)})},[n[27]||(n[27]=(0,t.createTextVNode)("Theme: ",-1)),(0,t.createElementVNode)("u",null,(0,t.toDisplayString)(a.themeInfo.name),1)])],512),[[t.vShow,i.hasTheme]]),(0,t.createElementVNode)("div",Lr,[i.hasTheme?((0,t.openBlock)(),(0,t.createElementBlock)("div",Rr,[i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"Delete All Modules form this category",class:"btn btn-danger",title:"Delete All Modules form this category",type:"button",onClick:n[7]||(n[7]=function(e){return i.showHideDeleteAlert(!0)})},Dr(n[28]||(n[28]=[(0,t.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-trash-o"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("button",{"aria-label":"Copy Data From",class:"btn btn-outline-secondary",title:"Copy Data From",type:"button",onClick:n[8]||(n[8]=function(e){return i.showHideCopyAlert(!0)})},Dr(n[29]||(n[29]=[(0,t.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-copy"},null,-1)])))])):(0,t.createCommentVNode)("v-if",!0)])]),i.hasError?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ur,[(0,t.createElementVNode)("div",Hr,[(0,t.createElementVNode)("div",$r,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.errors,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{innerHTML:e.message},null,8,qr)}),256))])])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",zr,[(0,t.createElementVNode)("div",Kr,[(0,t.createElementVNode)("div",Wr,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.hooks,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref_for:!0,ref:"panel_"+e.info.id,class:"col-4"},[(0,t.createElementVNode)("div",Jr,[(0,t.createElementVNode)("div",{class:"card-header hook-header",onDblclick:function(t){return i.showHideHookPanel(e.info.id)}},[(0,t.createElementVNode)("span",Yr,[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)("fa hand fa-expand"),title:"Expand/Contract",onClick:function(t){return i.onlyMe(e.info.id,t)}},null,8,Gr),n[30]||(n[30]=(0,t.createTextVNode)(" ",-1)),(0,t.createElementVNode)("span",{class:"fa fa-minus hand",title:"Minimize/Maximize",onClick:function(t){return i.showHideHookPanel(e.info.id)}},null,8,Zr)]),(0,t.createElementVNode)("a",{href:"javascript:void(0)",onClick:function(t){return i.showInfo("hook",e.info.id)}},(0,t.toDisplayString)(e.info.name),9,Qr)],40,Xr),(0,t.createElementVNode)("div",{ref_for:!0,ref:"hook_panel_"+e.info.id,class:"card-body hook_modules js_modules"},[(0,t.createElementVNode)("ul",{"data-hook-id":e.info.id,class:"list-group list-group-flush modules-list js_modules js_hook_modules"},[e.modules.length>0?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(e.modules,function(n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-module-id":n.id,class:"js_item"},[(0,t.createElementVNode)("a",{href:"javascript:void(0)",onClick:function(e){return i.showInfo("module",n.id)}},(0,t.toDisplayString)(n.name),9,na),i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,"data-hook-id":e.info.id,class:"js_delete delete hand pull-right fa fa-trash-o",title:"Delete this module from the hook"},null,8,oa)):(0,t.createCommentVNode)("v-if",!0)],8,ta)}),256)):(0,t.createCommentVNode)("v-if",!0)],8,ea)],512),i.hasAnyModulesInAHook(e)&&i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("div",ra,[(0,t.createElementVNode)("span",{onClick:function(t){return i.deleteAllModuleFromHook(e.info.id)},class:"js_delete_from_hook hand pull-right fa fa-trash-o",title:"Delete all module from this hook","data-hook-id":e.info.id},null,8,aa)])):(0,t.createCommentVNode)("v-if",!0)])],512)}),256)),i.hasTheme?((0,t.openBlock)(),(0,t.createElementBlock)("div",ia,[(0,t.createElementVNode)("button",{class:(0,t.normalizeClass)(i.saveButtonCss),type:"button",onClick:n[9]||(n[9]=function(e){return i.saveModules()})}," Save Now! ",2)],512)):(0,t.createCommentVNode)("v-if",!0)])]),i.hasError?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",la,[(0,t.createElementVNode)("div",sa,[(0,t.createElementVNode)("div",ca,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[10]||(n[10]=function(e){return a.searchKey=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id, name or alias",type:"text"},null,512),[[t.vModelText,a.searchKey]])])]),(0,t.createElementVNode)("ul",da,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterModules,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-module-id":e.id,class:"js_item"},[(0,t.createElementVNode)("span",{innerHTML:e.name},null,8,fa),n[31]||(n[31]=(0,t.createElementVNode)("span",{class:"delete hand pull-right fa fa-trash-o"},null,-1))],8,ua)}),256))])]))]),(0,t.createVNode)(l,{ref:"copyBox","data-show-footer":"true","data-modal-css":i.modalCss},{title:(0,t.withCtx)(function(){return Dr(n[32]||(n[32]=[(0,t.createTextVNode)(" Copy Data ",-1)]))}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",ha,[n[37]||(n[37]=(0,t.createElementVNode)("div",{class:"col-1 p-1"},[(0,t.createElementVNode)("label",{class:"col-md-3 d-flex"},"From:")],-1)),i.hasSiteMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",ma,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return a.fromData.site_id=e}),class:"form-select select-sm"},[n[33]||(n[33]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,pa)}),256))],512),[[t.vModelSelect,a.fromData.site_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasMicrosites?((0,t.openBlock)(),(0,t.createElementBlock)("div",ga,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[12]||(n[12]=function(e){return a.fromData.microsite_id=e}),class:"form-select select-sm"},[n[34]||(n[34]=(0,t.createElementVNode)("option",{value:"0"},"Select a Microsite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.microsites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,va)}),256))],512),[[t.vModelSelect,a.fromData.microsite_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasPlatformMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",ya,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return a.fromData.platform_id=e}),class:"form-select select-sm"},[n[35]||(n[35]=(0,t.createElementVNode)("option",{value:"0"},"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ba)}),256))],512),[[t.vModelSelect,a.fromData.platform_id]])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",wa,[(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select select-sm","onUpdate:modelValue":n[14]||(n[14]=function(e){return a.fromData.category_id=e})},[n[36]||(n[36]=(0,t.createElementVNode)("option",{value:"0"},"Select a Category",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.fromCategories,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.category_id},(0,t.toDisplayString)(e.name),9,Sa)}),256))],512),[[t.vModelSelect,a.fromData.category_id]])])]),(0,t.createElementVNode)("div",Ea,[n[42]||(n[42]=(0,t.createElementVNode)("div",{class:"col-1 p-1"},[(0,t.createElementVNode)("label",{class:"col-md-3 d-flex"},"To:")],-1)),i.hasSiteMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",ka,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[15]||(n[15]=function(e){return a.toData.site_id=e}),class:"form-select select-sm"},[n[38]||(n[38]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,_a)}),256))],512),[[t.vModelSelect,a.toData.site_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasMicrosites?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ca,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[16]||(n[16]=function(e){return a.toData.microsite_id=e}),class:"form-select select-sm"},[n[39]||(n[39]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.microsites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Na)}),256))],512),[[t.vModelSelect,a.toData.microsite_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasPlatformMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",Aa,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[17]||(n[17]=function(e){return a.toData.platform_id=e}),class:"form-select select-sm"},[n[40]||(n[40]=(0,t.createElementVNode)("option",{value:"0"},"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Ba)}),256))],512),[[t.vModelSelect,a.toData.platform_id]])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",Da,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[18]||(n[18]=function(e){return a.toData.category_id=e}),class:"form-select select-sm"},[n[41]||(n[41]=(0,t.createElementVNode)("option",{value:"0"},"Select a Category",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.toCategories,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.category_id},(0,t.toDisplayString)(e.name),9,xa)}),256))],512),[[t.vModelSelect,a.toData.category_id]])])]),(0,t.createElementVNode)("div",Va,[(0,t.withDirectives)((0,t.createElementVNode)("div",Ta,Dr(n[43]||(n[43]=[(0,t.createElementVNode)("div",{class:"alert alert-info"},[(0,t.createTextVNode)(" Please do not select "),(0,t.createElementVNode)("strong",null,"source platform"),(0,t.createTextVNode)(" if you want to copy modules in all platforms respectively. ")],-1)])),512),[[t.vShow,i.hasPlatformMoreThanOne]])])]}),footer:(0,t.withCtx)(function(){return[(0,t.withDirectives)((0,t.createElementVNode)("div",Ma,Dr(n[44]||(n[44]=[(0,t.createTextVNode)(" Please wait... ",-1),(0,t.createElementVNode)("span",{class:"fa fa-loader"},null,-1)])),512),[[t.vShow,a.isWorking]]),(0,t.createElementVNode)("button",{class:"btn btn-success btn-from-submit",onClick:n[19]||(n[19]=function(e){return i.copyDataFromCategory()})}," Copy Now "),(0,t.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[20]||(n[20]=function(e){return i.showHideCopyAlert(!1)})}," Cancel ")]}),_:1},8,["data-modal-css"]),(0,t.createVNode)(l,{ref:"deleteBox","data-show-footer":"true","data-title-css":"alert-danger"},{title:(0,t.withCtx)(function(){return Dr(n[45]||(n[45]=[(0,t.createTextVNode)(" Warning!!! ",-1)]))}),content:(0,t.withCtx)(function(){return[n[47]||(n[47]=(0,t.createElementVNode)("span",{class:"text-danger"},"Are you sure to delete all modules from this category? Can't be undone.",-1)),(0,t.createElementVNode)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("label",Oa,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[21]||(n[21]=function(e){return a.applicableForAllPlatforms=e}),type:"checkbox"},null,512),[[t.vModelCheckbox,a.applicableForAllPlatforms]]),n[46]||(n[46]=(0,t.createTextVNode)(" Delete from other platforms too",-1))],512),[[t.vShow,i.hasPlatformMoreThanOne]])])]}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("button",{class:"btn btn-danger",onClick:n[22]||(n[22]=function(e){return i.deleteAllFromCategory()})}," Yes "),(0,t.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[23]||(n[23]=function(e){return i.showHideDeleteAlert(!1)})}," No ")]}),_:1},512),(0,t.createVNode)(s,{ref:"infoPopup"},null,512)],64)}]]),Ja={mounted:function(){for(var e in this)this.hasOwnProperty(e)},methods:{getAllInputs:function(){console.log("all inputs")}}},Xa=(0,S.A)(Ja,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.renderSlot)(e.$slots,"default")])}]]);function Ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Ga={class:"row"},Za={class:"col-auto d-flex"},Qa={class:"row"},ei={key:0,class:"spinner-border text-info",role:"status"},ti={class:"col-auto m-1 border"},ni=["src","onClick"],oi={key:1},ri={class:"container-fluid"};function ai(e){return function(e){if(Array.isArray(e))return ii(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 ii(e,t);var n={}.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)?ii(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 ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const li={components:{"modal-box":le,"file-uploader":po},props:["dataModel","dataModuleRelations","dataId","dataEditor"],mounted:function(){var e=this;H.on("gallery-image-uploaded",function(t){e.data=[].concat(ai(t.data),ai(e.data))})},computed:{galleryCreate:function(){return v.admin_path("gallery/create?return_url="+encodeURIComponent(window.location.href))}},data:function(){return{data:[],loading:!1,searchKey:"",editor:this.dataEditor,form:{file:""}}},methods:{loadData:function(){var e=this;this.data=[],this.loading=!0;var t=v.admin_path("gallery/getAllImages");axios.get(t).then(function(t){e.data=t.data}).catch(function(e){console.log(e)}).finally(function(){e.loading=!1})},getImage:function(e){return v.get_media("".concat(e))},insertContentToEditor:function(e){e='<img src="'.concat(e,'" />'),this.editor&&this.editor.insertContent(e),this.close()},searchImages:function(){var e=this;if(this.searchKey.length>0){this.data=[],this.loading=!0;var t=v.admin_path("gallery/searchImages/".concat(this.searchKey));axios.get(t).then(function(t){e.data=t.data}).catch(function(e){console.log(e)}).finally(function(){e.loading=!1})}else this.loadData()},open:function(e){this.loadData(),e&&(this.editor=e),this.$refs.imageModalBox.open(),H.emit("image-gallery-open")},close:function(){this.$refs.imageModalBox.close(),H.emit("image-gallery-close")}}},si=(0,S.A)(li,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("file-uploader"),s=(0,t.resolveComponent)("modal-box");return(0,t.openBlock)(),(0,t.createBlock)(s,{ref:"imageModalBox","data-show-footer":"true"},{title:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Ga,[n[3]||(n[3]=(0,t.createElementVNode)("div",{class:"col-2"},"Gallery",-1)),(0,t.createElementVNode)("div",Za,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"text",class:"form-control me-1",placeholder:"Search image",onKeydown:n[0]||(n[0]=(0,t.withKeys)(function(){return i.searchImages&&i.searchImages.apply(i,arguments)},["enter"])),"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.searchKey=e})},null,544),[[t.vModelText,a.searchKey]]),(0,t.createElementVNode)("input",{type:"button",class:"btn btn-secondary me-1",value:"Search",onClick:n[2]||(n[2]=function(){return i.searchImages&&i.searchImages.apply(i,arguments)})})])])]}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Qa,[a.loading?((0,t.openBlock)(),(0,t.createElementBlock)("span",ei,(e=n[4]||(n[4]=[(0,t.createElementVNode)("span",{class:"visually-hidden"},"Loading...",-1)]),function(e){if(Array.isArray(e))return Ya(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 Ya(e,t);var n={}.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)?Ya(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.")}()))):(0,t.createCommentVNode)("v-if",!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.data,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",ti,[(0,t.createElementVNode)("img",{src:i.getImage(e.path),width:"100",onClick:function(t){return i.insertContentToEditor(i.getImage(e.path))}},null,8,ni)])}),256)),0===a.data.length&&!1===a.loading?((0,t.openBlock)(),(0,t.createElementBlock)("div",oi,"No images found")):(0,t.createCommentVNode)("v-if",!0)])];var e}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",ri,[(0,t.createVNode)(l,{"data-accept":"image/*"})])]}),_:1},512)}]]);var ci=["onClick","title"],di={class:"card mb-3 shadow info-box"},ui={class:"card-body"},fi={class:"card-title"},hi=["href"],mi=["innerHTML"],pi={key:1,class:"info-box-text"},gi={key:0,class:"card-text text-center"},vi=new g.Storage;const yi={mounted:function(){},props:["dataInfo","dataColorIndex","dataSubTitle","dataTitle","dataIconCss","dataLink"],data:function(){return{info:void 0===this.dataInfo?null:"string"==typeof this.dataInfo?JSON.parse(this.dataInfo):this.dataInfo,subTitle:void 0!==this.dataSubTitle?this.dataSubTitle:"",iconCss:this.dataIconCss,link:void 0===this.dataLink?"":this.dataLink}},computed:{content:function(){return null!==this.info?this.info.name||this.info.title:this.dataTitle},icon:function(){return void 0!==this.iconCss&&""!==this.iconCss||null===this.info?this.iconCss:this.info.icon_css||this.info.iconCss}},methods:{getIconText:function(){var e;return null!==(e=this.info)&&void 0!==e&&e.icon_css||void 0===this.iconCss?this.content.replace(/[^a-zA-Z- ]/g,"").match(/\b\w/g).join(""):""},getColor:function(){return"color-"+(this.dataColorIndex?this.dataColorIndex:this.getSerialNumber())},getRandom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return e=parseInt(e),t=parseInt(t),Math.floor(Math.random()*(t-e))+e},getSerialNumber:function(){void 0===vi.fetch("counter")&&vi.store("counter",1);var e=vi.fetch("counter");return e>10&&(e=1),vi.store("counter",e+1),e}}},bi=(0,S.A)(yi,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",di,[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(i.getColor()+" info-box-icon")},[(0,t.createElementVNode)("i",{style:{"font-style":"normal"},class:(0,t.normalizeClass)(i.icon)},(0,t.toDisplayString)(i.getIconText()),3)],2),(0,t.createElementVNode)("div",ui,[(0,t.createElementVNode)("h5",fi,[""!==a.link?((0,t.openBlock)(),(0,t.createElementBlock)("a",{key:0,href:a.link,class:"info-box-text"},[(0,t.createElementVNode)("span",{class:"info-box-text",innerHTML:i.content},null,8,mi)],8,hi)):(0,t.createCommentVNode)("v-if",!0),""===a.link?((0,t.openBlock)(),(0,t.createElementBlock)("span",pi,(0,t.toDisplayString)(i.content),1)):(0,t.createCommentVNode)("v-if",!0)]),""!==a.subTitle?((0,t.openBlock)(),(0,t.createElementBlock)("p",gi,(0,t.toDisplayString)(a.subTitle),1)):(0,t.createCommentVNode)("v-if",!0)])])}]]),wi={components:{"info-box":bi},mounted:function(){},props:["dataModules","dataModulesAllowed","dataIsAdmin"],data:function(){return{modulesAllowed:this.dataModulesAllowed?JSON.parse(this.dataModulesAllowed):[]}},computed:{allModules:function(){return(void 0===this.dataModules?[]:JSON.parse(this.dataModules)).child}},methods:{navigate:function(e){window.location=v.admin_path(e.controller_name)},hasAccess:function(e){if("1"==this.dataIsAdmin.toString())return!0;for(var t=0;t<this.modulesAllowed.length;t++)if(this.modulesAllowed[t].module_id==e)return!0;return!1}}},Si=(0,S.A)(wi,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("info-box");return(0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.allModules,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[i.hasAccess(e.id)?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"col-auto hand",onClick:function(t){return i.navigate(e)},title:e.name},[((0,t.openBlock)(),(0,t.createBlock)(l,{key:e.name+n,"data-title":e.name,"data-sub-title":e.sub_title,"data-icon-css":e.icon_css},null,8,["data-title","data-sub-title","data-icon-css"]))],8,ci)):(0,t.createCommentVNode)("v-if",!0)],64)}),256)}]]),Ei=Si;var ki={class:"col-lg-6"},_i={class:"mb-2"},Ci=["value"],Ni={class:"text text-danger"},Ai={class:"mb-2"},Bi=["value"],Di={class:"text text-danger"},xi={class:"mb-2"},Vi={class:"text text-danger"},Ti={class:"row"};const Mi={mounted:function(){},props:["dataLanguages","dataLanguageTables"],data:function(){return{languages:this.dataLanguages&&"null"!==this.dataLanguages?JSON.parse(this.dataLanguages):[],languageTables:this.dataLanguageTables&&"null"!==this.dataLanguageTables?JSON.parse(this.dataLanguageTables):[],messages:[],form:new Sr({tables:[],sourceLang:"",targetLang:""}),errors:{},saveUrl:"language/translateNow",errorMessage:""}},methods:{getCss:function(e){return 0===e.status?"text text-danger":"text text-success"},showError:function(e){for(var t in e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},onSuccess:function(e){console.log(e),0===e.isSaved?(J.show(this,e.message),this.errorMessage={},this.errorMessage=e.message):(this.errorMessage="",this.messages=e.message)},saveNow:function(){var e=this,t=v.admin_path(this.saveUrl);return this.form.post(t).then(function(t){return e.onSuccess(t)}).catch(function(t){return e.showError(t)}),!1}}},Oi=(0,S.A)(Mi,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("div",ki,[(0,t.createElementVNode)("form",{id:"addEditFrm",method:"post",class:"form-horizontal",role:"form",onSubmit:n[6]||(n[6]=(0,t.withModifiers)(function(){return i.saveNow&&i.saveNow.apply(i,arguments)},["prevent"])),onKeyup:n[7]||(n[7]=function(e){return i.hideErrorMessage(e)})},[(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",_i,[n[9]||(n[9]=(0,t.createElementVNode)("p",null,[(0,t.createElementVNode)("strong",null,"Source Language:"),(0,t.createTextVNode)(" Data will be copied from the selected lanuage ")],-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{required:"",name:"sourceLang",class:"form-select","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.form.sourceLang=e}),onChange:n[1]||(n[1]=function(e){return i.hideErrorMessage(e)})},[n[8]||(n[8]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.languages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name)+" - "+(0,t.toDisplayString)(e.iso_code),9,Ci)}),256))],544),[[t.vModelSelect,a.form.sourceLang]]),(0,t.createElementVNode)("div",Ni,(0,t.toDisplayString)(this.errors.sourceLang),1)])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",Ai,[n[11]||(n[11]=(0,t.createElementVNode)("p",null,[(0,t.createElementVNode)("strong",null,"Target Language:"),(0,t.createTextVNode)(" New record will be inserted with this language id in selected tables ")],-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{required:"",name:"targetLang",class:"form-select","onUpdate:modelValue":n[2]||(n[2]=function(e){return a.form.targetLang=e}),onChange:n[3]||(n[3]=function(e){return i.hideErrorMessage(e)})},[n[10]||(n[10]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.languages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name)+" - "+(0,t.toDisplayString)(e.iso_code),9,Bi)}),256))],544),[[t.vModelSelect,a.form.targetLang]]),(0,t.createElementVNode)("div",Di,(0,t.toDisplayString)(this.errors.targetLang),1)])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",xi,[n[12]||(n[12]=(0,t.createElementVNode)("p",null,"Select tables",-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{required:"",style:{height:"200px"},name:"tables",class:"form-select",multiple:"","onUpdate:modelValue":n[4]||(n[4]=function(e){return a.form.tables=e}),onChange:n[5]||(n[5]=function(e){return i.hideErrorMessage(e)})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.languageTables,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",null,(0,t.toDisplayString)(e.name),1)}),256))],544),[[t.vModelSelect,a.form.tables]]),(0,t.createElementVNode)("div",Vi,(0,t.toDisplayString)(this.errors.tables),1)])]),(0,t.createElementVNode)("div",Ti,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-danger"},(0,t.toDisplayString)(a.errorMessage),513),[[t.vShow,"string"==typeof a.errorMessage&&""!=a.errorMessage]]),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.messages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(i.getCss(e))},(0,t.toDisplayString)(e.message),3)}),256)),n[13]||(n[13]=(0,t.createElementVNode)("div",{class:"form-group center-align"},[(0,t.createElementVNode)("input",{type:"submit",name:"submit",value:"Submit and Hold on",class:"btn btn-success btn-large"})],-1))])],32)])])}]]);var Ii={class:"d-flex flex-column flex-shrink-0 t_left js_left_menu"},ji={class:"list-unstyled ps-0"},Pi={key:0},Fi=["title","href"],Li=["title","href"],Ri={class:"dropdown"},Ui=["href"];const Hi={mounted:function(){},props:["dataList","dataControllerName","dataModulesAllowed","dataIsAdmin","dataHashtagcmsVersion"],data:function(){return{allData:this.dataList?JSON.parse(this.dataList):[],modulesAllowed:this.dataModulesAllowed?JSON.parse(this.dataModulesAllowed):[]}},computed:{linkForHashtag:function(){return"https://www.hashtagcms.org/?utm_src=".concat(window.location.href)}},methods:{getIconLabel:function(e){return""!==e.icon_css&&e.icon_css?"":e.controller_name.charAt(0).toUpperCase()},getIconCss:function(e){return""!==e.icon_css&&e.icon_css?e.icon_css:"badge badge-info text-small"},hasChild:function(e){return e.child.length>0},getActiveCss:function(e,t){return this.isActive(e,t)?"active":""},isActive:function(e,t){if(this.dataControllerName===e)return!0;if(t&&t.child&&t.child.length>0){var n=this.dataControllerName;return t.child.find(function(e){return e.controller_name===n})}},getHref:function(e){return v.admin_path(e.controller_name)},hideAll:function(){document.querySelectorAll(".js_left_menu .js_child").forEach(function(e){e.classList.remove("active","animated","fadeIn")})},showHide:function(e){this.hideAll();var t=e.target;t.classList.contains("js_more")&&(e.preventDefault(),t.parentElement.nextElementSibling.classList.add("active","animated","fadeIn"))},hasAccess:function(e){if("1"===this.dataIsAdmin.toString())return!0;for(var t=0;t<this.modulesAllowed.length;t++)if(this.modulesAllowed[t].module_id===e)return!0;return!1},getMinHeight:function(){return"height:".concat(window.innerHeight,"px;")}}},$i=(0,S.A)(Hi,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ii,[(0,t.createElementVNode)("ul",ji,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allData,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[0===e.parent_id?((0,t.openBlock)(),(0,t.createElementBlock)("li",Pi,[(0,t.createElementVNode)("a",{title:e.sub_title,href:i.getHref(e),class:(0,t.normalizeClass)("text-white "+i.getActiveCss(e.controller_name,e)),"aria-expanded":"true"},[i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:"js_more fa fa-ellipsis-v pull-right adjustMore",onClick:n[0]||(n[0]=function(e){return i.showHide(e)})})):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("i",{class:(0,t.normalizeClass)(e.icon_css+" fa-icons"),"aria-hidden":"true"},null,2),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(e.name),1)],10,Fi),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("ul",{key:0,class:(0,t.normalizeClass)("js_child btn-toggle-nav list-unstyled fw-normal "+i.getActiveCss(e.controller_name,e))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",null,[(0,t.createElementVNode)("a",{title:e.sub_title,href:i.getHref(e),class:(0,t.normalizeClass)("text-white "+i.getActiveCss(e.controller_name,e))},[(0,t.createElementVNode)("i",{class:(0,t.normalizeClass)(e.icon_css+" fa-icons"),"aria-hidden":"true"},null,2),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(e.name),1)],10,Li)])}),256))],2)):(0,t.createCommentVNode)("v-if",!0)])):(0,t.createCommentVNode)("v-if",!0)],64)}),256))]),n[1]||(n[1]=(0,t.createElementVNode)("hr",null,null,-1)),(0,t.createElementVNode)("div",Ri,[(0,t.createElementVNode)("a",{title:"Open HashtagCms.org",href:i.linkForHashtag,target:"_blank",class:"d-flex align-items-center text-light text-decoration-none","data-bs-toggle":"dropdown","aria-expanded":"false"},[(0,t.createElementVNode)("strong",null,"v"+(0,t.toDisplayString)(o.dataHashtagcmsVersion),1)],8,Ui)])])}]]);function qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var zi={key:0},Ki={class:"sortable-list js_sortable"},Wi=["data-id"],Ji=["innerHTML"],Xi={key:0,class:"inline"},Yi=["for"],Gi=["id"],Zi={class:"child accordion-body js_sortable"},Qi=["data-id"],el={key:1,class:"center-align mt-3"};const tl={components:{"split-button":k},mounted:function(){this.enableSorting()},props:["dataAllData","dataFields","dataControllerName","dataControllerChildName","dataGroups","dataGroupName","dataShowGroups"],data:function(){return{allData:this.dataAllData&&"null"!==this.dataAllData?JSON.parse(this.dataAllData):[],groups:this.dataGroups&&""!==this.dataGroups?JSON.parse(this.dataGroups):[],groupName:this.dataGroupName&&""!==this.dataGroupName?this.dataGroupName:"",showGroups:!(!this.dataShowGroups||"true"!==this.dataShowGroups)}},computed:{fields:function(){var e=this.dataFields&&"null"!==this.dataFields?JSON.parse(this.dataFields):null;return null===e&&((e={}).id="id",e.label="name",e.isImage=!1),e},controllerName:function(){return(void 0===this.dataControllerName?"":this.dataControllerName.toLowerCase()).replace(/\s/g,"")},controlerChildName:function(){return(void 0===this.dataControllerChildName?"":this.dataControllerChildName.toLowerCase()).replace(/\s/g,"")},selectedIndex:function(){for(var e=0,t=0;t<this.groups.length;t++)if(this.groups[t]===this.groupName){e=t;break}return e}},methods:{isParent:function(e){return 0===e.parent_id||!e.parent_id},arrangeAgain:function(e){window.location.href=v.admin_path(this.controllerName+"/sort/"+e.value)},hasChild:function(e){return e.child&&e.child.length>0},getName:function(e){if(!0===this.fields.isImage){var t=e[this.fields.label]?v.get_media(e[this.fields.label]):v.get_media(e.lang[this.fields.label]);return"<a href='".concat(t,"' target='_blank'><img height='30' src='").concat(t,"' /></a>")}return e[this.fields.label]?e[this.fields.label]:e.lang[this.fields.label]},getId:function(e){return e[this.fields.id]},enableSorting:function(){this.$nextTick(function(){document.querySelectorAll(".js_sortable").forEach(function(e){Xn.create(e,{animation:500,ghostClass:"text-danger",onUpdate:function(e){}})})})},submit:function(e,t,n,o){var r=this;return X.show(this,"Please wait. Saving sorting data..."),new Promise(function(a,i){axios[e](t,n).then(function(e){r.onSuccess(e,o)}).catch(function(e){r.onFailure((0,g.safeErrorData)(e))}).finally(function(){X.hide(r)})})},updateIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.querySelectorAll(".item"),n=[],o=this.controllerName,r=!0;""!==this.controlerChildName&&(r=!1),o=!0===e?this.controllerName:""!==this.controlerChildName?this.controlerChildName:this.controllerName;var a=1;console.log("saveAll "+r),t.forEach(function(t,o){if(!0===r){var i=t.getAttribute("data-id"),l=a;n.push({position:l,where:{id:parseInt(i)}}),a+=1}else{var s=t.getAttribute("data-is-parent");if(t.getAttribute("data-id"),e.toString()===s.toString()){var c=t.getAttribute("data-id"),d=a;n.push({position:d,where:{id:parseInt(c)}}),a+=1}}});var i=v.admin_path(o+"/updateIndex");this.submit("post",i,n,o)},onSuccess:function(e,t){J.show(this,t.toUpperCase()+" Sorted.")},onFailure:function(e){J.show(this,(null==e?void 0:e.statusText)||"There is some error! Don't know the reason",5e3),console.log(e)},setData:function(e){this.allData=e}}},nl=(0,S.A)(tl,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("split-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[a.showGroups?((0,t.openBlock)(),(0,t.createElementBlock)("h4",zi,[n[1]||(n[1]=(0,t.createTextVNode)(" Arrange Menus ",-1)),(0,t.createVNode)(l,{"data-options":a.groups,onChange:i.arrangeAgain,"data-selected":i.selectedIndex},null,8,["data-options","onChange","data-selected"])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",Ki,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allData,function(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[i.isParent(e)?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:0,"data-is-parent":"true",class:"item","data-id":i.getId(e)},[(0,t.createElementVNode)("span",{innerHTML:i.getName(e)},null,8,Ji),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Xi,[(0,t.createElementVNode)("label",{for:"item_"+o,class:"accordion-header pull-right"},(r=n[2]||(n[2]=[(0,t.createElementVNode)("span",{class:"fa fa-ellipsis-v ellipsis"},null,-1)]),function(e){if(Array.isArray(e))return qi(e)}(r)||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 qi(e,t);var n={}.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)?qi(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.")}()),8,Yi),(0,t.createElementVNode)("input",{id:"item_"+o,type:"checkbox",class:"accordion-control"},null,8,Gi),(0,t.createElementVNode)("ul",Zi,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-is-parent":"false",class:"item","data-id":i.getId(e)},(0,t.toDisplayString)(i.getName(e)),9,Qi)}),256))])])):(0,t.createCommentVNode)("v-if",!0)],8,Wi)):(0,t.createCommentVNode)("v-if",!0)],64);var r}),256))]),a.allData.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",el,[(0,t.createElementVNode)("input",{type:"button",class:"btn btn-success btn-from-submit",value:"Save",onClick:n[0]||(n[0]=function(e){return i.updateIndex()})})])):(0,t.createCommentVNode)("v-if",!0)])}]]),ol=nl;function rl(e){return function(e){if(Array.isArray(e))return al(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 al(e,t);var n={}.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)?al(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 al(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var il=["action"],ll={class:"form-group row"},sl={class:"col-sm-10"},cl={class:"form-group row"},dl={class:"col-sm-7"},ul={class:"text text-danger"},fl={class:"form-group row"},hl={class:"col-sm-7"},ml={class:"text text-danger"},pl={class:"form-group row"},gl={class:"col-sm-7"},vl={class:"text text-danger"},yl={class:"form-group row"},bl={class:"col-sm-7"},wl=["value"],Sl={class:"text text-danger"},El={class:"form-group row"},kl={class:"col-sm-7"},_l={class:"text text-danger"},Cl={class:"form-group row"},Nl={class:"col-sm-7"},Al={class:"text text-danger"},Bl={class:"form-group row"},Dl={class:"col-sm-7"},xl={class:"text text-danger"},Vl={key:0},Tl={class:"form-group row"},Ml={class:"col-sm-7"},Ol=["value"],Il={class:"col-sm-5"},jl={key:0,class:"models"},Pl={class:"form-group row"},Fl={class:"col-sm-7"},Ll=["value"],Rl={key:0,class:"fieldset"},Ul={class:"models_row"},Hl={class:"models"},$l=["value","onChange"],ql=["onChange"],zl=["onUpdate:modelValue"],Kl=["onClick"],Wl={key:0,class:"row"},Jl={key:1,class:"form-group row"},Xl={class:"col-auto"},Yl={class:"card shadow-sm models-box"},Gl={class:"card-header"},Zl={class:"card-body p-0 m-0 tables_panel"},Ql={class:"list-group list-group-flush"},es=["onClick"],ts={class:"col-auto"},ns={class:"card shadow-sm models-box"},os={class:"card-header"},rs=["onClick"],as={class:"card-body p-0 m-0 tables_panel"},is={class:"list-group list-group-flush"},ls=["onClick"],ss={key:2,class:"row mt-3"},cs={class:"col"},ds={class:"card shadow-sm"},us={class:"card-header"},fs={class:"card-body"},hs={id:"selectedFields"},ms=["data-fieldname"],ps=["onClick"],gs={class:"row mt-3"},vs={key:0,class:"alert alert-danger"},ys={class:"form-group center-align"},bs=["href"],ws=__webpack_require__(742),Ss=__webpack_require__.n(ws),Es=__webpack_require__(127),ks=__webpack_require__.n(Es);function _s(e){return _s="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},_s(e)}function Cs(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ns(o.key),o)}}function Ns(e){var t=function(e){if("object"!=_s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_s(t)?t:t+""}var As=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"data",get:function(){return{}}},{key:"getFields",value:function(e){return new Promise(function(t,n){Ss().get("getFields?table="+e).then(function(e){t(e)}).catch(function(){n(this)})})}}],null&&Cs(e.prototype,null),t&&Cs(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Bs={mounted:function(){},props:["dataDatabaseTables","dataControllerName","dataBackUrl","dataCmsModules"],computed:{saveURL:function(){return v.admin_path(this.dataControllerName+"/createModule")}},data:function(){return{allTables:void 0!==this.dataDatabaseTables?JSON.parse(this.dataDatabaseTables):[],allModules:void 0!==this.dataCmsModules?JSON.parse(this.dataCmsModules):[],mainModel:{tableName:"",fields:[],modelName:"",selected:[]},relationModels:{tableName:"",models:[]},form:new Sr({name:"",controller_name:"",validator_name:"",dataWith:[],dataSource:"",createFiles:!0,selectedFields:[],relationModels:[],parent_id:"",display_name:"",sub_title:"",icon_css:"",list_view_name:"",edit_view_name:""}),errors:{},cacheData:{},sortable:null,sortingInterval:-1,errorMessage:""}},methods:{updateControllerName:function(e){var t=e||this.form.name;t=t.toLowerCase().replace(/\s/g,""),this.form.controller_name=ks().singular(t),this.form.validator_name=this.form.controller_name,void 0!==e&&this.isControllerExists(this.form.controller_name),this.form.icon_css=this.form.controller_name},getModelName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(e=ks().singular(e)+"::class").split("_");return(t=t.map(function(e){return e.charAt(0).toUpperCase()+e.substr(1,e.length)})).join("")},populateMainDataFields:function(){var e=this;""!==this.mainModel.tableName&&(this.mainModel.fields=["Please wait..."],As.getFields(this.mainModel.tableName).then(function(t){e.mainModel.fields=t.data}),this.mainModel.modelName=this.getModelName(this.mainModel.tableName),this.form.dataSource=this.mainModel.modelName)},updateWithData:function(){this.form.dataWith=[];for(var e=0;e<this.relationModels.models.length;e++){var t=this.relationModels.models[e];-1===this.form.dataWith.indexOf(t.relationAlias)&&this.form.dataWith.push(t.relationAlias)}},addRelationModel:function(){var e=this;if(""!==this.relationModels.tableName){var t=this.relationModels.tableName,n=this.getModelName(t);if(!1===this.hasInRelationModel(n)){var o;o=t.endsWith("_langs")||t.endsWith("_sites")?t.endsWith("_langs")?"lang":"site":ks().singular(t.replace(/_/g,"")).toLowerCase();var r={model:n,relationAlias:o,relationType:"hasMany",isLanguage:"lang"===o,fields:[],selected:[]};this.cacheData[n]||this.relationModels.models.push(r),this.cacheData[n]=r,this.cacheData[n].fields=["Please wait..."],As.getFields(t).then(function(t){e.cacheData[n].fields=t.data}),this.updateWithData()}}},hasInRelationModel:function(e){return this.cacheData[e]||!1},updateRelationModel:function(e,t,n){var o=this.relationModels.models[t][n];this.relationModels.models[t][n]=e.target.value,"relationAlias"===n&&(this.relationModels.models[t].selected=[],this.removeSelectedRelationFields(o)),this.updateWithData()},removeSelectedRelationFields:function(e){if(this.mainModel.selected.length>0){for(var t=[],n=0;n<this.mainModel.selected.length;n++){var o=this.mainModel.selected[n];o.startsWith(e+".")||t.push(o)}this.mainModel.selected=t}},removeRelationModel:function(e,t){var n=this.relationModels.models[e].relationAlias;delete this.cacheData[t],this.relationModels.models.splice(e,1),this.relationModels.tableName="",this.removeSelectedRelationFields(n)},hasRelation:function(){return this.relationModels.models.length>0},hasMainDataSource:function(){return""!==this.mainModel.tableName},selectAllField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e.selected.length)e.selected=e.fields.slice(),""!==t&&(e.selected=e.selected.map(function(e){return t+"."+e}));else for(var n=0;n<e.fields.length;n++)this.selectField(e.fields[n],e,t);this.enableSorting()},selectField:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e=""!==n?n+"."+e:e,-1===t.selected.indexOf(e)&&t.selected.push(e),this.enableSorting()},removeField:function(e,t){e.selected.splice(t,1)},removeAllField:function(e){e.selected=[],this.form.selectedFields=[]},isControllerExists:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==e){var t=this;Ss().get("isControllerExists?name="+e).then(function(e){1===e.data&&J.show(t,"Controller already exist")})}},createModule:function(){var e=this;this.setSortedFields(),this.form.relationModels=this.relationModels,this.form.post(this.saveURL).then(function(t){return e.resetForm(t)}).catch(function(t){return e.showError(t)})},enableSorting:function(){this.$nextTick(function(){null!=this.sortable&&this.sortable.destroy();var e=document.getElementById("selectedFields");this.sortable=Xn.create(e,{onEnd:this.sortingCallback,onStart:this.cancelSortingCallback})})},cancelSortingCallback:function(){-1!==this.sortingInterval&&clearInterval(this.sortingInterval)},sortingCallback:function(){this.cancelSortingCallback()},setSortedFields:function(){var e=document.querySelectorAll("#selectedFields li"),t=e.length;if(t>1){for(var n=[],o=0;o<t;o++){var r=e[o].getAttribute("data-fieldname");n.push(r)}this.form.selectedFields=n}},showError:function(e){for(var t in this.errors={},e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},resetForm:function(e){this.mainModel={tableName:"",fields:[],modelName:"",selected:[]},this.relationModels={tableName:"",models:[]},0===e.created?(J.show(this,"There is some error..."),this.errorMessage=e.message):J.show(this,"Created...")}}},Ds=(0,S.A)(Bs,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("form",{action:i.saveURL,class:"form-horizontal",method:"post",role:"form",onKeyup:n[17]||(n[17]=function(e){return i.hideErrorMessage(e)}),onSubmit:n[18]||(n[18]=(0,t.withModifiers)(function(){return i.createModule&&i.createModule.apply(i,arguments)},["prevent"]))},[(0,t.createElementVNode)("div",ll,[(0,t.createElementVNode)("label",sl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.form.createFiles=e}),type:"checkbox",name:"create-validator"},null,512),[[t.vModelCheckbox,a.form.createFiles]]),n[19]||(n[19]=(0,t.createTextVNode)(" Create Files (Controller/Model/View/Vaidator) - ",-1)),n[20]||(n[20]=(0,t.createElementVNode)("small",{class:"text-info"},"Try creating it from terminal command. It might not work due to rights",-1))])]),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.form.display_name=e}),type:"hidden"},null,512),[[t.vModelText,a.form.display_name]]),(0,t.createElementVNode)("div",cl,[n[21]||(n[21]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Name",-1)),(0,t.createElementVNode)("div",dl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.form.name=e}),class:"form-control",name:"name",placeholder:"Module name",required:"",type:"text",onBlur:n[3]||(n[3]=function(e){return i.updateControllerName()})},null,544),[[t.vModelText,a.form.name]]),(0,t.createElementVNode)("div",ul,(0,t.toDisplayString)(this.errors.name),1)])]),(0,t.createElementVNode)("div",fl,[n[22]||(n[22]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Sub Title",-1)),(0,t.createElementVNode)("div",hl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return a.form.sub_title=e}),class:"form-control",name:"name",placeholder:"Sub title",type:"text"},null,512),[[t.vModelText,a.form.sub_title]]),(0,t.createElementVNode)("div",ml,(0,t.toDisplayString)(this.errors.sub_title),1)])]),(0,t.createElementVNode)("div",pl,[n[23]||(n[23]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Controller Name (link rewrite)",-1)),(0,t.createElementVNode)("div",gl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[5]||(n[5]=function(e){return a.form.controller_name=e}),class:"form-control",name:"controller_name",placeholder:"Controller name",required:"",type:"text",onBlur:n[6]||(n[6]=function(e){return i.updateControllerName(a.form.controller_name)})},null,544),[[t.vModelText,a.form.controller_name]]),(0,t.createElementVNode)("div",vl,(0,t.toDisplayString)(this.errors.controller_name),1)])]),(0,t.createElementVNode)("div",yl,[n[25]||(n[25]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Parent",-1)),(0,t.createElementVNode)("div",bl,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return a.form.parent_id=e}),class:"form-select select-big"},[n[24]||(n[24]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allModules,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,wl)}),256))],512),[[t.vModelSelect,a.form.parent_id]]),(0,t.createElementVNode)("div",Sl,(0,t.toDisplayString)(this.errors.parent_id),1)])]),(0,t.createElementVNode)("div",El,[n[26]||(n[26]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Icon CSS",-1)),(0,t.createElementVNode)("div",kl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[8]||(n[8]=function(e){return a.form.icon_css=e}),class:"form-control",name:"name",placeholder:"Icon CSS",required:"",type:"text"},null,512),[[t.vModelText,a.form.icon_css]]),(0,t.createElementVNode)("div",_l,(0,t.toDisplayString)(this.errors.icon_css),1)])]),(0,t.createElementVNode)("div",Cl,[n[27]||(n[27]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"List View Name",-1)),(0,t.createElementVNode)("div",Nl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[9]||(n[9]=function(e){return a.form.list_view_name=e}),class:"form-control",name:"name",placeholder:"Enter list view Name (Default list view is common/listing)",type:"text"},null,512),[[t.vModelText,a.form.list_view_name]]),(0,t.createElementVNode)("div",Al,(0,t.toDisplayString)(this.errors.list_view_name),1)])]),(0,t.createElementVNode)("div",Bl,[n[28]||(n[28]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Edit View Name",-1)),(0,t.createElementVNode)("div",Dl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[10]||(n[10]=function(e){return a.form.edit_view_name=e}),class:"form-control",name:"name",placeholder:"Edit list view Name (Default edit view is addedit)",type:"text"},null,512),[[t.vModelText,a.form.edit_view_name]]),(0,t.createElementVNode)("div",xl,(0,t.toDisplayString)(this.errors.edit_view_name),1)])]),a.form.createFiles?((0,t.openBlock)(),(0,t.createElementBlock)("div",Vl,[(0,t.createElementVNode)("div",Tl,[n[30]||(n[30]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Data Source",-1)),(0,t.createElementVNode)("div",Ml,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return a.mainModel.tableName=e}),class:"form-select select-big",onChange:n[12]||(n[12]=function(e){return i.populateMainDataFields()})},[n[29]||(n[29]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allTables,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.name},(0,t.toDisplayString)(e.name),9,Ol)}),256))],544),[[t.vModelSelect,a.mainModel.tableName]]),(0,t.createElementVNode)("div",Il,[""!=a.mainModel.tableName?((0,t.openBlock)(),(0,t.createElementBlock)("span",jl,(0,t.toDisplayString)(i.getModelName(a.mainModel.tableName)),1)):(0,t.createCommentVNode)("v-if",!0)])])]),(0,t.createElementVNode)("div",Pl,[n[35]||(n[35]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Data with? Choose another model.",-1)),(0,t.createElementVNode)("div",Fl,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return a.relationModels.tableName=e}),class:"form-select select-big",onChange:n[14]||(n[14]=function(e){return i.addRelationModel()})},[n[31]||(n[31]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allTables,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.name},(0,t.toDisplayString)(e.name),9,Ll)}),256))],544),[[t.vModelSelect,a.relationModels.tableName]]),(0,t.createElementVNode)("div",null,[i.hasRelation()?((0,t.openBlock)(),(0,t.createElementBlock)("fieldset",Rl,[n[34]||(n[34]=(0,t.createElementVNode)("legend",{class:"small legendTitle"},"Relation Models",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.relationModels.models,function(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ul,[(0,t.createElementVNode)("span",Hl,[(0,t.createTextVNode)((0,t.toDisplayString)(e.model)+" ",1),(0,t.createElementVNode)("input",{value:e.relationAlias,name:"relation",placeholder:"Relation name",type:"text",onChange:function(e){return i.updateRelationModel(e,o,"relationAlias")}},null,40,$l),(0,t.createElementVNode)("select",{class:"select",name:"relationType",onChange:function(e){return i.updateRelationModel(e,o,"relationType")}},rl(n[32]||(n[32]=[(0,t.createElementVNode)("option",{value:"hasMany"},"hasMany",-1),(0,t.createElementVNode)("option",{value:"belongsTo"},"belongsTo",-1),(0,t.createElementVNode)("option",{value:"hasOne"},"hasOne",-1)])),40,ql),n[33]||(n[33]=(0,t.createTextVNode)(" isLanguage: ",-1)),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":function(t){return e.isLanguage=t},type:"checkbox",name:"relationModel"},null,8,zl),[[t.vModelCheckbox,e.isLanguage]]),(0,t.createElementVNode)("span",{class:"small fa fa-close",onClick:function(t){return i.removeRelationModel(o,e.model)}},null,8,Kl)])])}),256))])):(0,t.createCommentVNode)("v-if",!0)])])]),i.hasMainDataSource()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Wl,rl(n[36]||(n[36]=[(0,t.createElementVNode)("strong",null,"Click on fields to choose",-1)])))):(0,t.createCommentVNode)("v-if",!0),i.hasMainDataSource()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Jl,[(0,t.createElementVNode)("div",Xl,[(0,t.createElementVNode)("div",Yl,[(0,t.createElementVNode)("div",Gl,[(0,t.createElementVNode)("span",{class:"text-small pull-right hand text-success",onClick:n[15]||(n[15]=function(e){return i.selectAllField(a.mainModel)})},"Add all »"),(0,t.createTextVNode)((0,t.toDisplayString)(i.getModelName(a.mainModel.tableName)),1),n[37]||(n[37]=(0,t.createElementVNode)("br",null,null,-1))]),(0,t.createElementVNode)("div",Zl,[(0,t.createElementVNode)("ul",Ql,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.mainModel.fields,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"list-group-item",onClick:function(t){return i.selectField(e,a.mainModel)}},(0,t.toDisplayString)(e),9,es)}),256))])])])]),i.hasRelation()?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(a.relationModels.models,function(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("div",ts,[(0,t.createElementVNode)("div",ns,[(0,t.createElementVNode)("div",os,[(0,t.createElementVNode)("span",{class:"text-small pull-right hand text-success",onClick:function(t){return i.selectAllField(a.mainModel,e.relationAlias)}},"Add all »",8,rs),(0,t.createTextVNode)((0,t.toDisplayString)(e.model),1),n[38]||(n[38]=(0,t.createElementVNode)("br",null,null,-1)),(0,t.createTextVNode)("->with['"+(0,t.toDisplayString)(e.relationAlias)+"'] ",1)]),(0,t.createElementVNode)("div",as,[(0,t.createElementVNode)("ul",is,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,function(n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"list-group-item",onClick:function(t){return i.selectField(n,a.mainModel,e.relationAlias)}},(0,t.toDisplayString)(n),9,ls)}),256))])])])])}),256)):(0,t.createCommentVNode)("v-if",!0)])):(0,t.createCommentVNode)("v-if",!0),a.mainModel.selected.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",ss,[(0,t.createElementVNode)("div",cs,[(0,t.createElementVNode)("div",ds,[(0,t.createElementVNode)("div",us,[n[39]||(n[39]=(0,t.createTextVNode)(" Selected Fields ",-1)),(0,t.createElementVNode)("span",{class:"text-small pull-right hand text-danger",onClick:n[16]||(n[16]=function(e){return i.removeAllField(a.mainModel)})},"Remove all")]),(0,t.createElementVNode)("div",fs,[(0,t.createElementVNode)("ul",hs,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.mainModel.selected,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"fields non-selectable","data-fieldname":e},[(0,t.createTextVNode)((0,t.toDisplayString)(e)+" ",1),(0,t.createElementVNode)("span",{class:"small fa fa-close",onClick:function(e){return i.removeField(a.mainModel,n)}},null,8,ps)],8,ms)}),256))])])])])])):(0,t.createCommentVNode)("v-if",!0)])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",gs,[""!==a.errorMessage?((0,t.openBlock)(),(0,t.createElementBlock)("div",vs,(0,t.toDisplayString)(a.errorMessage),1)):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",ys,[n[40]||(n[40]=(0,t.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Cancel",8,bs)])])],40,il)])}]]),xs=Ds;var Vs={key:0,class:"alert alert-info"},Ts={key:1,class:"row"},Ms={class:"form-group center-align"},Os=["href"],Is=["action"],js={class:"checkbox title"},Ps={class:"text-info"},Fs={class:"list-unstyled list-permission"},Ls={class:"clearfix"},Rs={key:0,class:"row p-2"},Us={class:"col"},Hs=["onClick","onUpdate:modelValue","id","data-id"],$s=["for"],qs={class:"col-auto"},zs=["id","onUpdate:modelValue","onClick"],Ks={key:1,class:"list-unstyled clearfix",style:{"margin-left":"20px"}},Ws={class:"clearfix"},Js={class:"row p-2"},Xs={class:"col"},Ys=["onClick","onUpdate:modelValue","id","data-id"],Gs=["for"],Zs={class:"col-auto"},Qs=["id","onUpdate:modelValue","onClick"],ec={class:"row"},tc={key:0,class:"alert alert-danger"},nc={class:"form-group center-align"},oc=["href"];const rc={mounted:function(){var e=this;this.form.cmsModuleData=this.allModules,this.form.userId=this.userModules.id,this.showSuperAdmin(),H.on("on-paste",function(t){e.handlePaste(t)})},props:["dataCmsModules","dataUserModules","dataControllerName","dataBackUrl","dataIsSuperAdmin"],data:function(){return{userModules:this.dataUserModules?JSON.parse(this.dataUserModules):[],form:new Sr({cmsModuleData:[],userId:0}),selectAllModule:!1,superAdmin:!1,errorMessage:""}},computed:{allModules:function(){var e=this.userModules.cmsmodules,t=this.dataCmsModules?JSON.parse(this.dataCmsModules):[],n=[];if(t.length>0)for(var o=0;o<t.length;o++){var r=t[o],a=c(r);if(r.selected=!!a,r.readonly=1===a.readonly,0===r.parent_id&&r.child.length>0)for(var i=0;i<r.child.length;i++){var l=r.child[i],s=c(l);l.selected=!!s,l.readonly=1===s.readonly}0===r.parent_id&&n.push(r)}return n;function c(t){if(e.length>0){var n=e.find(function(e){return e.module_id.toString()===t.id.toString()});return void 0!==n&&n}return!1}},permissionSaveUrl:function(){return v.admin_path(this.dataControllerName+"/saveModulePermissions")},csrfToken:function(){var e,t;return(null===(e=window.HashtagCms)||void 0===e?void 0:e.csrfToken)||(null===(t=window.Laravel)||void 0===t?void 0:t.csrfToken)}},methods:{handlePaste:function(e){var t;function n(e){for(var n in t){var o=document.getElementById("check_"+e),r=document.getElementById("check_readonly_"+e);if(o&&o.checked)return{selected:!0,readonly:r.checked}}return{selected:!1,readonly:!1}}t=JSON.parse(e),this.form.cmsModuleData.forEach(function(e,t){var o=n(e.id);o.selected&&(e.selected=!0,e.readonly=o.readonly),e.child.length>0&&e.child.forEach(function(e,t){var o=n(e.id);o.selected&&(e.selected=!0,e.readonly=o.readonly)})})},hasChild:function(e){return e.child&&e.child.length>0},isParent:function(e){return 0===e.parent_id},selectReadOnly:function(e,t){var n=t.target.checked;!0!==e.selected&&(e.selected=n)},selectAll:function(){for(var e=!1===this.selectAllModule,t=0;t<this.form.cmsModuleData.length;t++){var n=this.form.cmsModuleData[t];n.selected=e,this.selectMe(n,void 0,e)}},selectMe:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=!1===e.selected;if(null!==n&&(o=n),e.child&&e.child.length>0&&e.child.map(function(e){e.selected=o,o||(e.readonly=!1)}),!0!==o&&(e.readonly=!1),t){var r=t.child.find(function(e){return!0===e.selected});(o||r)&&(t.selected=!0)}!1===o&&(this.selectAllModule=!1)},showSuperAdmin:function(){"1"!==this.dataIsSuperAdmin.toString()&&"true"!==this.dataIsSuperAdmin.toString()||(this.superAdmin=!0)},saveData:function(){var e=this;this.form.post(this.permissionSaveUrl,!1).then(function(t){return e.afterFormSaved(t)}).catch(function(t){return e.afterFormSaved(t)})},afterFormSaved:function(e){!0===e.isSaved?J.show(this,"Saved Successfully. "):J.show(this,"There is some error.")},goBack:function(){window.location=this.dataBackUrl}}},ac=(0,S.A)(rc,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[a.superAdmin?((0,t.openBlock)(),(0,t.createElementBlock)("div",Vs,[(0,t.createElementVNode)("strong",null,(0,t.toDisplayString)(a.userModules.name),1),n[3]||(n[3]=(0,t.createTextVNode)(" is admin or super admin. No need to provide module access. ",-1))])):(0,t.createCommentVNode)("v-if",!0),a.superAdmin?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ts,[(0,t.createElementVNode)("div",Ms,[(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-primary"},"Okay :)",8,Os)])])):(0,t.createCommentVNode)("v-if",!0),a.superAdmin?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:2,action:i.permissionSaveUrl,class:"form-horizontal",method:"post",role:"form",onSubmit:n[2]||(n[2]=(0,t.withModifiers)(function(){return i.saveData&&i.saveData.apply(i,arguments)},["prevent"]))},[(0,t.createElementVNode)("div",js,[(0,t.createElementVNode)("h4",null,[(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.selectAllModule=e}),type:"checkbox",onClick:n[1]||(n[1]=function(e){return i.selectAll()})},null,512),[[t.vModelCheckbox,a.selectAllModule]]),n[4]||(n[4]=(0,t.createTextVNode)(" Select ",-1))]),n[5]||(n[5]=(0,t.createTextVNode)(" modules for ",-1)),(0,t.createElementVNode)("span",Ps,(0,t.toDisplayString)(a.userModules.name)+" "+(0,t.toDisplayString)(a.userModules.last_name),1)])]),(0,t.createElementVNode)("ul",Fs,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.form.cmsModuleData,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",Ls,[i.isParent(e)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Rs,[(0,t.createElementVNode)("div",Us,[(0,t.withDirectives)((0,t.createElementVNode)("input",{onClick:function(t){return i.selectMe(e)},class:"form-check-input",type:"checkbox","onUpdate:modelValue":function(t){return e.selected=t},id:"check_"+e.id,"data-id":e.id,"data-is-parent":"true"},null,8,Hs),[[t.vModelCheckbox,e.selected]]),(0,t.createElementVNode)("label",{class:"form-check-label",for:"check_"+e.id}," "+(0,t.toDisplayString)(e.name),9,$s)]),(0,t.createElementVNode)("div",qs,[(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"check_readonly_"+e.id,"onUpdate:modelValue":function(t){return e.readonly=t},type:"checkbox",onClick:function(t){return i.selectReadOnly(e,t)},"data-is-readonly-checkbox":"true"},null,8,zs),[[t.vModelCheckbox,e.readonly]]),n[6]||(n[6]=(0,t.createTextVNode)(" Read Only",-1))])])])):(0,t.createCommentVNode)("v-if",!0),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("ul",Ks,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(o){return(0,t.openBlock)(),(0,t.createElementBlock)("li",Ws,[(0,t.createElementVNode)("div",Js,[(0,t.createElementVNode)("div",Xs,[(0,t.withDirectives)((0,t.createElementVNode)("input",{onClick:function(t){return i.selectMe(o,e)},class:"form-check-input",type:"checkbox","onUpdate:modelValue":function(e){return o.selected=e},id:"check_"+o.id,"data-id":o.id,"data-is-parent":"false"},null,8,Ys),[[t.vModelCheckbox,o.selected]]),(0,t.createElementVNode)("label",{class:"form-check-label",for:"check_"+o.id,"data-is-readonly":"true"}," "+(0,t.toDisplayString)(o.name),9,Gs)]),(0,t.createElementVNode)("div",Zs,[(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"check_readonly_"+o.id,"onUpdate:modelValue":function(e){return o.readonly=e},type:"checkbox",onClick:function(e){return i.selectReadOnly(o,e,!0)},"data-is-readonly-checkbox":"true"},null,8,Qs),[[t.vModelCheckbox,o.readonly]]),n[7]||(n[7]=(0,t.createTextVNode)(" Read Only",-1))])])])])}),256))])):(0,t.createCommentVNode)("v-if",!0)])}),256))]),(0,t.createElementVNode)("div",ec,[""!==a.errorMessage?((0,t.openBlock)(),(0,t.createElementBlock)("div",tc,(0,t.toDisplayString)(a.errorMessage),1)):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",nc,[n[8]||(n[8]=(0,t.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Back",8,oc)])])],40,Is))])}]]);var ic={class:"row"},lc={class:"col-auto"},sc={key:0,class:"counters"},cc={class:"col-auto"},dc={key:0,class:"shadow-sm"},uc={class:"pagination"},fc=["href","innerHTML"],hc={key:0,class:"col float-end"},mc={class:"pull-right",style:{"margin-right":"16px"}};const pc={components:{"download-button":Qn},mounted:function(){this.updatePageParams();var e=this;H.on("pagination-on-delete",function(){e.decreaseCounter()})},props:["dataPaginator","dataFirstItem","dataLastItem","dataTotal","dataControllerName","dataNextLabel","dataPreviousLabel","dataShowDownload"],data:function(){return{totalCount:parseInt(this.dataTotal),lastItem:parseInt(this.dataLastItem),controllerName:this.dataControllerName,paginator:JSON.parse(this.dataPaginator),pageLabel:{"pagination.next":this.dataNextLabel,"pagination.previous":this.dataPreviousLabel},showDownload:"true"===this.dataShowDownload||"1"===this.dataShowDownload}},computed:{hasPreviousPage:function(){return null!=this.paginator.prev_page_url},allPages:function(){return this.paginator.links},showPagination:function(){return this.allPages.length>3}},methods:{decreaseCounter:function(){this.totalCount=this.totalCount-1,this.lastItem=this.lastItem-1},getLink:function(e){return null==e.url?"javascript:void(0)":e.url},getLabel:function(e){return this.pageLabel[e]?this.pageLabel[e]:e},getCss:function(e){return null==e.url?"page-item disabled":!0===e.active?"page-item active":"page-item"},updatePageParams:function(){var e=window.location.search.substring(1);null!=e.match(/page=\d+/gi)&&(e=e.replace(/page=\d+/,"")),""!==e&&(e=0===e.indexOf("&")?e:"&"+e,document.querySelectorAll(".pagination a").forEach(function(t,n){var o=t.href;o=(o=(o=o+""+e).replace(/&$/,"")).replace(/&&/,"&"),t.href=o}))}}},gc=(0,S.A)(pc,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("download-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",ic,[(0,t.createElementVNode)("div",lc,[a.totalCount>0?((0,t.openBlock)(),(0,t.createElementBlock)("span",sc,(0,t.toDisplayString)(o.dataFirstItem)+" - "+(0,t.toDisplayString)(a.lastItem)+" of "+(0,t.toDisplayString)(a.totalCount),1)):(0,t.createCommentVNode)("v-if",!0)]),(0,t.createElementVNode)("div",cc,[i.showPagination?((0,t.openBlock)(),(0,t.createElementBlock)("nav",dc,[(0,t.createElementVNode)("ul",uc,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.allPages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:(0,t.normalizeClass)(i.getCss(e))},[(0,t.createElementVNode)("a",{class:"page-link",href:i.getLink(e),innerHTML:i.getLabel(e.label)},null,8,fc)],2)}),256))])])):(0,t.createCommentVNode)("v-if",!0)]),a.totalCount>0&&a.showDownload?((0,t.openBlock)(),(0,t.createElementBlock)("div",hc,[(0,t.createElementVNode)("span",mc,[(0,t.createVNode)(l,{"data-controller-name":a.controllerName},null,8,["data-controller-name"])])])):(0,t.createCommentVNode)("v-if",!0)])}]]);var vc=["name","id","multiple"],yc=["value"],bc={class:"fa fa-refresh fa-spin","aria-hidden":"true"};const wc={components:{"split-button":k},props:["dataName","dataId","dataPlatforms","dataSelected","dataMultiple","dataSiteId","dataFetchOnInit"],mounted:function(){!1!==this.fetchOnInit&&this.init(),console.log("selected ",this.selected),H.$on("site_changed",this.populatePlatform)},computed:{selected:{get:function(){return void 0===this.dataMultiple||"true"!==this.dataMultiple?void 0===this.dataSelected?1:parseInt(this.dataSelected):void 0===this.dataSelected?[1]:JSON.parse(this.dataSelected)},set:function(e){return e}}},data:function(){return{platforms:void 0===this.dataPlatforms?[]:JSON.parse(this.dataPlatforms),name:void 0===this.dataName?"platform_id":this.dataName,id:void 0===this.dataId?"platform_id":this.dataId,multiple:void 0===this.dataMultiple?"":"multiple='multiple'",siteId:void 0===this.dataSiteId?1:parseInt(this.dataSiteId),fetchOnInit:void 0!==this.dataFetchOnInit&&"false"!==this.dataFetchOnInit&&this.dataFetchOnInit,isLoading:!1,selectedValue:this.selected}},methods:{init:function(){this.populatePlatform(this.siteId)},setPlatform:function(){H.$emit("platform_changed",this.selected)},populatePlatform:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e||""===e)return this.platforms=[],!1;this.isLoading=!0;var t=this,n=v.admin_path("ajax/getInfo/site/"+e);axios.get(n).then(function(e){t.platforms=e.data.results.platform,t.isLoading=!1}).catch(function(e){console.error(e.data)})}}},Sc=(0,S.A)(wc,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:a.name,id:a.id,onChange:n[0]||(n[0]=function(){return i.setPlatform&&i.setPlatform.apply(i,arguments)}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return i.selected=e}),multiple:"true"==o.dataMultiple&&a.multiple},[n[2]||(n[2]=(0,t.createElementVNode)("option",{value:""},"Select Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,yc)}),256))],40,vc),[[t.vModelSelect,i.selected]]),(0,t.withDirectives)((0,t.createElementVNode)("i",bc,null,512),[[t.vShow,a.isLoading]])])}]]);var Ec=["name","id"],kc=["value"];const _c={components:{"split-button":k},props:["dataName","dataId","dataSites","dataSelected"],mounted:function(){},data:function(){return{sites:void 0===this.dataSites?[]:JSON.parse(this.dataSites),selected:void 0===this.dataSelected?1:parseInt(this.dataSelected),name:void 0===this.dataName?"site_id":this.dataName,id:void 0===this.dataId?"site_id":this.dataId}},methods:{setSite:function(){H.$emit("site_changed",this.selected)}}},Cc=(0,S.A)(_c,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:a.name,id:a.id,onChange:n[0]||(n[0]=function(){return i.setSite&&i.setSite.apply(i,arguments)}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.selected=e})},[n[2]||(n[2]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,kc)}),256))],40,Ec),[[t.vModelSelect,a.selected]])])}]]);function Nc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Ac={class:"row"},Bc={class:"form-group"},Dc={class:"col-sm-4"},xc=["value"],Vc={class:"row margin-top-20"},Tc={class:"form-group"},Mc={class:"col-sm-4"},Oc=["value"],Ic={class:"row margin-top-20"},jc={class:"form-group"},Pc={class:"col-sm-4"},Fc={class:"alert alert-info text-center"},Lc={class:"alert alert-info"};const Rc={mounted:function(){},created:function(){},props:["dataAllSites"],data:function(){return{allSites:void 0===this.dataAllSites?[]:JSON.parse(this.dataAllSites),sourceSiteId:"",targetSiteId:"",isLoading:!1,errorMsg:"",successMsg:[]}},computed:{errorMessage:function(){return""===this.errorMsg?"It's undoable. Please be careful.":this.errorMsg}},methods:{getLabel:function(e){var t="";return e.name||e.alias?t=e.name||e.alias:e.lang&&(t=void 0===e.lang.name?"":e.lang.name),t},loading:function(e){this.isLoading=e},cloneSite:function(){var e=this;console.log("copying now..."),this.loading(1);var t=this,n={sourceSiteId:this.sourceSiteId,tagetSiteId:this.targetSiteId},o=v.admin_path("site/cloneSite");axios.post(o,n).then(function(n){console.log(n),function(e){var n=e.data;t.successMsg=n}(n),e.loading(2)}).catch(function(n){console.log("Error: ",n.response),t.errorMsg=n.response?n.response.data.message:n.message,e.loading(0)})},doAction:function(){this.cloneSite()}}},Uc=(0,S.A)(Rc,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("div",Ac,[(0,t.createElementVNode)("div",Bc,[n[4]||(n[4]=(0,t.createElementVNode)("div",{class:"col-sm-2"},"Copy From:",-1)),(0,t.createElementVNode)("div",Dc,[(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.sourceSiteId=e})},[n[3]||(n[3]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(i.getLabel(e)),9,xc)}),256))],512),[[t.vModelSelect,a.sourceSiteId]])])])]),(0,t.createElementVNode)("div",Vc,[(0,t.createElementVNode)("div",Tc,[n[6]||(n[6]=(0,t.createElementVNode)("div",{class:"col-sm-2"},"Copy To:",-1)),(0,t.createElementVNode)("div",Mc,[(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select","onUpdate:modelValue":n[1]||(n[1]=function(e){return a.targetSiteId=e})},[n[5]||(n[5]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(i.getLabel(e)),9,Oc)}),256))],512),[[t.vModelSelect,a.targetSiteId]])])])]),(0,t.createElementVNode)("div",Ic,[(0,t.createElementVNode)("div",jc,[n[8]||(n[8]=(0,t.createElementVNode)("div",{class:"col-sm-2"}," ",-1)),(0,t.createElementVNode)("div",Pc,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-danger text-center"},(0,t.toDisplayString)(i.errorMessage),513),[[t.vShow,""!=a.errorMsg&&!a.isLoading]]),(0,t.withDirectives)((0,t.createElementVNode)("div",Fc,(l=n[7]||(n[7]=[(0,t.createElementVNode)("span",{class:"fa fa-spinner fa-pulse fa-fw"}," ",-1),(0,t.createTextVNode)(" Please wait and don't close this window. It's not running in thread :) ",-1)]),function(e){if(Array.isArray(e))return Nc(e)}(l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return Nc(e,t);var n={}.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)?Nc(e,t):void 0}}(l)||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.")}()),512),[[t.vShow,1==a.isLoading]]),(0,t.withDirectives)((0,t.createElementVNode)("div",Lc,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.successMsg,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",null,[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(!1===e.success?"text-danger":"")},(0,t.toDisplayString)(e.message),3)])}),256))])],512),[[t.vShow,a.isLoading>1]]),(0,t.createElementVNode)("input",{onClick:n[2]||(n[2]=function(e){return i.doAction()}),type:"button",name:"submit",value:"Copy Now!",class:"btn btn-block btn-success"})])])])]);var l}]]);var Hc={class:"col mt-2"},$c={class:"mb-2"},qc=["value"],zc={class:"row"},Kc={class:"col col-4"},Wc={class:"card border-0"},Jc={class:"card-header"},Xc={class:"card-title m-0",style:{"line-height":"inherit"}},Yc={class:"badge text-bg-secondary"},Gc={class:"card-body p-2"},Zc={key:0,class:"card-subtitle mb-2 text-muted"},Qc={class:"inline"},ed={key:1,class:"panel-sub-heading",style:{padding:"4px"}},td={class:"input-group"},nd={class:"list-group"},od={class:"list-group-item"},rd={class:"normal"},ad=["onUpdate:modelValue"],id={class:"col col-4"},ld={class:"card border-0"},sd={key:0,class:"card-body p-0"},cd=["innerHTML"],dd={class:"card-header"},ud={class:"card-title text-success m-0",style:{"line-height":"inherit"}},fd={class:"badge text-bg-secondary"},hd={class:"card-body"},md={key:0,class:"card-subtitle mb-2 text-muted"},pd={class:"inline"},gd={class:"list-group"},vd={class:"list-group-item"},yd={class:"normal"},bd=["onUpdate:modelValue"];const wd={mounted:function(){},created:function(){},props:["dataMessage","dataAllData","dataSiteData","dataCurrentKey","dataSiteId","dataDefaultActionForSave","dataAlertCss","dataControllerName"],data:function(){return{siteData:void 0===this.dataSiteData||""===this.dataSiteData?[]:JSON.parse(this.dataSiteData),allData:void 0===this.dataAllData||""===this.dataAllData?[]:JSON.parse(this.dataAllData),currentKey:this.dataCurrentKey,searchKey:"",siteId:parseInt(this.dataSiteId),message:void 0===this.dataMessage?"":this.dataMessage,defaultActionForSave:void 0===this.dataDefaultActionForSave?"saveSettings":this.dataDefaultActionForSave,alertCss:void 0===this.dataAlertCss||""===this.dataAlertCss?"alert alert-info":this.dataAlertCss,controllerName:void 0===this.dataControllerName?"site":this.dataControllerName}},computed:{title:function(){return this.allData.label},total:function(){return this.allData.data?this.allData.data.length:0},selectedTotal:function(){return null==this.siteData?0:this.siteData.length},showSearch:function(){return this.allData.data&&this.allData.data.length>10}},methods:{saveNow:function(e,t){var n=this;return X.show(this,"Please wait. Making Changes..."),new Promise(function(o,r){axios.post(e,t).then(function(e){o(e)}).catch(function(e){r((0,g.safeErrorData)(e))}).finally(function(){X.hide(n)})})},doAction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add",t=this,n="add"===e?this.allData.data:this.siteData,o=[],r=[];if(n&&n.length>0){if(n.forEach(function(e){!0===e.selected&&(o.push(e.id),r.push(e))}),"function"==typeof this.defaultActionForSave)return this.defaultActionForSave(e,n,r,o),!1;if(o.length>0){var a={};a.key=this.currentKey,a.ids=o,a.site_id=this.siteId,a.action=e,this.saveNow(v.admin_path(this.controllerName+"/"+this.defaultActionForSave),a).then(function(n){!function(n){console.log(n),"add"===e?r.forEach(function(e){var n=e.id;-1===t.siteData.findIndex(function(e){return e.id===n})&&t.siteData.push(e)}):r.forEach(function(e){var n=e.id,o=t.siteData.findIndex(function(e){return e.id===n});-1!==o&&t.siteData.splice(o,1)})}(n)}).catch(function(e){var n;console.error("error: ",e),J.show(t,(null==e||null===(n=e.data)||void 0===n?void 0:n.message)||"I don't know what went wrong.",5e3)})}}},selectAllData:function(e,t){var n="table"===e?this.allData.data:this.siteData,o=t.checked;n&&n.length>0&&n.forEach(function(e){e.selected=o})},getLabel:function(e){return e.lang?void 0===e.lang.name?"":e.lang.name:e.name||e.alias||""},getLabelForSite:function(e){if(void 0!==e.name||void 0!==e.alias)return e.name||e.alias;if(e.lang)return void 0===e.lang.name?"":e.lang.name;if(this.allData.data&&this.allData.data.length>0){var t=this.allData.data.findIndex(function(t){return t.id===e.id||void 0!==e.link_rewrite&&e.link_rewrite===t.link_rewrite});return-1===t?"":this.getLabel(this.allData.data[t])}return""},filterData:function(){var e=this,t=this.searchKey;return""!==t&&null!=t?(t=t.toLowerCase(),this.allData.data.filter(function(n){return e.getLabel(n).toLowerCase().includes(t)||n.id===t})):this.allData.data},setData:function(e,t){this.allData[e]=t},setSiteData:function(e){this.siteData={},this.siteData=e}}},Sd=(0,S.A)(wd,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Kc,[(0,t.createElementVNode)("div",Wc,[(0,t.createElementVNode)("div",Jc,[(0,t.createElementVNode)("h5",Xc,[(0,t.createTextVNode)(" Available "+(0,t.toDisplayString)(i.title)+" ",1),(0,t.createElementVNode)("span",Yc,(0,t.toDisplayString)(i.total),1),(0,t.createElementVNode)("button",{type:"button",title:"Add Selected",onClick:n[0]||(n[0]=function(e){return i.doAction("add")}),class:"hand pull-right btn btn-sm btn-primary"}," Add Selected ")])]),(0,t.createElementVNode)("div",Gc,[i.total>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",Zc,[(0,t.createElementVNode)("label",Qc,[(0,t.createElementVNode)("input",{type:"checkbox",onClick:n[1]||(n[1]=function(e){return i.selectAllData("table",e.target)})}),n[5]||(n[5]=(0,t.createTextVNode)(" Select All",-1))])])):(0,t.createCommentVNode)("v-if",!0),i.showSearch?((0,t.openBlock)(),(0,t.createElementBlock)("div",ed,[(0,t.createElementVNode)("div",td,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"text",placeholder:"Search",class:"form-control","aria-describedby":"basic-addon3","onUpdate:modelValue":n[2]||(n[2]=function(e){return a.searchKey=e})},null,512),[[t.vModelText,a.searchKey]])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",nd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterData(),function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",od,[(0,t.createElementVNode)("label",rd,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":function(t){return e.selected=t}},null,8,ad),[[t.vModelCheckbox,e.selected]]),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(i.getLabel(e)),1)])])}),256))])])])]),(0,t.createElementVNode)("div",id,[(0,t.createElementVNode)("div",ld,[a.message.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",sd,[(0,t.createElementVNode)("small",{class:(0,t.normalizeClass)(a.alertCss),innerHTML:a.message,style:{display:"block"}},null,10,cd)])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",dd,[(0,t.createElementVNode)("h5",ud,[(0,t.createTextVNode)(" Added "+(0,t.toDisplayString)(i.title)+" ",1),(0,t.createElementVNode)("span",fd,(0,t.toDisplayString)(i.selectedTotal),1),(0,t.createElementVNode)("button",{title:"Remove Selected",onClick:n[3]||(n[3]=function(e){return i.doAction("remove")}),class:"btn btn-sm btn-danger pull-right"}," Remove Selected ")])]),(0,t.createElementVNode)("div",hd,[i.selectedTotal>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",md,[(0,t.createElementVNode)("label",pd,[(0,t.createElementVNode)("input",{type:"checkbox",onClick:n[4]||(n[4]=function(e){return i.selectAllData("sitewise",e.target)})}),n[6]||(n[6]=(0,t.createTextVNode)(" Select All",-1))])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",gd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteData,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",vd,[(0,t.createElementVNode)("label",yd,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":function(t){return e.selected=t}},null,8,bd),[[t.vModelCheckbox,e.selected]]),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(i.getLabelForSite(e)),1)])])}),256))])])])])],64)}]]),Ed=Sd,kd={mounted:function(){},components:{"site-wise":Ed},created:function(){},props:["dataAllSites","dataMessage","dataAllData","dataSiteData","dataCurrentKey","dataSiteId","dataAlertCss","dataControllerName"],data:function(){return{allSites:void 0===this.dataAllSites?[]:JSON.parse(this.dataAllSites),siteData:void 0===this.dataSiteData||""===this.dataSiteData?[]:JSON.parse(this.dataSiteData),allData:void 0===this.dataAllData||""===this.dataAllData?[]:JSON.parse(this.dataAllData),currentKey:this.dataCurrentKey,searchKey:"",siteId:parseInt(this.dataSiteId),currentSite:"",controllerName:void 0===this.dataControllerName?"site":this.dataControllerName}},methods:{showHdeLoader:function(e){e?X.show(this,"Please wait..."):X.hide(this)},saveNow:function(e,t){return new Promise(function(n,o){axios.post(e,t).then(function(e){n(e)}).catch(function(e){o((0,g.safeErrorData)(e))})})},getLabel:function(e){var t="";return e.name||e.alias?t=e.name||e.alias:e.lang&&(t=void 0===e.lang.name?"":e.lang.name),t},populateData:function(e){this.allData=e,this.$refs.siteWiseComponent.setData("data",e)},getBySite:function(){var e=this;if(""!==this.currentSite){var t=this.currentKey,n=v.admin_path(this.controllerName+"/getBySite/"+this.currentSite+"/"+t);this.showHdeLoader(!0),axios.get(n).then(function(t){e.populateData(t.data)}).catch(function(e){console.error("getBySite error:",(0,g.safeErrorData)(e))}).finally(function(){e.showHdeLoader(!1)})}else this.populateData([])},actionAdd:function(e,t,n){var o=this;console.log("copying now...");var r=this,a={fromSite:{site_id:this.currentSite,data:t},toSite:{site_id:this.siteId},type:this.currentKey};this.showHdeLoader(!0);var i=v.admin_path(this.controllerName+"/copySettings");axios.post(i,a).then(function(e){console.log(e),function(e){var t=e.data;if(!1===t.inserted)J.show(r,t.message||"Nothing happened.",5e3);else{var n=t.ignored,o=t.copied;r.$refs.siteWiseComponent.setSiteData(t.siteData);var a="".concat(o.length," Copied and ").concat(n.length," ignored. Open console for details");J.show(r,a,7e3),console.info("Copied: ",o),console.info("Ignored: ",n)}}(e)}).catch(function(e){console.error("actionAdd error:",(0,g.safeErrorData)(e))}).finally(function(){o.showHdeLoader(!1)})},actionRemove:function(e,t,n){var o=this,r=t.length>0?t[0].site_id:null;if(null===r)return!1;var a=this,i={site_id:r,ids:n,type:this.currentKey},l=v.admin_path(this.controllerName+"/removeSettings");this.showHdeLoader(!0),axios.post(l,i).then(function(e){!function(e){var t=e.data;0===t.deleted&&J.show(a,"Sorry!, Somehow it's not deleted.",5e3),a.$refs.siteWiseComponent.setSiteData(t.siteData)}(e)}).catch(function(e){console.error("actionRemove error:",(0,g.safeErrorData)(e))}).finally(function(){o.showHdeLoader(!1)})},doAction:function(e,t,n,o){"add"===e?this.actionAdd(t,n,o):this.actionRemove(t,n,o)}}},_d=(0,S.A)(kd,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("site-wise");return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Hc,[(0,t.createElementVNode)("div",$c,[n[3]||(n[3]=(0,t.createTextVNode)(" Copy From: ",-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select inline width-auto",onChange:n[0]||(n[0]=function(e){return i.getBySite()}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.currentSite=e})},[n[2]||(n[2]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(i.getLabel(e)),9,qc)}),256))],544),[[t.vModelSelect,a.currentSite]])])]),(0,t.createElementVNode)("div",zc,[(0,t.createVNode)(l,{ref:"siteWiseComponent","data-message":o.dataMessage,"data-site-data":JSON.stringify(a.siteData),"data-all-data":JSON.stringify(a.allData),"data-current-key":a.currentKey,"data-site-id":a.siteId,"data-default-action-for-save":i.doAction,"data-alert-css":o.dataAlertCss},null,8,["data-message","data-site-data","data-all-data","data-current-key","data-site-id","data-default-action-for-save","data-alert-css"])])],64)}]]);var Cd={id:"sortableField"},Nd={class:"parent"},Ad={key:0,class:"js_more fa fa-ellipsis-v pull-right adjustMore"},Bd={class:"text"},Dd={key:0},xd={class:"text"};const Vd={mounted:function(){this.enableSorting(),console.log(this.controllerName)},props:["dataAllModules","dataControllerName"],data:function(){return{allData:this.dataAllModules&&"null"!=this.dataAllModules?JSON.parse(this.dataAllModules):[],sortable:null,sortingInterval:-1,updateIndexUrl:v.admin_path(this.controllerName+"/updateIndex"),lastTarget:""}},computed:{controllerName:function(){return(void 0===this.dataControllerName?"":this.dataControllerName.toLocaleLowerCase()).replace(/\s/g,"")}},methods:{hasChild:function(e){return e.child.length>0},hideAll:function(){document.querySelectorAll(".sortElem .parent").forEach(function(e){e.classList.remove("active")})},showHide:function(e){var t=e.target;t.parentElement.parentElement.parentElement!=this.lastTarget?(this.hideAll(),t.classList.contains("js_more")&&(e.preventDefault(),t.parentElement.parentElement.parentElement.classList.add("active","animated","fadeIn")),this.lastTarget=t.parentElement.parentElement.parentElement):t.parentElement.parentElement.parentElement.classList.contains("active")?t.parentElement.parentElement.parentElement.classList.remove("active"):t.parentElement.parentElement.parentElement.classList.add("active")},getActiveCss:function(e,t){return this.isActive(e,t)?"active":""},isActive:function(e,t){if(this.controllerName==e)return!0;if(t&&t.child&&t.child.length>0){var n=this.controllerName;return t.child.find(function(e){return e.controller_name==n})}},enableSorting:function(){this.$nextTick(function(){null!=this.sortable&&this.sortable.destroy();var e=document.getElementById("sortableField");this.sortable=Xn.create(e,{onEnd:this.sortingCallback,onStart:this.cancelSortingCallback})})},cancelSortingCallback:function(){-1!=this.sortingInterval&&clearInterval(this.sortingInterval)},sortingCallback:function(e){var t=this,n=[];document.querySelectorAll(".sortElem .parent").forEach(function(e,o){for(var r=e.children[0].children[0].innerText,a=0;a<t.allData.length;a++)0==t.allData[a].module_pid&&t.allData[a].name==r&&(n[a]={},n[a].id=t.allData[a].id,n[a].position=o,n[a].name=t.allData[a].name)}),this.updateIndex(n),this.cancelSortingCallback()},submit:function(e,t,n){var o=this;return new Promise(function(r,a){axios[e](t,n).then(function(e){o.onSuccess(e)}).catch(function(e){o.onFailure((0,g.safeErrorData)(e))})})},updateIndex:function(e){var t=this;this.submit("post",this.updateIndexUrl,e).then(function(e){return t.onSuccess(e)}).catch(function(e){return t.onFailure(e)})},onSuccess:function(e){J.show(this,"Modules Sorted.")},onFailure:function(e){console.log(e)}}},Td=(0,S.A)(Vd,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"sortElem",onClick:n[0]||(n[0]=function(e){return i.showHide(e)})},[(0,t.createElementVNode)("ul",Cd,[0==e.current.module_pid?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(a.allData,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",Nd,[(0,t.createElementVNode)("h3",null,[(0,t.createElementVNode)("a",null,[i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("i",Ad)):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("span",Bd,(0,t.toDisplayString)(e.name),1)])]),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("ul",Dd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",null,[(0,t.createElementVNode)("a",null,[(0,t.createElementVNode)("span",xd,(0,t.toDisplayString)(e.name),1)])])}),256))])):(0,t.createCommentVNode)("v-if",!0)])}),256)):(0,t.createCommentVNode)("v-if",!0)])])}]]);function Md(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Od={class:"clearfix"},Id={key:0,class:"row"},jd=["id"],Pd={class:"table border shadow-sm mt-2 table-grid"},Fd=["innerHTML"],Ld=["innerHTML"],Rd={key:1,class:"table border shadow-sm mt-2 table-grid"},Ud=["id"],Hd=["innerHTML"],$d=["innerHTML"],qd={class:"text-danger"},zd={class:"row"},Kd={class:"col-auto"},Wd={class:"form-check pt-2"},Jd={class:"col-auto"},Xd={key:1,class:"row"},Yd={class:"col"},Gd=["innerHTML"];const Zd={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Qd=e=>1e3*e,eu=e=>e/1e3,tu=()=>{},nu=e=>e;function ou(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const ru=e=>e(),au=(e,t,n=Zd.duration)=>new Proxy({animations:e.map(ru).filter(Boolean),duration:n,options:t},iu),iu={get:(e,t)=>{const n=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return eu((null==n?void 0:n[t])||0);case"playbackRate":case"playState":return null==n?void 0:n[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(lu)).catch(tu)),e.finished;case"stop":return()=>{e.animations.forEach(e=>ou(e))};case"forEachNative":return t=>{e.animations.forEach(n=>t(n,e))};default:return void 0===(null==n?void 0:n[t])?void 0:()=>e.animations.forEach(e=>e[t]())}},set:(e,t,n)=>{switch(t){case"currentTime":n=Qd(n);case"playbackRate":for(let o=0;o<e.animations.length;o++)e.animations[o][t]=n;return!0}return!1}},lu=e=>e.finished,su=e=>"object"==typeof e&&Boolean(e.createAnimation),cu=e=>"number"==typeof e,du=e=>Array.isArray(e)&&!cu(e[0]),uu=(e,t,n)=>-n*e+n*t+e,fu=(e,t,n)=>t-e===0?1:(n-e)/(t-e);function hu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=fu(0,t,o);e.push(uu(n,1,r))}}const mu=(e,t,n)=>Math.min(Math.max(n,e),t);const pu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function gu(e,t,n,o){if(e===t&&n===o)return nu;return r=>0===r||1===r?r:pu(function(e,t,n,o,r){let a,i,l=0;do{i=t+(n-t)/2,a=pu(i,o,r)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++l<12);return i}(r,0,1,e,n),t,o)}const vu=e=>"function"==typeof e,yu=e=>Array.isArray(e)&&cu(e[0]),bu={ease:gu(.25,.1,.25,1),"ease-in":gu(.42,0,1,1),"ease-in-out":gu(.42,0,.58,1),"ease-out":gu(0,0,.58,1)},wu=/\((.*?)\)/;function Su(e){if(vu(e))return e;if(yu(e))return gu(...e);const t=bu[e];if(t)return t;if(e.startsWith("steps")){const t=wu.exec(e);if(t){const e=t[1].split(",");return((e,t="end")=>n=>{const o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,r="end"===t?Math.floor(o):Math.ceil(o);return mu(0,1,r/e)})(parseFloat(e[0]),e[1].trim())}}return nu}class Eu{constructor(e,t=[0,1],{easing:n,duration:o=Zd.duration,delay:r=Zd.delay,endDelay:a=Zd.endDelay,repeat:i=Zd.repeat,offset:l,direction:s="normal",autoplay:c=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=nu,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((e,t)=>{this.resolve=e,this.reject=t}),n=n||Zd.easing,su(n)){const e=n.createAnimation(t);n=e.easing,t=e.keyframes||t,o=e.duration||o}this.repeat=i,this.easing=du(n)?nu:Su(n),this.updateDuration(o);const d=function(e,t=function(e){const t=[0];return hu(t,e-1),t}(e.length),n=nu){const o=e.length,r=o-t.length;return r>0&&hu(t,r),r=>{let a=0;for(;a<o-2&&!(r<t[a+1]);a++);let i=mu(0,1,fu(t[a],t[a+1],r));const l=function(e,t){return du(e)?e[((e,t,n)=>{const o=t-0;return((n-0)%o+o)%o+0})(0,e.length,t)]:e}(n,a);return i=l(i),uu(e[a],e[a+1],i)}}(t,l,du(n)?n.map(Su):nu);this.tick=t=>{var n;let o=0;o=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=o,o/=1e3,o=Math.max(o-r,0),"finished"===this.playState&&void 0===this.pauseTime&&(o=this.totalDuration);const i=o/this.duration;let l=Math.floor(i),c=i%1;!c&&i>=1&&(c=1),1===c&&l--;const u=l%2;("reverse"===s||"alternate"===s&&u||"alternate-reverse"===s&&!u)&&(c=1-c);const f=o>=this.totalDuration?1:Math.min(c,1),h=d(this.easing(f));e(h),void 0===this.pauseTime&&("finished"===this.playState||o>=this.totalDuration+a)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,h)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},c&&this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class ku{setAnimation(e){this.animation=e,null==e||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const _u=new WeakMap;function Cu(e){return _u.has(e)||_u.set(e,{transforms:[],values:new Map}),_u.get(e)}const Nu=["","X","Y","Z"],Au={x:"translateX",y:"translateY",z:"translateZ"},Bu={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},Du={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Bu,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:nu},skew:Bu},xu=new Map,Vu=e=>`--motion-${e}`,Tu=["x","y","z"];["translate","scale","rotate","skew"].forEach(e=>{Nu.forEach(t=>{Tu.push(e+t),xu.set(Vu(e+t),Du[e])})});const Mu=(e,t)=>Tu.indexOf(e)-Tu.indexOf(t),Ou=new Set(Tu),Iu=e=>Ou.has(e),ju=(e,t)=>`${e} ${t}(var(${Vu(t)}))`,Pu=e=>e.startsWith("--"),Fu=new Set,Lu=(e,t)=>document.createElement("div").animate(e,t),Ru={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Lu({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(Lu({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Lu({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},Uu={},Hu={};for(const e in Ru)Hu[e]=()=>(void 0===Uu[e]&&(Uu[e]=Ru[e]()),Uu[e]);const $u=(e,t)=>vu(e)?Hu.linearEasing()?`linear(${((e,t)=>{let n="";const o=Math.round(t/.015);for(let t=0;t<o;t++)n+=e(fu(0,o-1,t))+", ";return n.substring(0,n.length-2)})(e,t)})`:Zd.easing:yu(e)?qu(e):e,qu=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`;function zu(e){return Au[e]&&(e=Au[e]),Iu(e)?Vu(e):e}const Ku=(e,t,n)=>{t=zu(t),Pu(t)?e.style.setProperty(t,n):e.style[t]=n},Wu=e=>"string"==typeof e;function Ju(e,t){var n;let o=(null==t?void 0:t.toDefaultUnit)||nu;const r=e[e.length-1];if(Wu(r)){const e=(null===(n=r.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";e&&(o=t=>t+e)}return o}function Xu(e,t,n,o={},r){const a=window.__MOTION_DEV_TOOLS_RECORD,i=!1!==o.record&&a;let l,{duration:s=Zd.duration,delay:c=Zd.delay,endDelay:d=Zd.endDelay,repeat:u=Zd.repeat,easing:f=Zd.easing,persist:h=!1,direction:m,offset:p,allowWebkitAcceleration:g=!1,autoplay:v=!0}=o;const y=Cu(e),b=Iu(t);let w=Hu.waapi();b&&((e,t)=>{Au[t]&&(t=Au[t]);const{transforms:n}=Cu(e);var o,r;r=t,-1===(o=n).indexOf(r)&&o.push(r),e.style.transform=(e=>e.sort(Mu).reduce(ju,"").trim())(n)})(e,t);const S=zu(t),E=function(e,t){return e.has(t)||e.set(t,new ku),e.get(t)}(y.values,S),k=xu.get(S);return ou(E.animation,!(su(f)&&E.generator)&&!1!==o.record),()=>{const y=()=>{var t,n;return null!==(n=null!==(t=((e,t)=>{t=zu(t);let n=Pu(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&0!==n){const e=xu.get(t);e&&(n=e.initialValue)}return n})(e,S))&&void 0!==t?t:null==k?void 0:k.initialValue)&&void 0!==n?n:0};let _=function(e,t){for(let n=0;n<e.length;n++)null===e[n]&&(e[n]=n?e[n-1]:t());return e}((e=>Array.isArray(e)?e:[e])(n),y);const C=Ju(_,k);if(su(f)){const e=f.createAnimation(_,"opacity"!==t,y,S,E);f=e.easing,_=e.keyframes||_,s=e.duration||s}if(Pu(S)&&(Hu.cssRegisterProperty()?function(e){if(!Fu.has(e)){Fu.add(e);try{const{syntax:t,initialValue:n}=xu.has(e)?xu.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:n})}catch(e){}}}(S):w=!1),b&&!Hu.linearEasing()&&(vu(f)||du(f)&&f.some(vu))&&(w=!1),w){k&&(_=_.map(e=>cu(e)?k.toDefaultUnit(e):e)),1!==_.length||Hu.partialKeyframes()&&!i||_.unshift(y());const t={delay:Qd(c),duration:Qd(s),endDelay:Qd(d),easing:du(f)?void 0:$u(f,s),direction:m,iterations:u+1,fill:"both"};l=e.animate({[S]:_,offset:p,easing:du(f)?f.map(e=>$u(e,s)):void 0},t),l.finished||(l.finished=new Promise((e,t)=>{l.onfinish=e,l.oncancel=t}));const n=_[_.length-1];l.finished.then(()=>{h||(Ku(e,S,n),l.cancel())}).catch(tu),g||(l.playbackRate=1.000001)}else if(r&&b)_=_.map(e=>"string"==typeof e?parseFloat(e):e),1===_.length&&_.unshift(parseFloat(y())),l=new r(t=>{Ku(e,S,C?C(t):t)},_,Object.assign(Object.assign({},o),{duration:s,easing:f}));else{const t=_[_.length-1];Ku(e,S,k&&cu(t)?k.toDefaultUnit(t):t)}return i&&a(e,t,_,{duration:s,delay:c,easing:f,repeat:u,offset:p},"motion-one"),E.setAnimation(l),l&&!v&&l.pause(),l}}const Yu=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function Gu(e,t,n){return vu(e)?e(t,n):e}const Zu=(Qu=Eu,function(e,t,n={}){const o=(e=function(e){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(o),Boolean(t);const r=[];for(let a=0;a<o;a++){const i=e[a];for(const e in t){const l=Yu(n,e);l.delay=Gu(l.delay,a,o);const s=Xu(i,e,t[e],l,Qu);r.push(s)}}return au(r,n,n.duration)});var Qu;function ef(e,t={}){return au([()=>{const n=new Eu(e,[0,1],t);return n.finished.catch(()=>{}),n}],t,t.duration)}function tf(e,t,n){return(vu(e)?ef:Zu)(e,t,n)}function nf(e,t,n){const o=Math.max(t-5,0);return r=n-e(o),(a=t-o)?r*(1e3/a):0;var r,a}function of(e){return cu(e)&&!isNaN(e)}function rf(e){return Wu(e)?parseFloat(e):e}const af=function(){const e=new WeakMap;return(t={})=>{const n=new Map,o=(e=0,o=100,r=0,a=!1)=>{const i=`${e}-${o}-${r}-${a}`;return n.has(i)||n.set(i,(({stiffness:e=100,damping:t=10,mass:n=1,from:o=0,to:r=1,velocity:a=0,restSpeed:i,restDistance:l}={})=>{a=a?eu(a):0;const s={done:!1,hasReachedTarget:!1,current:o,target:r},c=r-o,d=Math.sqrt(e/n)/1e3,u=((e=100,t=10,n=1)=>t/(2*Math.sqrt(e*n)))(e,t,n),f=Math.abs(c)<5;let h;if(i||(i=f?.01:2),l||(l=f?.005:.5),u<1){const e=d*Math.sqrt(1-u*u);h=t=>r-Math.exp(-u*d*t)*((u*d*c-a)/e*Math.sin(e*t)+c*Math.cos(e*t))}else h=e=>r-Math.exp(-d*e)*(c+(d*c-a)*e);return e=>{s.current=h(e);const t=0===e?a:nf(h,e,s.current),n=Math.abs(t)<=i,c=Math.abs(r-s.current)<=l;var d,u,f;return s.done=n&&c,s.hasReachedTarget=(d=o,u=r,f=s.current,d<u&&f>=u||d>u&&f<=u),s}})(Object.assign({from:e,to:o,velocity:r},t))),n.get(i)},r=(t,n)=>(e.has(t)||e.set(t,function(e,t=nu){let n,o=10,r=e(0);const a=[t(r.current)];for(;!r.done&&o<1e4;)r=e(o),a.push(t(r.done?r.target:r.current)),void 0===n&&r.hasReachedTarget&&(n=o),o+=10;const i=o-10;return 1===a.length&&a.push(r.current),{keyframes:a,duration:i/1e3,overshootDuration:(null!=n?n:i)/1e3}}(t,n)),e.get(t));return{createAnimation:(e,t=!0,n,a,i)=>{let l,s,c,d=0,u=nu;const f=e.length;if(t)if(u=Ju(e,a?xu.get(zu(a)):void 0),c=rf(e[f-1]),f>1&&null!==e[0])s=rf(e[0]);else{const e=null==i?void 0:i.generator;if(e){const{animation:t,generatorStartTime:n}=i,o=(null==t?void 0:t.startTime)||n||0,r=(null==t?void 0:t.currentTime)||performance.now()-o,a=e(r).current;s=a,d=nf(t=>e(t).current,r,a)}else n&&(s=rf(n()))}if(of(s)&&of(c)){const e=o(s,c,d,null==a?void 0:a.includes("scale"));l=Object.assign(Object.assign({},r(e,u)),{easing:"linear"}),i&&(i.generator=e,i.generatorStartTime=performance.now())}return l||(l={easing:"ease",duration:r(o(0,100)).overshootDuration}),l}}}}();function lf(e){return lf="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},lf(e)}function sf(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,cf(o.key),o)}}function cf(e){var t=function(e){if("object"!=lf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lf(t)?t:t+""}var df=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"come",value:function(e,t){var n=arguments,o=this;document.querySelectorAll(e).forEach(function(e){e.style.display=""}),tf(e,{opacity:[0,1]},{duration:1}).finished.then(function(){t&&t.apply(o,n)})}},{key:"out",value:function(e,t){var n=arguments,o=this;tf(e,{opacity:[1,0]},{duration:1}).finished.then(function(){document.querySelectorAll(e).forEach(function(e){e.style.display="none"}),t&&t.apply(o,n)})}},{key:"highlight",value:function(e,t){var n=arguments,o=this,r=""===(e="string"==typeof e?document.getElementById(e):e).style.backgroundColor?"#fff":e.style.backgroundColor;"TR"===e.nodeName&&(e=e.querySelectorAll("td")),tf(e,{"background-color":"#fff3cd"},{duration:.5}).finished.then(function(){tf(e,{"background-color":r},{duration:1}).finished.then(function(){t&&t.apply(o,n)})})}},{key:"scrollWinTo",value:function(e,t){var n=arguments,o=this,r=document.querySelector(e);r&&(window.scrollTo({top:r.offsetTop,behavior:"smooth"}),setTimeout(function(){t&&t.apply(o,n)},700))}},{key:"slideLeft",value:function(e,t){var n=arguments,o=this,r=(e=document.querySelector(e)).getBoundingClientRect();e.oldProp=r,tf(e,{x:0},{easing:af({velocity:-(window.outerWidth+e.getBoundingClientRect().width)})}).finished.then(function(){t&&t.apply(o,n)})}},{key:"slideRight",value:function(e,t){var n=arguments,o=this;tf(e=document.querySelector(e),{x:0},{easing:af({velocity:window.outerWidth+e.getBoundingClientRect().width})}).finished.then(function(){t&&t.apply(o,n)})}},{key:"cssAnimate",value:function(e,t){(e="string"==typeof e?document.querySelector(e):e).classList.remove("animated",t),e.classList.add("animated",t)}}],null&&sf(e.prototype,null),t&&sf(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function uf(e){return function(e){if(Array.isArray(e))return ff(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 ff(e,t);var n={}.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)?ff(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 ff(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const hf={components:{"info-popup":za,"delete-popup":le},mounted:function(){var e=this;this.highlight(),this.bindAction(),"FALSE"===this.showDeletePopup&&(this.preventDeleteBox=!0),H.on("list-view-hide-spinner",function(){e.showHideSpinner(void 0,"false")}),H.on("info-popup-open",function(){e.removeAllSpinners()})},created:function(){},props:["dataHeaders","dataList","dataActionFields","dataMoreActionFields","dataControllerName","dataActionAsAjax","dataActionCss","dataUserRights","dataMakeFieldAsLink","dataShowDeletePopup","dataEditHandledByOtherComponent","dataMinResultsNeeded","dataLayoutType","dataNoResultsFoundText"],data:function(){return{actionFields:this.dataActionFields&&"null"!==this.dataActionFields.toString()?JSON.parse(this.dataActionFields):[],userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[],moreActions:this.dataMoreActionFields&&"null"!==this.dataMoreActionFields.toString()?JSON.parse(this.dataMoreActionFields):[],actionAjax:this.dataActionAsAjax&&"null"!==this.dataActionAsAjax.toString()?JSON.parse(this.dataActionAsAjax):this.getDefaultValue("action_as_ajax",[]),actionIconCss:this.dataActionCss&&"null"!==this.dataActionCss.toString()?JSON.parse(this.dataActionCss):this.getDefaultValue("action_icon_css",[]),alertMessage:{current:"Are you sure to delete this?",delete:"Are you sure to delete this?",permission:"Sorry! You don't have permission to delete this."},isDelete:!0,currentActionItem:null,preventDeleteBox:!1,makeFieldAsLink:this.dataMakeFieldAsLink?JSON.parse(this.dataMakeFieldAsLink):[],fieldAsLinkCache:{},showDeletePopup:this.dataShowDeletePopup?this.dataShowDeletePopup.toString().toUpperCase():"FALSE",editHandledByOtherComponent:void 0!==this.dataEditHandledByOtherComponent||this.dataEditHandledByOtherComponent&&"true"===this.dataEditHandledByOtherComponent.toString(),minResultsNeeded:void 0===this.dataMinResultsNeeded||""===this.dataMinResultsNeeded?-1:parseInt(this.dataMinResultsNeeded),layoutType:void 0===this.dataLayoutType||""===this.dataLayoutType?"table":this.dataLayoutType,noResultsFoundText:this.dataNoResultsFoundText,spinnerCss:["fa-spinner","fa-pulse","fa-fw"]}},computed:{headings:function(){var e=this.dataHeaders?JSON.parse(this.dataHeaders):[],t=[];return e.length>0&&e.forEach(function(e,n){var o=e.label||e,r=e.key||e,a=!(!e.isImage||"true"!==e.isImage.toString()),i=!(!e.showAllScopes||"true"!==e.showAllScopes.toString());t.push({label:o,key:r,isImage:a,showAllScopes:i})}),t},rows:function(){return this.dataList?JSON.parse(this.dataList):[]}},methods:{isActionFieldKey:function(e){return"action"===(e=void 0===e?"":e.toLowerCase())||"moreactions"===e},isMakeFieldAsLink:function(e){if(void 0!==this.fieldAsLinkCache[e])return this.fieldAsLinkCache[e];var t=this.makeFieldAsLink.find(function(t,n){if(t.key===e||t.action===e)return t});return this.fieldAsLinkCache[e]=void 0===t?-1:t,this.fieldAsLinkCache[e]},getFieldName:function(e,t,n){return t=t||"label","string"==typeof e||void 0===e[t]?e:e[t]},getFieldValue:function(e,t,n){var o=this;if(t.includes(".")){var r=t.split("."),a=r[0],i=r[1];switch(a=e[a],Object.prototype.toString.call(a)){case"[object Undefined]":a="";break;case"[object Array]":a=a.length>0?n.showAllScopes?function(e,t){var n=[];if(e.length>0)for(var o=0,r=e.length;o<r;o++)n.push(e[o][t]);return n.join(",")}(a,i):a[0][i]:a[i];break;case"[object Object]":a=a[i]||""}return a}return function(e,t,n){var r,a,i,l="",s=o.isMakeFieldAsLink(t);if(void 0!==s&&-1!==s){var c=t,d=s.action||c,u=d.charAt(0).toUpperCase()+d.slice(1),f="".concat(d,"/").concat(e.id);f=v.admin_path("".concat(o.dataControllerName,"/").concat(f));var h=e[t],m="",p="";if(o.isAjax(t)){m=o.getAjaxCss(c),m+=" "+t+"_"+e[t];var g=s["css_"+e[t]]||"";h='<i class="js_icon '.concat(g,'"></i>'),o.can(d)||(m+=" disabled"),p=e[t]}l='<a class="'.concat(m,'" data-value="').concat(p,'" data-rowid="').concat(e.id,'" data-action="').concat(d,'" title="').concat(u,'" href="').concat(f,'">').concat(h,"</a>"),"id"===t&&-1===o.actionFields.indexOf("edit")&&(l=h)}else{l=e[t];var y=v.get("media_path");l=!1===n.isImage?l:""!==l&&null!=l?(a=y,i=(r=l).substring(r.lastIndexOf(".")+1),["mp4","mov","ogg"].indexOf(i)>=0?'<a class="table-links" href="'.concat(a,"/").concat(r,'" target="_blank"><video height="30"><source src="').concat(a,"/").concat(r,'"></video></a>'):["apng","avif","gif","jpg","jpeg","jfif","pjpeg","pjp","png","svg","webp","bmp","ico","cur","tif","tiff"].indexOf(i)>=0?'<a class="table-links" href="'.concat(a,"/").concat(r,'" target="_blank"><img height="30" src=\'').concat(a,"/").concat(r,"' /></a>"):'<a class="table-links" href="'.concat(a,"/").concat(r,'" target="_blank">').concat(r,"</a>")):l}return l}(e,t,n)},getActionValue:function(e,t){var n=[];if(this.actionFields.length>0)for(var o=0;o<this.actionFields.length;o++){var r=this.actionFields[o],a=this.getAjaxCss(r),i=r.charAt(0).toUpperCase()+r.slice(1),l="";if("edit"===r?l=v.admin_path("".concat(this.dataControllerName,"/").concat(r,"/").concat(e.id)):"delete"===r?-1!==this.minResultsNeeded&&this.minResultsNeeded>=this.rows.length?console.info("Hiding delete button, because ".concat(this.minResultsNeeded," record(s) needed.")):l=v.admin_path("".concat(this.dataControllerName,"/destroy/").concat(e.id)):l=v.admin_path("".concat(this.dataControllerName,"/").concat(r,"/").concat(e.id)),""!==l){var s='<i class="js_icon '.concat(this.getIconCSS(r),'"></i>'),c='<a class="'.concat(a,'" data-rowid="').concat(e.id,'" data-action="').concat(r,'" title="').concat(i,'" href="').concat(l,'" class="').concat(r,'">').concat(s,"</a>");n.push(c)}}if(this.moreActions.length>0)for(var d=0;d<this.moreActions.length;d++){var u=this.moreActions[d],f=this.getAjaxCss(u),h=u.css||"",m="";if(u.hrefAttributes)for(var p in u.hrefAttributes)u.hrefAttributes.hasOwnProperty(p)&&(m+="".concat(p,"='").concat(u.hrefAttributes[p],"' "));var g=u.action,y=e[u.action_append_field]||"",b=u.label.charAt(0).toUpperCase()+u.label.slice(1),w=v.admin_path("".concat(this.dataControllerName,"/").concat(g,"/").concat(y)),S='<i class="js_icon '.concat(u.icon_css,'"></i>'),E='<a class="'.concat(f," ").concat(h,'" data-rowid="').concat(e.id,'" title="').concat(b,'" href="').concat(w,'" data-action="').concat(g,'" ').concat(m,">").concat(S,"</a>");n.push(E)}return n.join(" ")},can:function(e){return this.userRights.indexOf(e)>=0},isAjax:function(e){return this.actionAjax.indexOf(e)>=0},getAjaxCss:function(e){var t="[object Object]"===Object.prototype.toString.call(e)?e.action:e;return this.isAjax(e)?"js_action js_ajax js_"+t:"js_action js_"+t},getDefaultValue:function(e,t){return window.Laravel.htcmsAdminConfig(e)||t},getIconCSS:function(e){return this.getDefaultValue("action_icon_css","")[e]||""},getTotalColumns:function(){return this.headings.length},getTotalRows:function(){return this.rows.length},isZeroResult:function(){return 0===this.rows.length},highlight:function(){var e=g.queryBuilder.get("id");if(""!==e){var t="row_"+e;df.scrollWinTo("#"+t,function(){df.highlight(t)})}},deleteNow:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this,n=-1;try{if(1===e){var o=this.currentActionItem;if(this.can("delete")){n="row_"+o.getAttribute("data-rowid");var r=o.getAttribute("href");this.doAjax("delete",r,function(e){if(200===e.status){var o=t.rows.findIndex(function(t){return t.id.toString()===e.data.id.toString()});o>=0&&(J.show(t,"Record has been deleted",2e3),document.getElementById(n)&&document.getElementById(n).remove(),t.rows.splice(o,1),t.bindAction(),H.emit("pagination-on-delete"))}else t.showHideSpinner(t.currentActionItem,!1),J.show(t,"Ooops! Got some error!")})}else J.show(t,"Sorry! You don't have permission to delete."),setTimeout(function(){t.showHideSpinner(t.currentActionItem,!1)},1e3)}else t.showHideSpinner(t.currentActionItem,!1)}catch(e){t.showHideSpinner(t.currentActionItem,!1),J.show(t,"I don't understand what you are trying to do.",5e3)}this.closeDialog()},showHideSpinner:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.spinnerCss;if(e){var o,r=e instanceof HTMLAnchorElement?e:e.currentTarget;this.removeAllSpinners(),!0===t&&(o=r.firstElementChild.classList).add.apply(o,uf(n))}else this.removeAllSpinners()},removeAllSpinners:function(){var e=this.spinnerCss,t=document.querySelectorAll(".fa-spinner");t.length>0&&t.forEach(function(t){var n;(n=t.classList).remove.apply(n,uf(e))})},closeDialog:function(){this.$refs.deleteBox.close()},doAjax:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"get",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=this;return Ss()[e](t).then(function(e){n&&n.apply(this,arguments)}).catch(function(e){o?o.apply(o,arguments):J.show(r,e.message,5e3),r.showHideSpinner(r.currentActionItem,!1)})},initAjaxAction:function(e){e.preventDefault(),e.stopPropagation();var t=this,n=e.currentTarget,o=n.dataset,r=o.action,a=o.value,i=n.getAttribute("href");switch(a&&(i=i+"/"+a),this.currentActionItem=n,r){case"delete":this.alertMessage.current=this.alertMessage.delete,this.isDelete=!0,!1===this.preventDeleteBox?this.openDeleteAlert(n):this.deleteNow(1);break;case"showinfo":var l=o.info,s=o.editable,c=o.rowid,d=o.excludefields||[];this.showInfo(l,c,d,s);break;default:this.doAjax("get",i,function(e){var o;t.showHideSpinner(n,!1);var i,l=t.isMakeFieldAsLink(r),s=n.getElementsByClassName("js_icon"),c=l["css_"+a];s.length>0&&(i=(s=s[0]).classList).remove.apply(i,uf(c.split(" "))),n.setAttribute("data-value",e.data.status),c=l["css_"+e.data.status],(o=s.classList).add.apply(o,uf(c.split(" ")))},function(e){var o;t.showHideSpinner(n,!1),J.show(t,(null==e||null===(o=e.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.message)||"Unknown Error!",3e3)})}},bindAction:function(){for(var e=this.$el.getElementsByClassName("js_action"),t=0;t<e.length;t++){var n=e[t];n.classList.contains("js_ajax")&&n.addEventListener("click",this.initAjaxAction,!1),n.classList.contains("js_action")&&n.addEventListener("click",this.showHideSpinner,!1)}!0===this.editHandledByOtherComponent&&this.$el.querySelectorAll("a[data-action='edit']").forEach(function(e,t){e.addEventListener("click",function(e){e.preventDefault(),H.emit("list-view-pre-edit",this)})})},openDeleteAlert:function(e){this.$refs.deleteBox.open(e)},openPermissionAlert:function(){this.alertMessage.current=this.alertMessage.permission,this.isDelete=!1,this.currentActionItem=null,this.$refs.deleteBox.open()},filterFieldsName:function(e){return(e=e.replace(/\.|_/g," ")).charAt(0).toUpperCase()+e.slice(1)},filterSnakeCase:function(e){return e.replace(/\s|\./g,"_").toLowerCase()},getCssForRow:function(e,t){return e.length-1===t?"active":""},showInfo:function(e,t,n,o){this.$refs.infoPopup.showInfo(e,t,n,o)}}},mf=(0,S.A)(hf,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("delete-popup"),s=(0,t.resolveComponent)("info-popup");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Od,[i.isZeroResult()?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},["grid"===a.layoutType?((0,t.openBlock)(),(0,t.createElementBlock)("div",Id,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.rows,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{id:"row_"+e.id,key:e.key,class:"col"},[(0,t.createElementVNode)("table",Pd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.headings,function(n,o){return(0,t.openBlock)(),(0,t.createElementBlock)("tr",{class:(0,t.normalizeClass)(i.getCssForRow(n,o))},[(0,t.createElementVNode)("td",{class:(0,t.normalizeClass)("header head_"+i.getFieldName(n))},(0,t.toDisplayString)(i.filterFieldsName(i.getFieldName(n))),3),(0,t.createElementVNode)("td",null,[i.isActionFieldKey(i.getFieldName(n,"key"))?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,innerHTML:i.getFieldValue(e,i.getFieldName(n,"key"),n)},null,8,Fd)),i.isActionFieldKey(i.getFieldName(n,"key"))?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"actions",innerHTML:i.getActionValue(e)},null,8,Ld)):(0,t.createCommentVNode)("v-if",!0)])],2)}),256))])],8,jd)}),128))])):(0,t.createCommentVNode)("v-if",!0),"table"===a.layoutType?((0,t.openBlock)(),(0,t.createElementBlock)("table",Rd,[(0,t.createElementVNode)("thead",null,[(0,t.createElementVNode)("tr",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.headings,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("th",{class:(0,t.normalizeClass)("header head_"+i.filterSnakeCase(i.getFieldName(e)))},(0,t.toDisplayString)(i.filterFieldsName(i.getFieldName(e))),3)}),256))])]),(0,t.createElementVNode)("tbody",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.rows,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("tr",{id:"row_"+e.id,key:e.key,class:"list-table-row"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.headings,function(n){return(0,t.openBlock)(),(0,t.createElementBlock)("td",null,[i.isActionFieldKey(i.getFieldName(n,"key"))?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"actions",innerHTML:i.getActionValue(e)},null,8,Hd)):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,innerHTML:i.getFieldValue(e,i.getFieldName(n,"key"),n)},null,8,$d))])}),256))],8,Ud)}),128))])])):(0,t.createCommentVNode)("v-if",!0)],64)),(0,t.createVNode)(l,{ref:"deleteBox","data-show-footer":!0,"data-show-modal":!1,onOnClose:i.deleteNow},{title:(0,t.withCtx)(function(){return function(e){if(Array.isArray(e))return Md(e)}(e=n[4]||(n[4]=[(0,t.createTextVNode)("Alert",-1)]))||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 Md(e,t);var n={}.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)?Md(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.")}();var e}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("span",qd,(0,t.toDisplayString)(a.alertMessage.current),1)]}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",zd,[(0,t.createElementVNode)("div",Kd,[(0,t.createElementVNode)("div",Wd,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"flexCheckDefault","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.preventDeleteBox=e}),class:"form-check-input",type:"checkbox",value:""},null,512),[[t.vModelCheckbox,a.preventDeleteBox]]),n[5]||(n[5]=(0,t.createElementVNode)("label",{class:"form-check-label",for:"flexCheckDefault"}," Don't ask again ",-1))])]),(0,t.createElementVNode)("div",Jd,[(0,t.withDirectives)((0,t.createElementVNode)("button",{class:"btn btn-default","data-dismiss":"modal",type:"button",onClick:n[1]||(n[1]=function(e){return i.deleteNow(0)})}," No ",512),[[t.vShow,a.isDelete]]),(0,t.withDirectives)((0,t.createElementVNode)("button",{class:"btn btn-primary",type:"button",onClick:n[2]||(n[2]=function(e){return i.deleteNow(1)})}," Yes ",512),[[t.vShow,a.isDelete]]),(0,t.withDirectives)((0,t.createElementVNode)("button",{class:"btn btn-primary",type:"button",onClick:n[3]||(n[3]=function(e){return i.closeDialog()})}," Okay ",512),[[t.vShow,!a.isDelete]])])])]}),_:1},8,["onOnClose"]),(0,t.createVNode)(s,{ref:"infoPopup"},null,512),i.isZeroResult()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Xd,[(0,t.createElementVNode)("div",Yd,[(0,t.createElementVNode)("div",{innerHTML:a.noResultsFoundText},null,8,Gd)])])):(0,t.createCommentVNode)("v-if",!0)])}]]),pf=mf;var gf={class:"btn-toolbar justify-content-between border-bottom mb-2 pb-2",role:"toolbar"},vf={class:"btn-group",role:"group"},yf={key:0,style:{position:"relative",top:"5px"}},bf=["innerHTML"],wf={class:"input-group actionToolbar"};function Sf(e){return function(e){if(Array.isArray(e))return Ef(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 Ef(e,t);var n={}.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)?Ef(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 Ef(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function kf(e){return kf="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},kf(e)}function _f(e){return function(e){if(Array.isArray(e))return Cf(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 Cf(e,t);var n={}.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)?Cf(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 Cf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const Nf={props:["dataIgnoreFields","dataPasteElement","dataForm","dataBackUrl","dataCopyPasteAutoInit","dataShowCopy","dataShowPaste"],mounted:function(){this.autoInit&&this.init()},created:function(){},data:function(){var e;return{ignoreFields:void 0===this.dataIgnoreFields?["id","site_id","backURL","actionPerformed","platform_id","_token","insert_by","update_by"]:JSON.parse(this.dataIgnoreFields),copyKey:"cms_copy_data",backURL:void 0===this.dataBackUrl||""===this.dataBackUrl?"":this.dataBackUrl,autoInit:void 0===this.dataCopyPasteAutoInit||"true"===(null===(e=this.dataCopyPasteAutoInit)||void 0===e?void 0:e.toString()),showCopy:void 0===this.dataShowCopy||"true"===this.dataShowCopy.toString(),showPaste:void 0===this.dataShowPaste||"true"===this.dataShowPaste.toString()}},computed:{form:function(){return void 0!==this.dataForm&&document.getElementById(this.dataForm)?document.getElementById(this.dataForm):document},pasteElement:function(){return void 0===this.dataPasteElement?this.form.querySelectorAll("input[type='text']")[0]:this.form.getElementById(this.dataPasteElement)}},methods:{init:function(){var e=this;this.pasteElement&&this.pasteElement.addEventListener("blur",function(){(0,g.IsJson)(this.value)&&e.pasteNow()})},copyNow:function(){var e=this,t=this.form.querySelectorAll("input"),n=this.form.querySelectorAll("textarea"),o=this.form.querySelectorAll("select"),r=[].concat(_f(t),_f(n),_f(o)),a={};r.forEach(function(t){var n=t.getAttribute("name")||t.getAttribute("id");null!=n&&"object"!==kf(n)&&-1===function(t){return e.ignoreFields.findIndex(function(e){return t===e})}(n)&&(a[n]="checkbox"===t.type||"radio"===t.type?t.checked:t.value)});var i=JSON.stringify(a);(0,g.CopyToClipboard)(i),H.emit("on-copy",i),J.show(this,"Copied...",1e3)},fillData:function(e){var t=this.form;if(e)for(var n in e)try{var o=t[n]||document.getElementById(n),r=e[n];"checkbox"===o.type||"radio"===o.type?o.checked=r:o.value=r}catch(e){console.info("unable to set value @ "+n)}},pasteNow:function(e){var t=this;(0,g.PasteFromClipboard)().then(function(n){(0,g.IsJson)(n)&&t.fillData(JSON.parse(n)),e&&e(JSON.parse(n)),H.emit("on-paste",n)}).catch(function(e){console.log("unable to paste")})}}},Af=(0,S.A)(Nf,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[a.showCopy?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"Copy",class:"btn btn-outline-secondary",title:"Copy",type:"button",onClick:n[0]||(n[0]=function(e){return i.copyNow()})},Sf(n[2]||(n[2]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-copy"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0),a.showPaste?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,"aria-label":"Paste",class:"btn btn-outline-secondary",title:"Paste",type:"button",onClick:n[1]||(n[1]=function(e){return i.pasteNow()})},Sf(n[3]||(n[3]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-paste"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0)],64)}]]);var Bf={class:"btn-group"};const Df={mounted:function(){g.LeftMenu.init(),this.init()},props:["dataIconCss","dataIconCssOff"],data:function(){return{visible:!0,currentCss:"",css:void 0===this.dataIconCss||""===this.dataIconCss?"fa fa-arrow-left hand":this.dataIconCss,cssOff:void 0===this.dataIconCssOff||""===this.dataIconCssOff?"fa fa-arrow-right hand":this.dataIconCssOff}},methods:{init:function(){var e=this;this.currentCss=g.LeftMenu.isVisible()?this.css:this.cssOff,H.on("left-menu-on-show",function(){e.currentCss=e.css}),H.on("left-menu-on-hide",function(){e.currentCss=e.cssOff})},toggleMenu:function(){this.visible=!this.visible,g.LeftMenu.toggleShow()}}},xf=(0,S.A)(Df,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Bf,[(0,t.createElementVNode)("span",{onClick:n[0]||(n[0]=function(){return i.toggleMenu&&i.toggleMenu.apply(i,arguments)}),class:(0,t.normalizeClass)(a.currentCss)},null,2)])}]]),Vf={components:{"copy-paste":Af,"left-menu-toggle":xf},mounted:function(){},props:["dataTitle","dataBackUrl","dataBackTitle","dataShowCopy","dataShowPaste","dataCopyPasteAutoInit","dataShowExpand"],computed:{showBackButton:function(){return void 0!==this.dataBackUrl},showExpand:function(){return void 0!==this.dataShowExpand}},data:function(){return{title:this.dataTitle,backUrl:this.dataBackUrl,backTitle:void 0===this.dataBackTitle?"Back":this.dataBackTitle}},methods:{goBack:function(){window.location.href=this.backUrl}}},Tf=(0,S.A)(Vf,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("left-menu-toggle"),s=(0,t.resolveComponent)("copy-paste");return(0,t.openBlock)(),(0,t.createElementBlock)("div",gf,[(0,t.createElementVNode)("div",vf,[i.showExpand?((0,t.openBlock)(),(0,t.createElementBlock)("small",yf,[(0,t.createVNode)(l,{"data-icon-css":"fa fa-arrow-left hand","data-icon-css-off":"fa fa-arrow-right hand"})])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("h4",{class:"moduleTitle",innerHTML:a.title},null,8,bf)]),(0,t.createElementVNode)("div",wf,[(0,t.createVNode)(s,{"data-copy-paste-auto-init":o.dataCopyPasteAutoInit,"data-show-copy":o.dataShowCopy,"data-show-paste":o.dataShowPaste},null,8,["data-copy-paste-auto-init","data-show-copy","data-show-paste"]),i.showBackButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"Back",class:"btn btn-outline-secondary",title:"Back",type:"button",onClick:n[0]||(n[0]=function(e){return i.goBack()})},(0,t.toDisplayString)(a.backTitle),1)):(0,t.createCommentVNode)("v-if",!0)])])}]]);var Mf={class:"navbar navbar-expand-lg bg-light border-bottom"},Of={class:"container-fluid"},If={class:"navbar-brand",href:"/",target:"_blank"},jf=["src","height"],Pf={class:"collapse navbar-collapse",id:"navbarScroll"},Ff={class:"navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll",style:{"--bs-scroll-height":"100px"}},Lf={class:"nav-item"},Rf={class:"d-flex"},Uf={class:"text-success"},Hf={class:"navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll ms-1",style:{"--bs-scroll-height":"100px"}},$f={class:"nav-item"};const qf={components:{"global-site-button":Br},mounted:function(){},props:["dataUsername","dataSiteName","dataCurrentSite","dataSupportedSites","dataIsAdmin","dataSiteCombo","dataLogo","dataLogoHeight"],computed:{logo:function(){return void 0!==this.dataLogo&&""!==this.dataLogo?this.dataLogo:v.admin_asset("img/logo-transparent.png")}},data:function(){return{siteName:this.dataSiteName||"hashtagcms.org",userName:this.dataUsername,isLoggedIn:!(!this.dataUsername||""===this.dataUsername),siteCombo:!(void 0===this.dataSiteCombo||"false"===this.dataSiteCombo),logoHeight:void 0===this.dataLogoHeight||""===this.dataLogoHeight?50:this.dataLogoHeight}},methods:{logout:function(e){document.getElementById("logout-form").submit()}}},zf=(0,S.A)(qf,[["render",function(e,n,o,r,a,i){var l=(0,t.resolveComponent)("global-site-button");return(0,t.openBlock)(),(0,t.createElementBlock)("nav",Mf,[(0,t.createElementVNode)("div",Of,[(0,t.createElementVNode)("a",If,[(0,t.createElementVNode)("img",{class:"cms-logo",src:i.logo,height:a.logoHeight},null,8,jf),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.siteName),1)]),n[2]||(n[2]=(0,t.createElementVNode)("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarScroll","aria-controls":"navbarScroll","aria-expanded":"false","aria-label":"Toggle navigation"},[(0,t.createElementVNode)("span",{class:"navbar-toggler-icon"})],-1)),(0,t.createElementVNode)("div",Pf,[(0,t.createElementVNode)("ul",Ff,[(0,t.createElementVNode)("li",Lf,[(0,t.createVNode)(l,{"data-current-site":o.dataCurrentSite,"data-supported-sites":o.dataSupportedSites,"data-is-admin":o.dataIsAdmin},null,8,["data-current-site","data-supported-sites","data-is-admin"])])]),(0,t.createElementVNode)("div",Rf,[n[1]||(n[1]=(0,t.createTextVNode)(" Welcome ",-1)),(0,t.createElementVNode)("span",Uf,(0,t.toDisplayString)(a.userName)+"!",1),(0,t.createElementVNode)("ul",Hf,[(0,t.createElementVNode)("li",$f,[(0,t.createElementVNode)("a",{href:"/logout",onClick:n[0]||(n[0]=(0,t.withModifiers)(function(){return i.logout&&i.logout.apply(i,arguments)},["prevent"]))},"Logout")])])])])])])}]]);var Kf={class:"loaderModal",ref:"loaderModal"},Wf={class:"loaderPanel",ref:"loaderSpinner"},Jf=["innerHTML"];const Xf={props:["dataLoadingText","dataAsModal"],mounted:function(){this.fixLayout()},data:function(){return{loadingText:void 0===this.dataLoadingText?"Loading. Please wait...":this.dataLoadingText,asModal:"undefined"==typeof dataAsModal||!0===dataAsModal,visible:!1}},methods:{fixLayout:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=(e=0,t=0,"number"==typeof window.innerWidth?(e=window.innerWidth,t=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}),r=this.$refs.loaderModal,a=this.$refs.loaderSpinner;r.style.width=o.width+"px",r.style.height=o.height+"px",null!==n&&(n.left&&(a.style.left=n.left+"px"),n.top&&(a.style.top=n.top+"px"),n.right&&(a.style.top=n.right+"px"))},show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.visible=!0,"string"==typeof e&&(this.loadingText=e),this.fixLayout(t)},hide:function(){this.visible=!1}}},Yf=(0,S.A)(Xf,[["render",function(e,n,o,r,a,i){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("div",Kf,null,512),[[t.vShow,a.asModal]]),(0,t.createElementVNode)("div",Wf,[n[0]||(n[0]=(0,t.createStaticVNode)('<div class="spinner"><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle class="length" fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg></div>',1)),(0,t.createElementVNode)("span",{class:"loaderText",innerHTML:a.loadingText},null,8,Jf)],512)],512)),[[t.vShow,a.visible]])}]]),Gf={props:["dataBackUrl","dataTimeout"],data:function(){return{totalTime:void 0===this.dataTimeout?5:parseInt(this.dataTimeout),timeRemaining:0,intervalId:0,seconds:"Seconds"}},mounted:function(){this.intervalId=setInterval(this.updateTime,1e3)},methods:{goBack:function(){clearInterval(this.intervalId),window.location.href=this.dataBackUrl},updateTime:function(){this.timeRemaining>=this.totalTime?(clearInterval(this.intervalId),this.goBack()):this.timeRemaining++,this.seconds=this.totalTime-this.timeRemaining<=1?"Second":"Seconds"}}},Zf=(0,S.A)(Gf,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("a",{href:"#",onClick:n[0]||(n[0]=function(e){return i.goBack()}),class:"btn btn-outline-secondary"},[(0,t.renderSlot)(e.$slots,"default",{},function(){return[n[1]||(n[1]=(0,t.createTextVNode)("Back in ",-1))]}),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.totalTime-a.timeRemaining)+" "+(0,t.toDisplayString)(a.seconds),1)])}]]);var Qf={class:"toasterHolder jsToast shadow"},eh={class:"toasterContent"};const th={mounted:function(){},data:function(){return{showMe:!1,message:"Toast Content",intervalId:0}},methods:{show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=arguments.length>2?arguments[2]:void 0;this.hide();var o=this;this.showMe=!0,this.message=""!==e?e:"",this.$nextTick(function(){this.align(n)}),this.intervalId=setTimeout(function(){o.hide()},t)},hide:function(){this.showMe=!1,this.intervalId&&clearInterval(this.intervalId)},align:function(e){var t=void 0!==e?e.left:window.innerWidth/2-this.$el.offsetWidth/2,n=void 0!==e?e.top:window.innerHeight/2-this.$el.offsetHeight/2+window.scrollY;this.$el.style.top=n+"px",this.$el.style.left=t+"px"}}},nh=(0,S.A)(th,[["render",function(e,n,o,r,a,i){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Qf,[(0,t.createElementVNode)("div",eh,(0,t.toDisplayString)(a.message),1)],512)),[[t.vShow,a.showMe]])}]]);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 rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ah(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rh(Object(n),!0).forEach(function(t){ih(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ih(e,t,n){return(t=function(e){var t=function(e){if("object"!=oh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}g.Dashboard.data,g.Dashboard.labelsCategories,g.Dashboard.datasCategories,g.Dashboard.labelsContent,g.Dashboard.datasContent,g.Dashboard.bgColors,g.Dashboard.borderColors,g.Dashboard.createChart,g.Dashboard.makeData,g.Dashboard.init;var lh=new g.AdminConfig,sh={makeRichEditor:function(e,t){var n={selector:"#"+(e=document.querySelector(e)).id,height:500,theme:"silver",plugins:"code print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern",toolbar1:"formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist | removeformat | customGallery | image | code ",image_advtab:!0,template_popup_height:400,template_popup_width:320,valid_elements:"*[*]",valid_children:"*[*]",document_base_url:lh.get("app_url")+"/",allow_script_urls:!0,convert_urls:!1,relative_urls:!1,remove_script_host:!1,content_css:["//fonts.googleapis.com/css?family=Lato:300,300i,400,400i"],setup:function(e){e.ui.registry.addButton("customGallery",{text:"Insert Image",onAction:function(t){var n;null!==(n=Vue)&&void 0!==n&&null!==(n=n.$refs)&&void 0!==n&&n.imageGallery&&Vue.$refs.imageGallery.open(e)}})}};n=ah(ah({},n),t),e.editor=tinymce.init(n)}},ch={action:null,content_type:null,id:null,init:function(e,t,n){this.action=e,this.content_type=t,this.id=n,"add"===ch.action?(document.getElementById("lang_name").addEventListener("change",ch.autoUpdateFields),document.getElementById("lang_title").addEventListener("change",ch.autoUpdateUrls),document.getElementById("link_rewrite").addEventListener("keyup",ch.linkRewriteUpdated),document.getElementById("category_id").addEventListener("change",ch.getParentCategory)):this.getParentCategory()},isBlank:function(e){return""===document.getElementById(e).value.replace(/\s/g,"")},autoUpdateFields:function(){var e=this.value;try{if(ch.isBlank("lang_title")){document.getElementById("lang_title").value=e[0].toUpperCase()+e.slice(1),document.getElementById("alias").value=(0,g.CleanForUrl)(e.toUpperCase(),"_");var t=(0,g.CleanForUrl)(e.toLowerCase(),"-");document.getElementById("lang_active_key").value=t,document.getElementById("link_rewrite").value=t}}catch(e){console.error(e.message)}},autoUpdateUrls:function(){var e=this.value;if(!0!==document.getElementById("link_rewrite").edited){e=(e=(0,g.CleanForUrl)(e.toUpperCase(),"_")).substr(0,60),document.getElementById("alias").value=e;var t=(0,g.CleanForUrl)(e.toLowerCase(),"-");t=e.substr(0,128),document.getElementById("lang_active_key").value=t,document.getElementById("link_rewrite").value=t}},linkRewriteUpdated:function(){document.getElementById("link_rewrite").edited=!0},getParentCategory:function(){var e=document.getElementById("parent_id"),t=document.getElementById("category_id").value;if(document.getElementById("parent_id").value="",e.length=0,e.options[0]=new Option("Select",""),t>0){o(!0);var n=lh.admin_path("page/getParentCategory",{content_type:ch.content_type,category_id:t});axios.get(n).then(function(t){!function(t){if(t.length>0)for(var n=1,r=0;r<t.length;r++){var a=t[r];a.id!==ch.id&&(e.options[n]=new Option(a.lang.name,a.id),n++)}else o(!1)}(t.data)}).catch(function(e){o(!1)})}else o(!1);function o(e){document.getElementById("parent_div").style.display=!0===e?"":"none"}}};function dh(e){return dh="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},dh(e)}function uh(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,fh(o.key),o)}}function fh(e){var t=function(e){if("object"!=dh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dh(t)?t:t+""}var hh=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors="undefined"==typeof error_messages?[]:error_messages,this.init()},t=[{key:"init",value:function(){var e=this;document.addEventListener("DOMContentLoaded",function(){for(var t in e.errors)e.highlightField(t,e.errors[t][0]);e.focusFirst()})}},{key:"highlightField",value:function(e,t){var n=e;if(!(e=document.getElementById(n)))return console.error("Could not find "+n),!1;e.classList.add("is-invalid");var o=document.createElement("div");o.classList.add("alert","alert-danger","mt-03"),-1!==n.indexOf("lang_")&&(t=t.replace("lang ","")),o.innerHTML=t,e.parentNode.insertBefore(o,e.nextSibling)}},{key:"focusFirst",value:function(){for(var e in this.errors){var t=document.getElementById(e);try{if(t){t.focus();break}}catch(e){console.log(e.message)}}}}],t&&uh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const mh=g.MapAPI;function ph(e){return ph="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},ph(e)}function gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function vh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gh(Object(n),!0).forEach(function(t){yh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yh(e,t,n){return(t=function(e){var t=function(e){if("object"!=ph(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ph(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ph(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bh=vh(vh({VERSION:"1.0.7",ActionBar:Z,CategoryPlatform:ce,CategorySettings:Gn,CmsModuleDropdown:C,DownloadButton:Qn,FileUploader:po,FrontendModuleCreator:kr,GlobalSiteButton:Br,Homepage:Wa,HtmlSlot:Xa,ImageGallery:si,InfoBoxes:Ei,InfoPopup:za,LanguageButton:B,LanguageCopier:Oi,LeftNav:$i,MenuSorter:ol,ModuleCreator:xs,ModulePermission:ac,Pagination:gc,PlatformButton:Sc,SearchBar:U,SiteButton:Cc,SiteCloner:Uc,SitewiseCopier:_d,SitewiseData:Ed,Sorter:Td,TabularView:pf,TitleBar:Tf,TopNav:zf,CopyPaste:Af,InfoBox:bi,LeftMenuShowHide:xf,Loader:Yf,ModalBox:le,SplitButton:k,TimerButton:Zf,ToastBox:nh,AdminConfig:g.AdminConfig},e),{},{Dashboard:g.Dashboard,EditorHelper:sh,PageManager:ch,ErrorMessage:hh,MapAPI:mh,Form:Sr});"undefined"!=typeof window&&(window.HashtagCmsAdminUI=bh);const wh=bh})(),__webpack_exports__})());
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("vue")):"function"==typeof define&&define.amd?define(["axios","vue"],t):"object"==typeof exports?exports.HashtagCmsAdminUI=t(require("axios"),require("vue")):e.HashtagCmsAdminUI=t(e.axios,e.vue)}(this,(__WEBPACK_EXTERNAL_MODULE__742__,__WEBPACK_EXTERNAL_MODULE__380__)=>(()=>{var __webpack_modules__={724(e){var t;t=()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{AdminConfig:()=>l,CleanForUrl:()=>yn,CopyToClipboard:()=>fn,Dashboard:()=>Ut,Errors:()=>xt,Fetcher:()=>_t,Form:()=>Vt,Humanize:()=>vn,IsJson:()=>gn,LeftMenu:()=>qt,MapAPI:()=>Ot,PasteFromClipboard:()=>mn,Storage:()=>Jt,Store:()=>Xt,TitleCase:()=>bn,Utils:()=>hn,default:()=>Sn,parseProp:()=>cn,queryBuilder:()=>un,safeErrorData:()=>dn});var n={};function o(e){return o="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},o(e)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}e.r(n),e.d(n,{hasBrowserEnv:()=>ge,hasStandardBrowserEnv:()=>ye,hasStandardBrowserWebWorkerEnv:()=>be,navigator:()=>ve,origin:()=>we});var l=function(){return e=function e(){var t,n,o,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appConfig=null!==(t=null!==(n="undefined"!=typeof window&&(null===(o=window.HashtagCms)||void 0===o?void 0:o.adminConfig))&&void 0!==n?n:"undefined"!=typeof window&&(null===(r=window.Laravel)||void 0===r?void 0:r.adminConfig))&&void 0!==t?t:{}},t=[{key:"get",value:function(e,t){var n;return null!==(n=this.appConfig[e])&&void 0!==n?n:t}},{key:"has",value:function(e){return null!=this.appConfig[e]}},{key:"all",value:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.appConfig)}},{key:"admin_path",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="";return null!==t&&"[object Object]"===Object.prototype.toString.call(t)&&(n="?"+Object.entries(t).map(function(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,r,a,i=[],s=!0,l=!1;try{for(r=(t=t.call(e)).next;!(s=(n=r.call(t)).done)&&(i.push(n.value),2!==i.length);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}(e)||function(e){if(e){if("string"==typeof e)return r(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,2):void 0}}(e)||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.")}()}(e),n=t[0],o=t[1];return"".concat(n,"=").concat(encodeURIComponent(o))}).join("&")),this.get("base_path","")+"/"+e+n}},{key:"admin_asset",value:function(e){return this.get("app_url","")+"/"+this.get("theme_assets","")+"/"+e}},{key:"get_media",value:function(e){return this.get("media_path","")+"/"+e}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,s(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function c(e,t){return function(){return e.apply(t,arguments)}}new l;const{toString:d}=Object.prototype,{getPrototypeOf:u}=Object,{iterator:h,toStringTag:f}=Symbol,m=(p=Object.create(null),e=>{const t=d.call(e);return p[t]||(p[t]=t.slice(8,-1).toLowerCase())});var p;const g=e=>(e=e.toLowerCase(),t=>m(t)===e),v=e=>t=>typeof t===e,{isArray:y}=Array,b=v("undefined");function w(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S=g("ArrayBuffer"),E=v("string"),k=v("function"),_=v("number"),C=e=>null!==e&&"object"==typeof e,N=e=>{if("object"!==m(e))return!1;const t=u(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||f in e||h in e)},B=g("Date"),A=g("File"),D=g("Blob"),x=g("FileList"),V=g("URLSearchParams"),[T,M,O,I]=["ReadableStream","Request","Response","Headers"].map(g);function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),y(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{if(w(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),a=r.length;let i;for(o=0;o<a;o++)i=r[o],t.call(null,e[i],i,e)}}function j(e,t){if(w(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,L=e=>!b(e)&&e!==F,R=(U="undefined"!=typeof Uint8Array&&u(Uint8Array),e=>U&&e instanceof U);var U;const H=g("HTMLFormElement"),$=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),q=g("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};P(n,(n,r)=>{let a;!1!==(a=t(n,r,e))&&(o[r]=a||n)}),Object.defineProperties(e,o)},K=g("AsyncFunction"),W=(J="function"==typeof setImmediate,X=k(F.postMessage),J?setImmediate:X?(Y=`axios@${Math.random()}`,G=[],F.addEventListener("message",({source:e,data:t})=>{e===F&&t===Y&&G.length&&G.shift()()},!1),e=>{G.push(e),F.postMessage(Y,"*")}):e=>setTimeout(e));var J,X,Y,G;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):"undefined"!=typeof process&&process.nextTick||W,Q={isArray:y,isArrayBuffer:S,isBuffer:w,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||k(e.append)&&("formdata"===(t=m(e))||"object"===t&&k(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&S(e.buffer),t},isString:E,isNumber:_,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:N,isEmptyObject:e=>{if(!C(e)||w(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:T,isRequest:M,isResponse:O,isHeaders:I,isUndefined:b,isDate:B,isFile:A,isBlob:D,isRegExp:q,isFunction:k,isStream:e=>C(e)&&k(e.pipe),isURLSearchParams:V,isTypedArray:R,isFileList:x,forEach:P,merge:function e(){const{caseless:t,skipUndefined:n}=L(this)&&this||{},o={},r=(r,a)=>{const i=t&&j(o,a)||a;N(o[i])&&N(r)?o[i]=e(o[i],r):N(r)?o[i]=e({},r):y(r)?o[i]=r.slice():n&&b(r)||(o[i]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&P(arguments[e],r);return o},extend:(e,t,n,{allOwnKeys:o}={})=>(P(t,(t,o)=>{n&&k(t)?Object.defineProperty(e,o,{value:c(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,a,i;const s={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),a=r.length;a-- >0;)i=r[a],o&&!o(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&u(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:g,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(y(e))return e;let t=e.length;if(!_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[h]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:H,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:z,freezeMethods:e=>{z(e,(t,n)=>{if(k(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];k(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach(e=>{n[e]=!0})};return y(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:j,global:F,isContextDefined:L,isSpecCompliantForm:function(e){return!!(e&&k(e.append)&&"FormData"===e[f]&&e[h])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(w(e))return e;if(!("toJSON"in e)){t[o]=e;const r=y(e)?[]:{};return P(e,(e,t)=>{const a=n(e,o+1);!b(a)&&(r[t]=a)}),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:K,isThenable:e=>e&&(C(e)||k(e))&&k(e.then)&&k(e.catch),setImmediate:W,asap:Z,isIterable:e=>null!=e&&k(e[h])};class ee extends Error{static from(e,t,n,o,r,a){const i=new ee(e.message,t||e.code,n,o,r);return i.cause=e,i.name=e.name,a&&Object.assign(i,a),i}constructor(e,t,n,o,r){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.status}}}ee.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ee.ERR_BAD_OPTION="ERR_BAD_OPTION",ee.ECONNABORTED="ECONNABORTED",ee.ETIMEDOUT="ETIMEDOUT",ee.ERR_NETWORK="ERR_NETWORK",ee.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ee.ERR_DEPRECATED="ERR_DEPRECATED",ee.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ee.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ee.ERR_CANCELED="ERR_CANCELED",ee.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ee.ERR_INVALID_URL="ERR_INVALID_URL";const te=ee;function ne(e){return Q.isPlainObject(e)||Q.isArray(e)}function oe(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function re(e,t,n){return e?e.concat(t).map(function(e,t){return e=oe(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const ae=Q.toFlatObject(Q,{},null,function(e){return/^is[A-Z]/.test(e)}),ie=function(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Q.isUndefined(t[e])})).metaTokens,r=n.visitor||c,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Q.isDate(e))return e.toISOString();if(Q.isBoolean(e))return e.toString();if(!s&&Q.isBlob(e))throw new te("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(e)||Q.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){let s=e;if(e&&!r&&"object"==typeof e)if(Q.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&function(e){return Q.isArray(e)&&!e.some(ne)}(e)||(Q.isFileList(e)||Q.endsWith(n,"[]"))&&(s=Q.toArray(e)))return n=oe(n),s.forEach(function(e,o){!Q.isUndefined(e)&&null!==e&&t.append(!0===i?re([n],o,a):null===i?n:n+"[]",l(e))}),!1;return!!ne(e)||(t.append(re(r,n,a),l(e)),!1)}const d=[],u=Object.assign(ae,{defaultVisitor:c,convertValue:l,isVisitable:ne});if(!Q.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!Q.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+o.join("."));d.push(n),Q.forEach(n,function(n,a){!0===(!(Q.isUndefined(n)||null===n)&&r.call(t,n,Q.isString(a)?a.trim():a,o,u))&&e(n,o?o.concat(a):[a])}),d.pop()}}(e),t};function se(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function le(e,t){this._pairs=[],e&&ie(e,this,t)}const ce=le.prototype;ce.append=function(e,t){this._pairs.push([e,t])},ce.toString=function(e){const t=e?function(t){return e.call(this,t,se)}:se;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const de=le;function ue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function he(e,t,n){if(!t)return e;const o=n&&n.encode||ue,r=Q.isFunction(n)?{serialize:n}:n,a=r&&r.serialize;let i;if(i=a?a(t,r):Q.isURLSearchParams(t)?t.toString():new de(t,r).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const fe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,function(t){null!==t&&e(t)})}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:de,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ge="undefined"!=typeof window&&"undefined"!=typeof document,ve="object"==typeof navigator&&navigator||void 0,ye=ge&&(!ve||["ReactNative","NativeScript","NS"].indexOf(ve.product)<0),be="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,we=ge&&window.location.href||"http://localhost",Se={...n,...pe},Ee=function(e){function t(e,n,o,r){let a=e[r++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=r>=e.length;return a=!a&&Q.isArray(o)?o.length:a,s?(Q.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!i):(o[a]&&Q.isObject(o[a])||(o[a]=[]),t(e,n,o[a],r)&&Q.isArray(o[a])&&(o[a]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let a;for(o=0;o<r;o++)a=n[o],t[a]=e[a];return t}(o[a])),!i)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(e,o)=>{t(function(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),o,n,0)}),n}return null},ke={transitional:me,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=Q.isObject(e);if(r&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return o?JSON.stringify(Ee(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ie(e,new Se.classes.URLSearchParams,{visitor:function(e,t,n,o){return Se.isNode&&Q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=Q.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ie(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e){if(Q.isString(e))try{return(0,JSON.parse)(e),Q.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ke.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw te.from(e,te.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],e=>{ke.headers[e]={}});const _e=ke,Ce=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ne=Symbol("internals");function Be(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return!1===e||null==e?e:Q.isArray(e)?e.map(Ae):String(e)}function De(e,t,n,o,r){return Q.isFunction(o)?o.call(this,t,n):(r&&(t=n),Q.isString(t)?Q.isString(o)?-1!==t.indexOf(o):Q.isRegExp(o)?o.test(t):void 0:void 0)}class xe{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=Be(t);if(!r)throw new Error("header name must be a non-empty string");const a=Q.findKey(o,r);(!a||void 0===o[a]||!0===n||void 0===n&&!1!==o[a])&&(o[a||t]=Ae(e))}const a=(e,t)=>Q.forEach(e,(e,n)=>r(e,n,t));if(Q.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&Ce[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t})(e),t);else if(Q.isObject(e)&&Q.isIterable(e)){let n,o,r={};for(const t of e){if(!Q.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[o=t[0]]=(n=r[o])?Q.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=Be(e)){const n=Q.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(Q.isFunction(t))return t.call(this,e,n);if(Q.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Be(e)){const n=Q.findKey(this,e);return!(!n||void 0===this[n]||t&&!De(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function r(e){if(e=Be(e)){const r=Q.findKey(n,e);!r||t&&!De(0,n[r],r,t)||(delete n[r],o=!0)}}return Q.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!De(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return Q.forEach(this,(o,r)=>{const a=Q.findKey(n,r);if(a)return t[a]=Ae(o),void delete t[r];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(r):String(r).trim();i!==r&&delete t[r],t[i]=Ae(o),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Q.forEach(this,(n,o)=>{null!=n&&!1!==n&&(t[o]=e&&Q.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ne]=this[Ne]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=Be(e);t[o]||(function(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[o]=!0)}return Q.isArray(e)?e.forEach(o):o(e),this}}xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Q.freezeMethods(xe);const Ve=xe;function Te(e,t){const n=this||_e,o=t||n,r=Ve.from(o.headers);let a=o.data;return Q.forEach(e,function(e){a=e.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function Me(e){return!(!e||!e.__CANCEL__)}const Oe=class extends te{constructor(e,t,n){super(null==e?"canceled":e,te.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Ie(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new te("Request failed with status code "+n.status,[te.ERR_BAD_REQUEST,te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Pe=(e,t,n=3)=>{let o=0;const r=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=o[i];r||(r=l),n[a]=s,o[a]=l;let d=i,u=0;for(;d!==a;)u+=n[d++],d%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(e,t){let n,o,r=0,a=1e3/t;const i=(t,a=Date.now())=>{r=a,n=null,o&&(clearTimeout(o),o=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-r;s>=a?i(e,t):(n=e,o||(o=setTimeout(()=>{o=null,i(n)},a-s)))},()=>n&&i(n)]}(n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,s=a-o,l=r(s);o=a,e({loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&a<=i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},je=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},Fe=e=>(...t)=>Q.asap(()=>e(...t)),Le=Se.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Se.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Se.origin),Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent)):()=>!0,Re=Se.hasStandardBrowserEnv?{write(e,t,n,o,r,a,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Q.isString(o)&&s.push(`path=${o}`),Q.isString(r)&&s.push(`domain=${r}`),!0===a&&s.push("secure"),Q.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Ue(e,t,n){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const He=e=>e instanceof Ve?{...e}:e;function $e(e,t){t=t||{};const n={};function o(e,t,n,o){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:o},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function r(e,t,n,r){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function a(e,t){if(!Q.isUndefined(t))return o(void 0,t)}function i(e,t){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function s(n,r,a){return a in t?o(n,r):a in e?o(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>r(He(e),He(t),0,!0)};return Q.forEach(Object.keys({...e,...t}),function(o){const a=l[o]||r,i=a(e[o],t[o],o);Q.isUndefined(i)&&a!==s||(n[o]=i)}),n}const qe=e=>{const t=$e({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Ve.from(i),t.url=he(Ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Q.isFormData(n))if(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(Se.hasStandardBrowserEnv&&(o&&Q.isFunction(o)&&(o=o(t)),o||!1!==o&&Le(t.url))){const e=r&&a&&Re.read(a);e&&i.set(r,e)}return t},ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const o=qe(e);let r=o.data;const a=Ve.from(o.headers).normalize();let i,s,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:f}=o;function m(){c&&c(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(i),o.signal&&o.signal.removeEventListener("abort",i)}let p=new XMLHttpRequest;function g(){if(!p)return;const o=Ve.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());Ie(function(e){t(e),m()},function(e){n(e),m()},{data:u&&"text"!==u&&"json"!==u?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:o,config:e,request:p}),p=null}p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout,"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(g)},p.onabort=function(){p&&(n(new te("Request aborted",te.ECONNABORTED,e,p)),p=null)},p.onerror=function(t){const o=t&&t.message?t.message:"Network Error",r=new te(o,te.ERR_NETWORK,e,p);r.event=t||null,n(r),p=null},p.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||me;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new te(t,r.clarifyTimeoutError?te.ETIMEDOUT:te.ECONNABORTED,e,p)),p=null},void 0===r&&a.setContentType(null),"setRequestHeader"in p&&Q.forEach(a.toJSON(),function(e,t){p.setRequestHeader(t,e)}),Q.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),u&&"json"!==u&&(p.responseType=o.responseType),f&&([l,d]=Pe(f,!0),p.addEventListener("progress",l)),h&&p.upload&&([s,c]=Pe(h),p.upload.addEventListener("progress",s),p.upload.addEventListener("loadend",c)),(o.cancelToken||o.signal)&&(i=t=>{p&&(n(!t||t.type?new Oe(null,e,p):t),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(i),o.signal&&(o.signal.aborted?i():o.signal.addEventListener("abort",i)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);v&&-1===Se.protocols.indexOf(v)?n(new te("Unsupported protocol "+v+":",te.ERR_BAD_REQUEST,e)):p.send(r||null)})},Ke=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const r=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;o.abort(t instanceof te?t:new Oe(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,r(new te(`timeout of ${t}ms exceeded`,te.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:s}=o;return s.unsubscribe=()=>Q.asap(i),s}},We=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let o,r=0;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Je=(e,t,n,o)=>{const r=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*We(n,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t)return s(),void e.close();let a=o.byteLength;if(n){let e=i+=a;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw s(e),e}},cancel:e=>(s(e),r.return())},{highWaterMark:2})},{isFunction:Xe}=Q,Ye=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:Ge,TextEncoder:Ze}=Q.global,Qe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},et=e=>{e=Q.merge.call({skipUndefined:!0},Ye,e);const{fetch:t,Request:n,Response:o}=e,r=t?Xe(t):"function"==typeof fetch,a=Xe(n),i=Xe(o);if(!r)return!1;const s=r&&Xe(Ge),l=r&&("function"==typeof Ze?(c=new Ze,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const d=a&&s&&Qe(()=>{let e=!1;const t=new n(Se.origin,{body:new Ge,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=i&&s&&Qe(()=>Q.isReadableStream(new o("").body)),h={stream:u&&(e=>e.body)};return r&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let o=t&&t[e];if(o)return o.call(t);throw new te(`Response type '${e}' is not supported`,te.ERR_NOT_SUPPORT,n)})}),async e=>{let{url:r,method:i,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:p,onUploadProgress:g,responseType:v,headers:y,withCredentials:b="same-origin",fetchOptions:w}=qe(e),S=t||fetch;v=v?(v+"").toLowerCase():"text";let E=Ke([c,f&&f.toAbortSignal()],m),k=null;const _=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let C;try{if(g&&d&&"get"!==i&&"head"!==i&&0!==(C=await(async(e,t)=>{const o=Q.toFiniteNumber(e.getContentLength());return null==o?(async e=>{if(null==e)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e)){const t=new n(Se.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Q.isArrayBufferView(e)||Q.isArrayBuffer(e)?e.byteLength:(Q.isURLSearchParams(e)&&(e+=""),Q.isString(e)?(await l(e)).byteLength:void 0)})(t):o})(y,s))){let e,t=new n(r,{method:"POST",body:s,duplex:"half"});if(Q.isFormData(s)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=je(C,Pe(Fe(g)));s=Je(t.body,65536,e,n)}}Q.isString(b)||(b=b?"include":"omit");const t=a&&"credentials"in n.prototype,c={...w,signal:E,method:i.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};k=a&&new n(r,c);let f=await(a?S(k,w):S(r,c));const m=u&&("stream"===v||"response"===v);if(u&&(p||m&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=Q.toFiniteNumber(f.headers.get("content-length")),[n,r]=p&&je(t,Pe(Fe(p),!0))||[];f=new o(Je(f.body,65536,n,()=>{r&&r(),_&&_()}),e)}v=v||"text";let N=await h[Q.findKey(h,v)||"text"](f,e);return!m&&_&&_(),await new Promise((t,n)=>{Ie(t,n,{data:N,headers:Ve.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:k})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new te("Network Error",te.ERR_NETWORK,e,k),{cause:t.cause||t});throw te.from(t,t&&t.code,e,k)}}},tt=new Map,nt=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:r}=t,a=[o,r,n];let i,s,l=a.length,c=tt;for(;l--;)i=a[l],s=c.get(i),void 0===s&&c.set(i,s=l?new Map:et(t)),c=s;return s},ot=(nt(),{http:null,xhr:ze,fetch:{get:nt}});Q.forEach(ot,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const rt=e=>`- ${e}`,at=e=>Q.isFunction(e)||null===e||!1===e,it=function(e,t){e=Q.isArray(e)?e:[e];const{length:n}=e;let o,r;const a={};for(let i=0;i<n;i++){let n;if(o=e[i],r=o,!at(o)&&(r=ot[(n=String(o)).toLowerCase()],void 0===r))throw new te(`Unknown adapter '${n}'`);if(r&&(Q.isFunction(r)||(r=r.get(t))))break;a[n||"#"+i]=r}if(!r){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified";throw new te("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oe(null,e)}function lt(e){return st(e),e.headers=Ve.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),it(e.adapter||_e.adapter,e)(e).then(function(t){return st(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ve.from(t.headers),t},function(t){return Me(t)||(st(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Ve.from(t.response.headers))),Promise.reject(t)})}const ct="1.13.4",dt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ut={};dt.transitional=function(e,t,n){function o(e,t){return"[Axios v"+ct+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,a)=>{if(!1===e)throw new te(o(r," has been removed"+(t?" in "+t:"")),te.ERR_DEPRECATED);return t&&!ut[r]&&(ut[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},dt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ht={assertOptions:function(e,t,n){if("object"!=typeof e)throw new te("options must be an object",te.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new te("option "+a+" must be "+n,te.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new te("Unknown option "+a,te.ERR_BAD_OPTION)}},validators:dt},ft=ht.validators;class mt{constructor(e){this.defaults=e||{},this.interceptors={request:new fe,response:new fe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=$e(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&ht.assertOptions(n,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),null!=o&&(Q.isFunction(o)?t.paramsSerializer={serialize:o}:ht.assertOptions(o,{encode:ft.function,serialize:ft.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ht.assertOptions(t,{baseUrl:ft.spelling("baseURL"),withXsrfToken:ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=r&&Q.merge(r.common,r[t.method]);r&&Q.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=Ve.concat(a,r);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let d,u=0;if(!s){const e=[lt.bind(this),void 0];for(e.unshift(...i),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=i.length;let h=t;for(;u<d;){const t=i[u++],n=i[u++];try{h=t(h)}catch(e){n.call(this,e);break}}try{c=lt.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return he(Ue((e=$e(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Q.forEach(["delete","get","head","options"],function(e){mt.prototype[e]=function(t,n){return this.request($e(n||{},{method:e,url:t,data:(n||{}).data}))}}),Q.forEach(["post","put","patch"],function(e){function t(t){return function(n,o,r){return this.request($e(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}mt.prototype[e]=t(),mt.prototype[e+"Form"]=t(!0)});const pt=mt;class gt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const o=new Promise(e=>{n.subscribe(e),t=e}).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e(function(e,o,r){n.reason||(n.reason=new Oe(e,o,r),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new gt(function(t){e=t}),cancel:e}}}const vt=gt,yt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(yt).forEach(([e,t])=>{yt[t]=e});const bt=yt,wt=function e(t){const n=new pt(t),o=c(pt.prototype.request,n);return Q.extend(o,pt.prototype,n,{allOwnKeys:!0}),Q.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e($e(t,n))},o}(_e);wt.Axios=pt,wt.CanceledError=Oe,wt.CancelToken=vt,wt.isCancel=Me,wt.VERSION=ct,wt.toFormData=ie,wt.AxiosError=te,wt.Cancel=wt.CanceledError,wt.all=function(e){return Promise.all(e)},wt.spread=function(e){return function(t){return e.apply(null,t)}},wt.isAxiosError=function(e){return Q.isObject(e)&&!0===e.isAxiosError},wt.mergeConfig=$e,wt.AxiosHeaders=Ve,wt.formToJSON=e=>Ee(Q.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=it,wt.HttpStatusCode=bt,wt.default=wt;const St=wt;function Et(e){return Et="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},Et(e)}function kt(e){var t=function(e){if("object"!=Et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Et(t)?t:t+""}var _t=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"get",value:function(e,t){return St.get(e,t)}},{key:"post",value:function(e,t,n){return St.post(e,t,n)}},{key:"put",value:function(e,t,n){return St.put(e,t,n)}},{key:"delete",value:function(e,t){return St.delete(e,t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,kt(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ct(e){return Ct="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},Ct(e)}function Nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Dt(o.key),o)}}function At(e,t,n){return t&&Bt(e.prototype,t),n&&Bt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dt(e){var t=function(e){if("object"!=Ct(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ct(t)?t:t+""}var xt=At(function e(){Nt(this,e),this.errors={}},[{key:"has",value:function(e){return this.errors.hasOwnProperty(e)}},{key:"any",value:function(){return Object.keys(this.errors).length>0}},{key:"get",value:function(e){if(this.errors[e])return this.errors[e][0]}},{key:"record",value:function(e){this.errors=e}},{key:"clear",value:function(e){e?delete this.errors[e]:this.errors={}}}]),Vt=At(function e(t){for(var n in Nt(this,e),this.originalData=t,t)this[n]=t[n];this.errors=new xt},[{key:"data",value:function(){var e={};for(var t in this.originalData)e[t]=this[t];return e}},{key:"reset",value:function(){for(var e in this.originalData){var t="[object Array]"===Object.prototype.toString.call(this[e]);this[e]=t?[]:""}this.errors.clear()}},{key:"post",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("post",e,t)}},{key:"put",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("put",e,t)}},{key:"patch",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("patch",e,t)}},{key:"delete",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.submit("delete",e,t)}},{key:"submit",value:function(e,t){var n=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Promise(function(r,a){axios[e](t,n.data()).then(function(e){r(e.data),n.onSuccess(e.data,o)}).catch(function(e){var t=e.response?e.response.data:{message:e.message};n.onFail(t),a(t)})})}},{key:"onSuccess",value:function(e){1==(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&this.reset()}},{key:"onFail",value:function(e){this.errors.record(e)}}]);function Tt(e){return Tt="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},Tt(e)}function Mt(e){var t=function(e){if("object"!=Tt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tt(t)?t:t+""}var Ot=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var o=new l;this.apiKey=t||o.get("mapquest_api_key"),this.apiUrl=n.apiUrl||o.get("mapquest_api_url")||"http://www.mapquestapi.com/geocoding/v2/",this.jsUrl=n.jsUrl||o.get("mapquest_js_url")||"https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js",this.cssUrl=n.cssUrl||o.get("mapquest_css_url")||"https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css",this.callback=[],this.isInit=!1,this.apiKey||console.warn("HashtagCms MapAPI: No API key provided. Set mapquest_api_key in adminConfig or pass to constructor.")},t=[{key:"init",value:function(){if("undefined"==typeof document)return console.warn("HashtagCms MapAPI: Cannot initialize outside browser environment."),!1;if(this.isInit)return!1;var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("script");t.src=this.jsUrl,t.async=!0,e.appendChild(t);var n=document.createElement("link");return n.setAttribute("type","text/css"),n.setAttribute("rel","stylesheet"),n.href=this.cssUrl,e.appendChild(n),this.isInit=!0,!0}},{key:"getLatLong",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.apiKey)return Promise.reject(new Error("MapQuest API key is not configured"));var o="".concat(this.apiUrl,"address?key=").concat(encodeURIComponent(this.apiKey),"&location=").concat(encodeURIComponent(e));return new Promise(function(e,r){axios.get(o).then(function(o){e(o),null!=n&&"function"==typeof n&&n.call(t,o)}).catch(function(e){r(e),null!=n&&"function"==typeof n&&n.call(t,e)})})}},{key:"parseResults",value:function(e){var t,n=[],o=null==e||null===(t=e.data)||void 0===t||null===(t=t.results)||void 0===t?void 0:t[0];return o?((o.locations||[]).forEach(function(e){n.push({country:e.adminArea1,state:e.adminArea3,city:e.adminArea5,latLng:e.latLng,displayLatLng:e.displayLatLng,postalCode:e.postalCode,street:e.street,sideOfStreet:e.sideOfStreet})}),n):n}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Mt(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function It(e){return It="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},It(e)}function Pt(e){return function(e){if(Array.isArray(e))return jt(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 jt(e,t);var n={}.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)?jt(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 jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(n),!0).forEach(function(t){Rt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rt(e,t,n){return(t=function(e){var t=function(e){if("object"!=It(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=It(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==It(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ut={data:[],labelsCategories:[],datasCategories:[],labelsContent:[],datasContent:[],bgColors:["rgba(93, 128, 96, 0.7)","rgba(135, 188, 118, 0.7)","rgba(146, 222, 184, 0.7)","rgba(135, 131, 222, 0.7)","rgba(128, 57, 5, 0.7)","rgba(231, 191, 200, 0.7)","rgba(255, 99, 132, 0.7)","rgba(54, 162, 235, 0.7)","rgba(255, 206, 86, 0.7)","rgba(75, 192, 192, 0.7)","rgba(153, 102, 255, 0.7)","rgba(255, 159, 64, 0.7)"],borderColors:["rgba(82, 117, 85, 1)","rgba(115, 172, 96, 1)","rgba(113, 204, 158, 1)","rgba(103, 99, 206, 1)","rgba(112, 51, 7, 1)","rgba(213, 158, 170, 1)","rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)","rgba(153, 102, 255, 1)","rgba(255, 159, 64, 1)"],createChart:function(e,t,n,o,r){if("undefined"!=typeof document){var a=document.getElementById(e);a?"undefined"!=typeof Chart?new Chart(a,{type:"bar",data:{labels:t,datasets:[{label:"# of Reads",data:n,backgroundColor:o,borderColor:r,borderWidth:1}]},options:{scales:{y:{beginAtZero:!0}}}}):console.error("Chart.js is not loaded."):console.warn("Chart canvas with id '".concat(e,"' not found."))}},makeChartData:function(e){var t=[],n=[];if(e&&Array.isArray(e))for(var o=0,r=e.length;o<r;o++){var a=e[o].link_rewrite;"/"!==a&&""!==a&&null!==a||(a="Home (/)"),t.push(a),n.push(e[o].read_count)}return{labels:t,datas:n}},init:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Lt(Lt({},{topCategoriesId:"topCatgories",topContentsId:"topContents"}),t);if(e){var o=this.makeChartData(e.categories);o.labels.length>0&&this.createChart(n.topCategoriesId,o.labels,o.datas,this.bgColors,this.borderColors);var r=this.makeChartData(e.pages);r.labels.length>0&&this.createChart(n.topContentsId,r.labels,r.datas,Pt(this.bgColors).reverse(),Pt(this.borderColors).reverse())}}};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 $t(e){var t=function(e){if("object"!=Ht(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ht(t)?t:t+""}var qt=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.eventEmitter=e,this.config=Object.assign({leftPanelSelector:".js_left_panel",rightPanelSelector:".js_right_panel",hiddenCss:["hidden-md","hidden-xs"]},t),this.visible=!0,"undefined"!=typeof document){var n=document.querySelector(this.config.leftPanelSelector);if(n){var o=n.style.display;""===o||"inline-block"===o?(this.emit("left-menu-on-show"),this.visible=!0):(this.emit("left-menu-on-hide"),this.visible=!1)}}}},{key:"emit",value:function(e,t){this.eventEmitter&&"function"==typeof this.eventEmitter.emit&&this.eventEmitter.emit(e,t)}},{key:"isVisible",value:function(){return this.visible}},{key:"toggleShow",value:function(e){if("undefined"!=typeof document){var t=document.querySelector(this.config.leftPanelSelector);if(t){var n=t.style.display,o=t.clientWidth;""!==n&&"inline-block"!==n||0===o?(this.visible=!0,t.style.display="",this.emit("left-menu-on-show")):(this.visible=!1,t.style.display="none",this.emit("left-menu-on-hide"))}}}},{key:"dispatch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.emit(e,t)}},{key:"reload",value:function(){this.emit("re-fetch-modules")}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$t(o.key),o)}}(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function zt(e){return zt="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},zt(e)}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Wt(e){var t=function(e){if("object"!=zt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zt(t)?t:t+""}var Jt=function(){return e=function e(){var t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.obj={},this.counter=1,this.persistent=null!==(t=o.persistent)&&void 0!==t&&t,this.prefix=null!==(n=o.prefix)&&void 0!==n?n:"htcms_"},t=[{key:"nextCounter",value:function(){return this.counter++}},{key:"store",value:function(e,t){if(this.obj[e]=t,this.persistent&&"undefined"!=typeof localStorage)try{localStorage.setItem(this.prefix+e,JSON.stringify(t))}catch(e){console.warn("HashtagCms Storage: Failed to persist to localStorage:",e.message)}return t}},{key:"fetch",value:function(e,t){if(void 0!==this.obj[e])return this.obj[e];if(this.persistent&&"undefined"!=typeof localStorage)try{var n=localStorage.getItem(this.prefix+e);if(null!==n){var o=JSON.parse(n);return this.obj[e]=o,o}}catch(e){console.warn("HashtagCms Storage: Failed to read from localStorage:",e.message)}return t}},{key:"has",value:function(e){return void 0!==this.obj[e]||!(!this.persistent||"undefined"==typeof localStorage)&&null!==localStorage.getItem(this.prefix+e)}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e){if(this.obj={},this.counter=1,this.persistent&&"undefined"!=typeof localStorage){for(var t=[],n=0;n<localStorage.length;n++){var o=localStorage.key(n);null!=o&&o.startsWith(this.prefix)&&t.push(o)}t.forEach(function(e){return localStorage.removeItem(e)})}return!0}return delete this.obj[e],this.persistent&&"undefined"!=typeof localStorage&&localStorage.removeItem(this.prefix+e),!0}},{key:"keys",value:function(){var e=Object.keys(this.obj);if(this.persistent&&"undefined"!=typeof localStorage){for(var t=[],n=0;n<localStorage.length;n++){var o=localStorage.key(n);null!=o&&o.startsWith(this.prefix)&&t.push(o.substring(this.prefix.length))}return function(e){return function(e){if(Array.isArray(e))return Kt(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 Kt(e,t);var n={}.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)?Kt(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.")}()}(new Set([].concat(e,t)))}return e}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Wt(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Xt=new Jt;function Yt(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,o,r,a){var l=o&&o.prototype instanceof s?o:s,c=Object.create(l.prototype);return Gt(c,"_invoke",function(n,o,r){var a,s,l,c=0,d=r||[],u=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return a=t,s=0,l=e,h.n=n,i}};function f(n,o){for(s=n,l=o,t=0;!u&&c&&!r&&t<d.length;t++){var r,a=d[t],f=h.p,m=a[2];n>3?(r=m===o)&&(l=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=f&&((r=n<2&&f<a[1])?(s=0,h.v=o,h.n=a[1]):f<m&&(r=n<3||a[0]>o||o>m)&&(a[4]=n,a[5]=o,h.n=m,s=0))}if(r||n>1)return i;throw u=!0,o}return function(r,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,m),s=d,l=m;(t=s<2?e:l)||!u;){a||(s?s<3?(s>1&&(h.n=-1),f(s,l)):h.n=l:h.v=l);try{if(c=2,a){if(s||(r="next"),t=a[r]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);a=e}else if((t=(u=h.n<0)?l:n.call(o,h))!==i)break}catch(t){a=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,r,a),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(Gt(t={},o,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Gt(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,Gt(u,"constructor",c),Gt(c,"constructor",l),l.displayName="GeneratorFunction",Gt(c,r,"GeneratorFunction"),Gt(u),Gt(u,r,"Generator"),Gt(u,o,function(){return this}),Gt(u,"toString",function(){return"[object Generator]"}),(Yt=function(){return{w:a,m:h}})()}function Gt(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Gt=function(e,t,n,o){function a(t,n){Gt(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Gt(e,t,n,o)}function Zt(e,t,n,o,r,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,r)}function Qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function en(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,an(o.key),o)}}function tn(e,t,n){return t&&en(e.prototype,t),n&&en(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach(function(t){rn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rn(e,t,n){return(t=an(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e){var t=function(e){if("object"!=sn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sn(t)?t:t+""}function sn(e){return sn="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},sn(e)}var ln="htcms_cps";function cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==e||""===e)return t;if("object"===sn(e))return e;try{return JSON.parse(e)}catch(e){return console.warn("HashtagCms: Failed to parse prop:",e.message),t}}function dn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==(t=e.response)&&void 0!==t&&t.data?on(on({},n),e.response.data):on({message:e.message||"An unexpected error occurred"},n)}var un=tn(function e(){Qt(this,e)},null,[{key:"cache",get:function(){return{}}},{key:"get",value:function(e,t){if(this.cache[e])return this.cache[e];for(var n=(void 0===t?"undefined"!=typeof window?window.location.search.substring(1):"":t).split("&"),o={},r=0;r<n.length;r++){var a=n[r].split("="),i=a[0],s=a[1];if(a.length>2&&(a.shift(),s=a.join("=")),o[i]=s,i===e){var l=decodeURIComponent(s);return this.cache[e]=l,l}}return null==e?o:""}},{key:"all",value:function(e){return this.get(null,e)}}]),hn=tn(function e(){Qt(this,e)},[{key:"serializeFormArray",value:function(e){if("undefined"==typeof document)return[];var t,n,o=[];if("object"==sn(e="string"==typeof e?document.getElementById(e):e)&&e&&"FORM"===e.nodeName)for(var r=e.elements.length,a=0;a<r;a++)if((t=e.elements[a]).name&&!t.disabled&&"file"!==t.type&&"reset"!==t.type&&"submit"!==t.type&&"button"!==t.type)if("select-multiple"===t.type){n=e.elements[a].options.length;for(var i=0;i<n;i++)t.options[i].selected&&(o[o.length]={name:t.name,value:t.options[i].value})}else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(o[o.length]={name:t.name,value:t.value});return o}}]);function fn(e){if("undefined"!=typeof navigator&&navigator.clipboard)navigator.clipboard.writeText(e);else if("undefined"!=typeof window){window.localStorage.setItem(ln,e);var t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-99999px",t.style.top="-99999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}function mn(){return pn.apply(this,arguments)}function pn(){var e;return e=Yt().m(function e(){return Yt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,"undefined"!=typeof navigator){e.n=1;break}throw new Error("Navigator not available");case 1:return e.n=2,navigator.permissions.query({name:"clipboard-read"});case 2:if("denied"!==e.v.state){e.n=3;break}throw new Error("Not allowed to read clipboard.");case 3:return e.a(2,navigator.clipboard.read());case 4:return e.p=4,e.v,e.a(2,new Promise(function(e,t){"undefined"!=typeof window&&window.localStorage.getItem(ln)?e(window.localStorage.getItem(ln)):t(null)}))}},e,null,[[0,4]])}),pn=function(){var t=this,n=arguments;return new Promise(function(o,r){var a=e.apply(t,n);function i(e){Zt(a,o,r,i,s,"next",e)}function s(e){Zt(a,o,r,i,s,"throw",e)}i(void 0)})},pn.apply(this,arguments)}function gn(e){try{JSON.parse(e)}catch(e){return!1}return!0}function vn(e){return e?(e=e.toString().replace(/_/g," ")).charAt(0).toUpperCase()+e.slice(1):""}function yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(/\s|'/g,t)}function bn(e){return(e=e.replace(/\.|_/g," ")).charAt(0).toUpperCase()+e.slice(1)}var wn={AdminConfig:l,Fetcher:_t,Form:Vt,Errors:xt,MapAPI:Ot,Dashboard:Ut,LeftMenu:qt,Storage:Jt,Store:Xt,queryBuilder:un,Utils:hn,CopyToClipboard:fn,PasteFromClipboard:mn,IsJson:gn,Humanize:vn,CleanForUrl:yn,TitleCase:bn,parseProp:cn,safeErrorData:dn};"undefined"!=typeof window&&(window.HashtagCmsAdmin=wn);const Sn=wn;return t})(),e.exports=t()},602(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={mounted:function(){this.normalizeData()},props:["dataOptions","dataSelected","dataParser","dataOnChange","dataBtnCss"],data:function(){return{display:"",formatter:this.dataParser,lists:void 0!==this.dataOptions&&"string"==typeof this.dataOptions?JSON.parse(this.dataOptions):this.dataOptions,current:{},selectedIndex:void 0===this.dataSelected?0:parseInt(this.dataSelected),openCSS:"",btnCss:void 0===this.dataBtnCss?"":this.dataBtnCss}},computed:{onChange:function onChange(){var method=void 0===this.dataOnChange?null:this.dataOnChange;return"string"==typeof method?eval(method):method}},methods:{toggleMenu:function(){this.display=""===this.display?"display:block":"",""!==this.display&&this.bindDocumentClick()},isActive:function(e){return this.current.value===e.value?"dropdown-item active hand":"dropdown-item hand"},normalizeData:function(){var e=this.formatter,t=[];this.lists.forEach(function(n,o){"function"==typeof e?t.push(e(n)):"number"==typeof o&&t.push({label:n,value:n})}),this.lists=t,this.current=this.lists[this.selectedIndex]},setCurrent:function(e){this.current=this.lists[e],this.current.index=e,null!=this.onChange&&"function"==typeof this.onChange&&this.onChange(this.current),this.$emit("change",this.current)},mangeShowHide:function(e){var t=this.$refs.dropdownMenu,n=e.target;t===n||t.contains(n)||(this.display="",this.unBindDocumentClick())},bindDocumentClick:function(){document.addEventListener("mouseup",this.mangeShowHide)},unBindDocumentClick:function(){document.removeEventListener("mouseup",this.mangeShowHide)},setData:function(e){this.lists=[],this.lists=e,this.normalizeData()}}}},127(e){e.exports=function(){var e=[],t=[],n={},o={},r={};function a(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function s(e,t){return e.replace(t[0],function(n,o){var r,a,s=(r=t[1],a=arguments,r.replace(/\$(\d{1,2})/g,function(e,t){return a[t]||""}));return i(""===n?e[o-1]:n,s)})}function l(e,t,o){if(!e.length||n.hasOwnProperty(e))return t;for(var r=o.length;r--;){var a=o[r];if(a[0].test(t))return s(t,a)}return t}function c(e,t,n){return function(o){var r=o.toLowerCase();return t.hasOwnProperty(r)?i(o,r):e.hasOwnProperty(r)?i(o,e[r]):l(r,o,n)}}function d(e,t,n,o){return function(o){var r=o.toLowerCase();return!!t.hasOwnProperty(r)||!e.hasOwnProperty(r)&&l(r,r,n)===r}}function u(e,t,n){return(n?t+" ":"")+(1===t?u.singular(e):u.plural(e))}return u.plural=c(r,o,e),u.isPlural=d(r,o,e),u.singular=c(o,r,t),u.isSingular=d(o,r,t),u.addPluralRule=function(t,n){e.push([a(t),n])},u.addSingularRule=function(e,n){t.push([a(e),n])},u.addUncountableRule=function(e){"string"!=typeof e?(u.addPluralRule(e,"$0"),u.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},u.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),r[e]=t,o[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return u.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return u.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return u.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(u.addUncountableRule),u}()},846(e){var t;t=()=>(()=>{var e={"./src/Base64.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const o={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){let t,n,r,a,i,s,l,c="",d=0;for(e=o._utf8Encode(e);d<e.length;)t=e.charCodeAt(d++),n=e.charCodeAt(d++),r=e.charCodeAt(d++),a=t>>2,i=(3&t)<<4|n>>4,s=(15&n)<<2|r>>6,l=63&r,isNaN(n)?s=l=64:isNaN(r)&&(l=64),c=c+this._keyStr.charAt(a)+this._keyStr.charAt(i)+this._keyStr.charAt(s)+this._keyStr.charAt(l);return c},decode:function(e){let t,n,r,a,i,s,l,c="",d=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");d<e.length;)a=this._keyStr.indexOf(e.charAt(d++)),i=this._keyStr.indexOf(e.charAt(d++)),s=this._keyStr.indexOf(e.charAt(d++)),l=this._keyStr.indexOf(e.charAt(d++)),t=a<<2|i>>4,n=(15&i)<<4|s>>2,r=(3&s)<<6|l,c+=String.fromCharCode(t),64!==s&&(c+=String.fromCharCode(n)),64!==l&&(c+=String.fromCharCode(r));return c=o._utf8Decode(c),c},_utf8Encode:function(e){e=e.replace(/\r\n/g,"\n");let t="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8Decode:function(e){let t,n,o,r="",a=0;for(t=n=0;a<e.length;)t=e.charCodeAt(a),t<128?(r+=String.fromCharCode(t),a++):t>191&&t<224?(n=e.charCodeAt(a+1),r+=String.fromCharCode((31&t)<<6|63&n),a+=2):(n=e.charCodeAt(a+1),o=e.charCodeAt(a+2),r+=String.fromCharCode((15&t)<<12|(63&n)<<6|63&o),a+=3);return r}},r=o},"./src/SecureLS.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{SecureLS:()=>v});var o=n("./src/constants.js"),r=n("./src/enc-utf8.js"),a=n("./src/utils.js"),i=n("./node_modules/crypto-js/aes.js"),s=n.n(i),l=n("./node_modules/crypto-js/rabbit.js"),c=n.n(l),d=n("./node_modules/crypto-js/rc4.js"),u=n.n(d),h=n("./node_modules/crypto-js/tripledes.js"),f=n.n(h),m=n("./node_modules/lz-string/libs/lz-string.js"),p=n("./src/Base64.js");const g={[o.default.EncrytionTypes.AES]:s(),[o.default.EncrytionTypes.DES]:f(),[o.default.EncrytionTypes.RABBIT]:c(),[o.default.EncrytionTypes.RC4]:u()};class v{constructor({encryptionSecret:e="",encryptionNamespace:t="",isCompression:n=!0,encodingType:a=o.default.EncrytionTypes.BASE64,storage:i=localStorage,metaKey:l=o.default.metaKey}={}){Object.assign(this,{_name:"secure-ls",Base64:p.default,LZString:{compressToUTF16:m.compressToUTF16,decompressFromUTF16:m.decompressFromUTF16},AES:s(),DES:f(),RABBIT:c(),RC4:u(),enc:r.default}),this.config={encryptionSecret:e,encryptionNamespace:t,isCompression:n,encodingType:a.toLowerCase(),storage:i,metaKey:l},this.encryptionSecret=e,this.storage=i,this.metaKey=l,this.init()}init(){let e=this.getMetaData();this._isBase64=this._isBase64EncryptionType(),this._isAES=this._isAESEncryptionType(),this._isDES=this._isDESEncryptionType(),this._isRabbit=this._isRabbitEncryptionType(),this._isRC4=this._isRC4EncryptionType(),this._isCompression=this._isDataCompressionEnabled(),this.allKeys=e.keys||this.resetAllKeys()}_isBase64EncryptionType(){return p.default&&(void 0===this.config.encodingType||this.config.encodingType===o.default.EncrytionTypes.BASE64)}_isAESEncryptionType(){return s()&&this.config.encodingType===o.default.EncrytionTypes.AES}_isDESEncryptionType(){return f()&&this.config.encodingType===o.default.EncrytionTypes.DES}_isRabbitEncryptionType(){return c()&&this.config.encodingType===o.default.EncrytionTypes.RABBIT}_isRC4EncryptionType(){return u()&&this.config.encodingType===o.default.EncrytionTypes.RC4}_isDataCompressionEnabled(){return this.config.isCompression}getEncryptionSecret(e){let t=this.getMetaData(),n=a.default.getObjectFromKey(t.keys,e);n&&(this._isAES||this._isDES||this._isRabbit||this._isRC4)&&(void 0===this.config.encryptionSecret?(this.encryptionSecret=n.s,this.encryptionSecret||(this.encryptionSecret=a.default.generateSecretKey(),this.setMetaData())):this.encryptionSecret=this.config.encryptionSecret||n.s||"")}getEncryptionType(){const e=this.config.encodingType;return e?e.toLowerCase():o.default.EncrytionTypes.BASE64}getDataFromLocalStorage(e){return this.storage.getItem(e,!0)}setDataToLocalStorage(e,t){this.storage.setItem(e,t)}setMetaData(){let e=this.processData({keys:this.allKeys},!0);this.setDataToLocalStorage(this.getMetaKey(),e)}getMetaData(){return this.get(this.getMetaKey(),!0)||{}}getMetaKey(){return this.metaKey+(this.config.encryptionNamespace?"__"+this.config.encryptionNamespace:"")}resetAllKeys(){return this.allKeys=[],[]}processData(e,t){if(null==e||""===e)return"";let n;try{n=JSON.stringify(e)}catch(e){throw new Error("Could not stringify data",e)}let o=n;if(this._isBase64||t)o=p.default.encode(n);else{const e=g[this.getEncryptionType()];e&&(o=e.encrypt(n,this.encryptionSecret)),o=o&&o.toString()}let r=o;return(this._isCompression||t)&&(r=this.LZString.compressToUTF16(o)),r}getAllKeys(){let e=this.getMetaData();return a.default.extractKeyNames(e)||[]}get(e,t){let n="",i="";if(!a.default.is(e))return a.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED),i;let s=this.getDataFromLocalStorage(e);if(!s)return i;let l=s;if((this._isCompression||t)&&(l=this.LZString.decompressFromUTF16(s)),n=l,this._isBase64||t)n=p.default.decode(l);else{this.getEncryptionSecret(e);const t=g[this.getEncryptionType()];if(t){const e=t.decrypt(l.toString(),this.encryptionSecret);e&&(n=e.toString(r.default._Utf8))}}try{i=JSON.parse(n)}catch(e){throw new Error("Could not parse JSON",e)}return i}set(e,t){let n="";a.default.is(e)?(this.getEncryptionSecret(e),String(e)!==String(this.metaKey)&&(a.default.isKeyPresent(this.allKeys,e)||(this.allKeys.push({k:e,s:this.encryptionSecret}),this.setMetaData())),n=this.processData(t),this.setDataToLocalStorage(e,n)):a.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED)}remove(e){a.default.is(e)?e===this.metaKey&&this.getAllKeys().length?a.default.warn(o.default.WarningEnum.META_KEY_REMOVE):(a.default.isKeyPresent(this.allKeys,e)&&(a.default.removeFromKeysList(this.allKeys,e),this.setMetaData()),this.storage.removeItem(e)):a.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED)}removeAll(){let e=this.getAllKeys();for(let t=0;t<e.length;t++)this.storage.removeItem(e[t]);this.storage.removeItem(this.metaKey),this.resetAllKeys()}clear(){this.storage.clear(),this.resetAllKeys()}}},"./src/WordArray.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});let o={random:function(e){let t=[],n=function(e){let t=987654321,n=4294967295;return function(){t=36969*(65535&t)+(t>>16)&n;let o=(t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return o/=4294967296,o+=.5,o*(Math.random()>.5?1:-1)}};for(let o,r=0;r<e;r+=4){let e=n(4294967296*(o||Math.random()));o=987654071*e(),t.push(4294967296*e()|0)}return new o.Set(t,e)},Set:function(e,t){e=this.words=e||[],this.sigBytes=void 0!==t?t:8*e.length}};const r=o},"./src/constants.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const o={KEY_NOT_PROVIDED:"keyNotProvided",META_KEY_REMOVE:"metaKeyRemove",DEFAULT_TEXT:"defaultText"},r={};r[o.KEY_NOT_PROVIDED]="Secure LS: Key not provided. Aborting operation!",r[o.META_KEY_REMOVE]="Secure LS: Meta key can not be removed\nunless all keys created by Secure LS are removed!",r[o.DEFAULT_TEXT]="Unexpected output";const a={WarningEnum:o,WarningTypes:r,EncrytionTypes:{BASE64:"base64",AES:"aes",DES:"des",RABBIT:"rabbit",RC4:"rc4"},metaKey:"_secure__ls__metadata",secretPhrase:"s3cr3t$#@135^&*246"}},"./src/enc-utf8.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const o={Latin1:{stringify:e=>{let t,n,o=e.words,r=e.sigBytes,a=[];for(t=0;t<r;t++)n=o[t>>>2]>>>24-t%4*8&255,a.push(String.fromCharCode(n));return a.join("")}},_Utf8:{stringify:e=>{try{return decodeURIComponent(escape(o.Latin1.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data",e)}}}},r=o},"./src/utils.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var o=n("./node_modules/crypto-js/pbkdf2.js"),r=n.n(o),a=n("./src/constants.js"),i=n("./src/WordArray.js");const s={is:e=>!!e,warn:(e=a.default.WarningEnum.DEFAULT_TEXT)=>{console.warn(a.default.WarningTypes[e])},generateSecretKey:()=>{const e=i.default.random(16);return r()(a.default.secretPhrase,e,{keySize:4}).toString()},getObjectFromKey:(e=[],t)=>e.find(e=>e.k===t)||{},extractKeyNames:({keys:e=[]}={})=>e.map(({k:e})=>e),isKeyPresent:(e=[],t)=>e.some(e=>String(e.k)===String(t)),removeFromKeysList:(e=[],t)=>{const n=e.findIndex(e=>e.k===t);return-1!==n&&e.splice(n,1),n}}},"./node_modules/crypto-js/aes.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.BlockCipher,n=e.algo,r=[],a=[],i=[],s=[],l=[],c=[],d=[],u=[],h=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,o=0;for(t=0;t<256;t++){var m=o^o<<1^o<<2^o<<3^o<<4;m=m>>>8^255&m^99,r[n]=m,a[m]=n;var p=e[n],g=e[p],v=e[g],y=257*e[m]^16843008*m;i[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*v^65537*g^257*p^16843008*n,d[m]=y<<24|y>>>8,u[m]=y<<16|y>>>16,h[m]=y<<8|y>>>24,f[m]=y,n?(n=p^e[e[e[v^p]]],o^=e[e[o]]):n=o=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],p=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],i=0;i<o;i++)i<n?a[i]=t[i]:(c=a[i-1],i%n?n>6&&i%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=m[i/n|0]<<24),a[i]=a[i-n]^c);for(var s=this._invKeySchedule=[],l=0;l<o;l++){if(i=o-l,l%4)var c=a[i];else c=a[i-4];s[l]=l<4||i<=4?c:d[r[c>>>24]]^u[r[c>>>16&255]]^h[r[c>>>8&255]]^f[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,s,l,c,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,d,u,h,f,a),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,o,r,a,i,s){for(var l=this._nRounds,c=e[t]^n[0],d=e[t+1]^n[1],u=e[t+2]^n[2],h=e[t+3]^n[3],f=4,m=1;m<l;m++){var p=o[c>>>24]^r[d>>>16&255]^a[u>>>8&255]^i[255&h]^n[f++],g=o[d>>>24]^r[u>>>16&255]^a[h>>>8&255]^i[255&c]^n[f++],v=o[u>>>24]^r[h>>>16&255]^a[c>>>8&255]^i[255&d]^n[f++],y=o[h>>>24]^r[c>>>16&255]^a[d>>>8&255]^i[255&u]^n[f++];c=p,d=g,u=v,h=y}p=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],g=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[f++],v=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[f++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^n[f++],e[t]=p,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(p)}(),o.AES)},"./node_modules/crypto-js/cipher-core.js":function(e,t,n){var o,r,a,i,s,l,c,d,u,h,f,m,p,g,v,y,b,w,S;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/evpkdf.js"),void(o.lib.Cipher||(r=o,a=r.lib,i=a.Base,s=a.WordArray,l=a.BufferedBlockAlgorithm,c=r.enc,c.Utf8,d=c.Base64,u=r.algo.EvpKDF,h=a.Cipher=l.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?S:b}return function(t){return{encrypt:function(n,o,r){return e(o).encrypt(t,n,o,r)},decrypt:function(n,o,r){return e(o).decrypt(t,n,o,r)}}}}()}),a.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),f=r.mode={},m=a.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var e=m.extend();function t(e,t,n){var o,r=this._iv;r?(o=r,this._iv=void 0):o=this._prevBlock;for(var a=0;a<n;a++)e[t+a]^=o[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var o=this._cipher,r=o.blockSize;t.call(this,e,n,r),o.encryptBlock(e,n),this._prevBlock=e.slice(n,n+r)}}),e.Decryptor=e.extend({processBlock:function(e,n){var o=this._cipher,r=o.blockSize,a=e.slice(n,n+r);o.decryptBlock(e,n),t.call(this,e,n,r),this._prevBlock=a}}),e}(),g=(r.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,o=n-e.sigBytes%n,r=o<<24|o<<16|o<<8|o,a=[],i=0;i<o;i+=4)a.push(r);var l=s.create(a,o);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},a.BlockCipher=h.extend({cfg:h.cfg.extend({mode:p,padding:g}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,o=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=o.createEncryptor:(e=o.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(o,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),v=a.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(d)},parse:function(e){var t,n=d.parse(e),o=n.words;return 1398893684==o[0]&&1701076831==o[1]&&(t=s.create(o.slice(2,4)),o.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:t})}},b=a.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,o){o=this.cfg.extend(o);var r=e.createEncryptor(n,o),a=r.finalize(t),i=r.cfg;return v.create({ciphertext:a,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:o.format})},decrypt:function(e,t,n,o){return o=this.cfg.extend(o),t=this._parse(t,o.format),e.createDecryptor(n,o).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),w=(r.kdf={}).OpenSSL={execute:function(e,t,n,o,r){if(o||(o=s.random(8)),r)a=u.create({keySize:t+n,hasher:r}).compute(e,o);else var a=u.create({keySize:t+n}).compute(e,o);var i=s.create(a.words.slice(t),4*n);return a.sigBytes=4*t,v.create({key:a,iv:i,salt:o})}},S=a.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(e,t,n,o){var r=(o=this.cfg.extend(o)).kdf.execute(n,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=r.iv;var a=b.encrypt.call(this,e,t,r.key,o);return a.mixIn(r),a},decrypt:function(e,t,n,o){o=this.cfg.extend(o),t=this._parse(t,o.format);var r=o.kdf.execute(n,e.keySize,e.ivSize,t.salt,o.hasher);return o.iv=r.iv,b.decrypt.call(this,e,t,r.key,o)}}))))},"./node_modules/crypto-js/core.js":function(e,t,n){var o;e.exports=(o=o||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n("?9157")}catch(e){}var o=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},i=a.lib={},s=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=i.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,r=e.sigBytes;if(this.clamp(),o%4)for(var a=0;a<r;a++){var i=n[a>>>2]>>>24-a%4*8&255;t[o+a>>>2]|=i<<24-(o+a)%4*8}else for(var s=0;s<r;s+=4)t[o+s>>>2]=n[s>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),c=a.enc={},d=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var a=t[r>>>2]>>>24-r%4*8&255;o.push((a>>>4).toString(16)),o.push((15&a).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new l.init(n,t/2)}},u=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],r=0;r<n;r++){var a=t[r>>>2]>>>24-r%4*8&255;o.push(String.fromCharCode(a))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new l.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,o=this._data,r=o.words,a=o.sigBytes,i=this.blockSize,s=a/(4*i),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,d=e.min(4*c,a);if(c){for(var u=0;u<c;u+=i)this._doProcessBlock(r,u);n=r.splice(0,c),o.sigBytes-=d}return new l.init(n,d)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),m=(i.Hasher=f.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new m.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math),o)},"./node_modules/crypto-js/enc-base64.js":function(e,t,n){var o,r,a;e.exports=(o=n("./node_modules/crypto-js/core.js"),a=(r=o).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,o=this._map;e.clamp();for(var r=[],a=0;a<n;a+=3)for(var i=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<n;s++)r.push(o.charAt(i>>>6*(3-s)&63));var l=o.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var r=0;r<n.length;r++)o[n.charCodeAt(r)]=r}var i=n.charAt(64);if(i){var s=e.indexOf(i);-1!==s&&(t=s)}return function(e,t,n){for(var o=[],r=0,i=0;i<t;i++)if(i%4){var s=n[e.charCodeAt(i-1)]<<i%4*2|n[e.charCodeAt(i)]>>>6-i%4*2;o[r>>>2]|=s<<24-r%4*8,r++}return a.create(o,r)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"./node_modules/crypto-js/evpkdf.js":function(e,t,n){var o,r,a,i,s,l,c,d;e.exports=(d=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/sha1.js"),n("./node_modules/crypto-js/hmac.js"),a=(r=(o=d).lib).Base,i=r.WordArray,l=(s=o.algo).MD5,c=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,o=this.cfg,r=o.hasher.create(),a=i.create(),s=a.words,l=o.keySize,c=o.iterations;s.length<l;){n&&r.update(n),n=r.update(e).finalize(t),r.reset();for(var d=1;d<c;d++)n=r.finalize(n),r.reset();a.concat(n)}return a.sigBytes=4*l,a}}),o.EvpKDF=function(e,t,n){return c.create(n).compute(e,t)},d.EvpKDF)},"./node_modules/crypto-js/hmac.js":function(e,t,n){var o,r,a;e.exports=(r=(o=n("./node_modules/crypto-js/core.js")).lib.Base,a=o.enc.Utf8,void(o.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),i=this._iKey=t.clone(),s=r.words,l=i.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;r.sigBytes=i.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},"./node_modules/crypto-js/md5.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),function(e){var t=o,n=t.lib,r=n.WordArray,a=n.Hasher,i=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=i.MD5=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var o=t+n,r=e[o];e[o]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,i=e[t+0],l=e[t+1],f=e[t+2],m=e[t+3],p=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],S=e[t+10],E=e[t+11],k=e[t+12],_=e[t+13],C=e[t+14],N=e[t+15],B=a[0],A=a[1],D=a[2],x=a[3];B=c(B,A,D,x,i,7,s[0]),x=c(x,B,A,D,l,12,s[1]),D=c(D,x,B,A,f,17,s[2]),A=c(A,D,x,B,m,22,s[3]),B=c(B,A,D,x,p,7,s[4]),x=c(x,B,A,D,g,12,s[5]),D=c(D,x,B,A,v,17,s[6]),A=c(A,D,x,B,y,22,s[7]),B=c(B,A,D,x,b,7,s[8]),x=c(x,B,A,D,w,12,s[9]),D=c(D,x,B,A,S,17,s[10]),A=c(A,D,x,B,E,22,s[11]),B=c(B,A,D,x,k,7,s[12]),x=c(x,B,A,D,_,12,s[13]),D=c(D,x,B,A,C,17,s[14]),B=d(B,A=c(A,D,x,B,N,22,s[15]),D,x,l,5,s[16]),x=d(x,B,A,D,v,9,s[17]),D=d(D,x,B,A,E,14,s[18]),A=d(A,D,x,B,i,20,s[19]),B=d(B,A,D,x,g,5,s[20]),x=d(x,B,A,D,S,9,s[21]),D=d(D,x,B,A,N,14,s[22]),A=d(A,D,x,B,p,20,s[23]),B=d(B,A,D,x,w,5,s[24]),x=d(x,B,A,D,C,9,s[25]),D=d(D,x,B,A,m,14,s[26]),A=d(A,D,x,B,b,20,s[27]),B=d(B,A,D,x,_,5,s[28]),x=d(x,B,A,D,f,9,s[29]),D=d(D,x,B,A,y,14,s[30]),B=u(B,A=d(A,D,x,B,k,20,s[31]),D,x,g,4,s[32]),x=u(x,B,A,D,b,11,s[33]),D=u(D,x,B,A,E,16,s[34]),A=u(A,D,x,B,C,23,s[35]),B=u(B,A,D,x,l,4,s[36]),x=u(x,B,A,D,p,11,s[37]),D=u(D,x,B,A,y,16,s[38]),A=u(A,D,x,B,S,23,s[39]),B=u(B,A,D,x,_,4,s[40]),x=u(x,B,A,D,i,11,s[41]),D=u(D,x,B,A,m,16,s[42]),A=u(A,D,x,B,v,23,s[43]),B=u(B,A,D,x,w,4,s[44]),x=u(x,B,A,D,k,11,s[45]),D=u(D,x,B,A,N,16,s[46]),B=h(B,A=u(A,D,x,B,f,23,s[47]),D,x,i,6,s[48]),x=h(x,B,A,D,y,10,s[49]),D=h(D,x,B,A,C,15,s[50]),A=h(A,D,x,B,g,21,s[51]),B=h(B,A,D,x,k,6,s[52]),x=h(x,B,A,D,m,10,s[53]),D=h(D,x,B,A,S,15,s[54]),A=h(A,D,x,B,l,21,s[55]),B=h(B,A,D,x,b,6,s[56]),x=h(x,B,A,D,N,10,s[57]),D=h(D,x,B,A,v,15,s[58]),A=h(A,D,x,B,_,21,s[59]),B=h(B,A,D,x,p,6,s[60]),x=h(x,B,A,D,E,10,s[61]),D=h(D,x,B,A,f,15,s[62]),A=h(A,D,x,B,w,21,s[63]),a[0]=a[0]+B|0,a[1]=a[1]+A|0,a[2]=a[2]+D|0,a[3]=a[3]+x|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var a=e.floor(o/4294967296),i=o;n[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var d=l[c];l[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,o,r,a,i){var s=e+(t&n|~t&o)+r+i;return(s<<a|s>>>32-a)+t}function d(e,t,n,o,r,a,i){var s=e+(t&o|n&~o)+r+i;return(s<<a|s>>>32-a)+t}function u(e,t,n,o,r,a,i){var s=e+(t^n^o)+r+i;return(s<<a|s>>>32-a)+t}function h(e,t,n,o,r,a,i){var s=e+(n^(t|~o))+r+i;return(s<<a|s>>>32-a)+t}t.MD5=a._createHelper(l),t.HmacMD5=a._createHmacHelper(l)}(Math),o.MD5)},"./node_modules/crypto-js/pbkdf2.js":function(e,t,n){var o,r,a,i,s,l,c,d,u;e.exports=(u=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/sha256.js"),n("./node_modules/crypto-js/hmac.js"),a=(r=(o=u).lib).Base,i=r.WordArray,l=(s=o.algo).SHA256,c=s.HMAC,d=s.PBKDF2=a.extend({cfg:a.extend({keySize:4,hasher:l,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,o=c.create(n.hasher,e),r=i.create(),a=i.create([1]),s=r.words,l=a.words,d=n.keySize,u=n.iterations;s.length<d;){var h=o.update(t).finalize(a);o.reset();for(var f=h.words,m=f.length,p=h,g=1;g<u;g++){p=o.finalize(p),o.reset();for(var v=p.words,y=0;y<m;y++)f[y]^=v[y]}r.concat(h),l[0]++}return r.sigBytes=4*d,r}}),o.PBKDF2=function(e,t,n){return d.create(n).compute(e,t)},u.PBKDF2)},"./node_modules/crypto-js/rabbit.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.StreamCipher,n=e.algo,r=[],a=[],i=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var o=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)r[n]^=o[n+4&7];if(t){var a=t.words,i=a[0],s=a[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),d=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=c>>>16|4294901760&d,h=d<<16|65535&c;for(r[0]^=c,r[1]^=u,r[2]^=d,r[3]^=h,r[4]^=c,r[5]^=u,r[6]^=d,r[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)r[o]=16711935&(r[o]<<8|r[o]>>>24)|4278255360&(r[o]<<24|r[o]>>>8),e[t+o]^=r[o]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var o=e[n]+t[n],r=65535&o,s=o>>>16,l=((r*r>>>17)+r*s>>>15)+s*s,c=((4294901760&o)*o|0)+((65535&o)*o|0);i[n]=l^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}e.Rabbit=t._createHelper(s)}(),o.Rabbit)},"./node_modules/crypto-js/rc4.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.StreamCipher,n=e.algo,r=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,o=this._S=[],r=0;r<256;r++)o[r]=r;r=0;for(var a=0;r<256;r++){var i=r%n,s=t[i>>>2]>>>24-i%4*8&255;a=(a+o[r]+s)%256;var l=o[r];o[r]=o[a],o[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,o=0,r=0;r<4;r++){n=(n+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[n],e[n]=a,o|=e[(e[t]+e[n])%256]<<24-8*r}return this._i=t,this._j=n,o}e.RC4=t._createHelper(r);var i=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(i)}(),o.RC4)},"./node_modules/crypto-js/sha1.js":function(e,t,n){var o,r,a,i,s,l,c,d;e.exports=(r=(o=d=n("./node_modules/crypto-js/core.js")).lib,a=r.WordArray,i=r.Hasher,s=o.algo,l=[],c=s.SHA1=i.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],r=n[1],a=n[2],i=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var d=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=d<<1|d>>>31}var u=(o<<5|o>>>27)+s+l[c];u+=c<20?1518500249+(r&a|~r&i):c<40?1859775393+(r^a^i):c<60?(r&a|r&i|a&i)-1894007588:(r^a^i)-899497514,s=i,i=a,a=r<<30|r>>>2,r=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(o+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),o.SHA1=i._createHelper(c),o.HmacSHA1=i._createHmacHelper(c),d.SHA1)},"./node_modules/crypto-js/sha256.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),function(e){var t=o,n=t.lib,r=n.WordArray,a=n.Hasher,i=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,r=0;r<64;)t(o)&&(r<8&&(s[r]=n(e.pow(o,.5))),l[r]=n(e.pow(o,1/3)),r++),o++}();var c=[],d=i.SHA256=a.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],r=n[1],a=n[2],i=n[3],s=n[4],d=n[5],u=n[6],h=n[7],f=0;f<64;f++){if(f<16)c[f]=0|e[t+f];else{var m=c[f-15],p=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=p+c[f-7]+v+c[f-16]}var y=o&r^o&a^r&a,b=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&d^~s&u)+l[f]+c[f];h=u,u=d,d=s,s=i+w|0,i=a,a=r,r=o,o=w+(b+y)|0}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+d|0,n[6]=n[6]+u|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(o/4294967296),n[15+(r+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(d),t.HmacSHA256=a._createHmacHelper(d)}(Math),o.SHA256)},"./node_modules/crypto-js/tripledes.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib,n=t.WordArray,r=t.BlockCipher,a=e.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=a.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var o=i[n]-1;t[n]=e[o>>>5]>>>31-o%32&1}for(var r=this._subKeys=[],a=0;a<16;a++){var c=r[a]=[],d=l[a];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+d)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+d)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var u=this._invSubKeys=[];for(n=0;n<16;n++)u[n]=r[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var o=0;o<16;o++){for(var r=n[o],a=this._lBlock,i=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((i^r[l])&d[l])>>>0];this._lBlock=i,this._rBlock=a^s}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function f(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=r._createHelper(u);var m=a.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),o=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(n.create(t)),this._des2=u.createEncryptor(n.create(o)),this._des3=u.createEncryptor(n.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(m)}(),o.TripleDES)},"./node_modules/lz-string/libs/lz-string.js":(e,t,n)=>{var o,r=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function r(e,t){if(!o[e]){o[e]={};for(var n=0;n<e.length;n++)o[e][e.charAt(n)]=n}return o[e][t]}var a={compressToBase64:function(e){if(null==e)return"";var n=a._compress(e,6,function(e){return t.charAt(e)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:a._decompress(e.length,32,function(n){return r(t,e.charAt(n))})},compressToUTF16:function(t){return null==t?"":a._compress(t,15,function(t){return e(t+32)})+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:a._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=a.compress(e),n=new Uint8Array(2*t.length),o=0,r=t.length;o<r;o++){var i=t.charCodeAt(o);n[2*o]=i>>>8,n[2*o+1]=i%256}return n},decompressFromUint8Array:function(t){if(null==t)return a.decompress(t);for(var n=new Array(t.length/2),o=0,r=n.length;o<r;o++)n[o]=256*t[2*o]+t[2*o+1];var i=[];return n.forEach(function(t){i.push(e(t))}),a.decompress(i.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":a._compress(e,6,function(e){return n.charAt(e)})},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),a._decompress(e.length,32,function(t){return r(n,e.charAt(t))}))},compress:function(t){return a._compress(t,16,function(t){return e(t)})},_compress:function(e,t,n){if(null==e)return"";var o,r,a,i={},s={},l="",c="",d="",u=2,h=3,f=2,m=[],p=0,g=0;for(a=0;a<e.length;a+=1)if(l=e.charAt(a),Object.prototype.hasOwnProperty.call(i,l)||(i[l]=h++,s[l]=!0),c=d+l,Object.prototype.hasOwnProperty.call(i,c))d=c;else{if(Object.prototype.hasOwnProperty.call(s,d)){if(d.charCodeAt(0)<256){for(o=0;o<f;o++)p<<=1,g==t-1?(g=0,m.push(n(p)),p=0):g++;for(r=d.charCodeAt(0),o=0;o<8;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}else{for(r=1,o=0;o<f;o++)p=p<<1|r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r=0;for(r=d.charCodeAt(0),o=0;o<16;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}0==--u&&(u=Math.pow(2,f),f++),delete s[d]}else for(r=i[d],o=0;o<f;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1;0==--u&&(u=Math.pow(2,f),f++),i[c]=h++,d=String(l)}if(""!==d){if(Object.prototype.hasOwnProperty.call(s,d)){if(d.charCodeAt(0)<256){for(o=0;o<f;o++)p<<=1,g==t-1?(g=0,m.push(n(p)),p=0):g++;for(r=d.charCodeAt(0),o=0;o<8;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}else{for(r=1,o=0;o<f;o++)p=p<<1|r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r=0;for(r=d.charCodeAt(0),o=0;o<16;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1}0==--u&&(u=Math.pow(2,f),f++),delete s[d]}else for(r=i[d],o=0;o<f;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1;0==--u&&(u=Math.pow(2,f),f++)}for(r=2,o=0;o<f;o++)p=p<<1|1&r,g==t-1?(g=0,m.push(n(p)),p=0):g++,r>>=1;for(;;){if(p<<=1,g==t-1){m.push(n(p));break}g++}return m.join("")},decompress:function(e){return null==e?"":""==e?null:a._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,o){var r,a,i,s,l,c,d,u=[],h=4,f=4,m=3,p="",g=[],v={val:o(0),position:n,index:1};for(r=0;r<3;r+=1)u[r]=r;for(i=0,l=Math.pow(2,2),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;switch(i){case 0:for(i=0,l=Math.pow(2,8),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;d=e(i);break;case 1:for(i=0,l=Math.pow(2,16),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;d=e(i);break;case 2:return""}for(u[3]=d,a=d,g.push(d);;){if(v.index>t)return"";for(i=0,l=Math.pow(2,m),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;switch(d=i){case 0:for(i=0,l=Math.pow(2,8),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;u[f++]=e(i),d=f-1,h--;break;case 1:for(i=0,l=Math.pow(2,16),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;u[f++]=e(i),d=f-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,m),m++),u[d])p=u[d];else{if(d!==f)return null;p=a+a.charAt(0)}g.push(p),u[f++]=a+p.charAt(0),a=p,0==--h&&(h=Math.pow(2,m),m++)}}};return a}();void 0===(o=function(){return r}.call(t,n,t,e))||(e.exports=o)},"?9157":()=>{}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{default:()=>e});const e=n("./src/SecureLS.js").SecureLS})(),o})(),e.exports=t()},262(e,t){"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n}},742(e){"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__742__},380(e){"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__380__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ActionBar:()=>Z,AdminConfig:()=>g.AdminConfig,CategoryPlatform:()=>ce,CategorySettings:()=>Gn,CmsModuleDropdown:()=>C,CopyPaste:()=>Nh,CopyToClipboard:()=>g.CopyToClipboard,Dashboard:()=>g.Dashboard,DownloadButton:()=>Qn,EditorHelper:()=>lf,ErrorMessage:()=>ff,Fetcher:()=>g.Fetcher,FileUploader:()=>po,Form:()=>Sr,FrontendModuleCreator:()=>kr,GlobalSiteButton:()=>Ar,Homepage:()=>Wa,HtmlSlot:()=>Xa,ImageGallery:()=>li,InfoBox:()=>bi,InfoBoxes:()=>Ei,InfoPopup:()=>za,IsJson:()=>g.IsJson,LanguageButton:()=>A,LanguageCopier:()=>Oi,LeftMenu:()=>g.LeftMenu,LeftMenuShowHide:()=>Dh,LeftNav:()=>$i,Loader:()=>Xh,MapAPI:()=>mf,MenuSorter:()=>os,Modal:()=>Y,ModalBox:()=>se,ModuleCreator:()=>xl,ModulePermission:()=>ac,PageManager:()=>cf,Pagination:()=>gc,PasteFromClipboard:()=>g.PasteFromClipboard,PlatformButton:()=>Sc,SearchBar:()=>U,SiteButton:()=>Cc,SiteCloner:()=>Uc,SitewiseCopier:()=>_d,SitewiseData:()=>Ed,Sorter:()=>Td,SplitButton:()=>k,Storage:()=>g.Storage,TabularView:()=>mh,TimerButton:()=>Gh,TitleBar:()=>Vh,TitleCase:()=>g.TitleCase,Toast:()=>J,ToastBox:()=>tf,TopNav:()=>qh,Utils:()=>g.Utils,default:()=>wf,parseProp:()=>g.parseProp,queryBuilder:()=>g.queryBuilder,safeErrorData:()=>g.safeErrorData});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{CopyToClipboard:()=>g.CopyToClipboard,Fetcher:()=>g.Fetcher,IsJson:()=>g.IsJson,LeftMenu:()=>g.LeftMenu,Loader:()=>X,Modal:()=>Y,PasteFromClipboard:()=>g.PasteFromClipboard,Storage:()=>g.Storage,TitleCase:()=>g.TitleCase,Toast:()=>J,Utils:()=>g.Utils,parseProp:()=>g.parseProp,queryBuilder:()=>g.queryBuilder,safeErrorData:()=>g.safeErrorData});var t=__webpack_require__(380);function n(e){return function(e){if(Array.isArray(e))return o(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 o(e,t);var n={}.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)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var r={class:"container-fluid border-bottom mb-2 pb-2"},a={class:"row"},i={class:"col"},s={class:"btn-toolbar justify-content-between",role:"toolbar","aria-label":"Toolbar with button groups"},l={class:"btn-group",role:"group"},c={class:"moduleTitle"},d={class:"input-group actionToolbar"},u=["href","title"],h={key:1},f=["href"],m={class:"row"},p={key:0,class:"col"},g=__webpack_require__(724);const v=new g.AdminConfig;var y={class:"dropdown"},b=["onClick"],w=__webpack_require__(602),S=__webpack_require__(262);const E=(0,S.A)(w.A,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",y,[(0,t.createElementVNode)("a",{class:(0,t.normalizeClass)("btn btn-secondary dropdown-toggle "+a.btnCss),href:"#",role:"button","data-bs-toggle":"dropdown","aria-expanded":"false",onClick:n[0]||(n[0]=function(e){return i.toggleMenu()})},(0,t.toDisplayString)(a.current.label),3),(0,t.createElementVNode)("ul",{class:"dropdown-menu shadow",style:(0,t.normalizeStyle)(a.display),ref:"dropdownMenu"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.lists,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:(0,t.normalizeClass)(i.isActive(e)),onClick:function(e){return i.setCurrent(n)}},(0,t.toDisplayString)(e.label),11,b)}),256))],4)])}]]),k=E,_={components:{"split-button":k},props:["dataModules","dataCurrentModule"],mounted:function(){},data:function(){return{modules:void 0===this.dataModules?[]:"string"==typeof this.dataModules?JSON.parse(this.dataModules):this.dataModules,selectedModule:void 0===this.dataCurrentModule?"":this.dataCurrentModule}},computed:{currentIndex:function(){if(this.allModules.length>0)for(var e=0;e<this.allModules.length;e++)if(this.allModules[e].controller_name.toLowerCase()==this.selectedModule.toLowerCase())return e;return 0},allModules:function(){var e=this.modules.child;return e.splice(0,0,{name:this.modules.name,controller_name:this.modules.controller_name}),e}},methods:{hasChild:function(){return 0==this.modules.parent_id&&this.allModules.length>1},parseData:function(e){return{label:e.name,value:e.controller_name}},onChange:function(e){var t=v.admin_path(e.value);window.location=t}}},C=(0,S.A)(_,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("split-button");return i.hasChild()?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,"data-options":i.allModules,onChange:i.onChange,"data-parser":i.parseData,"data-selected":i.currentIndex,"data-btn-css":"btn-success"},{default:(0,t.withCtx)(function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.selectedModule),1)]}),_:1},8,["data-options","onChange","data-parser","data-selected"])):(0,t.createCommentVNode)("v-if",!0)}]]);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const B={components:{"split-button":k},props:["dataLanguages","dataSelectedLanguage"],mounted:function(){},data:function(){return{languages:void 0===this.dataLanguages?null:JSON.parse(this.dataLanguages),currentLang:void 0===this.dataSelectedLanguage?1:parseInt(this.dataSelectedLanguage)}},computed:{currentIndex:function(){if(null!=this.languages)for(var e=0;e<this.languages.length;e++)if(this.languages[e].id==this.currentLang)return e;return 0}},methods:{hasLanguage:function(){return null!=this.languages&&this.languages.length>1},parseLang:function(e){return{label:e.name,value:e.id}},setLanguage:function(e){var t=v.admin_path("ajax/setLanguage/".concat(e.value));axios.get(t).then(function(e){window.location.reload()}).catch(function(e){console.log(e)})}}},A=(0,S.A)(B,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("split-button");return i.hasLanguage()?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,"data-options":o.dataLanguages,onChange:i.setLanguage,"data-parser":i.parseLang,"data-selected":i.currentIndex,"data-btn-css":"lang"},{default:(0,t.withCtx)(function(){return function(e){if(Array.isArray(e))return N(e)}(e=n[0]||(n[0]=[(0,t.createTextVNode)("English",-1)]))||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 N(e,t);var n={}.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}}(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.")}();var e}),_:1},8,["data-options","onChange","data-parser","data-selected"])):(0,t.createCommentVNode)("v-if",!0)}]]);var D=["action"],x={class:"row searchForm justify-content-end"},V={class:"col-auto space-between"},T={class:"form-group"},M=["value"],O={class:"col-auto space-between"},I=["value"],P={class:"col-auto space-between"},j=["type"],F={class:"col-auto space-between"},L={class:"input-group-btn"};const R={mounted:function(){this.init()},props:["dataSelectedParams","dataControllerName","dataFields","dataActionFields"],data:function(){return{searchParams:{q:"",f:"id",o:"="},actionUrl:v.admin_path(this.dataControllerName+"/search"),searchFields:this.dataFields&&"null"!=this.dataFields?JSON.parse(this.dataFields):[],operators:["=","!=",">","<",">=","<=","like%","%like%"],hasAction:!(!this.dataActionFields||"null"==this.dataActionFields)&&JSON.parse(this.dataActionFields).length>0,defaultSearchParams:{q:"",f:"id",o:"="},inputType:"text"}},methods:{searchNow:function(){var e;if(""==this.searchParams.q.trim())e=v.admin_path(this.dataControllerName);else{var t=encodeURI(JSON.stringify(this.searchParams)),n=-1==this.actionUrl.indexOf("?")?"?":"&";e=this.actionUrl+n+"q="+t}return window.location.href=e,!1},resetForm:function(){var e=v.admin_path(this.dataControllerName);window.location.href=e},getFieldName:function(e,t){return t=t||"label","string"==typeof e||null==e[t]?e:e[t]},changeInputText:function(){this.searchParams.f.endsWith("_date")||this.searchParams.f.endsWith("_at")?this.inputType="date":this.inputType="text"},init:function(){this.hasAction&&this.searchFields.pop(),this.searchParams=JSON.parse(this.dataSelectedParams),null==this.searchParams.f&&(this.searchParams=this.defaultSearchParams)}}},U=(0,S.A)(R,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("form",{action:a.actionUrl,method:"get",onSubmit:n[5]||(n[5]=(0,t.withModifiers)(function(){return i.searchNow&&i.searchNow.apply(i,arguments)},["prevent"])),class:"form-inline",role:"form"},[(0,t.createElementVNode)("div",x,[(0,t.createElementVNode)("div",V,[(0,t.createElementVNode)("div",T,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:"fields","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.searchParams.f=e}),class:"form-select",onChange:n[1]||(n[1]=function(e){return i.changeInputText()})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.searchFields,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:i.getFieldName(e,"key")},(0,t.toDisplayString)(i.getFieldName(e)),9,M)}),256))],544),[[t.vModelSelect,a.searchParams.f]])])]),(0,t.createElementVNode)("div",O,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:"fields","onUpdate:modelValue":n[2]||(n[2]=function(e){return a.searchParams.o=e}),class:"form-select"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.operators,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e},(0,t.toDisplayString)(e),9,I)}),256))],512),[[t.vModelSelect,a.searchParams.o]])]),(0,t.createElementVNode)("div",P,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:a.inputType,"onUpdate:modelValue":n[3]||(n[3]=function(e){return a.searchParams.q=e}),class:"form-control",placeholder:"Search for..."},null,8,j),[[t.vModelDynamic,a.searchParams.q]])]),(0,t.createElementVNode)("div",F,[(0,t.createElementVNode)("span",L,[n[6]||(n[6]=(0,t.createElementVNode)("input",{type:"submit",name:"submit",value:"Search",class:"btn btn-success space-between btn-space"},null,-1)),(0,t.createElementVNode)("input",{type:"reset",name:"reset",onClick:n[4]||(n[4]=function(e){return i.resetForm()}),value:"Reset",class:"btn btn-outline-secondary btn-space"})])])])],40,D)}]]);var H=new function(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(e){e(n)}),(o=e.get("*"))&&o.slice().map(function(e){e(t,n)})}}};function $(e){return $="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)}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,W(o.key),o)}}function K(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e){var t=function(e){if("object"!=$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$(t)?t:t+""}g.LeftMenu&&"function"==typeof g.LeftMenu.init&&g.LeftMenu.init(H);var J=function(){return K(function e(){q(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,o=arguments.length>3?arguments[3]:void 0;e.$root.$refs.globalToaster.show(t,n,o)}},{key:"hide",value:function(e){e.$root.$refs.globalToaster.hide()}}])}(),X=function(){return K(function e(){q(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.$root.$refs.globalLoader.show(t,n)}},{key:"hide",value:function(e){e.$root.$refs.globalLoader.hide()}}])}(),Y=function(){return K(function e(){q(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;e.$root.$refs.globalModalBox.show(t,n,o,r)}},{key:"hide",value:function(e){e.$root.$refs.globalModalBox.hide()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null!=e&&null!=t&&e.$refs[t].open(n)}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null!=e&&null!=t&&e.$refs[t].hide()}}])}();const G={components:{"cms-module-dropdown":C,"language-button":A,"search-bar":U},mounted:function(){this.shouldShowSearchPanel()},props:["dataSelectedParams","dataControllerName","dataControllerTitle","dataFields","dataActionFields","dataLanguages","dataSelectedLanguage","dataMoreActions","dataShowAdd","dataHasLangMethod","dataCmsModules","dataShowSearch","dataShowBack","dataLayoutType"],computed:{backURL:function(){return v.admin_path(this.controllerName)},layoutIcon:function(){return"grid"===this.layoutType?"fa fa-th-list":"fa fa-table"},showAddButtonBasedOnAction:function(){return-1!==this.actionFields.indexOf("edit")}},data:function(){return{canAdd:!0,showSearchButton:!(void 0===this.dataShowSearch||""===this.dataShowSearch||"false"===this.dataShowSearch),showSearchPanel:!1,isActive:"btn btn-outline-secondary",searchAnim:"",moreActionButtons:void 0===this.dataMoreActions||""===this.dataMoreActions?[]:JSON.parse(this.dataMoreActions),showAdd:void 0===this.dataShowAdd||"true"===this.dataShowAdd,hasLangMethod:!(void 0===this.dataHasLangMethod||"false"===this.dataHasLangMethod),cmsModules:void 0===this.dataCmsModules||""===this.dataCmsModules?[]:JSON.parse(this.dataCmsModules),selectedParams:void 0===this.dataSelectedParams?"":this.dataSelectedParams,controllerName:void 0===this.dataControllerName?"":this.dataControllerName,controllerTitle:void 0===this.dataControllerTitle?"":this.dataControllerTitle,fields:void 0===this.dataFields||""===this.dataFields?[]:this.dataFields,actionFields:void 0===this.dataActionFields||""===this.dataActionFields?[]:this.dataActionFields,showBack:"true"===this.dataShowBack,layoutType:void 0===this.dataLayoutType||""===this.dataLayoutType?"table":this.dataLayoutType}},methods:{changeLayout:function(){if(J.show(this,"Please wait. Changing listing style for you...",5e3),this.layoutType="table"===this.layoutType?"grid":"table","URLSearchParams"in window){var e=new URLSearchParams(window.location.search);e.set("layout",this.layoutType),window.location.search=e.toString()}},getAction:function(e){return 0===e.indexOf("http")?e:v.admin_path(e)},maintainActiveSearch:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isActive=!0===this.showSearchPanel?"btn btn-success":"btn btn-outline-secondary",this.searchAnim=!0===this.showSearchPanel&&1==e?"animated flipInX":""},showHideSearch:function(){this.showSearchPanel=!this.showSearchPanel,this.maintainActiveSearch()},shouldShowSearchPanel:function(){""!==this.selectedParams&&(JSON.parse(this.selectedParams).q&&(this.showSearchPanel=!0),this.maintainActiveSearch(!1))},addNew:function(){if(""!==this.controllerName){var e=v.admin_path(this.controllerName);window.location.href=e+"/create"}},getButtonType:function(e){return e.as&&"button"!==e.as?e.as:"button"},getTitle:function(e){return"string"!=typeof(t=e)?"":t.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,function(e){return e.toUpperCase()});var t}}},Z=(0,S.A)(G,[["render",function(e,o,g,v,y,b){var w=(0,t.resolveComponent)("language-button"),S=(0,t.resolveComponent)("search-bar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",r,[(0,t.createElementVNode)("div",a,[(0,t.createElementVNode)("div",i,[(0,t.createElementVNode)("div",s,[(0,t.createElementVNode)("div",l,[(0,t.createElementVNode)("h4",c,(0,t.toDisplayString)(b.getTitle(y.controllerTitle)),1)]),(0,t.createElementVNode)("div",d,[y.hasLangMethod?((0,t.openBlock)(),(0,t.createBlock)(w,{key:0,"data-languages":g.dataLanguages,"data-selected-language":g.dataSelectedLanguage},{default:(0,t.withCtx)(function(){return n(o[3]||(o[3]=[(0,t.createTextVNode)("English",-1)]))}),_:1},8,["data-languages","data-selected-language"])):(0,t.createCommentVNode)("v-if",!0),y.showAdd&&b.showAddButtonBasedOnAction?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,title:"Add New",onClick:o[0]||(o[0]=function(){return b.addNew&&b.addNew.apply(b,arguments)}),type:"button",class:"btn btn-outline-secondary","aria-label":"Add New"},n(o[4]||(o[4]=[(0,t.createElementVNode)("i",{class:"fa fa-plus","aria-hidden":"true"},null,-1),(0,t.createTextVNode)(" Add New ",-1)])))):(0,t.createCommentVNode)("v-if",!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(y.moreActionButtons,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("a",{class:"btn btn-outline-secondary",href:b.getAction(e.action),title:e.label},[e.icon_css?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:(0,t.normalizeClass)(e.icon_css),"aria-hidden":"true"},null,2)):(0,t.createCommentVNode)("v-if",!0),"button"==b.getButtonType(e)?((0,t.openBlock)(),(0,t.createElementBlock)("span",h,(0,t.toDisplayString)(e.label),1)):(0,t.createCommentVNode)("v-if",!0)],8,u)}),256)),y.showSearchButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:2,title:"Search",onClick:o[1]||(o[1]=function(){return b.showHideSearch&&b.showHideSearch.apply(b,arguments)}),type:"button",class:(0,t.normalizeClass)(y.isActive),"aria-label":"Search"},n(o[5]||(o[5]=[(0,t.createElementVNode)("i",{class:"fa fa-search","aria-hidden":"true"},null,-1)])),2)):(0,t.createCommentVNode)("v-if",!0),y.fields.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:3,title:"Change Layout",onClick:o[2]||(o[2]=function(e){return b.changeLayout()}),type:"button",class:"btn btn-outline-secondary","aria-label":"Layout"},[(0,t.createElementVNode)("i",{class:(0,t.normalizeClass)(b.layoutIcon),"aria-hidden":"true"},null,2)])):(0,t.createCommentVNode)("v-if",!0),y.showBack?((0,t.openBlock)(),(0,t.createElementBlock)("a",{key:4,class:"btn btn-outline-secondary",href:b.backURL},"Back",8,f)):(0,t.createCommentVNode)("v-if",!0)])])])]),(0,t.createElementVNode)("div",m,[y.showSearchPanel?((0,t.openBlock)(),(0,t.createElementBlock)("div",p,[(0,t.createVNode)(S,{class:(0,t.normalizeClass)(y.searchAnim),"data-controller-name":y.controllerName,"data-selected-params":y.selectedParams,"data-fields":y.fields,"data-action-fields":y.actionFields},null,8,["class","data-controller-name","data-selected-params","data-fields","data-action-fields"])])):(0,t.createCommentVNode)("v-if",!0)])])}]]);function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var ee={class:"row"},te={class:"col-auto"},ne=["value"],oe={class:"col-auto"},re={class:"modal-content"},ae={class:"modal-title",style:{width:"100%"}};const ie={emits:["onClose"],props:["dataShowModal","dataShowFooter","dataTitleCss","dataContentCss","dataFooterCss","dataModalCss","dataWidth"],mounted:function(){this.visible&&this.open()},data:function(){return{modelCss:"modal modal-lg fade show",titleCss:void 0===this.dataTitleCss?"":this.dataTitleCss,contentCss:void 0===this.dataContentCss?"":this.dataContentCss,footerCss:void 0===this.dataFooterCss?"":this.dataFooterCss,visible:void 0!==this.dataShowModal&&"true"===this.dataShowModal.toString(),style:"",toBeReturned:{},title:"Alert",content:"Modal Content",footerContent:"",backDropStyle:"display:none"}},computed:{showFooter:function(){return void 0!==this.dataShowFooter&&"true"===this.dataShowFooter.toString()||""!==this.footerContent},modalWidth:function(){return void 0!==this.dataWidth&&""!==this.dataWidth?"width:".concat(this.dataWidth):""}},methods:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.visible=!0,this.backDropStyle=this.style="display:block",this.modelCss="modal modal-lg fade show animated bounceInDown",this.toBeReturned=e},close:function(){this.visible=!1,this.modelCss="modal modal-lg animated bounceOutUp",this.backDropStyle="display:none","function"==typeof this.toBeReturned&&this.toBeReturned()},sendData:function(e){this.close(),this.$emit("onClose",e,this.toBeReturned)},show:function(e,t,n,o){"string"==typeof e?this.content=e:(e.title&&(this.title=e.title),e.content&&(this.content=e.content),e.footerContent&&(this.footerContent=e.footerContent)),this.open(n)},hide:function(){this.close()}}},se=(0,S.A)(ie,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.modelCss),tabindex:"-1","aria-hidden":"true",style:(0,t.normalizeStyle)(a.style)},[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)("modal-dialog modal-dialog-centered modal-dialog-scrollable "+o.dataModalCss),style:(0,t.normalizeStyle)(i.modalWidth)},[(0,t.createElementVNode)("div",re,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.titleCss+" modal-header")},[(0,t.createElementVNode)("h5",ae,[(0,t.renderSlot)(e.$slots,"title",{},function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.title),1)]})]),(0,t.createElementVNode)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",onClick:n[0]||(n[0]=function(e){return i.sendData(0)})})],2),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.contentCss+" modal-body")},[(0,t.renderSlot)(e.$slots,"content",{},function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.content),1)]})],2),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(a.footerCss+" modal-footer")},[(0,t.renderSlot)(e.$slots,"footer",{},function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(a.footerContent),1)]})],2),[[t.vShow,i.showFooter]])])],6)],6),(0,t.createElementVNode)("div",{class:"modal-backdrop fade show",style:(0,t.normalizeStyle)(a.backDropStyle)},null,4)],64)}]]),le={components:{"modal-box":se},mounted:function(){this.verifyAction()},props:["dataPlatforms"],data:function(){return{modelCss:"modal",showHide:!0,platforms:this.dataPlatforms&&"null"!=this.dataPlatforms?JSON.parse(this.dataPlatforms):[],currentPlatform:"",currentTarget:null}},methods:{verifyAction:function(){var e=this;H.on("list-view-pre-edit",function(t){e.currentTarget=t,e.open()})},editNow:function(){var e=this.currentPlatform;if(""===e)return J.show(this,"Please select a platform"),!1;var t=this.currentTarget.getAttribute("data-rowid");window.location=v.admin_path("category/edit/".concat(t,"/").concat(e))},open:function(){this.platforms.length>1?this.$refs.platformbox.open():(this.currentPlatform=this.platforms[0].id,this.editNow())},close:function(){this.$refs.platformbox.close()},hideSpinner:function(){H.emit("list-view-hide-spinner",this)}}},ce=(0,S.A)(le,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("modal-box");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(s,{ref:"platformbox",onOnClose:i.hideSpinner},{title:(0,t.withCtx)(function(){return function(e){if(Array.isArray(e))return Q(e)}(e=n[3]||(n[3]=[(0,t.createTextVNode)(" Select Platform ",-1)]))||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={}.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.")}();var e}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",ee,[(0,t.createElementVNode)("div",te,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.currentPlatform=e}),class:"form-select select-medium",onChange:n[1]||(n[1]=function(e){return i.editNow()})},[n[4]||(n[4]=(0,t.createElementVNode)("option",{value:""},"Select a platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ne)}),256))],544),[[t.vModelSelect,a.currentPlatform]])]),(0,t.createElementVNode)("div",oe,[(0,t.createElementVNode)("button",{class:"btn btn-success btn-from-submit",type:"button",onClick:n[2]||(n[2]=function(e){return i.editNow()})}," Edit Now ")])])]}),_:1},8,["onOnClose"])])}]]);function de(e){return function(e){if(Array.isArray(e))return ue(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 ue(e,t);var n={}.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)?ue(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 ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var he={class:"row"},fe={class:"col-auto"},me=["value"],pe={class:"col-auto"},ge=["value"],ve={class:"col-auto"},ye={title:"It will be inserted or deleted for all platforms if checks."},be={key:0,class:"row mt-3"},we={class:"row mt-3"},Se={class:"col-4"},Ee={class:"panel panel-success shadow border"},ke={class:"panel-heading p-4"},_e={key:0,class:"panel-body p-3",style:{"background-color":"#f3f3f3"}},Ce=["value"],Ne={key:1,class:"panel-sub-heading",style:{padding:"4px"}},Be={class:"input-group"},Ae={ref:"droppableArea",class:"list-group category-items js_category",style:{"min-height":"200px"}},De=["data-cache-category","data-category-id","data-theme-id"],xe=["onUpdate:modelValue"],Ve={class:"text-danger"},Te={class:"btn-toolbar pull-right toolbar-category",role:"toolbar"},Me={class:"btn-group"},Oe={key:0,"aria-label":"Delete from this platform",class:"btn btn-default icon-btn js_delete",title:"Delete from this platform",type:"button"},Ie={key:1,"aria-label":"More Info",class:"btn btn-default js_info icon-btn",title:"More Info",type:"button"},Pe={class:"col-3"},je={class:"panel panel-info margin-top-20"},Fe={key:0,class:"panel-sub-heading",style:{padding:"4px"}},Le={class:"input-group"},Re={id:"draggableItems",class:"list-group"},Ue=["data-category-id"],He={ref:"popover",class:"popover hide bs-popover-end shadow","data-popper-placement":"right",role:"tooltip"},$e={class:"popover-header"},qe={class:"popover-body"},ze=["value"],Ke={class:"text-center"};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach(function(t){Ye(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xe(e){return Xe="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},Xe(e)}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(){return Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)}function Ze(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var Qe=Ze(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),et=Ze(/Edge/i),tt=Ze(/firefox/i),nt=Ze(/safari/i)&&!Ze(/chrome/i)&&!Ze(/android/i),ot=Ze(/iP(ad|od|hone)/i),rt=Ze(/chrome/i)&&Ze(/android/i),at={capture:!1,passive:!1};function it(e,t,n){e.addEventListener(t,n,!Qe&&at)}function st(e,t,n){e.removeEventListener(t,n,!Qe&&at)}function lt(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function ct(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function dt(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&<(e,t):lt(e,t))||o&&e===n)return e;if(e===n)break}while(e=ct(e))}return null}var ut,ht=/\s+/g;function ft(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(ht," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(ht," ")}}function mt(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function pt(e,t){var n="";if("string"==typeof e)n=e;else do{var o=mt(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function gt(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,a=o.length;if(n)for(;r<a;r++)n(o[r],r);return o}return[]}function vt(){return document.scrollingElement||document.documentElement}function yt(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var a,i,s,l,c,d,u;if(e!==window&&e.parentNode&&e!==vt()?(i=(a=e.getBoundingClientRect()).top,s=a.left,l=a.bottom,c=a.right,d=a.height,u=a.width):(i=0,s=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Qe))do{if(r&&r.getBoundingClientRect&&("none"!==mt(r,"transform")||n&&"static"!==mt(r,"position"))){var h=r.getBoundingClientRect();i-=h.top+parseInt(mt(r,"border-top-width")),s-=h.left+parseInt(mt(r,"border-left-width")),l=i+a.height,c=s+a.width;break}}while(r=r.parentNode);if(o&&e!==window){var f=pt(r||e),m=f&&f.a,p=f&&f.d;f&&(l=(i/=p)+(d/=p),c=(s/=m)+(u/=m))}return{top:i,left:s,bottom:l,right:c,width:u,height:d}}}function bt(e,t,n){for(var o=_t(e,!0),r=yt(e)[t];o;){var a=yt(o)[n];if(!("top"===n||"left"===n?r>=a:r<=a))return o;if(o===vt())break;o=_t(o,!1)}return!1}function wt(e,t,n,o){for(var r=0,a=0,i=e.children;a<i.length;){if("none"!==i[a].style.display&&i[a]!==An.ghost&&(o||i[a]!==An.dragged)&&dt(i[a],n.draggable,e,!1)){if(r===t)return i[a];r++}a++}return null}function St(e,t){for(var n=e.lastElementChild;n&&(n===An.ghost||"none"===mt(n,"display")||t&&!lt(n,t));)n=n.previousElementSibling;return n||null}function Et(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===An.clone||t&&!lt(e,t)||n++;return n}function kt(e){var t=0,n=0,o=vt();if(e)do{var r=pt(e),a=r.a,i=r.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function _t(e,t){if(!e||!e.getBoundingClientRect)return vt();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=mt(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return vt();if(o||t)return n;o=!0}}}while(n=n.parentNode);return vt()}function Ct(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Nt(e,t){return function(){if(!ut){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),ut=setTimeout(function(){ut=void 0},t)}}}function Bt(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function At(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function Dt(e,t,n){var o={};return Array.from(e.children).forEach(function(r){var a,i,s,l;if(dt(r,t.draggable,e,!1)&&!r.animated&&r!==n){var c=yt(r);o.left=Math.min(null!==(a=o.left)&&void 0!==a?a:1/0,c.left),o.top=Math.min(null!==(i=o.top)&&void 0!==i?i:1/0,c.top),o.right=Math.max(null!==(s=o.right)&&void 0!==s?s:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var xt="Sortable"+(new Date).getTime();var Vt=[],Tt={initializeByDefault:!0},Mt={mount:function(e){for(var t in Tt)Tt.hasOwnProperty(t)&&!(t in e)&&(e[t]=Tt[t]);Vt.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Vt.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";Vt.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](Je({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](Je({sortable:t},n)))})},initializePlugins:function(e,t,n,o){for(var r in Vt.forEach(function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var a=new o(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,Ge(n,a.defaults)}}),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return Vt.forEach(function(o){"function"==typeof o.eventProperties&&Ge(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return Vt.forEach(function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))}),o}};var Ot=["evt"],It=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,Ot);Mt.pluginEvent.bind(An)(e,t,Je({dragEl:jt,parentEl:Ft,ghostEl:Lt,rootEl:Rt,nextEl:Ut,lastDownEl:Ht,cloneEl:$t,cloneHidden:qt,dragStarted:on,putSortable:Yt,activeSortable:An.active,originalEvent:o,oldIndex:zt,oldDraggableIndex:Wt,newIndex:Kt,newDraggableIndex:Jt,hideGhostForTarget:_n,unhideGhostForTarget:Cn,cloneNowHidden:function(){qt=!0},cloneNowShown:function(){qt=!1},dispatchSortableEvent:function(e){Pt({sortable:t,name:e,originalEvent:o})}},r))};function Pt(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,r=e.targetEl,a=e.cloneEl,i=e.toEl,s=e.fromEl,l=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[xt]){var p,g=t.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Qe||et?(p=document.createEvent("Event")).initEvent(o,!0,!0):p=new CustomEvent(o,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=s||n,p.item=r||n,p.clone=a,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=d,p.newDraggableIndex=u,p.originalEvent=h,p.pullMode=f?f.lastPutMode:void 0;var y=Je(Je({},m),Mt.getEventProperties(o,t));for(var b in y)p[b]=y[b];n&&n.dispatchEvent(p),g[v]&&g[v].call(t,p)}}(Je({putSortable:Yt,cloneEl:$t,targetEl:jt,rootEl:Rt,oldIndex:zt,oldDraggableIndex:Wt,newIndex:Kt,newDraggableIndex:Jt},e))}var jt,Ft,Lt,Rt,Ut,Ht,$t,qt,zt,Kt,Wt,Jt,Xt,Yt,Gt,Zt,Qt,en,tn,nn,on,rn,an,sn,ln,cn=!1,dn=!1,un=[],hn=!1,fn=!1,mn=[],pn=!1,gn=[],vn="undefined"!=typeof document,yn=ot,bn=et||Qe?"cssFloat":"float",wn=vn&&!rt&&!ot&&"draggable"in document.createElement("div"),Sn=function(){if(vn){if(Qe)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),En=function(e,t){var n=mt(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=wt(e,0,t),a=wt(e,1,t),i=r&&mt(r),s=a&&mt(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+yt(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+yt(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&i.float&&"none"!==i.float){var d="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[bn]||a&&"none"===n[bn]&&l+c>o)?"vertical":"horizontal"},kn=function(e){function t(e,n){return function(o,r,a,i){var s=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,a,i),n)(o,r,a,i);var l=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==Xe(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},_n=function(){!Sn&&Lt&&mt(Lt,"display","none")},Cn=function(){!Sn&&Lt&&mt(Lt,"display","")};vn&&!rt&&document.addEventListener("click",function(e){if(dn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),dn=!1,!1},!0);var Nn=function(e){if(jt){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,a=e.clientY,un.some(function(e){var t=e[xt].options.emptyInsertThreshold;if(t&&!St(e)){var n=yt(e),o=r>=n.left-t&&r<=n.right+t,s=a>=n.top-t&&a<=n.bottom+t;return o&&s?i=e:void 0}}),i);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[xt]._onDragOver(n)}}var r,a,i},Bn=function(e){jt&&jt.parentNode[xt]._isOutsideThisEl(e.target)};function An(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ge({},t),e[xt]=this;var n,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return En(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==An.supportPointer&&"PointerEvent"in window&&(!nt||ot),emptyInsertThreshold:5};for(var a in Mt.initializePlugins(this,e,r),r)!(a in t)&&(t[a]=r[a]);for(var i in kn(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&wn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?it(e,"pointerdown",this._onTapStart):(it(e,"mousedown",this._onTapStart),it(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(it(e,"dragover",this),it(e,"dragenter",this)),un.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ge(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==mt(e,"display")&&e!==An.ghost){o.push({target:e,rect:yt(e)});var t=Je({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=pt(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}})},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var r=!1,a=0;o.forEach(function(e){var n=0,o=e.target,i=o.fromRect,s=yt(o),l=o.prevFromRect,c=o.prevToRect,d=e.rect,u=pt(o,!0);u&&(s.top-=u.f,s.left-=u.e),o.toRect=s,o.thisAnimationDuration&&Ct(l,s)&&!Ct(i,s)&&(d.top-s.top)/(d.left-s.left)===(i.top-s.top)/(i.left-s.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(d,l,c,t.options)),Ct(s,i)||(o.prevFromRect=i,o.prevToRect=s,n||(n=t.options.animation),t.animate(o,d,s,n)),n&&(r=!0,a=Math.max(a,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},n),o.thisAnimationDuration=n)}),clearTimeout(n),r?n=setTimeout(function(){"function"==typeof e&&e()},a):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){mt(e,"transition",""),mt(e,"transform","");var r=pt(this.el),a=r&&r.a,i=r&&r.d,s=(t.left-n.left)/(a||1),l=(t.top-n.top)/(i||1);e.animatingX=!!s,e.animatingY=!!l,mt(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),mt(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),mt(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){mt(e,"transition",""),mt(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}))}function Dn(e,t,n,o,r,a,i,s){var l,c,d=e[xt],u=d.options.onMove;return!window.CustomEvent||Qe||et?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=o,l.related=r||t,l.relatedRect=a||yt(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),u&&(c=u.call(d,l,i)),c}function xn(e){e.draggable=!1}function Vn(){pn=!1}function Tn(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Mn(e){return setTimeout(e,0)}function On(e){return clearTimeout(e)}An.prototype={constructor:An,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(rn=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,jt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(i||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;if(function(e){gn.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&gn.push(o)}}(n),!jt&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!nt||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=dt(s,o.draggable,n,!1))&&s.animated||Ht===s)){if(zt=Et(s),Wt=Et(s,o.draggable),"function"==typeof c){if(c.call(this,e,s,this))return Pt({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),It("filter",t,{evt:e}),void(r&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(o){if(o=dt(l,o.trim(),n,!1))return Pt({sortable:t,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),It("filter",t,{evt:e}),!0})))return void(r&&e.preventDefault());o.handle&&!dt(l,o.handle,n,!1)||this._prepareDragStart(e,i,s)}}},_prepareDragStart:function(e,t,n){var o,r=this,a=r.el,i=r.options,s=a.ownerDocument;if(n&&!jt&&n.parentNode===a){var l=yt(n);if(Rt=a,Ft=(jt=n).parentNode,Ut=jt.nextSibling,Ht=n,Xt=i.group,An.dragged=jt,Gt={target:jt,clientX:(t||e).clientX,clientY:(t||e).clientY},tn=Gt.clientX-l.left,nn=Gt.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,jt.style["will-change"]="all",o=function(){It("delayEnded",r,{evt:e}),An.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!tt&&r.nativeDraggable&&(jt.draggable=!0),r._triggerDragStart(e,t),Pt({sortable:r,name:"choose",originalEvent:e}),ft(jt,i.chosenClass,!0))},i.ignore.split(",").forEach(function(e){gt(jt,e.trim(),xn)}),it(s,"dragover",Nn),it(s,"mousemove",Nn),it(s,"touchmove",Nn),i.supportPointer?(it(s,"pointerup",r._onDrop),!this.nativeDraggable&&it(s,"pointercancel",r._onDrop)):(it(s,"mouseup",r._onDrop),it(s,"touchend",r._onDrop),it(s,"touchcancel",r._onDrop)),tt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,jt.draggable=!0),It("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(et||Qe))o();else{if(An.eventCanceled)return void this._onDrop();i.supportPointer?(it(s,"pointerup",r._disableDelayedDrag),it(s,"pointercancel",r._disableDelayedDrag)):(it(s,"mouseup",r._disableDelayedDrag),it(s,"touchend",r._disableDelayedDrag),it(s,"touchcancel",r._disableDelayedDrag)),it(s,"mousemove",r._delayedDragTouchMoveHandler),it(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&it(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){jt&&xn(jt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;st(e,"mouseup",this._disableDelayedDrag),st(e,"touchend",this._disableDelayedDrag),st(e,"touchcancel",this._disableDelayedDrag),st(e,"pointerup",this._disableDelayedDrag),st(e,"pointercancel",this._disableDelayedDrag),st(e,"mousemove",this._delayedDragTouchMoveHandler),st(e,"touchmove",this._delayedDragTouchMoveHandler),st(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?it(document,"pointermove",this._onTouchMove):it(document,t?"touchmove":"mousemove",this._onTouchMove):(it(jt,"dragend",this),it(Rt,"dragstart",this._onDragStart));try{document.selection?Mn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(cn=!1,Rt&&jt){It("dragStarted",this,{evt:t}),this.nativeDraggable&&it(document,"dragover",Bn);var n=this.options;!e&&ft(jt,n.dragClass,!1),ft(jt,n.ghostClass,!0),An.active=this,e&&this._appendGhost(),Pt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Zt){this._lastX=Zt.clientX,this._lastY=Zt.clientY,_n();for(var e=document.elementFromPoint(Zt.clientX,Zt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Zt.clientX,Zt.clientY))!==t;)t=e;if(jt.parentNode[xt]._isOutsideThisEl(e),t)do{if(t[xt]&&t[xt]._onDragOver({clientX:Zt.clientX,clientY:Zt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=ct(t));Cn()}},_onTouchMove:function(e){if(Gt){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=Lt&&pt(Lt,!0),i=Lt&&a&&a.a,s=Lt&&a&&a.d,l=yn&&ln&&kt(ln),c=(r.clientX-Gt.clientX+o.x)/(i||1)+(l?l[0]-mn[0]:0)/(i||1),d=(r.clientY-Gt.clientY+o.y)/(s||1)+(l?l[1]-mn[1]:0)/(s||1);if(!An.active&&!cn){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Lt){a?(a.e+=c-(Qt||0),a.f+=d-(en||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");mt(Lt,"webkitTransform",u),mt(Lt,"mozTransform",u),mt(Lt,"msTransform",u),mt(Lt,"transform",u),Qt=c,en=d,Zt=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Lt){var e=this.options.fallbackOnBody?document.body:Rt,t=yt(jt,!0,yn,!0,e),n=this.options;if(yn){for(ln=e;"static"===mt(ln,"position")&&"none"===mt(ln,"transform")&&ln!==document;)ln=ln.parentNode;ln!==document.body&&ln!==document.documentElement?(ln===document&&(ln=vt()),t.top+=ln.scrollTop,t.left+=ln.scrollLeft):ln=vt(),mn=kt(ln)}ft(Lt=jt.cloneNode(!0),n.ghostClass,!1),ft(Lt,n.fallbackClass,!0),ft(Lt,n.dragClass,!0),mt(Lt,"transition",""),mt(Lt,"transform",""),mt(Lt,"box-sizing","border-box"),mt(Lt,"margin",0),mt(Lt,"top",t.top),mt(Lt,"left",t.left),mt(Lt,"width",t.width),mt(Lt,"height",t.height),mt(Lt,"opacity","0.8"),mt(Lt,"position",yn?"absolute":"fixed"),mt(Lt,"zIndex","100000"),mt(Lt,"pointerEvents","none"),An.ghost=Lt,e.appendChild(Lt),mt(Lt,"transform-origin",tn/parseInt(Lt.style.width)*100+"% "+nn/parseInt(Lt.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;It("dragStart",this,{evt:e}),An.eventCanceled?this._onDrop():(It("setupClone",this),An.eventCanceled||(($t=At(jt)).removeAttribute("id"),$t.draggable=!1,$t.style["will-change"]="",this._hideClone(),ft($t,this.options.chosenClass,!1),An.clone=$t),n.cloneId=Mn(function(){It("clone",n),An.eventCanceled||(n.options.removeCloneOnHide||Rt.insertBefore($t,jt),n._hideClone(),Pt({sortable:n,name:"clone"}))}),!t&&ft(jt,r.dragClass,!0),t?(dn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(st(document,"mouseup",n._onDrop),st(document,"touchend",n._onDrop),st(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,jt)),it(document,"drop",n),mt(jt,"transform","translateZ(0)")),cn=!0,n._dragStartId=Mn(n._dragStarted.bind(n,t,e)),it(document,"selectstart",n),on=!0,window.getSelection().removeAllRanges(),nt&&mt(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,r,a=this.el,i=e.target,s=this.options,l=s.group,c=An.active,d=Xt===l,u=s.sort,h=Yt||c,f=this,m=!1;if(!pn){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=dt(i,s.draggable,a,!0),D("dragOver"),An.eventCanceled)return m;if(jt.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return V(!1);if(dn=!1,c&&!s.disabled&&(d?u||(o=Ft!==Rt):Yt===this||(this.lastPutMode=Xt.checkPull(this,c,jt,e))&&l.checkPut(this,c,jt,e))){if(r="vertical"===this._getDirection(e,i),t=yt(jt),D("dragOverValid"),An.eventCanceled)return m;if(o)return Ft=Rt,x(),this._hideClone(),D("revert"),An.eventCanceled||(Ut?Rt.insertBefore(jt,Ut):Rt.appendChild(jt)),V(!0);var p=St(a,s.draggable);if(!p||function(e,t,n){var o=yt(St(n.el,n.options.draggable)),r=Dt(n.el,n.options,Lt);return t?e.clientX>r.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>r.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,r,this)&&!p.animated){if(p===jt)return V(!1);if(p&&a===e.target&&(i=p),i&&(n=yt(i)),!1!==Dn(Rt,a,jt,t,i,n,e,!!i))return x(),p&&p.nextSibling?a.insertBefore(jt,p.nextSibling):a.appendChild(jt),Ft=a,T(),V(!0)}else if(p&&function(e,t,n){var o=yt(wt(n.el,0,n.options,!0)),r=Dt(n.el,n.options,Lt);return t?e.clientX<r.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<r.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,r,this)){var g=wt(a,0,s,!0);if(g===jt)return V(!1);if(n=yt(i=g),!1!==Dn(Rt,a,jt,t,i,n,e,!1))return x(),a.insertBefore(jt,g),Ft=a,T(),V(!0)}else if(i.parentNode===a){n=yt(i);var v,y,b,w=jt.parentNode!==a,S=!function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,i=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return o===i||r===s||o+a/2===i+l/2}(jt.animated&&jt.toRect||t,i.animated&&i.toRect||n,r),E=r?"top":"left",k=bt(i,"top","top")||bt(jt,"top","top"),_=k?k.scrollTop:void 0;if(rn!==i&&(y=n[E],hn=!1,fn=!S&&s.invertSwap||w),v=function(e,t,n,o,r,a,i,s){var l=o?e.clientY:e.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!i)if(s&&sn<c*r){if(!hn&&(1===an?l>d+c*a/2:l<u-c*a/2)&&(hn=!0),hn)h=!0;else if(1===an?l<d+sn:l>u-sn)return-an}else if(l>d+c*(1-r)/2&&l<u-c*(1-r)/2)return function(e){return Et(jt)<Et(e)?1:-1}(t);return(h=h||i)&&(l<d+c*a/2||l>u-c*a/2)?l>d+c/2?1:-1:0}(e,i,n,r,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,fn,rn===i),0!==v){var C=Et(jt);do{C-=v,b=Ft.children[C]}while(b&&("none"===mt(b,"display")||b===Lt))}if(0===v||b===i)return V(!1);rn=i,an=v;var N=i.nextElementSibling,B=!1,A=Dn(Rt,a,jt,t,i,n,e,B=1===v);if(!1!==A)return 1!==A&&-1!==A||(B=1===A),pn=!0,setTimeout(Vn,30),x(),B&&!N?a.appendChild(jt):i.parentNode.insertBefore(jt,B?N:i),k&&Bt(k,0,_-k.scrollTop),Ft=jt.parentNode,void 0===y||fn||(sn=Math.abs(y-yt(i)[E])),T(),V(!0)}if(a.contains(jt))return V(!1)}return!1}function D(s,l){It(s,f,Je({evt:e,isOwner:d,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:u,fromSortable:h,target:i,completed:V,onMove:function(n,o){return Dn(Rt,a,jt,t,n,yt(n),e,o)},changed:T},l))}function x(){D("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function V(t){return D("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(f),f!==h&&(ft(jt,Yt?Yt.options.ghostClass:c.options.ghostClass,!1),ft(jt,s.ghostClass,!0)),Yt!==f&&f!==An.active?Yt=f:f===An.active&&Yt&&(Yt=null),h===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){D("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===jt&&!jt.animated||i===a&&!i.animated)&&(rn=null),s.dragoverBubble||e.rootEl||i===document||(jt.parentNode[xt]._isOutsideThisEl(e.target),!t&&Nn(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function T(){Kt=Et(jt),Jt=Et(jt,s.draggable),Pt({sortable:f,name:"change",toEl:a,newIndex:Kt,newDraggableIndex:Jt,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){st(document,"mousemove",this._onTouchMove),st(document,"touchmove",this._onTouchMove),st(document,"pointermove",this._onTouchMove),st(document,"dragover",Nn),st(document,"mousemove",Nn),st(document,"touchmove",Nn)},_offUpEvents:function(){var e=this.el.ownerDocument;st(e,"mouseup",this._onDrop),st(e,"touchend",this._onDrop),st(e,"pointerup",this._onDrop),st(e,"pointercancel",this._onDrop),st(e,"touchcancel",this._onDrop),st(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Kt=Et(jt),Jt=Et(jt,n.draggable),It("drop",this,{evt:e}),Ft=jt&&jt.parentNode,Kt=Et(jt),Jt=Et(jt,n.draggable),An.eventCanceled||(cn=!1,fn=!1,hn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),On(this.cloneId),On(this._dragStartId),this.nativeDraggable&&(st(document,"drop",this),st(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),nt&&mt(document.body,"user-select",""),mt(jt,"transform",""),e&&(on&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Lt&&Lt.parentNode&&Lt.parentNode.removeChild(Lt),(Rt===Ft||Yt&&"clone"!==Yt.lastPutMode)&&$t&&$t.parentNode&&$t.parentNode.removeChild($t),jt&&(this.nativeDraggable&&st(jt,"dragend",this),xn(jt),jt.style["will-change"]="",on&&!cn&&ft(jt,Yt?Yt.options.ghostClass:this.options.ghostClass,!1),ft(jt,this.options.chosenClass,!1),Pt({sortable:this,name:"unchoose",toEl:Ft,newIndex:null,newDraggableIndex:null,originalEvent:e}),Rt!==Ft?(Kt>=0&&(Pt({rootEl:Ft,name:"add",toEl:Ft,fromEl:Rt,originalEvent:e}),Pt({sortable:this,name:"remove",toEl:Ft,originalEvent:e}),Pt({rootEl:Ft,name:"sort",toEl:Ft,fromEl:Rt,originalEvent:e}),Pt({sortable:this,name:"sort",toEl:Ft,originalEvent:e})),Yt&&Yt.save()):Kt!==zt&&Kt>=0&&(Pt({sortable:this,name:"update",toEl:Ft,originalEvent:e}),Pt({sortable:this,name:"sort",toEl:Ft,originalEvent:e})),An.active&&(null!=Kt&&-1!==Kt||(Kt=zt,Jt=Wt),Pt({sortable:this,name:"end",toEl:Ft,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){It("nulling",this),Rt=jt=Ft=Lt=Ut=$t=Ht=qt=Gt=Zt=on=Kt=Jt=zt=Wt=rn=an=Yt=Xt=An.dragged=An.ghost=An.clone=An.active=null,gn.forEach(function(e){e.checked=!0}),gn.length=Qt=en=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":jt&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)dt(e=n[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Tn(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(e,t){var r=o.children[t];dt(r,this.options.draggable,o,!1)&&(n[e]=r)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return dt(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Mt.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&kn(n)},destroy:function(){It("destroy",this);var e=this.el;e[xt]=null,st(e,"mousedown",this._onTapStart),st(e,"touchstart",this._onTapStart),st(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(st(e,"dragover",this),st(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),un.splice(un.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!qt){if(It("hideClone",this),An.eventCanceled)return;mt($t,"display","none"),this.options.removeCloneOnHide&&$t.parentNode&&$t.parentNode.removeChild($t),qt=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(qt){if(It("showClone",this),An.eventCanceled)return;jt.parentNode!=Rt||this.options.group.revertClone?Ut?Rt.insertBefore($t,Ut):Rt.appendChild($t):Rt.insertBefore($t,jt),this.options.group.revertClone&&this.animate(jt,$t),mt($t,"display",""),qt=!1}}else this._hideClone()}},vn&&it(document,"touchmove",function(e){(An.active||cn)&&e.cancelable&&e.preventDefault()}),An.utils={on:it,off:st,css:mt,find:gt,is:function(e,t){return!!dt(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:Nt,closest:dt,toggleClass:ft,clone:At,index:Et,nextTick:Mn,cancelNextTick:On,detectDirection:En,getChild:wt,expando:xt},An.get=function(e){return e[xt]},An.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(An.utils=Je(Je({},An.utils),e.utils)),Mt.mount(e)})},An.create=function(e,t){return new An(e,t)},An.version="1.15.6";var In,Pn,jn,Fn,Ln,Rn,Un=[],Hn=!1;function $n(){Un.forEach(function(e){clearInterval(e.pid)}),Un=[]}function qn(){clearInterval(Rn)}var zn=Nt(function(e,t,n,o){if(t.scroll){var r,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=vt(),d=!1;Pn!==n&&(Pn=n,$n(),In=t.scroll,r=t.scrollFn,!0===In&&(In=_t(n,!0)));var u=0,h=In;do{var f=h,m=yt(f),p=m.top,g=m.bottom,v=m.left,y=m.right,b=m.width,w=m.height,S=void 0,E=void 0,k=f.scrollWidth,_=f.scrollHeight,C=mt(f),N=f.scrollLeft,B=f.scrollTop;f===c?(S=b<k&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),E=w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(S=b<k&&("auto"===C.overflowX||"scroll"===C.overflowX),E=w<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var A=S&&(Math.abs(y-a)<=s&&N+b<k)-(Math.abs(v-a)<=s&&!!N),D=E&&(Math.abs(g-i)<=s&&B+w<_)-(Math.abs(p-i)<=s&&!!B);if(!Un[u])for(var x=0;x<=u;x++)Un[x]||(Un[x]={});Un[u].vx==A&&Un[u].vy==D&&Un[u].el===f||(Un[u].el=f,Un[u].vx=A,Un[u].vy=D,clearInterval(Un[u].pid),0==A&&0==D||(d=!0,Un[u].pid=setInterval(function(){o&&0===this.layer&&An.active._onTouchMove(Ln);var t=Un[this.layer].vy?Un[this.layer].vy*l:0,n=Un[this.layer].vx?Un[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(An.dragged.parentNode[xt],n,t,e,Ln,Un[this.layer].el)||Bt(Un[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=_t(h,!1)));Hn=d}},30),Kn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||r;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(d)&&(a("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Wn(){}function Jn(){}Wn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=wt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Kn},Ge(Wn,{pluginName:"revertOnSpill"}),Jn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Kn},Ge(Jn,{pluginName:"removeOnSpill"}),An.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?it(document,"dragover",this._handleAutoScroll):this.options.supportPointer?it(document,"pointermove",this._handleFallbackAutoScroll):t.touches?it(document,"touchmove",this._handleFallbackAutoScroll):it(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?st(document,"dragover",this._handleAutoScroll):(st(document,"pointermove",this._handleFallbackAutoScroll),st(document,"touchmove",this._handleFallbackAutoScroll),st(document,"mousemove",this._handleFallbackAutoScroll)),qn(),$n(),clearTimeout(ut),ut=void 0},nulling:function(){Ln=Pn=In=Hn=Rn=jn=Fn=null,Un.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,r);if(Ln=e,t||this.options.forceAutoScrollFallback||et||Qe||nt){zn(e,this.options,a,t);var i=_t(a,!0);!Hn||Rn&&o===jn&&r===Fn||(Rn&&qn(),Rn=setInterval(function(){var a=_t(document.elementFromPoint(o,r),!0);a!==i&&(i=a,$n()),zn(e,n.options,a,t)},10),jn=o,Fn=r)}else{if(!this.options.bubbleScroll||_t(a,!0)===vt())return void $n();zn(e,this.options,_t(a,!1),!1)}}},Ge(e,{pluginName:"scroll",initializeByDefault:!0})}),An.mount(Jn,Wn);const Xn=An,Yn={mounted:function(){this.init()},props:["dataSiteId","dataSitePlatforms","dataSiteCategories","dataSiteThemes","dataSiteMicrosites","dataPlatformId","dataMicrositeId","dataCategories","dataUserRights"],data:function(){return{checkAll:!1,showCheckbox:!1,sitePlatforms:void 0===this.dataSitePlatforms||""===this.dataSitePlatforms?[]:JSON.parse(this.dataSitePlatforms),siteCategories:void 0===this.dataSiteCategories||""===this.dataSiteCategories?[]:JSON.parse(this.dataSiteCategories),siteThemes:void 0===this.dataSiteThemes||""===this.dataSiteThemes?[]:JSON.parse(this.dataSiteThemes),siteMicrosites:void 0===this.dataSiteMicrosites||""===this.dataSiteMicrosites?[]:JSON.parse(this.dataSiteMicrosites),categories:void 0===this.dataCategories||""===this.dataCategories?[]:JSON.parse(this.dataCategories),platformId:void 0===this.dataPlatformId||""===this.dataPlatformId?1:parseInt(this.dataPlatformId),micrositeId:void 0===this.dataMicrositeId||""===this.dataMicrositeId?0:parseInt(this.dataMicrositeId),searchKeyPlatformCategory:"",searchKeyCategory:"",applicableForAllPlatforms:!1,categoryId:0,currentSelection:{category_id:0,theme_id:"",cache_category:""},allCategories:[],allCategoriesInfo:{},allSiteCategories:[],siteId:void 0===this.dataSiteId?1:parseInt(this.dataSiteId),showUpdateAllBtn:!0,showUpdateAllDiv:!1,globalTheme:"",userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[]}},computed:{hasPlatformsMoreThanOne:function(){return this.sitePlatforms.length>1},hasMicrosites:function(){return this.siteMicrosites.length>0},canEdit:function(){return this.userRights.indexOf("edit")>=0},canDelete:function(){return this.userRights.indexOf("delete")>=0}},methods:{init:function(){this.makeData(),this.canEdit&&this.enableSorting()},selectAllData:function(){var e=arguments.length>1?arguments[1]:void 0,t=this,n="allCategories"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories")?this.allCategories:this.allSiteCategories,o=e.checked;n.forEach(function(e){t.$set(e,"selected",o)})},makeData:function(){var e=this,t=this.categories,n=!1;t.length>0&&t.forEach(function(t){var o=t.category_id,r={category_id:o,category_name:t.lang.name||t.category_name,theme_id:t.theme_id,cache_category:t.cache_category,selected:n};e.allCategories.push(r),e.allCategoriesInfo[o.toString()]=r}),(t=this.siteCategories).length>0&&t.forEach(function(t){var o={category_id:t.category_id,category_name:t.name,theme_id:"",cache_category:"",selected:n};e.allSiteCategories.push(o)})},getWhere:function(){return{microsite_id:this.micrositeId,platform_id:this.platformId,category_id:this.categoryId,site_id:this.siteId}},saveNow:function(e,t){return new Promise(function(n,o){axios.post(e,t).then(function(e){n(e)}).catch(function(e){o(e.response)})})},updateIndex:function(){for(var e=this,t=document.querySelectorAll(".js_category li"),n=this.platformId,o=[],r=0;r<t.length;r++){var a=t[r],i={position:r+1},s={category_id:this.getCategoryInfo(a.getAttribute("data-category-id"),"allCategories").category_id,platform_id:n};o.push({where:s,data:i})}if(o.length>0){var l=v.admin_path("category/updateIndex"),c={};c.data=o,this.saveNow(l,c).then(function(t){J.show(e,"Saved...")}).catch(function(t){J.show(e,t.data.message,2e3)})}},showSearch:function(){return("allCategories"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories")?this.allCategories:this.allSiteCategories).length>10},filterData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories",t="allCategories"===e?this.searchKeyPlatformCategory:this.searchKeyCategory,n="allCategories"===e?this.allCategories:this.allSiteCategories;return""!==t&&null!=t?(t=t.toLowerCase(),n.filter(function(e){var n=e.category_name.toLowerCase();if(e.category_id.toString()===t.toString()||n.includes(t))return e})):"allCategories"===e?this.allCategories:this.allSiteCategories},setCurrentSelection:function(e){var t=e.currentTarget,n=e.target,o=t.getAttribute("data-category-id"),r=t.getAttribute("data-theme-id"),a=this.getCategoryInfo(o,"allCategories");this.currentSelection.theme_id=r,this.currentSelection.category_id=o,this.currentSelection.cache_category=a.cache_category,n.classList.contains("js_info")&&function(e,t){var n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"center-right";(n=t.classList).remove.apply(n,["animated","fadeOut","hide"]);var a=t,i=e.getBoundingClientRect(),s=a.getBoundingClientRect(),l=i.left+i.width,c=i.top+i.height-s.height/2;"center-right"===((o=t.classList).add.apply(o,["animated","jello"]),r)&&(a.style.position="absolute",a.style.left=l+"px",a.style.top=c+"px")}(t,this.$refs.popover),n.classList.contains("js_delete")},closePopup:function(){var e;(e=this.$refs.popover.classList).add.apply(e,["animated","fadeOut","hide"]),setTimeout(function(){})},fetchNewData:function(){var e=this.getWhere();delete e.category_id,0===e.microsite_id&&delete e.microsite_id,window.location.href=v.admin_path("category/settings",e)},enableSorting:function(){var e=this;this.$nextTick(function(){document.querySelectorAll(".js_category").forEach(function(t){Xn.create(t,{animation:200,filter:".js_delete",group:{name:"droppable",put:"modulesBox"},onFilter:function(t){var n=t.item,o=t.target,r=n.getAttribute("data-category-id");Xn.utils.is(o,".js_delete")&&e.removeCategory(r)},onUpdate:function(t){e.updateIndex()}})})});var t=document.getElementById("draggableItems");Xn.create(t,{animation:200,draggable:".js_item",group:{name:"modulesBox",pull:"clone",revertClone:!0},sort:!1,ghostClass:".js_category",onEnd:function(t){t.to;var n=t.item,o=n.getAttribute("data-category-id");if(o){var r,a=e.getCategoryInfo(o,"allSiteCategories");null!==a&&(r=e.addCategory(a)),n.parentNode.removeChild(n),e.highlightEagerDrop("remove"),!1===r&&J.show(e,"Category is already added in this platform...")}},onStart:function(t){e.highlightEagerDrop("add")}})},highlightEagerDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";document.querySelectorAll(".js_category").forEach(function(t){t.classList[e]("module-drop-eager")})},getCategoryInfo:function(e){for(var t=null,n="allSiteCategories"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"allSiteCategories")?this.allSiteCategories:this.allCategories,o=0;o<n.length;o++){var r=n[o];if(parseInt(r.category_id)===parseInt(e)){t=r;break}}return t},findIndex:function(e){var t=-1,n="allCategories"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"allCategories")?this.allCategories:this.allSiteCategories;if(n.length>0)for(var o=0;o<n.length;o++){var r=n[o];if(parseInt(r.category_id)===parseInt(e)){t=o;break}}return t},addCategory:function(e){var t=this,n=this.findIndex(e.category_id),o=!1;return-1===n&&(this.allCategoriesInfo[e.category_id.toString()]={index:n,info:e},setTimeout(function(){var n,o,r;n=v.admin_path("category/insertCategory"),o=t.getWhere(),r={},delete e.name,e.platform_id=o.platform_id,r.data={category_id:e.category_id,platform_id:o.platform_id,site_id:o.site_id},r.applicableForAllPlatforms=t.applicableForAllPlatforms,t.saveNow(n,r).then(function(e){J.show(t,"Saved...")}).catch(function(e){J.show(t,e.data.message,2e3)})},1),o=this.allCategories.push(e)),o},setThemeEtc:function(){var e=this,t=this.currentSelection,n=this.findIndex(t.category_id);if(-1!==n){this.allCategories[n].theme_id=t.theme_id,this.allCategories[n].cache_category=t.cache_category,this.categoryId=parseInt(t.category_id);var o={};o.where=this.getWhere(),o.data={cache_category:t.cache_category||"",theme_id:t.theme_id},o.applicableForAllPlatforms=e.applicableForAllPlatforms;var r=v.admin_path("category/updateThemeAndEtc");this.saveNow(r,o).then(function(t){J.show(e,"Saved...")}).catch(function(t){J.show(e,t.data.message,2e3)})}this.closePopup()},removeCategory:function(e){var t=this,n=this.findIndex(e);if(-1!==n){var o=this.allCategories.splice(n,1);return function(e){var n=v.admin_path("category/deleteCategory"),o={},r=t.getWhere();o.where={category_id:e.category_id,microsite_id:r.microsite_id},t.applicableForAllPlatforms||(o.where.platform_id=r.platform_id),t.saveNow(n,o).then(function(e){J.show(t,"Saved...")}).catch(function(e){J.show(t,e.data.message,2e3)})}(o[0]),o}},getThemeName:function(e){for(var t=0;t<this.siteThemes.length;t++)if(this.siteThemes[t].id==e)return this.siteThemes[t].name;return""},updateThemeToAllCategories:function(){var e=this,t=v.admin_path("category/updateThemeForAllCategories"),n=this.filterData("allCategories");if(""!==this.globalTheme&&n.length>0){var o=this.getWhere();delete o.category_id,delete o.microsite_id;var r={data:{theme_id:this.globalTheme},where:o};J.show(e,"Please wait..."),this.saveNow(t,r).then(function(t){if(t.data.error)J.show(e,t.data.message,5e3);else{J.show(e,"Saved");for(var o=0;o<n.length;o++)n[o].theme_id=e.globalTheme}}).catch(function(t){J.show(e,t.data.message,2e3)})}}}},Gn=(0,S.A)(Yn,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("div",he,[(0,t.withDirectives)((0,t.createElementVNode)("div",fe,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.micrositeId=e}),class:"form-select select",onChange:n[1]||(n[1]=function(e){return i.fetchNewData()})},[n[16]||(n[16]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteMicrosites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,me)}),256))],544),[[t.vModelSelect,a.micrositeId]])],512),[[t.vShow,i.hasMicrosites]]),(0,t.createElementVNode)("div",pe,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.platformId=e}),class:"form-select select",onChange:n[3]||(n[3]=function(e){return i.fetchNewData()})},[n[17]||(n[17]=(0,t.createElementVNode)("option",null,"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sitePlatforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ge)}),256))],544),[[t.vShow,i.hasPlatformsMoreThanOne],[t.vModelSelect,a.platformId]])]),(0,t.createElementVNode)("div",ve,[(0,t.withDirectives)((0,t.createElementVNode)("label",ye,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return a.applicableForAllPlatforms=e}),name:"applicableForAll",type:"checkbox"},null,512),[[t.vModelCheckbox,a.applicableForAllPlatforms]]),n[18]||(n[18]=(0,t.createTextVNode)(" Enable add/delete for all platforms",-1))],512),[[t.vShow,i.hasPlatformsMoreThanOne]])])],512),[[t.vShow,i.hasMicrosites||i.hasPlatformsMoreThanOne||i.hasPlatformsMoreThanOne]]),i.canEdit?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",be,de(n[19]||(n[19]=[(0,t.createElementVNode)("div",{class:"col-auto"},[(0,t.createElementVNode)("p",{class:"alert alert-warning"},"You have read only access.")],-1)])))),(0,t.createElementVNode)("div",we,[(0,t.createElementVNode)("div",Se,[(0,t.createElementVNode)("div",Ee,[(0,t.createElementVNode)("div",ke,[(0,t.createElementVNode)("input",{class:"hide",type:"checkbox",onClick:n[5]||(n[5]=function(e){return i.selectAllData("allCategories",e.target)})}),n[21]||(n[21]=(0,t.createTextVNode)(" Drop in below panel to enable the category for this site. ",-1)),a.showUpdateAllBtn?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"More Info",class:"btn btn-default js_info icon-btn pull-right",style:{top:"-7px",position:"relative",right:"-9px"},title:"Update in all categories",type:"button",onClick:n[6]||(n[6]=function(e){return a.showUpdateAllDiv=!a.showUpdateAllDiv})},de(n[20]||(n[20]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-ellipsis-v js_info"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0)]),a.showUpdateAllDiv?((0,t.openBlock)(),(0,t.createElementBlock)("div",_e,[n[23]||(n[23]=(0,t.createElementVNode)("p",{class:"text-danger"}," Be careful while using this. Changing this dropdown will effect to all categories. ",-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return a.globalTheme=e}),class:"form-select margin-bottom-05",onChange:n[8]||(n[8]=function(e){return i.updateThemeToAllCategories()})},[n[22]||(n[22]=(0,t.createElementVNode)("option",{value:""},"Select a Theme",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteThemes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Ce)}),256))],544),[[t.vModelSelect,a.globalTheme]])])):(0,t.createCommentVNode)("v-if",!0),i.showSearch("allCategories")?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ne,[(0,t.createElementVNode)("div",Be,[n[24]||(n[24]=(0,t.createElementVNode)("span",{class:"input-group-addon"},"Search",-1)),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[9]||(n[9]=function(e){return a.searchKeyPlatformCategory=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id or name",type:"text"},null,512),[[t.vModelText,a.searchKeyPlatformCategory]])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",Ae,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterData("allCategories"),function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-cache-category":e.cache_category,"data-category-id":e.category_id,"data-theme-id":e.theme_id,class:"list-group-item js_item",onClick:n[10]||(n[10]=function(e){return i.setCurrentSelection(e)})},[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":function(t){return e.selected=t},type:"checkbox"},null,8,xe),[[t.vShow,a.showCheckbox],[t.vModelCheckbox,e.selected]]),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(e.category_name)+" ",1),(0,t.withDirectives)((0,t.createElementVNode)("small",{class:"text-info",title:"Theme"}," - "+(0,t.toDisplayString)(i.getThemeName(e.theme_id)),513),[[t.vShow,e.theme_id>0]]),(0,t.withDirectives)((0,t.createElementVNode)("small",Ve,de(n[25]||(n[25]=[(0,t.createElementVNode)("br",null,null,-1),(0,t.createTextVNode)("Theme is missing",-1)])),512),[[t.vShow,e.theme_id<=0]]),(0,t.createElementVNode)("span",Te,[(0,t.createElementVNode)("span",Me,[i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("button",Oe,de(n[26]||(n[26]=[(0,t.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-trash-o js_delete"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0),i.canEdit?((0,t.openBlock)(),(0,t.createElementBlock)("button",Ie,de(n[27]||(n[27]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-ellipsis-v js_info"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0)])])],8,De)}),256))],512)])]),(0,t.createElementVNode)("div",Pe,[(0,t.createElementVNode)("div",je,[n[29]||(n[29]=(0,t.createElementVNode)("div",{class:"panel-heading p-4"},"Drag and drop from here",-1)),i.showSearch("allSiteCategories")?((0,t.openBlock)(),(0,t.createElementBlock)("div",Fe,[(0,t.createElementVNode)("div",Le,[n[28]||(n[28]=(0,t.createElementVNode)("span",{class:"input-group-addon"},"Search",-1)),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return a.searchKeyCategory=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id or name",type:"text"},null,512),[[t.vModelText,a.searchKeyCategory]])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",Re,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterData("allSiteCategories"),function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-category-id":e.category_id,class:"list-group-item js_item"},(0,t.toDisplayString)(e.category_name),9,Ue)}),256))])])])]),(0,t.createElementVNode)("div",He,[(0,t.createElementVNode)("p",$e,[n[30]||(n[30]=(0,t.createTextVNode)(" Set theme etc for this category ",-1)),(0,t.createElementVNode)("span",{"aria-label":"Close",class:"pull-right fa fa-close close",title:"Close",onClick:n[12]||(n[12]=function(e){return i.closePopup()})})]),(0,t.createElementVNode)("div",qe,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return a.currentSelection.theme_id=e}),class:"form-select mb-2"},[n[31]||(n[31]=(0,t.createElementVNode)("option",{value:""},"Select a Theme",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteThemes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ze)}),256))],512),[[t.vModelSelect,a.currentSelection.theme_id]]),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[14]||(n[14]=function(e){return a.currentSelection.cache_category=e}),class:"form-control mb-2",name:"cache_category",placeholder:"Enter cache category",type:"text"},null,512),[[t.vModelText,a.currentSelection.cache_category]]),(0,t.createElementVNode)("div",Ke,[(0,t.createElementVNode)("button",{class:"btn btn-primary text-center",onClick:n[15]||(n[15]=function(e){return i.setThemeEtc()})}," Save Settings ")])])],512)])}]]),Zn={mounted:function(){},props:["dataControllerName"],methods:{downloadNow:function(){window.location.href=v.admin_path(this.dataControllerName+"/download")}}},Qn=(0,S.A)(Zn,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("button",{onClick:n[0]||(n[0]=function(e){return i.downloadNow()}),type:"button",class:"btn btn-dark"},[(0,t.renderSlot)(e.$slots,"default",{},function(){return[n[1]||(n[1]=(0,t.createTextVNode)("Download",-1))]})])}]]);var eo={ref:"uploaderForm",name:"uploaderForm",enctype:"multipart/form-data"},to={class:"row"},no={class:"col-5"},oo=["accept"],ro={key:0,class:"alert alert-danger mt-1"},ao={class:"col-5"},io={key:0,class:"alert alert-danger mt-1"},so={class:"col-2"},lo={key:0,class:"row"},co={class:"progress p-0"},uo=["aria-valuenow"],ho={key:1,class:"row"},fo={class:"col"};const mo={mounted:function(){},props:["dataTitle","dataAccept"],data:function(){return{title:this.dataTitle,form:{tags:"",files:""},isUploading:!1,errors:{files:!1,tags:!1},percent:0,message:"",msgType:"alert-success",acceptFileType:void 0!==this.dataAccept?this.dataAccept:"image/*"}},methods:{goBack:function(){window.location.href=this.backUrl},checkErrors:function(){this.errors.files=!1,this.errors.tags=!1},resetForm:function(){this.form.tags="",this.form.files="",this.errors.tags=!1,this.errors.files=!1,this.percent=0,this.$refs.uploaderForm.reset()},showMsg:function(e,t){var n=this;this.message=e,t?this.msgType="alert-danger":(this.msgType="alert-success",setTimeout(function(){n.message=""},2e3))},uploadNow:function(){var e,t,n=this,o=v.admin_path("gallery/uploadFiles");this.message="";var r=this.$refs.allFilesC.files,a=!1;if(0===r.length&&(a=this.errors.files=!0),""===this.form.tags&&(a=this.errors.tags=!0),a)return!1;this.isUploading=!0;for(var i=new FormData,s=0;s<r.length;s++)i.append("images[]",r[s]);i.append("tags",this.form.tags),i.append("groupName","content"),i.append("mediaType",this.acceptFileType.replace(/[^a-zA-Z,]/g,"")),i.append("_csrf",(null===(e=window.HashtagCms)||void 0===e?void 0:e.csrfToken)||(null===(t=window.Laravel)||void 0===t?void 0:t.csrfToken)),axios.post(o,i,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(e){!function(e){n.percent=Math.round(100*e.progress)}(e)}}).then(function(e){!function(e){H.emit("gallery-image-uploaded",e.data),n.resetForm(),n.showMsg(e.data.message,!1)}(e)}).catch(function(e){!function(e){var t;n.showMsg((null===(t=e.response)||void 0===t?void 0:t.statusText)||e.message||"There is some error while uploading. Please try again.",!0),n.resetForm()}(e)}).finally(function(){n.isUploading=!1})}}},po=(0,S.A)(mo,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("form",eo,[(0,t.withDirectives)((0,t.createElementVNode)("div",to,[(0,t.createElementVNode)("div",no,[(0,t.createElementVNode)("input",{type:"file",ref:"allFilesC",name:"msFiles__[]",multiple:"",class:"form-control",required:"",onChange:n[0]||(n[0]=function(){return i.checkErrors&&i.checkErrors.apply(i,arguments)}),accept:a.acceptFileType},null,40,oo),a.errors.files?((0,t.openBlock)(),(0,t.createElementBlock)("div",ro," Please select at least one file. ")):(0,t.createCommentVNode)("v-if",!0)]),(0,t.createElementVNode)("div",ao,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"text",name:"msTags__",id:"msTags__",required:"","onUpdate:modelValue":n[1]||(n[1]=function(e){return a.form.tags=e}),class:"form-control",placeholder:"Please enter keyword to search later. User comma for multiple keywords",onChange:n[2]||(n[2]=function(){return i.checkErrors&&i.checkErrors.apply(i,arguments)})},null,544),[[t.vModelText,a.form.tags]]),a.errors.tags?((0,t.openBlock)(),(0,t.createElementBlock)("div",io," Please enter keywords to search later. ")):(0,t.createCommentVNode)("v-if",!0)]),(0,t.createElementVNode)("div",so,[(0,t.createElementVNode)("input",{type:"button",value:"Upload",class:"btn btn-primary",onClick:n[3]||(n[3]=function(){return i.uploadNow&&i.uploadNow.apply(i,arguments)})})])],512),[[t.vShow,!a.isUploading]])],512),a.isUploading?((0,t.openBlock)(),(0,t.createElementBlock)("div",lo,[(0,t.createElementVNode)("div",co,[(0,t.createElementVNode)("div",{class:"progress-bar progress-bar-striped bg-success",role:"progressbar",style:(0,t.normalizeStyle)("width:"+a.percent+"%"),"aria-valuenow":a.percent,"aria-valuemin":"0","aria-valuemax":"100"},(0,t.toDisplayString)(a.percent)+"% ",13,uo)])])):(0,t.createCommentVNode)("v-if",!0),""!==a.message?((0,t.openBlock)(),(0,t.createElementBlock)("div",ho,[(0,t.createElementVNode)("div",fo,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)("alert m-1 "+a.msgType)},(0,t.toDisplayString)(a.message),3)])])):(0,t.createCommentVNode)("v-if",!0)],64)}]]);var go=["action"],vo={class:"form-group row mb-3"},yo={class:"col-sm-7"},bo={class:"text text-danger"},wo={class:"form-group row mb-3"},So={class:"col-sm-7"},Eo={class:"text text-danger"},ko={class:"form-group row mb-3"},_o={class:"col-sm-7"},Co={class:"text text-danger"},No={class:"form-group row mb-3"},Bo={class:"col-sm-7"},Ao={class:"text text-danger"},Do={class:"form-group row mb-3"},xo={class:"col-sm-7"},Vo={class:"form-group row mb-3"},To={class:"col-sm-7"},Mo=["value"],Oo={class:"text text-danger"},Io=["innerHTML"],Po={class:"form-group row mb-3"},jo={class:"col-sm-7"},Fo={class:"form-group row mb-3"},Lo={class:"col-sm-7"},Ro=["value"],Uo={class:"text text-danger"},Ho={class:"form-group row mb-3"},$o={class:"col-sm-7"},qo={class:"text text-danger"},zo={class:"form-group row mb-3"},Ko={class:"col-sm-7"},Wo={class:"text text-danger"},Jo={class:"form-group row mb-3"},Xo={class:"col-sm-7"},Yo={class:"form-group row mb-3"},Go={class:"col-sm-7"},Zo={class:"form-group row mb-3"},Qo={class:"col-sm-7"},er={class:"form-group row mb-3"},tr={class:"col-sm-7"},nr={class:"form-group row mb-3"},or={class:"col-sm-7"},rr={class:"form-group row mb-3"},ar={class:"col-sm-7"},ir={class:"form-group row mb-3"},sr={class:"border"},lr={class:"form-group"},cr={class:"col-sm-7"},dr={class:"form-group row mb-3"},ur={class:"col-sm-7"},hr=["value"],fr={class:"text text-danger"},mr={class:"form-group row mb-3"},pr={class:"col-sm-7"},gr={class:"form-group row mb-3"},vr={class:"col-sm-7"},yr={class:"row mb-3"},br={class:"form-group center-align"},wr=["href"];const Sr=g.Form,Er={mounted:function(){"edit"===this.dataActionPerformed?this.setFormData(this.formData):this.form.site_id=this.dataSiteId},props:["dataControllerName","dataBackUrl","dataSite","dataResults","dataActionPerformed","dataDataTypes","dataDataTypesInfo","dataFormAction","dataSiteId"],data:function(){return{sFont:{"font-size":"14px"},fluidCol:{width:"100%"},allQueryDataTypes:[{name:"param",value:"param"},{name:"data",value:"data"}],conventional:!1,formData:void 0!==this.dataResults?JSON.parse(this.dataResults):[],siteData:void 0!==this.dataSite?JSON.parse(this.dataSite):[],showExtraData:{},allDataTypes:void 0!==this.dataDataTypes?JSON.parse(this.dataDataTypes):[],allMethodTypes:[{name:"GET",value:"GET"},{name:"POST",value:"POST"}],form:new Sr({id:0,name:"",icon_css:"",alias:"",view_name:"",cache_group:"",data_type:"",method_type:"",data_handler:"",data_key_map:"",query_statement:"",query_as:"",description:"",site_id:1,is_seo_module:0,individual_cache:0,shared:0,update_inAllSites:0,is_mandatory:0,service_params:"",actionPerformed:this.dataActionPerformed,backURL:this.dataBackUrl,headers:"",live_edit:0,linked_module:""}),errors:{},cacheData:{},sortable:null,sortingInterval:-1,errorMessage:"",dataTypesInfo:void 0!==this.dataDataTypesInfo?JSON.parse(this.dataDataTypesInfo):[],saveURL:this.dataFormAction}},computed:{showQueryForm:function(){return this.form.data_type.toLowerCase().indexOf("queryservice")>-1},showServiceForm:function(){return this.form.data_type.toLowerCase().indexOf("service")>-1},showAllUpdateSection:function(){return"edit"===this.dataActionPerformed&&this.siteData.length>1}},methods:{fillCopiedData:function(){var e=this;(0,g.PasteFromClipboard)().then(function(t){(0,g.IsJson)(e.form.name)&&e.setFormData(JSON.parse(e.form.name))}).catch(function(e){console.log("unable to paste")})},goConventional:function(e){if(!1===this.conventional){var t=this.form.name;this.form.title=t,this.form.alias=("MODULE_"+t.toUpperCase()).replace(/\s/g,"_"),this.form.view_name=t.toLowerCase().replace(/\s/g,"-")}},setFormData:function(e){Object.keys(e).length;var t=document.querySelector("#addEditFrm");for(var n in e){var o=e[n];void 0!==this.form[n]&&"function"!=typeof this.form[n]&&(this.form[n]=o);var r=t[n]||document.getElementById(n);if(r){var a=r.type;"checkbox"!==a&&"radio"!==a||"submit"===a||(this.form[n]=1===o)}}},checkForService:function(e){this.showExtraData.show=""!==e&&(e.indexOf("Service")>-1||e.indexOf("service")>-1)},createModule:function(){var e=this,t=this;t.form.is_seo_module=t.form.is_seo_module?t.form.is_seo_module:0,t.form.individual_cache=t.form.individual_cache?t.form.individual_cache:0,t.form.update_inAllSites=t.form.update_inAllSites?t.form.update_inAllSites:0,t.form.is_mandatory=t.form.is_mandatory?t.form.is_mandatory:0,t.form.service_params=t.form.service_params?t.form.service_params:"",t.form.shared=t.form.shared?t.form.shared:0,t.form.live_edit=t.form.live_edit?t.form.live_edit:0,this.form.post(this.saveURL).then(function(t){e.resetForm(t)}).catch(function(t){e.showError(t)})},showError:function(e){for(var t in e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},resetForm:function(e){function t(e){return"true"===e.toString()||"1"===e.toString()}t(e.isSaved)?(this.errorMessage="",this.dataActionPerformed.toUpperCase(),J.show(this,"Saved..."),t(e.isSaved)&&(window.location.href=e.backURL)):(this.errorMessage={},J.show(this,"There is some error..."),this.errorMessage=e.message)}}},kr=(0,S.A)(Er,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("form",{id:"addEditFrm",action:a.saveURL,class:"form-group",method:"post",role:"form",onKeyup:n[24]||(n[24]=function(e){return i.hideErrorMessage(e)}),onSubmit:n[25]||(n[25]=(0,t.withModifiers)(function(){return i.createModule&&i.createModule.apply(i,arguments)},["prevent"]))},[(0,t.createElementVNode)("div",vo,[n[27]||(n[27]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"name"},"Name",-1)),(0,t.createElementVNode)("div",yo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{onBlur:n[0]||(n[0]=function(){return i.fillCopiedData&&i.fillCopiedData.apply(i,arguments)}),id:"name","onUpdate:modelValue":n[1]||(n[1]=function(e){return a.form.name=e}),class:"form-control",name:"name",placeholder:"Module name",required:"",type:"text"},null,544),[[t.vModelText,a.form.name]]),(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.conventional=e}),type:"checkbox",onClick:n[3]||(n[3]=function(e){return i.goConventional()})},null,512),[[t.vModelCheckbox,a.conventional]]),n[26]||(n[26]=(0,t.createTextVNode)(" Go Conventional",-1))]),(0,t.createElementVNode)("div",bo,(0,t.toDisplayString)(this.errors.name),1)])]),(0,t.createElementVNode)("div",wo,[n[28]||(n[28]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"alias"},"Alias",-1)),(0,t.createElementVNode)("div",So,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"alias","onUpdate:modelValue":n[4]||(n[4]=function(e){return a.form.alias=e}),class:"form-control",name:"alias",placeholder:"Alias",required:"",type:"text"},null,512),[[t.vModelText,a.form.alias]]),(0,t.createElementVNode)("div",Eo,(0,t.toDisplayString)(this.errors.alias),1)])]),(0,t.createElementVNode)("div",ko,[n[29]||(n[29]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"view_name"},"View Name",-1)),(0,t.createElementVNode)("div",_o,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"view_name","onUpdate:modelValue":n[5]||(n[5]=function(e){return a.form.view_name=e}),class:"form-control",name:"view_name",placeholder:"View name",required:"",type:"text"},null,512),[[t.vModelText,a.form.view_name]]),(0,t.createElementVNode)("div",Co,(0,t.toDisplayString)(this.errors.view_name),1)])]),(0,t.createElementVNode)("div",No,[n[30]||(n[30]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"cache_group"},"Cache Group",-1)),(0,t.createElementVNode)("div",Bo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"cache_group","onUpdate:modelValue":n[6]||(n[6]=function(e){return a.form.cache_group=e}),class:"form-control",maxlength:"60",name:"cache_group",placeholder:"Cache Category",type:"text"},null,512),[[t.vModelText,a.form.cache_group]]),(0,t.createElementVNode)("div",Ao,(0,t.toDisplayString)(this.errors.cache_group),1)])]),(0,t.createElementVNode)("div",Do,[n[31]||(n[31]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"individual_cache"},"Is Individual Cache?",-1)),(0,t.createElementVNode)("label",xo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"individual_cache","onUpdate:modelValue":n[7]||(n[7]=function(e){return a.form.individual_cache=e}),name:"individual_cache",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.individual_cache]])])]),(0,t.createElementVNode)("div",Vo,[n[33]||(n[33]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"data_type"},"Data Type",-1)),(0,t.createElementVNode)("div",To,[(0,t.withDirectives)((0,t.createElementVNode)("select",{id:"data_type","onUpdate:modelValue":n[8]||(n[8]=function(e){return a.form.data_type=e}),class:"form-select select-big",name:"data_type",onChange:n[9]||(n[9]=function(e){return i.checkForService(a.form.data_type)})},[n[32]||(n[32]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allDataTypes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e},(0,t.toDisplayString)(e),9,Mo)}),256))],544),[[t.vModelSelect,a.form.data_type]]),(0,t.createElementVNode)("div",Oo,(0,t.toDisplayString)(this.errors.data_type),1),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-info",innerHTML:this.dataTypesInfo[a.form.data_type]||""},null,8,Io),[[t.vShow,""!=a.form.data_type&&this.dataTypesInfo[a.form.data_type]]])])]),(0,t.createElementVNode)("div",Po,[n[34]||(n[34]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"data_handler"},"Data Handler",-1)),(0,t.createElementVNode)("label",jo,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"data_handler","onUpdate:modelValue":n[10]||(n[10]=function(e){return a.form.data_handler=e}),class:"form-control input","mb-2s":"5",name:"data_handler",placeholder:"Query or Service URL or filteration for this module",row:"",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.data_handler]])])]),(0,t.withDirectives)((0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",Fo,[n[36]||(n[36]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"method_type"},"Method Type",-1)),(0,t.createElementVNode)("div",Lo,[(0,t.withDirectives)((0,t.createElementVNode)("select",{id:"method_type","onUpdate:modelValue":n[11]||(n[11]=function(e){return a.form.method_type=e}),class:"form-select select-big",name:"method_type"},[n[35]||(n[35]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allMethodTypes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.value},(0,t.toDisplayString)(e.name),9,Ro)}),256))],512),[[t.vModelSelect,a.form.method_type]]),(0,t.createElementVNode)("div",Uo,(0,t.toDisplayString)(this.errors.data_type),1)])]),(0,t.createElementVNode)("div",Ho,[n[37]||(n[37]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"service_params"},"Service Params",-1)),(0,t.createElementVNode)("div",$o,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"service_params","onUpdate:modelValue":n[12]||(n[12]=function(e){return a.form.service_params=e}),class:"form-control",name:"service_params",placeholder:"Service Params",type:"text"},null,512),[[t.vModelText,a.form.service_params]]),(0,t.createElementVNode)("div",qo,(0,t.toDisplayString)(this.errors.service_params),1)])]),(0,t.createElementVNode)("div",zo,[n[38]||(n[38]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"service_params"},"Service Headers",-1)),(0,t.createElementVNode)("div",Ko,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"headers","onUpdate:modelValue":n[13]||(n[13]=function(e){return a.form.headers=e}),class:"form-control input",name:"headers",placeholder:"Service header as json",rows:"5"},null,512),[[t.vModelText,a.form.headers]]),(0,t.createElementVNode)("div",Wo,(0,t.toDisplayString)(this.errors.headers),1)])])],512),[[t.vShow,i.showServiceForm]]),(0,t.createElementVNode)("div",Jo,[n[39]||(n[39]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"data_key_map"},"Data Key Map",-1)),(0,t.createElementVNode)("label",Xo,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"data_key_map","onUpdate:modelValue":n[14]||(n[14]=function(e){return a.form.data_key_map=e}),class:"form-control input",name:"data_key_map",placeholder:"key to be replaced in comma seperated. ie: :site_id, :lang_id ",rows:"5",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.data_key_map]])])]),(0,t.createElementVNode)("div",Yo,[n[40]||(n[40]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"is_seo_module"},"Use this module as seo module",-1)),(0,t.createElementVNode)("label",Go,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"is_seo_module","onUpdate:modelValue":n[15]||(n[15]=function(e){return a.form.is_seo_module=e}),name:"is_seo_module",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.is_seo_module]])])]),(0,t.createElementVNode)("div",Zo,[n[41]||(n[41]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"is_mandatory"},"Is Mandatory?",-1)),(0,t.createElementVNode)("label",Qo,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"is_mandatory","onUpdate:modelValue":n[16]||(n[16]=function(e){return a.form.is_mandatory=e}),name:"is_mandatory",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.is_mandatory]])])]),(0,t.createElementVNode)("div",er,[n[42]||(n[42]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"shared"},"Is Shared?",-1)),(0,t.createElementVNode)("label",tr,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"shared","onUpdate:modelValue":n[17]||(n[17]=function(e){return a.form.shared=e}),name:"shared",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.shared]])])]),(0,t.createElementVNode)("div",nr,[n[43]||(n[43]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"linked_module"},"Linked Module Alias",-1)),(0,t.createElementVNode)("label",or,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"linked_module","onUpdate:modelValue":n[18]||(n[18]=function(e){return a.form.linked_module=e}),name:"linked_module",type:"text",class:"form-control"},null,512),[[t.vModelText,a.form.linked_module]])])]),(0,t.createElementVNode)("div",rr,[n[44]||(n[44]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"live_edit"},"Live Edit?",-1)),(0,t.createElementVNode)("label",ar,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"live_edit","onUpdate:modelValue":n[19]||(n[19]=function(e){return a.form.live_edit=e}),name:"live_edit",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.live_edit]])])]),(0,t.withDirectives)((0,t.createElementVNode)("div",ir,[(0,t.createElementVNode)("fieldset",sr,[n[46]||(n[46]=(0,t.createElementVNode)("legend",null,"Query Service Properties",-1)),(0,t.createElementVNode)("div",lr,[(0,t.createElementVNode)("label",{class:"col-sm-2",for:"query_statement",style:(0,t.normalizeStyle)(a.sFont)},"Query",4),(0,t.createElementVNode)("label",cr,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"query_statement","onUpdate:modelValue":n[20]||(n[20]=function(e){return a.form.query_statement=e}),class:"form-control input",name:"query_statement",rows:"5",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.query_statement]])])]),(0,t.createElementVNode)("div",dr,[(0,t.createElementVNode)("label",{class:"col-sm-2",for:"query_as",style:(0,t.normalizeStyle)(a.sFont)},"Get query data as",4),(0,t.createElementVNode)("div",ur,[(0,t.withDirectives)((0,t.createElementVNode)("select",{id:"query_as","onUpdate:modelValue":n[21]||(n[21]=function(e){return a.form.query_as=e}),class:"form-select select-big",name:"query_as"},[n[45]||(n[45]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allQueryDataTypes,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.value},(0,t.toDisplayString)(e.name),9,hr)}),256))],512),[[t.vModelSelect,a.form.query_as]]),(0,t.createElementVNode)("div",fr,(0,t.toDisplayString)(this.errors.query_as),1)])])])],512),[[t.vShow,i.showQueryForm]]),(0,t.createElementVNode)("div",mr,[n[47]||(n[47]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"description"},"Description or different database connection name if it is a query module",-1)),(0,t.createElementVNode)("label",pr,[(0,t.withDirectives)((0,t.createElementVNode)("textarea",{id:"description","onUpdate:modelValue":n[22]||(n[22]=function(e){return a.form.description=e}),class:"form-control input",name:"description",rows:"5",style:(0,t.normalizeStyle)(a.fluidCol)},null,4),[[t.vModelText,a.form.description]])])]),(0,t.withDirectives)((0,t.createElementVNode)("div",gr,[n[49]||(n[49]=(0,t.createElementVNode)("label",{class:"col-sm-2",for:"update_inAllSites"},"Update in all sites?",-1)),(0,t.createElementVNode)("label",vr,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"update_inAllSites","onUpdate:modelValue":n[23]||(n[23]=function(e){return a.form.update_inAllSites=e}),name:"update_inAllSites",type:"checkbox"},null,512),[[t.vModelCheckbox,a.form.update_inAllSites]]),n[48]||(n[48]=(0,t.createElementVNode)("div",{class:"alert alert-info"}," Be careful by clicking this checkbox. Content will be updated in all sites based on alias. If you are changing alias it will be updated only in this site. ",-1))])],512),[[t.vShow,this.showAllUpdateSection]]),(0,t.createElementVNode)("div",yr,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-danger"},(0,t.toDisplayString)(a.errorMessage),513),[[t.vShow,"string"==typeof a.errorMessage&&""!==a.errorMessage]]),(0,t.createElementVNode)("div",br,[n[50]||(n[50]=(0,t.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Back",8,wr)])])],40,go)])}]]);var _r=["value"],Cr=__webpack_require__(846),Nr=__webpack_require__.n(Cr);const Br={components:{"split-button":k},props:["dataSites","dataCurrentSite","dataSupportedSites","dataIsAdmin"],mounted:function(){this.init()},data:function(){return{sites:void 0===this.dataSites?[]:JSON.parse(this.dataSites),currentSite:void 0===this.dataCurrentSite?1:parseInt(this.dataCurrentSite),supportedSite:void 0===this.dataSupportedSites?[]:JSON.parse(this.dataSupportedSites)}},methods:{init:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this,n=new(Nr()),o=n.get("allSites");if(0===o.length||!0===e){var r=v.admin_path("site/getSitesForUsers");axios.get(r,{withCredentials:!1}).then(function(e){t.sites=e.data,n.set("allSites",JSON.stringify(t.sites))}).catch(function(e){console.log(e)})}else t.sites=JSON.parse(o)},hasSites:function(){return null!=this.sites&&this.sites.length>1},parseSite:function(e){return{label:e.name,value:e.id}},setSite:function(e){var t=v.admin_path("ajax/setSiteId/".concat(this.currentSite));axios.get(t).then(function(e){window.location.href=window.location.pathname}).catch(function(e){console.log(e)})}}},Ar=(0,S.A)(Br,[["render",function(e,n,o,r,a,i){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("select",{onClick:n[0]||(n[0]=function(e){return i.init(!0)}),name:"site_combo",class:"form-select",id:"site_combo",onChange:n[1]||(n[1]=function(){return i.setSite&&i.setSite.apply(i,arguments)}),"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.currentSite=e})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,_r)}),256))],544)),[[t.vModelSelect,a.currentSite]])}]]);function Dr(e){return function(e){if(Array.isArray(e))return xr(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 xr(e,t);var n={}.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)?xr(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 xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Vr={class:"row mt-2 pb-2 border-bottom"},Tr={class:"col-auto"},Mr=["value"],Or={class:"col-auto"},Ir=["value"],Pr={class:"col-auto"},jr=["value"],Fr={class:"col-auto"},Lr={class:"col d-flex justify-content-end"},Rr={key:0,class:"btn-group"},Ur={key:0,class:"row mt-3"},Hr={class:"col left-zero"},$r={class:"alert alert-danger col-md-8"},qr=["innerHTML"],zr={class:"row mt-3"},Kr={class:"col col-9"},Wr={class:"row homepage-modules"},Jr={class:"non-selectable shadow-sm card mb-3"},Xr=["onDblclick"],Yr={class:"pull-right small"},Gr=["onClick"],Zr=["onClick"],Qr=["onClick"],ea=["data-hook-id"],ta=["data-module-id"],na=["onClick"],oa=["data-hook-id"],ra={key:0,class:"card-footer bg-gradient border-light"},aa=["onClick","data-hook-id"],ia={key:0,ref:"savePanel",class:"clearboth text-center pt-5"},sa={key:0,class:"col col-3"},la={class:"panel-sub-heading"},ca={class:"input-group"},da={id:"draggableModules",class:"modules-list all-modules-right"},ua=["data-module-id"],ha=["innerHTML"],fa={class:"row"},ma={key:0,class:"col-auto p-1"},pa=["value"],ga={key:1,class:"col-auto p-1"},va=["value"],ya={key:2,class:"col-auto p-1"},ba=["value"],wa={class:"col-auto p-1"},Sa=["value"],Ea={class:"row mt-2"},ka={key:0,class:"col-auto p-1"},_a=["value"],Ca={key:1,class:"col-auto p-1"},Na=["value"],Ba={key:2,class:"col-auto p-1"},Aa=["value"],Da={class:"col-auto p-1"},xa=["value"],Va={class:"row"},Ta={class:"plr5 v-space"},Ma={class:"loader"},Oa={class:"p-2",title:"Delete from other platforms too"},Ia={style:{"text-transform":"capitalize"}},Pa={class:"row",style:{"max-height":"500px",overflow:"scroll"}},ja={class:"table table-striped"},Fa={key:0},La=["innerHTML"],Ra=["textContent"],Ua={key:0},Ha={style:{"background-color":"#fff",border:"none"}},$a={class:"text text-danger"};const qa={components:{"modal-box":se},props:["dataModel","dataModuleRelations","dataId"],mounted:function(){},data:function(){return{model:void 0===this.dataModel||""===this.dataModel?null:this.dataModel,relation:void 0===this.dataModuleRelations||""===this.dataModuleRelations?"":this.dataModuleRelations,id:void 0===this.dataId||""===this.dataId?0:parseInt(this.dataId),resData:[],errorMessage:"",isEditable:!0,excludeFields:[]}},methods:{shouldExclude:function(e){return this.excludeFields.indexOf(e)>=0},getValue:function(e,t){if(!this.isEditable)return t;if("id"===e&&this.isEditable){var n="edit/".concat(t);return n=v.admin_path("".concat(this.model,"/").concat(n)),'<a href="'.concat(n,'">').concat(t,"</a>")}return t},showInfo:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.isEditable="true"===o.toString(),this.excludeFields=n,this.model=e;var r=this;X.show(this),axios.get(v.get("base_path")+"/ajax/getInfo/".concat(e,"/").concat(t)).then(function(e){r.errorMessage="",r.resData={},r.resData=e.data.results,!0===e.data.error&&(r.errorMessage=e.data.message),r.open(),X.hide(r)}).catch(function(e){J.show(r,e.message),X.hide(r)})},open:function(){this.$refs.infoModal.open(),H.emit("info-popup-open")},close:function(){this.$refs.infoModal.close(),H.emit("info-popup-close")}}},za=(0,S.A)(qa,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("modal-box");return(0,t.openBlock)(),(0,t.createBlock)(s,{ref:"infoModal","data-show-footer":"true"},{title:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Ia,(0,t.toDisplayString)(a.model)+" Info",1)]}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Pa,[(0,t.createElementVNode)("table",ja,[(0,t.createElementVNode)("tbody",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.resData,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[i.shouldExclude(n)?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("tr",Fa,[(0,t.createElementVNode)("td",null,(0,t.toDisplayString)(n),1),(0,t.createElementVNode)("td",null,["id"===n?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,innerHTML:i.getValue(n,e)},null,8,La)):(0,t.createCommentVNode)("v-if",!0),"id"!==n?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,textContent:(0,t.toDisplayString)(i.getValue(n,e))},null,8,Ra)):(0,t.createCommentVNode)("v-if",!0)])]))],64)}),256)),""!==a.errorMessage?((0,t.openBlock)(),(0,t.createElementBlock)("tr",Ua,[(0,t.createElementVNode)("td",Ha,[(0,t.createElementVNode)("div",$a,(0,t.toDisplayString)(a.errorMessage),1)])])):(0,t.createCommentVNode)("v-if",!0)])])])]}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[0]||(n[0]=function(e){return i.close()})},"Close")]}),_:1},512)}]]),Ka={components:{"info-popup":za,"modal-box":se},mounted:function(){this.init()},created:function(){},props:["dataCategories","dataMicrosites","dataPlatforms","dataSiteId","dataMicrositeId","dataCategoryId","dataPlatformId","dataSiteInfo","dataHookInfo","dataAllModules","dataCategoryModules","dataCategoryInfo","dataThemeInfo","dataUserRights","dataIsModuleReadonly","dataAllSites"],computed:{hasSiteMoreThanOne:function(){return this.allSites.length>1},hasMicrosites:function(){return this.microsites.length>0},hasPlatformMoreThanOne:function(){return this.platforms.length>1},hasTheme:function(){return this.themeInfo&&this.themeInfo.id},saveButtonCss:function(){return"btn btn-success btn-form-submit"+(!0===this.enableDisableSave()?"":" disabled")},canEdit:function(){return this.userRights.indexOf("edit")>=0&&!1===this.isModuleReadonly},canDelete:function(){return this.userRights.indexOf("delete")>=0&&!1===this.isModuleReadonly},modalCss:function(){return"modal-lg"},fromCategories:function(){return this.categoriesData[this.fromData.site_id]||[]},toCategories:function(){return this.categoriesData[this.toData.site_id]||[]},hasError:function(){return this.errors.length>0},filterModules:function(){var e=this.searchKey;return""!==e&&null!=e?(e=e.toLowerCase(),this.allModules.filter(function(t){var n=t.alias.toLowerCase(),o=t.name.toLowerCase();if(t.id.toString()===e||n.includes(e)||o.includes(e))return!0})):(this.searchKey="",this.allModules)}},data:function(){return{categoriesData:{},categories:void 0===this.dataCategories||""===this.dataCategories?[]:JSON.parse(this.dataCategories),microsites:void 0===this.dataMicrosites||""===this.dataMicrosites?[]:JSON.parse(this.dataMicrosites),platforms:void 0===this.dataPlatforms||""===this.dataPlatforms?[]:JSON.parse(this.dataPlatforms),siteId:void 0===this.dataSiteId||""===this.dataSiteId?1:parseInt(this.dataSiteId),microSiteId:void 0===this.dataMicrositeId||""===this.dataMicrositeId?0:parseInt(this.dataMicrositeId),platformId:void 0===this.dataPlatformId||""===this.dataPlatformId?1:parseInt(this.dataPlatformId),categoryId:void 0===this.dataCategoryId||""===this.dataCategoryId?0:parseInt(this.dataCategoryId),siteInfo:void 0===this.dataSiteInfo||""===this.dataSiteInfo?[]:JSON.parse(this.dataSiteInfo),hookInfo:void 0===this.dataHookInfo||""===this.dataHookInfo?[]:JSON.parse(this.dataHookInfo),allModules:void 0===this.dataAllModules||""===this.dataAllModules?[]:JSON.parse(this.dataAllModules),categoryModules:void 0===this.dataCategoryModules||""===this.dataCategoryModules?[]:JSON.parse(this.dataCategoryModules),categoryInfo:void 0===this.dataCategoryInfo||""===this.dataCategoryInfo?[]:JSON.parse(this.dataCategoryInfo),themeInfo:void 0===this.dataThemeInfo||""===this.dataThemeInfo?[]:JSON.parse(this.dataThemeInfo),hooks:[],hooksInfoCache:{},moduleInfoCache:{},noHookFound:!1,errors:[],enableSave:!1,searchKey:"",applicableForAllPlatforms:!1,fromData:{site_id:0,microsite_id:0,platform_id:0,category_id:0},toData:{site_id:0,microsite_id:0,platform_id:0,category_id:0},isWorking:!1,sortObj:{draggable:null},userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[],isModuleReadonly:"1"===this.dataIsModuleReadonly,allSites:void 0===this.dataAllSites||""===this.dataAllSites?[]:JSON.parse(this.dataAllSites),copyForAllPlatforms:!1}},methods:{init:function(){if(0===this.categories.length&&this.addErrorMessage("No category found!"),0===this.categoryInfo.length&&this.addErrorMessage("There is a mismatch in site default category. Please fix that."),this.hasTheme)this.parseTheme(),this.populateModules(),this.enableSorting(),this.makeCategories();else{var e=v.admin_path("category/settings",{platform_id:this.platformId});this.addErrorMessage("This category/platform/theme is not available in category_site table.\n You need to drag and drop in <a href='".concat(e,"'>category settings</a>.")),this.addErrorMessage("Dont' forget the set the theme there.")}},makeCategories:function(){var e=this.allSites.length;if(e>0)for(var t=0;t<e;t++){var n=this.allSites[t];this.categoriesData[n.id]=n.category}this.setDefaultFromTo()},setDefaultFromTo:function(){this.allSites.length>0?(this.fromData.site_id=this.allSites[0].id,this.toData.site_id=this.siteId):(this.fromData.site_id=this.siteId,this.toData.site_id=this.siteId),this.fromData.platform_id=this.platformId,this.toData.platform_id=this.platformId,this.toData.category_id=this.categoryId},saveNow:function(e,t){var n=this;return X.show(this),new Promise(function(o,r){axios.post(e,t).then(function(e){o(e)}).catch(function(e){r((0,g.safeErrorData)(e))}).finally(function(){X.hide(n)})})},getWhere:function(){return{site_id:this.siteId,microsite_id:this.microSiteId,platform_id:this.platformId,category_id:this.categoryId}},saveModules:function(){if(!1===this.enableDisableSave())return!1;var e=this,t={},n=document.querySelectorAll(".js_hook_modules"),o=[];if(n.forEach(function(e){var t=e.querySelectorAll("li.js_item"),n=e.getAttribute("data-hook-id");if(t.length>0){for(var r=[],a=0;a<t.length;a++){var i=t[a].getAttribute("data-module-id");r.push({module_id:i,position:a+1})}var s={hook_id:n,modules:r};o.push(s)}}),o.length>0){var r=e.getWhere();t.data=o,t.where=r,t.applicableForAllPlatforms=!1,this.saveNow(v.admin_path("homepage/saveSettings"),t).then(function(t){J.show(e,"Saved..."),e.enableDisableSave(!1)}).catch(function(t){e.showError(t)})}},populateModules:function(){var e=this,t=this.categoryModules;if(t.length>0)for(var n=0;n<t.length;n++){var o=t[n],r=e.getHookInfoCache(o.hook_id);try{var a=e.getModuleInfo(o.module_id);this.addModule(r.hookIndex,a)}catch(t){console.error("@populateModules: "+t.message),e.showError("@populateModules: "+t.message)}}else console.info("There is no module added for this category."),J.show(this,"There is no module added for this category. Drag from the right panel to the left boxes. ",5e3)},parseTheme:function(){if(this.hasTheme){var e=this,t=this.themeInfo.skeleton.match(/(%{cms.+}%)/gim);if(t&&t.length>0){var n=0;t.forEach(function(t,o){var r=t.replace("%{cms.",""),a=(r=r.replace("}%","")).split("."),i=a[0],s=a[1];if("hook"===i){var l=e.getHookInfo(s);null!==l?(e.addHook({name:s,modules:[],info:l}),e.setHookInfoCache(l.id,{info:l,hookIndex:n}),n++):console.error("@parseTheme "+s+". You need to add in your site")}})}else this.addErrorMessage("There is no hook defined in for this theme (".concat(this.themeInfo.name,"})"))}else this.addErrorMessage("There is no theme available for this category")},addErrorMessage:function(e){this.errors.push({message:e})},findModuleIndex:function(e,t){return null!==this.getHook(e)?this.getHook(e).modules.findIndex(function(e){return t.id===e.id}):-1},removeModules:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"module_id",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("[object Object]"===Object.prototype.toString.call(e)?t=e:(t=this.getWhere())[n]=parseInt(e),null!==o){t.hook_id=parseInt(o);var r=this.getHookInfoCache(o),a=this.getModuleInfo(e),i=this.findModuleIndex(r.hookIndex,a);this.getHook(r.hookIndex).modules.splice(i,1)}var s={};s.where=t,s.applicableForAllPlatforms=this.applicableForAllPlatforms,this.enableDisableSave(!0)},addModule:function(e,t){if(-1===this.findModuleIndex(e,t)){var n=this.getHook(e);return n.modules.push(t),n.modules.length}return!1},refreshRightSide:function(){this.allModules.push(this.allModules[0]),this.allModules.pop()},highlightEagerDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";document.querySelectorAll(".js_hook_modules").forEach(function(t){t.classList[e]("module-drop-eager"),t.closest("div.js_modules").classList[e]("p-0","m-0")})},setHookInfoCache:function(e,t){return this.hooksInfoCache[e]=t},getHookInfoCache:function(e){return this.hooksInfoCache[e]},getHookInfo:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"alias",n=this.hookInfo,o=0;o<n.length;o++){var r=n[o];if(r[t]===e)return r}return null},addHook:function(e){this.hooks.push(e)},getHook:function(e){return this.hooks[e]||null},getModuleInfo:function(e){if(this.moduleInfoCache[e])return this.moduleInfoCache[e];for(var t=null,n=0;n<this.allModules.length;n++){var o=this.allModules[n];if(o.id.toString()===e.toString()){this.moduleInfoCache[e]=o,t=o;break}}return t},enableDragging:function(){if(!this.canEdit)return!1;var e=this,t=document.getElementById("draggableModules");this.sortObj.draggable=Xn.create(t,{animation:200,draggable:".js_item",group:{name:"modulesBox"},sort:!1,ghostClass:"js_modules",onEnd:function(t){var n=t.to,o=t.item,r=n.getAttribute("data-hook-id"),a=o.getAttribute("data-module-id");if(r){var i=e.getHookInfoCache(r),s=e.getModuleInfo(a),l=e.addModule(i.hookIndex,s);o.parentNode.removeChild(o),e.highlightEagerDrop("remove"),!1===l&&J.show(e,"Module is already added in this hook...")}e.enableDisableSave(!0)},onStart:function(t){e.highlightEagerDrop("add")}})},enableSorting:function(){if(!this.canEdit)return!1;var e=this;this.$nextTick(function(){document.querySelectorAll(".js_modules").forEach(function(t){Xn.create(t,{animation:200,filter:".js_delete",group:{name:"droppable",put:"modulesBox"},onFilter:function(t){var n=t.item,o=t.target,r=n.parentNode.getAttribute("data-hook-id"),a=n.getAttribute("data-module-id");Xn.utils.is(o,".js_delete")&&e.removeModules(a,"module_id",r)},onUpdate:function(t){e.enableDisableSave(!0)}})}),e.enableDragging(!0)})},deleteAllModuleFromHook:function(e){var t=this.getHookInfoCache(e);this.getHook(t.hookIndex).modules=[],this.removeModules(e,"hook_id")},hasAnyModulesInAHook:function(e){return void 0!==e.modules&&e.modules.length>0},enableDisableSave:function(e){if(void 0===e)return this.enableSave;this.enableSave=e},showHideDeleteAlert:function(e){e?Y.open(this,"deleteBox"):Y.close(this,"deleteBox")},deleteAllFromCategory:function(){this.showHideDeleteAlert(!1);for(var e=this.hooks,t=0;t<e.length;t++)e[t].modules=[];this.removeModules(this.categoryId,"category_id")},showHideCopyAlert:function(){arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?Y.close(this,"copyBox"):(this.setDefaultFromTo(),Y.open(this,"copyBox"))},copyDataFromCategory:function(){this.isWorking=!0;var e=this,t={fromData:this.fromData,toData:this.toData},n=v.admin_path("homepage/copyData");this.saveNow(n,t).then(function(t){t.data.error?J.show(e,t.data.message,5e3):t.data.success&&(e.showHideCopyAlert(!1),J.show(e,"Copied. Reloading..."),window.location.href=window.location.href),e.isWorking=!1}).catch(function(t){e.showHideCopyAlert(!1),e.isWorking=!1,e.showError(t)})},setWorking:function(){},isValidModule:function(e){var t=null!=e&&void 0!==e&&e.id>0;return!1===t&&console.error("There is some error in db entries for this category. This can be fixed by deleting all modules and drag and drop again."),t},fetchNewData:function(){var e=this.getWhere();delete e.site_id,0===e.microsite_id&&delete e.microsite_id,window.location.href=v.admin_path("homepage/ui",e)},showInfo:function(e,t){this.$refs.infoPopup.showInfo(e,t)},showHideHookPanel:function(e){var t=this.$refs["hook_panel_"+e][0];-1===t.className.indexOf("hide")?t.classList.add("hide"):t.classList.remove("hide")},onlyMe:function(e,t){var n=this,o=this.$refs["panel_"+e][0];function r(e){for(var t=n.$refs.savePanel,o=0;o<n.hooks.length;o++){var r=n.hooks[o],a=n.$refs["panel_"+r.info.id][0];!0===e?(a.classList.add("hide"),a.classList.remove("fixed")):(a.classList.remove("hide"),a.classList.remove("fixed"))}!0===e?t.classList.add("hide"):t.classList.remove("hide")}-1===o.className.indexOf("fixed")?(r(!0),o.classList.remove("hide"),o.classList.add("fixed")):r(!1)},showError:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t="string"==typeof e?e:e&&e.data&&e.data.message?e.data.message:"Unknown error!",J.show(this,t,5e3),n&&setTimeout(function(){window.location.reload()},1e3)}}},Wa=(0,S.A)(Ka,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("modal-box"),l=(0,t.resolveComponent)("info-popup");return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Vr,[(0,t.withDirectives)((0,t.createElementVNode)("div",Tr,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.microSiteId=e}),class:"form-select select",onChange:n[1]||(n[1]=function(e){return i.fetchNewData()})},[n[24]||(n[24]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.microsites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Mr)}),256))],544),[[t.vModelSelect,a.microSiteId]])],512),[[t.vShow,i.hasMicrosites]]),(0,t.createElementVNode)("div",Or,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.categoryId=e}),class:"form-select select",onChange:n[3]||(n[3]=function(e){return i.fetchNewData()})},[n[25]||(n[25]=(0,t.createElementVNode)("option",null,"Select a Category",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.categories,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.category_id},(0,t.toDisplayString)(e.name),9,Ir)}),256))],544),[[t.vModelSelect,a.categoryId]])]),(0,t.createElementVNode)("div",Pr,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return a.platformId=e}),class:"form-select select",onChange:n[5]||(n[5]=function(e){return i.fetchNewData()})},[n[26]||(n[26]=(0,t.createElementVNode)("option",null,"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,jr)}),256))],544),[[t.vShow,i.hasPlatformMoreThanOne],[t.vModelSelect,a.platformId]])]),(0,t.withDirectives)((0,t.createElementVNode)("div",Fr,[(0,t.createElementVNode)("span",{class:"hand",title:"Click to see theme info",onClick:n[6]||(n[6]=function(e){return i.showInfo("theme",a.themeInfo.id)})},[n[27]||(n[27]=(0,t.createTextVNode)("Theme: ",-1)),(0,t.createElementVNode)("u",null,(0,t.toDisplayString)(a.themeInfo.name),1)])],512),[[t.vShow,i.hasTheme]]),(0,t.createElementVNode)("div",Lr,[i.hasTheme?((0,t.openBlock)(),(0,t.createElementBlock)("div",Rr,[i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"Delete All Modules form this category",class:"btn btn-danger",title:"Delete All Modules form this category",type:"button",onClick:n[7]||(n[7]=function(e){return i.showHideDeleteAlert(!0)})},Dr(n[28]||(n[28]=[(0,t.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-trash-o"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("button",{"aria-label":"Copy Data From",class:"btn btn-outline-secondary",title:"Copy Data From",type:"button",onClick:n[8]||(n[8]=function(e){return i.showHideCopyAlert(!0)})},Dr(n[29]||(n[29]=[(0,t.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-copy"},null,-1)])))])):(0,t.createCommentVNode)("v-if",!0)])]),i.hasError?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ur,[(0,t.createElementVNode)("div",Hr,[(0,t.createElementVNode)("div",$r,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.errors,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{innerHTML:e.message},null,8,qr)}),256))])])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",zr,[(0,t.createElementVNode)("div",Kr,[(0,t.createElementVNode)("div",Wr,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.hooks,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref_for:!0,ref:"panel_"+e.info.id,class:"col-4"},[(0,t.createElementVNode)("div",Jr,[(0,t.createElementVNode)("div",{class:"card-header hook-header",onDblclick:function(t){return i.showHideHookPanel(e.info.id)}},[(0,t.createElementVNode)("span",Yr,[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)("fa hand fa-expand"),title:"Expand/Contract",onClick:function(t){return i.onlyMe(e.info.id,t)}},null,8,Gr),n[30]||(n[30]=(0,t.createTextVNode)(" ",-1)),(0,t.createElementVNode)("span",{class:"fa fa-minus hand",title:"Minimize/Maximize",onClick:function(t){return i.showHideHookPanel(e.info.id)}},null,8,Zr)]),(0,t.createElementVNode)("a",{href:"javascript:void(0)",onClick:function(t){return i.showInfo("hook",e.info.id)}},(0,t.toDisplayString)(e.info.name),9,Qr)],40,Xr),(0,t.createElementVNode)("div",{ref_for:!0,ref:"hook_panel_"+e.info.id,class:"card-body hook_modules js_modules"},[(0,t.createElementVNode)("ul",{"data-hook-id":e.info.id,class:"list-group list-group-flush modules-list js_modules js_hook_modules"},[e.modules.length>0?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(e.modules,function(n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-module-id":n.id,class:"js_item"},[(0,t.createElementVNode)("a",{href:"javascript:void(0)",onClick:function(e){return i.showInfo("module",n.id)}},(0,t.toDisplayString)(n.name),9,na),i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,"data-hook-id":e.info.id,class:"js_delete delete hand pull-right fa fa-trash-o",title:"Delete this module from the hook"},null,8,oa)):(0,t.createCommentVNode)("v-if",!0)],8,ta)}),256)):(0,t.createCommentVNode)("v-if",!0)],8,ea)],512),i.hasAnyModulesInAHook(e)&&i.canDelete?((0,t.openBlock)(),(0,t.createElementBlock)("div",ra,[(0,t.createElementVNode)("span",{onClick:function(t){return i.deleteAllModuleFromHook(e.info.id)},class:"js_delete_from_hook hand pull-right fa fa-trash-o",title:"Delete all module from this hook","data-hook-id":e.info.id},null,8,aa)])):(0,t.createCommentVNode)("v-if",!0)])],512)}),256)),i.hasTheme?((0,t.openBlock)(),(0,t.createElementBlock)("div",ia,[(0,t.createElementVNode)("button",{class:(0,t.normalizeClass)(i.saveButtonCss),type:"button",onClick:n[9]||(n[9]=function(e){return i.saveModules()})}," Save Now! ",2)],512)):(0,t.createCommentVNode)("v-if",!0)])]),i.hasError?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",sa,[(0,t.createElementVNode)("div",la,[(0,t.createElementVNode)("div",ca,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[10]||(n[10]=function(e){return a.searchKey=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id, name or alias",type:"text"},null,512),[[t.vModelText,a.searchKey]])])]),(0,t.createElementVNode)("ul",da,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterModules,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-module-id":e.id,class:"js_item"},[(0,t.createElementVNode)("span",{innerHTML:e.name},null,8,ha),n[31]||(n[31]=(0,t.createElementVNode)("span",{class:"delete hand pull-right fa fa-trash-o"},null,-1))],8,ua)}),256))])]))]),(0,t.createVNode)(s,{ref:"copyBox","data-show-footer":"true","data-modal-css":i.modalCss},{title:(0,t.withCtx)(function(){return Dr(n[32]||(n[32]=[(0,t.createTextVNode)(" Copy Data ",-1)]))}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",fa,[n[37]||(n[37]=(0,t.createElementVNode)("div",{class:"col-1 p-1"},[(0,t.createElementVNode)("label",{class:"col-md-3 d-flex"},"From:")],-1)),i.hasSiteMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",ma,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return a.fromData.site_id=e}),class:"form-select select-sm"},[n[33]||(n[33]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,pa)}),256))],512),[[t.vModelSelect,a.fromData.site_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasMicrosites?((0,t.openBlock)(),(0,t.createElementBlock)("div",ga,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[12]||(n[12]=function(e){return a.fromData.microsite_id=e}),class:"form-select select-sm"},[n[34]||(n[34]=(0,t.createElementVNode)("option",{value:"0"},"Select a Microsite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.microsites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,va)}),256))],512),[[t.vModelSelect,a.fromData.microsite_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasPlatformMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",ya,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return a.fromData.platform_id=e}),class:"form-select select-sm"},[n[35]||(n[35]=(0,t.createElementVNode)("option",{value:"0"},"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ba)}),256))],512),[[t.vModelSelect,a.fromData.platform_id]])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",wa,[(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select select-sm","onUpdate:modelValue":n[14]||(n[14]=function(e){return a.fromData.category_id=e})},[n[36]||(n[36]=(0,t.createElementVNode)("option",{value:"0"},"Select a Category",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.fromCategories,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.category_id},(0,t.toDisplayString)(e.name),9,Sa)}),256))],512),[[t.vModelSelect,a.fromData.category_id]])])]),(0,t.createElementVNode)("div",Ea,[n[42]||(n[42]=(0,t.createElementVNode)("div",{class:"col-1 p-1"},[(0,t.createElementVNode)("label",{class:"col-md-3 d-flex"},"To:")],-1)),i.hasSiteMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",ka,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[15]||(n[15]=function(e){return a.toData.site_id=e}),class:"form-select select-sm"},[n[38]||(n[38]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,_a)}),256))],512),[[t.vModelSelect,a.toData.site_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasMicrosites?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ca,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[16]||(n[16]=function(e){return a.toData.microsite_id=e}),class:"form-select select-sm"},[n[39]||(n[39]=(0,t.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.microsites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Na)}),256))],512),[[t.vModelSelect,a.toData.microsite_id]])])):(0,t.createCommentVNode)("v-if",!0),i.hasPlatformMoreThanOne?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ba,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[17]||(n[17]=function(e){return a.toData.platform_id=e}),class:"form-select select-sm"},[n[40]||(n[40]=(0,t.createElementVNode)("option",{value:"0"},"Select a Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,Aa)}),256))],512),[[t.vModelSelect,a.toData.platform_id]])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",Da,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[18]||(n[18]=function(e){return a.toData.category_id=e}),class:"form-select select-sm"},[n[41]||(n[41]=(0,t.createElementVNode)("option",{value:"0"},"Select a Category",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.toCategories,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.category_id},(0,t.toDisplayString)(e.name),9,xa)}),256))],512),[[t.vModelSelect,a.toData.category_id]])])]),(0,t.createElementVNode)("div",Va,[(0,t.withDirectives)((0,t.createElementVNode)("div",Ta,Dr(n[43]||(n[43]=[(0,t.createElementVNode)("div",{class:"alert alert-info"},[(0,t.createTextVNode)(" Please do not select "),(0,t.createElementVNode)("strong",null,"source platform"),(0,t.createTextVNode)(" if you want to copy modules in all platforms respectively. ")],-1)])),512),[[t.vShow,i.hasPlatformMoreThanOne]])])]}),footer:(0,t.withCtx)(function(){return[(0,t.withDirectives)((0,t.createElementVNode)("div",Ma,Dr(n[44]||(n[44]=[(0,t.createTextVNode)(" Please wait... ",-1),(0,t.createElementVNode)("span",{class:"fa fa-loader"},null,-1)])),512),[[t.vShow,a.isWorking]]),(0,t.createElementVNode)("button",{class:"btn btn-success btn-from-submit",onClick:n[19]||(n[19]=function(e){return i.copyDataFromCategory()})}," Copy Now "),(0,t.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[20]||(n[20]=function(e){return i.showHideCopyAlert(!1)})}," Cancel ")]}),_:1},8,["data-modal-css"]),(0,t.createVNode)(s,{ref:"deleteBox","data-show-footer":"true","data-title-css":"alert-danger"},{title:(0,t.withCtx)(function(){return Dr(n[45]||(n[45]=[(0,t.createTextVNode)(" Warning!!! ",-1)]))}),content:(0,t.withCtx)(function(){return[n[47]||(n[47]=(0,t.createElementVNode)("span",{class:"text-danger"},"Are you sure to delete all modules from this category? Can't be undone.",-1)),(0,t.createElementVNode)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("label",Oa,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[21]||(n[21]=function(e){return a.applicableForAllPlatforms=e}),type:"checkbox"},null,512),[[t.vModelCheckbox,a.applicableForAllPlatforms]]),n[46]||(n[46]=(0,t.createTextVNode)(" Delete from other platforms too",-1))],512),[[t.vShow,i.hasPlatformMoreThanOne]])])]}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("button",{class:"btn btn-danger",onClick:n[22]||(n[22]=function(e){return i.deleteAllFromCategory()})}," Yes "),(0,t.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[23]||(n[23]=function(e){return i.showHideDeleteAlert(!1)})}," No ")]}),_:1},512),(0,t.createVNode)(l,{ref:"infoPopup"},null,512)],64)}]]),Ja={mounted:function(){for(var e in this)this.hasOwnProperty(e)},methods:{getAllInputs:function(){console.log("all inputs")}}},Xa=(0,S.A)(Ja,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.renderSlot)(e.$slots,"default")])}]]);function Ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Ga={class:"row"},Za={class:"col-auto d-flex"},Qa={class:"row"},ei={key:0,class:"spinner-border text-info",role:"status"},ti={class:"col-auto m-1 border"},ni=["src","onClick"],oi={key:1},ri={class:"container-fluid"};function ai(e){return function(e){if(Array.isArray(e))return ii(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 ii(e,t);var n={}.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)?ii(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 ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const si={components:{"modal-box":se,"file-uploader":po},props:["dataModel","dataModuleRelations","dataId","dataEditor"],mounted:function(){var e=this;H.on("gallery-image-uploaded",function(t){e.data=[].concat(ai(t.data),ai(e.data))})},computed:{galleryCreate:function(){return v.admin_path("gallery/create?return_url="+encodeURIComponent(window.location.href))}},data:function(){return{data:[],loading:!1,searchKey:"",editor:this.dataEditor,form:{file:""}}},methods:{loadData:function(){var e=this;this.data=[],this.loading=!0;var t=v.admin_path("gallery/getAllImages");axios.get(t).then(function(t){e.data=t.data}).catch(function(e){console.log(e)}).finally(function(){e.loading=!1})},getImage:function(e){return v.get_media("".concat(e))},insertContentToEditor:function(e){e='<img src="'.concat(e,'" />'),this.editor&&this.editor.insertContent(e),this.close()},searchImages:function(){var e=this;if(this.searchKey.length>0){this.data=[],this.loading=!0;var t=v.admin_path("gallery/searchImages/".concat(this.searchKey));axios.get(t).then(function(t){e.data=t.data}).catch(function(e){console.log(e)}).finally(function(){e.loading=!1})}else this.loadData()},open:function(e){this.loadData(),e&&(this.editor=e),this.$refs.imageModalBox.open(),H.emit("image-gallery-open")},close:function(){this.$refs.imageModalBox.close(),H.emit("image-gallery-close")}}},li=(0,S.A)(si,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("file-uploader"),l=(0,t.resolveComponent)("modal-box");return(0,t.openBlock)(),(0,t.createBlock)(l,{ref:"imageModalBox","data-show-footer":"true"},{title:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Ga,[n[3]||(n[3]=(0,t.createElementVNode)("div",{class:"col-2"},"Gallery",-1)),(0,t.createElementVNode)("div",Za,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"text",class:"form-control me-1",placeholder:"Search image",onKeydown:n[0]||(n[0]=(0,t.withKeys)(function(){return i.searchImages&&i.searchImages.apply(i,arguments)},["enter"])),"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.searchKey=e})},null,544),[[t.vModelText,a.searchKey]]),(0,t.createElementVNode)("input",{type:"button",class:"btn btn-secondary me-1",value:"Search",onClick:n[2]||(n[2]=function(){return i.searchImages&&i.searchImages.apply(i,arguments)})})])])]}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",Qa,[a.loading?((0,t.openBlock)(),(0,t.createElementBlock)("span",ei,(e=n[4]||(n[4]=[(0,t.createElementVNode)("span",{class:"visually-hidden"},"Loading...",-1)]),function(e){if(Array.isArray(e))return Ya(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 Ya(e,t);var n={}.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)?Ya(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.")}()))):(0,t.createCommentVNode)("v-if",!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.data,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",ti,[(0,t.createElementVNode)("img",{src:i.getImage(e.path),width:"100",onClick:function(t){return i.insertContentToEditor(i.getImage(e.path))}},null,8,ni)])}),256)),0===a.data.length&&!1===a.loading?((0,t.openBlock)(),(0,t.createElementBlock)("div",oi,"No images found")):(0,t.createCommentVNode)("v-if",!0)])];var e}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",ri,[(0,t.createVNode)(s,{"data-accept":"image/*"})])]}),_:1},512)}]]);var ci=["onClick","title"],di={class:"card mb-3 shadow info-box"},ui={class:"card-body"},hi={class:"card-title"},fi=["href"],mi=["innerHTML"],pi={key:1,class:"info-box-text"},gi={key:0,class:"card-text text-center"},vi=new g.Storage;const yi={mounted:function(){},props:["dataInfo","dataColorIndex","dataSubTitle","dataTitle","dataIconCss","dataLink"],data:function(){return{info:void 0===this.dataInfo?null:"string"==typeof this.dataInfo?JSON.parse(this.dataInfo):this.dataInfo,subTitle:void 0!==this.dataSubTitle?this.dataSubTitle:"",iconCss:this.dataIconCss,link:void 0===this.dataLink?"":this.dataLink}},computed:{content:function(){return null!==this.info?this.info.name||this.info.title:this.dataTitle},icon:function(){return void 0!==this.iconCss&&""!==this.iconCss||null===this.info?this.iconCss:this.info.icon_css||this.info.iconCss}},methods:{getIconText:function(){var e;return null!==(e=this.info)&&void 0!==e&&e.icon_css||void 0===this.iconCss?this.content.replace(/[^a-zA-Z- ]/g,"").match(/\b\w/g).join(""):""},getColor:function(){return"color-"+(this.dataColorIndex?this.dataColorIndex:this.getSerialNumber())},getRandom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return e=parseInt(e),t=parseInt(t),Math.floor(Math.random()*(t-e))+e},getSerialNumber:function(){void 0===vi.fetch("counter")&&vi.store("counter",1);var e=vi.fetch("counter");return e>10&&(e=1),vi.store("counter",e+1),e}}},bi=(0,S.A)(yi,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",di,[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(i.getColor()+" info-box-icon")},[(0,t.createElementVNode)("i",{style:{"font-style":"normal"},class:(0,t.normalizeClass)(i.icon)},(0,t.toDisplayString)(i.getIconText()),3)],2),(0,t.createElementVNode)("div",ui,[(0,t.createElementVNode)("h5",hi,[""!==a.link?((0,t.openBlock)(),(0,t.createElementBlock)("a",{key:0,href:a.link,class:"info-box-text"},[(0,t.createElementVNode)("span",{class:"info-box-text",innerHTML:i.content},null,8,mi)],8,fi)):(0,t.createCommentVNode)("v-if",!0),""===a.link?((0,t.openBlock)(),(0,t.createElementBlock)("span",pi,(0,t.toDisplayString)(i.content),1)):(0,t.createCommentVNode)("v-if",!0)]),""!==a.subTitle?((0,t.openBlock)(),(0,t.createElementBlock)("p",gi,(0,t.toDisplayString)(a.subTitle),1)):(0,t.createCommentVNode)("v-if",!0)])])}]]),wi={components:{"info-box":bi},mounted:function(){},props:["dataModules","dataModulesAllowed","dataIsAdmin"],data:function(){return{modulesAllowed:this.dataModulesAllowed?JSON.parse(this.dataModulesAllowed):[]}},computed:{allModules:function(){return(void 0===this.dataModules?[]:JSON.parse(this.dataModules)).child}},methods:{navigate:function(e){window.location=v.admin_path(e.controller_name)},hasAccess:function(e){if("1"==this.dataIsAdmin.toString())return!0;for(var t=0;t<this.modulesAllowed.length;t++)if(this.modulesAllowed[t].module_id==e)return!0;return!1}}},Si=(0,S.A)(wi,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("info-box");return(0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.allModules,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[i.hasAccess(e.id)?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"col-auto hand",onClick:function(t){return i.navigate(e)},title:e.name},[((0,t.openBlock)(),(0,t.createBlock)(s,{key:e.name+n,"data-title":e.name,"data-sub-title":e.sub_title,"data-icon-css":e.icon_css},null,8,["data-title","data-sub-title","data-icon-css"]))],8,ci)):(0,t.createCommentVNode)("v-if",!0)],64)}),256)}]]),Ei=Si;var ki={class:"col-lg-6"},_i={class:"mb-2"},Ci=["value"],Ni={class:"text text-danger"},Bi={class:"mb-2"},Ai=["value"],Di={class:"text text-danger"},xi={class:"mb-2"},Vi={class:"text text-danger"},Ti={class:"row"};const Mi={mounted:function(){},props:["dataLanguages","dataLanguageTables"],data:function(){return{languages:this.dataLanguages&&"null"!==this.dataLanguages?JSON.parse(this.dataLanguages):[],languageTables:this.dataLanguageTables&&"null"!==this.dataLanguageTables?JSON.parse(this.dataLanguageTables):[],messages:[],form:new Sr({tables:[],sourceLang:"",targetLang:""}),errors:{},saveUrl:"language/translateNow",errorMessage:""}},methods:{getCss:function(e){return 0===e.status?"text text-danger":"text text-success"},showError:function(e){for(var t in e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},onSuccess:function(e){console.log(e),0===e.isSaved?(J.show(this,e.message),this.errorMessage={},this.errorMessage=e.message):(this.errorMessage="",this.messages=e.message)},saveNow:function(){var e=this,t=v.admin_path(this.saveUrl);return this.form.post(t).then(function(t){return e.onSuccess(t)}).catch(function(t){return e.showError(t)}),!1}}},Oi=(0,S.A)(Mi,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("div",ki,[(0,t.createElementVNode)("form",{id:"addEditFrm",method:"post",class:"form-horizontal",role:"form",onSubmit:n[6]||(n[6]=(0,t.withModifiers)(function(){return i.saveNow&&i.saveNow.apply(i,arguments)},["prevent"])),onKeyup:n[7]||(n[7]=function(e){return i.hideErrorMessage(e)})},[(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",_i,[n[9]||(n[9]=(0,t.createElementVNode)("p",null,[(0,t.createElementVNode)("strong",null,"Source Language:"),(0,t.createTextVNode)(" Data will be copied from the selected lanuage ")],-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{required:"",name:"sourceLang",class:"form-select","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.form.sourceLang=e}),onChange:n[1]||(n[1]=function(e){return i.hideErrorMessage(e)})},[n[8]||(n[8]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.languages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name)+" - "+(0,t.toDisplayString)(e.iso_code),9,Ci)}),256))],544),[[t.vModelSelect,a.form.sourceLang]]),(0,t.createElementVNode)("div",Ni,(0,t.toDisplayString)(this.errors.sourceLang),1)])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",Bi,[n[11]||(n[11]=(0,t.createElementVNode)("p",null,[(0,t.createElementVNode)("strong",null,"Target Language:"),(0,t.createTextVNode)(" New record will be inserted with this language id in selected tables ")],-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{required:"",name:"targetLang",class:"form-select","onUpdate:modelValue":n[2]||(n[2]=function(e){return a.form.targetLang=e}),onChange:n[3]||(n[3]=function(e){return i.hideErrorMessage(e)})},[n[10]||(n[10]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.languages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name)+" - "+(0,t.toDisplayString)(e.iso_code),9,Ai)}),256))],544),[[t.vModelSelect,a.form.targetLang]]),(0,t.createElementVNode)("div",Di,(0,t.toDisplayString)(this.errors.targetLang),1)])]),(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("div",xi,[n[12]||(n[12]=(0,t.createElementVNode)("p",null,"Select tables",-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{required:"",style:{height:"200px"},name:"tables",class:"form-select",multiple:"","onUpdate:modelValue":n[4]||(n[4]=function(e){return a.form.tables=e}),onChange:n[5]||(n[5]=function(e){return i.hideErrorMessage(e)})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.languageTables,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",null,(0,t.toDisplayString)(e.name),1)}),256))],544),[[t.vModelSelect,a.form.tables]]),(0,t.createElementVNode)("div",Vi,(0,t.toDisplayString)(this.errors.tables),1)])]),(0,t.createElementVNode)("div",Ti,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-danger"},(0,t.toDisplayString)(a.errorMessage),513),[[t.vShow,"string"==typeof a.errorMessage&&""!=a.errorMessage]]),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.messages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(i.getCss(e))},(0,t.toDisplayString)(e.message),3)}),256)),n[13]||(n[13]=(0,t.createElementVNode)("div",{class:"form-group center-align"},[(0,t.createElementVNode)("input",{type:"submit",name:"submit",value:"Submit and Hold on",class:"btn btn-success btn-large"})],-1))])],32)])])}]]);var Ii={class:"d-flex flex-column flex-shrink-0 t_left js_left_menu"},Pi={class:"list-unstyled ps-0"},ji={key:0},Fi=["title","href"],Li=["title","href"],Ri={class:"dropdown"},Ui=["href"];const Hi={mounted:function(){},props:["dataList","dataControllerName","dataModulesAllowed","dataIsAdmin","dataHashtagcmsVersion"],data:function(){return{allData:this.dataList?JSON.parse(this.dataList):[],modulesAllowed:this.dataModulesAllowed?JSON.parse(this.dataModulesAllowed):[]}},computed:{linkForHashtag:function(){return"https://www.hashtagcms.org/?utm_src=".concat(window.location.href)}},methods:{getIconLabel:function(e){return""!==e.icon_css&&e.icon_css?"":e.controller_name.charAt(0).toUpperCase()},getIconCss:function(e){return""!==e.icon_css&&e.icon_css?e.icon_css:"badge badge-info text-small"},hasChild:function(e){return e.child.length>0},getActiveCss:function(e,t){return this.isActive(e,t)?"active":""},isActive:function(e,t){if(this.dataControllerName===e)return!0;if(t&&t.child&&t.child.length>0){var n=this.dataControllerName;return t.child.find(function(e){return e.controller_name===n})}},getHref:function(e){return v.admin_path(e.controller_name)},hideAll:function(){document.querySelectorAll(".js_left_menu .js_child").forEach(function(e){e.classList.remove("active","animated","fadeIn")})},showHide:function(e){this.hideAll();var t=e.target;t.classList.contains("js_more")&&(e.preventDefault(),t.parentElement.nextElementSibling.classList.add("active","animated","fadeIn"))},hasAccess:function(e){if("1"===this.dataIsAdmin.toString())return!0;for(var t=0;t<this.modulesAllowed.length;t++)if(this.modulesAllowed[t].module_id===e)return!0;return!1},getMinHeight:function(){return"height:".concat(window.innerHeight,"px;")}}},$i=(0,S.A)(Hi,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ii,[(0,t.createElementVNode)("ul",Pi,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allData,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[0===e.parent_id?((0,t.openBlock)(),(0,t.createElementBlock)("li",ji,[(0,t.createElementVNode)("a",{title:e.sub_title,href:i.getHref(e),class:(0,t.normalizeClass)("text-white "+i.getActiveCss(e.controller_name,e)),"aria-expanded":"true"},[i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:"js_more fa fa-ellipsis-v pull-right adjustMore",onClick:n[0]||(n[0]=function(e){return i.showHide(e)})})):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("i",{class:(0,t.normalizeClass)(e.icon_css+" fa-icons"),"aria-hidden":"true"},null,2),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(e.name),1)],10,Fi),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("ul",{key:0,class:(0,t.normalizeClass)("js_child btn-toggle-nav list-unstyled fw-normal "+i.getActiveCss(e.controller_name,e))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",null,[(0,t.createElementVNode)("a",{title:e.sub_title,href:i.getHref(e),class:(0,t.normalizeClass)("text-white "+i.getActiveCss(e.controller_name,e))},[(0,t.createElementVNode)("i",{class:(0,t.normalizeClass)(e.icon_css+" fa-icons"),"aria-hidden":"true"},null,2),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(e.name),1)],10,Li)])}),256))],2)):(0,t.createCommentVNode)("v-if",!0)])):(0,t.createCommentVNode)("v-if",!0)],64)}),256))]),n[1]||(n[1]=(0,t.createElementVNode)("hr",null,null,-1)),(0,t.createElementVNode)("div",Ri,[(0,t.createElementVNode)("a",{title:"Open HashtagCms.org",href:i.linkForHashtag,target:"_blank",class:"d-flex align-items-center text-light text-decoration-none","data-bs-toggle":"dropdown","aria-expanded":"false"},[(0,t.createElementVNode)("strong",null,"v"+(0,t.toDisplayString)(o.dataHashtagcmsVersion),1)],8,Ui)])])}]]);function qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var zi={key:0},Ki={class:"sortable-list js_sortable"},Wi=["data-id"],Ji=["innerHTML"],Xi={key:0,class:"inline"},Yi=["for"],Gi=["id"],Zi={class:"child accordion-body js_sortable"},Qi=["data-id"],es={key:1,class:"center-align mt-3"};const ts={components:{"split-button":k},mounted:function(){this.enableSorting()},props:["dataAllData","dataFields","dataControllerName","dataControllerChildName","dataGroups","dataGroupName","dataShowGroups"],data:function(){return{allData:this.dataAllData&&"null"!==this.dataAllData?JSON.parse(this.dataAllData):[],groups:this.dataGroups&&""!==this.dataGroups?JSON.parse(this.dataGroups):[],groupName:this.dataGroupName&&""!==this.dataGroupName?this.dataGroupName:"",showGroups:!(!this.dataShowGroups||"true"!==this.dataShowGroups)}},computed:{fields:function(){var e=this.dataFields&&"null"!==this.dataFields?JSON.parse(this.dataFields):null;return null===e&&((e={}).id="id",e.label="name",e.isImage=!1),e},controllerName:function(){return(void 0===this.dataControllerName?"":this.dataControllerName.toLowerCase()).replace(/\s/g,"")},controlerChildName:function(){return(void 0===this.dataControllerChildName?"":this.dataControllerChildName.toLowerCase()).replace(/\s/g,"")},selectedIndex:function(){for(var e=0,t=0;t<this.groups.length;t++)if(this.groups[t]===this.groupName){e=t;break}return e}},methods:{isParent:function(e){return 0===e.parent_id||!e.parent_id},arrangeAgain:function(e){window.location.href=v.admin_path(this.controllerName+"/sort/"+e.value)},hasChild:function(e){return e.child&&e.child.length>0},getName:function(e){if(!0===this.fields.isImage){var t=e[this.fields.label]?v.get_media(e[this.fields.label]):v.get_media(e.lang[this.fields.label]);return"<a href='".concat(t,"' target='_blank'><img height='30' src='").concat(t,"' /></a>")}return e[this.fields.label]?e[this.fields.label]:e.lang[this.fields.label]},getId:function(e){return e[this.fields.id]},enableSorting:function(){this.$nextTick(function(){document.querySelectorAll(".js_sortable").forEach(function(e){Xn.create(e,{animation:500,ghostClass:"text-danger",onUpdate:function(e){}})})})},submit:function(e,t,n,o){var r=this;return X.show(this,"Please wait. Saving sorting data..."),new Promise(function(a,i){axios[e](t,n).then(function(e){r.onSuccess(e,o)}).catch(function(e){r.onFailure((0,g.safeErrorData)(e))}).finally(function(){X.hide(r)})})},updateIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.querySelectorAll(".item"),n=[],o=this.controllerName,r=!0;""!==this.controlerChildName&&(r=!1),o=!0===e?this.controllerName:""!==this.controlerChildName?this.controlerChildName:this.controllerName;var a=1;console.log("saveAll "+r),t.forEach(function(t,o){if(!0===r){var i=t.getAttribute("data-id"),s=a;n.push({position:s,where:{id:parseInt(i)}}),a+=1}else{var l=t.getAttribute("data-is-parent");if(t.getAttribute("data-id"),e.toString()===l.toString()){var c=t.getAttribute("data-id"),d=a;n.push({position:d,where:{id:parseInt(c)}}),a+=1}}});var i=v.admin_path(o+"/updateIndex");this.submit("post",i,n,o)},onSuccess:function(e,t){J.show(this,t.toUpperCase()+" Sorted.")},onFailure:function(e){J.show(this,(null==e?void 0:e.statusText)||"There is some error! Don't know the reason",5e3),console.log(e)},setData:function(e){this.allData=e}}},ns=(0,S.A)(ts,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("split-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[a.showGroups?((0,t.openBlock)(),(0,t.createElementBlock)("h4",zi,[n[1]||(n[1]=(0,t.createTextVNode)(" Arrange Menus ",-1)),(0,t.createVNode)(s,{"data-options":a.groups,onChange:i.arrangeAgain,"data-selected":i.selectedIndex},null,8,["data-options","onChange","data-selected"])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",Ki,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allData,function(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[i.isParent(e)?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:0,"data-is-parent":"true",class:"item","data-id":i.getId(e)},[(0,t.createElementVNode)("span",{innerHTML:i.getName(e)},null,8,Ji),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Xi,[(0,t.createElementVNode)("label",{for:"item_"+o,class:"accordion-header pull-right"},(r=n[2]||(n[2]=[(0,t.createElementVNode)("span",{class:"fa fa-ellipsis-v ellipsis"},null,-1)]),function(e){if(Array.isArray(e))return qi(e)}(r)||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 qi(e,t);var n={}.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)?qi(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.")}()),8,Yi),(0,t.createElementVNode)("input",{id:"item_"+o,type:"checkbox",class:"accordion-control"},null,8,Gi),(0,t.createElementVNode)("ul",Zi,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{"data-is-parent":"false",class:"item","data-id":i.getId(e)},(0,t.toDisplayString)(i.getName(e)),9,Qi)}),256))])])):(0,t.createCommentVNode)("v-if",!0)],8,Wi)):(0,t.createCommentVNode)("v-if",!0)],64);var r}),256))]),a.allData.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",es,[(0,t.createElementVNode)("input",{type:"button",class:"btn btn-success btn-from-submit",value:"Save",onClick:n[0]||(n[0]=function(e){return i.updateIndex()})})])):(0,t.createCommentVNode)("v-if",!0)])}]]),os=ns;function rs(e){return function(e){if(Array.isArray(e))return as(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 as(e,t);var n={}.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)?as(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 as(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var is=["action"],ss={class:"form-group row"},ls={class:"col-sm-10"},cs={class:"form-group row"},ds={class:"col-sm-7"},us={class:"text text-danger"},hs={class:"form-group row"},fs={class:"col-sm-7"},ms={class:"text text-danger"},ps={class:"form-group row"},gs={class:"col-sm-7"},vs={class:"text text-danger"},ys={class:"form-group row"},bs={class:"col-sm-7"},ws=["value"],Ss={class:"text text-danger"},Es={class:"form-group row"},ks={class:"col-sm-7"},_s={class:"text text-danger"},Cs={class:"form-group row"},Ns={class:"col-sm-7"},Bs={class:"text text-danger"},As={class:"form-group row"},Ds={class:"col-sm-7"},xs={class:"text text-danger"},Vs={key:0},Ts={class:"form-group row"},Ms={class:"col-sm-7"},Os=["value"],Is={class:"col-sm-5"},Ps={key:0,class:"models"},js={class:"form-group row"},Fs={class:"col-sm-7"},Ls=["value"],Rs={key:0,class:"fieldset"},Us={class:"models_row"},Hs={class:"models"},$s=["value","onChange"],qs=["onChange"],zs=["onUpdate:modelValue"],Ks=["onClick"],Ws={key:0,class:"row"},Js={key:1,class:"form-group row"},Xs={class:"col-auto"},Ys={class:"card shadow-sm models-box"},Gs={class:"card-header"},Zs={class:"card-body p-0 m-0 tables_panel"},Qs={class:"list-group list-group-flush"},el=["onClick"],tl={class:"col-auto"},nl={class:"card shadow-sm models-box"},ol={class:"card-header"},rl=["onClick"],al={class:"card-body p-0 m-0 tables_panel"},il={class:"list-group list-group-flush"},sl=["onClick"],ll={key:2,class:"row mt-3"},cl={class:"col"},dl={class:"card shadow-sm"},ul={class:"card-header"},hl={class:"card-body"},fl={id:"selectedFields"},ml=["data-fieldname"],pl=["onClick"],gl={class:"row mt-3"},vl={key:0,class:"alert alert-danger"},yl={class:"form-group center-align"},bl=["href"],wl=__webpack_require__(742),Sl=__webpack_require__.n(wl),El=__webpack_require__(127),kl=__webpack_require__.n(El);function _l(e){return _l="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},_l(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Nl(o.key),o)}}function Nl(e){var t=function(e){if("object"!=_l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_l(t)?t:t+""}var Bl=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"data",get:function(){return{}}},{key:"getFields",value:function(e){return new Promise(function(t,n){Sl().get("getFields?table="+e).then(function(e){t(e)}).catch(function(){n(this)})})}}],null&&Cl(e.prototype,null),t&&Cl(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Al={mounted:function(){},props:["dataDatabaseTables","dataControllerName","dataBackUrl","dataCmsModules"],computed:{saveURL:function(){return v.admin_path(this.dataControllerName+"/createModule")}},data:function(){return{allTables:void 0!==this.dataDatabaseTables?JSON.parse(this.dataDatabaseTables):[],allModules:void 0!==this.dataCmsModules?JSON.parse(this.dataCmsModules):[],mainModel:{tableName:"",fields:[],modelName:"",selected:[]},relationModels:{tableName:"",models:[]},form:new Sr({name:"",controller_name:"",validator_name:"",dataWith:[],dataSource:"",createFiles:!0,selectedFields:[],relationModels:[],parent_id:"",display_name:"",sub_title:"",icon_css:"",list_view_name:"",edit_view_name:""}),errors:{},cacheData:{},sortable:null,sortingInterval:-1,errorMessage:""}},methods:{updateControllerName:function(e){var t=e||this.form.name;t=t.toLowerCase().replace(/\s/g,""),this.form.controller_name=kl().singular(t),this.form.validator_name=this.form.controller_name,void 0!==e&&this.isControllerExists(this.form.controller_name),this.form.icon_css=this.form.controller_name},getModelName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(e=kl().singular(e)+"::class").split("_");return(t=t.map(function(e){return e.charAt(0).toUpperCase()+e.substr(1,e.length)})).join("")},populateMainDataFields:function(){var e=this;""!==this.mainModel.tableName&&(this.mainModel.fields=["Please wait..."],Bl.getFields(this.mainModel.tableName).then(function(t){e.mainModel.fields=t.data}),this.mainModel.modelName=this.getModelName(this.mainModel.tableName),this.form.dataSource=this.mainModel.modelName)},updateWithData:function(){this.form.dataWith=[];for(var e=0;e<this.relationModels.models.length;e++){var t=this.relationModels.models[e];-1===this.form.dataWith.indexOf(t.relationAlias)&&this.form.dataWith.push(t.relationAlias)}},addRelationModel:function(){var e=this;if(""!==this.relationModels.tableName){var t=this.relationModels.tableName,n=this.getModelName(t);if(!1===this.hasInRelationModel(n)){var o;o=t.endsWith("_langs")||t.endsWith("_sites")?t.endsWith("_langs")?"lang":"site":kl().singular(t.replace(/_/g,"")).toLowerCase();var r={model:n,relationAlias:o,relationType:"hasMany",isLanguage:"lang"===o,fields:[],selected:[]};this.cacheData[n]||this.relationModels.models.push(r),this.cacheData[n]=r,this.cacheData[n].fields=["Please wait..."],Bl.getFields(t).then(function(t){e.cacheData[n].fields=t.data}),this.updateWithData()}}},hasInRelationModel:function(e){return this.cacheData[e]||!1},updateRelationModel:function(e,t,n){var o=this.relationModels.models[t][n];this.relationModels.models[t][n]=e.target.value,"relationAlias"===n&&(this.relationModels.models[t].selected=[],this.removeSelectedRelationFields(o)),this.updateWithData()},removeSelectedRelationFields:function(e){if(this.mainModel.selected.length>0){for(var t=[],n=0;n<this.mainModel.selected.length;n++){var o=this.mainModel.selected[n];o.startsWith(e+".")||t.push(o)}this.mainModel.selected=t}},removeRelationModel:function(e,t){var n=this.relationModels.models[e].relationAlias;delete this.cacheData[t],this.relationModels.models.splice(e,1),this.relationModels.tableName="",this.removeSelectedRelationFields(n)},hasRelation:function(){return this.relationModels.models.length>0},hasMainDataSource:function(){return""!==this.mainModel.tableName},selectAllField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e.selected.length)e.selected=e.fields.slice(),""!==t&&(e.selected=e.selected.map(function(e){return t+"."+e}));else for(var n=0;n<e.fields.length;n++)this.selectField(e.fields[n],e,t);this.enableSorting()},selectField:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e=""!==n?n+"."+e:e,-1===t.selected.indexOf(e)&&t.selected.push(e),this.enableSorting()},removeField:function(e,t){e.selected.splice(t,1)},removeAllField:function(e){e.selected=[],this.form.selectedFields=[]},isControllerExists:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==e){var t=this;Sl().get("isControllerExists?name="+e).then(function(e){1===e.data&&J.show(t,"Controller already exist")})}},createModule:function(){var e=this;this.setSortedFields(),this.form.relationModels=this.relationModels,this.form.post(this.saveURL).then(function(t){return e.resetForm(t)}).catch(function(t){return e.showError(t)})},enableSorting:function(){this.$nextTick(function(){null!=this.sortable&&this.sortable.destroy();var e=document.getElementById("selectedFields");this.sortable=Xn.create(e,{onEnd:this.sortingCallback,onStart:this.cancelSortingCallback})})},cancelSortingCallback:function(){-1!==this.sortingInterval&&clearInterval(this.sortingInterval)},sortingCallback:function(){this.cancelSortingCallback()},setSortedFields:function(){var e=document.querySelectorAll("#selectedFields li"),t=e.length;if(t>1){for(var n=[],o=0;o<t;o++){var r=e[o].getAttribute("data-fieldname");n.push(r)}this.form.selectedFields=n}},showError:function(e){for(var t in this.errors={},e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},resetForm:function(e){this.mainModel={tableName:"",fields:[],modelName:"",selected:[]},this.relationModels={tableName:"",models:[]},0===e.created?(J.show(this,"There is some error..."),this.errorMessage=e.message):J.show(this,"Created...")}}},Dl=(0,S.A)(Al,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("form",{action:i.saveURL,class:"form-horizontal",method:"post",role:"form",onKeyup:n[17]||(n[17]=function(e){return i.hideErrorMessage(e)}),onSubmit:n[18]||(n[18]=(0,t.withModifiers)(function(){return i.createModule&&i.createModule.apply(i,arguments)},["prevent"]))},[(0,t.createElementVNode)("div",ss,[(0,t.createElementVNode)("label",ls,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.form.createFiles=e}),type:"checkbox",name:"create-validator"},null,512),[[t.vModelCheckbox,a.form.createFiles]]),n[19]||(n[19]=(0,t.createTextVNode)(" Create Files (Controller/Model/View/Vaidator) - ",-1)),n[20]||(n[20]=(0,t.createElementVNode)("small",{class:"text-info"},"Try creating it from terminal command. It might not work due to rights",-1))])]),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.form.display_name=e}),type:"hidden"},null,512),[[t.vModelText,a.form.display_name]]),(0,t.createElementVNode)("div",cs,[n[21]||(n[21]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Name",-1)),(0,t.createElementVNode)("div",ds,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return a.form.name=e}),class:"form-control",name:"name",placeholder:"Module name",required:"",type:"text",onBlur:n[3]||(n[3]=function(e){return i.updateControllerName()})},null,544),[[t.vModelText,a.form.name]]),(0,t.createElementVNode)("div",us,(0,t.toDisplayString)(this.errors.name),1)])]),(0,t.createElementVNode)("div",hs,[n[22]||(n[22]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Sub Title",-1)),(0,t.createElementVNode)("div",fs,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return a.form.sub_title=e}),class:"form-control",name:"name",placeholder:"Sub title",type:"text"},null,512),[[t.vModelText,a.form.sub_title]]),(0,t.createElementVNode)("div",ms,(0,t.toDisplayString)(this.errors.sub_title),1)])]),(0,t.createElementVNode)("div",ps,[n[23]||(n[23]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Controller Name (link rewrite)",-1)),(0,t.createElementVNode)("div",gs,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[5]||(n[5]=function(e){return a.form.controller_name=e}),class:"form-control",name:"controller_name",placeholder:"Controller name",required:"",type:"text",onBlur:n[6]||(n[6]=function(e){return i.updateControllerName(a.form.controller_name)})},null,544),[[t.vModelText,a.form.controller_name]]),(0,t.createElementVNode)("div",vs,(0,t.toDisplayString)(this.errors.controller_name),1)])]),(0,t.createElementVNode)("div",ys,[n[25]||(n[25]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Parent",-1)),(0,t.createElementVNode)("div",bs,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return a.form.parent_id=e}),class:"form-select select-big"},[n[24]||(n[24]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allModules,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,ws)}),256))],512),[[t.vModelSelect,a.form.parent_id]]),(0,t.createElementVNode)("div",Ss,(0,t.toDisplayString)(this.errors.parent_id),1)])]),(0,t.createElementVNode)("div",Es,[n[26]||(n[26]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Icon CSS",-1)),(0,t.createElementVNode)("div",ks,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[8]||(n[8]=function(e){return a.form.icon_css=e}),class:"form-control",name:"name",placeholder:"Icon CSS",required:"",type:"text"},null,512),[[t.vModelText,a.form.icon_css]]),(0,t.createElementVNode)("div",_s,(0,t.toDisplayString)(this.errors.icon_css),1)])]),(0,t.createElementVNode)("div",Cs,[n[27]||(n[27]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"List View Name",-1)),(0,t.createElementVNode)("div",Ns,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[9]||(n[9]=function(e){return a.form.list_view_name=e}),class:"form-control",name:"name",placeholder:"Enter list view Name (Default list view is common/listing)",type:"text"},null,512),[[t.vModelText,a.form.list_view_name]]),(0,t.createElementVNode)("div",Bs,(0,t.toDisplayString)(this.errors.list_view_name),1)])]),(0,t.createElementVNode)("div",As,[n[28]||(n[28]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Edit View Name",-1)),(0,t.createElementVNode)("div",Ds,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[10]||(n[10]=function(e){return a.form.edit_view_name=e}),class:"form-control",name:"name",placeholder:"Edit list view Name (Default edit view is addedit)",type:"text"},null,512),[[t.vModelText,a.form.edit_view_name]]),(0,t.createElementVNode)("div",xs,(0,t.toDisplayString)(this.errors.edit_view_name),1)])]),a.form.createFiles?((0,t.openBlock)(),(0,t.createElementBlock)("div",Vs,[(0,t.createElementVNode)("div",Ts,[n[30]||(n[30]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Data Source",-1)),(0,t.createElementVNode)("div",Ms,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return a.mainModel.tableName=e}),class:"form-select select-big",onChange:n[12]||(n[12]=function(e){return i.populateMainDataFields()})},[n[29]||(n[29]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allTables,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.name},(0,t.toDisplayString)(e.name),9,Os)}),256))],544),[[t.vModelSelect,a.mainModel.tableName]]),(0,t.createElementVNode)("div",Is,[""!=a.mainModel.tableName?((0,t.openBlock)(),(0,t.createElementBlock)("span",Ps,(0,t.toDisplayString)(i.getModelName(a.mainModel.tableName)),1)):(0,t.createCommentVNode)("v-if",!0)])])]),(0,t.createElementVNode)("div",js,[n[35]||(n[35]=(0,t.createElementVNode)("label",{class:"col-sm-3"},"Data with? Choose another model.",-1)),(0,t.createElementVNode)("div",Fs,[(0,t.withDirectives)((0,t.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return a.relationModels.tableName=e}),class:"form-select select-big",onChange:n[14]||(n[14]=function(e){return i.addRelationModel()})},[n[31]||(n[31]=(0,t.createElementVNode)("option",{value:""},"Select",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allTables,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.name},(0,t.toDisplayString)(e.name),9,Ls)}),256))],544),[[t.vModelSelect,a.relationModels.tableName]]),(0,t.createElementVNode)("div",null,[i.hasRelation()?((0,t.openBlock)(),(0,t.createElementBlock)("fieldset",Rs,[n[34]||(n[34]=(0,t.createElementVNode)("legend",{class:"small legendTitle"},"Relation Models",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.relationModels.models,function(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Us,[(0,t.createElementVNode)("span",Hs,[(0,t.createTextVNode)((0,t.toDisplayString)(e.model)+" ",1),(0,t.createElementVNode)("input",{value:e.relationAlias,name:"relation",placeholder:"Relation name",type:"text",onChange:function(e){return i.updateRelationModel(e,o,"relationAlias")}},null,40,$s),(0,t.createElementVNode)("select",{class:"select",name:"relationType",onChange:function(e){return i.updateRelationModel(e,o,"relationType")}},rs(n[32]||(n[32]=[(0,t.createElementVNode)("option",{value:"hasMany"},"hasMany",-1),(0,t.createElementVNode)("option",{value:"belongsTo"},"belongsTo",-1),(0,t.createElementVNode)("option",{value:"hasOne"},"hasOne",-1)])),40,qs),n[33]||(n[33]=(0,t.createTextVNode)(" isLanguage: ",-1)),(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":function(t){return e.isLanguage=t},type:"checkbox",name:"relationModel"},null,8,zs),[[t.vModelCheckbox,e.isLanguage]]),(0,t.createElementVNode)("span",{class:"small fa fa-close",onClick:function(t){return i.removeRelationModel(o,e.model)}},null,8,Ks)])])}),256))])):(0,t.createCommentVNode)("v-if",!0)])])]),i.hasMainDataSource()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ws,rs(n[36]||(n[36]=[(0,t.createElementVNode)("strong",null,"Click on fields to choose",-1)])))):(0,t.createCommentVNode)("v-if",!0),i.hasMainDataSource()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Js,[(0,t.createElementVNode)("div",Xs,[(0,t.createElementVNode)("div",Ys,[(0,t.createElementVNode)("div",Gs,[(0,t.createElementVNode)("span",{class:"text-small pull-right hand text-success",onClick:n[15]||(n[15]=function(e){return i.selectAllField(a.mainModel)})},"Add all »"),(0,t.createTextVNode)((0,t.toDisplayString)(i.getModelName(a.mainModel.tableName)),1),n[37]||(n[37]=(0,t.createElementVNode)("br",null,null,-1))]),(0,t.createElementVNode)("div",Zs,[(0,t.createElementVNode)("ul",Qs,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.mainModel.fields,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"list-group-item",onClick:function(t){return i.selectField(e,a.mainModel)}},(0,t.toDisplayString)(e),9,el)}),256))])])])]),i.hasRelation()?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(a.relationModels.models,function(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("div",tl,[(0,t.createElementVNode)("div",nl,[(0,t.createElementVNode)("div",ol,[(0,t.createElementVNode)("span",{class:"text-small pull-right hand text-success",onClick:function(t){return i.selectAllField(a.mainModel,e.relationAlias)}},"Add all »",8,rl),(0,t.createTextVNode)((0,t.toDisplayString)(e.model),1),n[38]||(n[38]=(0,t.createElementVNode)("br",null,null,-1)),(0,t.createTextVNode)("->with['"+(0,t.toDisplayString)(e.relationAlias)+"'] ",1)]),(0,t.createElementVNode)("div",al,[(0,t.createElementVNode)("ul",il,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,function(n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"list-group-item",onClick:function(t){return i.selectField(n,a.mainModel,e.relationAlias)}},(0,t.toDisplayString)(n),9,sl)}),256))])])])])}),256)):(0,t.createCommentVNode)("v-if",!0)])):(0,t.createCommentVNode)("v-if",!0),a.mainModel.selected.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",ll,[(0,t.createElementVNode)("div",cl,[(0,t.createElementVNode)("div",dl,[(0,t.createElementVNode)("div",ul,[n[39]||(n[39]=(0,t.createTextVNode)(" Selected Fields ",-1)),(0,t.createElementVNode)("span",{class:"text-small pull-right hand text-danger",onClick:n[16]||(n[16]=function(e){return i.removeAllField(a.mainModel)})},"Remove all")]),(0,t.createElementVNode)("div",hl,[(0,t.createElementVNode)("ul",fl,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.mainModel.selected,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"fields non-selectable","data-fieldname":e},[(0,t.createTextVNode)((0,t.toDisplayString)(e)+" ",1),(0,t.createElementVNode)("span",{class:"small fa fa-close",onClick:function(e){return i.removeField(a.mainModel,n)}},null,8,pl)],8,ml)}),256))])])])])])):(0,t.createCommentVNode)("v-if",!0)])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",gl,[""!==a.errorMessage?((0,t.openBlock)(),(0,t.createElementBlock)("div",vl,(0,t.toDisplayString)(a.errorMessage),1)):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",yl,[n[40]||(n[40]=(0,t.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Cancel",8,bl)])])],40,is)])}]]),xl=Dl;var Vl={key:0,class:"alert alert-info"},Tl={key:1,class:"row"},Ml={class:"form-group center-align"},Ol=["href"],Il=["action"],Pl={class:"checkbox title"},jl={class:"text-info"},Fl={class:"list-unstyled list-permission"},Ll={class:"clearfix"},Rl={key:0,class:"row p-2"},Ul={class:"col"},Hl=["onClick","onUpdate:modelValue","id","data-id"],$l=["for"],ql={class:"col-auto"},zl=["id","onUpdate:modelValue","onClick"],Kl={key:1,class:"list-unstyled clearfix",style:{"margin-left":"20px"}},Wl={class:"clearfix"},Jl={class:"row p-2"},Xl={class:"col"},Yl=["onClick","onUpdate:modelValue","id","data-id"],Gl=["for"],Zl={class:"col-auto"},Ql=["id","onUpdate:modelValue","onClick"],ec={class:"row"},tc={key:0,class:"alert alert-danger"},nc={class:"form-group center-align"},oc=["href"];const rc={mounted:function(){var e=this;this.form.cmsModuleData=this.allModules,this.form.userId=this.userModules.id,this.showSuperAdmin(),H.on("on-paste",function(t){e.handlePaste(t)})},props:["dataCmsModules","dataUserModules","dataControllerName","dataBackUrl","dataIsSuperAdmin"],data:function(){return{userModules:this.dataUserModules?JSON.parse(this.dataUserModules):[],form:new Sr({cmsModuleData:[],userId:0}),selectAllModule:!1,superAdmin:!1,errorMessage:""}},computed:{allModules:function(){var e=this.userModules.cmsmodules,t=this.dataCmsModules?JSON.parse(this.dataCmsModules):[],n=[];if(t.length>0)for(var o=0;o<t.length;o++){var r=t[o],a=c(r);if(r.selected=!!a,r.readonly=1===a.readonly,0===r.parent_id&&r.child.length>0)for(var i=0;i<r.child.length;i++){var s=r.child[i],l=c(s);s.selected=!!l,s.readonly=1===l.readonly}0===r.parent_id&&n.push(r)}return n;function c(t){if(e.length>0){var n=e.find(function(e){return e.module_id.toString()===t.id.toString()});return void 0!==n&&n}return!1}},permissionSaveUrl:function(){return v.admin_path(this.dataControllerName+"/saveModulePermissions")},csrfToken:function(){var e,t;return(null===(e=window.HashtagCms)||void 0===e?void 0:e.csrfToken)||(null===(t=window.Laravel)||void 0===t?void 0:t.csrfToken)}},methods:{handlePaste:function(e){var t;function n(e){for(var n in t){var o=document.getElementById("check_"+e),r=document.getElementById("check_readonly_"+e);if(o&&o.checked)return{selected:!0,readonly:r.checked}}return{selected:!1,readonly:!1}}t=JSON.parse(e),this.form.cmsModuleData.forEach(function(e,t){var o=n(e.id);o.selected&&(e.selected=!0,e.readonly=o.readonly),e.child.length>0&&e.child.forEach(function(e,t){var o=n(e.id);o.selected&&(e.selected=!0,e.readonly=o.readonly)})})},hasChild:function(e){return e.child&&e.child.length>0},isParent:function(e){return 0===e.parent_id},selectReadOnly:function(e,t){var n=t.target.checked;!0!==e.selected&&(e.selected=n)},selectAll:function(){for(var e=!1===this.selectAllModule,t=0;t<this.form.cmsModuleData.length;t++){var n=this.form.cmsModuleData[t];n.selected=e,this.selectMe(n,void 0,e)}},selectMe:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=!1===e.selected;if(null!==n&&(o=n),e.child&&e.child.length>0&&e.child.map(function(e){e.selected=o,o||(e.readonly=!1)}),!0!==o&&(e.readonly=!1),t){var r=t.child.find(function(e){return!0===e.selected});(o||r)&&(t.selected=!0)}!1===o&&(this.selectAllModule=!1)},showSuperAdmin:function(){"1"!==this.dataIsSuperAdmin.toString()&&"true"!==this.dataIsSuperAdmin.toString()||(this.superAdmin=!0)},saveData:function(){var e=this;this.form.post(this.permissionSaveUrl,!1).then(function(t){return e.afterFormSaved(t)}).catch(function(t){return e.afterFormSaved(t)})},afterFormSaved:function(e){!0===e.isSaved?J.show(this,"Saved Successfully. "):J.show(this,"There is some error.")},goBack:function(){window.location=this.dataBackUrl}}},ac=(0,S.A)(rc,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[a.superAdmin?((0,t.openBlock)(),(0,t.createElementBlock)("div",Vl,[(0,t.createElementVNode)("strong",null,(0,t.toDisplayString)(a.userModules.name),1),n[3]||(n[3]=(0,t.createTextVNode)(" is admin or super admin. No need to provide module access. ",-1))])):(0,t.createCommentVNode)("v-if",!0),a.superAdmin?((0,t.openBlock)(),(0,t.createElementBlock)("div",Tl,[(0,t.createElementVNode)("div",Ml,[(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-primary"},"Okay :)",8,Ol)])])):(0,t.createCommentVNode)("v-if",!0),a.superAdmin?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:2,action:i.permissionSaveUrl,class:"form-horizontal",method:"post",role:"form",onSubmit:n[2]||(n[2]=(0,t.withModifiers)(function(){return i.saveData&&i.saveData.apply(i,arguments)},["prevent"]))},[(0,t.createElementVNode)("div",Pl,[(0,t.createElementVNode)("h4",null,[(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return a.selectAllModule=e}),type:"checkbox",onClick:n[1]||(n[1]=function(e){return i.selectAll()})},null,512),[[t.vModelCheckbox,a.selectAllModule]]),n[4]||(n[4]=(0,t.createTextVNode)(" Select ",-1))]),n[5]||(n[5]=(0,t.createTextVNode)(" modules for ",-1)),(0,t.createElementVNode)("span",jl,(0,t.toDisplayString)(a.userModules.name)+" "+(0,t.toDisplayString)(a.userModules.last_name),1)])]),(0,t.createElementVNode)("ul",Fl,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.form.cmsModuleData,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",Ll,[i.isParent(e)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Rl,[(0,t.createElementVNode)("div",Ul,[(0,t.withDirectives)((0,t.createElementVNode)("input",{onClick:function(t){return i.selectMe(e)},class:"form-check-input",type:"checkbox","onUpdate:modelValue":function(t){return e.selected=t},id:"check_"+e.id,"data-id":e.id,"data-is-parent":"true"},null,8,Hl),[[t.vModelCheckbox,e.selected]]),(0,t.createElementVNode)("label",{class:"form-check-label",for:"check_"+e.id}," "+(0,t.toDisplayString)(e.name),9,$l)]),(0,t.createElementVNode)("div",ql,[(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"check_readonly_"+e.id,"onUpdate:modelValue":function(t){return e.readonly=t},type:"checkbox",onClick:function(t){return i.selectReadOnly(e,t)},"data-is-readonly-checkbox":"true"},null,8,zl),[[t.vModelCheckbox,e.readonly]]),n[6]||(n[6]=(0,t.createTextVNode)(" Read Only",-1))])])])):(0,t.createCommentVNode)("v-if",!0),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("ul",Kl,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(o){return(0,t.openBlock)(),(0,t.createElementBlock)("li",Wl,[(0,t.createElementVNode)("div",Jl,[(0,t.createElementVNode)("div",Xl,[(0,t.withDirectives)((0,t.createElementVNode)("input",{onClick:function(t){return i.selectMe(o,e)},class:"form-check-input",type:"checkbox","onUpdate:modelValue":function(e){return o.selected=e},id:"check_"+o.id,"data-id":o.id,"data-is-parent":"false"},null,8,Yl),[[t.vModelCheckbox,o.selected]]),(0,t.createElementVNode)("label",{class:"form-check-label",for:"check_"+o.id,"data-is-readonly":"true"}," "+(0,t.toDisplayString)(o.name),9,Gl)]),(0,t.createElementVNode)("div",Zl,[(0,t.createElementVNode)("label",null,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"check_readonly_"+o.id,"onUpdate:modelValue":function(e){return o.readonly=e},type:"checkbox",onClick:function(e){return i.selectReadOnly(o,e,!0)},"data-is-readonly-checkbox":"true"},null,8,Ql),[[t.vModelCheckbox,o.readonly]]),n[7]||(n[7]=(0,t.createTextVNode)(" Read Only",-1))])])])])}),256))])):(0,t.createCommentVNode)("v-if",!0)])}),256))]),(0,t.createElementVNode)("div",ec,[""!==a.errorMessage?((0,t.openBlock)(),(0,t.createElementBlock)("div",tc,(0,t.toDisplayString)(a.errorMessage),1)):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",nc,[n[8]||(n[8]=(0,t.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,t.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Back",8,oc)])])],40,Il))])}]]);var ic={class:"row"},sc={class:"col-auto"},lc={key:0,class:"counters"},cc={class:"col-auto"},dc={key:0,class:"shadow-sm"},uc={class:"pagination"},hc=["href","innerHTML"],fc={key:0,class:"col float-end"},mc={class:"pull-right",style:{"margin-right":"16px"}};const pc={components:{"download-button":Qn},mounted:function(){this.updatePageParams();var e=this;H.on("pagination-on-delete",function(){e.decreaseCounter()})},props:["dataPaginator","dataFirstItem","dataLastItem","dataTotal","dataControllerName","dataNextLabel","dataPreviousLabel","dataShowDownload"],data:function(){return{totalCount:parseInt(this.dataTotal),lastItem:parseInt(this.dataLastItem),controllerName:this.dataControllerName,paginator:JSON.parse(this.dataPaginator),pageLabel:{"pagination.next":this.dataNextLabel,"pagination.previous":this.dataPreviousLabel},showDownload:"true"===this.dataShowDownload||"1"===this.dataShowDownload}},computed:{hasPreviousPage:function(){return null!=this.paginator.prev_page_url},allPages:function(){return this.paginator.links},showPagination:function(){return this.allPages.length>3}},methods:{decreaseCounter:function(){this.totalCount=this.totalCount-1,this.lastItem=this.lastItem-1},getLink:function(e){return null==e.url?"javascript:void(0)":e.url},getLabel:function(e){return this.pageLabel[e]?this.pageLabel[e]:e},getCss:function(e){return null==e.url?"page-item disabled":!0===e.active?"page-item active":"page-item"},updatePageParams:function(){var e=window.location.search.substring(1);null!=e.match(/page=\d+/gi)&&(e=e.replace(/page=\d+/,"")),""!==e&&(e=0===e.indexOf("&")?e:"&"+e,document.querySelectorAll(".pagination a").forEach(function(t,n){var o=t.href;o=(o=(o=o+""+e).replace(/&$/,"")).replace(/&&/,"&"),t.href=o}))}}},gc=(0,S.A)(pc,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("download-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",ic,[(0,t.createElementVNode)("div",sc,[a.totalCount>0?((0,t.openBlock)(),(0,t.createElementBlock)("span",lc,(0,t.toDisplayString)(o.dataFirstItem)+" - "+(0,t.toDisplayString)(a.lastItem)+" of "+(0,t.toDisplayString)(a.totalCount),1)):(0,t.createCommentVNode)("v-if",!0)]),(0,t.createElementVNode)("div",cc,[i.showPagination?((0,t.openBlock)(),(0,t.createElementBlock)("nav",dc,[(0,t.createElementVNode)("ul",uc,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.allPages,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",{class:(0,t.normalizeClass)(i.getCss(e))},[(0,t.createElementVNode)("a",{class:"page-link",href:i.getLink(e),innerHTML:i.getLabel(e.label)},null,8,hc)],2)}),256))])])):(0,t.createCommentVNode)("v-if",!0)]),a.totalCount>0&&a.showDownload?((0,t.openBlock)(),(0,t.createElementBlock)("div",fc,[(0,t.createElementVNode)("span",mc,[(0,t.createVNode)(s,{"data-controller-name":a.controllerName},null,8,["data-controller-name"])])])):(0,t.createCommentVNode)("v-if",!0)])}]]);var vc=["name","id","multiple"],yc=["value"],bc={class:"fa fa-refresh fa-spin","aria-hidden":"true"};const wc={components:{"split-button":k},props:["dataName","dataId","dataPlatforms","dataSelected","dataMultiple","dataSiteId","dataFetchOnInit"],mounted:function(){!1!==this.fetchOnInit&&this.init(),console.log("selected ",this.selected),H.$on("site_changed",this.populatePlatform)},computed:{selected:{get:function(){return void 0===this.dataMultiple||"true"!==this.dataMultiple?void 0===this.dataSelected?1:parseInt(this.dataSelected):void 0===this.dataSelected?[1]:JSON.parse(this.dataSelected)},set:function(e){return e}}},data:function(){return{platforms:void 0===this.dataPlatforms?[]:JSON.parse(this.dataPlatforms),name:void 0===this.dataName?"platform_id":this.dataName,id:void 0===this.dataId?"platform_id":this.dataId,multiple:void 0===this.dataMultiple?"":"multiple='multiple'",siteId:void 0===this.dataSiteId?1:parseInt(this.dataSiteId),fetchOnInit:void 0!==this.dataFetchOnInit&&"false"!==this.dataFetchOnInit&&this.dataFetchOnInit,isLoading:!1,selectedValue:this.selected}},methods:{init:function(){this.populatePlatform(this.siteId)},setPlatform:function(){H.$emit("platform_changed",this.selected)},populatePlatform:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e||""===e)return this.platforms=[],!1;this.isLoading=!0;var t=this,n=v.admin_path("ajax/getInfo/site/"+e);axios.get(n).then(function(e){t.platforms=e.data.results.platform,t.isLoading=!1}).catch(function(e){console.error(e.data)})}}},Sc=(0,S.A)(wc,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:a.name,id:a.id,onChange:n[0]||(n[0]=function(){return i.setPlatform&&i.setPlatform.apply(i,arguments)}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return i.selected=e}),multiple:"true"==o.dataMultiple&&a.multiple},[n[2]||(n[2]=(0,t.createElementVNode)("option",{value:""},"Select Platform",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.platforms,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,yc)}),256))],40,vc),[[t.vModelSelect,i.selected]]),(0,t.withDirectives)((0,t.createElementVNode)("i",bc,null,512),[[t.vShow,a.isLoading]])])}]]);var Ec=["name","id"],kc=["value"];const _c={components:{"split-button":k},props:["dataName","dataId","dataSites","dataSelected"],mounted:function(){},data:function(){return{sites:void 0===this.dataSites?[]:JSON.parse(this.dataSites),selected:void 0===this.dataSelected?1:parseInt(this.dataSelected),name:void 0===this.dataName?"site_id":this.dataName,id:void 0===this.dataId?"site_id":this.dataId}},methods:{setSite:function(){H.$emit("site_changed",this.selected)}}},Cc=(0,S.A)(_c,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("select",{name:a.name,id:a.id,onChange:n[0]||(n[0]=function(){return i.setSite&&i.setSite.apply(i,arguments)}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.selected=e})},[n[2]||(n[2]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(e.name),9,kc)}),256))],40,Ec),[[t.vModelSelect,a.selected]])])}]]);function Nc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Bc={class:"row"},Ac={class:"form-group"},Dc={class:"col-sm-4"},xc=["value"],Vc={class:"row margin-top-20"},Tc={class:"form-group"},Mc={class:"col-sm-4"},Oc=["value"],Ic={class:"row margin-top-20"},Pc={class:"form-group"},jc={class:"col-sm-4"},Fc={class:"alert alert-info text-center"},Lc={class:"alert alert-info"};const Rc={mounted:function(){},created:function(){},props:["dataAllSites"],data:function(){return{allSites:void 0===this.dataAllSites?[]:JSON.parse(this.dataAllSites),sourceSiteId:"",targetSiteId:"",isLoading:!1,errorMsg:"",successMsg:[]}},computed:{errorMessage:function(){return""===this.errorMsg?"It's undoable. Please be careful.":this.errorMsg}},methods:{getLabel:function(e){var t="";return e.name||e.alias?t=e.name||e.alias:e.lang&&(t=void 0===e.lang.name?"":e.lang.name),t},loading:function(e){this.isLoading=e},cloneSite:function(){var e=this;console.log("copying now..."),this.loading(1);var t=this,n={sourceSiteId:this.sourceSiteId,tagetSiteId:this.targetSiteId},o=v.admin_path("site/cloneSite");axios.post(o,n).then(function(n){console.log(n),function(e){var n=e.data;t.successMsg=n}(n),e.loading(2)}).catch(function(n){console.log("Error: ",n.response),t.errorMsg=n.response?n.response.data.message:n.message,e.loading(0)})},doAction:function(){this.cloneSite()}}},Uc=(0,S.A)(Rc,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createElementVNode)("div",Bc,[(0,t.createElementVNode)("div",Ac,[n[4]||(n[4]=(0,t.createElementVNode)("div",{class:"col-sm-2"},"Copy From:",-1)),(0,t.createElementVNode)("div",Dc,[(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.sourceSiteId=e})},[n[3]||(n[3]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(i.getLabel(e)),9,xc)}),256))],512),[[t.vModelSelect,a.sourceSiteId]])])])]),(0,t.createElementVNode)("div",Vc,[(0,t.createElementVNode)("div",Tc,[n[6]||(n[6]=(0,t.createElementVNode)("div",{class:"col-sm-2"},"Copy To:",-1)),(0,t.createElementVNode)("div",Mc,[(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select","onUpdate:modelValue":n[1]||(n[1]=function(e){return a.targetSiteId=e})},[n[5]||(n[5]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(i.getLabel(e)),9,Oc)}),256))],512),[[t.vModelSelect,a.targetSiteId]])])])]),(0,t.createElementVNode)("div",Ic,[(0,t.createElementVNode)("div",Pc,[n[8]||(n[8]=(0,t.createElementVNode)("div",{class:"col-sm-2"}," ",-1)),(0,t.createElementVNode)("div",jc,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"alert alert-danger text-center"},(0,t.toDisplayString)(i.errorMessage),513),[[t.vShow,""!=a.errorMsg&&!a.isLoading]]),(0,t.withDirectives)((0,t.createElementVNode)("div",Fc,(s=n[7]||(n[7]=[(0,t.createElementVNode)("span",{class:"fa fa-spinner fa-pulse fa-fw"}," ",-1),(0,t.createTextVNode)(" Please wait and don't close this window. It's not running in thread :) ",-1)]),function(e){if(Array.isArray(e))return Nc(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 Nc(e,t);var n={}.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)?Nc(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.")}()),512),[[t.vShow,1==a.isLoading]]),(0,t.withDirectives)((0,t.createElementVNode)("div",Lc,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.successMsg,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",null,[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(!1===e.success?"text-danger":"")},(0,t.toDisplayString)(e.message),3)])}),256))])],512),[[t.vShow,a.isLoading>1]]),(0,t.createElementVNode)("input",{onClick:n[2]||(n[2]=function(e){return i.doAction()}),type:"button",name:"submit",value:"Copy Now!",class:"btn btn-block btn-success"})])])])]);var s}]]);var Hc={class:"col mt-2"},$c={class:"mb-2"},qc=["value"],zc={class:"row"},Kc={class:"col col-4"},Wc={class:"card border-0"},Jc={class:"card-header"},Xc={class:"card-title m-0",style:{"line-height":"inherit"}},Yc={class:"badge text-bg-secondary"},Gc={class:"card-body p-2"},Zc={key:0,class:"card-subtitle mb-2 text-muted"},Qc={class:"inline"},ed={key:1,class:"panel-sub-heading",style:{padding:"4px"}},td={class:"input-group"},nd={class:"list-group"},od={class:"list-group-item"},rd={class:"normal"},ad=["onUpdate:modelValue"],id={class:"col col-4"},sd={class:"card border-0"},ld={key:0,class:"card-body p-0"},cd=["innerHTML"],dd={class:"card-header"},ud={class:"card-title text-success m-0",style:{"line-height":"inherit"}},hd={class:"badge text-bg-secondary"},fd={class:"card-body"},md={key:0,class:"card-subtitle mb-2 text-muted"},pd={class:"inline"},gd={class:"list-group"},vd={class:"list-group-item"},yd={class:"normal"},bd=["onUpdate:modelValue"];const wd={mounted:function(){},created:function(){},props:["dataMessage","dataAllData","dataSiteData","dataCurrentKey","dataSiteId","dataDefaultActionForSave","dataAlertCss","dataControllerName"],data:function(){return{siteData:void 0===this.dataSiteData||""===this.dataSiteData?[]:JSON.parse(this.dataSiteData),allData:void 0===this.dataAllData||""===this.dataAllData?[]:JSON.parse(this.dataAllData),currentKey:this.dataCurrentKey,searchKey:"",siteId:parseInt(this.dataSiteId),message:void 0===this.dataMessage?"":this.dataMessage,defaultActionForSave:void 0===this.dataDefaultActionForSave?"saveSettings":this.dataDefaultActionForSave,alertCss:void 0===this.dataAlertCss||""===this.dataAlertCss?"alert alert-info":this.dataAlertCss,controllerName:void 0===this.dataControllerName?"site":this.dataControllerName}},computed:{title:function(){return this.allData.label},total:function(){return this.allData.data?this.allData.data.length:0},selectedTotal:function(){return null==this.siteData?0:this.siteData.length},showSearch:function(){return this.allData.data&&this.allData.data.length>10}},methods:{saveNow:function(e,t){var n=this;return X.show(this,"Please wait. Making Changes..."),new Promise(function(o,r){axios.post(e,t).then(function(e){o(e)}).catch(function(e){r((0,g.safeErrorData)(e))}).finally(function(){X.hide(n)})})},doAction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add",t=this,n="add"===e?this.allData.data:this.siteData,o=[],r=[];if(n&&n.length>0){if(n.forEach(function(e){!0===e.selected&&(o.push(e.id),r.push(e))}),"function"==typeof this.defaultActionForSave)return this.defaultActionForSave(e,n,r,o),!1;if(o.length>0){var a={};a.key=this.currentKey,a.ids=o,a.site_id=this.siteId,a.action=e,this.saveNow(v.admin_path(this.controllerName+"/"+this.defaultActionForSave),a).then(function(n){!function(n){console.log(n),"add"===e?r.forEach(function(e){var n=e.id;-1===t.siteData.findIndex(function(e){return e.id===n})&&t.siteData.push(e)}):r.forEach(function(e){var n=e.id,o=t.siteData.findIndex(function(e){return e.id===n});-1!==o&&t.siteData.splice(o,1)})}(n)}).catch(function(e){var n;console.error("error: ",e),J.show(t,(null==e||null===(n=e.data)||void 0===n?void 0:n.message)||"I don't know what went wrong.",5e3)})}}},selectAllData:function(e,t){var n="table"===e?this.allData.data:this.siteData,o=t.checked;n&&n.length>0&&n.forEach(function(e){e.selected=o})},getLabel:function(e){return e.lang?void 0===e.lang.name?"":e.lang.name:e.name||e.alias||""},getLabelForSite:function(e){if(void 0!==e.name||void 0!==e.alias)return e.name||e.alias;if(e.lang)return void 0===e.lang.name?"":e.lang.name;if(this.allData.data&&this.allData.data.length>0){var t=this.allData.data.findIndex(function(t){return t.id===e.id||void 0!==e.link_rewrite&&e.link_rewrite===t.link_rewrite});return-1===t?"":this.getLabel(this.allData.data[t])}return""},filterData:function(){var e=this,t=this.searchKey;return""!==t&&null!=t?(t=t.toLowerCase(),this.allData.data.filter(function(n){return e.getLabel(n).toLowerCase().includes(t)||n.id===t})):this.allData.data},setData:function(e,t){this.allData[e]=t},setSiteData:function(e){this.siteData={},this.siteData=e}}},Sd=(0,S.A)(wd,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Kc,[(0,t.createElementVNode)("div",Wc,[(0,t.createElementVNode)("div",Jc,[(0,t.createElementVNode)("h5",Xc,[(0,t.createTextVNode)(" Available "+(0,t.toDisplayString)(i.title)+" ",1),(0,t.createElementVNode)("span",Yc,(0,t.toDisplayString)(i.total),1),(0,t.createElementVNode)("button",{type:"button",title:"Add Selected",onClick:n[0]||(n[0]=function(e){return i.doAction("add")}),class:"hand pull-right btn btn-sm btn-primary"}," Add Selected ")])]),(0,t.createElementVNode)("div",Gc,[i.total>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",Zc,[(0,t.createElementVNode)("label",Qc,[(0,t.createElementVNode)("input",{type:"checkbox",onClick:n[1]||(n[1]=function(e){return i.selectAllData("table",e.target)})}),n[5]||(n[5]=(0,t.createTextVNode)(" Select All",-1))])])):(0,t.createCommentVNode)("v-if",!0),i.showSearch?((0,t.openBlock)(),(0,t.createElementBlock)("div",ed,[(0,t.createElementVNode)("div",td,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"text",placeholder:"Search",class:"form-control","aria-describedby":"basic-addon3","onUpdate:modelValue":n[2]||(n[2]=function(e){return a.searchKey=e})},null,512),[[t.vModelText,a.searchKey]])])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",nd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.filterData(),function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",od,[(0,t.createElementVNode)("label",rd,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":function(t){return e.selected=t}},null,8,ad),[[t.vModelCheckbox,e.selected]]),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(i.getLabel(e)),1)])])}),256))])])])]),(0,t.createElementVNode)("div",id,[(0,t.createElementVNode)("div",sd,[a.message.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",ld,[(0,t.createElementVNode)("small",{class:(0,t.normalizeClass)(a.alertCss),innerHTML:a.message,style:{display:"block"}},null,10,cd)])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",dd,[(0,t.createElementVNode)("h5",ud,[(0,t.createTextVNode)(" Added "+(0,t.toDisplayString)(i.title)+" ",1),(0,t.createElementVNode)("span",hd,(0,t.toDisplayString)(i.selectedTotal),1),(0,t.createElementVNode)("button",{title:"Remove Selected",onClick:n[3]||(n[3]=function(e){return i.doAction("remove")}),class:"btn btn-sm btn-danger pull-right"}," Remove Selected ")])]),(0,t.createElementVNode)("div",fd,[i.selectedTotal>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",md,[(0,t.createElementVNode)("label",pd,[(0,t.createElementVNode)("input",{type:"checkbox",onClick:n[4]||(n[4]=function(e){return i.selectAllData("sitewise",e.target)})}),n[6]||(n[6]=(0,t.createTextVNode)(" Select All",-1))])])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("ul",gd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.siteData,function(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)("li",vd,[(0,t.createElementVNode)("label",yd,[(0,t.withDirectives)((0,t.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":function(t){return e.selected=t}},null,8,bd),[[t.vModelCheckbox,e.selected]]),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(i.getLabelForSite(e)),1)])])}),256))])])])])],64)}]]),Ed=Sd,kd={mounted:function(){},components:{"site-wise":Ed},created:function(){},props:["dataAllSites","dataMessage","dataAllData","dataSiteData","dataCurrentKey","dataSiteId","dataAlertCss","dataControllerName"],data:function(){return{allSites:void 0===this.dataAllSites?[]:JSON.parse(this.dataAllSites),siteData:void 0===this.dataSiteData||""===this.dataSiteData?[]:JSON.parse(this.dataSiteData),allData:void 0===this.dataAllData||""===this.dataAllData?[]:JSON.parse(this.dataAllData),currentKey:this.dataCurrentKey,searchKey:"",siteId:parseInt(this.dataSiteId),currentSite:"",controllerName:void 0===this.dataControllerName?"site":this.dataControllerName}},methods:{showHdeLoader:function(e){e?X.show(this,"Please wait..."):X.hide(this)},saveNow:function(e,t){return new Promise(function(n,o){axios.post(e,t).then(function(e){n(e)}).catch(function(e){o((0,g.safeErrorData)(e))})})},getLabel:function(e){var t="";return e.name||e.alias?t=e.name||e.alias:e.lang&&(t=void 0===e.lang.name?"":e.lang.name),t},populateData:function(e){this.allData=e,this.$refs.siteWiseComponent.setData("data",e)},getBySite:function(){var e=this;if(""!==this.currentSite){var t=this.currentKey,n=v.admin_path(this.controllerName+"/getBySite/"+this.currentSite+"/"+t);this.showHdeLoader(!0),axios.get(n).then(function(t){e.populateData(t.data)}).catch(function(e){console.error("getBySite error:",(0,g.safeErrorData)(e))}).finally(function(){e.showHdeLoader(!1)})}else this.populateData([])},actionAdd:function(e,t,n){var o=this;console.log("copying now...");var r=this,a={fromSite:{site_id:this.currentSite,data:t},toSite:{site_id:this.siteId},type:this.currentKey};this.showHdeLoader(!0);var i=v.admin_path(this.controllerName+"/copySettings");axios.post(i,a).then(function(e){console.log(e),function(e){var t=e.data;if(!1===t.inserted)J.show(r,t.message||"Nothing happened.",5e3);else{var n=t.ignored,o=t.copied;r.$refs.siteWiseComponent.setSiteData(t.siteData);var a="".concat(o.length," Copied and ").concat(n.length," ignored. Open console for details");J.show(r,a,7e3),console.info("Copied: ",o),console.info("Ignored: ",n)}}(e)}).catch(function(e){console.error("actionAdd error:",(0,g.safeErrorData)(e))}).finally(function(){o.showHdeLoader(!1)})},actionRemove:function(e,t,n){var o=this,r=t.length>0?t[0].site_id:null;if(null===r)return!1;var a=this,i={site_id:r,ids:n,type:this.currentKey},s=v.admin_path(this.controllerName+"/removeSettings");this.showHdeLoader(!0),axios.post(s,i).then(function(e){!function(e){var t=e.data;0===t.deleted&&J.show(a,"Sorry!, Somehow it's not deleted.",5e3),a.$refs.siteWiseComponent.setSiteData(t.siteData)}(e)}).catch(function(e){console.error("actionRemove error:",(0,g.safeErrorData)(e))}).finally(function(){o.showHdeLoader(!1)})},doAction:function(e,t,n,o){"add"===e?this.actionAdd(t,n,o):this.actionRemove(t,n,o)}}},_d=(0,S.A)(kd,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("site-wise");return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Hc,[(0,t.createElementVNode)("div",$c,[n[3]||(n[3]=(0,t.createTextVNode)(" Copy From: ",-1)),(0,t.withDirectives)((0,t.createElementVNode)("select",{class:"form-select inline width-auto",onChange:n[0]||(n[0]=function(e){return i.getBySite()}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return a.currentSite=e})},[n[2]||(n[2]=(0,t.createElementVNode)("option",{value:""},"Select Site",-1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.allSites,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("option",{value:e.id},(0,t.toDisplayString)(i.getLabel(e)),9,qc)}),256))],544),[[t.vModelSelect,a.currentSite]])])]),(0,t.createElementVNode)("div",zc,[(0,t.createVNode)(s,{ref:"siteWiseComponent","data-message":o.dataMessage,"data-site-data":JSON.stringify(a.siteData),"data-all-data":JSON.stringify(a.allData),"data-current-key":a.currentKey,"data-site-id":a.siteId,"data-default-action-for-save":i.doAction,"data-alert-css":o.dataAlertCss},null,8,["data-message","data-site-data","data-all-data","data-current-key","data-site-id","data-default-action-for-save","data-alert-css"])])],64)}]]);var Cd={id:"sortableField"},Nd={class:"parent"},Bd={key:0,class:"js_more fa fa-ellipsis-v pull-right adjustMore"},Ad={class:"text"},Dd={key:0},xd={class:"text"};const Vd={mounted:function(){this.enableSorting(),console.log(this.controllerName)},props:["dataAllModules","dataControllerName"],data:function(){return{allData:this.dataAllModules&&"null"!=this.dataAllModules?JSON.parse(this.dataAllModules):[],sortable:null,sortingInterval:-1,updateIndexUrl:v.admin_path(this.controllerName+"/updateIndex"),lastTarget:""}},computed:{controllerName:function(){return(void 0===this.dataControllerName?"":this.dataControllerName.toLocaleLowerCase()).replace(/\s/g,"")}},methods:{hasChild:function(e){return e.child.length>0},hideAll:function(){document.querySelectorAll(".sortElem .parent").forEach(function(e){e.classList.remove("active")})},showHide:function(e){var t=e.target;t.parentElement.parentElement.parentElement!=this.lastTarget?(this.hideAll(),t.classList.contains("js_more")&&(e.preventDefault(),t.parentElement.parentElement.parentElement.classList.add("active","animated","fadeIn")),this.lastTarget=t.parentElement.parentElement.parentElement):t.parentElement.parentElement.parentElement.classList.contains("active")?t.parentElement.parentElement.parentElement.classList.remove("active"):t.parentElement.parentElement.parentElement.classList.add("active")},getActiveCss:function(e,t){return this.isActive(e,t)?"active":""},isActive:function(e,t){if(this.controllerName==e)return!0;if(t&&t.child&&t.child.length>0){var n=this.controllerName;return t.child.find(function(e){return e.controller_name==n})}},enableSorting:function(){this.$nextTick(function(){null!=this.sortable&&this.sortable.destroy();var e=document.getElementById("sortableField");this.sortable=Xn.create(e,{onEnd:this.sortingCallback,onStart:this.cancelSortingCallback})})},cancelSortingCallback:function(){-1!=this.sortingInterval&&clearInterval(this.sortingInterval)},sortingCallback:function(e){var t=this,n=[];document.querySelectorAll(".sortElem .parent").forEach(function(e,o){for(var r=e.children[0].children[0].innerText,a=0;a<t.allData.length;a++)0==t.allData[a].module_pid&&t.allData[a].name==r&&(n[a]={},n[a].id=t.allData[a].id,n[a].position=o,n[a].name=t.allData[a].name)}),this.updateIndex(n),this.cancelSortingCallback()},submit:function(e,t,n){var o=this;return new Promise(function(r,a){axios[e](t,n).then(function(e){o.onSuccess(e)}).catch(function(e){o.onFailure((0,g.safeErrorData)(e))})})},updateIndex:function(e){var t=this;this.submit("post",this.updateIndexUrl,e).then(function(e){return t.onSuccess(e)}).catch(function(e){return t.onFailure(e)})},onSuccess:function(e){J.show(this,"Modules Sorted.")},onFailure:function(e){console.log(e)}}},Td=(0,S.A)(Vd,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"sortElem",onClick:n[0]||(n[0]=function(e){return i.showHide(e)})},[(0,t.createElementVNode)("ul",Cd,[0==e.current.module_pid?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(a.allData,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",Nd,[(0,t.createElementVNode)("h3",null,[(0,t.createElementVNode)("a",null,[i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("i",Bd)):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("span",Ad,(0,t.toDisplayString)(e.name),1)])]),i.hasChild(e)?((0,t.openBlock)(),(0,t.createElementBlock)("ul",Dd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.child,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("li",null,[(0,t.createElementVNode)("a",null,[(0,t.createElementVNode)("span",xd,(0,t.toDisplayString)(e.name),1)])])}),256))])):(0,t.createCommentVNode)("v-if",!0)])}),256)):(0,t.createCommentVNode)("v-if",!0)])])}]]);function Md(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Od={class:"clearfix"},Id={key:0,class:"row"},Pd=["id"],jd={class:"table border shadow-sm mt-2 table-grid"},Fd=["innerHTML"],Ld=["innerHTML"],Rd={key:1,class:"table border shadow-sm mt-2 table-grid"},Ud=["id"],Hd=["innerHTML"],$d=["innerHTML"],qd={class:"text-danger"},zd={class:"row"},Kd={class:"col-auto"},Wd={class:"form-check pt-2"},Jd={class:"col-auto"},Xd={key:1,class:"row"},Yd={class:"col"},Gd=["innerHTML"];const Zd={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Qd=e=>1e3*e,eu=e=>e/1e3,tu=()=>{},nu=e=>e;function ou(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const ru=e=>e(),au=(e,t,n=Zd.duration)=>new Proxy({animations:e.map(ru).filter(Boolean),duration:n,options:t},iu),iu={get:(e,t)=>{const n=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return eu((null==n?void 0:n[t])||0);case"playbackRate":case"playState":return null==n?void 0:n[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(su)).catch(tu)),e.finished;case"stop":return()=>{e.animations.forEach(e=>ou(e))};case"forEachNative":return t=>{e.animations.forEach(n=>t(n,e))};default:return void 0===(null==n?void 0:n[t])?void 0:()=>e.animations.forEach(e=>e[t]())}},set:(e,t,n)=>{switch(t){case"currentTime":n=Qd(n);case"playbackRate":for(let o=0;o<e.animations.length;o++)e.animations[o][t]=n;return!0}return!1}},su=e=>e.finished,lu=e=>"object"==typeof e&&Boolean(e.createAnimation),cu=e=>"number"==typeof e,du=e=>Array.isArray(e)&&!cu(e[0]),uu=(e,t,n)=>-n*e+n*t+e,hu=(e,t,n)=>t-e===0?1:(n-e)/(t-e);function fu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=hu(0,t,o);e.push(uu(n,1,r))}}const mu=(e,t,n)=>Math.min(Math.max(n,e),t);const pu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function gu(e,t,n,o){if(e===t&&n===o)return nu;return r=>0===r||1===r?r:pu(function(e,t,n,o,r){let a,i,s=0;do{i=t+(n-t)/2,a=pu(i,o,r)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++s<12);return i}(r,0,1,e,n),t,o)}const vu=e=>"function"==typeof e,yu=e=>Array.isArray(e)&&cu(e[0]),bu={ease:gu(.25,.1,.25,1),"ease-in":gu(.42,0,1,1),"ease-in-out":gu(.42,0,.58,1),"ease-out":gu(0,0,.58,1)},wu=/\((.*?)\)/;function Su(e){if(vu(e))return e;if(yu(e))return gu(...e);const t=bu[e];if(t)return t;if(e.startsWith("steps")){const t=wu.exec(e);if(t){const e=t[1].split(",");return((e,t="end")=>n=>{const o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,r="end"===t?Math.floor(o):Math.ceil(o);return mu(0,1,r/e)})(parseFloat(e[0]),e[1].trim())}}return nu}class Eu{constructor(e,t=[0,1],{easing:n,duration:o=Zd.duration,delay:r=Zd.delay,endDelay:a=Zd.endDelay,repeat:i=Zd.repeat,offset:s,direction:l="normal",autoplay:c=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=nu,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((e,t)=>{this.resolve=e,this.reject=t}),n=n||Zd.easing,lu(n)){const e=n.createAnimation(t);n=e.easing,t=e.keyframes||t,o=e.duration||o}this.repeat=i,this.easing=du(n)?nu:Su(n),this.updateDuration(o);const d=function(e,t=function(e){const t=[0];return fu(t,e-1),t}(e.length),n=nu){const o=e.length,r=o-t.length;return r>0&&fu(t,r),r=>{let a=0;for(;a<o-2&&!(r<t[a+1]);a++);let i=mu(0,1,hu(t[a],t[a+1],r));const s=function(e,t){return du(e)?e[((e,t,n)=>{const o=t-0;return((n-0)%o+o)%o+0})(0,e.length,t)]:e}(n,a);return i=s(i),uu(e[a],e[a+1],i)}}(t,s,du(n)?n.map(Su):nu);this.tick=t=>{var n;let o=0;o=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=o,o/=1e3,o=Math.max(o-r,0),"finished"===this.playState&&void 0===this.pauseTime&&(o=this.totalDuration);const i=o/this.duration;let s=Math.floor(i),c=i%1;!c&&i>=1&&(c=1),1===c&&s--;const u=s%2;("reverse"===l||"alternate"===l&&u||"alternate-reverse"===l&&!u)&&(c=1-c);const h=o>=this.totalDuration?1:Math.min(c,1),f=d(this.easing(h));e(f),void 0===this.pauseTime&&("finished"===this.playState||o>=this.totalDuration+a)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,f)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},c&&this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class ku{setAnimation(e){this.animation=e,null==e||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const _u=new WeakMap;function Cu(e){return _u.has(e)||_u.set(e,{transforms:[],values:new Map}),_u.get(e)}const Nu=["","X","Y","Z"],Bu={x:"translateX",y:"translateY",z:"translateZ"},Au={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},Du={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Au,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:nu},skew:Au},xu=new Map,Vu=e=>`--motion-${e}`,Tu=["x","y","z"];["translate","scale","rotate","skew"].forEach(e=>{Nu.forEach(t=>{Tu.push(e+t),xu.set(Vu(e+t),Du[e])})});const Mu=(e,t)=>Tu.indexOf(e)-Tu.indexOf(t),Ou=new Set(Tu),Iu=e=>Ou.has(e),Pu=(e,t)=>`${e} ${t}(var(${Vu(t)}))`,ju=e=>e.startsWith("--"),Fu=new Set,Lu=(e,t)=>document.createElement("div").animate(e,t),Ru={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Lu({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(Lu({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Lu({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},Uu={},Hu={};for(const e in Ru)Hu[e]=()=>(void 0===Uu[e]&&(Uu[e]=Ru[e]()),Uu[e]);const $u=(e,t)=>vu(e)?Hu.linearEasing()?`linear(${((e,t)=>{let n="";const o=Math.round(t/.015);for(let t=0;t<o;t++)n+=e(hu(0,o-1,t))+", ";return n.substring(0,n.length-2)})(e,t)})`:Zd.easing:yu(e)?qu(e):e,qu=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`;function zu(e){return Bu[e]&&(e=Bu[e]),Iu(e)?Vu(e):e}const Ku=(e,t,n)=>{t=zu(t),ju(t)?e.style.setProperty(t,n):e.style[t]=n},Wu=e=>"string"==typeof e;function Ju(e,t){var n;let o=(null==t?void 0:t.toDefaultUnit)||nu;const r=e[e.length-1];if(Wu(r)){const e=(null===(n=r.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";e&&(o=t=>t+e)}return o}function Xu(e,t,n,o={},r){const a=window.__MOTION_DEV_TOOLS_RECORD,i=!1!==o.record&&a;let s,{duration:l=Zd.duration,delay:c=Zd.delay,endDelay:d=Zd.endDelay,repeat:u=Zd.repeat,easing:h=Zd.easing,persist:f=!1,direction:m,offset:p,allowWebkitAcceleration:g=!1,autoplay:v=!0}=o;const y=Cu(e),b=Iu(t);let w=Hu.waapi();b&&((e,t)=>{Bu[t]&&(t=Bu[t]);const{transforms:n}=Cu(e);var o,r;r=t,-1===(o=n).indexOf(r)&&o.push(r),e.style.transform=(e=>e.sort(Mu).reduce(Pu,"").trim())(n)})(e,t);const S=zu(t),E=function(e,t){return e.has(t)||e.set(t,new ku),e.get(t)}(y.values,S),k=xu.get(S);return ou(E.animation,!(lu(h)&&E.generator)&&!1!==o.record),()=>{const y=()=>{var t,n;return null!==(n=null!==(t=((e,t)=>{t=zu(t);let n=ju(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&0!==n){const e=xu.get(t);e&&(n=e.initialValue)}return n})(e,S))&&void 0!==t?t:null==k?void 0:k.initialValue)&&void 0!==n?n:0};let _=function(e,t){for(let n=0;n<e.length;n++)null===e[n]&&(e[n]=n?e[n-1]:t());return e}((e=>Array.isArray(e)?e:[e])(n),y);const C=Ju(_,k);if(lu(h)){const e=h.createAnimation(_,"opacity"!==t,y,S,E);h=e.easing,_=e.keyframes||_,l=e.duration||l}if(ju(S)&&(Hu.cssRegisterProperty()?function(e){if(!Fu.has(e)){Fu.add(e);try{const{syntax:t,initialValue:n}=xu.has(e)?xu.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:n})}catch(e){}}}(S):w=!1),b&&!Hu.linearEasing()&&(vu(h)||du(h)&&h.some(vu))&&(w=!1),w){k&&(_=_.map(e=>cu(e)?k.toDefaultUnit(e):e)),1!==_.length||Hu.partialKeyframes()&&!i||_.unshift(y());const t={delay:Qd(c),duration:Qd(l),endDelay:Qd(d),easing:du(h)?void 0:$u(h,l),direction:m,iterations:u+1,fill:"both"};s=e.animate({[S]:_,offset:p,easing:du(h)?h.map(e=>$u(e,l)):void 0},t),s.finished||(s.finished=new Promise((e,t)=>{s.onfinish=e,s.oncancel=t}));const n=_[_.length-1];s.finished.then(()=>{f||(Ku(e,S,n),s.cancel())}).catch(tu),g||(s.playbackRate=1.000001)}else if(r&&b)_=_.map(e=>"string"==typeof e?parseFloat(e):e),1===_.length&&_.unshift(parseFloat(y())),s=new r(t=>{Ku(e,S,C?C(t):t)},_,Object.assign(Object.assign({},o),{duration:l,easing:h}));else{const t=_[_.length-1];Ku(e,S,k&&cu(t)?k.toDefaultUnit(t):t)}return i&&a(e,t,_,{duration:l,delay:c,easing:h,repeat:u,offset:p},"motion-one"),E.setAnimation(s),s&&!v&&s.pause(),s}}const Yu=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function Gu(e,t,n){return vu(e)?e(t,n):e}const Zu=(Qu=Eu,function(e,t,n={}){const o=(e=function(e){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(o),Boolean(t);const r=[];for(let a=0;a<o;a++){const i=e[a];for(const e in t){const s=Yu(n,e);s.delay=Gu(s.delay,a,o);const l=Xu(i,e,t[e],s,Qu);r.push(l)}}return au(r,n,n.duration)});var Qu;function eh(e,t={}){return au([()=>{const n=new Eu(e,[0,1],t);return n.finished.catch(()=>{}),n}],t,t.duration)}function th(e,t,n){return(vu(e)?eh:Zu)(e,t,n)}function nh(e,t,n){const o=Math.max(t-5,0);return r=n-e(o),(a=t-o)?r*(1e3/a):0;var r,a}function oh(e){return cu(e)&&!isNaN(e)}function rh(e){return Wu(e)?parseFloat(e):e}const ah=function(){const e=new WeakMap;return(t={})=>{const n=new Map,o=(e=0,o=100,r=0,a=!1)=>{const i=`${e}-${o}-${r}-${a}`;return n.has(i)||n.set(i,(({stiffness:e=100,damping:t=10,mass:n=1,from:o=0,to:r=1,velocity:a=0,restSpeed:i,restDistance:s}={})=>{a=a?eu(a):0;const l={done:!1,hasReachedTarget:!1,current:o,target:r},c=r-o,d=Math.sqrt(e/n)/1e3,u=((e=100,t=10,n=1)=>t/(2*Math.sqrt(e*n)))(e,t,n),h=Math.abs(c)<5;let f;if(i||(i=h?.01:2),s||(s=h?.005:.5),u<1){const e=d*Math.sqrt(1-u*u);f=t=>r-Math.exp(-u*d*t)*((u*d*c-a)/e*Math.sin(e*t)+c*Math.cos(e*t))}else f=e=>r-Math.exp(-d*e)*(c+(d*c-a)*e);return e=>{l.current=f(e);const t=0===e?a:nh(f,e,l.current),n=Math.abs(t)<=i,c=Math.abs(r-l.current)<=s;var d,u,h;return l.done=n&&c,l.hasReachedTarget=(d=o,u=r,h=l.current,d<u&&h>=u||d>u&&h<=u),l}})(Object.assign({from:e,to:o,velocity:r},t))),n.get(i)},r=(t,n)=>(e.has(t)||e.set(t,function(e,t=nu){let n,o=10,r=e(0);const a=[t(r.current)];for(;!r.done&&o<1e4;)r=e(o),a.push(t(r.done?r.target:r.current)),void 0===n&&r.hasReachedTarget&&(n=o),o+=10;const i=o-10;return 1===a.length&&a.push(r.current),{keyframes:a,duration:i/1e3,overshootDuration:(null!=n?n:i)/1e3}}(t,n)),e.get(t));return{createAnimation:(e,t=!0,n,a,i)=>{let s,l,c,d=0,u=nu;const h=e.length;if(t)if(u=Ju(e,a?xu.get(zu(a)):void 0),c=rh(e[h-1]),h>1&&null!==e[0])l=rh(e[0]);else{const e=null==i?void 0:i.generator;if(e){const{animation:t,generatorStartTime:n}=i,o=(null==t?void 0:t.startTime)||n||0,r=(null==t?void 0:t.currentTime)||performance.now()-o,a=e(r).current;l=a,d=nh(t=>e(t).current,r,a)}else n&&(l=rh(n()))}if(oh(l)&&oh(c)){const e=o(l,c,d,null==a?void 0:a.includes("scale"));s=Object.assign(Object.assign({},r(e,u)),{easing:"linear"}),i&&(i.generator=e,i.generatorStartTime=performance.now())}return s||(s={easing:"ease",duration:r(o(0,100)).overshootDuration}),s}}}}();function ih(e){return ih="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},ih(e)}function sh(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,lh(o.key),o)}}function lh(e){var t=function(e){if("object"!=ih(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ih(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ih(t)?t:t+""}var ch=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"come",value:function(e,t){var n=arguments,o=this;document.querySelectorAll(e).forEach(function(e){e.style.display=""}),th(e,{opacity:[0,1]},{duration:1}).finished.then(function(){t&&t.apply(o,n)})}},{key:"out",value:function(e,t){var n=arguments,o=this;th(e,{opacity:[1,0]},{duration:1}).finished.then(function(){document.querySelectorAll(e).forEach(function(e){e.style.display="none"}),t&&t.apply(o,n)})}},{key:"highlight",value:function(e,t){var n=arguments,o=this,r=""===(e="string"==typeof e?document.getElementById(e):e).style.backgroundColor?"#fff":e.style.backgroundColor;"TR"===e.nodeName&&(e=e.querySelectorAll("td")),th(e,{"background-color":"#fff3cd"},{duration:.5}).finished.then(function(){th(e,{"background-color":r},{duration:1}).finished.then(function(){t&&t.apply(o,n)})})}},{key:"scrollWinTo",value:function(e,t){var n=arguments,o=this,r=document.querySelector(e);r&&(window.scrollTo({top:r.offsetTop,behavior:"smooth"}),setTimeout(function(){t&&t.apply(o,n)},700))}},{key:"slideLeft",value:function(e,t){var n=arguments,o=this,r=(e=document.querySelector(e)).getBoundingClientRect();e.oldProp=r,th(e,{x:0},{easing:ah({velocity:-(window.outerWidth+e.getBoundingClientRect().width)})}).finished.then(function(){t&&t.apply(o,n)})}},{key:"slideRight",value:function(e,t){var n=arguments,o=this;th(e=document.querySelector(e),{x:0},{easing:ah({velocity:window.outerWidth+e.getBoundingClientRect().width})}).finished.then(function(){t&&t.apply(o,n)})}},{key:"cssAnimate",value:function(e,t){(e="string"==typeof e?document.querySelector(e):e).classList.remove("animated",t),e.classList.add("animated",t)}}],null&&sh(e.prototype,null),t&&sh(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function dh(e){return function(e){if(Array.isArray(e))return uh(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 uh(e,t);var n={}.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)?uh(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 uh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const hh={components:{"info-popup":za,"delete-popup":se},mounted:function(){var e=this;this.highlight(),this.bindAction(),"FALSE"===this.showDeletePopup&&(this.preventDeleteBox=!0),H.on("list-view-hide-spinner",function(){e.showHideSpinner(void 0,"false")}),H.on("info-popup-open",function(){e.removeAllSpinners()})},created:function(){},props:["dataHeaders","dataList","dataActionFields","dataMoreActionFields","dataControllerName","dataActionAsAjax","dataActionCss","dataUserRights","dataMakeFieldAsLink","dataShowDeletePopup","dataEditHandledByOtherComponent","dataMinResultsNeeded","dataLayoutType","dataNoResultsFoundText"],data:function(){return{actionFields:this.dataActionFields&&"null"!==this.dataActionFields.toString()?JSON.parse(this.dataActionFields):[],userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[],moreActions:this.dataMoreActionFields&&"null"!==this.dataMoreActionFields.toString()?JSON.parse(this.dataMoreActionFields):[],actionAjax:this.dataActionAsAjax&&"null"!==this.dataActionAsAjax.toString()?JSON.parse(this.dataActionAsAjax):this.getDefaultValue("action_as_ajax",[]),actionIconCss:this.dataActionCss&&"null"!==this.dataActionCss.toString()?JSON.parse(this.dataActionCss):this.getDefaultValue("action_icon_css",[]),alertMessage:{current:"Are you sure to delete this?",delete:"Are you sure to delete this?",permission:"Sorry! You don't have permission to delete this."},isDelete:!0,currentActionItem:null,preventDeleteBox:!1,makeFieldAsLink:this.dataMakeFieldAsLink?JSON.parse(this.dataMakeFieldAsLink):[],fieldAsLinkCache:{},showDeletePopup:this.dataShowDeletePopup?this.dataShowDeletePopup.toString().toUpperCase():"FALSE",editHandledByOtherComponent:void 0!==this.dataEditHandledByOtherComponent||this.dataEditHandledByOtherComponent&&"true"===this.dataEditHandledByOtherComponent.toString(),minResultsNeeded:void 0===this.dataMinResultsNeeded||""===this.dataMinResultsNeeded?-1:parseInt(this.dataMinResultsNeeded),layoutType:void 0===this.dataLayoutType||""===this.dataLayoutType?"table":this.dataLayoutType,noResultsFoundText:this.dataNoResultsFoundText,spinnerCss:["fa-spinner","fa-pulse","fa-fw"]}},computed:{headings:function(){var e=this.dataHeaders?JSON.parse(this.dataHeaders):[],t=[];return e.length>0&&e.forEach(function(e,n){var o=e.label||e,r=e.key||e,a=!(!e.isImage||"true"!==e.isImage.toString()),i=!(!e.showAllScopes||"true"!==e.showAllScopes.toString());t.push({label:o,key:r,isImage:a,showAllScopes:i})}),t},rows:function(){return this.dataList?JSON.parse(this.dataList):[]}},methods:{isActionFieldKey:function(e){return"action"===(e=void 0===e?"":e.toLowerCase())||"moreactions"===e},isMakeFieldAsLink:function(e){if(void 0!==this.fieldAsLinkCache[e])return this.fieldAsLinkCache[e];var t=this.makeFieldAsLink.find(function(t,n){if(t.key===e||t.action===e)return t});return this.fieldAsLinkCache[e]=void 0===t?-1:t,this.fieldAsLinkCache[e]},getFieldName:function(e,t,n){return t=t||"label","string"==typeof e||void 0===e[t]?e:e[t]},getFieldValue:function(e,t,n){var o=this;if(t.includes(".")){var r=t.split("."),a=r[0],i=r[1];switch(a=e[a],Object.prototype.toString.call(a)){case"[object Undefined]":a="";break;case"[object Array]":a=a.length>0?n.showAllScopes?function(e,t){var n=[];if(e.length>0)for(var o=0,r=e.length;o<r;o++)n.push(e[o][t]);return n.join(",")}(a,i):a[0][i]:a[i];break;case"[object Object]":a=a[i]||""}return a}return function(e,t,n){var r,a,i,s="",l=o.isMakeFieldAsLink(t);if(void 0!==l&&-1!==l){var c=t,d=l.action||c,u=d.charAt(0).toUpperCase()+d.slice(1),h="".concat(d,"/").concat(e.id);h=v.admin_path("".concat(o.dataControllerName,"/").concat(h));var f=e[t],m="",p="";if(o.isAjax(t)){m=o.getAjaxCss(c),m+=" "+t+"_"+e[t];var g=l["css_"+e[t]]||"";f='<i class="js_icon '.concat(g,'"></i>'),o.can(d)||(m+=" disabled"),p=e[t]}s='<a class="'.concat(m,'" data-value="').concat(p,'" data-rowid="').concat(e.id,'" data-action="').concat(d,'" title="').concat(u,'" href="').concat(h,'">').concat(f,"</a>"),"id"===t&&-1===o.actionFields.indexOf("edit")&&(s=f)}else{s=e[t];var y=v.get("media_path");s=!1===n.isImage?s:""!==s&&null!=s?(a=y,i=(r=s).substring(r.lastIndexOf(".")+1),["mp4","mov","ogg"].indexOf(i)>=0?'<a class="table-links" href="'.concat(a,"/").concat(r,'" target="_blank"><video height="30"><source src="').concat(a,"/").concat(r,'"></video></a>'):["apng","avif","gif","jpg","jpeg","jfif","pjpeg","pjp","png","svg","webp","bmp","ico","cur","tif","tiff"].indexOf(i)>=0?'<a class="table-links" href="'.concat(a,"/").concat(r,'" target="_blank"><img height="30" src=\'').concat(a,"/").concat(r,"' /></a>"):'<a class="table-links" href="'.concat(a,"/").concat(r,'" target="_blank">').concat(r,"</a>")):s}return s}(e,t,n)},getActionValue:function(e,t){var n=[];if(this.actionFields.length>0)for(var o=0;o<this.actionFields.length;o++){var r=this.actionFields[o],a=this.getAjaxCss(r),i=r.charAt(0).toUpperCase()+r.slice(1),s="";if("edit"===r?s=v.admin_path("".concat(this.dataControllerName,"/").concat(r,"/").concat(e.id)):"delete"===r?-1!==this.minResultsNeeded&&this.minResultsNeeded>=this.rows.length?console.info("Hiding delete button, because ".concat(this.minResultsNeeded," record(s) needed.")):s=v.admin_path("".concat(this.dataControllerName,"/destroy/").concat(e.id)):s=v.admin_path("".concat(this.dataControllerName,"/").concat(r,"/").concat(e.id)),""!==s){var l='<i class="js_icon '.concat(this.getIconCSS(r),'"></i>'),c='<a class="'.concat(a,'" data-rowid="').concat(e.id,'" data-action="').concat(r,'" title="').concat(i,'" href="').concat(s,'" class="').concat(r,'">').concat(l,"</a>");n.push(c)}}if(this.moreActions.length>0)for(var d=0;d<this.moreActions.length;d++){var u=this.moreActions[d],h=this.getAjaxCss(u),f=u.css||"",m="";if(u.hrefAttributes)for(var p in u.hrefAttributes)u.hrefAttributes.hasOwnProperty(p)&&(m+="".concat(p,"='").concat(u.hrefAttributes[p],"' "));var g=u.action,y=e[u.action_append_field]||"",b=u.label.charAt(0).toUpperCase()+u.label.slice(1),w=v.admin_path("".concat(this.dataControllerName,"/").concat(g,"/").concat(y)),S='<i class="js_icon '.concat(u.icon_css,'"></i>'),E='<a class="'.concat(h," ").concat(f,'" data-rowid="').concat(e.id,'" title="').concat(b,'" href="').concat(w,'" data-action="').concat(g,'" ').concat(m,">").concat(S,"</a>");n.push(E)}return n.join(" ")},can:function(e){return this.userRights.indexOf(e)>=0},isAjax:function(e){return this.actionAjax.indexOf(e)>=0},getAjaxCss:function(e){var t="[object Object]"===Object.prototype.toString.call(e)?e.action:e;return this.isAjax(e)?"js_action js_ajax js_"+t:"js_action js_"+t},getDefaultValue:function(e,t){return window.Laravel.htcmsAdminConfig(e)||t},getIconCSS:function(e){return this.getDefaultValue("action_icon_css","")[e]||""},getTotalColumns:function(){return this.headings.length},getTotalRows:function(){return this.rows.length},isZeroResult:function(){return 0===this.rows.length},highlight:function(){var e=g.queryBuilder.get("id");if(""!==e){var t="row_"+e;ch.scrollWinTo("#"+t,function(){ch.highlight(t)})}},deleteNow:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this,n=-1;try{if(1===e){var o=this.currentActionItem;if(this.can("delete")){n="row_"+o.getAttribute("data-rowid");var r=o.getAttribute("href");this.doAjax("delete",r,function(e){if(200===e.status){var o=t.rows.findIndex(function(t){return t.id.toString()===e.data.id.toString()});o>=0&&(J.show(t,"Record has been deleted",2e3),document.getElementById(n)&&document.getElementById(n).remove(),t.rows.splice(o,1),t.bindAction(),H.emit("pagination-on-delete"))}else t.showHideSpinner(t.currentActionItem,!1),J.show(t,"Ooops! Got some error!")})}else J.show(t,"Sorry! You don't have permission to delete."),setTimeout(function(){t.showHideSpinner(t.currentActionItem,!1)},1e3)}else t.showHideSpinner(t.currentActionItem,!1)}catch(e){t.showHideSpinner(t.currentActionItem,!1),J.show(t,"I don't understand what you are trying to do.",5e3)}this.closeDialog()},showHideSpinner:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.spinnerCss;if(e){var o,r=e instanceof HTMLAnchorElement?e:e.currentTarget;this.removeAllSpinners(),!0===t&&(o=r.firstElementChild.classList).add.apply(o,dh(n))}else this.removeAllSpinners()},removeAllSpinners:function(){var e=this.spinnerCss,t=document.querySelectorAll(".fa-spinner");t.length>0&&t.forEach(function(t){var n;(n=t.classList).remove.apply(n,dh(e))})},closeDialog:function(){this.$refs.deleteBox.close()},doAjax:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"get",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=this;return Sl()[e](t).then(function(e){n&&n.apply(this,arguments)}).catch(function(e){o?o.apply(o,arguments):J.show(r,e.message,5e3),r.showHideSpinner(r.currentActionItem,!1)})},initAjaxAction:function(e){e.preventDefault(),e.stopPropagation();var t=this,n=e.currentTarget,o=n.dataset,r=o.action,a=o.value,i=n.getAttribute("href");switch(a&&(i=i+"/"+a),this.currentActionItem=n,r){case"delete":this.alertMessage.current=this.alertMessage.delete,this.isDelete=!0,!1===this.preventDeleteBox?this.openDeleteAlert(n):this.deleteNow(1);break;case"showinfo":var s=o.info,l=o.editable,c=o.rowid,d=o.excludefields||[];this.showInfo(s,c,d,l);break;default:this.doAjax("get",i,function(e){var o;t.showHideSpinner(n,!1);var i,s=t.isMakeFieldAsLink(r),l=n.getElementsByClassName("js_icon"),c=s["css_"+a];l.length>0&&(i=(l=l[0]).classList).remove.apply(i,dh(c.split(" "))),n.setAttribute("data-value",e.data.status),c=s["css_"+e.data.status],(o=l.classList).add.apply(o,dh(c.split(" ")))},function(e){var o;t.showHideSpinner(n,!1),J.show(t,(null==e||null===(o=e.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.message)||"Unknown Error!",3e3)})}},bindAction:function(){for(var e=this.$el.getElementsByClassName("js_action"),t=0;t<e.length;t++){var n=e[t];n.classList.contains("js_ajax")&&n.addEventListener("click",this.initAjaxAction,!1),n.classList.contains("js_action")&&n.addEventListener("click",this.showHideSpinner,!1)}!0===this.editHandledByOtherComponent&&this.$el.querySelectorAll("a[data-action='edit']").forEach(function(e,t){e.addEventListener("click",function(e){e.preventDefault(),H.emit("list-view-pre-edit",this)})})},openDeleteAlert:function(e){this.$refs.deleteBox.open(e)},openPermissionAlert:function(){this.alertMessage.current=this.alertMessage.permission,this.isDelete=!1,this.currentActionItem=null,this.$refs.deleteBox.open()},filterFieldsName:function(e){return(e=e.replace(/\.|_/g," ")).charAt(0).toUpperCase()+e.slice(1)},filterSnakeCase:function(e){return e.replace(/\s|\./g,"_").toLowerCase()},getCssForRow:function(e,t){return e.length-1===t?"active":""},showInfo:function(e,t,n,o){this.$refs.infoPopup.showInfo(e,t,n,o)}}},fh=(0,S.A)(hh,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("delete-popup"),l=(0,t.resolveComponent)("info-popup");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Od,[i.isZeroResult()?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},["grid"===a.layoutType?((0,t.openBlock)(),(0,t.createElementBlock)("div",Id,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.rows,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{id:"row_"+e.id,key:e.key,class:"col"},[(0,t.createElementVNode)("table",jd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.headings,function(n,o){return(0,t.openBlock)(),(0,t.createElementBlock)("tr",{class:(0,t.normalizeClass)(i.getCssForRow(n,o))},[(0,t.createElementVNode)("td",{class:(0,t.normalizeClass)("header head_"+i.getFieldName(n))},(0,t.toDisplayString)(i.filterFieldsName(i.getFieldName(n))),3),(0,t.createElementVNode)("td",null,[i.isActionFieldKey(i.getFieldName(n,"key"))?(0,t.createCommentVNode)("v-if",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,innerHTML:i.getFieldValue(e,i.getFieldName(n,"key"),n)},null,8,Fd)),i.isActionFieldKey(i.getFieldName(n,"key"))?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"actions",innerHTML:i.getActionValue(e)},null,8,Ld)):(0,t.createCommentVNode)("v-if",!0)])],2)}),256))])],8,Pd)}),128))])):(0,t.createCommentVNode)("v-if",!0),"table"===a.layoutType?((0,t.openBlock)(),(0,t.createElementBlock)("table",Rd,[(0,t.createElementVNode)("thead",null,[(0,t.createElementVNode)("tr",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.headings,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("th",{class:(0,t.normalizeClass)("header head_"+i.filterSnakeCase(i.getFieldName(e)))},(0,t.toDisplayString)(i.filterFieldsName(i.getFieldName(e))),3)}),256))])]),(0,t.createElementVNode)("tbody",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.rows,function(e){return(0,t.openBlock)(),(0,t.createElementBlock)("tr",{id:"row_"+e.id,key:e.key,class:"list-table-row"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.headings,function(n){return(0,t.openBlock)(),(0,t.createElementBlock)("td",null,[i.isActionFieldKey(i.getFieldName(n,"key"))?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"actions",innerHTML:i.getActionValue(e)},null,8,Hd)):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,innerHTML:i.getFieldValue(e,i.getFieldName(n,"key"),n)},null,8,$d))])}),256))],8,Ud)}),128))])])):(0,t.createCommentVNode)("v-if",!0)],64)),(0,t.createVNode)(s,{ref:"deleteBox","data-show-footer":!0,"data-show-modal":!1,onOnClose:i.deleteNow},{title:(0,t.withCtx)(function(){return function(e){if(Array.isArray(e))return Md(e)}(e=n[4]||(n[4]=[(0,t.createTextVNode)("Alert",-1)]))||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 Md(e,t);var n={}.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)?Md(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.")}();var e}),content:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("span",qd,(0,t.toDisplayString)(a.alertMessage.current),1)]}),footer:(0,t.withCtx)(function(){return[(0,t.createElementVNode)("div",zd,[(0,t.createElementVNode)("div",Kd,[(0,t.createElementVNode)("div",Wd,[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:"flexCheckDefault","onUpdate:modelValue":n[0]||(n[0]=function(e){return a.preventDeleteBox=e}),class:"form-check-input",type:"checkbox",value:""},null,512),[[t.vModelCheckbox,a.preventDeleteBox]]),n[5]||(n[5]=(0,t.createElementVNode)("label",{class:"form-check-label",for:"flexCheckDefault"}," Don't ask again ",-1))])]),(0,t.createElementVNode)("div",Jd,[(0,t.withDirectives)((0,t.createElementVNode)("button",{class:"btn btn-default","data-dismiss":"modal",type:"button",onClick:n[1]||(n[1]=function(e){return i.deleteNow(0)})}," No ",512),[[t.vShow,a.isDelete]]),(0,t.withDirectives)((0,t.createElementVNode)("button",{class:"btn btn-primary",type:"button",onClick:n[2]||(n[2]=function(e){return i.deleteNow(1)})}," Yes ",512),[[t.vShow,a.isDelete]]),(0,t.withDirectives)((0,t.createElementVNode)("button",{class:"btn btn-primary",type:"button",onClick:n[3]||(n[3]=function(e){return i.closeDialog()})}," Okay ",512),[[t.vShow,!a.isDelete]])])])]}),_:1},8,["onOnClose"]),(0,t.createVNode)(l,{ref:"infoPopup"},null,512),i.isZeroResult()?((0,t.openBlock)(),(0,t.createElementBlock)("div",Xd,[(0,t.createElementVNode)("div",Yd,[(0,t.createElementVNode)("div",{innerHTML:a.noResultsFoundText},null,8,Gd)])])):(0,t.createCommentVNode)("v-if",!0)])}]]),mh=fh;var ph={class:"btn-toolbar justify-content-between border-bottom mb-2 pb-2",role:"toolbar"},gh={class:"btn-group",role:"group"},vh={key:0,style:{position:"relative",top:"5px"}},yh=["innerHTML"],bh={class:"input-group actionToolbar"};function wh(e){return function(e){if(Array.isArray(e))return Sh(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 Sh(e,t);var n={}.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)?Sh(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 Sh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}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)}function kh(e){return function(e){if(Array.isArray(e))return _h(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 _h(e,t);var n={}.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)?_h(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 _h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const Ch={props:["dataIgnoreFields","dataPasteElement","dataForm","dataBackUrl","dataCopyPasteAutoInit","dataShowCopy","dataShowPaste"],mounted:function(){this.autoInit&&this.init()},created:function(){},data:function(){var e;return{ignoreFields:void 0===this.dataIgnoreFields?["id","site_id","backURL","actionPerformed","platform_id","_token","insert_by","update_by"]:JSON.parse(this.dataIgnoreFields),copyKey:"cms_copy_data",backURL:void 0===this.dataBackUrl||""===this.dataBackUrl?"":this.dataBackUrl,autoInit:void 0===this.dataCopyPasteAutoInit||"true"===(null===(e=this.dataCopyPasteAutoInit)||void 0===e?void 0:e.toString()),showCopy:void 0===this.dataShowCopy||"true"===this.dataShowCopy.toString(),showPaste:void 0===this.dataShowPaste||"true"===this.dataShowPaste.toString()}},computed:{form:function(){return void 0!==this.dataForm&&document.getElementById(this.dataForm)?document.getElementById(this.dataForm):document},pasteElement:function(){return void 0===this.dataPasteElement?this.form.querySelectorAll("input[type='text']")[0]:this.form.getElementById(this.dataPasteElement)}},methods:{init:function(){var e=this;this.pasteElement&&this.pasteElement.addEventListener("blur",function(){(0,g.IsJson)(this.value)&&e.pasteNow()})},copyNow:function(){var e=this,t=this.form.querySelectorAll("input"),n=this.form.querySelectorAll("textarea"),o=this.form.querySelectorAll("select"),r=[].concat(kh(t),kh(n),kh(o)),a={};r.forEach(function(t){var n=t.getAttribute("name")||t.getAttribute("id");null!=n&&"object"!==Eh(n)&&-1===function(t){return e.ignoreFields.findIndex(function(e){return t===e})}(n)&&(a[n]="checkbox"===t.type||"radio"===t.type?t.checked:t.value)});var i=JSON.stringify(a);(0,g.CopyToClipboard)(i),H.emit("on-copy",i),J.show(this,"Copied...",1e3)},fillData:function(e){var t=this.form;if(e)for(var n in e)try{var o=t[n]||document.getElementById(n),r=e[n];"checkbox"===o.type||"radio"===o.type?o.checked=r:o.value=r}catch(e){console.info("unable to set value @ "+n)}},pasteNow:function(e){var t=this;(0,g.PasteFromClipboard)().then(function(n){(0,g.IsJson)(n)&&t.fillData(JSON.parse(n)),e&&e(JSON.parse(n)),H.emit("on-paste",n)}).catch(function(e){console.log("unable to paste")})}}},Nh=(0,S.A)(Ch,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[a.showCopy?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"Copy",class:"btn btn-outline-secondary",title:"Copy",type:"button",onClick:n[0]||(n[0]=function(e){return i.copyNow()})},wh(n[2]||(n[2]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-copy"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0),a.showPaste?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,"aria-label":"Paste",class:"btn btn-outline-secondary",title:"Paste",type:"button",onClick:n[1]||(n[1]=function(e){return i.pasteNow()})},wh(n[3]||(n[3]=[(0,t.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-paste"},null,-1)])))):(0,t.createCommentVNode)("v-if",!0)],64)}]]);var Bh={class:"btn-group"};const Ah={mounted:function(){g.LeftMenu.init(),this.init()},props:["dataIconCss","dataIconCssOff"],data:function(){return{visible:!0,currentCss:"",css:void 0===this.dataIconCss||""===this.dataIconCss?"fa fa-arrow-left hand":this.dataIconCss,cssOff:void 0===this.dataIconCssOff||""===this.dataIconCssOff?"fa fa-arrow-right hand":this.dataIconCssOff}},methods:{init:function(){var e=this;this.currentCss=g.LeftMenu.isVisible()?this.css:this.cssOff,H.on("left-menu-on-show",function(){e.currentCss=e.css}),H.on("left-menu-on-hide",function(){e.currentCss=e.cssOff})},toggleMenu:function(){this.visible=!this.visible,g.LeftMenu.toggleShow()}}},Dh=(0,S.A)(Ah,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Bh,[(0,t.createElementVNode)("span",{onClick:n[0]||(n[0]=function(){return i.toggleMenu&&i.toggleMenu.apply(i,arguments)}),class:(0,t.normalizeClass)(a.currentCss)},null,2)])}]]),xh={components:{"copy-paste":Nh,"left-menu-toggle":Dh},mounted:function(){},props:["dataTitle","dataBackUrl","dataBackTitle","dataShowCopy","dataShowPaste","dataCopyPasteAutoInit","dataShowExpand"],computed:{showBackButton:function(){return void 0!==this.dataBackUrl},showExpand:function(){return void 0!==this.dataShowExpand}},data:function(){return{title:this.dataTitle,backUrl:this.dataBackUrl,backTitle:void 0===this.dataBackTitle?"Back":this.dataBackTitle}},methods:{goBack:function(){window.location.href=this.backUrl}}},Vh=(0,S.A)(xh,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("left-menu-toggle"),l=(0,t.resolveComponent)("copy-paste");return(0,t.openBlock)(),(0,t.createElementBlock)("div",ph,[(0,t.createElementVNode)("div",gh,[i.showExpand?((0,t.openBlock)(),(0,t.createElementBlock)("small",vh,[(0,t.createVNode)(s,{"data-icon-css":"fa fa-arrow-left hand","data-icon-css-off":"fa fa-arrow-right hand"})])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("h4",{class:"moduleTitle",innerHTML:a.title},null,8,yh)]),(0,t.createElementVNode)("div",bh,[(0,t.createVNode)(l,{"data-copy-paste-auto-init":o.dataCopyPasteAutoInit,"data-show-copy":o.dataShowCopy,"data-show-paste":o.dataShowPaste},null,8,["data-copy-paste-auto-init","data-show-copy","data-show-paste"]),i.showBackButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,"aria-label":"Back",class:"btn btn-outline-secondary",title:"Back",type:"button",onClick:n[0]||(n[0]=function(e){return i.goBack()})},(0,t.toDisplayString)(a.backTitle),1)):(0,t.createCommentVNode)("v-if",!0)])])}]]);var Th={class:"navbar navbar-expand-lg bg-light border-bottom"},Mh={class:"container-fluid"},Oh={class:"navbar-brand",href:"/",target:"_blank"},Ih=["src","height"],Ph={class:"collapse navbar-collapse",id:"navbarScroll"},jh={class:"navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll",style:{"--bs-scroll-height":"100px"}},Fh={class:"nav-item"},Lh={class:"d-flex"},Rh={class:"text-success"},Uh={class:"navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll ms-1",style:{"--bs-scroll-height":"100px"}},Hh={class:"nav-item"};const $h={components:{"global-site-button":Ar},mounted:function(){},props:["dataUsername","dataSiteName","dataCurrentSite","dataSupportedSites","dataIsAdmin","dataSiteCombo","dataLogo","dataLogoHeight"],computed:{logo:function(){return void 0!==this.dataLogo&&""!==this.dataLogo?this.dataLogo:v.admin_asset("img/logo-transparent.png")}},data:function(){return{siteName:this.dataSiteName||"hashtagcms.org",userName:this.dataUsername,isLoggedIn:!(!this.dataUsername||""===this.dataUsername),siteCombo:!(void 0===this.dataSiteCombo||"false"===this.dataSiteCombo),logoHeight:void 0===this.dataLogoHeight||""===this.dataLogoHeight?50:this.dataLogoHeight}},methods:{logout:function(e){document.getElementById("logout-form").submit()}}},qh=(0,S.A)($h,[["render",function(e,n,o,r,a,i){var s=(0,t.resolveComponent)("global-site-button");return(0,t.openBlock)(),(0,t.createElementBlock)("nav",Th,[(0,t.createElementVNode)("div",Mh,[(0,t.createElementVNode)("a",Oh,[(0,t.createElementVNode)("img",{class:"cms-logo",src:i.logo,height:a.logoHeight},null,8,Ih),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.siteName),1)]),n[2]||(n[2]=(0,t.createElementVNode)("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarScroll","aria-controls":"navbarScroll","aria-expanded":"false","aria-label":"Toggle navigation"},[(0,t.createElementVNode)("span",{class:"navbar-toggler-icon"})],-1)),(0,t.createElementVNode)("div",Ph,[(0,t.createElementVNode)("ul",jh,[(0,t.createElementVNode)("li",Fh,[(0,t.createVNode)(s,{"data-current-site":o.dataCurrentSite,"data-supported-sites":o.dataSupportedSites,"data-is-admin":o.dataIsAdmin},null,8,["data-current-site","data-supported-sites","data-is-admin"])])]),(0,t.createElementVNode)("div",Lh,[n[1]||(n[1]=(0,t.createTextVNode)(" Welcome ",-1)),(0,t.createElementVNode)("span",Rh,(0,t.toDisplayString)(a.userName)+"!",1),(0,t.createElementVNode)("ul",Uh,[(0,t.createElementVNode)("li",Hh,[(0,t.createElementVNode)("a",{href:"/logout",onClick:n[0]||(n[0]=(0,t.withModifiers)(function(){return i.logout&&i.logout.apply(i,arguments)},["prevent"]))},"Logout")])])])])])])}]]);var zh={class:"loaderModal",ref:"loaderModal"},Kh={class:"loaderPanel",ref:"loaderSpinner"},Wh=["innerHTML"];const Jh={props:["dataLoadingText","dataAsModal"],mounted:function(){this.fixLayout()},data:function(){return{loadingText:void 0===this.dataLoadingText?"Loading. Please wait...":this.dataLoadingText,asModal:"undefined"==typeof dataAsModal||!0===dataAsModal,visible:!1}},methods:{fixLayout:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=(e=0,t=0,"number"==typeof window.innerWidth?(e=window.innerWidth,t=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}),r=this.$refs.loaderModal,a=this.$refs.loaderSpinner;r.style.width=o.width+"px",r.style.height=o.height+"px",null!==n&&(n.left&&(a.style.left=n.left+"px"),n.top&&(a.style.top=n.top+"px"),n.right&&(a.style.top=n.right+"px"))},show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.visible=!0,"string"==typeof e&&(this.loadingText=e),this.fixLayout(t)},hide:function(){this.visible=!1}}},Xh=(0,S.A)(Jh,[["render",function(e,n,o,r,a,i){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.withDirectives)((0,t.createElementVNode)("div",zh,null,512),[[t.vShow,a.asModal]]),(0,t.createElementVNode)("div",Kh,[n[0]||(n[0]=(0,t.createStaticVNode)('<div class="spinner"><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle class="length" fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg></div>',1)),(0,t.createElementVNode)("span",{class:"loaderText",innerHTML:a.loadingText},null,8,Wh)],512)],512)),[[t.vShow,a.visible]])}]]),Yh={props:["dataBackUrl","dataTimeout"],data:function(){return{totalTime:void 0===this.dataTimeout?5:parseInt(this.dataTimeout),timeRemaining:0,intervalId:0,seconds:"Seconds"}},mounted:function(){this.intervalId=setInterval(this.updateTime,1e3)},methods:{goBack:function(){clearInterval(this.intervalId),window.location.href=this.dataBackUrl},updateTime:function(){this.timeRemaining>=this.totalTime?(clearInterval(this.intervalId),this.goBack()):this.timeRemaining++,this.seconds=this.totalTime-this.timeRemaining<=1?"Second":"Seconds"}}},Gh=(0,S.A)(Yh,[["render",function(e,n,o,r,a,i){return(0,t.openBlock)(),(0,t.createElementBlock)("a",{href:"#",onClick:n[0]||(n[0]=function(e){return i.goBack()}),class:"btn btn-outline-secondary"},[(0,t.renderSlot)(e.$slots,"default",{},function(){return[n[1]||(n[1]=(0,t.createTextVNode)("Back in ",-1))]}),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.totalTime-a.timeRemaining)+" "+(0,t.toDisplayString)(a.seconds),1)])}]]);var Zh={class:"toasterHolder jsToast shadow"},Qh={class:"toasterContent"};const ef={mounted:function(){},data:function(){return{showMe:!1,message:"Toast Content",intervalId:0}},methods:{show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=arguments.length>2?arguments[2]:void 0;this.hide();var o=this;this.showMe=!0,this.message=""!==e?e:"",this.$nextTick(function(){this.align(n)}),this.intervalId=setTimeout(function(){o.hide()},t)},hide:function(){this.showMe=!1,this.intervalId&&clearInterval(this.intervalId)},align:function(e){var t=void 0!==e?e.left:window.innerWidth/2-this.$el.offsetWidth/2,n=void 0!==e?e.top:window.innerHeight/2-this.$el.offsetHeight/2+window.scrollY;this.$el.style.top=n+"px",this.$el.style.left=t+"px"}}},tf=(0,S.A)(ef,[["render",function(e,n,o,r,a,i){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Zh,[(0,t.createElementVNode)("div",Qh,(0,t.toDisplayString)(a.message),1)],512)),[[t.vShow,a.showMe]])}]]);function nf(e){return nf="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},nf(e)}function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function rf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?of(Object(n),!0).forEach(function(t){af(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function af(e,t,n){return(t=function(e){var t=function(e){if("object"!=nf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}g.Dashboard.data,g.Dashboard.labelsCategories,g.Dashboard.datasCategories,g.Dashboard.labelsContent,g.Dashboard.datasContent,g.Dashboard.bgColors,g.Dashboard.borderColors,g.Dashboard.createChart,g.Dashboard.makeData,g.Dashboard.init;var sf=new g.AdminConfig,lf={makeRichEditor:function(e,t){var n={selector:"#"+(e=document.querySelector(e)).id,height:500,theme:"silver",plugins:"code print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern",toolbar1:"formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist | removeformat | customGallery | image | code ",image_advtab:!0,template_popup_height:400,template_popup_width:320,valid_elements:"*[*]",valid_children:"*[*]",document_base_url:sf.get("app_url")+"/",allow_script_urls:!0,convert_urls:!1,relative_urls:!1,remove_script_host:!1,content_css:["//fonts.googleapis.com/css?family=Lato:300,300i,400,400i"],setup:function(e){e.ui.registry.addButton("customGallery",{text:"Insert Image",onAction:function(t){var n;null!==(n=Vue)&&void 0!==n&&null!==(n=n.$refs)&&void 0!==n&&n.imageGallery&&Vue.$refs.imageGallery.open(e)}})}};n=rf(rf({},n),t),e.editor=tinymce.init(n)}},cf={action:null,content_type:null,id:null,init:function(e,t,n){this.action=e,this.content_type=t,this.id=n,"add"===cf.action?(document.getElementById("lang_name").addEventListener("change",cf.autoUpdateFields),document.getElementById("lang_title").addEventListener("change",cf.autoUpdateUrls),document.getElementById("link_rewrite").addEventListener("keyup",cf.linkRewriteUpdated),document.getElementById("category_id").addEventListener("change",cf.getParentCategory)):this.getParentCategory()},isBlank:function(e){return""===document.getElementById(e).value.replace(/\s/g,"")},autoUpdateFields:function(){var e=this.value;try{if(cf.isBlank("lang_title")){document.getElementById("lang_title").value=e[0].toUpperCase()+e.slice(1),document.getElementById("alias").value=(0,g.CleanForUrl)(e.toUpperCase(),"_");var t=(0,g.CleanForUrl)(e.toLowerCase(),"-");document.getElementById("lang_active_key").value=t,document.getElementById("link_rewrite").value=t}}catch(e){console.error(e.message)}},autoUpdateUrls:function(){var e=this.value;if(!0!==document.getElementById("link_rewrite").edited){e=(e=(0,g.CleanForUrl)(e.toUpperCase(),"_")).substr(0,60),document.getElementById("alias").value=e;var t=(0,g.CleanForUrl)(e.toLowerCase(),"-");t=e.substr(0,128),document.getElementById("lang_active_key").value=t,document.getElementById("link_rewrite").value=t}},linkRewriteUpdated:function(){document.getElementById("link_rewrite").edited=!0},getParentCategory:function(){var e=document.getElementById("parent_id"),t=document.getElementById("category_id").value;if(document.getElementById("parent_id").value="",e.length=0,e.options[0]=new Option("Select",""),t>0){o(!0);var n=sf.admin_path("page/getParentCategory",{content_type:cf.content_type,category_id:t});axios.get(n).then(function(t){!function(t){if(t.length>0)for(var n=1,r=0;r<t.length;r++){var a=t[r];a.id!==cf.id&&(e.options[n]=new Option(a.lang.name,a.id),n++)}else o(!1)}(t.data)}).catch(function(e){o(!1)})}else o(!1);function o(e){document.getElementById("parent_div").style.display=!0===e?"":"none"}}};function df(e){return df="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},df(e)}function uf(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,hf(o.key),o)}}function hf(e){var t=function(e){if("object"!=df(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==df(t)?t:t+""}var ff=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors="undefined"==typeof error_messages?[]:error_messages,this.init()},t=[{key:"init",value:function(){var e=this;document.addEventListener("DOMContentLoaded",function(){for(var t in e.errors)e.highlightField(t,e.errors[t][0]);e.focusFirst()})}},{key:"highlightField",value:function(e,t){var n=e;if(!(e=document.getElementById(n)))return console.error("Could not find "+n),!1;e.classList.add("is-invalid");var o=document.createElement("div");o.classList.add("alert","alert-danger","mt-03"),-1!==n.indexOf("lang_")&&(t=t.replace("lang ","")),o.innerHTML=t,e.parentNode.insertBefore(o,e.nextSibling)}},{key:"focusFirst",value:function(){for(var e in this.errors){var t=document.getElementById(e);try{if(t){t.focus();break}}catch(e){console.log(e.message)}}}}],t&&uf(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const mf=g.MapAPI;function pf(e){return pf="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},pf(e)}function gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function vf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gf(Object(n),!0).forEach(function(t){yf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yf(e,t,n){return(t=function(e){var t=function(e){if("object"!=pf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bf=vf(vf({VERSION:"1.0.8",ActionBar:Z,CategoryPlatform:ce,CategorySettings:Gn,CmsModuleDropdown:C,DownloadButton:Qn,FileUploader:po,FrontendModuleCreator:kr,GlobalSiteButton:Ar,Homepage:Wa,HtmlSlot:Xa,ImageGallery:li,InfoBoxes:Ei,InfoPopup:za,LanguageButton:A,LanguageCopier:Oi,LeftNav:$i,MenuSorter:os,ModuleCreator:xl,ModulePermission:ac,Pagination:gc,PlatformButton:Sc,SearchBar:U,SiteButton:Cc,SiteCloner:Uc,SitewiseCopier:_d,SitewiseData:Ed,Sorter:Td,TabularView:mh,TitleBar:Vh,TopNav:qh,CopyPaste:Nh,InfoBox:bi,LeftMenuShowHide:Dh,Loader:Xh,ModalBox:se,SplitButton:k,TimerButton:Gh,ToastBox:tf,AdminConfig:g.AdminConfig},e),{},{Dashboard:g.Dashboard,EditorHelper:lf,PageManager:cf,ErrorMessage:ff,MapAPI:mf,Form:Sr});"undefined"!=typeof window&&(window.HashtagCmsAdminUI=bf);const wf=bf})(),__webpack_exports__})());
|