@kizmann/pico-js 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pico-js.browser.js +1 -1
- package/dist/pico-js.browser.js.map +1 -1
- package/dist/pico-js.esm.js +1 -1
- package/dist/pico-js.esm.js.map +1 -1
- package/package.json +3 -1
- package/src/dom/DomEvent.js +27 -6
- package/src/dom/DomGlobal.js +7 -7
- package/src/utils/Array.js +126 -48
- package/src/utils/Cookie.js +1 -1
- package/src/utils/Mixed.js +2 -2
- package/src/utils/Object.js +67 -19
- package/src/utils/Route.js +4 -2
- package/src/utils/Runner.js +111 -132
- package/types/dom/DomEvent.d.ts +10 -1
- package/types/utils/Array.d.ts +27 -6
- package/types/utils/Mixed.d.ts +1 -2
- package/types/utils/Object.d.ts +2 -8
- package/types/utils/Runner.d.ts +45 -61
package/dist/pico-js.browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={},r={};function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.r(r),t.d(r,{Any:()=>me,Arr:()=>y,Cookie:()=>G,Data:()=>ie,Dom:()=>de,Element:()=>he,Event:()=>A,For:()=>pe,Hash:()=>E,Locale:()=>F,Map:()=>ae,Mix:()=>k,Now:()=>fe,Num:()=>m,Obj:()=>v,Route:()=>ne,Run:()=>n,Str:()=>c,UUID:()=>ge,browser:()=>te,device:()=>ee,go:()=>Qt});class s{static timeout(t,e=0,r=null){let i=s.$idler.native;return null==r&&(r=E.make(12)),i[r="t-"+r]=setInterval(()=>{t()},e),r}static interval(t,e=0,r=null){let i=s.$idler.native;return null==r&&(r=E.make(12)),i[r="i-"+r]=setInterval(()=>{t()},e),r}static clear(t,e="native"){if(k.isArr(t))return y.each(t,t=>this.clear(t,e)),this;let r=s.$idler[e];return!1===/^i-/.test(t)&&clearInterval(r[t]),!1===/^t-/.test(t)&&clearTimeout(r[t]),this}static wait(t,e=0,r=500){let i,s;s=this.timeout(()=>{this.clear([i,s])},e*r),i=this.interval(()=>{t()&&this.clear([i,s])},e)}static frame(t,...e){return requestAnimationFrame(function(){t(...e)}),this}static async(t,...e){return setTimeout(()=>{t(...e)}),this}static delay(t,e=0,...r){let i=setTimeout(()=>{this.async(t,...r)},e);return()=>clearTimeout(i)}static debounce(t,e=100,r=null){let i=s.$idler.debounce;return null==r&&(r=E.make(12)),(...s)=>{i[r]&&clearTimeout(i[r]),i[r]=setTimeout(()=>{this.frame(t,...s)},e)}}static throttle(t,e=100,r=null){let i,n=s.$idler.throttle;return null==r&&(r=E.make(12)),(...s)=>{n[r]&&clearTimeout(n[r]),n[r]=setTimeout(()=>{i=!1},e),i||(this.frame(t,...s),i=!0)}}static framerate(t,e=30){let r=0;return(...i)=>{Date.now()-r<=1e3/e||(this.frame(t,...i),r=Date.now())}}static framebuffer(t,e,r=1e3){return(i,...n)=>{y.replace(s.$buffer,{key:e,cb:t,order:r,args:[i,...n],active:!0},{key:e}),i.preventDefault(),s.runFramebuffer()}}static runFramebuffer(){if(this.$timer.func&&this.$timer.func(),this.$timer.func=this.delay(()=>{this.runFramebuffer()},50),Date.now()-this.$timer.date<=50)return;this.$timer.func&&this.$timer.func(),this.$timer.date=Date.now();let t=y.filter(this.$buffer,{active:!0});0!==t.length&&this.frame(()=>{y.each(y.sort(t,"order"),t=>{t.cb(...t.args),t.active=!1})})}}i(s,"$idler",{native:{},debounce:{},throttle:{}}),i(s,"$timer",{date:0,func:null}),i(s,"$buffer",[]);const n=s;var o;function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class u{static get(t,e){return k.isStr(t)||(t=k.str(t)),k.isInt(e)&&(e=k.int(e)),t.charAt(e)}static set(t,e,r=""){return k.isStr(t)||(t=k.str(t)),k.isInt(e)&&(e=k.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){k.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){k.isNull(r)&&(r=t);let i=this.range(r,e);return null===i?null:this.slice(t,...i)}static match(t,e,r=null){let i=k.str(t).match(e);return k.isEmpty(i)?[]:k.isFunc(r)?r(i):i}static regex(t){return k.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return k.str(t).toUpperCase()}static ucfirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lc(t){return k.str(t).toLowerCase()}static lcfirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static cc(t){return y.each(pe.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return pe.slugify(t)}static sc(t){return pe.slugify(t).replace("-","_")}static pc(t){return y.each(pe.slugify(t).split("-"),t=>this.ucfirst(t)).join("")}static has(t,e){return-1!==this.lc(t).indexOf(this.lc(e))}static range(t,e,r=null){let i=k.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return k.str(t).slice(e,r)}static string(t,e="-",r=!1){return k.isEmpty(t)?e:(t=k.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return k.isEmpty(t)?i:k.bool(t)?e:r}static number(t,e=null,r=null,i={}){return k.isNum(t)?(null==r&&(r=F.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({maximumFractionDigits:12},i),null!=e&&(i.minimumFractionDigits=e,i.maximumFractionDigits=e),k.num(t).toLocaleString(r,i)):t}static integer(t,e=0,r="0"){return k.isNum(t)?(k.isInt(t)||(t=k.int(t)),t=k.int(t),e?k.str(t).padStart(e,r):k.str(t)):t}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return k.isDate(t)||(t=fe.make(t)),t.valid()?t.format(e):r}static date(t,e="YYYY-MM-DD",r="-"){return this.datetime(t,e,r)}static time(t,e="HH:mm:ss",r="-"){return this.datetime(t,e,r)}static objectify(t,e="options",r=!1){return k.isRef(t)?t:("params"===e&&(t=pe.parseParams(t)),"options"===e&&(t=pe.parseOptions(t)),k.isRef(t)||(t=JSON.parse(t)),r?k.vals(t):t)}static stringify(t,e="options"){return k.isStr(t)?t:"params"===e?pe.castParams(t):"options"===e?pe.castOptions(t):JSON.stringify(t)}}a(u,"upper",(o=u).uc),a(u,"lower",o.lc),a(u,"camelcase",o.cc),a(u,"kebabcase",o.kc),a(u,"snakecase",o.sc),a(u,"pascalcase",o.pc),u.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),c.regex(...t)),u.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),c.pascalcase(...t)),u.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),pe.slugify(...t)),u.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),pe.castOptions(...t)),u.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),pe.parseOptions(...t)),u.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),pe.castParams(...t)),u.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),pe.parseParams(...t)),u.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),pe.filesize(...t)),u.real=()=>{console.error("Str.real() is not implemented anymore.")},u.array=()=>{console.error("Str.array() is not implemented anymore.")};const c=u;function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(e){f(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{static fixed(t,e=2){return k.isNum(t)||(t=k.num(t)),t.toFixed(e)}static float(t){return k.isNum(t)||(t=k.num(t)),parseFloat(t)}static int(t){return k.isNum(t)||(t=k.num(t)),parseInt(t)}static ceil(t){return k.isNum(t)||(t=k.num(t)),Math.ceil(t)}static floor(t){return k.isNum(t)||(t=k.num(t)),Math.floor(t)}static round(t){return k.isNum(t)||(t=k.num(t)),Math.round(t)}static combine(t){return y.reduce(t,(t,e)=>t+e,0)}static subtract(t){return y.reduce(t,(t,e)=>t-e,0)}static decade(t){return k.isNum(t)||(t=k.num(t)),10*Math.floor(t/10)}static matrix(t,e=10,r=[]){let i=0;for(let e=20;e>=0;e--)t>=(i=Math.pow(2,e))&&(r.push(i),t-=i);return r}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[d(d({},i),t),d(d({},i),e)];let s=Math.PI*this.float(t.lat)/180,n=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(s)*Math.sin(n),Math.cos(s)*Math.cos(n)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}p.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),c.number(t,e[2]||null)),p.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),E.number(...t));const m=p;class g{static all(t){return k.isArr(t)?t:[t]}static get(t,e,r=null){return k.isArr(t)?t&&t[e]?t[e]:r:t}static set(t,e,r){return this.splice(t,e,1,r)}static unset(t,e){return this.splice(t,e,1)}static make(t,e=null){let r=new Array(t);null==e&&(e=t=>t);for(let i=0;i<t;i++)r[i]="function"==typeof e?e(i):e;return r}static has(t,e){if(!k.isPrim(e))return-1!==this.findIndex(t,e);return k.isArr(t)||(t=[t]),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return k.keys(e)}static lengths(t,...e){let r=t.length;for(let t=0;t<e.length;t++)if(e[t].length!==r)return!1;return!0}static first(t,e=null){return this.get(t,0,e)}static second(t,e=null){return this.get(t,2,e)}static third(t,e=null){return this.get(t,2,e)}static last(t,e=null){return this.get(t,t.length-1,e)}static each(t,e,r=null){let[i,s]=[k.isArr(t),k.keys(t)],n=t=>i?parseInt(t):t,o=new Array(s.length);for(let r=0;r<s.length;r++)o[r]=e(t[s[r]],n(s[r]));return null!=r?r:o}static map(t,e){let[r,i]=[k.isArr(t),k.keys(t)],s=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],s(r));return t}static recursive(t,e,r,i=[]){return null==t?t:this.map(t,s=>(this.recursive(s[e],e,r,[...i,t]),r(s,i)))}static filterIndex(t,e=null){return null==e&&(e=t=>!k.isEmpty(t)),k.keys(t).filter(r=>k.isFunc(e)?e.call({},t[r],r):k.isRef(e)?this.includes(t[r],e):e===t[r])}static filter(t,e=null){return null==e&&(e=t=>!k.isEmpty(t)),k.vals(t).filter((r,i)=>k.isFunc(e)?e.call({},r,i):k.isRef(e)?this.includes(r,e):e===t[i])}static findIndex(t,e=null,r=-1){null==e&&(e=t=>!k.isEmpty(t));for(let r=0;r<t.length;r++){if(k.isFunc(e)&&e.call({},t[r],r))return r;if(k.isRef(e)&&this.includes(t[r],e))return r;if(e===t[r])return r}return r}static find(t,e=null,r=null){let i=this.findIndex(t,e);return-1===i?r:t[i]}static sort(t,e=null){return k.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=k.keys(t).sort((r,i)=>e.call({},t[r],t[i])),i=[];for(const e of r)i.push(t[e]);return i}static sortDeep(t,e){let r=k.keys(t).sort((t,r)=>k.compare(v.get(t,e),v.get(r,e))),i=[];for(const e of r)i.push(t[e]);return i}static sortPrim(t){let e=k.keys(t).sort((t,e)=>k.compare(t,e)),r=[];for(const i of e)r.push(t[i]);return r}static merge(t,...e){return t.concat(...e)}static prepend(t,...e){return t.unshift(...e),t}static append(t,...e){return t.push(...e),t}static add(t,e,r=null){return null==r&&(r=e),-1!==this.findIndex(t,r)||t.push(e),t}static replace(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1!==i&&this.splice(t,i,1),t.push(e),t}static remove(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i||this.splice(t,i,1),t}static toggle(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i?(t.push(e),t):(this.splice(t,i,1),t)}static insert(t,e,r){return this.splice(t,e,0,r),t}static slice(t,e,r=1){return t.slice(parseInt(e),r)}static splice(t,e,r=1,...i){return t.splice(parseInt(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(k.isPrim(t))return t;if(k.isObj(t))return v.clone(t);if(!k.isArr(t))return t;let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.clone(t[r]);return e}static diff(...t){return t.reduce((t,e)=>t.filter(t=>!e.includes(t)))}static isect(...t){return t.reduce((t,e)=>t.filter(t=>e.includes(t)))}static extract(t,e){let r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=v.get(t[i],e);return r}static reduce(t,e,r){return k.vals(t).reduce(e,r)}static chunk(t,e=10){let r=[];for(let i=0;i<t.length;i+=e)r.push(t.slice(i,i+e));return r}static includes(t,e){if(k.isObj(e))return v.includes(t,e);if(!k.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let s=0;!1===r&&s<i;s++)r||=this.has(t,e[s]);return r}static contains(t,e){let r=!0;for(let i of k.vals(e))r&&=-1!==k.vals(t).indexOf(i);return r}static matches(t,e){if(k.isObj(e))return v.matches(t,e);if(!k.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let s=0;!0===r&&s<i;s++)r&&=this.has(t,e[s]);return r}}g.removeIndex=(...t)=>(console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),Arr.unset(...t)),g.sortString=(...t)=>(console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),Arr.sortPrim(...t)),g.push=(...t)=>(console.warn("Arr.push() is deprecated, use Arr.append() instead."),Arr.append(...t)),g.concat=(...t)=>(console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),Arr.merge(...t)),g.equal=(...t)=>(console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),Arr.matches(...t)),g.diffrence=(...t)=>(console.warn("Arr.diffrence() is deprecated, use Arr.diff() instead."),Arr.diff(...t)),g.intersect=(...t)=>(console.warn("Arr.intersect() is deprecated, use Arr.isect() instead."),Arr.isect(...t));const y=g;class b{static keyoptim(t,e=!1,r=null){return null===r&&(r=k.isStr(t)),!r&&e&&(t=t.join(".")),r||e?t.split("."):t}static has(t,e,r=!1){if(null==t||null==e)return!1;"number"==typeof e&&(e=k.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return void 0!==t[e];e=this.keyoptim(e,r,i);let[s,n,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[s];for(;null!=t&&n<o;)t=t[e[n++]];return null!=t&&void 0!==t[s]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=k.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e];let n=0,o=(e=this.keyoptim(e,i,s)).length;if(0===o)return r;for(;null!=t&&n<o;)t=t[e[n++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=k.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,s)).length)return t;let n=t;for(let t,i,s=0;s<e.length;s++)t=i=String(e[s]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==n[t]&&(n[t]=t===i?{}:[]),t!==i&&y.insert(e,s+1,n[t].length),e.length-1===s&&(n[t]=r),n=n[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=k.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return delete t[e],t;e=this.keyoptim(e,r,i);let[s,n,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&n<o;)l=l[e[n++]];return null==l||delete l[s],t}static empty(t,e){return k.isEmpty(this.get(t,e))}static remove(t,e){if(!k.isArr(e))return t;for(let r of e)this.unset(t,r);return t}static each(t,e,r=null){let i={};for(let r of k.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){let r={};for(let i of k.keys(t))r[i]=e(t[i],i);return r}static filterIndex(t,e=null){return y.filterIndex(t,e)}static filter(t,e=null){let r={};for(let i of this.filterIndex(t,e))r[i]=t[i];return r}static flatten(t,e="",r={}){if("object"!=typeof t)return r[e]=t;""!==e&&(e+=".");for(let i of k.keys(t))this.flatten(t[i],e+i,r);return r}static flattenForm(t,e="",r={}){if("object"!=typeof t)return r[e]=t;let i=t=>e?`${e}[${t}]`:t;for(let e of k.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return y.each(k.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(k.isPrim(t))return t;if(k.isArr(t))return y.clone(t);if(!k.isObj(t))return t;let r={};for(let e of k.keys(t))r[e]=this.clone(t[e]);return null!=e?this.assign(r,e):r}static pluck(t,e,r=null){let i=this.get(t,e,r);return this.unset(t,e),i}static only(t,e,r=null){let i={};return this.each(t,(t,r)=>{y.has(e,r)&&(i[r]=t)}),null==r?i:this.assign(i,r)}static except(t,e,r=null){let i={};return this.each(t,(t,r)=>{y.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(k.isArr(e))return y.includes(t,e);if(!k.isObj(e))return t===e;let r=k.keys(e),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i=this.includes(t[r[n]],e[r[n]]);return i}static matches(t,e){if(k.isArr(e))return y.matches(t,e);if(!k.isObj(t))return t===e;let r=y.unique([...k.keys(e),...k.keys(t)]),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i&&=this.matches(t[r[n]],e[r[n]]);return i}}b.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),k.vals(...t)),b.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),y.find(...t)),b.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),y.findIndex(...t)),b.sort=(...t)=>(console.warn("Obj.sort() is deprecated, use Arr.sort() instead."),y.sort(...t)),b.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Arr.sortDeep() instead."),y.sortDeep(...t));const v=b;var w;function M(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const O={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class D{static isEmpty(t){return null==t||("string"==typeof t?""===t:"number"!=typeof t&&("boolean"!=typeof t&&(this.isArr(t)?0===t.length:0===this.len(t))))}static isNull(t){return null===t}static isUndef(t){return void 0===t}static isNix(t){return null==t}static isPrim(t){return"string"==typeof t||"number"==typeof t}static isStr(t){return"string"==typeof t}static isNum(t){return"number"==typeof t||!!this.isStr(t)&&/^-?[0-9]+(\.[0-9]+)?$/.test(t)}static isInt(t){return!!this.isNum(t)&&(this.isStr(t)?/^-?[0-9]+$/.test(t):parseInt(t)===parseFloat(t))}static isBool(t){return"boolean"==typeof t||!!this.isStr(t)&&/^(true|false)$/.test(t)}static isFunc(t){return"function"==typeof t}static isRef(t){return null!=t&&"object"==typeof t}static isObj(t){return null!=t&&Object.getPrototypeOf(t)===Object.prototype}static isArr(t){return null!=t&&Object.getPrototypeOf(t)===Array.prototype}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||O.iso.test(t)}static isDate(t){return t instanceof Date||/^\d{4}-\d{2}-\d{2}$/.test(t)}static isTime(t){return t instanceof Date||/^\d{2}:\d{2}:\d{2}$/.test(t)}static isEqual(t,e){return t instanceof Node?t.isEqualNode(e):this.isRef(t)?Object.is(t,e):t===e}static iter(t){if(null==t)return{};let e={};for(const[r,i]of t.entries())e[r]=i;return e}static keys(t){return null==t?[]:(this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!Qt().chrome)return Object.values(t);let e=this.keys(t);for(let r=0;r<e.length;r++)e[r]=t[e[r]];return e}static nodes(t){return Array.prototype.slice.call(t)}static props(t,e=[]){let r={};for(const i of Object.getOwnPropertyNames(t))e.length&&!y.has(e,i)&&(r[i]=t[i]);return r}static class(t,e=[]){return e=y.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=y.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return v.each(v.flattenForm(t),(t,r)=>{e.append(r,t)}),e}static each(t,e){if(!this.isRef(t))throw new Error("Iterate non object");for(let r of k.keys(t))e(t[r],r);return this}static len(t){return this.isArr(t)?t.length:this.isRef(t)?this.keys(t).length:this.string(t).length}static compare(t,e){return F.collator().compare(t,e)}static null(t,e=null){return"null"===t||this.isEmpty(t)?null:e}static arr(t){return this.isArr(t)?t:this.isStr(t)?(t=t.replace(/^@?\[?(.*?)]$/g,"$1"),y.each(t.split(","),t=>t.replace(/(^"|^'|'$|"$)/g,""))):[t]}static str(t){return this.isNix(t)||void 0===t.toString?String(t):t.toString()}static num(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),t):e}static int(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),Math.round(t)):e}static bool(t){return this.isRef(t)?!!this.vals(t).length:this.isNum(t)?0!==this.num(t):/^(true|yes)$/i.test(t)}}M(D,"isPrimitive",(w=D).isPrim),M(D,"isString",w.isStr),M(D,"isNumber",w.isNum),M(D,"isInteger",w.isInt),M(D,"isBoolean",w.isBool),M(D,"isFunction",w.isFunc),M(D,"isReference",w.isRef),M(D,"isObject",w.isObj),M(D,"isArray",w.isArr),M(D,"isIterable",w.isIter),M(D,"length",w.len),M(D,"array",w.arr),M(D,"string",w.str),M(D,"number",w.num),M(D,"integer",w.int),M(D,"boolean",w.bool),D.global=function(...t){return console.warn("Mix.global() is deprecated, use go() instead."),Qt(...t)},D.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),k.isObj(...t)},D.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),k.num(...t)},D.delay=function(...t){return console.warn("Mix.delay() is deprecated, use Run.delay() instead."),n.delay(...t)},D.async=function(...t){return console.warn("Mix.async() is deprecated, use Run.async() instead."),n.async(...t)},D.debounce=function(...t){return console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),n.debounce(...t)},D.throttle=function(...t){return console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),n.throttle(...t)},D.framerate=function(...t){return console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),n.framerate(...t)},D.convertString=function(...t){return console.warn("Mix.convertString() is deprecated, use Str.string() instead."),c.string(...t)},D.convertDatetime=function(...t){return console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),c.date(...t)},D.convertBool=function(...t){return console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),c.boolean(...t)},D.convertBoolean=function(...t){return console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),c.boolean(...t)};const k=D;const P=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],$=["8","9","a","b"],j=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class S{static radix(t=60,e=null){return(e||this.RADIX)[this.number(t-1)]}static number(t=1024,e=0){return Math.floor(Math.random()*(t-e+1))+e}static make(t=6,e=62,r={}){let i="";for(let r=0;r<t;r++)i+=this.radix(e);for(const t of Object.keys(r))i=c.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?this.radix($.length,$):this.radix(P.length,P);return e.substring(0,8)+"-"+e.substring(8,12)+"-"+t+e.substring(12,15)+"-"+e.substring(15,19)+"-"+e.substring(19,31)}static password(t=24,e=null){let r=[...this.RADIX,...e||j],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var x,N,Y;x=S,Y=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],(N=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(N="RADIX"))in x?Object.defineProperty(x,N,{value:Y,enumerable:!0,configurable:!0,writable:!0}):x[N]=Y;const E=S;class T{static bind(t,e,r={},i=!1){return k.isArr(t)?y.each(t,t=>this.bind(t,...arguments),this):(k.isPrim(r)&&(r={id:r}),this.$events=y.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){return k.isArr(t)?y.each(t,t=>this.unbind(t,...arguments),this):(k.isPrim(e)&&(e={id:e}),y.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return y.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){if(k.isArr(t))return y.each(t,t=>this.pause(t,...arguments),this);let r=y.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!0),this}static unpause(t,e={}){if(k.isArr(t))return y.each(t,t=>this.pause(t,...arguments),this);let r=y.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!1),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(T,"$events",[]);const A=T;function I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class H{static has(t=void 0){return void 0===t||k.has(H.$text,t)}static get(t=void 0,e=null){return void 0===t?H.$text:v.get(H.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?H.$text=t:v.set(H.$text,t,e)}static code(t=null){return k.isNull(t)?k.isNull(F.$code)?(F.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),F.$code):F.$code:F.$code=t}static collator(){return k.isNull(F.$sort)?(F.$sort=new Intl.Collator(F.code(),{numeric:!0,sensitivity:"base"}),F.$sort):F.$sort}static replace(t,e=null){return null==e||v.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=v.get(H.$text,t,t),F.replace(t,e)}static choice(t,e=0,r={}){return t=v.get(H.$text,t,t),void 0===r.count&&(r.count=e),t=F.countpick(t.split("|"),e),F.replace(t,r)}static countpick(t,e){let r=t.length;return 3===r&&0===e?t[0]:3===r&&1===e?t[1]:3===r&&e>=2?t[2]:2===r&&1===e?t[0]:2===r&&1!==e?t[1]:t[0]}}I(H,"$text",{}),I(H,"$sort",null),I(H,"$code","en");const F=H;function C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach(function(e){R(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function R(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const W={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class B{static global(){return null==globalThis.document?"":globalThis.document.cookie||""}static parse(t=!1){if(!t&&this.$cookie)return this.$cookie;this.$cookie={};let e=this.global().matchAll(W.entry);if(null==e)return this.$cookie;return y.each(Array.from(e),({groups:t})=>{this.$cookie[t.key]=t.value.replaceAll("{:}",";")}),this.$cookie}static get(t,e=null,r="string"){return this.$cookie||this.parse(),null==this.$cookie[t]?e:/^bool(ean)?$/.test(r)||/^num(ber)?$/.test(r)||/^int(eger)?$/.test(r)?k.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?pe.parseOptions(this.$cookie[t]):k.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof fe||(r=fe.make(r||"+7 days")),i=L({expires:r.toUTC(),path:"/"},i),k.isRef(e)&&(e=pe.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let s=t+"="+e.replaceAll(";","{:}");return y.each(i,(t,e)=>{s+=`;${e}=${t}`}),globalThis.document.cookie=s,this}static forget(t,e={}){e=L({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return y.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}R(B,"$cookie",null);const G=B;class q{static filterNodes(t,e=1){return y.filter(k.nodes(t),t=>t.nodeType===e)}static getNodePoint(t,e){let r=null;return null!=de.doc().elementsFromPoint&&(r=document.elementsFromPoint(t,e)),null!=de.doc().msElementsFromPoint&&(r=document.msElementsFromPoint(t,e)),r}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i,clientX:s,clientY:n}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=de.getNodePoint(s,n)),k.isArr(r)&&(r=y.first(r)),null==r&&(r=e.target),r.closest(t)}}class X{static _constructFinder(t){return"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=k.nodes(t)),t}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?de.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?de.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?de.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=k.nodes(this.el.childNodes);return-1===t?r:y.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=de.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>de.find(e).is(t)),y.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!de.find(e).is(t)),y.filter(this.els,t)}find(t){if(null==this.el)return de.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return k.isStr(r)&&(r=e.querySelectorAll(t)),de.find(r)}get(t=-1){let e=this.els;return-1===t?e:y.get(e,t)}first(t=0){return this.get(t)}last(t=1){return y.get(this.els,this.els.length-t)}each(t){return y.each(this.els,t)}loopParent(t,e=null){null==e&&(e=de.win());for(let r=this.el;r&&r!==e;r=r.parentNode)t.call({},r);return this}parent(){let t=this.getNodeParent();return null==t?de.find(null):t}child(t,e=1){for(let t of this.els)if(t.nodeType===e)return de.find(t);return de.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:y.filter(r,e=>de.find(e).is(t))}closest(t){if(this.el===t)return this.el;for(let e=this;null!=e.el;e=e.getNodeParent())if(e.is(t))return e.el;return null}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return de.find(e);return de.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return de.find(e);return de.find(null)}length(){return this.els.length}is(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.parent().find(t).get())if(e===this.el)return!0;return!1}matches(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.find(t).get())if(e===this.el)return!0;return!1}empty(){return this.length()<1||null==this.el}visible(){return null!=this.el&&this.el.is(":visible")}above(t){return this.parent().is(t)}inside(t){return null!=this.closest(t)}contains(t){return null!=this.find(t)}}X.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},X.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},X.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},X.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},X.prototype.getNot=()=>{console.error("Dom.getNot() is not implemented anymore.")};class U{}class V{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class z{}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(z,"events",[]);class _{bind(t,e,r,i=null,s=!1,n={}){return k.isPrim(n)&&(n={id:n}),de.events=y.append(de.events,{el:t,event:e,cb:r,selector:i,pause:s,options:n}),t.addEventListener(e,r,n),this}unbind(t,e,r=null,i={}){k.isPrim(i)&&(i={id:i});let s=y.filterIndex(de.events,{el:t,event:e,selector:r,options:i});if(0===s.length)return;return y.each(s.reverse(),r=>{var i;t.removeEventListener(...(i=de.events[r],[e,i.cb,i.options]))}),y.splices(de.events,s),this}on(t,e,r={},i=!1,s=null){if(k.isPrim(r)&&(r={id:r}),k.isArr(t))return y.each(t,t=>this.on(t,...arguments)),this;let n=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,n,s,i,r)}),this}off(t,e=null,r={}){return k.isArr(t)?(y.each(t,t=>this.off(t,...arguments)),this):(k.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}once(t,e,r={}){return r.id=E.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},s=!1){return this.on(t,function(t){let i=de.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,s,e),this}fire(t){let e=new Event(t);return this.each(t=>{t.dispatchEvent(e)}),this}}_.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},_.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},_.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},_.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class J{static make(t,e={}){t instanceof de&&(t=t.el),k.isStr(t)&&(t=document.createElement(t)),t=v.assign(t,e);let r=new de(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}}class K{prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return de.find(t).each(t=>{null!=t.prepend&&t.prepend(this.el)}),this}append(t){return this.each(e=>{null!=e.append&&e.append(t)}),this}appendTo(t){return de.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(el,e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class Z{static getDomState(){return document.readyState}static isDomReady(){return"complete"===de.getDomState()}static isDomComplete(){let t=de.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let i=()=>{n.delay(t,e)},[s,o]=[de.find(document),"DOMContentLoaded"],l=de.isDomReady;return l()?(n.wait(()=>{if(l())return i(),!0},10,r),this):(s.on(o,i),this)}static complete(t,e=0,r=6e3){let i=()=>{n.delay(t,e)},[s,o]=[de.find(document),"load"],l=de.isDomComplete;return l()?(n.wait(()=>{if(l())return i(),!0},10,r),this):(s.on(o,i),this)}}Z.required=()=>{console.error("Dom.required() is not implemented anymore.")};class Q{isNodeComplete(){return null!=this.el&&(!!this.el.naturalWidth||(!!this.el.naturalHeight||!!this.el.complete))}loaded(t,e=6e3){if(!this.el)return this;let r=this.isNodeComplete;return n.wait(()=>{if(r.call(this))return t(),!0},10,e),this}}function tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(r),!0).forEach(function(e){rt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function rt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class it{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),k.num(t,0)}}class st{margin(t=null,e=0){let r=this.computed(),i={top:de.num(r.marginTop),right:de.num(r.marginRight),bottom:de.num(r.marginBottom),left:de.num(r.marginLeft)};return null==t?i:v.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:de.num(r.paddingTop),right:de.num(r.paddingRight),bottom:de.num(r.paddingBottom),left:de.num(r.paddingLeft)};return null==t?i:v.get(i,t,e)}height(){return null==this.el?0:this.el instanceof Window?this.el.innerHeight:this.el.offsetHeight}clientHeight(){return null==this.el?0:de.num(this.computed("height",0))}scrollHeight(){return null==this.el?0:this.el.scrollHeight}innerHeight(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerHeight;let t=this.padding();return this.el.offsetHeight-t.top-t.bottom}realHeight(t={}){let e="auto";return this.actual(()=>e=this.height(),t),e}evaluateHeight(t=null,e=!0){null===(t=de.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerHeight()},{display:"none"}),!0===e&&this.style({height:r+"px"}),r}width(){return null==this.el?0:this.el instanceof Window?this.el.innerWidth:this.el.offsetWidth}clientWidth(){return null==this.el?0:de.num(this.computed("width",0))}scrollWidth(){return null==this.el?0:this.el.scrollWidth}innerWidth(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerWidth;let t=this.padding();return this.el.offsetWidth-t.left-t.right}realWidth(t={}){let e="auto";return this.actual(()=>e=this.width(),t),e}evaluateWidth(t=null,e=!0){null===(t=de.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerWidth()},{display:"none"}),!0===e&&this.style({width:r+"px"}),r}offset(t=null,e=null){let r=this.getOffset(e);return null==t?r:v.get(r,t,0)}offsetTop(t=null){return this.offset("top",t)}offsetBottom(t=null){return this.offset("bottom",t)}offsetLeft(t=null){return this.offset("left",t)}offsetRight(t=null){return this.offset("right",t)}loopOffset(t,e=null){null==e&&(e=de.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:de.body().scrollWidth-t.left-e,bottom:de.body().scrollHeight-t.top-r};return et(et({},t),i)}getOffset(t=null){null==t&&(t=de.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=de.num(t.offsetTop,0),r.left+=de.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=de.find(t),s={top:0,left:0,bottom:0,right:0};return e=t=>{s.top+=de.num(t.offsetTop,0),s.left+=de.num(t.offsetLeft,0)},i.loopOffset(e),s=this.calcOffset(s,i.scrollWidth(),i.scrollHeight()),{top:r.top-s.top,bottom:r.bottom-s.bottom,left:r.left-s.left,right:r.right-s.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:v.get(r,t,0)}scrollTop(t=null,e=null){return null==t?this.scroll("top",e):(this.each(e=>{e.scrollTop=t}),this)}scrollLeft(t=null,e=null){return null==t||this.each(e=>{e.scrollLeft=t}),this.scroll("left",e)}getScroll(t=null){null==t&&(t=de.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=de.num(t.scrollTop||t.pageYOffset||0),r.left+=de.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=de.num(t.scrollTop||t.pageYOffset||0),i.left+=de.num(t.scrollLeft||t.pageXOffset||0)},de.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}st.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},st.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},st.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(e){lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function lt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class at{}class ut{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return k.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(k.isArr(e)&&(e=e.join(" ")),k.isObj(e)&&(e=pe.castOptions(e)),this.el.setAttribute(t,e),this)}data(t,e=void 0,r=null){return this.attr("data-"+t,e,r)}computed(t=null,e=null){if(null==this.el)return e;if(1!==this.getNodeType())return e;let r=getComputedStyle(this.el);return null==t?r:v.get(r,t,e)}style(t=void 0,e=!0){if(null==this.el)return this;if(null===t)return this.attr("style",null);let r=this.attr("style",void 0,{});return k.isStr(r)&&(r=pe.parseOptions(r)),k.isUndef(t)?r:(e&&(t=ot(ot({},r),t)),this.attr("style",t),this)}class(t=void 0,e=!1){if(null==this.el)return this;if(null===t)return this.attr("class","");let r=this.attr("class",void 0,[]);return k.isStr(r)&&(r=r.split(" ")),k.isUndef(t)?r:(e&&(t=[...r,...t]),this.attr("class",t),this)}html(t=void 0){return void 0===t?this.el.innerHTML:(this.each(e=>{e.innerHTML=t}),this)}actual(t,e=null){let r=this.attr("style");this.style(e);let i=t(this.el,this.el);return this.attr("style",r),i}hasClass(t){return k.isArr(t)||(t=[t]),y.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>de.find(e).addClass(t));let e=this.el.className.split(" ");return k.isStr(t)&&(t=t.split(" ")),e=y.append(e,...t),this.el.className=y.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>de.find(e).remClass(t));let e=this.el.className.split(" ");return k.isStr(t)&&(t=t.split(" ")),e=y.diff(e,t),this.el.className=y.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>de.find(e).toggleClass(t)):this.hasClass(t)?this.remClass(t):this.addClass(t)}stateClass(t,e=!0){return this.els.length>1?this.each(e=>de.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}ut.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},ut.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(r),!0).forEach(function(e){dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ct(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function dt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ft{static inviewMaxY(t,e=null){if(k.isString(t)&&(t={el:t}),!(t=ht(ht({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewY() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return de.find(t.el).each(t=>{(t=>de.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:y.first(i)}static inviewMaxX(t,e=null){if(k.isString(t)&&(t={el:t}),!(t=ht(ht({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewX() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return de.find(t.el).each(t=>{(t=>de.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:y.first(i)}}class pt{viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[de.win().innerWidth,this.width()],[r,i]=[this.offset("left"),this.parent().scroll("left")];return{left:Math.max(0,r-i),right:Math.max(0,t-(r+e-i))}}inviewX(t=null){let{left:e,right:r}=de.find(t).viewoffY(),[i,s]=[de.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-n+e);return l>s&&(l=Math.min(s,i+s-l)),Math.max(0,l)}inratioX(t=null){return 1/this.width()*this.inviewX(t)}isInviewX(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewX(r)>t:this.inratioX(r)>t}viewoffY(){if(null==this.el)return{top:0,bottom:0};let[t,e]=[de.win().innerHeight,this.height()],[r,i]=[this.offset("top"),this.parent().scroll("top")];return{top:Math.max(0,r-i),bottom:Math.max(0,t-(r+e-i))}}inviewY(t=null){let{top:e,bottom:r}=de.find(t).viewoffY(),[i,s]=[de.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-n+e);return l>s&&(l=Math.min(s,i+s-l)),Math.min(Math.max(0,l),i)}inratioY(t=null){return 1/this.height()*this.inviewY(t)}isInviewY(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewY(r)>t:this.inratioY(r)>t}}pt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},pt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class mt{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=de.doc().title),document.title=F.replace(e,{value:t,title:this.$meta.title}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(mt,"$meta",{}),mt.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),de.setMetaTitle(t));class gt{}class yt{}class bt{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}function vt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const wt=[function(t){return v.each(k.class(q),(e,r)=>{t[r]=e}),v.each(k.proto(X),(e,r)=>{t.prototype[r]=e}),t.init.push(X._constructFinder),t},function(t){return v.each(k.class(Z),(e,r)=>{t[r]=e}),v.each(k.proto(Q),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(U),(e,r)=>{t[r]=e}),v.each(k.proto(V),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(z),(e,r)=>{t[r]=e}),v.each(k.proto(_),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(J),(e,r)=>{t[r]=e}),v.each(k.proto(K),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(it),(e,r)=>{t[r]=e}),v.each(k.proto(st),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(at),(e,r)=>{t[r]=e}),v.each(k.proto(ut),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(ft),(e,r)=>{t[r]=e}),v.each(k.proto(pt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(mt),(e,r)=>{t[r]=e}),v.each(k.proto(gt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.class(yt),(e,r)=>{t[r]=e}),v.each(k.proto(bt),(e,r)=>{t.prototype[r]=e}),t}];class Mt{constructor(t,...e){vt(this,"el",null),vt(this,"els",[]),y.each(de.init,r=>{t=r.call(this,t,...e)}),t instanceof de&&(t=t.el),k.isArr(t)||(t=[t]),this.el=t[0],this.els=t}static find(t,...e){return new de(t,...e)}static extend(t){t.call({},this)}static win(){return null==globalThis.window?{}:window}static doc(){return null==globalThis.document?{}:document}static body(){return this.doc().body?this.doc().body:{}}}vt(Mt,"init",[]);const Ot=function(){let t=Mt;for(const e of wt)t=e.call(t,t);return t},Dt={second:/([+-])([0-9]+)\s?seconds?/i,minute:/([+-])([0-9]+)\s?minutes?/i,hour:/([+-])([0-9]+)\s?hours?/i,date:/([+-])([0-9]+)\s?days?/i,month:/([+-])([0-9]+)\s?months?/i,year:/([+-])([0-9]+)\s?years?/i};class kt{get(t){return"time"===t?this.value.getTime():/^seconds?$/i.test(t)?this.value.getSeconds():/^minutes?$/i.test(t)?this.value.getMinutes():/^hours?$/i.test(t)?this.value.getHours():/^days?$/i.test(t)?this.value.getDay():/^dates?$/i.test(t)?this.value.getDate():/^months?$/i.test(t)?this.value.getMonth()+1:/^years?$/i.test(t)?this.value.getFullYear():this}set(t,e){k.isNum(t)||(t=k.int(t));let r=this.value.getDay();return"day"===e&&(t=t+1-(r||7)),"time"===e&&this.value.setTime(t),/^seconds?$/i.test(e)&&this.value.setSeconds(t),/^minutes?$/i.test(e)&&this.value.setMinutes(t),/^hours?$/i.test(e)&&this.value.setHours(t),/^days?$/i.test(e)&&this.add(t,"date"),/^dates?$/i.test(e)&&this.value.setDate(t),/^months?$/i.test(e)&&this.value.setMonth(t-1),/^years?$/i.test(e)&&this.value.setFullYear(t),this}time(t=null){return null==t?this.get("time"):this.set(t,"time")}second(t=null){return null==t?this.get("second"):this.set(t,"second")}minute(t=null){return null==t?this.get("minute"):this.set(t,"minute")}hour(t=null){return null==t?this.get("hour"):this.set(t,"hour")}day(t=null){return null==t?this.get("day"):this.set(t,"day")}date(t=null){return null==t?this.get("date"):this.set(t,"date")}month(t=null){return null==t?this.get("month"):this.set(t,"month")}year(t=null){return null==t?this.get("year"):this.set(t,"year")}shortyear(){return this.get("year").toString().slice(-2)}add(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)+k.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-k.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return k.isEmpty(t)||v.each(Dt,(e,r)=>{c.match(t,e,([t,e,i])=>{"+"===e?this.add(i,r):this.sub(i,r)})}),this}apply(t,e="YYYY-MM-DD HH:mm:ss",r=[]){t=fe.make(t,e);for(const e of r)this.set(t.get(e),e);return this}applyDate(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["date","month","year"])}applyTime(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["hour","minute","second"])}}kt.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},kt.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},kt.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},kt.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},kt.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},kt.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},kt.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},kt.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},kt.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},kt.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},kt.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},kt.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},kt.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},kt.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},kt.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},kt.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Pt={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},$t={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class jt{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in $t)t=c.replace(t,$t[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return k.isTime(t)&&(e="HH:mm:ss"),k.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):k.isIsoDate(t)?(this.value=new Date(t),this):this.parseFormat(t,e)}parseFormat(t,e){if(!this.isParsable(t,e))return this.value=new Date(NaN),this;for(const r in $t)this.set(c.extract(t,$t[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return v.has(Pt,t)&&(t=F.trans(Pt[t])),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("dddd",()=>this.human("day"))).replace("ddd",()=>this.human("day",3))).replace("dd",()=>this.human("day",2))).replace("MMMM",()=>this.human("month"))).replace("MMM",()=>this.human("month",3))).replace("YYYY",()=>c.integer(this.year(),4))).replace("MM",()=>c.integer(this.month(),2))).replace("DD",()=>c.integer(this.date(),2))).replace("HH",()=>c.integer(this.hour(),2))).replace("mm",()=>c.integer(this.minute(),2))).replace("ss",()=>c.integer(this.second(),2))).replace("YY",()=>c.integer(this.shortyear(),2))).replace("X",()=>c.integer(this.time()))).replace("x",()=>c.integer(this.time()/1e3))}code(t="X"){return k.int(this.format(t))}}class St{before(t=null,e="x"){return this.code(e)<fe.make(t).code(e)}beforeDate(t=null,e="YYYYMMDD"){return this.before(t,e)}beforeTime(t=null,e="HHmmss"){return this.before(t,e)}after(t=null,e="x"){return this.code(e)>fe.make(t).code(e)}afterDate(t=null,e="YYYYMMDD"){return this.after(t,e)}afterTime(t=null,e="HHmmss"){return this.after(t,e)}equal(t=null,e="x"){return t instanceof fe||(t=fe.make(t)),this.code(e)===t.clone().code(e)}equalDate(t=null,e="YYYYMMDD"){return this.equal(t,e)}equalTime(t=null,e="HHmmss"){return this.equal(t,e)}between(t=null,e=null,r="YYYYMMDD"){let i=[fe.make(t),fe.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class xt{grid(t="day"){if(/^seconds?$/i.test(t))return this.getSecondsGrid();if(/^minutes?$/i.test(t))return this.getMinutesGrid();if(/^hours?$/i.test(t))return this.getHoursGrid();if(/^days?$/i.test(t))return this.getDaysGrid();if(/^dates?$/i.test(t))return this.getDatesGrid();if(/^months?$/i.test(t))return this.getMonthsGrid();if(/^years?$/i.test(t))return this.getYearsGrid();if(/^decades?$/i.test(t))return this.getDecadesGrid();throw new Error(`Invalid grid scope type "${t}".`)}getSecondsGrid(t=1){return null==t&&(t=1),y.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),y.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),y.make(24/t,e=>this.clone().hour(e*t))}getDaysGrid(){let t=[this.first("date").first("day"),this.last("date").last("day")];return t[0].range(t[1],"date")}getDatesGrid(){let t=[this.first("date"),this.last("date")];return t[0].range(t[1],"date")}getMonthsGrid(){let t=[this.first("month"),this.last("month")];return t[0].range(t[1],"month")}getYearsGrid(){let t=[this.first("year"),this.clone().last("year")];return t[0].range(t[1],"year")}getDecadesGrid(){let t=[this.first("decade"),this.clone().last("decade")];return t[0].range(t[1],"decade")}}xt.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},xt.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},xt.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},xt.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},xt.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},xt.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class Nt{prev(t="date"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().sub(10,"year"):this.clone().sub(1,t)}next(t="day"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().add(10,"year"):this.clone().add(1,t)}prevSecond(){return this.prev("second")}nextSecond(){return this.next("second")}prevMinute(){return this.prev("minute")}nextMinute(){return this.next("minute")}prevHour(){return this.prev("hour")}nextHour(){return this.next("hour")}prevDate(){return this.prev("date")}nextDate(){return this.next("date")}prevMonth(){return this.prev("month")}nextMonth(){return this.next("month")}prevYear(){return this.prev("year")}nextYear(){return this.next("year")}prevDecade(){return this.prev("decade")}nextDecade(){return this.next("decade")}first(t="date"){if(/^seconds?$/i.test(t))return this.firstSecond();if(/^minutes?$/i.test(t))return this.firstMinute();if(/^hours?$/i.test(t))return this.firstHour();if(/^days?$/i.test(t))return this.firstDay();if(/^dates?$/i.test(t))return this.firstDate();if(/^months?$/i.test(t))return this.firstMonth();if(/^years?$/i.test(t))return this.firstYear();if(/^decades?$/i.test(t))return this.firstDecade();throw new Error(`Invalid first scope type "${t}".`)}last(t="date"){if(/^seconds?$/i.test(t))return this.lastSecond();if(/^minutes?$/i.test(t))return this.lastMinute();if(/^hours?$/i.test(t))return this.lastHour();if(/^days?$/i.test(t))return this.lastDay();if(/^dates?$/i.test(t))return this.lastDate();if(/^months?$/i.test(t))return this.lastMonth();if(/^years?$/i.test(t))return this.lastYear();if(/^decades?$/i.test(t))return this.lastDecade();throw new Error(`Invalid last scope type "${t}".`)}firstSecond(){return this.clone().set(0,"second")}lastSecond(){return this.clone().set(59,"second")}firstMinute(){return this.clone().set(0,"minute")}lastMinute(){return this.clone().set(59,"minute")}firstHour(){return this.clone().set(0,"hour")}lastHour(){return this.clone().set(23,"hour")}firstDay(){return this.clone().set(0,"day")}lastDay(){return this.clone().set(6,"day")}firstDate(){return this.clone().set(1,"date")}lastDate(){return this.clone().next("month").set(0,"date")}firstMonth(){return this.clone().set(1,"month")}lastMonth(){return this.clone().set(12,"month")}nthYear(t=0){let e=10*Math.floor(this.year()/10);return this.clone().set(e+t,"year")}firstYear(){return this.nthYear(0)}lastYear(){return this.nthYear(9)}nthDecade(t=0){let e=100*Math.floor(this.year()/100);return this.clone().set(e+10*t,"year")}firstDecade(){return this.nthDecade(0)}lastDecade(){return this.nthDecade(9)}}class Yt{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],s=[this.clone(),fe.make(t)];s[0].afterDate(s[1])&&(s=s.reverse()),s[1].add(1,e);for(let t=s[0];!t.equal(s[1],r);t=t.next(e))y.append(i,t);return i}}Yt.prototype.getDatesRange=function(...t){return console.warn("NowRange.getDatesRange() is deprecated, use NowRange.range() instead."),this.range(...t)};const Et=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Tt=["January","February","March","April","May","June","July","August","September","October","November","December"];class At{human(t="day",e=null){return/^days?$/i.test(t)?this.getHumanDay(e):/^months?$/i.test(t)?this.getHumanMonth(e):this.get(t)}getHumanDay(t=null){let e=this.day()-1;if(!Et[e])throw new Error(`Invalid day number "${e}".`);let r=F.trans(Et[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!Tt[e])throw new Error(`Invalid month number "${e}".`);let r=F.trans(Tt[e]);return null!=t&&(r=r.substring(0,t)),r}}function It(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ht=[function(t){return v.each(k.proto(kt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.proto(jt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.proto(St),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.proto(xt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.proto(Nt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.proto(Yt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(k.proto(At),(e,r)=>{t.prototype[r]=e}),t}];class Ft{constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){It(this,"input",null),It(this,"value",null),"now"===t&&(t=null);let r=t;return t&&t.toDate&&(t=t.toDate()),t instanceof Date||(t=new Date),this.input=t,k.isNix(r)&&(this.input=r),this.value=t,k.isStr(r)&&this.parse(r,e),y.each(fe.init,t=>{el=t.call(this,el,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new fe(t,e)}reset(t=null){return null==t&&(t={month:!0,day:!0,time:!0}),t.month&&this.value.setMonth(0),t.day&&this.value.setDate(1),t.time&&this.value.setHours(0,0,0),this}clone(t=!1){return new fe(new Date(this.value),null,t)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}It(Ft,"init",[]),Ft.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const Ct=function(){let t=Ft;for(const e of Ht)t=e.call(t,t);return t},Lt=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>k.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>k.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>k.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>k.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Rt=[{match:t=>k.isArr(t),parse:t=>JSON.stringify(t)}];class Wt{static keyed(t,e=null){return k.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!k.isStr(t))return e;t=t.replace(/(^"|^'|'$|"$)/g,"");for(let e of r)if(e.match(t))return e.parse(t);for(let e of Lt)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),k.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Rt)if(e.match(t))return e.parse(t);return k.str(t)}}const Bt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Gt{static castParams(t={}){if(k.isEmpty(t))return"";return y.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!k.isRef(e))return k.str(t)+"="+pe.casted(e,!0);return y.each(e,(r,i)=>this.castParam(k.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(k.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Bt.entry);if(null==e)return{};const[r,i]=[pe.keyed,pe.parsed];return y.reduce(Array.from(e),(t,{groups:e})=>v.set(t,r(e.key),i(e.val)),{})}}const qt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Xt{static castOptions(t={},e=!0){if(k.isEmpty(t))return"";return y.each(t,(t,r)=>this.castOption(r,t,null,e)).join(";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let s=i?": ":":";return k.isObj(e)?y.map(e,(e,r)=>this.castOption(r,e,t)).join(";"):k.str(t)+s+pe.casted(e,!1)}static parseOptions(t){if(k.isEmpty(t))return{};let e=t.matchAll(qt.entry);if(null==e)return{};const[r,i]=[pe.keyed,pe.parsed];return y.reduce(Array.from(e),(t,{groups:e})=>v.set(t,r(e.key),i(e.val)),{})}}const Ut=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Vt{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),y.each(Ut,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const zt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class _t{static filesize(t,e=1){k.isNum(t)||(t=k.num(t,0));let r=r=>m.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<zt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+zt[e];return r(zt.length)}}const Jt=[function(t){return v.each(k.class(Wt),(e,r)=>{t[r]=e}),t},function(t){return v.each(k.class(Gt),(e,r)=>{t[r]=e}),t},function(t){return v.each(k.class(Xt),(e,r)=>{t[r]=e}),t},function(t){return v.each(k.class(Vt),(e,r)=>{t[r]=e}),t},function(t){return v.each(k.class(_t),(e,r)=>{t[r]=e}),t}];class Kt{static extend(t){t.call({},this)}}const Zt=function(){let t=Kt;for(const e of Jt)t=e.call(t,t);return t};function Qt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function te(){const t=Qt();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.safari&&(r.safari=/Safari\//.test(e)),null==r.firefox&&(r.firefox=/Firefox\//.test(e)),null==r.edge&&(r.edge=/Edge\//.test(e)),null==r.chrome&&(r.chrome=/Chrome\//.test(e)),t.piuag=r}function ee(){const t=Qt();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.win&&(r.win=/Windows/.test(e)),null==r.osx&&(r.osx=/Macintosh|Mac OS X/.test(e)),null==r.gnu&&(r.gnu=/Linux/.test(e)),null==r.ios&&(r.ios=/iPhone|iPad|iPod/.test(e)),null==r.oid&&(r.oid=/Android/.test(e)),t.piudv=r}class re{static has(t){return v.has(this.$data,y.first(t))}static set(t,e){let[r,i]=[null,y.first(t)];v.has(this.$data,i)&&(r=v.get(this.$data,i)),k.isEqual(r,e)||(v.set(this.$data,i,e),A.fire("store:"+i,e,i))}static unset(t){v.unset(this.$data,[...y.first(t)])}static get(t,e=null,r=!1){let i=y.first(t);if(!v.has(this.$data,i)&&!r)return e;v.has(this.$data,i)&&r&&v.set(this.$data,i,e);let s=v.get(this.$data,i,e);return k.isObj(s)?v.clone(s):s}static find(t,e,r=null){let i=y.first(t);if(!1===v.has(this.$data,i))return r;if(!1===v.has(e,"id"))return r;let s=y.findIndex(this.get(i),{id:e.id});return-1===s?r:this.get(i+"."+s)}static replace(t,e){let r=y.first(t);if(!1===v.has(this.$data,r))return;if(!1===v.has(e,"id"))return;let i=y.findIndex(this.get(r),{id:m.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,y.concat(this.get(t,[]),e))}static remove(t,...e){this.set(t,y.diff(this.get(t,[]),e))}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(re,"$data",{});const ie=re;class se{static set(t,e){this.$routes[t]=e}static get(t,e=null,r=null){let i=t;return/^https?:\/\//.test(i)||(i=this.$routes[t]||t),i=F.replace(i,e),k.isEmpty(r)||(i+="?"+pe.castParams(e)),i}static goto(t,e=null,r=null){window.location.href=this.get(t,e,r)}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(se,"$routes",{});const ne=se;function oe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class le{constructor(t,e={}){if(oe(this,"map",null),oe(this,"markers",{}),oe(this,"cluster",null),oe(this,"clusterFilter",null),oe(this,"clusterOptions",{}),!globalThis.google)throw new Error("Google Maps is required for pi.Map");let r=v.only(e,["lat","lng"]);v.has(e,"styles")||(e.styles=Map.mapStyle),e=v.assign({gestureHandling:"cooperative",scrollwheel:null,zoom:12,center:r},v.except(e,["lat","lng"])),this.map=new globalThis.google.maps.Map(de.find(t).get(0),e)}static setMapStyle(t=[]){return Map.mapStyle=t,this}static setMarkerStyle(t,e={},r={}){if(!globalThis.google)throw new Error("Google Maps is required for pi.Map");if(!v.has(e,"default"))return console.error("Marker style requires default property");v.has(e,"width")||(e.width=45),v.has(e,"height")||(e.height=45);let i={},s=new globalThis.google.maps.Size(e.width,e.height),n=new globalThis.google.maps.Point(0,0),o=new globalThis.google.maps.Point(e.width/2,e.height);return i.default={url:e.default,size:s,origin:n,anchor:o,scaledSize:s},v.has(e,"hover")&&(i.hover=v.assign({},i.default,{url:e.hover})),v.has(i,"hover")||(i.hover=i.default),v.has(e,"active")&&(i.active=v.assign({},i.default,{url:e.active})),v.has(i,"active")||(i.active=i.default),v.each(r,(t,e)=>{i[e]=v.assign({},i.default,{url:t})}),v.set(Map.markerStyles,t,i),this}clusterMarkers(t={},e=null,r=!0){if(!this.cluster&&!r)return;if(void 0===globalThis.MarkerClusterer)return console.error("Google Maps Cluster library not laoded!");v.has(t,"imagePath")||v.has(t,"styles")||(t.imagePath="//developers.google.com/maps/documentation/javascript/examples/markerclusterer/m"),this.cluster&&this.cluster.clearMarkers(),k.isFunction(e)&&(this.clusterFilter=e);let i=y.filter(this.markers,t=>{let e=this.getMarkerVisibility(t.key);return k.isFunction(this.clusterFilter)?e&&this.clusterFilter.call(this,t):e});this.cluster=new globalThis.MarkerClusterer(this.map,y.each(i,t=>t.marker),this.clusterOptions=t)}styleMarker(t,e=null){let r=v.get(this.markers,t);if(k.isEmpty(r))return console.error(`Marker "${t}" not found`);k.isEmpty(e)&&(e=this.getInfoVisibility(t)?"active":"default"),v.has(Map.markerStyles,[r.style,e])&&r.marker.setIcon(v.get(Map.markerStyles,[r.style,e]))}getMarker(t){return v.get(this.markers,t)}getMarkerVisibility(t,e=!1){let r=v.get(this.markers,t);return k.isEmpty(r)?e:r.marker.getVisible()}getMarkerPositon(t,e=null){let r=v.get(this.markers,t);return k.isEmpty(r)?e:r.marker.getPosition()}toggleMarker(t){let e=v.get(this.markers,t);return k.isEmpty(e)?console.error(`Marker "${t}" not found`):e.marker.getVisible()?this.hideMarker(t):this.showMarker(t)}showMarker(t){let e=v.get(this.markers,t);if(k.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!e.marker.getVisible();return r&&e.marker.setVisible(!0),r}hideMarker(t){let e=v.get(this.markers,t);if(k.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!!e.marker.getVisible();return r&&e.marker.setVisible(!1),this.closeInfo(t),r}enterMarker(t){let e=v.get(this.markers,t);if(k.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="hover";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}leaveMarker(t){let e=v.get(this.markers,t);if(k.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="default";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}getInfoVisibility(t,e=!1){let r=v.get(this.markers,t);return k.isEmpty(r)||!v.has(r,"info")?e:!!r.info.getMap()}toggleInfo(t){let e=v.get(this.markers,t);return k.isEmpty(e)?console.error(`Marker "${t}" not found`):e.info.getMap()?this.closeInfo(t):this.openInfo(t)}openInfo(t){let e=v.get(this.markers,t);if(k.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!v.has(e,"info"))return!0;let r=!e.info.getMap();return Map.closeInfoWindows&&v.each(k.keys(this.markers),this.closeInfo.bind(this)),r&&e.info.open(this.map,e.marker),k.isFunction(e.onOpen)&&e.onOpen(e),this.styleMarker(t,"active"),r}closeInfo(t){let e=v.get(this.markers,t);if(k.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!v.has(e,"info"))return!1;let r=!!e.info.getMap();return r&&e.info.close(),k.isFunction(e.onClose)&&e.onClose(e),this.styleMarker(t,"default"),r}createMarker(t=null,e={}){k.isEmpty(t)&&(t=E.uuid());let r={key:t};return v.has(e,"visible")||(e.visible=!0),r.extras=v.except(e,["map","position","lat","lng","html","style","visible","onOpen","onClose"]),v.has(e,"map")||(e.map=this.map),v.has(e,"position")||(e.position=v.only(e,["lat","lng"])),v.has(e,"style")&&(r.style=e.style),r.marker=new globalThis.google.maps.Marker(e),e.visible||r.marker.setVisible(!1),v.assign(r,{onOpen:v.get(e,"onOpen"),onClose:v.get(e,"onClose")}),v.set(this.markers,t,r),this.clusterMarkers(this.clusterOptions,null,!1),v.has(e,"html")?(v.has(r,"style")||(r.style="default"),this.styleMarker(t),r.marker.addListener("mouseover",()=>this.enterMarker(t)),r.marker.addListener("mouseout",()=>this.leaveMarker(t)),r.info=new globalThis.google.maps.InfoWindow({content:'<div class="gw-i-html">'+v.get(e,"html")+"</div>"}),r.marker.addListener("click",()=>this.toggleInfo(t)),r.info.addListener("closeclick",()=>this.closeInfo(t)),r.info.addListener("domready",()=>A.fire("MapsDomReady")),v.set(this.markers,t,r),v.get(this.markers,t)):v.get(this.markers,t)}setMarkerPosition(t,e={}){let r=v.get(this.markers,t);if(k.isEmpty(r))return console.error(`Marker "${t}" not found`);r.marker.setPosition(e)}setMarkerByAddress(t,e){return this.getLocationByAddress(e,e=>{this.setMarkerPosition(t,v.get(e,"0.geometry.location",{}))})}getLocationByAddress(t,e=null){let r=new globalThis.google.maps.Geocoder;return new Promise((i,s)=>{r.geocode({address:t},(t,r)=>{"OK"===r&&(e(t),i(t)),"OK"!==r&&s(t)})})}showMarkers(t=null){let e=this.markers;return k.isEmpty(t)||(e=v.filter(this.markers,t)),Map.hideMarkers&&v.each(k.keys(this.markers),this.hideMarker.bind(this)),v.each(e,t=>this.showMarker(t.key)),this.clusterMarkers(this.clusterOptions,null,!1),this}getMarkerBoundry(t=null){let e=this.markers;k.isEmpty(t)||(e=v.filter(this.markers,t));let r=new globalThis.google.maps.LatLngBounds;return v.each(e,t=>{t.marker.getVisible()&&r.extend(t.marker.getPosition())}),r}focusMarkers(t=null,e=14,r=15){let i=this.getMarkerBoundry(t);return this.map.setCenter(i.getCenter()),this.map.fitBounds(i,r),this.map.getZoom()>e&&this.map.setZoom(e),this}renderDirections(t){let e=new globalThis.google.maps.DirectionsService,r=new globalThis.google.maps.DirectionsRenderer;v.has(t,"map")||(t.map=this.map),v.has(t,"travelMode")||(t.travelMode="DRIVING"),r.setMap(t.map),v.has(t,"panel")&&!de.find(t.panel).empty()&&r.setPanel(de.find(t.panel).get(0)),t=v.only(t,["origin","destination","travelMode"]);return new Promise((i,s)=>{e.route(t,(t,e)=>{"OK"===e&&(r.setDirections(t),i(t)),"OK"!==e&&s(t)})})}}oe(le,"mapStyle",[]),oe(le,"markerStyles",{}),oe(le,"hideMarkers",!0),oe(le,"closeInfoWindows",!0);const ae=le;function ue(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ce{static listen(){document.addEventListener("scroll",ce.scroll),ce.scroll()}static scroll(){y.each(this.invi,(t,e)=>{de.find(t.el).inviewY()&&(y.removeIndex(this.invi,e),t.cb())})}static alias(t,e){return v.set(this.inis,t,e),this}static bind(t,e,r={}){let i=de.find(e),s=this.getPrefix(t);i.addClass(s);let n=v.get(this.inis,t,null);if(k.isEmpty(n))return console.error(`Element "${t}" is not defined.`);let o=(t,e)=>{let r=new n(t.get(0),e);return ce.runs.push({el:t.get(0),prefix:s,deamon:r}),t.data(s,r),void 0!==r.bind?r.bind(t.get(0),e):r};return de.ready(()=>o.call({},i,r)),this}static unbind(t,e,r={}){let i=de.find(e),s=this.getPrefix(t),n=v.get(this.inis,t,null);if(k.isEmpty(n))return console.error(`Element "${t}" is not defined.`);return((t,e)=>{let r=t.data(s);if(void 0!==r.unbind)return r.unbind(t.get(0),e)}).call({},i,r),y.remove(ce.runs,{el:i.get(0)}),this}static observe(t,e=!1){let r=this.getPrefix(t),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:[r]},s=()=>{let i=ce.getPrefix(t),s=y.filter(this.runs,{prefix:r});y.each(s,({el:i})=>{let s=c.objectify(de.find(i).attr(r));if(e&&k.isEmpty(s)&&(s={_plain:de.find(i).attr(r)}),v.pluck(s,"inview",!1)&&y.remove(this.invi,{el:i}),!document.body.contains(i))return this.unbind(t,i,s)}),de.find(`[${r}]:not(.${i})`).each(i=>{let s=c.objectify(de.find(i).attr(r));e&&k.isEmpty(s)&&(s={_plain:de.find(i).attr(r)});let n=()=>{this.bind(t,i,s)};v.pluck(s,"inview",!1)?this.bindInview(i,n):n()})};return de.find(document.body).observer(s)(document.body,i),de.find(document.body).on("dom.change",s),this}static bindInview(t,e){y.add(this.invi,{el:t,cb:e},{el:t})}static unbindInview(t,e){y.remove(this.invi,{el:t,cb:e},{el:t})}static getPrefix(t){return t?this.prefix+"-"+t:this.prefix}static setPrefix(t){this.prefix=t}}ue(ce,"prefix","js"),ue(ce,"mount","mount"),ue(ce,"inis",{}),ue(ce,"runs",[]),ue(ce,"invi",[]);const he=ce,de=Ot(),fe=Ct(),pe=Zt(),me=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>k[e](...t)}}),ge=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),E.make()};globalThis.pi=r;var ye=window;for(var be in e)ye[be]=e[be];e.__esModule&&Object.defineProperty(ye,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={},r={};function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.r(r),t.d(r,{Any:()=>me,Arr:()=>y,Cookie:()=>B,Data:()=>ie,Dom:()=>de,Element:()=>he,Event:()=>A,For:()=>pe,Hash:()=>T,Locale:()=>F,Map:()=>ae,Mix:()=>D,Now:()=>fe,Num:()=>m,Obj:()=>v,Route:()=>ne,Run:()=>n,Str:()=>c,UUID:()=>ge,browser:()=>te,device:()=>ee,go:()=>Qt});class s{static clear(t){return D.isArr(t)?y.each(t,t=>this.clear(t),this):D.isFunc(t)?(t(),this):(clearTimeout(t),clearInterval(t),this)}static tryin(t){try{requestIdleCallback(t)}catch(t){}return this}static wait(t,e=0,r=500){let i,s;return s=setTimeout(()=>{this.clear([i,s])},e*r),i=setInterval(()=>{t()&&this.clear([s,i])},e),()=>clearInterval(i)}static frame(t,...e){return requestAnimationFrame(()=>{t(...e)}),()=>null}static idle(t,...e){return requestIdleCallback(()=>{t(...e)}),()=>null}static async(t,...e){return setTimeout(()=>{t(...e)}),()=>null}static delay(t,e=0,...r){let i=setTimeout(()=>{t(...r)},e);return()=>clearTimeout(i)}static debounce(t,e=100){let r=null;return(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{this.frame(t,...i)},e)}}static throttle(t,e=100){let r,i=null;return(...s)=>{i&&clearTimeout(i),i=setTimeout(()=>{r=!1},e),r||(this.frame(t,...s),r=!0)}}static framerate(t,e=30){let r=0;return(...i)=>{Date.now()-r<=1e3/e||(this.frame(t,...i),r=Date.now())}}static framebuffer(t,e,r=1e3){const i={key:e,cb:t,priority:r,args:[],active:!1};y.add(this.$buffer,i);let s=()=>{this.runFramebuffer()};return(t,...e)=>{v.assign(i,{args:[t,...e],active:!0}),t.preventDefault(),s()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{console.log("delayed runFramebuffer"),this.runFramebuffer()},50),Date.now()-this.$timer<50)return;this.$idler&&clearTimeout(this.$idler),this.$timer=Date.now();let t=y.filter(this.$buffer,{active:!0});0!==t.length&&(t=y.sort(t,"priority"),y.each(t.reverse(),t=>{t.cb(...t.args),t.active=!1}))}}i(s,"$idler",null),i(s,"$timer",0),i(s,"$buffer",[]);const n=s;var o;function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class u{static get(t,e){return D.isStr(t)||(t=D.str(t)),D.isInt(e)&&(e=D.int(e)),t.charAt(e)}static set(t,e,r=""){return D.isStr(t)||(t=D.str(t)),D.isInt(e)&&(e=D.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){D.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){D.isNull(r)&&(r=t);let i=this.range(r,e);return null===i?null:this.slice(t,...i)}static match(t,e,r=null){let i=D.str(t).match(e);return D.isEmpty(i)?[]:D.isFunc(r)?r(i):i}static regex(t){return D.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return D.str(t).toUpperCase()}static ucfirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lc(t){return D.str(t).toLowerCase()}static lcfirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static cc(t){return y.each(pe.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return pe.slugify(t)}static sc(t){return pe.slugify(t).replace("-","_")}static pc(t){return y.each(pe.slugify(t).split("-"),t=>this.ucfirst(t)).join("")}static has(t,e){return-1!==this.lc(t).indexOf(this.lc(e))}static range(t,e,r=null){let i=D.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return D.str(t).slice(e,r)}static string(t,e="-",r=!1){return D.isEmpty(t)?e:(t=D.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return D.isEmpty(t)?i:D.bool(t)?e:r}static number(t,e=null,r=null,i={}){return D.isNum(t)?(null==r&&(r=F.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({maximumFractionDigits:12},i),null!=e&&(i.minimumFractionDigits=e,i.maximumFractionDigits=e),D.num(t).toLocaleString(r,i)):t}static integer(t,e=0,r="0"){return D.isNum(t)?(D.isInt(t)||(t=D.int(t)),t=D.int(t),e?D.str(t).padStart(e,r):D.str(t)):t}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return D.isDate(t)||(t=fe.make(t)),t.valid()?t.format(e):r}static date(t,e="YYYY-MM-DD",r="-"){return this.datetime(t,e,r)}static time(t,e="HH:mm:ss",r="-"){return this.datetime(t,e,r)}static objectify(t,e="options",r=!1){return D.isRef(t)?t:("params"===e&&(t=pe.parseParams(t)),"options"===e&&(t=pe.parseOptions(t)),D.isRef(t)||(t=JSON.parse(t)),r?D.vals(t):t)}static stringify(t,e="options"){return D.isStr(t)?t:"params"===e?pe.castParams(t):"options"===e?pe.castOptions(t):JSON.stringify(t)}}a(u,"upper",(o=u).uc),a(u,"lower",o.lc),a(u,"camelcase",o.cc),a(u,"kebabcase",o.kc),a(u,"snakecase",o.sc),a(u,"pascalcase",o.pc),u.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),c.regex(...t)),u.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),c.pascalcase(...t)),u.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),pe.slugify(...t)),u.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),pe.castOptions(...t)),u.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),pe.parseOptions(...t)),u.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),pe.castParams(...t)),u.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),pe.parseParams(...t)),u.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),pe.filesize(...t)),u.real=()=>{console.error("Str.real() is not implemented anymore.")},u.array=()=>{console.error("Str.array() is not implemented anymore.")};const c=u;function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(e){f(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{static fixed(t,e=2){return D.isNum(t)||(t=D.num(t)),t.toFixed(e)}static float(t){return D.isNum(t)||(t=D.num(t)),parseFloat(t)}static int(t){return D.isNum(t)||(t=D.num(t)),parseInt(t)}static ceil(t){return D.isNum(t)||(t=D.num(t)),Math.ceil(t)}static floor(t){return D.isNum(t)||(t=D.num(t)),Math.floor(t)}static round(t){return D.isNum(t)||(t=D.num(t)),Math.round(t)}static combine(t){return y.reduce(t,(t,e)=>t+e,0)}static subtract(t){return y.reduce(t,(t,e)=>t-e,0)}static decade(t){return D.isNum(t)||(t=D.num(t)),10*Math.floor(t/10)}static matrix(t,e=10,r=[]){let i=0;for(let e=20;e>=0;e--)t>=(i=Math.pow(2,e))&&(r.push(i),t-=i);return r}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[d(d({},i),t),d(d({},i),e)];let s=Math.PI*this.float(t.lat)/180,n=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(s)*Math.sin(n),Math.cos(s)*Math.cos(n)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}p.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),c.number(t,e[2]||null)),p.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),T.number(...t));const m=p;class g{static all(t){return D.isArr(t)?t:[t]}static get(t,e,r=null){return D.isArr(t)?t&&t[e]?t[e]:r:t}static set(t,e,r){return this.splice(t,e,1,r)}static unset(t,e){return this.splice(t,e,1)}static make(t,e=null){let r=new Array(t);null==e&&(e=t=>t);for(let i=0;i<t;i++)r[i]="function"==typeof e?e(i):e;return r}static has(t,e){if(!D.isPrim(e))return-1!==this.findIndex(t,e);return D.isArr(t)||(t=[t]),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return D.keys(e)}static lengths(t,...e){let r=t.length;for(let t=0;t<e.length;t++)if(e[t].length!==r)return!1;return!0}static first(t,e=null){return this.get(t,0,e)}static second(t,e=null){return this.get(t,2,e)}static third(t,e=null){return this.get(t,2,e)}static last(t,e=null){return this.get(t,t.length-1,e)}static each(t,e,r=null){if(D.isObj(t))return this.eachObj(t,e,r);null==t&&(t=[]);let i=new Array(t.length);for(let r=0;r<t.length;r++)i[r]=e(t[r],r);return null!=r?r:i}static eachObj(t,e,r=null){if(D.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=D.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[D.isArr(t),D.keys(t)],s=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],s(r));return t}static recursive(t,e,r,i=[]){let s=t=>i=>this.recursive(i,e,r,t);return D.isArr(t)?this.map(t,s(i)):(D.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],D.isObj(t[e])&&(t[e]=s(i)(t[e])),D.isArr(t[e])&&(t[e]=this.map(t[e],s(i))),t)}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!D.isEmpty(t)),D.keys(t).filter(r=>D.isFunc(e)?e.call({},t[r],r):D.isRef(e)?this.includes(t[r],e):e===t[r]))}static filterRemove(t,e=null){if(null==t)return t;let r=this.filterIndex(t,e);return 0===r.length?t:this.splices(t,r)}static filter(t,e=null){return null==t?[]:(null==e&&(e=t=>!D.isEmpty(t)),D.vals(t).filter((r,i)=>D.isFunc(e)?e.call({},r,i):D.isRef(e)?this.includes(r,e):e===t[i]))}static findIndex(t,e=null,r=-1){if(null==t)return r;null==e&&(e=t=>!D.isEmpty(t));for(let r=0;r<t.length;r++){if(D.isFunc(e)&&e.call({},t[r],r))return r;if(D.isRef(e)&&this.includes(t[r],e))return r;if(e===t[r])return r}return r}static find(t,e=null,r=null){let i=this.findIndex(t,e);return-1===i?r:t[i]}static sort(t,e=null){return D.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=D.keys(t).sort((r,i)=>e.call({},t[r],t[i])),i=[];for(const e of r)i.push(t[e]);return i}static sortDeep(t,e){let r=t=>v.get(t,e),i=D.keys(t).sort((e,i)=>D.compare(r(t[e]),r(t[i]))),s=[];for(const e of i)s.push(t[e]);return s}static sortPrim(t){let e=D.keys(t).sort((t,e)=>D.compare(t,e)),r=[];for(const i of e)r.push(t[i]);return r}static merge(t,...e){return t.concat(...e)}static prepend(t,...e){return t.unshift(...e),t}static append(t,...e){return t.push(...e),t}static add(t,e,r=null){return null==r&&(r=e),-1!==this.findIndex(t,r)||t.push(e),t}static replace(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1!==i&&this.splice(t,i,1),t.push(e),t}static remove(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i||this.splice(t,i,1),t}static toggle(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i?(t.push(e),t):(this.splice(t,i,1),t)}static insert(t,e,r){return this.splice(t,e,0,r),t}static slice(t,e,r=1){return t.slice(parseInt(e),r)}static splice(t,e,r=1,...i){return t.splice(parseInt(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(D.isPrim(t))return t;if(D.isObj(t))return v.clone(t);if(!D.isArr(t))return t;let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.clone(t[r]);return e}static diff(...t){return t.reduce((t,e)=>t.filter(t=>!e.includes(t)))}static isect(...t){return t.reduce((t,e)=>t.filter(t=>e.includes(t)))}static extract(t,e){let r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=v.get(t[i],e);return r}static reduce(t,e,r){return D.vals(t).reduce(e,r)}static chunk(t,e=10){let r=[];for(let i=0;i<t.length;i+=e)r.push(t.slice(i,i+e));return r}static includes(t,e){if(D.isObj(e))return v.includes(t,e);if(!D.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let s=0;!1===r&&s<i;s++)r||=this.has(t,e[s]);return r}static contains(t,e){let r=!0;for(let i of D.vals(e))r&&=-1!==D.vals(t).indexOf(i);return r}static matches(t,e){if(D.isObj(e))return v.matches(t,e);if(!D.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let s=0;!0===r&&s<i;s++)r&&=this.has(t,e[s]);return r}}g.removeIndex=function(...t){return console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),this.unset(...t)},g.sortString=function(...t){return console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),this.sortPrim(...t)},g.push=function(...t){return console.warn("Arr.push() is deprecated, use Arr.append() instead."),this.append(...t)},g.concat=function(...t){return console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),this.merge(...t)},g.equal=function(...t){return console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),this.matches(...t)},g.diffrence=function(...t){return console.warn("Arr.diffrence() is deprecated, use Arr.diff() instead."),this.diff(...t)},g.intersect=function(...t){return console.warn("Arr.intersect() is deprecated, use Arr.isect() instead."),this.isect(...t)};const y=g;class b{static keyoptim(t,e=!1,r=null){return null===r&&(r=D.isStr(t)),!r&&e&&(t=t.join(".")),r||e?t.split("."):t}static has(t,e,r=!1){if(null==t||null==e)return!1;"number"==typeof e&&(e=D.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return void 0!==t[e];e=this.keyoptim(e,r,i);let[s,n,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[s];for(;null!=t&&n<o;)t=t[e[n++]];return null!=t&&void 0!==t[s]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=D.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e];let n=0,o=(e=this.keyoptim(e,i,s)).length;if(0===o)return r;for(;null!=t&&n<o;)t=t[e[n++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=D.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,s)).length)return t;let n=t;for(let t,i,s=0;s<e.length;s++)t=i=String(e[s]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==n[t]&&(n[t]=t===i?{}:[]),t!==i&&y.insert(e,s+1,n[t].length),e.length-1===s&&(n[t]=r),n=n[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=D.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return delete t[e],t;e=this.keyoptim(e,r,i);let[s,n,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&n<o;)l=l[e[n++]];return null==l||delete l[s],t}static empty(t,e){return D.isEmpty(this.get(t,e))}static remove(t,e){if(!D.isArr(e))return t;for(let r of e)this.unset(t,r);return t}static each(t,e,r=null){let i={};for(let r of D.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of D.keys(t))t[r]=e(t[r],r);return t}static filterIndex(t,e=null){return y.filterIndex(t,e)}static filter(t,e=null){let r={};for(let i of this.filterIndex(t,e))r[i]=t[i];return r}static flatten(t,e="",r={}){if("object"!=typeof t)return r[e]=t;""!==e&&(e+=".");for(let i of D.keys(t))this.flatten(t[i],e+i,r);return r}static flattenForm(t,e="",r={}){if("object"!=typeof t)return r[e]=t;let i=t=>e?`${e}[${t}]`:t;for(let e of D.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return y.each(D.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(D.isPrim(t))return t;if(D.isArr(t))return y.clone(t);if(!D.isObj(t))return t;let r={};for(let e of D.keys(t))r[e]=this.clone(t[e]);return null!=e?this.assign(r,e):r}static pluck(t,e,r=null){let i=this.get(t,e,r);return this.unset(t,e),i}static only(t,e,r=null){let i={};return this.each(t,(t,r)=>{y.has(e,r)&&(i[r]=t)}),null==r?i:this.assign(i,r)}static except(t,e,r=null){let i={};return this.each(t,(t,r)=>{y.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(D.isArr(e))return y.includes(t,e);if(!D.isObj(e))return t===e;let r=D.keys(e),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i=this.includes(t[r[n]],e[r[n]]);return i}static matches(t,e){if(D.isArr(e))return y.matches(t,e);if(!D.isObj(t))return t===e;let r=y.unique([...D.keys(e),...D.keys(t)]),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i&&=this.matches(t[r[n]],e[r[n]]);return i}static sort(t,e){let r=D.keys(t);D.isFunction(e)&&(r=r.sort((r,i)=>e.call({},t[r],t[i]))),D.isFunction(e)||(r=r.sort((r,i)=>D.integer(this.get(t[r],e))-D.integer(this.get(t[i],e))));let i=[];return y.each(r,(e,r)=>{t[e]._key=e,i[r]=t[e]}),i}static sortString(t,e){let r=D.keys(t);D.isFunction(e)||(r=r.sort((r,i)=>{let s=D.string(this.get(t[r],e)).toLowerCase(),n=D.string(this.get(t[i],e)).toLowerCase();return s<n?-1:s>n?1:0}));let i=[];return y.each(r,(e,r)=>{t[e]._key=e,i[r]=t[e]}),i}}b.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),D.vals(...t)),b.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),y.find(...t)),b.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),y.findIndex(...t));const v=b;var w;function M(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const O={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class k{static isEmpty(t){return null==t||("string"==typeof t?""===t:"number"!=typeof t&&("boolean"!=typeof t&&(this.isArr(t)?0===t.length:0===this.len(t))))}static isNull(t){return null===t}static isUndef(t){return void 0===t}static isNix(t){return null==t}static isPrim(t){return"string"==typeof t||"number"==typeof t}static isStr(t){return"string"==typeof t}static isNum(t){return"number"==typeof t||!!this.isStr(t)&&/^-?[0-9]+(\.[0-9]+)?$/.test(t)}static isInt(t){return!!this.isNum(t)&&(this.isStr(t)?/^-?[0-9]+$/.test(t):parseInt(t)===parseFloat(t))}static isBool(t){return"boolean"==typeof t||!!this.isStr(t)&&/^(true|false)$/.test(t)}static isFunc(t){return"function"==typeof t}static isRef(t){return null!=t&&"object"==typeof t}static isObj(t){return null!=t&&("object"==typeof t&&t.constructor===Object)}static isArr(t){return null!=t&&("object"==typeof t&&t.constructor===Array)}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||O.iso.test(t)}static isDate(t){return t instanceof Date||/^\d{4}-\d{2}-\d{2}$/.test(t)}static isTime(t){return t instanceof Date||/^\d{2}:\d{2}:\d{2}$/.test(t)}static isEqual(t,e){return t instanceof Node?t.isEqualNode(e):this.isRef(t)?Object.is(t,e):t===e}static iter(t){if(null==t)return{};let e={};for(const[r,i]of t.entries())e[r]=i;return e}static keys(t){return null==t?[]:(this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!Qt().chrome)return Object.values(t);let e=this.keys(t);for(let r=0;r<e.length;r++)e[r]=t[e[r]];return e}static nodes(t){return Array.prototype.slice.call(t)}static props(t,e=[]){let r={};for(const i of Object.getOwnPropertyNames(t))e.length&&!y.has(e,i)&&(r[i]=t[i]);return r}static class(t,e=[]){return e=y.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=y.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return v.each(v.flattenForm(t),(t,r)=>{e.append(r,t)}),e}static each(t,e){if(!this.isRef(t))throw new Error("Iterate non object");for(let r of D.keys(t))e(t[r],r);return this}static len(t){return this.isArr(t)?t.length:this.isRef(t)?this.keys(t).length:this.string(t).length}static compare(t,e){return F.collator().compare(t,e)}static null(t,e=null){return"null"===t||this.isEmpty(t)?null:e}static arr(t){return this.isArr(t)?t:this.isStr(t)?(t=t.replace(/^@?\[?(.*?)]$/g,"$1"),y.each(t.split(","),t=>t.replace(/(^"|^'|'$|"$)/g,""))):[t]}static str(t){return this.isNix(t)||void 0===t.toString?String(t):t.toString()}static num(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),t):e}static int(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),Math.round(t)):e}static bool(t){return this.isRef(t)?!!this.vals(t).length:this.isNum(t)?0!==this.num(t):/^(true|yes)$/i.test(t)}}M(k,"isPrimitive",(w=k).isPrim),M(k,"isString",w.isStr),M(k,"isNumber",w.isNum),M(k,"isInteger",w.isInt),M(k,"isBoolean",w.isBool),M(k,"isFunction",w.isFunc),M(k,"isReference",w.isRef),M(k,"isObject",w.isObj),M(k,"isArray",w.isArr),M(k,"isIterable",w.isIter),M(k,"length",w.len),M(k,"array",w.arr),M(k,"string",w.str),M(k,"number",w.num),M(k,"integer",w.int),M(k,"boolean",w.bool),k.global=function(...t){return console.warn("Mix.global() is deprecated, use go() instead."),Qt(...t)},k.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),D.isObj(...t)},k.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),D.num(...t)},k.delay=function(...t){return console.warn("Mix.delay() is deprecated, use Run.delay() instead."),n.delay(...t)},k.async=function(...t){return console.warn("Mix.async() is deprecated, use Run.async() instead."),n.async(...t)},k.debounce=function(...t){return console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),n.debounce(...t)},k.throttle=function(...t){return console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),n.throttle(...t)},k.framerate=function(...t){return console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),n.framerate(...t)},k.convertString=function(...t){return console.warn("Mix.convertString() is deprecated, use Str.string() instead."),c.string(...t)},k.convertDatetime=function(...t){return console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),c.date(...t)},k.convertBool=function(...t){return console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),c.boolean(...t)},k.convertBoolean=function(...t){return console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),c.boolean(...t)};const D=k;const P=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],$=["8","9","a","b"],j=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class S{static radix(t=60,e=null){return(e||this.RADIX)[this.number(t-1)]}static number(t=1024,e=0){return Math.floor(Math.random()*(t-e+1))+e}static make(t=6,e=62,r={}){let i="";for(let r=0;r<t;r++)i+=this.radix(e);for(const t of Object.keys(r))i=c.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?this.radix($.length,$):this.radix(P.length,P);return e.substring(0,8)+"-"+e.substring(8,12)+"-"+t+e.substring(12,15)+"-"+e.substring(15,19)+"-"+e.substring(19,31)}static password(t=24,e=null){let r=[...this.RADIX,...e||j],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var x,N,Y;x=S,Y=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],(N=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(N="RADIX"))in x?Object.defineProperty(x,N,{value:Y,enumerable:!0,configurable:!0,writable:!0}):x[N]=Y;const T=S;class E{static bind(t,e,r={},i=!1){return D.isArr(t)?y.each(t,t=>this.bind(t,...arguments),this):(D.isPrim(r)&&(r={id:r}),this.$events=y.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){return D.isArr(t)?y.each(t,t=>this.unbind(t,...arguments),this):(D.isPrim(e)&&(e={id:e}),y.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return y.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){if(D.isArr(t))return y.each(t,t=>this.pause(t,...arguments),this);let r=y.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!0),this}static unpause(t,e={}){if(D.isArr(t))return y.each(t,t=>this.pause(t,...arguments),this);let r=y.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!1),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(E,"$events",[]);const A=E;function I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class H{static has(t=void 0){return void 0===t||D.has(H.$text,t)}static get(t=void 0,e=null){return void 0===t?H.$text:v.get(H.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?H.$text=t:v.set(H.$text,t,e)}static code(t=null){return D.isNull(t)?D.isNull(F.$code)?(F.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),F.$code):F.$code:F.$code=t}static collator(){return D.isNull(F.$sort)?(F.$sort=new Intl.Collator(F.code(),{numeric:!0,sensitivity:"base"}),F.$sort):F.$sort}static replace(t,e=null){return null==e||v.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=v.get(H.$text,t,t),F.replace(t,e)}static choice(t,e=0,r={}){return t=v.get(H.$text,t,t),void 0===r.count&&(r.count=e),t=F.countpick(t.split("|"),e),F.replace(t,r)}static countpick(t,e){let r=t.length;return 3===r&&0===e?t[0]:3===r&&1===e?t[1]:3===r&&e>=2?t[2]:2===r&&1===e?t[0]:2===r&&1!==e?t[1]:t[0]}}I(H,"$text",{}),I(H,"$sort",null),I(H,"$code","en");const F=H;function C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach(function(e){R(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function R(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const W={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class q{static global(){return null==globalThis.document?"":globalThis.document.cookie||""}static parse(t=!1){if(!t&&this.$cookie)return this.$cookie;this.$cookie={};let e=this.global().matchAll(W.entry);if(null==e)return this.$cookie;return y.each(Array.from(e),({groups:t})=>{this.$cookie[t.key]=t.value.replaceAll("{:}",";")}),this.$cookie}static get(t,e=null,r="string"){return this.$cookie||this.parse(),null==this.$cookie[t]?e:/^bool(ean)?$/.test(r)||/^num(ber)?$/.test(r)||/^int(eger)?$/.test(r)?D.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?pe.parseOptions(this.$cookie[t]):D.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof fe||(r=fe.make(r||"+7 days")),i=L({expires:r.toUTC(),path:"/"},i),D.isRef(e)&&(e=pe.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let s=t+"="+D.str(e).replaceAll(";","{:}");return y.each(i,(t,e)=>{s+=`;${e}=${t}`}),globalThis.document.cookie=s,this}static forget(t,e={}){e=L({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return y.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}R(q,"$cookie",null);const B=q;class G{static filterNodes(t,e=1){return y.filter(D.nodes(t),t=>t.nodeType===e)}static getNodePoint(t,e){let r=null;return null!=de.doc().elementsFromPoint&&(r=document.elementsFromPoint(t,e)),null!=de.doc().msElementsFromPoint&&(r=document.msElementsFromPoint(t,e)),r}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i,clientX:s,clientY:n}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=de.getNodePoint(s,n)),D.isArr(r)&&(r=y.first(r)),null==r&&(r=e.target),r.closest(t)}}class X{static _constructFinder(t){return"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=D.nodes(t)),t}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?de.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?de.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?de.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=D.nodes(this.el.childNodes);return-1===t?r:y.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=de.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>de.find(e).is(t)),y.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!de.find(e).is(t)),y.filter(this.els,t)}find(t){if(null==this.el)return de.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return D.isStr(r)&&(r=e.querySelectorAll(t)),de.find(r)}get(t=-1){let e=this.els;return-1===t?e:y.get(e,t)}first(t=0){return this.get(t)}last(t=1){return y.get(this.els,this.els.length-t)}each(t){return y.each(this.els,t)}loopParent(t,e=null){null==e&&(e=de.win());for(let r=this.el;r&&r!==e;r=r.parentNode)t.call({},r);return this}parent(){let t=this.getNodeParent();return null==t?de.find(null):t}child(t,e=1){for(let t of this.els)if(t.nodeType===e)return de.find(t);return de.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:y.filter(r,e=>de.find(e).is(t))}closest(t){if(this.el===t)return this.el;for(let e=this;null!=e.el;e=e.getNodeParent())if(e.is(t))return e.el;return null}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return de.find(e);return de.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return de.find(e);return de.find(null)}length(){return this.els.length}is(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.parent().find(t).get())if(e===this.el)return!0;return!1}matches(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.find(t).get())if(e===this.el)return!0;return!1}empty(){return this.length()<1||null==this.el}visible(){return null!=this.el&&this.el.is(":visible")}above(t){return this.parent().is(t)}inside(t){return null!=this.closest(t)}contains(t){return null!=this.find(t)}}X.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},X.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},X.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},X.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},X.prototype.getNot=()=>{console.error("Dom.getNot() is not implemented anymore.")};class U{}class V{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class _{}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(_,"$events",[]);class z{bind(t,e,r,i=null,s=!1,n={}){return D.isPrim(n)&&(n={id:n}),de.$events=y.append(de.$events,{el:t,event:e,cb:r,selector:i,pause:s,options:n}),t.addEventListener(e,r,n),this}unbind(t,e,r=null,i={}){D.isPrim(i)&&(i={id:i});let s=y.filterIndex(de.$events,{el:t,event:e,selector:r,options:i});if(0===s.length)return;return y.each(s.reverse(),r=>{var i;t.removeEventListener(...(i=de.$events[r],[e,i.cb,i.options]))}),y.splices(de.$events,s),this}on(t,e,r={},i=!1,s=null){if(D.isPrim(r)&&(r={id:r}),D.isArr(t))return y.each(t,t=>this.on(t,...arguments)),this;let n=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,n,s,i,r)}),this}off(t,e=null,r={}){return D.isArr(t)?(y.each(t,t=>this.off(t,...arguments)),this):(D.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}optoff(t={}){return n.idle(()=>{y.filterRemove(de.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),this}once(t,e,r={}){return r.id=T.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},s=!1){return this.on(t,function(t){let i=de.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,s,e),this}fire(t){let e=new Event(t);return this.each(t=>{t.dispatchEvent(e)}),this}}z.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},z.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},z.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},z.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class J{static make(t,e={}){t instanceof de&&(t=t.el),D.isStr(t)&&(t=document.createElement(t)),t=v.assign(t,e);let r=new de(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}}class K{prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return de.find(t).each(t=>{null!=t.prepend&&t.prepend(this.el)}),this}append(t){return this.each(e=>{null!=e.append&&e.append(t)}),this}appendTo(t){return de.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(el,e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class Z{static getDomState(){return document.readyState}static isDomReady(){return"complete"===de.getDomState()}static isDomComplete(){let t=de.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,s,o]=[T.make(),de.find(document),"DOMContentLoaded"],l=()=>{n.delay(t,e),s.off(o,null,{id:i})},a=de.isDomReady;return a()?(n.wait(()=>{if(a())return l(),!0},10,r),this):(s.on(o,l,{id:i}),this)}static complete(t,e=0,r=6e3){let i=()=>{n.delay(t,e)},[s,o]=[de.find(document),"load"],l=de.isDomComplete;return l()?(n.wait(()=>{if(l())return i(),!0},10,r),this):(s.on(o,i),this)}}Z.required=()=>{console.error("Dom.required() is not implemented anymore.")};class Q{isNodeComplete(){return null!=this.el&&(!!this.el.naturalWidth||(!!this.el.naturalHeight||!!this.el.complete))}loaded(t,e=6e3){if(!this.el)return this;let r=this.isNodeComplete;return n.wait(()=>{if(r.call(this))return t(),!0},10,e),this}}function tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(r),!0).forEach(function(e){rt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function rt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class it{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),D.num(t,0)}}class st{margin(t=null,e=0){let r=this.computed(),i={top:de.num(r.marginTop),right:de.num(r.marginRight),bottom:de.num(r.marginBottom),left:de.num(r.marginLeft)};return null==t?i:v.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:de.num(r.paddingTop),right:de.num(r.paddingRight),bottom:de.num(r.paddingBottom),left:de.num(r.paddingLeft)};return null==t?i:v.get(i,t,e)}height(){return null==this.el?0:this.el instanceof Window?this.el.innerHeight:this.el.offsetHeight}clientHeight(){return null==this.el?0:de.num(this.computed("height",0))}scrollHeight(){return null==this.el?0:this.el.scrollHeight}innerHeight(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerHeight;let t=this.padding();return this.el.offsetHeight-t.top-t.bottom}realHeight(t={}){let e="auto";return this.actual(()=>e=this.height(),t),e}evaluateHeight(t=null,e=!0){null===(t=de.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerHeight()},{display:"none"}),!0===e&&this.style({height:r+"px"}),r}width(){return null==this.el?0:this.el instanceof Window?this.el.innerWidth:this.el.offsetWidth}clientWidth(){return null==this.el?0:de.num(this.computed("width",0))}scrollWidth(){return null==this.el?0:this.el.scrollWidth}innerWidth(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerWidth;let t=this.padding();return this.el.offsetWidth-t.left-t.right}realWidth(t={}){let e="auto";return this.actual(()=>e=this.width(),t),e}evaluateWidth(t=null,e=!0){null===(t=de.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerWidth()},{display:"none"}),!0===e&&this.style({width:r+"px"}),r}offset(t=null,e=null){let r=this.getOffset(e);return null==t?r:v.get(r,t,0)}offsetTop(t=null){return this.offset("top",t)}offsetBottom(t=null){return this.offset("bottom",t)}offsetLeft(t=null){return this.offset("left",t)}offsetRight(t=null){return this.offset("right",t)}loopOffset(t,e=null){null==e&&(e=de.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:de.body().scrollWidth-t.left-e,bottom:de.body().scrollHeight-t.top-r};return et(et({},t),i)}getOffset(t=null){null==t&&(t=de.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=de.num(t.offsetTop,0),r.left+=de.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=de.find(t),s={top:0,left:0,bottom:0,right:0};return e=t=>{s.top+=de.num(t.offsetTop,0),s.left+=de.num(t.offsetLeft,0)},i.loopOffset(e),s=this.calcOffset(s,i.scrollWidth(),i.scrollHeight()),{top:r.top-s.top,bottom:r.bottom-s.bottom,left:r.left-s.left,right:r.right-s.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:v.get(r,t,0)}scrollTop(t=null,e=null){return null==t?this.scroll("top",e):(this.each(e=>{e.scrollTop=t}),this)}scrollLeft(t=null,e=null){return null==t||this.each(e=>{e.scrollLeft=t}),this.scroll("left",e)}getScroll(t=null){null==t&&(t=de.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=de.num(t.scrollTop||t.pageYOffset||0),r.left+=de.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=de.num(t.scrollTop||t.pageYOffset||0),i.left+=de.num(t.scrollLeft||t.pageXOffset||0)},de.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}st.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},st.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},st.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(e){lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function lt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class at{}class ut{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return D.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(D.isArr(e)&&(e=e.join(" ")),D.isObj(e)&&(e=pe.castOptions(e)),this.el.setAttribute(t,e),this)}data(t,e=void 0,r=null){return this.attr("data-"+t,e,r)}computed(t=null,e=null){if(null==this.el)return e;if(1!==this.getNodeType())return e;let r=getComputedStyle(this.el);return null==t?r:v.get(r,t,e)}style(t=void 0,e=!0){if(null==this.el)return this;if(null===t)return this.attr("style",null);let r=this.attr("style",void 0,{});return D.isStr(r)&&(r=pe.parseOptions(r)),D.isUndef(t)?r:(e&&(t=ot(ot({},r),t)),this.attr("style",t),this)}class(t=void 0,e=!1){if(null==this.el)return this;if(null===t)return this.attr("class","");let r=this.attr("class",void 0,[]);return D.isStr(r)&&(r=r.split(" ")),D.isUndef(t)?r:(e&&(t=[...r,...t]),this.attr("class",t),this)}html(t=void 0){return void 0===t?this.el.innerHTML:(this.each(e=>{e.innerHTML=t}),this)}actual(t,e=null){let r=this.attr("style");this.style(e);let i=t(this.el,this.el);return this.attr("style",r),i}hasClass(t){return D.isArr(t)||(t=[t]),y.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>de.find(e).addClass(t));let e=this.el.className.split(" ");return D.isStr(t)&&(t=t.split(" ")),e=y.append(e,...t),this.el.className=y.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>de.find(e).remClass(t));let e=this.el.className.split(" ");return D.isStr(t)&&(t=t.split(" ")),e=y.diff(e,t),this.el.className=y.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>de.find(e).toggleClass(t)):this.hasClass(t)?this.remClass(t):this.addClass(t)}stateClass(t,e=!0){return this.els.length>1?this.each(e=>de.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}ut.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},ut.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(r),!0).forEach(function(e){dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ct(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function dt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ft{static inviewMaxY(t,e=null){if(D.isString(t)&&(t={el:t}),!(t=ht(ht({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewY() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return de.find(t.el).each(t=>{(t=>de.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:y.first(i)}static inviewMaxX(t,e=null){if(D.isString(t)&&(t={el:t}),!(t=ht(ht({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewX() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return de.find(t.el).each(t=>{(t=>de.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:y.first(i)}}class pt{viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[de.win().innerWidth,this.width()],[r,i]=[this.offset("left"),this.parent().scroll("left")];return{left:Math.max(0,r-i),right:Math.max(0,t-(r+e-i))}}inviewX(t=null){let{left:e,right:r}=de.find(t).viewoffY(),[i,s]=[de.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-n+e);return l>s&&(l=Math.min(s,i+s-l)),Math.max(0,l)}inratioX(t=null){return 1/this.width()*this.inviewX(t)}isInviewX(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewX(r)>t:this.inratioX(r)>t}viewoffY(){if(null==this.el)return{top:0,bottom:0};let[t,e]=[de.win().innerHeight,this.height()],[r,i]=[this.offset("top"),this.parent().scroll("top")];return{top:Math.max(0,r-i),bottom:Math.max(0,t-(r+e-i))}}inviewY(t=null){let{top:e,bottom:r}=de.find(t).viewoffY(),[i,s]=[de.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-n+e);return l>s&&(l=Math.min(s,i+s-l)),Math.min(Math.max(0,l),i)}inratioY(t=null){return 1/this.height()*this.inviewY(t)}isInviewY(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewY(r)>t:this.inratioY(r)>t}}pt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},pt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class mt{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=de.doc().title),document.title=F.replace(e,{value:t,title:this.$meta.title}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(mt,"$meta",{}),mt.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),de.setMetaTitle(t));class gt{}class yt{}class bt{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}function vt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const wt=[function(t){return v.each(D.class(G),(e,r)=>{t[r]=e}),v.each(D.proto(X),(e,r)=>{t.prototype[r]=e}),t.init.push(X._constructFinder),t},function(t){return v.each(D.class(Z),(e,r)=>{t[r]=e}),v.each(D.proto(Q),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(U),(e,r)=>{t[r]=e}),v.each(D.proto(V),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(_),(e,r)=>{t[r]=e}),v.each(D.proto(z),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(J),(e,r)=>{t[r]=e}),v.each(D.proto(K),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(it),(e,r)=>{t[r]=e}),v.each(D.proto(st),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(at),(e,r)=>{t[r]=e}),v.each(D.proto(ut),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(ft),(e,r)=>{t[r]=e}),v.each(D.proto(pt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(mt),(e,r)=>{t[r]=e}),v.each(D.proto(gt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.class(yt),(e,r)=>{t[r]=e}),v.each(D.proto(bt),(e,r)=>{t.prototype[r]=e}),t}];class Mt{constructor(t,...e){vt(this,"el",null),vt(this,"els",[]),y.each(de.init,r=>{t=r.call(this,t,...e)}),t instanceof de&&(t=t.el),D.isArr(t)||(t=[t]),this.el=t[0],this.els=t}static find(t,...e){return new de(t,...e)}static extend(t){t.call({},this)}static win(){return null==globalThis.window?{}:window}static doc(){return null==globalThis.document?{}:document}static body(){return this.doc().body?this.doc().body:{}}}vt(Mt,"init",[]);const Ot=function(){let t=Mt;for(const e of wt)t=e.call(t,t);return t},kt={second:/([+-])([0-9]+)\s?seconds?/i,minute:/([+-])([0-9]+)\s?minutes?/i,hour:/([+-])([0-9]+)\s?hours?/i,date:/([+-])([0-9]+)\s?days?/i,month:/([+-])([0-9]+)\s?months?/i,year:/([+-])([0-9]+)\s?years?/i};class Dt{get(t){return"time"===t?this.value.getTime():/^seconds?$/i.test(t)?this.value.getSeconds():/^minutes?$/i.test(t)?this.value.getMinutes():/^hours?$/i.test(t)?this.value.getHours():/^days?$/i.test(t)?this.value.getDay():/^dates?$/i.test(t)?this.value.getDate():/^months?$/i.test(t)?this.value.getMonth()+1:/^years?$/i.test(t)?this.value.getFullYear():this}set(t,e){D.isNum(t)||(t=D.int(t));let r=this.value.getDay();return"day"===e&&(t=t+1-(r||7)),"time"===e&&this.value.setTime(t),/^seconds?$/i.test(e)&&this.value.setSeconds(t),/^minutes?$/i.test(e)&&this.value.setMinutes(t),/^hours?$/i.test(e)&&this.value.setHours(t),/^days?$/i.test(e)&&this.add(t,"date"),/^dates?$/i.test(e)&&this.value.setDate(t),/^months?$/i.test(e)&&this.value.setMonth(t-1),/^years?$/i.test(e)&&this.value.setFullYear(t),this}time(t=null){return null==t?this.get("time"):this.set(t,"time")}second(t=null){return null==t?this.get("second"):this.set(t,"second")}minute(t=null){return null==t?this.get("minute"):this.set(t,"minute")}hour(t=null){return null==t?this.get("hour"):this.set(t,"hour")}day(t=null){return null==t?this.get("day"):this.set(t,"day")}date(t=null){return null==t?this.get("date"):this.set(t,"date")}month(t=null){return null==t?this.get("month"):this.set(t,"month")}year(t=null){return null==t?this.get("year"):this.set(t,"year")}shortyear(){return this.get("year").toString().slice(-2)}add(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)+D.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-D.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return D.isEmpty(t)||v.each(kt,(e,r)=>{c.match(t,e,([t,e,i])=>{"+"===e?this.add(i,r):this.sub(i,r)})}),this}apply(t,e="YYYY-MM-DD HH:mm:ss",r=[]){t=fe.make(t,e);for(const e of r)this.set(t.get(e),e);return this}applyDate(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["date","month","year"])}applyTime(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["hour","minute","second"])}}Dt.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},Dt.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},Dt.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},Dt.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},Dt.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},Dt.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},Dt.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},Dt.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},Dt.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},Dt.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},Dt.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},Dt.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},Dt.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},Dt.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},Dt.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},Dt.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Pt={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},$t={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class jt{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in $t)t=c.replace(t,$t[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return D.isTime(t)&&(e="HH:mm:ss"),D.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):D.isIsoDate(t)?(this.value=new Date(t),this):this.parseFormat(t,e)}parseFormat(t,e){if(!this.isParsable(t,e))return this.value=new Date(NaN),this;for(const r in $t)this.set(c.extract(t,$t[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return v.has(Pt,t)&&(t=F.trans(Pt[t])),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("dddd",()=>this.human("day"))).replace("ddd",()=>this.human("day",3))).replace("dd",()=>this.human("day",2))).replace("MMMM",()=>this.human("month"))).replace("MMM",()=>this.human("month",3))).replace("YYYY",()=>c.integer(this.year(),4))).replace("MM",()=>c.integer(this.month(),2))).replace("DD",()=>c.integer(this.date(),2))).replace("HH",()=>c.integer(this.hour(),2))).replace("mm",()=>c.integer(this.minute(),2))).replace("ss",()=>c.integer(this.second(),2))).replace("YY",()=>c.integer(this.shortyear(),2))).replace("X",()=>c.integer(this.time()))).replace("x",()=>c.integer(this.time()/1e3))}code(t="X"){return D.int(this.format(t))}}class St{before(t=null,e="x"){return this.code(e)<fe.make(t).code(e)}beforeDate(t=null,e="YYYYMMDD"){return this.before(t,e)}beforeTime(t=null,e="HHmmss"){return this.before(t,e)}after(t=null,e="x"){return this.code(e)>fe.make(t).code(e)}afterDate(t=null,e="YYYYMMDD"){return this.after(t,e)}afterTime(t=null,e="HHmmss"){return this.after(t,e)}equal(t=null,e="x"){return t instanceof fe||(t=fe.make(t)),this.code(e)===t.clone().code(e)}equalDate(t=null,e="YYYYMMDD"){return this.equal(t,e)}equalTime(t=null,e="HHmmss"){return this.equal(t,e)}between(t=null,e=null,r="YYYYMMDD"){let i=[fe.make(t),fe.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class xt{grid(t="day"){if(/^seconds?$/i.test(t))return this.getSecondsGrid();if(/^minutes?$/i.test(t))return this.getMinutesGrid();if(/^hours?$/i.test(t))return this.getHoursGrid();if(/^days?$/i.test(t))return this.getDaysGrid();if(/^dates?$/i.test(t))return this.getDatesGrid();if(/^months?$/i.test(t))return this.getMonthsGrid();if(/^years?$/i.test(t))return this.getYearsGrid();if(/^decades?$/i.test(t))return this.getDecadesGrid();throw new Error(`Invalid grid scope type "${t}".`)}getSecondsGrid(t=1){return null==t&&(t=1),y.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),y.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),y.make(24/t,e=>this.clone().hour(e*t))}getDaysGrid(){let t=[this.first("date").first("day"),this.last("date").last("day")];return t[0].range(t[1],"date")}getDatesGrid(){let t=[this.first("date"),this.last("date")];return t[0].range(t[1],"date")}getMonthsGrid(){let t=[this.first("month"),this.last("month")];return t[0].range(t[1],"month")}getYearsGrid(){let t=[this.first("year"),this.clone().last("year")];return t[0].range(t[1],"year")}getDecadesGrid(){let t=[this.first("decade"),this.clone().last("decade")];return t[0].range(t[1],"decade")}}xt.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},xt.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},xt.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},xt.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},xt.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},xt.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class Nt{prev(t="date"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().sub(10,"year"):this.clone().sub(1,t)}next(t="day"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().add(10,"year"):this.clone().add(1,t)}prevSecond(){return this.prev("second")}nextSecond(){return this.next("second")}prevMinute(){return this.prev("minute")}nextMinute(){return this.next("minute")}prevHour(){return this.prev("hour")}nextHour(){return this.next("hour")}prevDate(){return this.prev("date")}nextDate(){return this.next("date")}prevMonth(){return this.prev("month")}nextMonth(){return this.next("month")}prevYear(){return this.prev("year")}nextYear(){return this.next("year")}prevDecade(){return this.prev("decade")}nextDecade(){return this.next("decade")}first(t="date"){if(/^seconds?$/i.test(t))return this.firstSecond();if(/^minutes?$/i.test(t))return this.firstMinute();if(/^hours?$/i.test(t))return this.firstHour();if(/^days?$/i.test(t))return this.firstDay();if(/^dates?$/i.test(t))return this.firstDate();if(/^months?$/i.test(t))return this.firstMonth();if(/^years?$/i.test(t))return this.firstYear();if(/^decades?$/i.test(t))return this.firstDecade();throw new Error(`Invalid first scope type "${t}".`)}last(t="date"){if(/^seconds?$/i.test(t))return this.lastSecond();if(/^minutes?$/i.test(t))return this.lastMinute();if(/^hours?$/i.test(t))return this.lastHour();if(/^days?$/i.test(t))return this.lastDay();if(/^dates?$/i.test(t))return this.lastDate();if(/^months?$/i.test(t))return this.lastMonth();if(/^years?$/i.test(t))return this.lastYear();if(/^decades?$/i.test(t))return this.lastDecade();throw new Error(`Invalid last scope type "${t}".`)}firstSecond(){return this.clone().set(0,"second")}lastSecond(){return this.clone().set(59,"second")}firstMinute(){return this.clone().set(0,"minute")}lastMinute(){return this.clone().set(59,"minute")}firstHour(){return this.clone().set(0,"hour")}lastHour(){return this.clone().set(23,"hour")}firstDay(){return this.clone().set(0,"day")}lastDay(){return this.clone().set(6,"day")}firstDate(){return this.clone().set(1,"date")}lastDate(){return this.clone().next("month").set(0,"date")}firstMonth(){return this.clone().set(1,"month")}lastMonth(){return this.clone().set(12,"month")}nthYear(t=0){let e=10*Math.floor(this.year()/10);return this.clone().set(e+t,"year")}firstYear(){return this.nthYear(0)}lastYear(){return this.nthYear(9)}nthDecade(t=0){let e=100*Math.floor(this.year()/100);return this.clone().set(e+10*t,"year")}firstDecade(){return this.nthDecade(0)}lastDecade(){return this.nthDecade(9)}}class Yt{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],s=[this.clone(),fe.make(t)];s[0].afterDate(s[1])&&(s=s.reverse()),s[1].add(1,e);for(let t=s[0];!t.equal(s[1],r);t=t.next(e))y.append(i,t);return i}}Yt.prototype.getDatesRange=function(...t){return console.warn("NowRange.getDatesRange() is deprecated, use NowRange.range() instead."),this.range(...t)};const Tt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Et=["January","February","March","April","May","June","July","August","September","October","November","December"];class At{human(t="day",e=null){return/^days?$/i.test(t)?this.getHumanDay(e):/^months?$/i.test(t)?this.getHumanMonth(e):this.get(t)}getHumanDay(t=null){let e=this.day()-1;if(!Tt[e])throw new Error(`Invalid day number "${e}".`);let r=F.trans(Tt[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!Et[e])throw new Error(`Invalid month number "${e}".`);let r=F.trans(Et[e]);return null!=t&&(r=r.substring(0,t)),r}}function It(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ht=[function(t){return v.each(D.proto(Dt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.proto(jt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.proto(St),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.proto(xt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.proto(Nt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.proto(Yt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(D.proto(At),(e,r)=>{t.prototype[r]=e}),t}];class Ft{constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){It(this,"input",null),It(this,"value",null),"now"===t&&(t=null);let r=t;return t&&t.toDate&&(t=t.toDate()),t instanceof Date||(t=new Date),this.input=t,D.isNix(r)&&(this.input=r),this.value=t,D.isStr(r)&&this.parse(r,e),y.each(fe.init,t=>{el=t.call(this,el,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new fe(t,e)}reset(t=null){return null==t&&(t={month:!0,day:!0,time:!0}),t.month&&this.value.setMonth(0),t.day&&this.value.setDate(1),t.time&&this.value.setHours(0,0,0),this}clone(t=!1){return new fe(new Date(this.value),null,t)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}It(Ft,"init",[]),Ft.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const Ct=function(){let t=Ft;for(const e of Ht)t=e.call(t,t);return t},Lt=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>D.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>D.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>D.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>D.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Rt=[{match:t=>D.isArr(t),parse:t=>JSON.stringify(t)}];class Wt{static keyed(t,e=null){return D.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!D.isStr(t))return e;t=t.replace(/(^"|^'|'$|"$)/g,"");for(let e of r)if(e.match(t))return e.parse(t);for(let e of Lt)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),D.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Rt)if(e.match(t))return e.parse(t);return D.str(t)}}const qt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Bt{static castParams(t={}){if(D.isEmpty(t))return"";return y.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!D.isRef(e))return D.str(t)+"="+pe.casted(e,!0);return y.each(e,(r,i)=>this.castParam(D.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(D.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(qt.entry);if(null==e)return{};const[r,i]=[pe.keyed,pe.parsed];return y.reduce(Array.from(e),(t,{groups:e})=>v.set(t,r(e.key),i(e.val)),{})}}const Gt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Xt{static castOptions(t={},e=!0){if(D.isEmpty(t))return"";return y.each(t,(t,r)=>this.castOption(r,t,null,e)).join(";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let s=i?": ":":";return D.isObj(e)?y.map(e,(e,r)=>this.castOption(r,e,t)).join(";"):D.str(t)+s+pe.casted(e,!1)}static parseOptions(t){if(D.isEmpty(t))return{};let e=t.matchAll(Gt.entry);if(null==e)return{};const[r,i]=[pe.keyed,pe.parsed];return y.reduce(Array.from(e),(t,{groups:e})=>v.set(t,r(e.key),i(e.val)),{})}}const Ut=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Vt{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),y.each(Ut,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const _t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class zt{static filesize(t,e=1){D.isNum(t)||(t=D.num(t,0));let r=r=>m.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<_t.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+_t[e];return r(_t.length)}}const Jt=[function(t){return v.each(D.class(Wt),(e,r)=>{t[r]=e}),t},function(t){return v.each(D.class(Bt),(e,r)=>{t[r]=e}),t},function(t){return v.each(D.class(Xt),(e,r)=>{t[r]=e}),t},function(t){return v.each(D.class(Vt),(e,r)=>{t[r]=e}),t},function(t){return v.each(D.class(zt),(e,r)=>{t[r]=e}),t}];class Kt{static extend(t){t.call({},this)}}const Zt=function(){let t=Kt;for(const e of Jt)t=e.call(t,t);return t};function Qt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function te(){const t=Qt();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.safari&&(r.safari=/Safari\//.test(e)),null==r.firefox&&(r.firefox=/Firefox\//.test(e)),null==r.edge&&(r.edge=/Edge\//.test(e)),null==r.chrome&&(r.chrome=/Chrome\//.test(e)),t.piuag=r}function ee(){const t=Qt();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.win&&(r.win=/Windows/.test(e)),null==r.osx&&(r.osx=/Macintosh|Mac OS X/.test(e)),null==r.gnu&&(r.gnu=/Linux/.test(e)),null==r.ios&&(r.ios=/iPhone|iPad|iPod/.test(e)),null==r.oid&&(r.oid=/Android/.test(e)),t.piudv=r}class re{static has(t){return v.has(this.$data,y.first(t))}static set(t,e){let[r,i]=[null,y.first(t)];v.has(this.$data,i)&&(r=v.get(this.$data,i)),D.isEqual(r,e)||(v.set(this.$data,i,e),A.fire("store:"+i,e,i))}static unset(t){v.unset(this.$data,[...y.first(t)])}static get(t,e=null,r=!1){let i=y.first(t);if(!v.has(this.$data,i)&&!r)return e;v.has(this.$data,i)&&r&&v.set(this.$data,i,e);let s=v.get(this.$data,i,e);return D.isObj(s)?v.clone(s):s}static find(t,e,r=null){let i=y.first(t);if(!1===v.has(this.$data,i))return r;if(!1===v.has(e,"id"))return r;let s=y.findIndex(this.get(i),{id:e.id});return-1===s?r:this.get(i+"."+s)}static replace(t,e){let r=y.first(t);if(!1===v.has(this.$data,r))return;if(!1===v.has(e,"id"))return;let i=y.findIndex(this.get(r),{id:m.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,y.concat(this.get(t,[]),e))}static remove(t,...e){this.set(t,y.diff(this.get(t,[]),e))}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(re,"$data",{});const ie=re;class se{static set(t,e){this.$routes[t]=e}static get(t,e=null,r=null){let i=t;return/^https?:\/\//.test(i)||(i=this.$routes[t]||t),v.each(e,(t,e)=>{i=i.replace(new RegExp("{"+e+"}","g"),t)}),D.isEmpty(r)||(i+="?"+pe.castParams(r)),i}static goto(t,e=null,r=null){window.location.href=this.get(t,e,r)}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(se,"$routes",{});const ne=se;function oe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class le{constructor(t,e={}){if(oe(this,"map",null),oe(this,"markers",{}),oe(this,"cluster",null),oe(this,"clusterFilter",null),oe(this,"clusterOptions",{}),!globalThis.google)throw new Error("Google Maps is required for pi.Map");let r=v.only(e,["lat","lng"]);v.has(e,"styles")||(e.styles=Map.mapStyle),e=v.assign({gestureHandling:"cooperative",scrollwheel:null,zoom:12,center:r},v.except(e,["lat","lng"])),this.map=new globalThis.google.maps.Map(de.find(t).get(0),e)}static setMapStyle(t=[]){return Map.mapStyle=t,this}static setMarkerStyle(t,e={},r={}){if(!globalThis.google)throw new Error("Google Maps is required for pi.Map");if(!v.has(e,"default"))return console.error("Marker style requires default property");v.has(e,"width")||(e.width=45),v.has(e,"height")||(e.height=45);let i={},s=new globalThis.google.maps.Size(e.width,e.height),n=new globalThis.google.maps.Point(0,0),o=new globalThis.google.maps.Point(e.width/2,e.height);return i.default={url:e.default,size:s,origin:n,anchor:o,scaledSize:s},v.has(e,"hover")&&(i.hover=v.assign({},i.default,{url:e.hover})),v.has(i,"hover")||(i.hover=i.default),v.has(e,"active")&&(i.active=v.assign({},i.default,{url:e.active})),v.has(i,"active")||(i.active=i.default),v.each(r,(t,e)=>{i[e]=v.assign({},i.default,{url:t})}),v.set(Map.markerStyles,t,i),this}clusterMarkers(t={},e=null,r=!0){if(!this.cluster&&!r)return;if(void 0===globalThis.MarkerClusterer)return console.error("Google Maps Cluster library not laoded!");v.has(t,"imagePath")||v.has(t,"styles")||(t.imagePath="//developers.google.com/maps/documentation/javascript/examples/markerclusterer/m"),this.cluster&&this.cluster.clearMarkers(),D.isFunction(e)&&(this.clusterFilter=e);let i=y.filter(this.markers,t=>{let e=this.getMarkerVisibility(t.key);return D.isFunction(this.clusterFilter)?e&&this.clusterFilter.call(this,t):e});this.cluster=new globalThis.MarkerClusterer(this.map,y.each(i,t=>t.marker),this.clusterOptions=t)}styleMarker(t,e=null){let r=v.get(this.markers,t);if(D.isEmpty(r))return console.error(`Marker "${t}" not found`);D.isEmpty(e)&&(e=this.getInfoVisibility(t)?"active":"default"),v.has(Map.markerStyles,[r.style,e])&&r.marker.setIcon(v.get(Map.markerStyles,[r.style,e]))}getMarker(t){return v.get(this.markers,t)}getMarkerVisibility(t,e=!1){let r=v.get(this.markers,t);return D.isEmpty(r)?e:r.marker.getVisible()}getMarkerPositon(t,e=null){let r=v.get(this.markers,t);return D.isEmpty(r)?e:r.marker.getPosition()}toggleMarker(t){let e=v.get(this.markers,t);return D.isEmpty(e)?console.error(`Marker "${t}" not found`):e.marker.getVisible()?this.hideMarker(t):this.showMarker(t)}showMarker(t){let e=v.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!e.marker.getVisible();return r&&e.marker.setVisible(!0),r}hideMarker(t){let e=v.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!!e.marker.getVisible();return r&&e.marker.setVisible(!1),this.closeInfo(t),r}enterMarker(t){let e=v.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="hover";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}leaveMarker(t){let e=v.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="default";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}getInfoVisibility(t,e=!1){let r=v.get(this.markers,t);return D.isEmpty(r)||!v.has(r,"info")?e:!!r.info.getMap()}toggleInfo(t){let e=v.get(this.markers,t);return D.isEmpty(e)?console.error(`Marker "${t}" not found`):e.info.getMap()?this.closeInfo(t):this.openInfo(t)}openInfo(t){let e=v.get(this.markers,t);if(D.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!v.has(e,"info"))return!0;let r=!e.info.getMap();return Map.closeInfoWindows&&v.each(D.keys(this.markers),this.closeInfo.bind(this)),r&&e.info.open(this.map,e.marker),D.isFunction(e.onOpen)&&e.onOpen(e),this.styleMarker(t,"active"),r}closeInfo(t){let e=v.get(this.markers,t);if(D.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!v.has(e,"info"))return!1;let r=!!e.info.getMap();return r&&e.info.close(),D.isFunction(e.onClose)&&e.onClose(e),this.styleMarker(t,"default"),r}createMarker(t=null,e={}){D.isEmpty(t)&&(t=T.uuid());let r={key:t};return v.has(e,"visible")||(e.visible=!0),r.extras=v.except(e,["map","position","lat","lng","html","style","visible","onOpen","onClose"]),v.has(e,"map")||(e.map=this.map),v.has(e,"position")||(e.position=v.only(e,["lat","lng"])),v.has(e,"style")&&(r.style=e.style),r.marker=new globalThis.google.maps.Marker(e),e.visible||r.marker.setVisible(!1),v.assign(r,{onOpen:v.get(e,"onOpen"),onClose:v.get(e,"onClose")}),v.set(this.markers,t,r),this.clusterMarkers(this.clusterOptions,null,!1),v.has(e,"html")?(v.has(r,"style")||(r.style="default"),this.styleMarker(t),r.marker.addListener("mouseover",()=>this.enterMarker(t)),r.marker.addListener("mouseout",()=>this.leaveMarker(t)),r.info=new globalThis.google.maps.InfoWindow({content:'<div class="gw-i-html">'+v.get(e,"html")+"</div>"}),r.marker.addListener("click",()=>this.toggleInfo(t)),r.info.addListener("closeclick",()=>this.closeInfo(t)),r.info.addListener("domready",()=>A.fire("MapsDomReady")),v.set(this.markers,t,r),v.get(this.markers,t)):v.get(this.markers,t)}setMarkerPosition(t,e={}){let r=v.get(this.markers,t);if(D.isEmpty(r))return console.error(`Marker "${t}" not found`);r.marker.setPosition(e)}setMarkerByAddress(t,e){return this.getLocationByAddress(e,e=>{this.setMarkerPosition(t,v.get(e,"0.geometry.location",{}))})}getLocationByAddress(t,e=null){let r=new globalThis.google.maps.Geocoder;return new Promise((i,s)=>{r.geocode({address:t},(t,r)=>{"OK"===r&&(e(t),i(t)),"OK"!==r&&s(t)})})}showMarkers(t=null){let e=this.markers;return D.isEmpty(t)||(e=v.filter(this.markers,t)),Map.hideMarkers&&v.each(D.keys(this.markers),this.hideMarker.bind(this)),v.each(e,t=>this.showMarker(t.key)),this.clusterMarkers(this.clusterOptions,null,!1),this}getMarkerBoundry(t=null){let e=this.markers;D.isEmpty(t)||(e=v.filter(this.markers,t));let r=new globalThis.google.maps.LatLngBounds;return v.each(e,t=>{t.marker.getVisible()&&r.extend(t.marker.getPosition())}),r}focusMarkers(t=null,e=14,r=15){let i=this.getMarkerBoundry(t);return this.map.setCenter(i.getCenter()),this.map.fitBounds(i,r),this.map.getZoom()>e&&this.map.setZoom(e),this}renderDirections(t){let e=new globalThis.google.maps.DirectionsService,r=new globalThis.google.maps.DirectionsRenderer;v.has(t,"map")||(t.map=this.map),v.has(t,"travelMode")||(t.travelMode="DRIVING"),r.setMap(t.map),v.has(t,"panel")&&!de.find(t.panel).empty()&&r.setPanel(de.find(t.panel).get(0)),t=v.only(t,["origin","destination","travelMode"]);return new Promise((i,s)=>{e.route(t,(t,e)=>{"OK"===e&&(r.setDirections(t),i(t)),"OK"!==e&&s(t)})})}}oe(le,"mapStyle",[]),oe(le,"markerStyles",{}),oe(le,"hideMarkers",!0),oe(le,"closeInfoWindows",!0);const ae=le;function ue(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ce{static listen(){document.addEventListener("scroll",ce.scroll),ce.scroll()}static scroll(){y.each(this.invi,(t,e)=>{de.find(t.el).inviewY()&&(y.removeIndex(this.invi,e),t.cb())})}static alias(t,e){return v.set(this.inis,t,e),this}static bind(t,e,r={}){let i=de.find(e),s=this.getPrefix(t);i.addClass(s);let n=v.get(this.inis,t,null);if(D.isEmpty(n))return console.error(`Element "${t}" is not defined.`);let o=(t,e)=>{let r=new n(t.get(0),e);return ce.runs.push({el:t.get(0),prefix:s,deamon:r}),t.data(s,r),void 0!==r.bind?r.bind(t.get(0),e):r};return de.ready(()=>o.call({},i,r)),this}static unbind(t,e,r={}){let i=de.find(e),s=this.getPrefix(t),n=v.get(this.inis,t,null);if(D.isEmpty(n))return console.error(`Element "${t}" is not defined.`);return((t,e)=>{let r=t.data(s);if(void 0!==r.unbind)return r.unbind(t.get(0),e)}).call({},i,r),y.remove(ce.runs,{el:i.get(0)}),this}static observe(t,e=!1){let r=this.getPrefix(t),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:[r]},s=()=>{let i=ce.getPrefix(t),s=y.filter(this.runs,{prefix:r});y.each(s,({el:i})=>{let s=c.objectify(de.find(i).attr(r));if(e&&D.isEmpty(s)&&(s={_plain:de.find(i).attr(r)}),v.pluck(s,"inview",!1)&&y.remove(this.invi,{el:i}),!document.body.contains(i))return this.unbind(t,i,s)}),de.find(`[${r}]:not(.${i})`).each(i=>{let s=c.objectify(de.find(i).attr(r));e&&D.isEmpty(s)&&(s={_plain:de.find(i).attr(r)});let n=()=>{this.bind(t,i,s)};v.pluck(s,"inview",!1)?this.bindInview(i,n):n()})};return de.find(document.body).observer(s)(document.body,i),de.find(document.body).on("dom.change",s),this}static bindInview(t,e){y.add(this.invi,{el:t,cb:e},{el:t})}static unbindInview(t,e){y.remove(this.invi,{el:t,cb:e},{el:t})}static getPrefix(t){return t?this.prefix+"-"+t:this.prefix}static setPrefix(t){this.prefix=t}}ue(ce,"prefix","js"),ue(ce,"mount","mount"),ue(ce,"inis",{}),ue(ce,"runs",[]),ue(ce,"invi",[]);const he=ce,de=Ot(),fe=Ct(),pe=Zt(),me=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>D[e](...t)}}),ge=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),T.make()};globalThis.pi=r;var ye=window;for(var be in e)ye[be]=e[be];e.__esModule&&Object.defineProperty(ye,"__esModule",{value:!0})})();
|
|
2
2
|
//# sourceMappingURL=pico-js.browser.js.map
|