djangocms-render-context 1.0.0__py3-none-any.whl → 1.2.0__py3-none-any.whl
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.
- djangocms_render_context/__init__.py +1 -1
- djangocms_render_context/cms_plugins.py +9 -0
- djangocms_render_context/forms.py +68 -3
- djangocms_render_context/loaders.py +21 -1
- djangocms_render_context/locale/cs/LC_MESSAGES/django.mo +0 -0
- djangocms_render_context/locale/cs/LC_MESSAGES/django.po +41 -7
- djangocms_render_context/locale/cs/LC_MESSAGES/djangojs.mo +0 -0
- djangocms_render_context/locale/cs/LC_MESSAGES/djangojs.po +130 -0
- djangocms_render_context/migrations/0001_initial.py +0 -2
- djangocms_render_context/migrations/0002_rendercontext_mimetype.py +33 -0
- djangocms_render_context/migrations/0003_rendercontext_config_and_path.py +46 -0
- djangocms_render_context/models.py +49 -8
- djangocms_render_context/static/djangocms_render_context/css-dist/icon-family-Material-Icons.css +20 -0
- djangocms_render_context/static/djangocms_render_context/css-dist/jspreadsheet.min.css +8 -0
- djangocms_render_context/static/djangocms_render_context/css-dist/jsuites.min.css +8 -0
- djangocms_render_context/static/djangocms_render_context/js/spreadsheet.js +711 -0
- djangocms_render_context/static/djangocms_render_context/js-dist/csv.min.js +1 -0
- djangocms_render_context/static/djangocms_render_context/js-dist/index.min.js +8 -0
- djangocms_render_context/static/djangocms_render_context/js-dist/index.min.js.map +1 -0
- djangocms_render_context/static/djangocms_render_context/js-dist/js-yaml.min.js +2 -0
- djangocms_render_context/static/djangocms_render_context/js-dist/jsuites.min.js +8 -0
- djangocms_render_context/static/djangocms_render_context/js-dist/jsuites.min.js.map +1 -0
- djangocms_render_context/utils.py +16 -0
- {djangocms_render_context-1.0.0.dist-info → djangocms_render_context-1.2.0.dist-info}/METADATA +17 -1
- djangocms_render_context-1.2.0.dist-info/RECORD +31 -0
- {djangocms_render_context-1.0.0.dist-info → djangocms_render_context-1.2.0.dist-info}/WHEEL +1 -1
- djangocms_render_context-1.0.0.dist-info/RECORD +0 -17
- {djangocms_render_context-1.0.0.dist-info → djangocms_render_context-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minified by jsDelivr using Terser v5.39.0.
|
|
3
|
+
* Original file: /npm/jsuites@5.13.5/dist/jsuites.js
|
|
4
|
+
*
|
|
5
|
+
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
|
6
|
+
*/
|
|
7
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.jSuites=t()}(this,(function(){var e;return function(){var t={195:function(e){e.exports=function(e){function t(e,t){this.highOrder=e,this.lowOrder=t}var n,i,o,a,s,r,l,d,c,u,p=[new t(1779033703,4089235720),new t(3144134277,2227873595),new t(1013904242,4271175723),new t(2773480762,1595750129),new t(1359893119,2917565137),new t(2600822924,725511199),new t(528734635,4215389547),new t(1541459225,327033209)],f=[new t(1116352408,3609767458),new t(1899447441,602891725),new t(3049323471,3964484399),new t(3921009573,2173295548),new t(961987163,4081628472),new t(1508970993,3053834265),new t(2453635748,2937671579),new t(2870763221,3664609560),new t(3624381080,2734883394),new t(310598401,1164996542),new t(607225278,1323610764),new t(1426881987,3590304994),new t(1925078388,4068182383),new t(2162078206,991336113),new t(2614888103,633803317),new t(3248222580,3479774868),new t(3835390401,2666613458),new t(4022224774,944711139),new t(264347078,2341262773),new t(604807628,2007800933),new t(770255983,1495990901),new t(1249150122,1856431235),new t(1555081692,3175218132),new t(1996064986,2198950837),new t(2554220882,3999719339),new t(2821834349,766784016),new t(2952996808,2566594879),new t(3210313671,3203337956),new t(3336571891,1034457026),new t(3584528711,2466948901),new t(113926993,3758326383),new t(338241895,168717936),new t(666307205,1188179964),new t(773529912,1546045734),new t(1294757372,1522805485),new t(1396182291,2643833823),new t(1695183700,2343527390),new t(1986661051,1014477480),new t(2177026350,1206759142),new t(2456956037,344077627),new t(2730485921,1290863460),new t(2820302411,3158454273),new t(3259730800,3505952657),new t(3345764771,106217008),new t(3516065817,3606008344),new t(3600352804,1432725776),new t(4094571909,1467031594),new t(275423344,851169720),new t(430227734,3100823752),new t(506948616,1363258195),new t(659060556,3750685593),new t(883997877,3785050280),new t(958139571,3318307427),new t(1322822218,3812723403),new t(1537002063,2003034995),new t(1747873779,3602036899),new t(1955562222,1575990012),new t(2024104815,1125592928),new t(2227730452,2716904306),new t(2361852424,442776044),new t(2428436474,593698344),new t(2756734187,3733110249),new t(3204031479,2999351573),new t(3329325298,3815920427),new t(3391569614,3928383900),new t(3515267271,566280711),new t(3940187606,3454069534),new t(4118630271,4000239992),new t(116418474,1914138554),new t(174292421,2731055270),new t(289380356,3203993006),new t(460393269,320620315),new t(685471733,587496836),new t(852142971,1086792851),new t(1017036298,365543100),new t(1126000580,2618297676),new t(1288033470,3409855158),new t(1501505948,4234509866),new t(1607167915,987167468),new t(1816402316,1246189591)],h=new Array(64),m=8;function v(e){return unescape(encodeURIComponent(e))}function g(e){for(var t=[],n=(1<<m)-1,i=e.length*m,o=0;o<i;o+=m)t[o>>5]|=(e.charCodeAt(o/m)&n)<<32-m-o%32;return t}function y(e){for(var t,n="0123456789abcdef",i="",o=4*e.length,a=0;a<o;a+=1)t=e[a>>2]>>8*(3-a%4),i+=n.charAt(t>>4&15)+n.charAt(15&t);return i}function b(e,n){var i,o,a;return i=(65535&e.lowOrder)+(65535&n.lowOrder),a=(65535&(o=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(i>>>16)))<<16|65535&i,i=(65535&e.highOrder)+(65535&n.highOrder)+(o>>>16),new t((65535&(o=(e.highOrder>>>16)+(n.highOrder>>>16)+(i>>>16)))<<16|65535&i,a)}function x(e,n,i,o){var a,s,r;return a=(65535&e.lowOrder)+(65535&n.lowOrder)+(65535&i.lowOrder)+(65535&o.lowOrder),r=(65535&(s=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(i.lowOrder>>>16)+(o.lowOrder>>>16)+(a>>>16)))<<16|65535&a,a=(65535&e.highOrder)+(65535&n.highOrder)+(65535&i.highOrder)+(65535&o.highOrder)+(s>>>16),new t((65535&(s=(e.highOrder>>>16)+(n.highOrder>>>16)+(i.highOrder>>>16)+(o.highOrder>>>16)+(a>>>16)))<<16|65535&a,r)}function w(e,n,i,o,a){var s,r,l;return s=(65535&e.lowOrder)+(65535&n.lowOrder)+(65535&i.lowOrder)+(65535&o.lowOrder)+(65535&a.lowOrder),l=(65535&(r=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(i.lowOrder>>>16)+(o.lowOrder>>>16)+(a.lowOrder>>>16)+(s>>>16)))<<16|65535&s,s=(65535&e.highOrder)+(65535&n.highOrder)+(65535&i.highOrder)+(65535&o.highOrder)+(65535&a.highOrder)+(r>>>16),new t((65535&(r=(e.highOrder>>>16)+(n.highOrder>>>16)+(i.highOrder>>>16)+(o.highOrder>>>16)+(a.highOrder>>>16)+(s>>>16)))<<16|65535&s,l)}function L(e,n,i){return new t(e.highOrder&n.highOrder^e.highOrder&i.highOrder^n.highOrder&i.highOrder,e.lowOrder&n.lowOrder^e.lowOrder&i.lowOrder^n.lowOrder&i.lowOrder)}function j(e,n,i){return new t(e.highOrder&n.highOrder^~e.highOrder&i.highOrder,e.lowOrder&n.lowOrder^~e.lowOrder&i.lowOrder)}function E(e,n){return n<=32?new t(e.highOrder>>>n|e.lowOrder<<32-n,e.lowOrder>>>n|e.highOrder<<32-n):new t(e.lowOrder>>>n|e.highOrder<<32-n,e.highOrder>>>n|e.lowOrder<<32-n)}function C(e){var n=E(e,28),i=E(e,34),o=E(e,39);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function T(e){var n=E(e,14),i=E(e,18),o=E(e,41);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function k(e){var n=E(e,1),i=E(e,8),o=O(e,7);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function A(e){var n=E(e,19),i=E(e,61),o=O(e,6);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function O(e,n){return n<=32?new t(e.highOrder>>>n,e.lowOrder>>>n|e.highOrder<<32-n):new t(0,e.highOrder<<32-n)}var N=(e=v(e)).length*m;(e=g(e))[N>>5]|=128<<24-N%32,e[31+(N+128>>10<<5)]=N;for(var D=0;D<e.length;D+=32){n=p[0],i=p[1],o=p[2],a=p[3],s=p[4],r=p[5],l=p[6],d=p[7];for(var M=0;M<80;M++)h[M]=M<16?new t(e[2*M+D],e[2*M+D+1]):x(A(h[M-2]),h[M-7],k(h[M-15]),h[M-16]),c=w(d,T(s),j(s,r,l),f[M],h[M]),u=b(C(n),L(n,i,o)),d=l,l=r,r=s,s=b(a,c),a=o,o=i,i=n,n=b(c,u);p[0]=b(n,p[0]),p[1]=b(i,p[1]),p[2]=b(o,p[2]),p[3]=b(a,p[3]),p[4]=b(s,p[4]),p[5]=b(r,p[5]),p[6]=b(l,p[6]),p[7]=b(d,p[7])}var I=[];for(D=0;D<p.length;D++)I.push(p[D].highOrder),I.push(p[D].lowOrder);return y(I)}}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};!function(){"use strict";i.d(o,{default:function(){return z}});var t={setDictionary:function(e){document.dictionary||(document.dictionary={});var t=null,n=Object.keys(e);for(t=0;t<n.length;t++)document.dictionary[n[t]]=e[n[t]]},translate:function(e){return"undefined"!=typeof document&&document.dictionary&&document.dictionary[e]||e}};var n=function(e,t){if(!0===t)window.jSuitesStateControl=window.jSuitesStateControl.filter((function(e){return null!==e})),setTimeout((function(){window.jSuitesStateControl.push(e)}),0);else{var n=window.jSuitesStateControl.indexOf(e);n>=0&&window.jSuitesStateControl.splice(n,1)}},a={two:function(e){return 1==(e=""+e).length&&(e="0"+e),e},focus:function(e){if(e.textContent.length){const t=document.createRange(),n=window.getSelection();let i=e;for(;i.lastChild;)i=i.lastChild;i.nodeType===Node.TEXT_NODE?t.setStart(i,i.length):t.setStart(i,i.childNodes.length),t.collapse(!0),n.removeAllRanges(),n.addRange(t),e.scrollLeft=e.scrollWidth}},isNumeric:function(e){return"string"==typeof e&&(e=e.trim()),!isNaN(e)&&null!==e&&""!==e},guid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},getNode:function(){var e=document.getSelection().anchorNode;return e?3==e.nodeType?e.parentNode:e:null},hash:function(e){var t,n,i=0;if(0===e.length)return i;for(t=0;t<e.length;t++)(n=e.charCodeAt(t))>32&&(i=(i<<5)-i+n,i|=0);return i},randomColor:function(e){var t=String("#"+Math.random().toString(16).slice(2,8).toUpperCase()).replace(/[^0-9a-f]/gi,"");t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var n,i,o=[];for(i=0;i<3;i++)n=parseInt(t.substr(2*i,2),16),n=Math.round(Math.min(Math.max(0,n+-.25*n),255)).toString(16),o.push(("00"+n).substr(n.length));return 1==e?"#"+a.two(o[0].toString(16))+a.two(o[1].toString(16))+a.two(o[2].toString(16)):o},getWindowWidth:function(){var e=window,t=document,n=t.documentElement,i=t.getElementsByTagName("body")[0];return e.innerWidth||n.clientWidth||i.clientWidth},getWindowHeight:function(){var e=window,t=document,n=t.documentElement,i=t.getElementsByTagName("body")[0];return e.innerHeight||n.clientHeight||i.clientHeight},getPosition:function(e){if(e.changedTouches&&e.changedTouches[0])var t=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY;else t=window.Event?e.pageX:e.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft),n=window.Event?e.pageY:e.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);return[t,n]},click:function(e){if(e.click)e.click();else{var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}},findElement:function(e,t){var n=!1;return function e(i){i&&!n&&("function"==typeof t?n=t(i):"string"==typeof t&&i.classList&&i.classList.contains(t)&&(n=i)),i.parentNode&&!n&&e(i.parentNode)}(e),n}},s=a;const r=function(e){return"object"==typeof e||"function"==typeof e};function l(e,t,n){if("string"!=typeof e||0===e.length)return;const i=e.split(".");if(0===i.length)return;let o=this;if(void 0===t&&void 0===n){for(let e=0;e<i.length;e++){const t=i[e];if(null==o||!r(o)||!Object.prototype.hasOwnProperty.call(o,t))return;o=o[t]}return o}for(let t=0;t<i.length-1;t++){const n=i[t];if(null==o||!r(o))return console.warn(`Cannot set value: path '${e}' blocked by invalid object at '${n}'`),!1;(!Object.prototype.hasOwnProperty.call(o,n)||null!=o[n]&&r(o[n]))&&Object.prototype.hasOwnProperty.call(o,n)||(o[n]={}),o=o[n]}const a=i[i.length-1];return!(null==o||!r(o))&&(!0===n?!!Object.prototype.hasOwnProperty.call(o,a)&&(delete o[a],!0):(o[a]=t,!0))}function d(e,t){var n={options:{}},i={pointer:null,direction:null,ondragstart:null,ondragend:null,ondrop:null},o=null;for(var a in i)t&&t.hasOwnProperty(a)?n.options[a]=t[a]:n.options[a]=i[a];e.classList.add("jsorting"),e.addEventListener("dragstart",(function(t){let i=t.target;if(3===i.nodeType){if("true"!==i.parentNode.getAttribute("draggable"))return t.preventDefault(),void t.stopPropagation();i=i.parentNode}if("true"===i.getAttribute("draggable")){let a=Array.prototype.indexOf.call(i.parentNode.children,i);o={element:i,o:a,d:a},i.style.opacity="0.25","function"==typeof n.options.ondragstart&&n.options.ondragstart(e,i,t),t.dataTransfer.setDragImage(i,0,0)}})),e.addEventListener("dragover",(function(e){if(e.preventDefault(),o&&s(e.target)&&"true"==e.target.getAttribute("draggable")&&o.element!=e.target){if(n.options.direction)t=e.target.clientWidth/2>e.offsetX;else var t=e.target.clientHeight/2>e.offsetY;t?e.target.parentNode.insertBefore(o.element,e.target):e.target.parentNode.insertBefore(o.element,e.target.nextSibling),o.d=Array.prototype.indexOf.call(e.target.parentNode.children,o.element)}})),e.addEventListener("dragleave",(function(e){e.preventDefault()})),e.addEventListener("dragend",(function(t){t.preventDefault(),o&&("function"==typeof n.options.ondragend&&n.options.ondragend(e,o.element,t),o.o<o.d?t.target.parentNode.insertBefore(o.element,t.target.parentNode.children[o.o]):t.target.parentNode.insertBefore(o.element,t.target.parentNode.children[o.o].nextSibling),o.element.style.opacity="",o=null)})),e.addEventListener("drop",(function(t){t.preventDefault(),o&&(o.o!==o.d&&"function"==typeof n.options.ondrop&&n.options.ondrop(e,o.o,o.d,o.element,t.target,t),o.element.style.opacity="",o=null)}));for(var s=function(e){var t=!1;return function e(n){n.className&&n.classList.contains("jsorting")&&(t=!0),t||e(n.parentNode)}(e),t},r=0;r<e.children.length;r++)e.children[r].hasAttribute("draggable")||e.children[r].setAttribute("draggable","true");return e.val=function(){for(var t=null,n=[],i=0;i<e.children.length;i++)(t=e.children[i].getAttribute("data-id"))&&n.push(t);return n},e}function c(e,t){t.loadUp&&"function"==typeof t.loadUp||(t.loadUp=function(){return!1}),t.loadDown&&"function"==typeof t.loadDown||(t.loadDown=function(){return!1}),t.timer||(t.timer=100);var n=null,i=function(i){if(null==n){var o=!1,a=e.scrollTop;e.scrollTop+2*e.clientHeight>=e.scrollHeight?t.loadDown()&&(a==e.scrollTop&&(e.scrollTop=e.scrollTop-e.clientHeight),o=!0):e.scrollTop<=e.clientHeight&&t.loadUp()&&(a==e.scrollTop&&(e.scrollTop=e.scrollTop+e.clientHeight),o=!0),n=setTimeout((function(){n=null}),t.timer),o&&"function"==typeof t.onupdate&&t.onupdate()}};return e.onscroll=function(e){i()},e.onwheel=function(e){i()},{}}var u,p=((u=function(e,t){if(Array.isArray(e)){var n={instance:[],complete:t};if(e.length>0)for(var i=0;i<e.length;i++)e[i].multiple=n,n.instance.push(u(e[i]));return n}if(e.data||(e.data={}),e.type&&(e.method=e.type),e.method||(e.method="GET"),e.dataType||(e.dataType="json"),e.data){var o=function(e,t){var n=[];if(e){var i=Object.keys(e);if(i.length)for(var a=0;a<i.length;a++){if(t)var s=t+"["+i[a]+"]";else s=i[a];if(e[s]instanceof FileList)n[s]=e[i[a]];else if(null===e[i[a]]||void 0===e[i[a]])n[s]="";else if("object"==typeof e[i[a]])for(var r=o(e[i[a]],s),l=Object.keys(r),d=0;d<l.length;d++)n[l[d]]=r[l[d]];else n[s]=e[i[a]]}}return n},a=o(e.data),s=Object.keys(a);if("GET"==e.method){if(s.length){var r=[];for(i=0;i<s.length;i++)r.push(s[i]+"="+encodeURIComponent(a[s[i]]));e.url.indexOf("?")<0&&(e.url+="?"),e.url+=r.join("&")}}else for(r=new FormData,i=0;i<s.length;i++)if(a[s[i]]instanceof FileList){if(a[s[i]].length)for(var l=0;l<a[s[i]].length;l++)r.append(s[i],a[s[i]][l],a[s[i]][l].name)}else r.append(s[i],a[s[i]])}var d=new XMLHttpRequest;return d.open(e.method,e.url,!0),e.requestedWith?d.setRequestHeader("X-Requested-With",e.requestedWith):!1!==e.requestedWith&&d.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.contentType&&d.setRequestHeader("Content-Type",e.contentType),"POST"===e.method?d.setRequestHeader("Accept","application/json"):"blob"===e.dataType?d.responseType="blob":e.contentType||("json"===e.dataType?d.setRequestHeader("Content-Type","text/json"):"html"===e.dataType&&d.setRequestHeader("Content-Type","text/html")),!0!==e.cache&&(d.setRequestHeader("pragma","no-cache"),d.setRequestHeader("cache-control","no-cache")),!0===e.withCredentials&&(d.withCredentials=!0),"function"==typeof e.beforeSend&&e.beforeSend(d),"function"==typeof u.beforeSend&&u.beforeSend(d),document.ajax&&"function"==typeof document.ajax.beforeSend&&document.ajax.beforeSend(d),d.onerror=function(){e.error&&"function"==typeof e.error&&e.error({message:"Network error: Unable to reach the server.",status:0})},d.ontimeout=function(){e.error&&"function"==typeof e.error&&e.error({message:"Request timed out after "+d.timeout+"ms.",status:0})},d.onload=function(){if(d.status>=200&&d.status<300)if("json"===e.dataType)try{var t=JSON.parse(d.responseText);e.success&&"function"==typeof e.success&&e.success(t)}catch(n){e.error&&"function"==typeof e.error&&e.error(n,t)}else t="blob"===e.dataType?d.response:d.responseText,e.success&&"function"==typeof e.success&&e.success(t);else e.error&&"function"==typeof e.error&&e.error(d.responseText,d.status);if(u.queue&&u.queue.length>0&&u.send(u.queue.shift()),u.requests&&u.requests.length){var n=u.requests.indexOf(d);u.requests.splice(n,1),u.requests.length||e.complete&&"function"==typeof e.complete&&e.complete(t),e.group&&u.oncomplete&&"function"==typeof u.oncomplete[e.group]&&(u.pending(e.group)||(u.oncomplete[e.group](),u.oncomplete[e.group]=null)),e.multiple&&e.multiple.instance&&(n=e.multiple.instance.indexOf(d),e.multiple.instance.splice(n,1),e.multiple.instance.length||e.multiple.complete&&"function"==typeof e.multiple.complete&&e.multiple.complete(t))}},d.options=e,d.data=r,!0===e.queue&&u.requests.length>0?u.queue.push(d):u.send(d),d}).send=function(e){e.data?Array.isArray(e.data)?e.send(e.data.join("&")):e.send(e.data):e.send(),u.requests.push(e)},u.exists=function(e,t){var n=new XMLHttpRequest;n.open("HEAD",e,!1),n.send(),n.status&&t(n.status)},u.pending=function(e){var t=0,n=u.requests;if(n&&n.length)for(var i=0;i<n.length;i++)e&&e!=n[i].options.group||t++;return t},u.oncomplete={},u.requests=[],u.queue=[],u);var f=function(){const e={loading:{}};return e.loading.show=function(t){e.loading.element||(e.loading.element=document.createElement("div"),e.loading.element.className="jloading"),document.body.appendChild(e.loading.element),t>0&&setTimeout((function(){e.loading.hide()}),1e3*t)},e.loading.hide=function(){e.loading.element&&e.loading.element.parentNode&&document.body.removeChild(e.loading.element)},e.slideLeft=function(e,t,n){1==t?(e.classList.add("jslide-left-in"),setTimeout((function(){e.classList.remove("jslide-left-in"),"function"==typeof n&&n()}),400)):(e.classList.add("jslide-left-out"),setTimeout((function(){e.classList.remove("jslide-left-out"),"function"==typeof n&&n()}),400))},e.slideRight=function(e,t,n){!0===t?(e.classList.add("jslide-right-in"),setTimeout((function(){e.classList.remove("jslide-right-in"),"function"==typeof n&&n()}),400)):(e.classList.add("jslide-right-out"),setTimeout((function(){e.classList.remove("jslide-right-out"),"function"==typeof n&&n()}),400))},e.slideTop=function(e,t,n){!0===t?(e.classList.add("jslide-top-in"),setTimeout((function(){e.classList.remove("jslide-top-in"),"function"==typeof n&&n()}),400)):(e.classList.add("jslide-top-out"),setTimeout((function(){e.classList.remove("jslide-top-out"),"function"==typeof n&&n()}),400))},e.slideBottom=function(e,t,n){!0===t?(e.classList.add("jslide-bottom-in"),setTimeout((function(){e.classList.remove("jslide-bottom-in"),"function"==typeof n&&n()}),400)):(e.classList.add("jslide-bottom-out"),setTimeout((function(){e.classList.remove("jslide-bottom-out"),"function"==typeof n&&n()}),100))},e.fadeIn=function(e,t){e.style.display="",e.classList.add("jfade-in"),setTimeout((function(){e.classList.remove("jfade-in"),"function"==typeof t&&t()}),2e3)},e.fadeOut=function(e,t){e.classList.add("jfade-out"),setTimeout((function(){e.style.display="none",e.classList.remove("jfade-out"),"function"==typeof t&&t()}),1e3)},e}();var h=function(){var e={now:function(e,t){var n=null,i=null,o=null,a=null,r=null,l=null;return Array.isArray(e)?(n=e[0],i=e[1],o=e[2],a=e[3],r=e[4],l=e[5]):(e||(e=new Date),n=e.getFullYear(),i=e.getMonth()+1,o=e.getDate(),a=e.getHours(),r=e.getMinutes(),l=e.getSeconds()),1==t?s.two(n)+"-"+s.two(i)+"-"+s.two(o):s.two(n)+"-"+s.two(i)+"-"+s.two(o)+" "+s.two(a)+":"+s.two(r)+":"+s.two(l)},toArray:function(e){var t=(n=e.split(-1!==e.indexOf("T")?"T":" "))[1],n=n[0].split("-"),i=parseInt(n[0]),o=parseInt(n[1]),a=parseInt(n[2]),s=0,r=0;return t&&(t=t.split(":"),s=parseInt(t[0]),r=parseInt(t[1])),[i,o,a,s,r,0]}},n=Date.UTC(1900,0,0),i=Date.UTC(1900,1,29),o=864e5;e.dateToNum=function(e){"string"==typeof e&&(e=new Date(e+" GMT+0"));var t=e.getTime();return t>=i&&(t+=o),(t-=n)/o},e.numToDate=function(t){var a=n+t*o;a>=i&&(a-=o);const s=new Date(a);var r=[s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds()];return e.now(r)};let a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r=["January","February","March","April","May","June","July","August","September","October","November","December"];return Object.defineProperty(e,"weekdays",{get:function(){return a.map((function(e){return t.translate(e)}))}}),Object.defineProperty(e,"weekdaysShort",{get:function(){return a.map((function(e){return t.translate(e).substring(0,3)}))}}),Object.defineProperty(e,"months",{get:function(){return r.map((function(e){return t.translate(e)}))}}),Object.defineProperty(e,"monthsShort",{get:function(){return r.map((function(e){return t.translate(e).substring(0,3)}))}}),e}();var m=function(){var t={text:["@"],currency:["#(.{1})##0?(.{1}0+)?( ?;(.*)?)?","#"],scientific:["0{1}(.{1}0+)?E{1}\\+0+"],percentage:["0{1}(.{1}0+)?%"],numeric:["0{1}(.{1}0+)?"],datetime:["YYYY","YYY","YY","MMMMM","MMMM","MMM","MM","DDDDD","DDDD","DDD","DD","DY","DAY","WD","D","Q","MONTH","MON","HH24","HH12","HH","\\[H\\]","H","AM/PM","MI","SS","MS","Y","M"],general:["A","0","[0-9a-zA-Z$]+","."]},n=function(){if(-1!==this.mask.toLowerCase().indexOf("[h]")){var e=0;this.date[4]&&(e=parseFloat(this.date[4]/60));var t=parseInt(this.date[3])+e;t/=24}else this.date[0]&&this.date[1]&&this.date[2]||!this.date[3]&&!this.date[4]?(this.date[0]&&this.date[1]&&!this.date[2]&&(this.date[2]=1),t=s.two(this.date[0])+"-"+s.two(this.date[1])+"-"+s.two(this.date[2]),(this.date[3]||this.date[4]||this.date[5])&&(t+=" "+s.two(this.date[3])+":"+s.two(this.date[4])+":"+s.two(this.date[5]))):t=s.two(this.date[3])+":"+s.two(this.date[4])+":"+s.two(this.date[5]);return t},i=function(){var e="";if(this.date[0]&&this.date[1]&&this.date[2]||!this.date[3]&&!this.date[4]){if(this.date[0]||this.date[1]||this.date[2]||this.date[3]||this.date[4]||this.date[5]){this.date[0]&&this.date[1]&&!this.date[2]&&(this.date[2]=1);var t=h.now(this.date);e=h.dateToNum(t)}}else{if(-1!==this.mask.toLowerCase().indexOf("[h]"))e=parseInt(this.date[3]);else{let t=parseInt(this.date[3]);e=t<13&&-1!==this.values.indexOf("PM")?(t+12)%24:t%24}this.date[4]&&(e+=parseFloat(this.date[4]/60)),this.date[5]&&(e+=parseFloat(this.date[5]/3600)),e/=24}return isNaN(e)&&(e=""),e},o=function(e){return null===e||""===e||void 0===e},a=function(e){return"currency"===e||"percentage"===e||"scientific"===e||"numeric"===e},r=function(e){if(e&&Number(e)==e)return".";if(this.options.decimal)return this.options.decimal;if(this.locale){var t=Intl.NumberFormat(this.locale).format(1.1);return this.options.decimal=t[1]}return e||(e=this.mask),(t=new RegExp("0{1}(.{1})0+","ig").exec(e))&&t[1]&&1==t[1].length?(this.options.decimal=t[1],t[1]):((t=new RegExp("#{1}(.{1})#+","ig").exec(e))&&t[1]&&1==t[1].length?","===t[1]?this.options.decimal=".":this.options.decimal=",":this.options.decimal="1.1".toLocaleString().substring(1,2),this.options.decimal?this.options.decimal:null)},l=function(e,t){if(""==e)return"";t||(t=r.call(this));var n=(e=(""+e).split(t))[0].match(/[-]+/g);return n=!(!n||!n.length),e[0]=e[0].match(/[0-9]+/g),e[0]?(n&&e[0].unshift("-"),e[0]=e[0].join("")):n&&(e[0]="-"),e[0]||e[1]?(void 0!==e[1]&&(e[1]=e[1].match(/[0-9]+/g),e[1]?e[1]=e[1].join(""):e[1]=""),e):""},d=function(e,t){if(""===e)return"";var n=r.call(this),i=this.options;if(""===(e=l.call(this,e)))return"";var o=null;if(e[0]&&(o="percent"===i.style?parseFloat(e[0])/100:parseFloat(e[0]+".1")),("-"===e[0]||"-00"===e[0])&&!e[1]&&t&&"deleteContentBackward"==t.inputType)return"";var a=new Intl.NumberFormat(this.locale,i).format(o);if(a=a.split(n),"percent"===i.style&&-1!==a[0].indexOf("%")&&(a[0]=a[0].replace("%",""),a[2]="%"),void 0!==a[1]){var s=a[1].replace(/[0-9]*/g,"");s&&(a[2]=s)}return void 0!==e[1]?a[1]=n+e[1]:a[1]="",a.join("")},c=function(e,t){var n=f.call(e);if(n){var i=d.call(this,n,t),o=i.length-n.length,a=p.call(e)+o;f.call(e,i,a,!0)}},u=function(e){var t=l.call(this,e);return t?("-"===t[0]&&(t[0]="-0"),parseFloat(t.join("."))):null},p=function(e,t){if(void 0===e){if("DIV"==this.tagName){var n=0;if(s=window.getSelection())if(0!==s.rangeCount)(o=(r=s.getRangeAt(0)).cloneRange()).selectNodeContents(this),o.setEnd(r.endContainer,r.endOffset),n=o.toString().length;return n}return this.selectionStart}var i=f.call(this);if(t){for(var o=null,a=0;a<i.length;a++)(i[a].match(/[\-0-9]/g)||"."===i[a]||","===i[a])&&(o=a);null===o&&(o=i.indexOf(" ")),e>=o&&(e=o+1)}if(e>i.length&&(e=i.length),e)if("DIV"==this.tagName){var s=window.getSelection(),r=document.createRange();this.childNodes[0]&&(r.setStart(this.childNodes[0],e),s.removeAllRanges(),s.addRange(r))}else this.selectionStart=e,this.selectionEnd=e},f=function(e,t,n){if("DIV"==this.tagName){if(void 0===e){e=this.innerText;return this.value&&this.value.length>e.length&&(e=this.value),e}this.innerText!==e&&(this.innerText=e,t&&p.call(this,t,n))}else{if(void 0===e)return this.value;this.value!==e&&(this.value=e,t&&p.call(this,t,n))}},m=h.weekdays,v=h.weekdaysShort,g=h.months,y=h.monthsShort,b={YEAR:function(e,t){var n=""+(new Date).getFullYear();if(void 0===this.values[this.index]&&(this.values[this.index]=""),parseInt(e)>=0&&parseInt(e)<=10&&this.values[this.index].length<t&&(this.values[this.index]+=e),this.values[this.index].length==t){if(2==t)n=n.substr(0,2)+this.values[this.index];else if(3==t)n=n.substr(0,1)+this.values[this.index];else if(4==t)n=this.values[this.index];this.date[0]=n,this.index++}},YYYY:function(e){b.YEAR.call(this,e,4)},YYY:function(e){b.YEAR.call(this,e,3)},YY:function(e){b.YEAR.call(this,e,2)},FIND:function(e,t){if(o(this.values[this.index])&&(this.values[this.index]=""),this.event&&this.event.inputType&&this.event.inputType.indexOf("delete")>-1)this.values[this.index]+=e;else{for(var n=0,i=0,a=(this.values[this.index]+e).toLowerCase(),s=0;s<t.length;s++)0==t[s].toLowerCase().indexOf(a)&&(n=s,i++);if(i>1)this.values[this.index]+=e;else if(1==i){var r=t[n].length-this.values[this.index].length-1;return this.position+=r,this.values[this.index]=t[n],this.index++,n}}},MMM:function(e){var t=b.FIND.call(this,e,y);void 0!==t&&(this.date[1]=t+1)},MON:function(e){b.MMM.call(this,e)},MMMM:function(e){var t=b.FIND.call(this,e,g);void 0!==t&&(this.date[1]=t+1)},MONTH:function(e){b.MMMM.call(this,e)},MMMMM:function(e){o(this.values[this.index])&&(this.values[this.index]="");for(var t=(this.values[this.index]+e).toLowerCase(),n=0;n<g.length;n++)if(0==g[n][0].toLowerCase().indexOf(t)){this.values[this.index]=g[n][0],this.date[1]=n+1,this.index++;break}},MM:function(e){o(this.values[this.index])?parseInt(e)>1&&parseInt(e)<10?(this.date[1]=this.values[this.index]="0"+e,this.index++):parseInt(e)<2&&(this.values[this.index]=e):(1==this.values[this.index]&&parseInt(e)<3||0==this.values[this.index]&&parseInt(e)>0&&parseInt(e)<10)&&(this.date[1]=this.values[this.index]+=e,this.index++)},M:function(e){var t=!1;if(parseInt(e)>=0&&parseInt(e)<10)if(o(this.values[this.index]))this.values[this.index]=e,e>1&&(this.date[1]=this.values[this.index],this.index++);else if(1==this.values[this.index]&&parseInt(e)<3)this.date[1]=this.values[this.index]+=e,this.index++;else if(0==this.values[this.index]&&parseInt(e)>0)this.date[1]=this.values[this.index]+=e,this.index++;else t=!0;else t=!0;if(1==t){var n=parseInt(this.values[this.index]);n>0&&n<12&&(this.date[1]=this.values[this.index],this.index++,this.position--)}},D:function(e){var t=!1;if(parseInt(e)>=0&&parseInt(e)<10)if(o(this.values[this.index]))this.values[this.index]=e,parseInt(e)>3&&(this.date[2]=this.values[this.index],this.index++);else if(3==this.values[this.index]&&parseInt(e)<2)this.date[2]=this.values[this.index]+=e,this.index++;else if(1==this.values[this.index]||2==this.values[this.index])this.date[2]=this.values[this.index]+=e,this.index++;else if(0==this.values[this.index]&&parseInt(e)>0)this.date[2]=this.values[this.index]+=e,this.index++;else t=!0;else t=!0;if(1==t){var n=parseInt(this.values[this.index]);n>0&&n<32&&(this.date[2]=this.values[this.index],this.index++,this.position--)}},DD:function(e){o(this.values[this.index])?parseInt(e)>3&&parseInt(e)<10?(this.date[2]=this.values[this.index]="0"+e,this.index++):parseInt(e)<10&&(this.values[this.index]=e):(3==this.values[this.index]&&parseInt(e)<2||(1==this.values[this.index]||2==this.values[this.index])&&parseInt(e)<10||0==this.values[this.index]&&parseInt(e)>0&&parseInt(e)<10)&&(this.date[2]=this.values[this.index]+=e,this.index++)},DDD:function(e){b.FIND.call(this,e,v)},DY:function(e){b.DDD.call(this,e)},DDDD:function(e){b.FIND.call(this,e,m)},DAY:function(e){b.DDDD.call(this,e)},HH12:function(e,t){var n=!1;if(parseInt(e)>=0&&parseInt(e)<10)if(o(this.values[this.index]))parseInt(e)>1&&parseInt(e)<10?(t&&(e=0+e),this.date[3]=this.values[this.index]=e,this.index++):parseInt(e)<10&&(this.values[this.index]=e);else if(1==this.values[this.index]&&parseInt(e)<3)this.date[3]=this.values[this.index]+=e,this.index++;else if(this.values[this.index]<1&&parseInt(e)<10)this.date[3]=this.values[this.index]+=e,this.index++;else n=!0;else n=!0;if(1==n){var i=parseInt(this.values[this.index]);i>=0&&i<=12&&(this.date[3]=this.values[this.index],this.index++,this.position--)}},HH24:function(e,t){var n=!1;if(parseInt(e)>=0&&parseInt(e)<10)if(null==this.values[this.index]||""==this.values[this.index])parseInt(e)>2&&parseInt(e)<10?(t&&(e=0+e),this.date[3]=this.values[this.index]=e,this.index++):parseInt(e)<10&&(this.values[this.index]=e);else if(2==this.values[this.index]&&parseInt(e)<4)t||"0"!==this.values[this.index]||(this.values[this.index]=""),this.date[3]=this.values[this.index]+=e,this.index++;else if(this.values[this.index]<2&&parseInt(e)<10)t||"0"!==this.values[this.index]||(this.values[this.index]=""),this.date[3]=this.values[this.index]+=e,this.index++;else n=!0;else n=!0;if(1==n){var i=parseInt(this.values[this.index]);i>=0&&i<24&&(this.date[3]=this.values[this.index],this.index++,this.position--)}},HH:function(e){b.HH24.call(this,e,1)},H:function(e){b.HH24.call(this,e,0)},"\\[H\\]":function(e){null==this.values[this.index]&&(this.values[this.index]=""),e.match(/[0-9]/g)?this.date[3]=this.values[this.index]+=e:this.values[this.index].match(/[0-9]/g)&&(this.date[3]=this.values[this.index],this.index++,this.position--)},N60:function(e,t){null==this.values[this.index]||""==this.values[this.index]?parseInt(e)>5&&parseInt(e)<10?(this.date[t]=this.values[this.index]="0"+e,this.index++):parseInt(e)<10&&(this.values[this.index]=e):parseInt(e)<10&&(this.date[t]=this.values[this.index]+=e,this.index++)},MI:function(e){b.N60.call(this,e,4)},SS:function(e){b.N60.call(this,e,5)},"AM/PM":function(e){void 0===this.values[this.index]&&(this.values[this.index]=""),""===this.values[this.index]?e.match(/a/i)&&this.date[3]<13?this.values[this.index]+="A":e.match(/p/i)&&(this.values[this.index]+="P"):"A"!==this.values[this.index]&&"P"!==this.values[this.index]||(this.values[this.index]+="M",this.index++)},WD:function(e){void 0===this.values[this.index]&&(this.values[this.index]=""),parseInt(e)>=0&&parseInt(e)<7&&(this.values[this.index]=e),1==this.values[this.index].length&&this.index++},"0{1}(.{1}0+)?":function(e){var t=r.call(this),n=!1;o(this.values[this.index])?this.values[this.index]="":"-"==this.values[this.index]&&(n=!0);var i=l.call(this,this.values[this.index],t);i&&(this.values[this.index]=i.join(t)),parseInt(e)>=0&&parseInt(e)<10?("0"==this.values[this.index]&&e>0?this.values[this.index]="":"-0"==this.values[this.index]&&e>0&&(this.values[this.index]="-"),("0"!=this.values[this.index]&&"-0"!=this.values[this.index]||e==t)&&(this.values[this.index]+=e)):t&&e==t?-1==this.values[this.index].indexOf(t)&&(this.values[this.index]||(this.values[this.index]="0"),this.values[this.index]+=e):"-"==e&&(n=!0),!0===n&&"-"!==this.values[this.index][0]&&(this.values[this.index]="-"+this.values[this.index])},"0{1}(.{1}0+)?E{1}\\+0+":function(e){b["0{1}(.{1}0+)?"].call(this,e)},"0{1}(.{1}0+)?%":function(e){b["0{1}(.{1}0+)?"].call(this,e),this.values[this.index].match(/[\-0-9]/g)?this.values[this.index]&&-1==this.values[this.index].indexOf("%")&&(this.values[this.index]+="%"):this.values[this.index]=""},"#(.{1})##0?(.{1}0+)?( ?;(.*)?)?":function(e){b["0{1}(.{1}0+)?"].call(this,e);var t=r.call(this),n=this.tokens[this.index].substr(1,1),i="-"===this.values[this.index][0],o=l.call(this,this.values[this.index],t);if(""!==o){var a=o[0].match(/[0-9]/g);if(a){for(var s=[],d=0,c=(a=a.join("")).length-1;c>=0;c--)s.push(a[c]),++d%3||s.push(n);s=s.reverse(),o[0]=s.join(""),o[0].substr(0,1)==n&&(o[0]=o[0].substr(1))}else o[0]="";this.values[this.index]=o.join(t),i&&(this.values[this.index]="-"+this.values[this.index])}},0:function(e){e.match(/[0-9]/g)&&(this.values[this.index]=e,this.index++)},"[0-9a-zA-Z$]+":function(e){o(this.values[this.index])&&(this.values[this.index]="");var t=this.tokens[this.index];t[this.values[this.index].length]==e?(this.values[this.index]+=e,this.values[this.index]==t&&this.index++):(this.values[this.index]=t,this.index++,e.match(/[\-0-9]/g)&&this.position--)},A:function(e){e.match(/[a-zA-Z]/gi)&&(this.values[this.index]=e,this.index++)},".":function(e){b["[0-9a-zA-Z$]+"].call(this,e)},"@":function(e){o(this.values[this.index])&&(this.values[this.index]=""),this.values[this.index]+=e}},x=function(e){if("general"==this.type)var n=[].concat(t.general);else n=[].concat(t.currency,t.datetime,t.percentage,t.scientific,t.numeric,t.text,t.general);var i=new RegExp(n.join("|"),"gi");return e.match(i)},w=function(e){if(this.type)if("text"==this.type)n=["text"];else if("general"==this.type)n=["general"];else if("datetime"==this.type)n=["numeric","datetime","general"];else n=["currency","percentage","scientific","numeric","general"];else var n=Object.keys(t);for(var i=0;i<n.length;i++)for(var o=n[i],a=0;a<t[o].length;a++){var s=new RegExp(t[o][a],"gi");if(e.match(s))return{type:o,method:t[o][a]}}},L=function(e){for(var t=[],n=0;n<e.length;n++){var i=w.call(this,e[n]);i?t.push(i.method):t.push(null)}for(n=0;n<t.length;n++)"MM"==t[n]&&(t[n-1]&&t[n-1].indexOf("H")>=0||t[n-2]&&t[n-2].indexOf("H")>=0||t[n+1]&&t[n+1].indexOf("S")>=0||t[n+2]&&t[n+2].indexOf("S")>=0)&&(t[n]="MI");return t},j=function(e){var t=w.call(this,e);if(t)var n=t.type;if(n){for(var i=0,o=x.call(this,e),s=0;s<o.length;s++)(t=w.call(this,o[s]))&&a(t.type)&&i++;i>1&&(n="general")}return n},E=function(){"function"==typeof b[this.methods[this.index]]?(b[this.methods[this.index]].call(this,this.value[this.position]),this.position++):(this.values[this.index]=this.tokens[this.index],this.index++)},C=function(e){return(""+ +e).replace(/(-?)(\d*)\.?(\d*)e([+-]\d+)/,(function(e,t,n,i,o){return o<0?t+"0."+Array(1-o-n.length).join(0)+n+i:t+n+i+Array(o-i.length+1).join(0)}))},T=function(e,t,i){var o=null,l={input:null,value:null,options:{},values:[],index:0,position:0,date:[0,0,0,0,0,0],number:0};if("object"==typeof e){if(l.input=e.target,l.value=f.call(e.target),l.caret=p.call(e.target),(o=e.target.getAttribute("data-mask"))&&(l.mask=o),(o=e.target.getAttribute("data-type"))&&(l.type=o),e.target.mask?(e.target.mask.options&&(l.options=e.target.mask.options),e.target.mask.locale&&(l.locale=e.target.mask.locale)):(o=e.target.getAttribute("data-locale"))&&(l.locale=o,l.mask&&(l.options.style=l.mask)),e.target.attributes&&e.target.attributes.length)for(var h=0;h<e.target.attributes.length;h++){var m=e.target.attributes[h].name,v=e.target.attributes[h].value;"data"==m.substr(0,4)&&(l.options[m.substr(5)]=v)}}else{if("string"==typeof t)l.mask=t;else for(m=Object.keys(t),h=0;h<m.length;h++)l[m[h]]=t[m[h]];"number"==typeof e&&(r.call(l,l.mask),e=(""+e).replace(".",l.options.decimal)),l.value=e,l.input&&(f.call(l.input,e),s.focus(l.input),l.caret=p.call(l.input))}if("="!=(""+l.value)[0]&&(l.mask||l.locale)){if(l.mask){if(l.mask=l.mask.replace(new RegExp(/\[h]/),"|h|"),l.mask=l.mask.replace(new RegExp(/\[.*?\]/),""),l.mask=l.mask.replace(new RegExp(/\|h\|/),"[h]"),-1!==l.mask.indexOf(";")){o=l.mask.split(";");l.mask=o[0]}var g;if(-1!==l.mask.indexOf("##"))(g=l.mask.split(";"))[0]&&("object"==typeof e&&(g[0]=g[0].replace(new RegExp(/_\)/g),""),g[0]=g[0].replace(new RegExp(/_\(/g),"")),g[0]=g[0].replace("*","\t"),g[0]=g[0].replace(new RegExp(/_-/g),""),g[0]=g[0].replace(new RegExp(/_/g),""),g[0]=g[0].replace(new RegExp(/"/g),""),g[0]=g[0].replace("##0.###","##0.000"),g[0]=g[0].replace("##0.##","##0.00"),g[0]=g[0].replace("##0.#","##0.0"),g[0]=g[0].replace("##0,###","##0,000"),g[0]=g[0].replace("##0,##","##0,00"),g[0]=g[0].replace("##0,#","##0,0")),l.mask=g[0];if(-1!==l.mask.indexOf("\\"))(g=l.mask.split(";"))[0]=g[0].replace(new RegExp(/\\/g),""),l.mask=g[0];l.type||(l.type=j.call(l,l.mask)),l.tokens=x.call(l,l.mask)}if("object"!=typeof e||!e.inputType||!e.inputType.indexOf("insert")||!e.inputType.indexOf("delete"))if(l.locale)if(l.input)c.call(l,l.input,e);else var y=d.call(l,l.value);else{for(l.methods=L.call(l,l.tokens),l.event=e;l.position<l.value.length&&void 0!==l.tokens[l.index];)E.call(l);y=l.values.join("");if(a(l.type)&&""!==y){for(;void 0!==l.tokens[l.index];){(o=w.call(l,l.tokens[l.index]))&&"general"==o.type&&(l.values[l.index]=l.tokens[l.index]),l.index++}var b=!0}else b=!1;if(y=l.values.join(""),l.input){if((o=y.length-l.value.length)>0)var C=l.caret+o;else C=l.caret;f.call(l.input,y,C,b)}}if(l.input){var k=null;if(a(l.type)){let e=f.call(l.input);l.number=u.call(l,e),k="percentage"==l.type&&-1!==(""+e).indexOf("%")?T.adjustPrecision(l.number/100):l.number}else"datetime"==l.type&&(k=n.call(l),l.date[0]&&l.date[1]&&l.date[2]&&l.input.setAttribute("data-completed",!0));k&&l.input.setAttribute("data-value",k)}if(void 0!==y)return i?l:y}};return T.adjustPrecision=function(e){if("number"==typeof e&&!Number.isInteger(e)){const t=e.toString().split(".");if(t[1]&&t[1].length>10){let n=0;const i=t[1][t[1].length-2];if(0==i||9==i){for(let e=t[1].length-2;e>0;e--){if(!(n>=0&&t[1][e]==i)){n=0;break}if(n++,n>6)break}if(n)return parseFloat(parseFloat(e).toFixed(t[1].length-1))}}}return e},T.getType=j,T.prepare=function(e,t){return t||(t={}),x.call(t,e)},T.apply=function(e){var t=f.call(e.target);1==e.key.length&&(t+=e.key),f.call(e.target,T(t,e.target.getAttribute("data-mask")))},T.run=function(e,t,n){return T(e,{mask:t,decimal:n})},T.extract=function(e,t,n){if(o(e))return e;if("object"!=typeof t)return e;if((t=Object.assign({},t)).options||(t.options={}),!t.mask&&t.format&&(t.mask=t.format),t.mask){if(-1!==t.mask.indexOf(";")){var a=t.mask.split(";");t.mask=a[0]}t.mask=t.mask.replace(new RegExp(/\[h]/),"|h|"),t.mask=t.mask.replace(new RegExp(/\[.*?\]/),""),t.mask=t.mask.replace(new RegExp(/\|h\|/),"[h]")}r.call(t,t.mask);var l=null,d=null;if("percent"==t.type||"percent"==t.options.style?l="percentage":t.mask&&(l=j.call(t,t.mask)),"text"===l){var c={};d=e}else if("general"===l){c=T(e,t,!0);d=e}else if("datetime"===l){e instanceof Date&&(e=T.getDateString(e,t.mask));c=T(e,t,!0);d=s.isNumeric(e)?e:i.call(c)}else if("scientific"===l){d=e,"string"==typeof e&&(d=Number(d));c=t}else{d=u.call(t,e),"percentage"===l&&-1!==(""+e).indexOf("%")&&(d/=100);c=t}return c.value=d,!c.type&&l&&(c.type=l),n?c:d},T.render=function(t,n,i,a){if(o(t))return t;if("object"!=typeof n)return t;if((n=Object.assign({},n)).options||(n.options={}),!n.mask&&n.format&&(n.mask=n.format),n.mask){if(-1!==n.mask.indexOf(";")){var s=n.mask.split(";");i||(s[0]=s[0].replace(new RegExp(/_\)/g),""),s[0]=s[0].replace(new RegExp(/_\(/g),"")),n.mask=s[0]}n.mask=n.mask.replace(new RegExp(/\[h]/),"|h|"),n.mask=n.mask.replace(new RegExp(/\[.*?\]/),""),n.mask=n.mask.replace(new RegExp(/\|h\|/),"[h]")}var l=null;"percent"==n.type||"percent"==n.options.style?l="percentage":n.mask?l=j.call(n,n.mask):t instanceof Date&&(l="datetime");var d=!1;if("datetime"==l||"calendar"==n.type)(s=T.getDateString(t,n.mask))&&(t=s),n.mask&&i&&(d=!0);else if("text"===l)"number"==typeof t&&(t=t.toString());else if("string"==typeof t&&e.isNumeric(t)&&(t=Number(t)),"percentage"===l&&(t=T.adjustPrecision(100*t)),"number"==typeof t){s=null;if(n.mask&&i){var c=r.call(n,n.mask);if("scientific"===l)if(-1!==n.mask.indexOf(c)){let e=n.mask.split("E");e=e[0].split(c),e=""+e[1].match(/[0-9]+/g),e=e.length,s=t.toExponential(e)}else s=t.toExponential(0);else{if(-1!==n.mask.indexOf(c)){c=(c=""+(c=n.mask.split(c))[1].match(/[0-9]+/g)).length,s=t.toFixed(c);let e=t.toString().split("."),i=e[1];i&&i.length>c&&"5"===i[i.length-1]&&(s=parseFloat(e[0]+"."+i+"1").toFixed(c))}else s=t.toFixed(0);-1!==(""+s).indexOf("e")&&(s=C(s))}}else if(n.locale&&i){c=(""+t).split(".");if(n.options){void 0===c[1]&&(c[1]="");var u=c[1].length;if(n.options.minimumFractionDigits>u)for(var p=0;p<n.options.minimumFractionDigits-u;p++)c[1]+="0"}s=c[1].length?c.join("."):c[0];u=c[1].length;n.options&&n.options.maximumFractionDigits<u&&(s=parseFloat(s).toFixed(n.options.maximumFractionDigits))}else s=C(t);null!==s&&(t=s,r.call(n,n.mask),n.options.decimal&&(t=t.replace(".",n.options.decimal)))}else n.mask&&i&&(d=!0);if(d){var f=n.mask.length-t.length;if(f>0)for(p=0;p<f;p++)t+=" "}if("scientific"===l){if(i)return t;t=C(t)}if("numeric"===l&&!1===a&&"string"==typeof t)return t;if(t=T(t,n),i&&"numeric"===l){var h=n.mask.match(new RegExp(/^[0]+$/gm));if(h&&1===h.length){var m=h[0].length;if(m>3)for(t=""+t;t.length<m;)t="0"+t}}return t},T.set=function(e,t){if(t){e.setAttribute("data-mask",t);var n=new Event("input",{bubbles:!0,cancelable:!0});e.dispatchEvent(n)}},T.extractDateFromString=function(e,t){var n=T(e,{mask:t},!0);if(e>0&&Number(e)==e&&(n.values.join("")!==n.value||"numeric"==n.type)){var i=new Date(Math.round(86400*(e-25569)*1e3));return i.getFullYear()+"-"+s.two(i.getMonth())+"-"+s.two(i.getDate())+" 00:00:00"}var o=!1;return n.values&&n.values.length===n.tokens.length&&n.values[n.values.length-1].length>=n.tokens[n.tokens.length-1].length&&(o=!0),n.date[0]&&n.date[1]&&(n.date[2]||o)?(n.date[2]||(n.date[2]=1),n.date[0]+"-"+s.two(n.date[1])+"-"+s.two(n.date[2])+" "+s.two(n.date[3])+":"+s.two(n.date[4])+":"+s.two(n.date[5])):""},T.getDateString=function(e,t){if(!t)t={};if(t&&"object"==typeof t){if(t.format)var n=t.format;else if(t.mask)n=t.mask}else n=t;if(n||(n="YYYY-MM-DD"),n.indexOf("[h]")>=0){var i=0;if(e&&s.isNumeric(e)&&(i=parseFloat(24*Number(e)),n.indexOf("mm")>=0)){if((u=(""+i).split("."))[1]){var o=60*parseFloat("0."+u[1]);o=parseFloat(o.toFixed(2))}else o=0;i=parseInt(u[0])+":"+s.two(o)}return i}e instanceof Date?e=h.now(e):e&&s.isNumeric(e)&&(e=h.numToDate(e));for(var a=new RegExp(["DAY","WD","DDDD","DDD","DD","D","Q","HH24","HH12","HH","H","AM/PM","MI","SS","MS","YYYY","YYY","YY","Y","MONTH","MON","MMMMM","MMMM","MMM","MM","M","."].join("|"),"gi"),r=n.match(a),l=0;l<r.length;l++)"MM"==r[l].toUpperCase()&&(r[l-1]&&r[l-1].toUpperCase().indexOf("H")>=0||r[l-2]&&r[l-2].toUpperCase().indexOf("H")>=0||r[l+1]&&r[l+1].toUpperCase().indexOf("S")>=0||r[l+2]&&r[l+2].toUpperCase().indexOf("S")>=0)&&(r[l]="mi");var d={tokens:r};if(e){var c=-1!==(o=""+e).indexOf("T")?"T":" ",u=0,p=0,f=0;(o=o.split(c))[1]&&(p=(u=o[1].split(":"))[1]?u[1]:0,f=u[2]?u[2]:0,u=u[0]?u[0]:0),o=o[0].split("-");let t=new Date(o[0],o[1],0).getDate();if(o[0]&&o[1]&&o[2]&&o[0]>0&&o[1]>0&&o[1]<13&&o[2]>0&&o[2]<=t){d.data=[o[0],o[1],o[2],u,p,f],d.value=[];var m=new Date(d.data[0],d.data[1]-1,d.data[2],d.data[3],d.data[4],d.data[5]),v=function(e){var t=this.tokens[e],n=t.toUpperCase(),i=null;"YYYY"===n?i=this.data[0]:"YYY"===n?i=this.data[0].substring(1,4):"YY"===n?i=this.data[0].substring(2,4):"Y"===n?i=this.data[0].substring(3,4):"MON"===t?i=h.months[m.getMonth()].substr(0,3).toUpperCase():"mon"===t?i=h.months[m.getMonth()].substr(0,3).toLowerCase():"MONTH"===t?i=h.months[m.getMonth()].toUpperCase():"month"===t?i=h.months[m.getMonth()].toLowerCase():"MMMMM"===n?i=h.months[m.getMonth()].substr(0,1):"MMMM"===n||"Month"===t?i=h.months[m.getMonth()]:"MMM"===n||"Mon"==t?i=h.months[m.getMonth()].substr(0,3):"MM"===n?i=s.two(this.data[1]):"M"===n?i=m.getMonth()+1:"DAY"===t?i=h.weekdays[m.getDay()].toUpperCase():"day"===t?i=h.weekdays[m.getDay()].toLowerCase():"DDDD"===n||"Day"==t?i=h.weekdays[m.getDay()]:"DDD"===n?i=h.weekdays[m.getDay()].substr(0,3):"DD"===n?i=s.two(this.data[2]):"D"===n?i=parseInt(this.data[2]):"Q"===n?i=Math.floor((m.getMonth()+3)/3):"HH24"===n||"HH"===n?((i=this.data[3])>12&&-1!==this.tokens.indexOf("am/pm")&&(i-=12),i=s.two(i)):"HH12"===n?i=this.data[3]>12?s.two(this.data[3]-12):s.two(this.data[3]):"H"===n?(i=this.data[3])>12&&-1!==this.tokens.indexOf("am/pm")&&(i-=12,i=s.two(i)):"MI"===n?i=s.two(this.data[4]):"SS"===n?i=s.two(this.data[5]):"MS"===n?i=m.getMilliseconds():"AM/PM"===n?i=this.data[3]>=12?"PM":"AM":"WD"===n&&(i=h.weekdays[m.getDay()]),this.value[e]=null===i?this.tokens[e]:i};for(l=0;l<d.tokens.length;l++)v.call(d,l);e=d.value.join("")}else e=""}return e},T}();var v=function(){var e=function(i,o){if(i.calendar)return i.calendar.setOptions(o,!0);var a={type:"calendar",options:{},date:null,setOptions:function(n,o){var r={type:"default",validRange:null,startingDay:null,format:"DD/MM/YYYY",readonly:!0,today:!1,time:!1,resetButton:!0,placeholder:"",months:h.monthsShort,monthsFull:h.months,weekdays:h.weekdays,textDone:t.translate("Done"),textReset:t.translate("Reset"),textUpdate:t.translate("Update"),value:null,fullscreen:!1,opened:!1,onopen:null,onclose:null,onchange:null,onupdate:null,mode:null,position:null,dataType:null,controls:!0,autoSelect:!0};for(var l in r)n&&n.hasOwnProperty(l)?a.options[l]=n[l]:void 0!==a.options[l]&&!0!==o||(a.options[l]=r[l]);if(0==a.options.resetButton?u.style.display="none":u.style.display="",a.options.readonly?i.setAttribute("readonly","readonly"):i.removeAttribute("readonly"),a.options.placeholder?i.setAttribute("placeholder",a.options.placeholder):i.removeAttribute("placeholder"),s.isNumeric(a.options.value)&&a.options.value>0&&(a.options.value=e.numToDate(a.options.value),a.options.dataType="numeric"),u.innerHTML=a.options.textReset,p.innerHTML=a.options.textDone,E.innerHTML=a.options.textUpdate,a.options.format&&i.setAttribute("data-mask",a.options.format.toLowerCase()),!a.options.value&&a.options.today)var d=e.now();else d=a.options.value;return d&&(a.options.value=null,a.setValue(d)),a},open:function(t){if(!c.classList.contains("jcalendar-focus")&&!c.classList.contains("jcalendar-inline")){if(e.current=a,n(a,!0),a.getDays(),"year-month-picker"==a.options.type&&a.getMonths(),a.options.time&&(C.value=a.date[3],T.value=a.date[4]),c.classList.add("jcalendar-focus"),s.getWindowWidth()<800||a.options.fullscreen)c.classList.add("jcalendar-fullsize"),f.slideBottom(v,1);else{c.classList.remove("jcalendar-fullsize");var o=i.getBoundingClientRect(),r=v.getBoundingClientRect();if(a.options.position)m.style.position="fixed",window.innerHeight<o.bottom+r.height?m.style.top=o.top-(r.height+2)+"px":m.style.top=o.top+o.height+2+"px",m.style.left=o.left+"px";else{if(window.innerHeight<o.bottom+r.height)(l=-1*(o.height+r.height+2))+o.top<0&&(l=-1*(o.top+o.height)),m.style.top=l+"px";else m.style.top="2px";if(window.innerWidth<o.left+r.width){var l=window.innerWidth-(o.left+r.width+20);m.style.left=l+"px"}else m.style.left="0px"}}"function"==typeof a.options.onopen&&a.options.onopen(i)}},close:function(t,o){if(!0!==a.options.autoSelect&&void 0===o&&(o=!1),c.classList.contains("jcalendar-focus")){if(!1!==o){var s=c.querySelector(".jcalendar-selected");if("string"==typeof o)var r=o;else if(!s||s.classList.contains("jcalendar-disabled"))r=a.options.value;else r=a.getValue();a.setValue(r)}else{let e=a.options.value||"";a.options.value=null,a.setValue(e)}t||"function"!=typeof a.options.onclose||a.options.onclose(i),c.classList.remove("jcalendar-focus"),n(a,!1),e.current=null}return a.options.value},prev:function(){"years"==a.options.mode?(a.date[0]=a.date[0]-12,a.getYears()):"months"==a.options.mode?(a.date[0]=parseInt(a.date[0])-1,a.getMonths()):(a.date[1]<2?(a.date[0]=a.date[0]-1,a.date[1]=12):a.date[1]=a.date[1]-1,a.getDays())},next:function(){"years"==a.options.mode?(a.date[0]=parseInt(a.date[0])+12,a.getYears()):"months"==a.options.mode?(a.date[0]=parseInt(a.date[0])+1,a.getMonths()):(a.date[1]>11?(a.date[0]=parseInt(a.date[0])+1,a.date[1]=1):a.date[1]=parseInt(a.date[1])+1,a.getDays())},setToday:function(){var e=(new Date).toISOString().substr(0,10);return a.setValue(e),e},setValue:function(n){n||(n=""+n);var o=n,s=a.options.value;if(s!=o){if(o){a.setLabel(o,a.options);(l=o.split(" "))[1]||(l[1]="00:00:00");var r=l[1].split(":"),l=l[0].split("-"),d=parseInt(l[0]),c=parseInt(l[1]),u=parseInt(l[2]),p=parseInt(r[0]),f=parseInt(r[1]);a.date=[d,c,u,p,f,0];n=a.setLabel(o,a.options);var h=e.now(new Date(d,c-1,u),!0);if(a.options.validRange){if(!a.options.validRange[0]||h>=a.options.validRange[0])var m=!0;else m=!1;if(!a.options.validRange[1]||h<=a.options.validRange[1])var v=!0;else v=!1;m&&v?(i.classList.remove("jcalendar_warning"),i.title=""):(i.classList.add("jcalendar_warning"),i.title=t.translate("Date outside the valid range"))}else i.classList.remove("jcalendar_warning"),i.title=""}else{a.date=null;var n="";i.classList.remove("jcalendar_warning"),i.title=""}a.options.value=o,"function"==typeof a.options.onchange&&a.options.onchange(i,o,s),i.value!=n&&(i.value=n,"function"==typeof i.oninput&&i.oninput({type:"input",target:i,value:i.value}))}a.date&&(a.getDays(),"year-month-picker"==a.options.type&&a.getMonths())},getValue:function(){return a.date?a.options.time?s.two(a.date[0])+"-"+s.two(a.date[1])+"-"+s.two(a.date[2])+" "+s.two(a.date[3])+":"+s.two(a.date[4])+":"+s.two(0):s.two(a.date[0])+"-"+s.two(a.date[1])+"-"+s.two(a.date[2])+" "+s.two(0)+":"+s.two(0)+":"+s.two(0):""},update:function(e,t){if(e.classList.contains("jcalendar-disabled"));else{var n=c.querySelector(".jcalendar-selected");n&&n.classList.remove("jcalendar-selected"),e.classList.add("jcalendar-selected"),e.classList.contains("jcalendar-set-month")?(a.date[1]=t,a.date[2]=1):a.date[2]=e.innerText,a.options.time?(a.date[3]=C.value,a.date[4]=T.value):a.close(null,!0)}d()},reset:function(){a.setValue(""),a.date=null,a.close(!1,!1)},getDays:function(){a.options.mode="days";var t=new Date,n=a.date&&s.isNumeric(a.date[0])?a.date[0]:parseInt(t.getFullYear()),i=a.date&&s.isNumeric(a.date[1])?a.date[1]:parseInt(t.getMonth())+1,o=a.date&&s.isNumeric(a.date[2])?a.date[2]:parseInt(t.getDate()),r=a.date&&s.isNumeric(a.date[3])?a.date[3]:parseInt(t.getHours()),l=a.date&&s.isNumeric(a.date[4])?a.date[4]:parseInt(t.getMinutes());a.date=[n,i,o,r,l,0],g.innerHTML=n,y.innerHTML=a.options.months[i-1];var c=t.getMonth()==i-1&&t.getFullYear()==n,u=t.getDate(),p=(t=new Date(n,i,0,0,0)).getDate(),f=(t=new Date(n,i-1,0,0,0)).getDay()+1;f-=m=a.options.startingDay||0,x.innerHTML="",(w=document.createElement("tr")).setAttribute("align","center"),x.appendChild(w);for(var h=0;h<7;h++){(j=document.createElement("td")).classList.add("jcalendar-weekday"),j.innerHTML=a.options.weekdays[m].substr(0,1),w.appendChild(j),++m>6&&(m=0)}for(var m=0,v=0,b=0;b<6;b++){var w;(w=document.createElement("tr")).setAttribute("align","center"),w.style.height="34px";for(h=0;h<7;h++){var j;if((j=document.createElement("td")).classList.add("jcalendar-set-day"),m>=f&&m<f+p){v++,j.innerHTML=v,v==o&&j.classList.add("jcalendar-selected"),c&&u==v&&(j.style.fontWeight="bold");var E=e.now(new Date(n,i-1,v),!0);if(a.options.validRange){if(!a.options.validRange[0]||E>=a.options.validRange[0])var C=!0;else C=!1;if(!a.options.validRange[1]||E<=a.options.validRange[1])var T=!0;else T=!1;C&&T||j.classList.add("jcalendar-disabled")}}w.appendChild(j),m++}x.appendChild(w)}a.options.time?L.style.display="":L.style.display="none",d()},getMonths:function(){a.options.mode="months";var e=a.options.months,t=(a.options.value,new Date),n=parseInt(t.getFullYear()),i=parseInt(t.getMonth())+1,o=a.date&&s.isNumeric(a.date[0])?a.date[0]:n,r=a.date&&s.isNumeric(a.date[1])?a.date[1]:i;g.innerHTML=a.date[0],y.innerHTML=e[r-1];var l=document.createElement("table");l.setAttribute("width","100%");for(var c=null,u=0;u<12;u++){if(!(u%4))(c=document.createElement("tr")).setAttribute("align","center"),l.appendChild(c);var p=document.createElement("td");if(p.classList.add("jcalendar-set-month"),p.setAttribute("data-value",u+1),p.innerText=e[u],a.options.validRange){var f=o+"-"+s.two(u+1);if(!a.options.validRange[0]||f>=a.options.validRange[0].substr(0,7))var h=!0;else h=!1;if(!a.options.validRange[1]||f<=a.options.validRange[1].substr(0,7))var m=!0;else m=!1;h&&m||p.classList.add("jcalendar-disabled")}u+1==r&&p.classList.add("jcalendar-selected"),n==o&&u+1==i&&(p.style.fontWeight="bold"),c.appendChild(p)}x.innerHTML='<tr><td colspan="7"></td></tr>',x.children[0].children[0].appendChild(l),d()},getYears:function(){a.options.mode="years";for(var e=new Date,t=e.getFullYear(),n=a.date&&s.isNumeric(a.date[0])?a.date[0]:parseInt(e.getFullYear()),i=[],o=0;o<25;o++)i[o]=parseInt(a.date[0])+(o-12);var r=document.createElement("table");r.setAttribute("width","100%");for(o=0;o<25;o++){if(!(o%5)){var l=document.createElement("tr");l.setAttribute("align","center"),r.appendChild(l)}var c=document.createElement("td");c.classList.add("jcalendar-set-year"),c.innerText=i[o],n==i[o]&&c.classList.add("jcalendar-selected"),t==i[o]&&(c.style.fontWeight="bold"),l.appendChild(c)}x.innerHTML='<tr><td colspan="7"></td></tr>',x.firstChild.firstChild.appendChild(r),d()},setLabel:function(t,n){return e.getDateString(t,n)},fromFormatted:function(t,n){return e.extractDateFromString(t,n)}},r=function(e){if(s.findElement(e.target,"jcalendar-container")){var t=e.target.className;if("jcalendar-prev"==t)a.prev();else if("jcalendar-next"==t)a.next();else if("jcalendar-month"==t)a.getMonths();else if("jcalendar-year"==t)a.getYears();else if("jcalendar-set-year"==t)a.date[0]=e.target.innerText,"year-month-picker"==a.options.type?a.getMonths():a.getDays();else if(e.target.classList.contains("jcalendar-set-month")){var n=parseInt(e.target.getAttribute("data-value"));"year-month-picker"==a.options.type?a.update(e.target,n):(a.date[1]=n,a.getDays())}else"jcalendar-confirm"==t||"jcalendar-update"==t||"jcalendar-close"==t?a.close(null,!0):"jcalendar-backdrop"==t?a.close(!1,!1):"jcalendar-reset"==t?a.reset():e.target.classList.contains("jcalendar-set-day")&&e.target.innerText&&a.update(e.target)}else a.close(!1,!1)},l=function(t){if(t.target.value&&t.target.value.length>3){var n=e.extractDateFromString(t.target.value,a.options.format);n&&a.setValue(n)}},d=function(){var e=c.querySelector(".jcalendar-selected");e&&e.classList.contains("jcalendar-disabled")?(E.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled")):(E.removeAttribute("disabled"),C.removeAttribute("disabled"),T.removeAttribute("disabled")),"function"==typeof a.options.onupdate&&a.options.onupdate(i,a.getValue())},c=null,u=null,p=null,m=null,v=null,g=null,y=null,b=null,x=null,w=null,L=null,j=null,E=null,C=null,T=null;return function(){"INPUT"==i.tagName&&i.value&&(o.value=i.value),(u=document.createElement("div")).className="jcalendar-reset",(p=document.createElement("div")).className="jcalendar-confirm",(w=document.createElement("div")).className="jcalendar-controls",w.style.borderBottom="1px solid #ddd",w.appendChild(u),w.appendChild(p),(m=document.createElement("div")).className="jcalendar-container",(v=document.createElement("div")).className="jcalendar-content",m.appendChild(v),"DIV"==i.tagName?(c=i).classList.add("jcalendar-inline"):(v.appendChild(w),(c=document.createElement("div")).className="jcalendar"),c.classList.add("jcalendar-container"),c.appendChild(m);var t=document.createElement("div");t.className="jcalendar-table",v.appendChild(t);var n=document.createElement("td");n.setAttribute("colspan","2"),n.className="jcalendar-prev",(g=document.createElement("span")).className="jcalendar-year",(y=document.createElement("span")).className="jcalendar-month";var d=document.createElement("td");d.className="jcalendar-header",d.setAttribute("colspan","3"),d.appendChild(y),d.appendChild(g);var h=document.createElement("td");h.setAttribute("colspan","2"),h.className="jcalendar-next";var k=document.createElement("thead"),A=document.createElement("tr");A.appendChild(n),A.appendChild(d),A.appendChild(h),k.appendChild(A),b=document.createElement("table"),x=document.createElement("tbody"),b.setAttribute("cellpadding","0"),b.setAttribute("cellspacing","0"),b.appendChild(k),b.appendChild(x),t.appendChild(b),(C=document.createElement("select")).className="jcalendar-select",C.onchange=function(){a.date[3]=this.value,"function"==typeof a.options.onupdate&&a.options.onupdate(i,a.getValue())};for(var O=0;O<24;O++){(N=document.createElement("option")).value=O,N.innerHTML=s.two(O),C.appendChild(N)}(T=document.createElement("select")).className="jcalendar-select",T.onchange=function(){a.date[4]=this.value,"function"==typeof a.options.onupdate&&a.options.onupdate(i,a.getValue())};for(O=0;O<60;O++){var N;(N=document.createElement("option")).value=O,N.innerHTML=s.two(O),T.appendChild(N)}var D=document.createElement("div");D.className="jcalendar-controls",(L=document.createElement("div")).className="jcalendar-time",L.style.maxWidth="140px",L.appendChild(C),L.appendChild(T),(E=document.createElement("button")).setAttribute("type","button"),E.className="jcalendar-update",(j=document.createElement("div")).style.flexGrow="10",j.appendChild(E),D.appendChild(L),"INPUT"==i.tagName&&D.appendChild(j),v.appendChild(D);var M=document.createElement("div");M.className="jcalendar-backdrop",c.appendChild(M),i.addEventListener("keyup",l),c.addEventListener("swipeleft",(function(e){f.slideLeft(b,0,(function(){a.next(),f.slideRight(b,1)})),e.preventDefault(),e.stopPropagation()})),c.addEventListener("swiperight",(function(e){f.slideRight(b,0,(function(){a.prev(),f.slideLeft(b,1)})),e.preventDefault(),e.stopPropagation()})),"ontouchend"in document.documentElement==!0?(c.addEventListener("touchend",r),i.addEventListener("touchend",a.open)):(c.addEventListener("mouseup",r),i.addEventListener("mouseup",a.open)),e.hasEvents||(e.hasEvents=!0,document.addEventListener("keydown",e.keydown)),a.setOptions(o),"INPUT"==i.tagName?(i.parentNode.insertBefore(c,i.nextSibling),i.setAttribute("autocomplete","off"),i.classList.add("jcalendar-input"),i.value=a.setLabel(a.getValue(),a.options)):(a.getDays(),a.options.time&&(C.value=a.date[3],T.value=a.date[4])),1==a.options.opened&&a.open(),0==a.options.controls&&m.classList.add("jcalendar-hide-controls"),i.change=a.setValue,i.val=function(e){if(void 0===e)return a.getValue();a.setValue(e)},i.calendar=c.calendar=a}(),a};return e.keydown=function(t){var n=null;(n=e.current)&&(13==t.which?n.close(!1,!0):27==t.which&&n.close(!1,!1))},e.prettify=function(e,t){if(!t)t={justNow:"Just now",xMinutesAgo:"{0}m ago",xHoursAgo:"{0}h ago",xDaysAgo:"{0}d ago",xWeeksAgo:"{0}w ago",xMonthsAgo:"{0} mon ago",xYearsAgo:"{0}y ago"};-1===e.indexOf("GMT")&&-1===e.indexOf("Z")&&(e+=" GMT");var n=new Date,i=new Date(e),o=parseInt((n-i)/1e3/60);if(String.prototype.format=function(e){return this.replace("{0}",e)},0==o)var a=t.justNow;else if(o<90)a=t.xMinutesAgo.format(o);else if(o<1440)a=t.xHoursAgo.format(Math.round(o/60));else if(o<20160)a=t.xDaysAgo.format(Math.round(o/1440));else if(o<43200)a=t.xWeeksAgo.format(Math.round(o/10080));else if(o<1036800)a=t.xMonthsAgo.format(Math.round(o/43200));else a=t.xYearsAgo.format(Math.round(o/525600));return a},e.prettifyAll=function(){for(var t=document.querySelectorAll(".prettydate"),n=0;n<t.length;n++)t[n].getAttribute("data-date")?t[n].innerHTML=e.prettify(t[n].getAttribute("data-date")):t[n].innerHTML&&(t[n].setAttribute("title",t[n].innerHTML),t[n].setAttribute("data-date",t[n].innerHTML),t[n].innerHTML=e.prettify(t[n].innerHTML))},e.now=h.now,e.toArray=h.toArray,e.dateToNum=h.dateToNum,e.numToDate=h.numToDate,e.weekdays=h.weekdays,e.months=h.months,e.weekdaysShort=h.weekdaysShort,e.monthsShort=h.monthsShort,e.extractDateFromString=m.extractDateFromString,e.getDateString=m.getDateString,e}();var g=function(){var e={material:[["#ffebee","#fce4ec","#f3e5f5","#e8eaf6","#e3f2fd","#e0f7fa","#e0f2f1","#e8f5e9","#f1f8e9","#f9fbe7","#fffde7","#fff8e1","#fff3e0","#fbe9e7","#efebe9","#fafafa","#eceff1"],["#ffcdd2","#f8bbd0","#e1bee7","#c5cae9","#bbdefb","#b2ebf2","#b2dfdb","#c8e6c9","#dcedc8","#f0f4c3","#fff9c4","#ffecb3","#ffe0b2","#ffccbc","#d7ccc8","#f5f5f5","#cfd8dc"],["#ef9a9a","#f48fb1","#ce93d8","#9fa8da","#90caf9","#80deea","#80cbc4","#a5d6a7","#c5e1a5","#e6ee9c","#fff59d","#ffe082","#ffcc80","#ffab91","#bcaaa4","#eeeeee","#b0bec5"],["#e57373","#f06292","#ba68c8","#7986cb","#64b5f6","#4dd0e1","#4db6ac","#81c784","#aed581","#dce775","#fff176","#ffd54f","#ffb74d","#ff8a65","#a1887f","#e0e0e0","#90a4ae"],["#ef5350","#ec407a","#ab47bc","#5c6bc0","#42a5f5","#26c6da","#26a69a","#66bb6a","#9ccc65","#d4e157","#ffee58","#ffca28","#ffa726","#ff7043","#8d6e63","#bdbdbd","#78909c"],["#f44336","#e91e63","#9c27b0","#3f51b5","#2196f3","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],["#e53935","#d81b60","#8e24aa","#3949ab","#1e88e5","#00acc1","#00897b","#43a047","#7cb342","#c0ca33","#fdd835","#ffb300","#fb8c00","#f4511e","#6d4c41","#757575","#546e7a"],["#d32f2f","#c2185b","#7b1fa2","#303f9f","#1976d2","#0097a7","#00796b","#388e3c","#689f38","#afb42b","#fbc02d","#ffa000","#f57c00","#e64a19","#5d4037","#616161","#455a64"],["#c62828","#ad1457","#6a1b9a","#283593","#1565c0","#00838f","#00695c","#2e7d32","#558b2f","#9e9d24","#f9a825","#ff8f00","#ef6c00","#d84315","#4e342e","#424242","#37474f"],["#b71c1c","#880e4f","#4a148c","#1a237e","#0d47a1","#006064","#004d40","#1b5e20","#33691e","#827717","#f57f17","#ff6f00","#e65100","#bf360c","#3e2723","#212121","#263238"]],fire:[["0b1a6d","840f38","b60718","de030b","ff0c0c","fd491c","fc7521","faa331","fbb535","ffc73a"],["071147","5f0b28","930513","be0309","ef0000","fa3403","fb670b","f9991b","faad1e","ffc123"],["03071e","370617","6a040f","9d0208","d00000","dc2f02","e85d04","f48c06","faa307","ffba08"],["020619","320615","61040d","8c0207","bc0000","c82a02","d05203","db7f06","e19405","efab00"],["020515","2d0513","58040c","7f0206","aa0000","b62602","b94903","c57205","ca8504","d89b00"]],baby:[["eddcd2","fff1e6","fde2e4","fad2e1","c5dedd","dbe7e4","f0efeb","d6e2e9","bcd4e6","99c1de"],["e1c4b3","ffd5b5","fab6ba","f5a8c4","aacecd","bfd5cf","dbd9d0","baceda","9dc0db","7eb1d5"],["daa990","ffb787","f88e95","f282a9","8fc4c3","a3c8be","cec9b3","9dbcce","82acd2","649dcb"],["d69070","ff9c5e","f66770","f05f8f","74bbb9","87bfae","c5b993","83aac3","699bca","4d89c2"],["c97d5d","f58443","eb4d57","e54a7b","66a9a7","78ae9c","b5a67e","7599b1","5c88b7","4978aa"]],chart:[["#C1D37F","#4C5454","#FFD275","#66586F","#D05D5B","#C96480","#95BF8F","#6EA240","#0F0F0E","#EB8258","#95A3B3","#995D81"]]},t=function(t){return e[t]?e[t]:e.material};return t.get=function(t){return e[t]?e[t]:e},t.set=function(t,n){e[t]=n},t}();function b(e,t){var n={options:{}},i={data:[],position:null,allowCreate:!1,allowChangePosition:!1,onclick:null,onload:null,onchange:null,oncreate:null,ondelete:null,onbeforecreate:null,onchangeposition:null,animation:!1,hideHeaders:!1,padding:null,palette:null,maxWidth:null};for(var o in i)t&&t.hasOwnProperty(o)?n.options[o]=t[o]:n.options[o]=i[o];e.classList.add("jtabs");var a=null,r=null,l=null;const c=function(e){n.options.animation&&setTimeout((function(){let t=n.headers.children[e].getBoundingClientRect();"modern"===n.options.palette?(l.style.width=t.width-4+"px",l.style.left=n.headers.children[e].offsetLeft+2+"px"):(l.style.width=t.width+"px",l.style.left=n.headers.children[e].offsetLeft+"px"),"bottom"===n.options.position?l.style.top="0px":l.style.bottom="0px"}),50)};var u=function(e){"function"==typeof n.headers.scrollTo?n.headers.scrollTo({left:e,behavior:"smooth"}):n.headers.scrollLeft=e,e<=1?a.classList.add("disabled"):a.classList.remove("disabled"),e>=n.headers.scrollWidth-n.headers.offsetWidth?r.classList.add("disabled"):r.classList.remove("disabled"),n.headers.scrollWidth<=n.headers.offsetWidth?(a.style.display="none",r.style.display="none"):(a.style.display="",r.style.display="")};if(n.setBorder=c,n.open=function(t){Array.from(n.content.children);if(n.content.children[t]){for(var i=null,o=0;o<n.headers.children.length;o++)n.headers.children[o].classList.contains("jtabs-selected")&&(i=o),n.headers.children[o].classList.remove("jtabs-selected"),n.headers.children[o].removeAttribute("aria-selected"),n.content.children[o]&&n.content.children[o].classList.remove("jtabs-selected");if(n.headers.children[t].classList.add("jtabs-selected"),n.headers.children[t].setAttribute("aria-selected","true"),n.content.children[t]&&n.content.children[t].classList.add("jtabs-selected"),i!=t&&"function"==typeof n.options.onchange&&n.content.children[t]&&n.options.onchange(e,n,t,n.headers.children[t],n.content.children[t]),1==n.options.hideHeaders&&n.headers.children.length<3&&0==n.options.allowCreate)n.headers.parentNode.style.display="none";else{n.headers.parentNode.style.display="";var a=n.headers.children[t].offsetLeft,s=a+n.headers.children[t].offsetWidth,r=n.headers.scrollLeft,l=r+n.headers.offsetWidth;r<=a&&l>=s||u(a-1),c(t)}}},n.selectIndex=function(e){var t=Array.prototype.indexOf.call(n.headers.children,e);return t>=0&&n.open(t),t},n.rename=function(e,t){t||(t=prompt("New title",n.headers.children[e].innerText)),n.headers.children[e].innerText=t,c(n.getActive())},n.create=function(t,i){if("function"==typeof n.options.onbeforecreate){var o=n.options.onbeforecreate(e,t);if(!1===o)return!1;t=o}var a=n.appendElement(t);return"function"==typeof n.options.oncreate&&n.options.oncreate(e,a),c(n.getActive()),a},n.remove=function(e){return n.deleteElement(e)},n.nextNumber=function(){for(var e=0,t=0;t<n.headers.children.length;t++){var i=n.headers.children[t].innerText.match(/[0-9].*/);i>e&&(e=parseInt(i))}return e?e++:e=1,e},n.deleteElement=function(t){let i=n.getActive();if(!n.headers.children[t])return!1;if(n.headers.removeChild(n.headers.children[t]),n.content.removeChild(n.content.children[t]),i===t)n.open(0);else{let e=n.getActive()||0;c(e)}"function"==typeof n.options.ondelete&&n.options.ondelete(e,t)},n.appendElement=function(e,t,i,o){if(!e)e=prompt("Title?","");if(e){let l=s.guid(),d=s.guid();var a=document.createElement("div");a.setAttribute("id",d),a.setAttribute("role","tabpanel"),a.setAttribute("aria-labelledby",l);var r=document.createElement("div");if(r.setAttribute("id",l),r.setAttribute("role","tab"),r.setAttribute("aria-controls",d),r.textContent=e,r.content=a,void 0===o)n.content.appendChild(a),n.headers.insertBefore(r,n.headers.lastChild);else{let e=n.content.children[o];e?n.content.insertBefore(a,e):n.content.appendChild(a),e=n.headers.children[o]||n.headers.lastChild,n.headers.insertBefore(r,e)}return n.options.allowChangePosition&&r.setAttribute("draggable","true"),!1!==i&&n.selectIndex(r),"function"==typeof t&&t(a,r),a}},n.getActive=function(){for(var e=0;e<n.headers.children.length;e++)if(n.headers.children[e].classList.contains("jtabs-selected"))return e;return!1},n.updateContent=function(e,t){"string"!=typeof t||(document.createElement("div").innerHTML=t);n.content.children[e].classList.contains("jtabs-selected")&&t.classList.add("jtabs-selected"),n.content.replaceChild(t,n.content.children[e]),c()},n.updatePosition=function(e,t,i,o){if(e>t?n.content.insertBefore(n.content.children[e],n.content.children[t]):n.content.insertBefore(n.content.children[e],n.content.children[t].nextSibling),!1!==o)n.open(t);else{const e=n.getActive();t<e&&n.setBorder(e)}i||"function"!=typeof n.options.onchangeposition||n.options.onchangeposition(n.headers,e,t)},n.move=function(e,t,i,o){e>t?n.headers.insertBefore(n.headers.children[e],n.headers.children[t]):n.headers.insertBefore(n.headers.children[e],n.headers.children[t].nextSibling),n.updatePosition(e,t,i,o)},n.setBorder=c,n.init=function(){e.textContent="",n.headers=document.createElement("div"),n.content=document.createElement("div"),n.headers.classList.add("jtabs-headers"),n.headers.setAttribute("role","tablist"),n.content.classList.add("jtabs-content"),n.content.setAttribute("role","region"),n.content.setAttribute("aria-label","Tab Panels"),n.options.palette?e.classList.add("jtabs-modern"):e.classList.remove("jtabs-modern"),n.options.padding&&(n.content.style.padding=parseInt(n.options.padding)+"px");var t=document.createElement("div");t.className="jtabs-headers-container",t.appendChild(n.headers),n.options.maxWidth&&(t.style.maxWidth=parseInt(n.options.maxWidth)+"px");var i=document.createElement("div");if(i.className="jtabs-controls",i.setAttribute("draggable","false"),t.appendChild(i),"bottom"==n.options.position?(e.appendChild(n.content),e.appendChild(t)):(e.appendChild(t),e.appendChild(n.content)),1==n.options.allowCreate){var o=document.createElement("div");o.className="jtabs-add",o.onclick=function(){n.create()},i.appendChild(o)}(a=document.createElement("div")).className="jtabs-prev",a.onclick=function(){u(n.headers.scrollLeft-n.headers.offsetWidth)},i.appendChild(a),(r=document.createElement("div")).className="jtabs-next",r.onclick=function(){u(n.headers.scrollLeft+n.headers.offsetWidth)},i.appendChild(r);for(var s=0;s<n.options.data.length;s++){if(n.options.data[s].titleElement)var c=n.options.data[s].titleElement;else c=document.createElement("div");if(n.options.data[s].icon){var p=document.createElement("div"),f=document.createElement("i");f.classList.add("material-icons"),f.textContent=n.options.data[s].icon,p.appendChild(f),c.appendChild(p)}if(n.options.data[s].title){var h=document.createTextNode(n.options.data[s].title);c.appendChild(h)}if(n.options.data[s].width&&(c.style.width=n.options.data[s].width),n.options.data[s].contentElement)var m=n.options.data[s].contentElement;else(m=document.createElement("div")).innerHTML=n.options.data[s].content;n.headers.appendChild(c),n.content.appendChild(m)}(l=document.createElement("div")).className="jtabs-border",n.headers.appendChild(l),n.options.animation&&e.classList.add("jtabs-animation"),n.headers.addEventListener("click",(function(t){if(t.target.parentNode.classList.contains("jtabs-headers"))var i=t.target;else if("I"==t.target.tagName)i=t.target.parentNode.parentNode;else i=t.target.parentNode;var o=n.selectIndex(i);"function"==typeof n.options.onclick&&n.options.onclick(e,n,o,n.headers.children[o],n.content.children[o])})),n.headers.addEventListener("contextmenu",(function(e){n.selectIndex(e.target)})),n.headers.children.length&&n.open(0),u(0),1==n.options.allowChangePosition&&d(n.headers,{direction:1,ondrop:function(e,t,i){n.updatePosition(t,i)}}),"function"==typeof n.options.onload&&n.options.onload(e,n)},e.children[0]&&e.children[0].children.length)for(var f=0;f<e.children[0].children.length;f++){var h=n.options.data&&n.options.data[f]?n.options.data[f]:{};e.children[1]&&e.children[1].children[f]?(h.titleElement=e.children[0].children[f],h.contentElement=e.children[1].children[f]):h.contentElement=e.children[0].children[f],n.options.data[f]=h}var m=!1;if(n.options.data)for(f=0;f<n.options.data.length;f++)n.options.data[f].url&&(p({url:n.options.data[f].url,type:"GET",dataType:"text/html",index:f,success:function(e){n.options.data[this.index].content=e},complete:function(){n.init()}}),m=!0);return m||n.init(),e.tabs=n,n}function w(e,t){if(e.color)return e.color.setOptions(t,!0);var i={type:"color",options:{}},o=null,a=null,r=null,l=null,d=null,c=null,u=null;i.setOptions=function(t,n){var o={placeholder:"",value:null,onopen:null,onclose:null,onchange:null,closeOnChange:!0,palette:null,position:null,doneLabel:"Done",resetLabel:"Reset",fullscreen:!1,opened:!1};for(var a in t||(t={}),t&&!t.palette&&(t.palette=g()),o)t&&t.hasOwnProperty(a)?i.options[a]=t[a]:void 0!==i.options[a]&&!0!==n||(i.options[a]=o[a]);return l&&(l.innerHTML=i.options.resetLabel),d&&(d.innerHTML=i.options.doneLabel),i.options.palette&&u&&u.updateContent(0,y()),"string"==typeof i.options.value&&(e.value=i.options.value,"INPUT"===e.tagName&&(e.style.color=e.value,e.style.backgroundColor=e.value)),i.options.placeholder?e.setAttribute("placeholder",i.options.placeholder):e.getAttribute("placeholder")&&e.removeAttribute("placeholder"),i},i.select=function(e){var t=o.querySelector(".jcolor-selected");t&&t.classList.remove("jcolor-selected"),i.values[e]&&i.values[e].classList.add("jcolor-selected"),i.options.value=e},i.open=function(){if(!o.classList.contains("jcolor-focus")){n(i,!0),o.classList.add("jcolor-focus"),i.options.value&&i.select(i.options.value),r.style.marginTop="",r.style.marginLeft="";var t=r.getBoundingClientRect(),l=s.getWindowWidth(),d=s.getWindowHeight();if(l<800||1==i.options.fullscreen?(r.classList.add("jcolor-fullscreen"),f.slideBottom(r,1),a.style.display="block"):(r.classList.contains("jcolor-fullscreen")&&(r.classList.remove("jcolor-fullscreen"),a.style.display=""),i.options.position?r.style.position="fixed":r.style.position="",t.left+t.width>l&&(r.style.marginLeft=-1*(t.left+t.width-(l-20))+"px"),t.top+t.height>d&&(r.style.marginTop=-1*(t.top+t.height-(d-20))+"px")),"function"==typeof i.options.onopen&&i.options.onopen(e,i),u.setBorder(u.getActive()),i.options.value){var c=v(i.options.value);T.forEach((function(e,t){e.value=c[t],e.dispatchEvent(new Event("input"))}))}}},i.close=function(t){return o.classList.contains("jcolor-focus")&&(o.classList.remove("jcolor-focus"),a.style.display="",t||"function"!=typeof i.options.onclose||i.options.onclose(e,i),n(i,!1)),i.options.value},i.setValue=function(t){t||(t=""),t!=i.options.value&&(i.options.value=t,C=t,i.select(t),"function"==typeof i.options.onchange&&i.options.onchange(e,t,i),e.value!=i.options.value&&(e.value=i.options.value,"INPUT"===e.tagName&&(e.style.color=e.value,e.style.backgroundColor=e.value),"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value})),1==i.options.closeOnChange&&i.close())},i.getValue=function(){return i.options.value};var p=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},h=function(e,t,n){return"#"+p(e)+p(t)+p(n)},m=function(e){return parseInt("0x"+e)},v=function(e){return[m(e.substr(1,2)),m(e.substr(3,2)),m(e.substr(5,2))]},y=function(){var e=document.createElement("div");e.className="jcolor-grid",i.values=[];var t=document.createElement("table");t.setAttribute("cellpadding","7"),t.setAttribute("cellspacing","0");for(var n=0;n<i.options.palette.length;n++){for(var o=document.createElement("tr"),a=0;a<i.options.palette[n].length;a++){var s=document.createElement("td"),r=i.options.palette[n][a];r.length<7&&"#"!==r.substr(0,1)&&(r="#"+r),s.style.backgroundColor=r,s.setAttribute("data-value",r),s.innerHTML="",o.appendChild(s),i.options.value==r&&s.classList.add("jcolor-selected"),i.values[r]=s}t.appendChild(o)}return e.appendChild(t),e},x=document.createElement("canvas");x.width=200,x.height=160;var w=x.getContext("2d"),L=function(){var e=c.firstChild.getBoundingClientRect();x.width=e.width-14,j()},j=function(){var e=w.createLinearGradient(0,0,x.width,0);e.addColorStop(0,"rgb(255,0,0)"),e.addColorStop(.15,"rgb(255,0,255)"),e.addColorStop(.33,"rgb(0,0,255)"),e.addColorStop(.49,"rgb(0,255,255)"),e.addColorStop(.67,"rgb(0,255,0)"),e.addColorStop(.84,"rgb(255,255,0)"),e.addColorStop(1,"rgb(255,0,0)"),w.fillStyle=e,w.fillRect(0,0,x.width,x.height),(e=w.createLinearGradient(0,0,0,x.height)).addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(.5,"rgba(255,255,255,0)"),e.addColorStop(.5,"rgba(0,0,0,0)"),e.addColorStop(1,"rgba(0,0,0,1)"),w.fillStyle=e,w.fillRect(0,0,x.width,x.height)},E=function(){var e=document.createElement("div");e.className="jcolor-hsl";var t=document.createElement("div");t.className="jcolor-point";var n=document.createElement("div");n.appendChild(x),n.appendChild(t),e.appendChild(n);var i=function(n,i,o){if(1===n){var a=e.getBoundingClientRect(),s=i-a.left,r=o-a.top;s<0&&(s=0),r<0&&(r=0),s>a.width&&(s=a.width),r>a.height&&(r=a.height),t.style.left=s+"px",t.style.top=r+"px";var l=w.getImageData(s,r,1,1).data;C=h(l[0],l[1],l[2])}};return e.addEventListener("mousedown",(function(e){i(e.buttons,e.clientX,e.clientY)})),e.addEventListener("mousemove",(function(e){i(e.buttons,e.clientX,e.clientY)})),e.addEventListener("touchmove",(function(e){i(1,e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),e},C="",T=[],k=function(){var e=document.createElement("div");e.className="jcolor-sliders";var t=document.createElement("div"),n=function(e){var n=document.createElement("div");n.className="jcolor-sliders-input-container";var i=document.createElement("label");i.innerText=e;var o=document.createElement("div");o.className="jcolor-sliders-input-subcontainer";var a=document.createElement("input");a.type="range",a.min=0,a.max=255,a.value=0,a.setAttribute("aria-label","Color value"),a.setAttribute("aria-valuemin","0"),a.setAttribute("aria-valuemax","255"),a.setAttribute("aria-valuenow","0"),n.appendChild(i),o.appendChild(a);var s=document.createElement("div");return s.innerText=a.value,a.addEventListener("input",(function(){s.innerText=a.value})),o.appendChild(s),n.appendChild(o),t.appendChild(n),a};T=[n("Red"),n("Green"),n("Blue")],e.appendChild(t);var i=document.createElement("div");i.className="jcolor-sliders-final-color";var o=document.createElement("div");o.style.visibility="hidden",o.innerText="a",i.appendChild(o);return T.forEach((function(e){e.addEventListener("input",(function(){var e;e=h(parseInt(T[0].value),parseInt(T[1].value),parseInt(T[2].value)),o.innerText=e,o.style.color=e,o.style.removeProperty("visibility"),C=e,function(){if(""!==C)for(var e=0;e<T.length;e++){var t=v(C);t[e]=0;var n="linear-gradient(90deg, rgb(";n+=t.join(", "),n+="), rgb(",t[e]=255,n+=t.join(", "),n+="))",T[e].style.backgroundImage=n}}()}))})),e.appendChild(i),e};return i.toHex=function(e){var t=function(e){return("0"+parseInt(e).toString(16)).slice(-2)};if(e)return/^#[0-9A-F]{6}$/i.test(e)?e:(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))&&e.length?"#"+t(e[1])+t(e[2])+t(e[3]):""},function(){i.setOptions(t),"INPUT"==e.tagName&&(e.classList.add("jcolor-input"),e.readOnly=!0),(o=document.createElement("div")).className="jcolor",(a=document.createElement("div")).className="jcolor-backdrop",o.appendChild(a),(r=document.createElement("div")).className="jcolor-content";var n=document.createElement("div");n.className="jcolor-controls",r.appendChild(n),(l=document.createElement("div")).className="jcolor-reset",l.innerHTML=i.options.resetLabel,n.appendChild(l),(d=document.createElement("div")).className="jcolor-close",d.innerHTML=i.options.doneLabel,n.appendChild(d),c=document.createElement("div"),r.appendChild(c),u=b(c,{animation:!0,data:[{title:"Grid",contentElement:y()},{title:"Spectrum",contentElement:E()},{title:"Sliders",contentElement:k()}],onchange:function(e,t,n){if(1===n)L();else{var o=""!==C?C:i.getValue();if(2===n&&o){var a=v(o);T.forEach((function(e,t){e.value=a[t],e.dispatchEvent(new Event("input"))}))}}},palette:"modern"}),o.appendChild(r),"INPUT"==e.tagName?e.parentNode.insertBefore(o,e.nextSibling):e.appendChild(o),o.addEventListener("click",(function(e){if("TD"==e.target.tagName){var t=e.target.getAttribute("data-value");t&&i.setValue(t)}else e.target.classList.contains("jcolor-reset")?(i.setValue(""),i.close()):e.target.classList.contains("jcolor-close")?(u.getActive()>0&&i.setValue(C),i.close()):e.target.classList.contains("jcolor-backdrop")?i.close():i.open()})),e.addEventListener("mouseup",(function(e){i.open()})),window.addEventListener("resize",(function(){o.classList.contains("jcolor-focus")&&1==u.getActive()&&L()})),1==i.options.opened&&i.open(),e.change=i.setValue,e.val=function(e){if(void 0===e)return i.getValue();i.setValue(e)},e.color=i,o.color=i}(),i}var L=function(){var e=function(i,o){var a={type:"contextmenu",options:{}},s={items:null,onclick:null};for(var r in s)o&&o.hasOwnProperty(r)?a.options[r]=o[r]:a.options[r]=s[r];function l(e){if(!e.type||"line"!=e.type&&"divisor"!=e.type){d=document.createElement("div");var t=document.createElement("a");if(t.innerHTML=e.title,e.tooltip&&d.setAttribute("title",e.tooltip),e.icon&&d.setAttribute("data-icon",e.icon),e.id&&(d.id=e.id),e.disabled)d.className="jcontextmenu-disabled";else if(e.onclick){let t=e.onclick;d.addEventListener("mousedown",(function(e){e.preventDefault()})),d.addEventListener("mouseup",(function(e){t(this,e)}))}if(d.appendChild(t),e.submenu){var n=document.createElement("span");n.innerHTML="►",d.appendChild(n),d.classList.add("jcontexthassubmenu");var i=document.createElement("div");i.classList.add("jcontextmenu"),i.setAttribute("tabindex","900");for(var o=e.submenu,a=0;a<o.length;a++){var s=l(o[a]);i.appendChild(s)}d.appendChild(i),d.addEventListener("mouseenter",(function(){i.style.left="",i.style.right="",i.style.minWidth=d.offsetWidth+"px",i.style.display="block",i.style.opacity="0",i.style.pointerEvents="none";var e=d.getBoundingClientRect(),t=i.getBoundingClientRect(),n=window.innerWidth||document.documentElement.clientWidth,o=e.right+t.width,a=e.left-t.width;o>n&&a>=0?(i.style.left="auto",i.style.right="99%"):o>n&&a<0?(i.style.left="32px",i.style.right="auto",i.style.top="100%"):(i.style.left="99%",i.style.right="auto"),i.style.opacity="",i.style.pointerEvents="",i.style.display=""})),d.addEventListener("mouseleave",(function(){i.style.left="",i.style.right="",i.style.minWidth=""}))}else if(e.shortcut){var r=document.createElement("span");r.innerHTML=e.shortcut,d.appendChild(r)}}else var d=document.createElement("hr");return d}return i.classList.add("jcontextmenu"),a.open=function(t,o){if(o&&(a.options.items=o,a.create(o)),e.current&&e.current.close(),n(a,!0),i.classList.add("jcontextmenu-focus"),e.current=a,a.options.items&&a.options.items.length>0||i.children.length){if(t.target)if(t.changedTouches&&t.changedTouches[0])s=t.changedTouches[0].clientX,r=t.changedTouches[0].clientY;else var s=t.clientX,r=t.clientY;else s=t.x,r=t.y;var l=i.getBoundingClientRect();if(window.innerHeight<r+l.height){var d=r-l.height;d<0&&(d=0),i.style.top=d+"px"}else i.style.top=r+"px";window.innerWidth<s+l.width?s-l.width>0?i.style.left=s-l.width+"px":i.style.left="10px":i.style.left=s+"px"}},a.isOpened=function(){return!!i.classList.contains("jcontextmenu-focus")},a.close=function(){i.classList.contains("jcontextmenu-focus")&&i.classList.remove("jcontextmenu-focus"),n(a,!1)},a.create=function(e){i.innerHTML="";var n=function(){var e=document.createElement("div");e.classList.add("header"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}));var n=document.createElement("a");n.classList.add("title"),n.innerHTML=t.translate("Menu"),e.appendChild(n);var i=document.createElement("a");return i.classList.add("close"),i.innerHTML=t.translate("close"),i.addEventListener("click",(function(e){a.close()})),e.appendChild(i),e}();i.appendChild(n);for(var o=0;o<e.length;o++){var s=l(e[o]);i.appendChild(s)}},"function"==typeof a.options.onclick&&i.addEventListener("click",(function(e){a.options.onclick(a,e)})),a.options.items&&a.create(a.options.items),window.addEventListener("mousewheel",(function(){a.close()})),i.contextmenu=a,a};return e}();var j=function(){var e=function(i,o){if(i.dropdown)return i.dropdown.setOptions(o,!0);var a={type:"dropdown",options:{}},r=function(e,t){e&&e.length&&(!1!==a.options.sortResults&&("function"==typeof a.options.sortResults?e.sort(a.options.sortResults):e.sort(l)),a.setData(e)),"function"==typeof a.options.onload&&a.options.onload(i,a,e,t),t&&u(t),null==t&&(a.options.value=""),i.value=a.options.value,1==a.options.opened&&a.open()},l=function(e,t){var n,i;return"string"==typeof e?n=e:e.text?n=e.text:e.name&&(n=e.name),"string"==typeof t?i=t:t.text?i=t.text:t.name&&(i=t.name),"string"==typeof n||"string"==typeof i?("string"!=typeof n&&(n=""+n),"string"!=typeof i&&(i=""+i),n.localeCompare(i)):n-i},d=function(){a.value={};for(var e=0;e<a.items.length;e++)1==a.items[e].selected&&(a.items[e].element&&a.items[e].element.classList.remove("jdropdown-selected"),a.items[e].selected=null);a.options.value="",i.value=""},u=function(e){if(d(),null!==e)if(e){Array.isArray(e)||(e=(""+e).split(";"));for(var t=0;t<e.length;t++)a.value[e[t]]=""}else void 0!==a.value[""]&&(a.value[""]="");for(t=0;t<a.items.length;t++)void 0!==a.value[h(t)]&&(a.items[t].element&&a.items[t].element.classList.add("jdropdown-selected"),a.items[t].selected=!0,a.value[h(t)]=m(t));a.options.value=Object.keys(a.value).join(";"),a.header.value=a.getText()},h=function(e,t){if(a.options.format)n="id";else var n="value";return a.items[e]?void 0!==t?a.items[e].data[n]=t:a.items[e].data[n]:""},m=function(e,t){if(a.options.format)n="name";else var n="text";return a.items[e]?void 0!==t?a.items[e].data[n]=t:a.items[e].data[n]:""},v=function(){return Object.keys(a.value)},g=function(){for(var e=[],t=Object.keys(a.value),n=0;n<t.length;n++)e.push(a.value[t[n]]);return e};a.setOptions=function(e,t){e||(e={});var n={url:null,data:[],format:0,multiple:!1,autocomplete:!1,remoteSearch:!1,lazyLoading:!1,type:null,width:null,maxWidth:null,opened:!1,value:null,placeholder:"",newOptions:!1,position:!1,onchange:null,onload:null,onopen:null,onclose:null,onfocus:null,onblur:null,oninsert:null,onbeforeinsert:null,onsearch:null,onbeforesearch:null,sortResults:!1,autofocus:!1,prompt:null,allowEmpty:!0};for(var o in n)e&&e.hasOwnProperty(o)?a.options[o]=e[o]:void 0!==a.options[o]&&!0!==t||(a.options[o]=n[o]);return 1!=a.options.remoteSearch&&"searchbar"!==a.options.type||(a.options.autocomplete=!0),1==a.options.newOptions?a.header.classList.add("jdropdown-add"):a.header.classList.remove("jdropdown-add"),1==a.options.autocomplete?a.header.removeAttribute("readonly"):a.header.setAttribute("readonly","readonly"),a.options.placeholder?a.header.setAttribute("placeholder",a.options.placeholder):a.header.removeAttribute("placeholder"),i.classList.remove("jdropdown-searchbar"),i.classList.remove("jdropdown-picker"),i.classList.remove("jdropdown-list"),"searchbar"==a.options.type?i.classList.add("jdropdown-searchbar"):"list"==a.options.type?i.classList.add("jdropdown-list"):"picker"==a.options.type?i.classList.add("jdropdown-picker"):s.getWindowWidth()<800?a.options.autocomplete?(i.classList.add("jdropdown-searchbar"),a.options.type="searchbar"):(i.classList.add("jdropdown-picker"),a.options.type="picker"):(a.options.width?(i.style.width=a.options.width,i.style.minWidth=a.options.width):(i.style.removeProperty("width"),i.style.removeProperty("min-width")),i.classList.add("jdropdown-default"),a.options.type="default"),"searchbar"==a.options.type?y.appendChild(w):b.insertBefore(w,b.firstChild),a.options.url&&!e.data?p({url:a.options.url,method:"GET",dataType:"json",success:function(e){e&&r(e,a.options.value)}}):r(a.options.data,a.options.value),a};var y=null,b=null,x=null,w=null,L=null,j=null,E=null;a.getUrl=function(){return a.options.url},a.setUrl=function(e,t){a.options.url=e,p({url:a.options.url,method:"GET",dataType:"json",success:function(e){a.setData(e),"function"==typeof t&&t(a)}})},a.setId=function(e,t){if(a.options.format)n="id";else var n="value";"object"==typeof e?e[n]=t:a.items[e].data[n]=t};const C=function(e,n){if(!e){let n=1==a.options.autocomplete?a.header.value:"";if(!(e=prompt(t.translate("Add A New Option"),n)))return!1}if(n||(n=s.guid()),a.options.format)i={id:n,name:e};else var i={value:n,text:e};if("function"==typeof a.options.onbeforeinsert){let e=a.options.onbeforeinsert(a,i);if(!1===e)return!1;e&&(i=e)}a.options.data.push(i);var o=a.createItem(i);return x.appendChild(o.element),"function"==typeof a.options.oninsert&&a.options.oninsert(a,i,o),"none"==x.style.display&&(x.style.display=""),a.results&&a.results.push(o),i};a.add=function(e,t){return"function"==typeof a.options.prompt?a.options.prompt.call(a,C):C(e,t)},a.createItem=function(e,t,n){a.options.format?(e.id||void 0===e.value||(e.id=e.value),e.name||void 0===e.text||(e.name=e.text)):(e.value||void 0===e.id||(e.value=e.id),e.text||void 0===e.name||(e.text=e.name));var i={};if(i.element=document.createElement("div"),i.element.className="jdropdown-item",i.element.indexValue=a.items.length,i.data=e,t&&(i.group=t),e.id&&i.element.setAttribute("id",e.id),1==e.disabled&&i.element.setAttribute("data-disabled",!0),e.tooltip&&i.element.setAttribute("title",e.tooltip),e.image){var o=document.createElement("img");o.className="jdropdown-image",o.src=e.image,e.title||o.classList.add("jdropdown-image-small"),i.element.appendChild(o)}else if(e.icon){var s=document.createElement("span");s.className="jdropdown-icon material-icons",s.innerText=e.icon,e.title||s.classList.add("jdropdown-icon-small"),e.color&&(s.style.color=e.color),i.element.appendChild(s)}else if(e.color){var r=document.createElement("div");r.className="jdropdown-color",r.style.backgroundColor=e.color,i.element.appendChild(r)}if(a.options.format)l=e.name;else var l=e.text;var d=document.createElement("div");if(d.className="jdropdown-description",d.textContent=l||" ",e.title){var c=document.createElement("div");c.className="jdropdown-title",c.innerText=e.title,d.appendChild(c)}if(a.options.format)u=e.id;else var u=e.value;return a.value[u]&&(i.element.classList.add("jdropdown-selected"),i.selected=!0),a.items.push(i),i.element.appendChild(d),i},a.appendData=function(e){if(e.length){for(var t=[],n=[],i=0;i<e.length;i++)e[i].group?(n[e[i].group]||(n[e[i].group]=[]),n[e[i].group].push(i)):t.push(i);var o=0,s=Object.keys(n);if(s.length>0)for(i=0;i<s.length;i++){var r=document.createElement("div");r.className="jdropdown-group";var l=document.createElement("div");l.className="jdropdown-group-name",l.textContent=s[i];var d=document.createElement("i");d.className="jdropdown-group-arrow jdropdown-group-arrow-down",l.appendChild(d);var c=document.createElement("div");c.className="jdropdown-group-items";for(var u=0;u<n[s[i]].length;u++){var p=a.createItem(e[n[s[i]][u]],r,s[i]);(0==a.options.lazyLoading||o<200)&&(c.appendChild(p.element),o++)}r.appendChild(l),r.appendChild(c),a.groups.push(r),c.children.length>0&&x.appendChild(r)}if(t.length)for(i=0;i<t.length;i++){p=a.createItem(e[t[i]]);(0==a.options.lazyLoading||o<200)&&(x.appendChild(p.element),o++)}}},a.setData=function(e){if(d(),x.textContent="",a.header.value="",a.items=[],e&&e.length){for(var t=0;t<e.length;t++)"object"!=typeof e[t]&&(a.options.format?e[t]={id:e[t],name:e[t]}:e[t]={value:e[t],text:e[t]});a.appendData(e),a.options.data=e}else a.options.data=[];a.close()},a.getData=function(){return a.options.data},a.getPosition=function(e){for(var t=0;t<a.items.length;t++)if(h(t)==e)return t;return!1},a.getText=function(e){var t=g();return e?t:t.join("; ")},a.getValue=function(e){var t=v();return e?t:t.join(";")};var T=function(e){i.value!=a.options.value&&(i.value=a.options.value,"function"==typeof i.oninput&&i.oninput({type:"input",target:i,value:i.value})),"function"==typeof a.options.onchange&&a.options.onchange(i,a,e,a.options.value)};a.setValue=function(e){var t=a.getValue();Array.isArray(e)&&(e=e.join(";")),t!==e&&(u(e),T(t))},a.resetSelected=function(){a.setValue(null)},a.selectIndex=function(e,t){e=parseInt(e);if(a.items&&a.items[e]&&(!0===t||!0!==a.items[e].data.disabled))if(a.setCursor(e,!1),a.options.multiple){var n=a.options.value;a.items[e].selected?(a.items[e].element.classList.remove("jdropdown-selected"),a.items[e].selected=!1,delete a.value[h(e)]):(a.items[e].element.classList.add("jdropdown-selected"),a.items[e].selected=!0,a.value[h(e)]=m(e)),a.options.value=Object.keys(a.value).join(";"),0==a.options.autocomplete&&(a.header.value=g().join("; ")),T(n)}else a.items[e].selected?!1!==a.options.allowEmpty&&a.setValue(null):a.setValue(h(e)),a.close()},a.selectItem=function(e){a.selectIndex(e.indexValue)};var k=function(e,t){for(var n=0;n<t.length;n++)if(a.options.format){if(t[n].id==e)return!0}else if(t[n].value==e)return!0;return!1};return a.find=function(e){if(a.search==e.trim())return!1;if(a.search=e,a.setCursor(),a.groups.length)for(var t=0;t<a.groups.length;t++)a.groups[t].lastChild.textContent="";if(x.textContent="",1==a.options.remoteSearch){a.results=null;let t={url:a.options.url,method:"GET",data:{q:e},dataType:"json",success:function(e){a.items=[];var t=Object.keys(a.value);if(t.length)for(var n=0;n<t.length;n++)k(t[n],e)||(a.options.format?e.unshift({id:t[n],name:a.value[t[n]]}):e.unshift({value:t[n],text:a.value[t[n]]}));a.appendData(e),e.length?x.style.display="":x.style.display="none","function"==typeof a.options.onsearch&&a.options.onsearch(a,e)}};if("function"==typeof a.options.onbeforesearch){let e=a.options.onbeforesearch(a,t);if(!1===e)return;"object"==typeof e&&(t=e)}p(t)}else{e=new RegExp(e,"gi");var n=[];for(t=0;t<a.items.length;t++){var i=m(t),o=a.items[t].data.title||"",s=a.items[t].data.group||"",r=a.items[t].data.synonym||"";r&&(r=r.join(" ")),(null==e||1==a.items[t].selected||i.toString().match(e)||o.match(e)||s.match(e)||r.match(e))&&n.push(a.items[t])}if(n.length){x.style.display="",a.results=n;var l=n.length||0;1==a.options.lazyLoading&&l>200&&(l=200);for(t=0;t<l;t++)a.results[t].group?(a.results[t].group.parentNode||x.appendChild(a.results[t].group),a.results[t].group.lastChild.appendChild(a.results[t].element)):x.appendChild(a.results[t].element)}else x.style.display="none",a.results=null}1==a.options.autofocus&&a.first()},a.open=function(){if(!i.classList.contains("jdropdown-focus")){e.current=a,n(a,!0),i.classList.add("jdropdown-focus"),s.getWindowWidth()<800&&(null!=a.options.type&&"picker"!=a.options.type||f.slideBottom(b,1)),1==a.options.autocomplete&&(a.header.value=a.search,a.header.focus());var t=v();if(t[0]){var o=a.getPosition(t[0]);!1!==o&&a.setCursor(o)}if(!a.options.type||"default"==a.options.type){var r=i.getBoundingClientRect(),l=b.getBoundingClientRect();a.options.position?(b.style.position="fixed",window.innerHeight<r.bottom+l.height?(b.style.top="",b.style.bottom=window.innerHeight-r.top+1+"px"):(b.style.top=r.bottom+"px",b.style.bottom=""),b.style.left=r.left+"px"):window.innerHeight<r.bottom+l.height?(b.style.top="",b.style.bottom=r.height+1+"px"):(b.style.top="",b.style.bottom=""),b.style.minWidth=r.width+"px",a.options.maxWidth&&(b.style.maxWidth=a.options.maxWidth),a.items.length||1!=a.options.autocomplete?x.style.display="":x.style.display="none"}}"function"==typeof a.options.onopen&&a.options.onopen(i)},a.close=function(t){return i.classList.contains("jdropdown-focus")&&(a.header.value=a.getText(),a.setCursor(),t||"function"!=typeof a.options.onclose||a.options.onclose(i),a.header.blur&&a.header.blur(),i.classList.remove("jdropdown-focus"),n(a,!1),e.current=null),a.getValue()},a.setCursor=function(e,t){if(null!=a.currentIndex&&a.items&&a.items[a.currentIndex]&&a.items[a.currentIndex].element.classList.remove("jdropdown-cursor"),null==e)a.currentIndex=null;else if(e=parseInt(e),a.items[e].element.parentNode&&(a.items[e].element.classList.add("jdropdown-cursor"),a.currentIndex=e,!1!==t&&a.items[a.currentIndex].element)){x.scrollTop;var n=a.items[a.currentIndex].element;x.scrollTop=n.offsetTop-n.scrollTop+n.clientTop-95}},a.resetCursor=a.setCursor,a.updateCursor=a.setCursor,a.reset=function(){a.setCursor(),a.setValue(null)},a.first=function(){!0===a.options.lazyLoading&&a.loadFirst();var e=x.querySelectorAll(".jdropdown-item");if(e.length){var t=e[0].indexValue;a.setCursor(t)}},a.last=function(){!0===a.options.lazyLoading&&a.loadLast();var e=x.querySelectorAll(".jdropdown-item");if(e.length){var t=e[e.length-1].indexValue;a.setCursor(t)}},a.next=function(e){var t=null;if(e){if(1==e.length){var n=a.currentIndex||-1;e=e.toLowerCase();var i=null,o=null,s=x.querySelectorAll(".jdropdown-item");if(s.length){for(var r=0;r<s.length;r++)if(s[r].indexValue>n&&(i=a.items[s[r].indexValue])&&(o=i.element.innerText[0])&&e==(o=o.toLowerCase())){t=s[r].indexValue;break}a.setCursor(t)}}}else if(null==a.currentIndex||null==a.currentIndex)a.first();else{var l=a.items[a.currentIndex].element,d=l.nextElementSibling;d?(d.classList.contains("jdropdown-group")&&(d=d.lastChild.firstChild),t=d.indexValue):l.parentNode.classList.contains("jdropdown-group-items")&&((d=l.parentNode.parentNode.nextElementSibling)&&(d.classList.contains("jdropdown-group")?d=d.lastChild.firstChild:d.classList.contains("jdropdown-item")?t=d.indexValue:d=null),d&&(t=d.indexValue)),null!==t&&a.setCursor(t)}},a.prev=function(){var e=null;if(null===a.currentIndex)a.first();else{var t=a.items[a.currentIndex].element,n=t.previousElementSibling;n?(n.classList.contains("jdropdown-group")&&(n=n.lastChild.lastChild),e=n.indexValue):t.parentNode.classList.contains("jdropdown-group-items")&&((n=t.parentNode.parentNode.previousElementSibling)&&(n.classList.contains("jdropdown-group")?n=n.lastChild.lastChild:n.classList.contains("jdropdown-item")?e=n.indexValue:n=null),n&&(e=n.indexValue))}null!==e&&a.setCursor(e)},a.loadFirst=function(){if(a.results)var e=a.results;else e=a.items;var t=e.length||0;1==a.options.lazyLoading&&t>200&&(t=200),x.textContent="";for(var n=0;n<t;n++)e[n].group?(e[n].group.parentNode||x.appendChild(e[n].group),e[n].group.lastChild.appendChild(e[n].element)):x.appendChild(e[n].element);x.scrollTop=0},a.loadLast=function(){if(a.results)var e=a.results;else e=a.items;var t=e.length;if(t>200){t-=200,x.textContent="";for(var n=t;n<e.length;n++)e[n].group?(e[n].group.parentNode||x.appendChild(e[n].group),e[n].group.lastChild.appendChild(e[n].element)):x.appendChild(e[n].element);x.scrollTop=x.scrollHeight}},a.loadUp=function(){var e=!1;if(a.results)var t=a.results;else t=a.items;var n=x.querySelectorAll(".jdropdown-item")[0].indexValue;n=a.items[n];var i=t.indexOf(n)-1;if(i>0){for(var o=0;i>0&&t[i]&&o<200;)t[i].group?(t[i].group.parentNode||x.insertBefore(t[i].group,x.firstChild),t[i].group.lastChild.insertBefore(t[i].element,t[i].group.lastChild.firstChild)):x.insertBefore(t[i].element,x.firstChild),i--,o++;e=!0}return e},a.loadDown=function(){var e=!1;if(a.results)var t=a.results;else t=a.items;var n=x.querySelectorAll(".jdropdown-item"),i=n[n.length-1].indexValue;i=a.items[i];var o=t.indexOf(i)+1;if(o<t.length){for(var s=0;o<t.length&&t[o]&&s<200;)t[o].group?(t[o].group.parentNode||x.appendChild(t[o].group),t[o].group.lastChild.appendChild(t[o].element)):x.appendChild(t[o].element),o++,s++;e=!0}return e},function(){if(o||(o={}),"SELECT"==i.tagName){var t=e.extractFromDom(i,o);i=t.el,o=t.options}!o.placeholder&&i.getAttribute("placeholder")&&(o.placeholder=i.getAttribute("placeholder")),a.value={},a.items=[],a.groups=[],a.search="",a.results=null,i.classList.add("jdropdown"),(y=document.createElement("div")).className="jdropdown-container-header",a.header=document.createElement("input"),a.header.className="jdropdown-header jss_object",a.header.type="text",a.header.setAttribute("autocomplete","off"),a.header.onfocus=function(){"function"==typeof a.options.onfocus&&a.options.onfocus(i)},a.header.onblur=function(){"function"==typeof a.options.onblur&&a.options.onblur(i)},a.header.onkeyup=function(e){1!=a.options.autocomplete||E?a.options.autocomplete||a.next(e.key):(a.search!=a.header.value.trim()&&(E=setTimeout((function(){a.find(a.header.value.trim()),E=null}),400)),i.classList.contains("jdropdown-focus")||a.open())},e.hasEvents||(e.hasEvents=!0,document.addEventListener("keydown",e.keydown)),(b=document.createElement("div")).className="jdropdown-container",(x=document.createElement("div")).className="jdropdown-content",(w=document.createElement("div")).className="jdropdown-close",w.textContent="Done",(L=document.createElement("div")).className="jdropdown-reset",L.textContent="x",L.onclick=function(){a.reset(),a.close()},(j=document.createElement("div")).className="jdropdown-backdrop",y.appendChild(a.header),b.appendChild(x),i.appendChild(y),i.appendChild(b),i.appendChild(j),a.setOptions(o),"ontouchsend"in document.documentElement==!0?i.addEventListener("touchsend",e.mouseup):i.addEventListener("mouseup",e.mouseup),1==a.options.lazyLoading&&c(x,{loadUp:a.loadUp,loadDown:a.loadDown}),x.onwheel=function(e){e.stopPropagation()},i.change=a.setValue,i.val=function(e){if(void 0===e)return a.getValue(!!a.options.multiple);a.setValue(e)},i.dropdown=a}(),a};return e.keydown=function(t){var n=null;if(n=e.current)if(13==t.which||9==t.which)n.header.value&&null==n.currentIndex&&n.options.newOptions?n.add():(null==n.currentIndex&&1==n.options.autocomplete&&""!=n.header.value&&n.find(n.header.value),n.selectIndex(n.currentIndex));else if(38==t.which)null==n.currentIndex?n.first():n.currentIndex>0&&n.prev(),t.preventDefault();else if(40==t.which)null==n.currentIndex?n.first():n.currentIndex+1<n.items.length&&n.next(),t.preventDefault();else if(36==t.which)n.first(),t.target.classList.contains("jdropdown-header")||t.preventDefault();else if(35==t.which)n.last(),t.target.classList.contains("jdropdown-header")||t.preventDefault();else if(27==t.which)n.close();else if(33==t.which){if(null==n.currentIndex)n.first();else if(n.currentIndex>0)for(var i=0;i<7;i++)n.prev();t.preventDefault()}else if(34==t.which){if(null==n.currentIndex)n.first();else if(n.currentIndex+1<n.items.length)for(i=0;i<7;i++)n.next();t.preventDefault()}},e.mouseup=function(e){var t=s.findElement(e.target,"jdropdown");if(t){var n=t.dropdown;if(e.target.classList.contains("jdropdown-header"))if(t.classList.contains("jdropdown-focus")&&t.classList.contains("jdropdown-default")){var i=t.getBoundingClientRect();if(e.changedTouches&&e.changedTouches[0]){var o=e.changedTouches[0].clientX;e.changedTouches[0].clientY}else o=e.clientX,e.clientY;i.width-(o-i.left)<30?e.target.classList.contains("jdropdown-add")?n.add():n.close():0==n.options.autocomplete&&n.close()}else n.open();else if(e.target.classList.contains("jdropdown-group-name")){var a=e.target.nextSibling.children;if("none"!=e.target.nextSibling.style.display)for(var r=0;r<a.length;r++)"none"!=a[r].style.display&&n.selectItem(a[r])}else e.target.classList.contains("jdropdown-group-arrow")?e.target.classList.contains("jdropdown-group-arrow-down")?(e.target.classList.remove("jdropdown-group-arrow-down"),e.target.classList.add("jdropdown-group-arrow-up"),e.target.parentNode.nextSibling.style.display="none"):(e.target.classList.remove("jdropdown-group-arrow-up"),e.target.classList.add("jdropdown-group-arrow-down"),e.target.parentNode.nextSibling.style.display=""):e.target.classList.contains("jdropdown-item")?n.selectItem(e.target):e.target.classList.contains("jdropdown-image")||e.target.classList.contains("jdropdown-description")?n.selectItem(e.target.parentNode):e.target.classList.contains("jdropdown-title")?n.selectItem(e.target.parentNode.parentNode):(e.target.classList.contains("jdropdown-close")||e.target.classList.contains("jdropdown-backdrop"))&&n.close()}},e.extractFromDom=function(e,t){var n=e;if(t||(t={}),!e.getAttribute("multiple")||t&&null!=t.multiple||(t.multiple=!0),!e.getAttribute("placeholder")||t&&null!=t.placeholder||(t.placeholder=e.getAttribute("placeholder")),!e.getAttribute("data-autocomplete")||t&&null!=t.autocomplete||(t.autocomplete=!0),t&&null!=t.width||(t.width=e.offsetWidth),!e.value||t&&null!=t.value||(t.value=e.value),!t||null==t.data){t.data=[];for(var i=0;i<e.children.length;i++)if("OPTGROUP"==e.children[i].tagName)for(var o=0;o<e.children[i].children.length;o++)t.data.push({value:e.children[i].children[o].value,text:e.children[i].children[o].textContent,group:e.children[i].getAttribute("label")});else t.data.push({value:e.children[i].value,text:e.children[i].textContent})}t&&null!=t.onchange||(t.onchange=function(e,i,o,a){1==t.multiple?obj.items[i].classList.contains("jdropdown-selected")?n.options[i].setAttribute("selected","selected"):n.options[i].removeAttribute("selected"):n.value=a});var a=document.createElement("div");return e.parentNode.insertBefore(a,e),e.style.display="none",{el:e=a,options:t}},e}();function E(e,t){if(e.picker)return e.picker.setOptions(t,!0);var i={type:"picker",options:{}},o=null,a=null,r=function(e){return e instanceof Element||e instanceof HTMLDocument};i.setOptions=function(e,t){var n={value:0,data:null,render:null,onchange:null,onmouseover:null,onselect:null,onopen:null,onclose:null,onload:null,width:null,header:!0,right:!1,bottom:!1,content:!1,columns:null,grid:null,height:null};for(var s in e&&e.options&&(e.data=e.options),n)e&&e.hasOwnProperty(s)?i.options[s]=e[s]:void 0!==i.options[s]&&!0!==t||(i.options[s]=n[s]);return!1===i.options.header?o.style.display="none":o.style.display="",i.options.width?o.style.width=parseInt(i.options.width)+"px":o.style.width="",i.options.height?(a.style.maxHeight=i.options.height+"px",a.style.overflow="scroll"):a.style.overflow="",i.options.columns>0&&(i.options.grid?(a.classList.add("jpicker-grid"),a.style.gridTemplateColumns="repeat("+i.options.grid+", 1fr)"):(a.classList.add("jpicker-columns"),a.style.width=i.options.width?i.options.width:36*i.options.columns+"px")),isNaN(parseInt(i.options.value))&&(i.options.value=0),function(){a.innerHTML="";for(var e=Object.keys(i.options.data),t=0;t<e.length;t++){var n=document.createElement("div");n.classList.add("jpicker-item"),n.setAttribute("role","option"),n.k=e[t],n.v=i.options.data[e[t]];var o=i.getLabel(e[t],n);r(o)?n.appendChild(o):n.innerHTML=o,a.appendChild(n)}}(),i.setValue(i.options.value),i},i.getValue=function(){return i.options.value},i.setValue=function(t,n){if(i.setLabel(t),i.options.value=String(t),e.value!=i.options.value&&(e.value=i.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value})),a.children[t]&&"generic"!==a.children[t].getAttribute("type")&&i.close(),n&&"function"==typeof i.options.onchange){var o=i.options.data[t];i.options.onchange(e,i,o,o,t,n)}},i.getLabel=function(e,t){var n=i.options.data[e]||null;return"function"==typeof i.options.render&&(n=i.options.render(n,t)),n},i.setLabel=function(e){var t;i.options.content?((t=document.createElement("i")).textContent=i.options.content,t.classList.add("material-icons")):t=i.getLabel(e,null),r(t)?(o.textContent="",o.appendChild(t)):o.innerHTML=t},i.open=function(){if(!e.classList.contains("jpicker-focus")){n(i,!0),e.classList.add("jpicker-focus"),e.focus();var t=0,s=0;a.style.marginLeft="";var r=o.getBoundingClientRect(),l=a.getBoundingClientRect();t=window.innerHeight<r.bottom+l.height||i.options.bottom?-1*(l.height+4):r.height+4,!0===i.options.right&&(s=-1*l.width+r.width),l.left+s<0&&(s=s+l.left+10),l.left+l.width>window.innerWidth&&(s=-1*(10+l.left+l.width-window.innerWidth)),a.style.marginTop=parseInt(t)+"px",a.style.marginLeft=parseInt(s)+"px","function"==typeof i.options.onopen&&i.options.onopen(e,i)}},i.close=function(){e.classList.contains("jpicker-focus")&&(e.classList.remove("jpicker-focus"),n(i,!1),"function"==typeof i.options.onclose&&i.options.onclose(e,i))};return function(){let n=s.guid();e.classList.add("jpicker"),e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",n),e.setAttribute("tabindex","0"),e.onmousedown=function(t){e.classList.contains("jpicker-focus")||i.open()},(o=document.createElement("div")).classList.add("jpicker-header"),(a=document.createElement("div")).setAttribute("id",n),a.setAttribute("role","listbox"),a.classList.add("jpicker-content"),a.onclick=function(e){var t=s.findElement(e.target,"jpicker-item");t&&t.parentNode===a&&i.setValue(t.k,e)},e.appendChild(o),e.appendChild(a),e.value=t.value||0,i.setOptions(t),"function"==typeof i.options.onload&&i.options.onload(e,i),e.change=i.setValue,e.val=function(e){if(void 0===e)return i.getValue();i.setValue(e)},e.picker=i}(),i}function C(e,t){var i={type:"toolbar",options:{}},o={app:null,container:!1,badge:!1,title:!1,responsive:!1,maxWidth:null,bottom:!0,items:[]};for(var a in o)t&&t.hasOwnProperty(a)?i.options[a]=t[a]:i.options[a]=o[a];!e&&t.app&&t.app.el&&(e=document.createElement("div"),t.app.el.appendChild(e));var r=document.createElement("div");r.classList.add("jtoolbar-item"),r.classList.add("jtoolbar-arrow");var l=document.createElement("div");l.classList.add("jtoolbar-floating"),r.appendChild(l),i.selectItem=function(e){for(var t=d.children,n=0;n<t.length;n++)e!=t[n]&&t[n].classList.remove("jtoolbar-selected");e.classList.add("jtoolbar-selected")},i.hide=function(){f.slideBottom(e,0,(function(){e.style.display="none"}))},i.show=function(){e.style.display="",f.slideBottom(e,1)},i.get=function(){return e},i.setBadge=function(e,t){d.children[e].children[1].firstChild.innerHTML=t},i.destroy=function(){toolbar.remove(),e.innerHTML=""},i.update=function(t,n){for(var o=0;o<d.children.length;o++){"function"==typeof(a=d.children[o]).updateState&&a.updateState(e,i,a,t,n)}for(o=0;o<l.children.length;o++){var a;"function"==typeof(a=l.children[o]).updateState&&a.updateState(e,i,a,t,n)}},i.create=function(t){d.innerHTML="";for(var n=0;n<t.length;n++){var o=document.createElement("div");if(o.classList.add("jtoolbar-item"),t[n].width&&(o.style.width=parseInt(t[n].width)+"px"),t[n].k&&(o.k=t[n].k),t[n].tooltip&&(o.setAttribute("title",t[n].tooltip),o.setAttribute("aria-label",t[n].tooltip)),t[n].id&&o.setAttribute("id",t[n].id),t[n].updateState&&(o.updateState=t[n].updateState),t[n].active&&o.classList.add("jtoolbar-active"),t[n].disabled&&o.classList.add("jtoolbar-disabled"),"select"==t[n].type||"dropdown"==t[n].type)E(o,t[n]);else if("divisor"==t[n].type)o.classList.add("jtoolbar-divisor");else if("label"==t[n].type)o.classList.add("jtoolbar-label"),o.innerHTML=t[n].content;else{var a=document.createElement("i");if(void 0===t[n].class)a.classList.add("material-icons");else for(var s=t[n].class.split(" "),r=0;r<s.length;r++)a.classList.add(s[r]);if(a.innerHTML=t[n].content?t[n].content:"",o.setAttribute("role","button"),o.appendChild(a),1==i.options.badge){var l=document.createElement("div");l.classList.add("jbadge");var c=document.createElement("div");c.innerHTML=t[n].badge?t[n].badge:"",l.appendChild(c),o.appendChild(l)}if(t[n].title)if(1==i.options.title){var u=document.createElement("span");u.innerHTML=t[n].title,o.appendChild(u)}else o.setAttribute("title",t[n].title);i.options.app&&t[n].route&&(o.route=t[n].route,o.onclick=function(){i.options.app.pages(this.route)},i.options.app.pages(t[n].route,{toolbarItem:o,closed:!0})),"function"==typeof t[n].render&&t[n].render(o,t[n])}t[n].onclick&&(o.onclick=t[n].onclick.bind(t[n],e,i,o)),d.appendChild(o)}setTimeout((function(){i.refresh()}),0)},i.open=function(){r.classList.add("jtoolbar-arrow-selected");e.getBoundingClientRect();l.getBoundingClientRect().bottom>window.innerHeight||i.options.bottom?l.style.bottom="0":l.style.removeProperty("bottom"),l.style.right="0",r.children[0].focus(),n(i,!0)},i.close=function(){r.classList.remove("jtoolbar-arrow-selected"),n(i,!1)},i.refresh=function(){if(1==i.options.responsive){var t=e.parentNode.getBoundingClientRect();i.options.maxWidth||(i.options.maxWidth=t.width);var n=parseInt(i.options.maxWidth);for(r.parentNode&&r.parentNode.removeChild(r);l.firstChild;)d.appendChild(l.firstChild);if(n<d.offsetWidth)for(n-=50;d.lastChild&&n<d.offsetWidth;)l.insertBefore(d.lastChild,l.firstChild);l.children.length>0&&d.appendChild(r)}},i.setReadonly=function(t){t=t?"add":"remove",e.classList[t]("jtoolbar-disabled")},e.onclick=function(e){var t=s.findElement(e.target,"jtoolbar-item");t&&i.selectItem(t),e.target.classList.contains("jtoolbar-arrow")&&i.open()},window.addEventListener("resize",(function(){i.refresh()})),e.classList.add("jtoolbar"),e.innerHTML="",1==i.options.container&&e.classList.add("jtoolbar-container");var d=document.createElement("div");return e.appendChild(d),i.options.app&&e.classList.add("jtoolbar-mobile"),i.create(i.options.items),e.toolbar=i,i}const T=["html","body","address","span","div","h1","h2","h3","h4","h5","h6","p","b","i","blockquote","strong","em","ul","ol","li","a","code","pre","hr","br","img","figure","picture","figcaption","iframe","table","thead","tbody","tfoot","tr","th","td","caption","u","del","ins","sub","sup","small","mark","input","textarea","select","option","button","label","fieldset","legend","audio","video","abbr","cite","kbd","section","article","nav","aside","header","footer","main","details","summary","svg","line","source"],k=["width","height","align","border","src","tabindex"],A=["color","font-weight","font-size","background","background-color","margin"],O=function(e,t){if(e.tagName&&-1===T.indexOf(e.tagName.toLowerCase())&&e.innerText&&(e.innerHTML=e.innerText),e.attributes&&e.attributes.length){let n=null,i=e.getAttribute("style");if(i){n=[];let e=i.split(";");for(let t=0;t<e.length;t++){let i=e[t].trim().split(":");if(A.indexOf(i[0].trim())>=0){let e=i.shift();i=i.join(":"),n.push(e+":"+i)}}}"IMG"===e.tagName.toUpperCase()&&(e.src?(e.setAttribute("tabindex","900"),t.push(e.src)):e.parentNode.removeChild(e));let o=[];for(let t=0;t<e.attributes.length;t++)o.push(e.attributes[t].name);o.length&&o.forEach((function(t){if(-1===k.indexOf(t))e.removeAttribute(t);else{let n=e.getAttribute(t);-1!==n.indexOf("<")&&e.setAttribute(t,n.replace("<","<"))}})),e.style="",n&&n.length&&e.setAttribute("style",n.join(";"))}if(e.children.length)for(let n=e.children.length;n>0;n--)O(e.children[n-1],t)};var N=function(e,t){e&&(e=e.replace(new RegExp("\x3c!--(.*?)--\x3e","gsi"),""));let n=(new DOMParser).parseFromString(e,"text/html");O(n,t);let i=document.createElement("div");return i.innerHTML=n.firstChild.innerHTML,i};var D=function(){var e=function(t,n){var i={type:"editor",options:{}},o={url:null,value:"",snippet:null,toolbar:!0,toolbarOnTop:!1,remoteParser:null,placeholder:null,filterPaste:!0,dropZone:!0,dropAsSnippet:!1,acceptImages:!0,acceptFiles:!1,maxFileSize:5e6,allowImageResize:!0,maxHeight:null,height:null,focus:!1,onclick:null,onfocus:null,onblur:null,onload:null,onkeyup:null,onkeydown:null,onchange:null,extensions:null,type:null};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];var r=null,l=null,d=[];i.el=t,"function"==typeof i.options.onclick&&(t.onclick=function(e){i.options.onclick(t,i,e)}),t.classList.add("jeditor-container");var c=document.createElement("div");c.className="jsnippet",c.setAttribute("contenteditable",!1);var u=document.createElement("div");if(u.className="jeditor-toolbar",i.editor=document.createElement("div"),i.editor.setAttribute("contenteditable",!0),i.editor.setAttribute("spellcheck",!1),i.editor.classList.add("jeditor"),i.options.placeholder&&i.editor.setAttribute("data-placeholder",i.options.placeholder),(i.options.maxHeight||i.options.height)&&(i.editor.style.overflowY="auto",i.options.maxHeight&&(i.editor.style.maxHeight=i.options.maxHeight),i.options.height&&(i.editor.style.height=i.options.height)),i.options.url)p({url:i.options.url,dataType:"html",success:function(t){i.editor.innerHTML=t,e.setCursor(i.editor,"initial"==i.options.focus)}});else if(i.options.value)i.editor.innerHTML=i.options.value;else for(var f=0;f<t.children.length;f++)i.editor.appendChild(t.children[f]);t.innerHTML="";var h=function(e){"function"==typeof i.options.onchange&&i.options.onchange(t,i,e),i.options.value=i.getData(),t.value!=i.options.value&&(t.value=i.options.value,"function"==typeof t.oninput&&t.oninput({type:"input",target:t,value:t.value}))},m=function(){var e=null;if(e=c.children[0]){e.classList.contains("jslider-grid")||e.classList.add("jslider-grid");var t=e.children.length;e.setAttribute("data-number",t>4?4:t),t>4?e.setAttribute("data-total",t-4):e.removeAttribute("data-total")}};i.appendSnippet=function(e){c.innerHTML="";for(var t=["image","title","description","host","url"],n=0;n<t.length;n++){var o=document.createElement("div");if(o.className="jsnippet-"+t[n],o.setAttribute("data-k",t[n]),c.appendChild(o),e[t[n]])if("image"==t[n]){Array.isArray(e.image)||(e.image=[e.image]);for(var a=0;a<e.image.length;a++){var s=document.createElement("img");s.src=e.image[a],o.appendChild(s)}}else o.innerHTML=e[t[n]]}i.editor.appendChild(document.createElement("br")),i.editor.appendChild(c)},i.setData=function(t){i.editor.innerHTML="object"==typeof t?t.content:t,i.options.focus&&e.setCursor(i.editor,!0),d=[]},i.getFiles=function(){for(var e=i.editor.querySelectorAll(".jfile"),t=[],n=0;n<e.length;n++)d[e[n].src]&&t.push(d[e[n].src]);return t},i.getText=function(){return i.editor.innerText},i.getData=function(e){if(e){u={content:""};if(c.innerHTML){u.snippet={};for(var t=0;t<c.children.length;t++){var n=c.children[t].getAttribute("data-k");if(n)if("image"==n){u.snippet.image||(u.snippet.image=[]);for(var o=0;o<c.children[t].children.length;o++)u.snippet.image.push(c.children[t].children[o].getAttribute("src"))}else u.snippet[n]=c.children[t].innerHTML}}var a=Object.keys(d);if(a.length){u.files=[];for(t=0;t<a.length;t++)u.files.push(d[a[t]])}var s=document.createElement("div");s.innerHTML=i.editor.innerHTML;var r=s.querySelector(".jsnippet");r&&r.remove();var l=s.innerHTML;l=(l=(l=l.replace(/<br>/g,"\n")).replace(/<\/div>/g,"</div>\n")).replace(/<(?:.|\n)*?>/gm,""),u.content=l.trim(),D("getData",u)}else var u=i.editor.innerHTML;return u},i.reset=function(){i.editor.innerHTML="",c.innerHTML="",d=[]},i.addPdf=function(e){if("data"!=e.result.substr(0,4))console.error("Invalid source");else{var t=document.createElement("canvas");t.width=60,t.height=60;var n=new Image;t.getContext("2d").drawImage(n,0,0,t.width,t.height),t.toBlob((function(t){var n=document.createElement("img");n.src=window.URL.createObjectURL(t),n.title=e.name,n.className="jfile pdf",d[n.src]={file:n.src,extension:"pdf",content:e.result},document.execCommand("insertHtml",!1,n.outerHTML)}))}},i.addImage=function(e,t){if(i.options.acceptImages)if(e||(e=""),"data"==e.substr(0,4)||i.options.remoteParser){if("data"==e.substr(0,4)){n=(n=(n=e.split(";"))[0].split("/"))[1]}else{var n=e.substr(e.lastIndexOf(".")+1);e=i.options.remoteParser+e}var o=new Image;o.onload=function(){var e=document.createElement("canvas");e.width=o.width,e.height=o.height,e.getContext("2d").drawImage(o,0,0,e.width,e.height),e.toBlob((function(a){var s,r=document.createElement("img");r.src=window.URL.createObjectURL(a),r.classList.add("jfile"),r.setAttribute("tabindex","900"),r.setAttribute("width",o.width),r.setAttribute("height",o.height),d[r.src]={file:r.src,extension:n,content:e.toDataURL()},i.options.dropAsSnippet||t?(s=r,c.innerHTML||i.appendSnippet({}),c.children[0].appendChild(s),m(),d[r.src].snippet=!0):document.execCommand("insertHtml",!1,r.outerHTML),h()}))},o.src=e}else console.error("remoteParser not defined in your initialization")},i.addFile=function(e){for(var t=[],n=0;n<e.length;n++)if(e[n].size>i.options.maxFileSize)alert("The file is too big");else{var o=e[n].type.split("/");(o="image"==o[0]?1:"pdf"==o[1]?2:0)?(t[n]=new FileReader,t[n].index=n,t[n].type=o,t[n].name=e[n].name,t[n].date=e[n].lastModified,t[n].size=e[n].size,t[n].addEventListener("load",(function(e){2==e.target.type?1==i.options.acceptFiles&&i.addPdf(e.target):i.addImage(e.target.result)}),!1),t[n].readAsDataURL(e[n])):alert("The extension is not allowed")}},i.destroy=function(){i.editor.removeEventListener("mouseup",k),i.editor.removeEventListener("mousedown",A),i.editor.removeEventListener("mousemove",O),i.editor.removeEventListener("keyup",E),i.editor.removeEventListener("keydown",T),i.editor.removeEventListener("dragstart",y),i.editor.removeEventListener("dragenter",b),i.editor.removeEventListener("dragover",x),i.editor.removeEventListener("drop",w),i.editor.removeEventListener("paste",g),i.editor.removeEventListener("blur",L),i.editor.removeEventListener("focus",j),t.editor=null,t.classList.remove("jeditor-container"),u.remove(),c.remove(),i.editor.remove()},i.upload=function(){s.click(i.file)};var v=function(e){var t=window.getSelection(),n=document.createRange();n.selectNode(e),t.addRange(n)},g=function(e){if(1==i.options.filterPaste){if(e.clipboardData||e.originalEvent.clipboardData)var t=(e.originalEvent||e).clipboardData.getData("text/html"),n=(e.originalEvent||e).clipboardData.getData("text/plain"),o=(e.originalEvent||e).clipboardData.files;else if(window.clipboardData)t=window.clipboardData.getData("Html"),n=window.clipboardData.getData("Text"),o=window.clipboardData.files;if(o.length)i.addFile(o);else if(t){let e=[];var a=N(t,e);if(e.length)for(var s=0;s<e.length;s++)i.addImage(e[s]);document.execCommand("insertHtml",!1,a.innerHTML)}else t=n.split("\r\n"),e.target.innerText?(t=t.map((function(e){return"<div>"+e+"</div>"})),document.execCommand("insertText",!1,t.join(""))):t.map((function(e){var t=document.createElement("div");t.innerText=e,i.editor.appendChild(t)}));e.preventDefault()}},y=function(e){l&&l.e&&e.preventDefault()},b=function(e){l||0==i.options.dropZone||(t.classList.add("jeditor-dragging"),e.preventDefault())},x=function(e){l||0==i.options.dropZone||(r&&clearTimeout(r),r=setTimeout((function(){t.classList.remove("jeditor-dragging")}),100),e.preventDefault())},w=function(e){if(l||!1===i.options.dropZone);else{let n=null;document.caretRangeFromPoint?n=document.caretRangeFromPoint(e.clientX,e.clientY):e.rangeParent&&(n=document.createRange(),n.setStart(e.rangeParent,e.rangeOffset));let o=window.getSelection();o.removeAllRanges(),o.addRange(n),o.anchorNode.parentNode.focus();let a=(e.originalEvent||e).dataTransfer.getData("text/html"),s=(e.originalEvent||e).dataTransfer.getData("text/plain"),r=(e.originalEvent||e).dataTransfer.files;r.length?i.addFile(r):s&&function(e){let t=[];if(document.createElement("div"),N(e,t),t.length)for(var n=0;n<t.length;n++)i.addImage(t[n])}(a),t.classList.remove("jeditor-dragging"),e.preventDefault()}},L=function(e){D("onevent",e),h(e),"function"==typeof i.options.onblur&&i.options.onblur(t,i,e)},j=function(e){"function"==typeof i.options.onfocus&&i.options.onfocus(t,i,e)},E=function(e){i.editor.innerHTML||(i.editor.innerHTML="<div><br></div>"),"function"==typeof i.options.onkeyup&&i.options.onkeyup(t,i,e)},T=function(e){if(D("onevent",e),"Delete"==e.key&&"IMG"==e.target.tagName){var n=e.target.parentNode;v(e.target),n.classList.contains("jsnippet-image")&&m()}"function"==typeof i.options.onkeydown&&i.options.onkeydown(t,i,e)},k=function(e){if(l&&l.e&&(l.e.classList.remove("resizing"),1==l.e.changed)){var t=l.e.cloneNode();t.width=parseInt(l.e.style.width)||l.e.getAttribute("width"),t.height=parseInt(l.e.style.height)||l.e.getAttribute("height"),l.e.style.width="",l.e.style.height="",v(l.e),document.execCommand("insertHtml",!1,t.outerHTML)}l=!1},A=function(e){var t=function(t){var n=t.getBoundingClientRect();n.width-(e.clientX-n.left)<40&&e.clientY-n.top<40&&(t.innerHTML="",t.remove())};if("IMG"==e.target.tagName)if(e.target.style.cursor){var n=e.target.getBoundingClientRect();l={e:e.target,x:e.clientX,y:e.clientY,w:n.width,h:n.height,d:e.target.style.cursor},e.target.getAttribute("width")||e.target.setAttribute("width",n.width),e.target.getAttribute("height")||e.target.setAttribute("height",n.height);var i=window.getSelection();if(i.rangeCount)for(var o=0;o<i.rangeCount;o++)i.removeRange(i.getRangeAt(o));e.target.classList.add("resizing")}else l=!0;else e.target.classList.contains("jsnippet")?t(e.target):e.target.parentNode.classList.contains("jsnippet")&&t(e.target.parentNode),l=!0},O=function(e){if("IMG"==e.target.tagName&&!e.target.parentNode.classList.contains("jsnippet-image")&&1==i.options.allowImageResize&&e.target.getAttribute("tabindex")){var t=e.target.getBoundingClientRect();e.clientY-t.top<5?t.width-(e.clientX-t.left)<5?e.target.style.cursor="ne-resize":e.clientX-t.left<5?e.target.style.cursor="nw-resize":e.target.style.cursor="n-resize":t.height-(e.clientY-t.top)<5?t.width-(e.clientX-t.left)<5?e.target.style.cursor="se-resize":e.clientX-t.left<5?e.target.style.cursor="sw-resize":e.target.style.cursor="s-resize":t.width-(e.clientX-t.left)<5?e.target.style.cursor="e-resize":e.clientX-t.left<5?e.target.style.cursor="w-resize":e.target.style.cursor=""}if(1==e.which&&l&&l.d){if("e-resize"==l.d||"ne-resize"==l.d||"se-resize"==l.d)if(l.e.style.width=l.w+(e.clientX-l.x),e.shiftKey){var n=(e.clientX-l.x)*(l.h/l.w);l.e.style.height=l.h+n}else n=null;n||"s-resize"!=l.d&&"se-resize"!=l.d&&"sw-resize"!=l.d||e.shiftKey||(l.e.style.height=l.h+(e.clientY-l.y)),l.e.changed=!0}},D=function(e,t){if(i.options.extensions){var n=Object.keys(i.options.extensions);if(n.length)for(var o=0;o<n.length;o++)i.options.extensions[n[o]]&&"function"==typeof i.options.extensions[n[o]][e]&&i.options.extensions[n[o]][e].call(i,t)}};if(document.addEventListener("mouseup",k),document.addEventListener("mousemove",O),i.editor.addEventListener("mousedown",A),i.editor.addEventListener("keyup",E),i.editor.addEventListener("keydown",T),i.editor.addEventListener("dragstart",y),i.editor.addEventListener("dragenter",b),i.editor.addEventListener("dragover",x),i.editor.addEventListener("drop",w),i.editor.addEventListener("paste",g),i.editor.addEventListener("focus",j),i.editor.addEventListener("blur",L),t.appendChild(i.editor),i.options.snippet&&i.appendSnippet(i.options.snippet),i.options.toolbar){if(Array.isArray(i.options.toolbar))var M={container:!0,responsive:!0,items:i.options.toolbar};else if(!0===i.options.toolbar)M={container:!0,responsive:!0,items:[]};else M=i.options.toolbar;M.items&&M.items.length||(M.items=e.getDefaultToolbar(i)),i.options.toolbarOnTop?(t.classList.add("toolbar-on-top"),t.insertBefore(u,t.firstChild)):(i.editor.style.padding="15px",t.appendChild(u)),C(u,M),u.addEventListener("click",(function(){i.editor.focus()}))}return i.file=document.createElement("input"),i.file.style.display="none",i.file.type="file",i.file.setAttribute("accept","image/*"),i.file.onchange=function(){i.addFile(this.files)},t.appendChild(i.file),i.options.focus&&e.setCursor(i.editor,"initial"==i.options.focus),t.change=i.setData,t.val=function(e){if(void 0===e){var n="true"!==t.getAttribute("data-html");return i.getData(n)}i.setData(e)},function(){if(i.options.extensions){var e=Object.keys(i.options.extensions);if(e.length)for(var n=0;n<e.length;n++)i.options.extensions[e[n]]&&"function"==typeof i.options.extensions[e[n]]&&(i.options.extensions[e[n]]=i.options.extensions[e[n]](t,i))}}(),t.editor=i,"function"==typeof i.options.onload&&i.options.onload(t,i,i.editor),i};return e.setCursor=function(e,t){e.focus(),document.execCommand("selectAll");var n=window.getSelection(),i=n.getRangeAt(0);if(1==t)var o=i.startContainer,a=0;else a=(o=i.endContainer).length;i.setStart(o,a),i.setEnd(o,a),n.removeAllRanges(),n.addRange(i)},e.getDefaultToolbar=function(e){var t=function(e,t,n){if(!n.color){w(n,{onchange:function(e,t){"color"===n.k?document.execCommand("foreColor",!1,t):document.execCommand("backColor",!1,t)}});n.color.open()}},n=[];return n.push({content:"undo",onclick:function(){document.execCommand("undo")}}),n.push({content:"redo",onclick:function(){document.execCommand("redo")}}),n.push({type:"divisor"}),e.options.toolbarOnTop&&(n.push({type:"select",width:"140px",options:["Default","Verdana","Arial","Courier New"],render:function(e){return'<span style="font-family:'+e+'">'+e+"</span>"},onchange:function(e,t,n,i,o){document.execCommand("fontName",!1,i)}}),n.push({type:"select",content:"format_size",options:["x-small","small","medium","large","x-large"],render:function(e){return'<span style="font-size:'+e+'">'+e+"</span>"},onchange:function(e,t,n,i,o){document.execCommand("fontSize",!1,parseInt(o)+1)}}),n.push({type:"select",options:["format_align_left","format_align_center","format_align_right","format_align_justify"],render:function(e){return'<i class="material-icons">'+e+"</i>"},onchange:function(e,t,n,i,o){document.execCommand(["JustifyLeft","justifyCenter","justifyRight","justifyFull"][o])}}),n.push({type:"divisor"}),n.push({content:"format_color_text",k:"color",onclick:t}),n.push({content:"format_color_fill",k:"background-color",onclick:t})),n.push({content:"format_bold",onclick:function(e,t,n){document.execCommand("bold"),document.queryCommandState("bold")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_italic",onclick:function(e,t,n){document.execCommand("italic"),document.queryCommandState("italic")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_underline",onclick:function(e,t,n){document.execCommand("underline"),document.queryCommandState("underline")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({type:"divisor"}),n.push({content:"format_list_bulleted",onclick:function(e,t,n){document.execCommand("insertUnorderedList"),document.queryCommandState("insertUnorderedList")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_list_numbered",onclick:function(e,t,n){document.execCommand("insertOrderedList"),document.queryCommandState("insertOrderedList")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_indent_increase",onclick:function(e,t,n){document.execCommand("indent",!0,null),document.queryCommandState("indent")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_indent_decrease",onclick:function(e,t,n){document.execCommand("outdent"),document.queryCommandState("outdent")?n.classList.add("selected"):n.classList.remove("selected")}}),e.options.toolbarOnTop&&(n.push({type:"divisor"}),n.push({content:"photo",onclick:function(){e.upload()}}),n.push({type:"select",content:"table_view",columns:8,grid:8,right:!0,options:["0x0","1x0","2x0","3x0","4x0","5x0","6x0","7x0","0x1","1x1","2x1","3x1","4x1","5x1","6x1","7x1","0x2","1x2","2x2","3x2","4x2","5x2","6x2","7x2","0x3","1x3","2x3","3x3","4x3","5x3","6x3","7x3","0x4","1x4","2x4","3x4","4x4","5x4","6x4","7x4","0x5","1x5","2x5","3x5","4x5","5x5","6x5","7x5","0x6","1x6","2x6","3x6","4x6","5x6","6x6","7x6","0x7","1x7","2x7","3x7","4x7","5x7","6x7","7x7"],render:function(e,t){t&&(t.onmouseover=this.onmouseover,e=e.split("x"),t.setAttribute("data-x",e[0]),t.setAttribute("data-y",e[1]));var n=document.createElement("div");return t.style.margin="1px",t.style.border="1px solid #ddd",n},onmouseover:function(e){for(var t=parseInt(e.target.getAttribute("data-x")),n=parseInt(e.target.getAttribute("data-y")),i=0;i<e.target.parentNode.children.length;i++){var o=e.target.parentNode.children[i],a=parseInt(o.getAttribute("data-x")),s=parseInt(o.getAttribute("data-y"));a<=t&&s<=n?(o.style.backgroundColor="#cae1fc",o.style.borderColor="#2977ff"):(o.style.backgroundColor="",o.style.borderColor="#ddd")}},onchange:function(e,t,n){n=n.split("x");for(var i=document.createElement("table"),o=document.createElement("tbody"),a=0;a<=n[1];a++){for(var s=document.createElement("tr"),r=0;r<=n[0];r++){var l=document.createElement("td");l.innerHTML="",s.appendChild(l)}o.appendChild(s)}i.appendChild(o),i.setAttribute("width","100%"),i.setAttribute("cellpadding","6"),i.setAttribute("cellspacing","0"),document.execCommand("insertHTML",!1,i.outerHTML)}})),n},e}();var M=function(){var e=function(t,n){var i={options:{}},o={type:"big",title:"Untitled",width:510,height:472};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];return i.state={isMinized:!1},i.setState=function(){i.state.isMinized?i.container.classList.remove("jfloating-minimized"):i.container.classList.add("jfloating-minimized"),i.state.isMinized=!i.state.isMinized},i.close=function(){Components.elements.splice(e.elements.indexOf(i.container),1),i.updatePosition(),t.remove()},i.updatePosition=function(){for(var t=0;t<e.elements.length;t++){var n=e.elements[t],i=e.elements[t-1];n.style.right=t*(i?i.offsetWidth:n.offsetWidth)*1.01+"px"}},i.init=function(){!function(){for(var e=document.createElement("div");t.children[0];)e.appendChild(t.children[0]);for(i.content=document.createElement("div"),i.content.className="jfloating_content",i.content.innerHTML=t.innerHTML;e.children[0];)i.content.appendChild(e.children[0]);i.container=document.createElement("div"),i.container.className="jfloating",i.container.appendChild(i.content),i.options.title?i.container.setAttribute("title",i.options.title):i.container.classList.add("no-title"),i.options.width&&(i.container.style.width=parseInt(i.options.width)+"px"),i.options.height&&(i.container.style.height=parseInt(i.options.height)+"px"),t.innerHTML="",t.appendChild(i.container)}(),i.container&&i.container.addEventListener("click",(function(e){var t=e.target.getBoundingClientRect();if(e.target.classList.contains("jfloating")){if(e.changedTouches&&e.changedTouches[0])var n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY;else n=e.clientX,o=e.clientY;t.width-(n-t.left)<50&&o-t.top<50?setTimeout((function(){i.close()}),100):i.setState()}})),i.container.classList.add("jfloating-"+i.options.type),e.elements.push(i.container),i.updatePosition(),t.floating=i},i.init(),i};return e.elements=[],e}();var I=function(){const e=function(e){return!isNaN(e)&&null!==e&&("string"!=typeof e||""!==e.trim())},t={between:function(e,t){return e>=t[0]&&e<=t[1]},"not between":function(e,t){return e<t[0]||e>t[1]},"<":function(e,t){return e<t[0]},"<=":function(e,t){return e<=t[0]},">":function(e,t){return e>t[0]},">=":function(e,t){return e>=t[0]},"=":function(e,t){return e==t[0]},"!=":function(e,t){return e!=t[0]}},n={"valid date":function(){return!0},"=":function(e,t){return e===t[0]},"!=":function(e,t){return e!==t[0]},"<":function(e,t){return e<t[0]},"<=":function(e,t){return e<=t[0]},">":function(e,t){return e>t[0]},">=":function(e,t){return e>=t[0]},between:function(e,t){return e>=t[0]&&e<=t[1]},"not between":function(e,t){return e<t[0]||e>t[1]}},i={contains:function(e,t){return e.includes(t[0])},"not contains":function(e,t){return!e.includes(t[0])},"begins with":function(e,t){return e.startsWith(t[0])},"ends with":function(e,t){return e.endsWith(t[0])},"=":function(e,t){return e===t[0]},"!=":function(e,t){return e!==t[0]},"valid email":function(e){return new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/).test(e)},"valid url":function(e){return new RegExp(/(((https?:\/\/)|(www\.))[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]+)/gi).test(e)}},o=function(e,t){return"function"==typeof o[t.type]?!(!t.allowBlank||void 0!==e&&""!==e&&null!==e)||o[t.type].call(this,e,t):null};o.url=function(e){return!!new RegExp(/(((https?:\/\/)|(www\.))[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]+)/gi).test(e)},o.email=function(e){var t=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/);return!(!e||!t.test(e))},o.required=function(e){return!(!e||!e.trim())},o.empty=function(e){return null==e||"string"==typeof e&&!e.toString().trim()},o["not exist"]=o.empty,o.notEmpty=function(e){return!o.empty(e)},o.exist=o.notEmpty,o.number=function(n,i){if(!e(n))return!1;if(!i||!i.criteria)return!0;if(!t[i.criteria])return!1;let o=i.value.map((function(e){return parseFloat(e)}));return t[i.criteria](n,o)},o.login=function(e){let t=new RegExp(/^[a-zA-Z0-9._-]+$/);return!(!e||!t.test(e))},o.list=function(e,t){let n,i=typeof e;if("string"!==i&&"number"!==i)return!1;if(n="string"==typeof t.value[0]?t.source?t.source:t.value[0].split(","):t.value[0],Array.isArray(n)){return n.findIndex((function(t){return t==e}))>-1}return!1};const a=function(){let e=new Date;return e.setHours(0,0,0,0),e},s={"one year ago":function(){let e=a();return e.setFullYear(e.getFullYear()-1),e},"one month ago":function(){let e=a();return e.setMonth(e.getMonth()-1),e},"one week ago":function(){let e=a();return e.setDate(e.getDate()-7),e},yesterday:function(){let e=a();return e.setDate(e.getDate()-1),e},today:a,tomorrow:function(){let e=a();return e.setDate(e.getDate()+1),e}};return o.date=function(t,i){if(e(t)&&t>0&&t<1e6&&(t=h.numToDate(t)),"Invalid Date"==new Date(t))return!1;if(!i||!i.criteria)return!0;if(!n[i.criteria])return!1;let o=i.value.map((function(e){return"string"==typeof e&&s[e]?s[e]().getTime():new Date(e).getTime()}));return n[i.criteria](new Date(t).getTime(),o)},o.text=function(e,t){if(null==e)e="";else if("string"!=typeof e)return!1;return!t||!t.criteria||!!i[t.criteria]&&i[t.criteria](e,t.value)},o.textLength=function(e,t){let n;return n="string"==typeof e?e.length:null!=e&&"function"==typeof e.toString?e.toString().length:0,o.number(n,t)},o.time=function(n,i){if(!e(n))return!1;if(!i||!i.criteria)return!0;if(!t[i.criteria])return!1;let o=i.value.map((function(e){return parseInt(parseFloat(e)*10**17)/10**17}));return t[i.criteria](parseInt(parseFloat(n)*10**17)/10**17,o)},o}();var S=function(){var e=function(t,n){var i={options:{}},o={url:null,message:"Are you sure? There are unsaved information in your form",ignore:!1,currentHash:null,submitButton:null,validations:null,onbeforeload:null,onload:null,onbeforesave:null,onsave:null,onbeforeremove:null,onremove:null,onerror:function(e,t){alert(t)}};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];i.options.validations||(i.options.validations={}),i.options.submitButton||(i.options.submitButton=t.querySelector("input[type=submit]")),i.options.submitButton&&i.options.url&&(i.options.submitButton.onclick=function(){i.save()}),i.options.validations.email||(i.options.validations.email=I.email),i.options.validations.length||(i.options.validations.length=I.length),i.options.validations.required||(i.options.validations.required=I.required),i.setUrl=function(e){i.options.url=e},i.load=function(){p({url:i.options.url,method:"GET",dataType:"json",queue:!0,success:function(n){if("function"==typeof i.options.onbeforeload){var o=i.options.onbeforeload(t,n);o&&(n=o)}e.setElements(t,n),"function"==typeof i.options.onload&&i.options.onload(t,n)}})},i.save=function(){var n=i.validate();if(n)i.options.onerror(t,n);else{var o=e.getElements(t,!0);if("function"==typeof i.options.onbeforesave)if(!1===(o=i.options.onbeforesave(t,o)))return;p({url:i.options.url,method:"POST",dataType:"json",data:o,success:function(e){"function"==typeof i.options.onsave&&i.options.onsave(t,o,e)}})}},i.remove=function(){if("function"==typeof i.options.onbeforeremove&&!1===i.options.onbeforeremove(t,i))return!1;p({url:i.options.url,method:"DELETE",dataType:"json",success:function(e){"function"==typeof i.options.onremove&&i.options.onremove(t,i,e),i.reset()}})};return i.validateElement=function(n){var o=!1,a=e.getValue(n),s=n.getAttribute("data-validation");return"function"!=typeof i.options.validations[s]||i.options.validations[s](a,n)?n.classList.contains("error")&&function(e){var n=!1;e.classList.remove("error"),e.removeAttribute("title");for(var o=t.querySelectorAll("input, select, textarea, div[name]"),a=0;a<o.length;a++)o[a].getAttribute("data-validation")&&o[a].classList.contains("error")&&(n=!0);i.options.submitButton&&(n?i.options.submitButton.setAttribute("disabled",!0):i.options.submitButton.removeAttribute("disabled"))}(n):o=function(e){e.classList.add("error"),i.options.submitButton&&i.options.submitButton.setAttribute("disabled",!0);var t=e.getAttribute("data-error")||"There is an error in the form";return e.setAttribute("title",t),t}(n),o},i.reset=function(){for(var e=t.querySelectorAll("input, select, textarea, div[name]"),n=0;n<e.length;n++)e[n].getAttribute("name")&&("checkbox"==e[n].type||"radio"==e[n].type?e[n].checked=!1:"function"==typeof e[n].val?e[n].val(""):e[n].value="")},i.validate=function(){for(var e=[],n=t.querySelectorAll("input, select, textarea, div[name]"),o=0;o<n.length;o++)if(n[o].getAttribute("data-validation")){var a=i.validateElement(n[o]);a&&e.push(a)}return e.length>0&&e.join("<br>")},i.getError=function(){return!!i.validation()},i.setHash=function(){return i.getHash(e.getElements(t))},i.getHash=function(e){var t,n=0;if(0===e.length)return n;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},i.isChanged=function(){var e=i.setHash();return i.options.currentHash!=e},i.resetTracker=function(){i.options.currentHash=i.setHash(),i.options.ignore=!1},i.setIgnore=function(e){i.options.ignore=!!e},setTimeout((function(){i.options.currentHash=i.setHash()}),1e3),t.addEventListener("keyup",(function(e){e.target.getAttribute("data-validation")&&i.validateElement(e.target)})),e.hasEvents||(window.addEventListener("beforeunload",(function(e){if(i.isChanged()&&0==i.options.ignore){var t=i.options.message?i.options.message:"o/";return t?(void 0===e&&(e=window.event),e&&(e.returnValue=t),t):void 0}})),e.hasEvents=!0),t.form=i,i};return e.getValue=function(e){var t=null;if("checkbox"==e.type)1==e.checked&&(t=e.value||!0);else if("radio"==e.type)1==e.checked&&(t=e.value);else if("file"==e.type)t=e.files;else if("select"==e.tagName&&1==e.multiple){t=[];for(var n=e.querySelectorAll("options[selected]"),i=0;i<n.length;i++)t.push(n[i].value)}else t="function"==typeof e.val?e.val():e.value||"";return t},e.getElements=function(t,n){for(var i={},o=null,a=t.querySelectorAll("input, select, textarea, div[name]"),s=0;s<a.length;s++)(o=a[s].getAttribute("name"))&&(i[o]=e.getValue(a[s])||"");return 1==n?i:JSON.stringify(i)},e.setElements=function(e,t){for(var n=null,i=null,o=e.querySelectorAll("input, select, textarea, div[name]"),a=0;a<o.length;a++){var s=o[a].getAttribute("type");if(n=o[a].getAttribute("name")){if(i=null,(n=n.replace(new RegExp(/\[(.*?)\]/gi),".$1")).match(/\./)){var r=l.call(t,n)||"";void 0!==r&&(i=r)}else void 0!==t[n]&&(i=t[n]);null!==i&&("checkbox"==s||"radio"==s?o[a].checked=!!i:"file"==s||("function"==typeof o[a].val?o[a].val(i):o[a].value=i))}}},e}();var H=function(){var e=function(){var e=null;document.addEventListener("keydown",(function(e){if(27==e.which)for(var t=document.querySelectorAll(".jmodal"),n=0;n<t.length;n++)t[n].parentNode.modal.close()})),document.addEventListener("mouseup",(function(t){let n=t.composedPath();var i=s.findElement(n[0],"jmodal");if(i){var o=i.getBoundingClientRect();if(t.changedTouches&&t.changedTouches[0])var a=t.changedTouches[0].clientX,r=t.changedTouches[0].clientY;else a=t.clientX,r=t.clientY;o.width-(a-o.left)<50&&r-o.top<50&&i.parentNode.modal.close()}e&&(e.element.style.cursor="auto",e=null)})),document.addEventListener("mousedown",(function(t){let n=t.composedPath();var i=s.findElement(n[0],"jmodal");if(i){var o=i.getBoundingClientRect();if(t.changedTouches&&t.changedTouches[0])var a=t.changedTouches[0].clientX,r=t.changedTouches[0].clientY;else a=t.clientX,r=t.clientY;o.width-(a-o.left)<50&&r-o.top<50||r-o.top<50&&(document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),e={left:o.left,top:o.top,x:t.clientX,y:t.clientY,width:o.width,height:o.height,element:i})}})),document.addEventListener("mousemove",(function(t){if(e){if((t=t||window.event).buttons)var n=t.buttons;else if(t.button)n=t.button;else n=t.which;n?(e.element.style.top=e.top+(t.clientY-e.y)+e.height/2+"px",e.element.style.left=e.left+(t.clientX-e.x)+e.width/2+"px",e.element.style.cursor="move"):e.element.style.cursor="auto"}}))};return function(t,n){var i={options:{}},o={url:null,onopen:null,onclose:null,onload:null,closed:!1,width:null,height:null,title:null,padding:null,backdrop:!0,icon:null};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];!i.options.title&&t.getAttribute("title")&&(i.options.title=t.getAttribute("title"));for(var r=document.createElement("div");t.children[0];)r.appendChild(t.children[0]);for(i.title=document.createElement("div"),i.title.className="jmodal_title",i.options.icon&&i.title.setAttribute("data-icon",i.options.icon),i.content=document.createElement("div"),i.content.className="jmodal_content",i.content.innerHTML=t.innerHTML;r.children[0];)i.content.appendChild(r.children[0]);if(i.container=document.createElement("div"),i.container.className="jmodal",i.container.appendChild(i.title),i.container.appendChild(i.content),i.options.padding&&(i.content.style.padding=i.options.padding),i.options.width&&(i.container.style.width=i.options.width),i.options.height&&(i.container.style.height=i.options.height),i.options.title){var l=document.createElement("h4");l.innerText=i.options.title,i.title.appendChild(l)}if(t.innerHTML="",t.style.display="none",t.appendChild(i.container),i.options.backdrop){var d=document.createElement("div");d.className="jmodal_backdrop",d.onclick=function(){i.close()},t.appendChild(d)}return i.open=function(){t.style.display="block";var e=i.container.getBoundingClientRect();s.getWindowWidth()<e.width?(i.container.style.top="",i.container.style.left="",i.container.classList.add("jmodal_fullscreen"),f.slideBottom(i.container,1)):i.options.backdrop&&(d.style.display="block"),"function"==typeof i.options.onopen&&i.options.onopen(t,i)},i.resetPosition=function(){i.container.style.top="",i.container.style.left=""},i.isOpen=function(){return"none"!=t.style.display},i.close=function(){i.isOpen()&&(t.style.display="none",i.options.backdrop&&(d.style.display=""),i.container.classList.remove("jmodal_fullscreen"),"function"==typeof i.options.onclose&&i.options.onclose(t,i))},i.options.url?p({url:i.options.url,method:"GET",dataType:"text/html",success:function(e){i.content.innerHTML=e,i.options.closed||i.open(),"function"==typeof i.options.onload&&i.options.onload(i)}}):(i.options.closed||i.open(),"function"==typeof i.options.onload&&i.options.onload(i)),t.modal=i,e(),e=function(){},i}}();var R=function(){var e=function(e){var t={options:{}},n={icon:null,name:"Notification",date:null,error:null,title:null,message:null,timeout:4e3,autoHide:!0,closeable:!0};for(var i in n)e&&e.hasOwnProperty(i)?t.options[i]=e[i]:t.options[i]=n[i];var o=document.createElement("div");o.className="jnotification",t.options.error&&o.classList.add("jnotification-error");var a=document.createElement("div");a.className="jnotification-container",o.appendChild(a);var r=document.createElement("div");r.className="jnotification-header",a.appendChild(r);var l=document.createElement("div");if(l.className="jnotification-image",r.appendChild(l),t.options.icon){var d=document.createElement("img");d.src=t.options.icon,l.appendChild(d)}var c=document.createElement("div");if(c.className="jnotification-name",c.innerHTML=t.options.name,r.appendChild(c),1==t.options.closeable){var u=document.createElement("div");u.className="jnotification-close",u.onclick=function(){t.hide()},r.appendChild(u)}var p=document.createElement("div");p.className="jnotification-date",r.appendChild(p);var h=document.createElement("div");if(h.className="jnotification-content",a.appendChild(h),t.options.title){var m=document.createElement("div");m.className="jnotification-title",m.innerHTML=t.options.title,h.appendChild(m)}var v=document.createElement("div");if(v.className="jnotification-message",v.innerHTML=t.options.message,h.appendChild(v),t.show=function(){document.body.appendChild(o),s.getWindowWidth()>800?f.fadeIn(o):f.slideTop(o,1)},t.hide=function(){s.getWindowWidth()>800?f.fadeOut(o,(function(){o.parentNode&&(o.parentNode.removeChild(o),g&&clearTimeout(g))})):f.slideTop(o,0,(function(){o.parentNode&&(o.parentNode.removeChild(o),g&&clearTimeout(g))}))},t.show(),1==t.options.autoHide)var g=setTimeout((function(){t.hide()}),t.options.timeout);return s.getWindowWidth()<800&&o.addEventListener("swipeup",(function(e){t.hide(),e.preventDefault(),e.stopPropagation()})),t};return e.isVisible=function(){var e=document.querySelector(".jnotification");return!(!e||!e.parentNode)},e}();function Y(e,t){if(e.search)return e.search;var n=null,i=function(t){if("function"==typeof r.options.onsearch){var n=r.options.onsearch(r,t);n&&(t=n)}if(l.innerHTML="",t.length){e.style.display="block";for(var i=t.length<11?t.length:10,o=0;o<i;o++){if("string"==typeof t[o])var a=t[o],s=t[o];else!(a=t[o].text)&&t[o].name&&(a=t[o].name),!(s=t[o].value)&&t[o].id&&(s=t[o].id);var d=document.createElement("div");d.setAttribute("data-value",s),d.setAttribute("data-text",a),d.className="jsearch_item",t[o].id&&d.setAttribute("id",t[o].id),r.options.forceSelect&&0==o&&d.classList.add("selected");var c=document.createElement("img");t[o].image?c.src=t[o].image:c.style.display="none",d.appendChild(c);var u=document.createElement("div");u.innerHTML=a,d.appendChild(u),l.appendChild(d)}}else e.style.display=""},o=function(e){if(e!=r.terms)if(r.terms=e,n=r.options.forceSelect?0:null,Array.isArray(r.options.data)){var t=r.options.data.filter((function(t){return function(t){if("string"==typeof t){if((""+t).toLowerCase().search(e.toLowerCase())>=0)return!0}else for(var n in t)if((""+t[n]).toLowerCase().search(e.toLowerCase())>=0)return!0;return!1}(t)}));i(t)}else p({url:r.options.data+e,method:"GET",dataType:"json",success:function(e){i(e)}})},a=null,r=function(e){a&&clearTimeout(a),a=setTimeout((function(){o(e)}),500)};null===t.forceSelect&&(t.forceSelect=!0),r.options={data:t.data||null,input:t.input||null,searchByNode:t.searchByNode||null,onselect:t.onselect||null,forceSelect:t.forceSelect,onsearch:t.onsearch||null,onbeforesearch:t.onbeforesearch||null},r.selectIndex=function(e){var t=e.getAttribute("id"),n=e.getAttribute("data-text"),i=e.getAttribute("data-value"),o=e.children[0].src||"";"function"==typeof r.options.onselect&&r.options.onselect(r,n,i,t,o),r.close()},r.open=function(){e.style.display="block"},r.close=function(){a&&clearTimeout(a),r.terms="",l.innerHTML="",e.style.display=""},r.isOpened=function(){return!!e.style.display},r.keydown=function(e){r.isOpened()&&("Enter"==e.key?null!==n&&l.children[n]?(r.selectIndex(l.children[n]),e.preventDefault()):r.close():"ArrowUp"===e.key?(null!==n&&l.children[0]&&(l.children[n].classList.remove("selected"),r.options.forceSelect||0!==n?(n=Math.max(0,n-1),l.children[n].classList.add("selected")):n=null),e.preventDefault()):"ArrowDown"===e.key&&(null==n?n=-1:l.children[n].classList.remove("selected"),n<9&&l.children[n+1]&&n++,l.children[n].classList.add("selected"),e.preventDefault()))},r.keyup=function(e){if(!r.options.searchByNode&&r.options.input)if("DIV"===r.options.input.tagName)var t=r.options.input.innerText;else t=r.options.input.value;else{var n=s.getNode();if(n)t=n.innerText}if("function"==typeof r.options.onbeforesearch){var i=r.options.onbeforesearch(r,t);if(i)t=i;else if(!1===i)return}r(t)},r.blur=function(e){r.close()},r.options.input&&(r.options.input.addEventListener("keyup",r.keyup),r.options.input.addEventListener("keydown",r.keydown),r.options.input.addEventListener("blur",r.blur));var l=document.createElement("div");return l.classList.add("jsearch_container"),l.onmousedown=function(e){if(e.target.classList.contains("jsearch_item"))var t=e.target;else t=e.target.parentNode;r.selectIndex(t),e.preventDefault()},e.appendChild(l),e.classList.add("jsearch"),e.search=r,r}function P(e,n){var i={options:{}},o={type:"image",extension:"*",input:!1,minWidth:!1,maxWidth:null,maxHeight:null,maxJpegSizeBytes:null,onchange:null,multiple:!1,remoteParser:null};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];1==i.options.multiple&&e.setAttribute("data-multiple",!0),e.content=[],e.classList.add("jupload"),1==i.options.input&&e.classList.add("input"),i.add=function(t){if(0==i.options.multiple&&(e.content=[],e.innerText=""),"image"==i.options.type){var n=document.createElement("img");n.setAttribute("src",t.file),n.setAttribute("tabindex",-1),e.getAttribute("name")||(n.className="jfile",n.content=t),e.appendChild(n)}else{if(t.name)var o=t.name;else o=t.file;var a=document.createElement("div");a.innerText=o||i.options.type,a.classList.add("jupload-item"),a.setAttribute("tabindex",-1),e.appendChild(a)}t.content&&(t.file=s.guid()),e.content.push(t),"function"==typeof i.options.onchange&&i.options.onchange(e,t)},i.addFromFile=function(e){if(e.type.split("/")[0]==i.options.type){var n=new FileReader;n.addEventListener("load",(function(t){var n={file:t.srcElement.result,extension:e.name.substr(e.name.lastIndexOf(".")+1),name:e.name,size:e.size,lastmodified:e.lastModified,content:t.srcElement.result};i.add(n)})),n.readAsDataURL(e)}else alert(t.translate("This extension is not allowed"))},i.addFromUrl=function(e){if("data"==e.substr(0,4)||i.options.remoteParser)if("data"==e.substr(0,4)){if((n=(n=e.split(";"))[0].split("/"))[0].replace("data:","")==i.options.type){var t={file:e,name:"",extension:n[1],content:e};i.add(t)}else alert(i.options.text.extensionNotAllowed)}else{var n=e.substr(e.lastIndexOf(".")+1);e=i.options.remoteParser+e,p({url:e,type:"GET",dataType:"blob",success:function(e){}})}else console.error("remoteParser not defined in your initialization")};var r=i.options.type+"/"+i.options.extension,l=document.createElement("input");l.type="file",l.setAttribute("accept",r),l.onchange=function(){for(var e=0;e<this.files.length;e++)i.addFromFile(this.files[e])},1==i.options.multiple&&l.setAttribute("multiple",!0);var d=null;return e.addEventListener("click",(function(t){d=null,e.children.length&&t.target!==e?t.target.parentNode==e&&(d=t.target):s.click(l)})),e.addEventListener("dblclick",(function(e){s.click(l)})),e.addEventListener("dragenter",(function(t){e.style.border="1px dashed #000"})),e.addEventListener("dragleave",(function(t){e.style.border="1px solid #eee"})),e.addEventListener("dragstop",(function(t){e.style.border="1px solid #eee"})),e.addEventListener("dragover",(function(e){e.preventDefault()})),e.addEventListener("keydown",(function(t){if(d&&46==t.which){var n=Array.prototype.indexOf.call(e.children,d);n>=0&&(e.content.splice(n,1),d.remove(),d=null)}})),e.addEventListener("drop",(function(t){t.preventDefault(),t.stopPropagation();var n=(t.originalEvent||t).dataTransfer.getData("text/html");if((t.originalEvent||t).dataTransfer.files.length)for(var o=0;o<t.dataTransfer.files.length;o++)i.addFromFile(t.dataTransfer.files[o]);else if(n){0==i.options.multiple&&(e.innerText="");let t=[];if(N(n,t),t.length)for(o=0;o<t.length;o++)i.addFromUrl(t[o])}return e.style.border="1px solid #eee",!1})),e.val=function(t){if(void 0===t)return e.content&&e.content.length?e.content:null;if(e.innerText="",e.content=[],t)if(Array.isArray(t))for(var n=0;n<t.length;n++)"string"==typeof t[n]?i.add({file:t[n]}):i.add(t[n]);else"string"==typeof t&&i.add({file:t})},e.upload=e.image=i,i}var V=i(195),F=i.n(V),B={...t,...s,version:"5.13.3",setExtensions:function(e){if("object"==typeof e)for(var t=Object.keys(e),n=0;n<t.length;n++)B[t[n]]=e[t[n]]},tracking:n,path:l,sorting:d,lazyLoading:c,ajax:p,animation:f,calendar:v,color:w,contextmenu:L,dropdown:j,editor:D,floating:M,form:S,mask:m,modal:H,notification:R,palette:g,picker:E,progressbar:function(e,t){var n={options:{}},i={value:0,onchange:null,width:null};for(var o in i)t&&t.hasOwnProperty(o)?n.options[o]=t[o]:n.options[o]=i[o];e.classList.add("jprogressbar"),e.setAttribute("tabindex",1),e.setAttribute("data-value",n.options.value);var a=document.createElement("div");a.style.width=n.options.value+"%",a.style.color="#fff",e.appendChild(a),n.options.width&&(e.style.width=n.options.width),n.setValue=function(t){t=parseInt(t),n.options.value=t,a.style.width=t+"%",e.setAttribute("data-value",t+"%"),e.style.color=t<6?"#000":"#fff",n.options.value=t,"function"==typeof n.options.onchange&&n.options.onchange(e,t),e.value!=n.options.value&&(e.value=n.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value}))},n.getValue=function(){return n.options.value};var s=function(t){if(t.which){var i=e.getBoundingClientRect();if(t.changedTouches&&t.changedTouches[0]){var o=t.changedTouches[0].clientX;t.changedTouches[0].clientY}else o=t.clientX,t.clientY;n.setValue(Math.round((o-i.left)/i.width*100))}};return"touchstart"in document.documentElement==!0?(e.addEventListener("touchstart",s),e.addEventListener("touchend",s)):(e.addEventListener("mousedown",s),e.addEventListener("mousemove",s)),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.progressbar=n,n},rating:function(e,t){if(e.rating)return e.rating.setOptions(t,!0);var n={options:{},setOptions:function(t,i){var o={number:5,value:0,tooltip:["Very bad","Bad","Average","Good","Very good"],onchange:null};for(var a in o)t&&t.hasOwnProperty(a)?n.options[a]=t[a]:void 0!==n.options[a]&&!0!==i||(n.options[a]=o[a]);e.innerHTML="";for(var s=0;s<n.options.number;s++){var r=document.createElement("div");r.setAttribute("data-index",s+1),r.setAttribute("title",n.options.tooltip[s]),e.appendChild(r)}if(n.options.value)for(s=0;s<n.options.number;s++)s<n.options.value&&e.children[s].classList.add("jrating-selected");return n},setValue:function(t){for(var i=0;i<n.options.number;i++)i<t?e.children[i].classList.add("jrating-selected"):(e.children[i].classList.remove("jrating-over"),e.children[i].classList.remove("jrating-selected"));n.options.value=t,"function"==typeof n.options.onchange&&n.options.onchange(e,t),e.value!=n.options.value&&(e.value=n.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value}))},getValue:function(){return n.options.value}};return n.setOptions(t),e.classList.add("jrating"),e.addEventListener("click",(function(e){var t=e.target.getAttribute("data-index");null!=t&&(t==n.options.value?n.setValue(0):n.setValue(t))})),e.addEventListener("mouseover",(function(t){for(var i=t.target.getAttribute("data-index"),o=0;o<n.options.number;o++)o<i?e.children[o].classList.add("jrating-over"):e.children[o].classList.remove("jrating-over")})),e.addEventListener("mouseout",(function(t){for(var i=0;i<n.options.number;i++)e.children[i].classList.remove("jrating-over")})),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.rating=n,n},search:Y,slider:function(e,t){var n={options:{},currentImage:null};if(t&&(n.options=t),e.setAttribute("tabindex","900"),n.options.items=[],!e.classList.contains("jslider")){if(e.classList.add("jslider"),e.classList.add("unselectable"),n.options.height&&(e.style.minHeight=parseInt(n.options.height)+"px"),n.options.width&&(e.style.width=parseInt(n.options.width)+"px"),n.options.grid){e.classList.add("jslider-grid");var i=e.children.length;i>4&&e.setAttribute("data-total",i-4),e.setAttribute("data-number",i>4?4:i)}var o=document.createElement("div");if(o.classList.add("jslider-counter"),e.children.length>0)for(var a=0;a<e.children.length;a++){n.options.items.push(e.children[a]);var s=document.createElement("div");s.onclick=function(){var e=Array.prototype.slice.call(o.children).indexOf(this);n.show(n.currentImage=n.options.items[e])},o.appendChild(s)}var r=document.createElement("div");r.className="jslider-caption";var l=document.createElement("div"),d=document.createElement("div");d.className="jslider-close",d.innerHTML="",d.onclick=function(){n.close()},l.appendChild(r),l.appendChild(d)}n.updateCounter=function(e){for(var t=0;t<o.children.length;t++)if(o.children[t].classList.contains("jslider-counter-focus")){o.children[t].classList.remove("jslider-counter-focus");break}o.children[e].classList.add("jslider-counter-focus")},n.show=function(t){if(!t)t=e.children[0];e.classList.add("jslider-focus"),e.classList.remove("jslider-grid"),e.appendChild(l),e.appendChild(o);var i=n.options.items.indexOf(t);n.updateCounter(i);for(var a=0;a<e.children.length;a++)e.children[a].style.display="";t.style.display="block",t.previousElementSibling?e.classList.add("jslider-left"):e.classList.remove("jslider-left"),t.nextElementSibling&&"IMG"==t.nextElementSibling.tagName?e.classList.add("jslider-right"):e.classList.remove("jslider-right"),n.currentImage=t,n.currentImage.offsetHeight>n.currentImage.offsetWidth&&n.currentImage.classList.add("jslider-vertical"),l.children[0].innerText=n.currentImage.getAttribute("title")},n.open=function(){n.show(),"function"==typeof n.options.onopen&&n.options.onopen(e)},n.close=function(){e.classList.remove("jslider-focus"),e.classList.remove("jslider-left"),e.classList.remove("jslider-right"),n.options.grid&&e.classList.add("jslider-grid");for(var t=0;t<e.children.length;t++)e.children[t].style.display="";o.remove(),l.remove(),n.currentImage=null,"function"==typeof n.options.onclose&&n.options.onclose(e)},n.reset=function(){e.innerHTML=""},n.next=function(){var e=n.currentImage.nextElementSibling;e&&"IMG"===e.tagName&&n.show(n.currentImage.nextElementSibling)},n.prev=function(){n.currentImage.previousElementSibling&&n.show(n.currentImage.previousElementSibling)};var c=function(e){if("IMG"==e.target.tagName)n.show(e.target);else if(!e.target.classList.contains("jslider-close")&&!e.target.parentNode.classList.contains("jslider-counter")&&!e.target.classList.contains("jslider-counter")){var t=e.offsetX||e.changedTouches[0].clientX;e.target.clientWidth-t<40?n.next():t<40&&n.prev()}};return"ontouchend"in document.documentElement==!0?e.addEventListener("touchend",c):e.addEventListener("mouseup",c),e.addEventListener("swipeleft",(function(e){n.next(),e.preventDefault(),e.stopPropagation()})),e.addEventListener("swiperight",(function(e){n.prev(),e.preventDefault(),e.stopPropagation()})),e.addEventListener("keydown",(function(e){27==e.which&&n.close()})),e.slider=n,n},tabs:b,tags:function(e,n){if(e.tags)return e.tags.setOptions(n,!0);var i={type:"tags",options:{}},o=function(){return!!(i.options.limit&&e.children.length>=i.options.limit)},a=null,r=null;i.setOptions=function(t,n){var o={value:"",limit:null,search:null,placeholder:null,validation:null,onbeforepaste:null,onbeforechange:null,onremoveitem:null,onlimit:null,onchange:null,onfocus:null,onblur:null,onload:null};for(var s in o)t&&t.hasOwnProperty(s)?i.options[s]=t[s]:void 0!==i.options[s]&&!0!==n||(i.options[s]=o[s]);return i.options.placeholder?e.setAttribute("data-placeholder",i.options.placeholder):e.removeAttribute("data-placeholder"),e.placeholder=i.options.placeholder,i.setValue(i.options.value),u(),i.options.search?r||(r=document.createElement("div"),e.parentNode.insertBefore(r,e.nextSibling),a=Y(r,{data:i.options.search,onselect:function(e,t,n){i.selectIndex(t,n)}})):r&&(a=null,r.remove(),r=null),i},i.add=function(n,r){if("function"==typeof i.options.onbeforechange){var u=i.options.onbeforechange(e,i,i.options.value,n);if(!1===u)return!1;null!=u&&(n=u)}if(a&&a.close(),o())"function"==typeof i.options.onlimit?i.options.onlimit(i,i.options.limit):alert(t.translate("You reach the limit number of entries")+" "+i.options.limit);else{var p=s.getNode();if(!(p&&p.parentNode&&p.parentNode.classList.contains("jtags")&&p.nextSibling)||p.nextSibling.innerText&&p.nextSibling.innerText.trim()){if(e.lastChild&&(e.lastChild.innerText.trim()||e.removeChild(e.lastChild)),n&&"string"!=typeof n){for(var f=0;f<=n.length;f++)if(!o()){if(n[f]&&"string"!=typeof n[f])h=n[f].text,m=n[f].value;else var h=n[f]||"",m=null;v=d(h,m)}}else var v=d(n,n,p);c()}else v=p.nextSibling;r&&l(v)}},i.setLimit=function(t){i.options.limit=t;for(e.children.length;e.children.length>t;)e.removeChild(e.lastChild)},i.remove=function(t){t.parentNode.removeChild(t),e.children.length?c():i.add("",!0),"function"==typeof i.options.onremoveitem&&i.options.onremoveitem(e,i,t)},i.getData=function(){for(var t=[],n=0;n<e.children.length;n++){var i=e.children[n].innerText.replace("\n",""),o=e.children[n].getAttribute("data-value");o||(o=i),(i||o)&&t.push({text:i,value:o})}return t},i.getValue=function(t){var n=null;if(null!=t)(n=e.children[t].getAttribute("data-value"))||(n=e.children[t].innerText.replace("\n",""));else{for(var o=[],a=0;a<e.children.length;a++)(n=e.children[a].innerText.replace("\n",""))&&o.push(i.getValue(a));n=o.join(",")}return n},i.setValue=function(t){if(t){if(e.value!=t)if(Array.isArray(t))i.add(t);else{var n=(""+t).trim(),o=f(n);e.innerHTML="",i.add(o)}}else i.reset()},i.reset=function(){e.classList.add("jtags-empty"),e.innerHTML="<div></div>",c()},i.isValid=function(){for(var t=0,n=0;n<e.children.length;n++)e.children[n].classList.contains("jtags_error")&&t++;return 0==t},i.selectIndex=function(e,t){var n=s.getNode();n&&(n.innerText=e,t&&n.setAttribute("data-value",t),n.classList.remove("jtags_error"),o()||i.add("",!0))},i.search=function(e){e.innerText},i.destroy=function(){e.removeEventListener("mouseup",y),e.removeEventListener("keydown",m),e.removeEventListener("keyup",v),e.removeEventListener("paste",g),e.removeEventListener("focus",b),e.removeEventListener("blur",x),e.parentNode.removeChild(e)};var l=function(t){if(e.children.length){var n=document.createRange(),i=window.getSelection();if(!t)t=e.childNodes[e.childNodes.length-1];n.setStart(t,t.length),n.collapse(!0),i.removeAllRanges(),i.addRange(n),e.scrollLeft=e.scrollWidth}},d=function(t,n,i){var o=document.createElement("div");return o.textContent=t||"",n&&o.setAttribute("data-value",n),i&&i.parentNode.classList.contains("jtags")?e.insertBefore(o,i.nextSibling):e.appendChild(o),o},c=function(){var t=i.getValue();t!=i.options.value&&(i.options.value=t,"function"==typeof i.options.onchange&&i.options.onchange(e,i,i.options.value),e.value!=i.options.value&&(e.value=i.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value}))),u()},u=function(){for(var t=0;t<e.children.length;t++)"DIV"===e.children[t].tagName&&(i.getValue(t)?(e.children[t].classList.add("jtags_label"),"function"==typeof i.options.validation&&i.getValue(t)?i.options.validation(e.children[t],e.children[t].innerText,e.children[t].getAttribute("data-value"))?e.children[t].classList.remove("jtags_error"):e.children[t].classList.add("jtags_error"):e.children[t].classList.remove("jtags_error")):e.children[t].classList.remove("jtags_label"));p()},p=function(){e.innerText.trim()?e.classList.remove("jtags-empty"):e.children.length&&"BR"!==e.children[0].tagName||(e.innerHTML="",l(d()))},f=function(e){var t=[],n="";if(e=e.trim()){for(var i=0;i<e.length;i++)","==e[i]||";"==e[i]||"\n"==e[i]?n&&(t.push(n.trim()),n=""):n+=e[i];n&&t.push(n)}return t},h=0,m=function(t){if(h=window.getSelection().anchorOffset,p(),"Tab"===t.key||";"===t.key||","===t.key)window.getSelection().anchorOffset>1&&(o()?"function"==typeof i.options.onlimit&&i.options.onlimit(i,i.options.limit):i.add("",!0)),t.preventDefault();else if("Enter"==t.key){if(!a||!a.isOpened())window.getSelection().anchorOffset>1&&(o()||i.add("",!0)),t.preventDefault()}else"Backspace"==t.key&&1==e.children.length&&window.getSelection().anchorOffset<1&&t.preventDefault();a&&a.keydown(t),p()},v=function(e){if(39==e.which){var t=window.getSelection().anchorOffset;t>1&&t==h&&i.add("",!0)}else 13==e.which||38==e.which||40==e.which?e.preventDefault():a&&a.keyup(e);u()},g=function(t){if(t.clipboardData||t.originalEvent.clipboardData)var n=(t.originalEvent||t).clipboardData.getData("text/plain");else if(window.clipboardData)n=window.clipboardData.getData("Text");var o=f(n);if("function"==typeof i.options.onbeforepaste){var a=i.options.onbeforepaste(e,i,o);if(!1===a)return t.preventDefault(),!1;a&&(o=a)}o.length>1?(i.add(o,!0),t.preventDefault()):o[0]&&(document.execCommand("insertText",!1,o[0]),t.preventDefault())},y=function(t){if(t.target.parentNode&&t.target.parentNode.classList.contains("jtags")&&(t.target.classList.contains("jtags_label")||t.target.classList.contains("jtags_error"))){var n=t.target.getBoundingClientRect();n.width-(t.clientX-n.left)<16&&i.remove(t.target)}t.target==e&&l()},b=function(){e.classList.contains("jtags-focus")||(e.children.length&&!i.getValue(e.children.length-1)||o()||d(""),"function"==typeof i.options.onfocus&&i.options.onfocus(e,i,i.getValue()),e.classList.add("jtags-focus"))},x=function(){if(e.classList.contains("jtags-focus")){a&&a.close();for(var t=0;t<e.children.length-1;t++)i.getValue(t)||e.removeChild(e.children[t]);c(),e.classList.remove("jtags-focus"),"function"==typeof i.options.onblur&&i.options.onblur(e,i,i.getValue())}};return"touchend"in document.documentElement==1?e.addEventListener("touchend",y):e.addEventListener("mouseup",y),e.addEventListener("keydown",m),e.addEventListener("keyup",v),e.addEventListener("paste",g),e.addEventListener("focus",b),e.addEventListener("blur",x),e.setAttribute("contenteditable",!0),e.classList.add("jtags"),i.setOptions(n),"function"==typeof i.options.onload&&i.options.onload(e,i),e.change=i.setValue,e.val=function(e){if(void 0===e)return i.getValue();i.setValue(e)},e.tags=i,i},toolbar:C,upload:P,validations:I};B.image=P,B.image.create=function(e){var t=document.createElement("img");return t.setAttribute("src",e.file),t.className="jfile",t.setAttribute("tabindex",-1),t.content=e,t},B.tracker=S,B.loading=f.loading,B.sha512=F();const W=function(){if(void 0!==window.jSuitesStateControl)return;window.jSuitesStateControl=[];const e=function(t,n){return!(!t[n.type]||t[n.type]!=n)||(!(!t.component||t.component!=n)||!!t.parentNode&&e(t.parentNode,n))};let t=15,n=!1,i={x:null,y:null},o=document.createElement("div");o.classList.add("jtooltip");const a=function(e){return e&&(e.shadowRoot||e.tagName&&e.tagName.includes("-"))},s=function(e){let t,n,i=e.path||e.composedPath&&e.composedPath();return i?(n=i[0],n&&a(n)&&!n.shadowRoot&&e.toElement&&(n=e.toElement)):(t=e.target&&a(e.target)?e.target.shadowRoot:document,n=t.elementFromPoint(x,y)),n};let r,l=["n","ne","e","se","s","sw","w","nw","rotate"];l.forEach((function(e,t){l[t]=document.createElement("div"),l[t].classList.add("jpanel-action"),"rotate"===e?l[t].setAttribute("data-action","rotate"):(l[t].setAttribute("data-action","resize"),l[t].setAttribute("data-position",e+"-resize"))}));const d=function(e){let t=s(e),n=B.findElement(t,"jpanel");n&&!n.classList.contains("readonly")&&n.classList.contains("jpanel-controls")?(n.append(...l),n.classList.contains("jpanel-rotate")||l[l.length-1].remove(),r=n):c(e)},c=function(e){r&&(l.forEach((function(e){e.remove()})),r=null)};document.addEventListener("focusin",d),document.addEventListener("mouseup",(function(e){n&&n.e&&("function"==typeof n.e.refresh&&i.actioned&&n.e.refresh(),n.e.style.cursor=""),i={x:null,y:null},n=!1})),document.addEventListener("mousedown",(function(t){if(t.changedTouches&&t.changedTouches[0])var i=t.changedTouches[0].clientX,o=t.changedTouches[0].clientY;else i=t.clientX,o=t.clientY;let a=s(t),r=a&&"DIV"===a.tagName&&a.getAttribute("contentEditable"),l=B.findElement(a,"jpanel");if(!l||l.classList.contains("readonly")||r)n=!1;else{let e=l.getBoundingClientRect(),t=0;l.style.rotate&&(t=parseFloat(l.style.rotate));let s="move";a.getAttribute("data-action")?s=a.getAttribute("data-action"):l.style.cursor?s="resize":l.style.cursor="move",n={action:s,a:t,e:l,x:i,y:o,l:e.left,t:e.top,b:e.bottom,r:e.right,w:e.width,h:e.height,d:l.style.cursor,actioned:!1},l.style.width||(l.style.width=e.width+"px"),l.style.height||(l.style.height=e.height+"px")}!function(t){let n=window.jSuitesStateControl;if(n&&n.length>0)for(let i=0;i<n.length;i++)n[i]&&!e(t,n[i])&&n[i].close()}(a),d(t)})),document.addEventListener("mousemove",(function(e){if(n){let t=e.clientX||e.pageX,s=e.clientY||e.pageY;if(null==i.x&&null==i.y&&(i.x=t,i.y=s),"move"===n.action){var o=t-i.x,a=s-i.y,r=n.e.offsetTop+a,l=n.e.offsetLeft+o;n.e.style.top=r+"px",n.e.style.left=l+"px","function"==typeof n.e.refresh&&(i.actioned=!0,n.e.refresh("position",r,l))}else if("rotate"===n.action){let e=function(e,t,n,i,o,a){const s=n-e,r=i-t,l=o-e,d=a-t;let c=Math.atan2(r,s),u=Math.atan2(d,l)-c;return u*=180/Math.PI,u<0&&(u+=360),u}(n.l+n.w/2,n.t+n.h/2,n.x,n.y,t,s);e+=n.a%360,e=2*Math.round(e/2),n.e.style.rotate=`${e}deg`,"function"==typeof n.e.refresh&&(i.actioned=!0,n.e.refresh("rotate",e))}else if("resize"===n.action){let o=null,a=null,r=null,l=null;"e-resize"==n.d||"ne-resize"==n.d||"se-resize"==n.d?(r=n.e.offsetWidth+(t-i.x),e.shiftKey&&(l=n.e.offsetHeight+(t-i.x)*(n.e.offsetHeight/n.e.offsetWidth))):"w-resize"!==n.d&&"nw-resize"!=n.d&&"sw-resize"!=n.d||(a=n.e.offsetLeft+(t-i.x),r=n.e.offsetLeft+n.e.offsetWidth-a,e.shiftKey&&(l=n.e.offsetHeight-(t-i.x)*(n.e.offsetHeight/n.e.offsetWidth))),"s-resize"==n.d||"se-resize"==n.d||"sw-resize"==n.d?l||(l=n.e.offsetHeight+(s-i.y)):"n-resize"!==n.d&&"ne-resize"!=n.d&&"nw-resize"!=n.d||(o=n.e.offsetTop+(s-i.y),l=n.e.offsetTop+n.e.offsetHeight-o),o&&(n.e.style.top=o+"px"),a&&(n.e.style.left=a+"px"),r&&(n.e.style.width=r+"px"),l&&(n.e.style.height=l+"px"),"function"==typeof n.e.refresh&&(i.actioned=!0,n.e.refresh("dimensions",r,l))}i.x=t,i.y=s}else{let n=s(e),i=B.findElement(n,"jpanel");if(i){if(i.classList.contains("jpanel-controls")){let e=n.getAttribute("data-position");i.style.cursor=e||""}else if(i.getAttribute("tabindex")){let n=i.getBoundingClientRect();e.clientY-n.top<t?n.width-(e.clientX-n.left)<t?i.style.cursor="ne-resize":e.clientX-n.left<t?i.style.cursor="nw-resize":i.style.cursor="n-resize":n.height-(e.clientY-n.top)<t?n.width-(e.clientX-n.left)<t?i.style.cursor="se-resize":e.clientX-n.left<t?i.style.cursor="sw-resize":i.style.cursor="s-resize":n.width-(e.clientX-n.left)<t?i.style.cursor="e-resize":e.clientX-n.left<t?i.style.cursor="w-resize":i.style.cursor=""}}}})),document.addEventListener("mouseover",(function(e){var t=s(e).getAttribute("data-tooltip");if(t){if(o.innerText=t,e.changedTouches&&e.changedTouches[0])var n=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY;else n=e.clientX,i=e.clientY;o.style.top=i+"px",o.style.left=n+"px",document.body.appendChild(o)}else o.innerText&&(o.innerText="",document.body.removeChild(o))})),document.addEventListener("keydown",(function(e){let t=document.activeElement;t&&"Delete"===e.key&&"function"==typeof t.delete&&(t.delete(),e.preventDefault(),e.stopImmediatePropagation());let n=window.jSuitesStateControl;n&&n.length>0&&(t=n[n.length-1],t&&"Escape"===e.key&&"function"==typeof t.isOpened&&"function"==typeof t.close&&t.isOpened()&&(t.close(),e.preventDefault(),e.stopImmediatePropagation()))})),document.addEventListener("contextmenu",(function(e){var t=document.activeElement;if(t&&"function"==typeof t.contextmenu)t.contextmenu(e),e.preventDefault(),e.stopImmediatePropagation();else if(t=B.findElement(e.target,(function(e){return e.tagName&&e.getAttribute("aria-contextmenu-id")})),t){var n=document.querySelector("#"+t);n?(n.contextmenu.open(e),e.preventDefault(),e.stopImmediatePropagation()):console.error("JSUITES: contextmenu id not found: "+t)}})),document.addEventListener("input",(function(e){(e.target.getAttribute("data-mask")||e.target.mask)&&B.mask(e)}))};"undefined"!=typeof document&&W();var z=B}(),e=o.default}(),e}));
|
|
8
|
+
//# sourceMappingURL=/static/djangocms_render_context/js-dist/jsuites.min.js.map
|