@kizmann/pico-js 2.0.7 → 2.0.9

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.
Files changed (97) hide show
  1. package/dist/pico-js.browser.js +1 -1
  2. package/dist/pico-js.browser.js.map +1 -1
  3. package/dist/pico-js.esm.js +1 -1
  4. package/dist/pico-js.esm.js.map +1 -1
  5. package/package.json +4 -6
  6. package/src/dom/{DomAttribute.js → DomAttribute.ts} +40 -63
  7. package/src/dom/{DomBuilder.js → DomBuilder.ts} +27 -44
  8. package/src/dom/{DomEvent.js → DomEvent.ts} +101 -76
  9. package/src/dom/{DomFinder.js → DomFinder.ts} +103 -139
  10. package/src/dom/DomForm.ts +38 -0
  11. package/src/dom/{DomGlobal.js → DomGlobal.ts} +34 -51
  12. package/src/dom/{DomInview.js → DomInview.ts} +37 -57
  13. package/src/dom/DomMeta.ts +48 -0
  14. package/src/dom/DomObserver.ts +17 -0
  15. package/src/dom/{DomPopover.js → DomPopover.ts} +20 -39
  16. package/src/dom/{DomRectangle.js → DomRectangle.ts} +70 -87
  17. package/src/format/{FormatFile.js → FormatFile.ts} +12 -23
  18. package/src/format/{FormatOption.js → FormatOption.ts} +15 -24
  19. package/src/format/{FormatParam.js → FormatParam.ts} +14 -25
  20. package/src/format/{FormatParser.js → FormatParser.ts} +29 -39
  21. package/src/format/{FormatUrl.js → FormatUrl.ts} +9 -21
  22. package/src/index.browser.ts +32 -0
  23. package/src/index.esm.ts +64 -0
  24. package/src/now/{NowDefault.js → NowDefault.ts} +86 -121
  25. package/src/now/{NowFormat.js → NowFormat.ts} +23 -28
  26. package/src/now/{NowGrid.js → NowGrid.ts} +41 -58
  27. package/src/now/{NowHuman.js → NowHuman.ts} +18 -27
  28. package/src/now/{NowMatch.js → NowMatch.ts} +22 -28
  29. package/src/now/{NowRange.js → NowRange.ts} +13 -22
  30. package/src/now/{NowWalker.js → NowWalker.ts} +65 -71
  31. package/src/tool/{scope.js → scope.ts} +41 -11
  32. package/src/utils/{Array.js → Array.ts} +187 -152
  33. package/src/utils/{Cookie.js → Cookie.ts} +15 -12
  34. package/src/utils/{Data.js → Data.ts} +17 -17
  35. package/src/utils/Dom.ts +204 -0
  36. package/src/utils/Format.ts +48 -0
  37. package/src/utils/{Hash.js → Hash.ts} +20 -20
  38. package/src/utils/{Locale.js → Locale.ts} +21 -21
  39. package/src/utils/{Mixed.js → Mixed.ts} +104 -61
  40. package/src/utils/{Now.js → Now.ts} +68 -69
  41. package/src/utils/{Number.js → Number.ts} +34 -36
  42. package/src/utils/{Object.js → Object.ts} +68 -122
  43. package/src/utils/{Route.js → Route.ts} +11 -9
  44. package/src/utils/{Runner.js → Runner.ts} +89 -77
  45. package/src/utils/{Signal.js → Signal.ts} +35 -22
  46. package/src/utils/{String.js → String.ts} +79 -69
  47. package/src/wip/{Element.js → Element.ts} +2 -2
  48. package/src/wip/{Map.js → Map.ts} +1 -1
  49. package/types/dom/DomAttribute.d.ts +16 -27
  50. package/types/dom/DomBuilder.d.ts +6 -9
  51. package/types/dom/DomEvent.d.ts +19 -24
  52. package/types/dom/DomFinder.d.ts +38 -61
  53. package/types/dom/DomForm.d.ts +7 -10
  54. package/types/dom/DomGlobal.d.ts +8 -15
  55. package/types/dom/DomInview.d.ts +9 -19
  56. package/types/dom/DomMeta.d.ts +9 -16
  57. package/types/dom/DomObserver.d.ts +4 -8
  58. package/types/dom/DomPopover.d.ts +8 -11
  59. package/types/dom/DomRectangle.d.ts +21 -35
  60. package/types/format/FormatFile.d.ts +5 -8
  61. package/types/format/FormatOption.d.ts +6 -8
  62. package/types/format/FormatParam.d.ts +6 -9
  63. package/types/format/FormatParser.d.ts +10 -18
  64. package/types/format/FormatUrl.d.ts +5 -8
  65. package/types/index.esm.d.ts +25 -37
  66. package/types/now/NowDefault.d.ts +30 -99
  67. package/types/now/NowFormat.d.ts +8 -21
  68. package/types/now/NowGrid.d.ts +24 -46
  69. package/types/now/NowHuman.d.ts +10 -11
  70. package/types/now/NowMatch.d.ts +6 -4
  71. package/types/now/NowRange.d.ts +5 -8
  72. package/types/now/NowWalker.d.ts +6 -4
  73. package/types/tool/scope.d.ts +11 -3
  74. package/types/utils/Array.d.ts +83 -101
  75. package/types/utils/Cookie.d.ts +11 -8
  76. package/types/utils/Data.d.ts +7 -7
  77. package/types/utils/Dom.d.ts +63 -96
  78. package/types/utils/Format.d.ts +15 -28
  79. package/types/utils/Hash.d.ts +21 -21
  80. package/types/utils/Locale.d.ts +9 -9
  81. package/types/utils/Mixed.d.ts +19 -32
  82. package/types/utils/Now.d.ts +51 -56
  83. package/types/utils/Number.d.ts +9 -20
  84. package/types/utils/Object.d.ts +21 -36
  85. package/types/utils/Route.d.ts +5 -2
  86. package/types/utils/Runner.d.ts +45 -38
  87. package/types/utils/Signal.d.ts +16 -16
  88. package/types/utils/String.d.ts +40 -76
  89. package/src/dom/DomForm.js +0 -59
  90. package/src/dom/DomMeta.js +0 -68
  91. package/src/dom/DomObserver.js +0 -38
  92. package/src/index.browser.js +0 -36
  93. package/src/index.esm.js +0 -80
  94. package/src/utils/Dom.js +0 -214
  95. package/src/utils/Format.js +0 -62
  96. package/types/wip/Element.d.ts +0 -119
  97. package/types/wip/Map.d.ts +0 -254
@@ -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:()=>we,Arr:()=>y,Cookie:()=>q,Data:()=>ae,Dom:()=>ye,Element:()=>ge,Event:()=>Me,For:()=>ve,Hash:()=>E,Locale:()=>F,Map:()=>fe,Mix:()=>P,Now:()=>be,Num:()=>m,Obj:()=>v,Route:()=>ce,Run:()=>n,Signal:()=>I,Str:()=>c,UUID:()=>Oe,browser:()=>ne,device:()=>oe,go:()=>se});class s{static clear(t){return P.isArr(t)?y.each(t,t=>this.clear(t),this):P.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};return y.add(this.$buffer,i),(t,...e)=>{/^drag/.test(t.type)&&t.preventDefault(),v.assign(i,{args:[t,...e],active:!0}),this.runFramebuffer()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{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 P.isStr(t)||(t=P.str(t)),P.isInt(e)&&(e=P.int(e)),t.charAt(e)}static set(t,e,r=""){return P.isStr(t)||(t=P.str(t)),P.isInt(e)&&(e=P.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){P.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){P.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=P.str(t).match(e);return P.isEmpty(i)?[]:P.isFunc(r)?r(i):i}static regex(t){return P.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return P.str(t).toUpperCase()}static ucfirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lc(t){return P.str(t).toLowerCase()}static lcfirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static cc(t){return y.each(ve.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return ve.slugify(t)}static sc(t){return ve.slugify(t).replace("-","_")}static pc(t){return y.each(ve.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=P.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return P.str(t).slice(e,r)}static string(t,e="-",r=!1){return P.isEmpty(t)?e:(t=P.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return P.isEmpty(t)?i:P.bool(t)?e:r}static number(t,e=null,r=null,i={}){return P.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),P.num(t).toLocaleString(r,i)):t}static integer(t,e=0,r="0"){return P.isNum(t)?(P.isInt(t)||(t=P.int(t)),t=P.int(t),e?P.str(t).padStart(e,r):P.str(t)):t}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return P.isDate(t)||(t=be.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 P.isRef(t)?t:("params"===e&&(t=ve.parseParams(t)),"options"===e&&(t=ve.parseOptions(t)),P.isRef(t)||(t=JSON.parse(t)),r?P.vals(t):t)}static stringify(t,e="options"){return P.isStr(t)?t:"params"===e?ve.castParams(t):"options"===e?ve.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."),ve.slugify(...t)),u.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),ve.castOptions(...t)),u.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),ve.parseOptions(...t)),u.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),ve.castParams(...t)),u.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),ve.parseParams(...t)),u.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),ve.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 P.isNum(t)||(t=P.num(t)),t.toFixed(e)}static float(t){return P.isNum(t)||(t=P.num(t)),parseFloat(t)}static int(t){return P.isNum(t)||(t=P.num(t)),parseInt(t)}static ceil(t){return P.isNum(t)||(t=P.num(t)),Math.ceil(t)}static floor(t){return P.isNum(t)||(t=P.num(t)),Math.floor(t)}static round(t){return P.isNum(t)||(t=P.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 P.isNum(t)||(t=P.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 P.isArr(t)?t:[t]}static get(t,e,r=null){return P.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(!P.isPrim(e))return-1!==this.findIndex(t,e);return P.isRef(t)||(t=[t]),P.isArr(t)||(t=P.vals(t)),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return P.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(P.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(P.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=P.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[P.isArr(t),P.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 P.isArr(t)?this.map(t,s(i)):(P.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],null==t||(P.isObj(t[e])&&(t[e]=s(i)(t[e])),P.isArr(t[e])&&(t[e]=this.map(t[e],s(i)))),t)}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!P.isEmpty(t)),P.keys(t).filter(r=>P.isFunc(e)?e.call({},t[r],r):P.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=>!P.isEmpty(t)),P.vals(t).filter((r,i)=>P.isFunc(e)?e.call({},r,i):P.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=>!P.isEmpty(t));for(let r=0;r<t.length;r++){if(P.isFunc(e)&&e.call({},t[r],r))return r;if(P.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 P.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=P.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=P.keys(t).sort((e,i)=>P.compare(r(t[e]),r(t[i]))),s=[];for(const e of i)s.push(t[e]);return s}static sortPrim(t){let e=P.keys(t).sort((t,e)=>P.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(P.isPrim(t))return t;if(P.isObj(t))return v.clone(t);if(!P.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 P.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(P.isObj(e))return v.includes(t,e);if(!P.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 P.vals(e))r&&=-1!==P.vals(t).indexOf(i);return r}static matches(t,e){if(P.isObj(e))return v.matches(t,e);if(!P.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=P.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=P.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=P.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=P.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=P.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 P.isEmpty(this.get(t,e))}static remove(t,e){if(!P.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 P.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of P.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 P.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 P.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return y.each(P.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(P.isPrim(t))return t;if(P.isArr(t))return y.clone(t);if(!P.isObj(t))return t;let r={};for(let e of P.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(P.isArr(e))return y.includes(t,e);if(!P.isObj(e))return t===e;let r=P.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(P.isArr(e))return y.matches(t,e);if(!P.isObj(t))return t===e;let r=y.unique([...P.keys(e),...P.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=P.keys(t);P.isFunction(e)&&(r=r.sort((r,i)=>e.call({},t[r],t[i]))),P.isFunction(e)||(r=r.sort((r,i)=>P.integer(this.get(t[r],e))-P.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=P.keys(t);P.isFunction(e)||(r=r.sort((r,i)=>{let s=P.string(this.get(t[r],e)).toLowerCase(),n=P.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."),P.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 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"==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.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!se().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 P.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."),se(...t)},D.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),P.isObj(...t)},D.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),P.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 P=D;const k=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],j=["8","9","a","b"],$=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class x{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(j.length,j):this.radix(k.length,k);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||$],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var S,N,Y;S=x,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 S?Object.defineProperty(S,N,{value:Y,enumerable:!0,configurable:!0,writable:!0}):S[N]=Y;const E=x;class T{static bind(t,e,r={},i=!1){return P.isArr(t)?y.each(t,t=>this.bind(t,...arguments),this):(P.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 P.isArr(t)?y.each(t,t=>this.unbind(t,...arguments),this):(P.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(P.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(P.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 I=T;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 H{static has(t=void 0){return void 0===t||P.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 P.isNull(t)?P.isNull(F.$code)?(F.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),F.$code):F.$code:F.$code=t}static collator(){return P.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]}}A(H,"$text",{}),A(H,"$sort",null),A(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)?P.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?ve.parseOptions(this.$cookie[t]):P.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof be||(r=be.make(r||"+7 days")),i=L({expires:r.toUTC(),path:"/"},i),P.isRef(e)&&(e=ve.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let s=t+"="+P.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(B,"$cookie",null);const q=B;class G{static filterNodes(t,e=1){return y.filter(P.nodes(t),t=>t.nodeType===e)}static getNodePoint(t,e){let r=null;return null!=ye.doc().elementsFromPoint&&(r=document.elementsFromPoint(t,e)),null!=ye.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=ye.getNodePoint(s,n)),P.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=P.nodes(t)),t}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?ye.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?ye.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?ye.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=P.nodes(this.el.childNodes);return-1===t?r:y.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=ye.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>ye.find(e).is(t)),y.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!ye.find(e).is(t)),y.filter(this.els,t)}find(t){if(null==this.el)return ye.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return P.isStr(r)&&(r=e.querySelectorAll(t)),ye.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=ye.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?ye.find(null):t}child(t,e=1){for(let t of this.els)if(t.nodeType===e)return ye.find(t);return ye.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:y.filter(r,e=>ye.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}upnode(t){return ye.find(this.closest(t))}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return ye.find(e);return ye.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return ye.find(e);return ye.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 this.el.contains(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 z{}class U{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class V{}!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}(V,"$events",[]);class _{bind(t,e,r,i=null,s=!1,n={}){return P.isPrim(n)&&(n={id:n}),ye.$events=y.append(ye.$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={}){P.isPrim(i)&&(i={id:i});let s=y.filterIndex(ye.$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=ye.$events[r],[e,i.cb,i.options]))}),y.splices(ye.$events,s),this}on(t,e,r={},i=!1,s=null){P.isPrim(r)&&(r={id:r});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 P.isPrim(r)&&(r={id:r}),P.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this}optoff(t={}){return n.idle(()=>{y.filterRemove(ye.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),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=ye.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,s,e),this}fire(t,e={}){let r=new CustomEvent(t,{detail:e});return this.each(t=>{t.dispatchEvent(r)}),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 ye&&(t=t.el),P.isStr(t)&&(t=document.createElement(t)),t=v.assign(t,e);let r=new ye(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 ye.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 ye.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"===ye.getDomState()}static isDomComplete(){let t=ye.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,s,o]=[E.make(),ye.find(document),"DOMContentLoaded"],l=()=>{n.delay(t,e),s.off(o,null,{id:i})},a=ye.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]=[ye.find(document),"load"],l=ye.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,"")),P.num(t,0)}}class st{rect(t={}){const e=this.el.getBoundingClientRect();return null==e?t:e.toJSON()}margin(t=null,e=0){let r=this.computed(),i={top:ye.num(r.marginTop),right:ye.num(r.marginRight),bottom:ye.num(r.marginBottom),left:ye.num(r.marginLeft)};return null==t?i:v.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:ye.num(r.paddingTop),right:ye.num(r.paddingRight),bottom:ye.num(r.paddingBottom),left:ye.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:ye.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=ye.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:ye.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=ye.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=ye.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:ye.body().scrollWidth-t.left-e,bottom:ye.body().scrollHeight-t.top-r};return et(et({},t),i)}getOffset(t=null){null==t&&(t=ye.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=ye.num(t.offsetTop,0),r.left+=ye.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=ye.find(t),s={top:0,left:0,bottom:0,right:0};return e=t=>{s.top+=ye.num(t.offsetTop,0),s.left+=ye.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=ye.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=ye.num(t.scrollTop||t.pageYOffset||0),r.left+=ye.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=ye.num(t.scrollTop||t.pageYOffset||0),i.left+=ye.num(t.scrollLeft||t.pageXOffset||0)},ye.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 P.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(P.isArr(e)&&(e=e.join(" ")),P.isObj(e)&&(e=ve.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 P.isStr(r)&&(r=ve.parseOptions(r)),P.isUndef(t)?r:(e&&(t=ot(ot({},r),t)),t.translate&&(t.transform=`translate3d(${t.translate.join(",")}, 0)`),delete t.translate,P.isNum(t.top)&&(t.top+="px"),P.isNum(t.left)&&(t.left+="px"),P.isNum(t.width)&&(t.width+="px"),P.isNum(t.height)&&(t.height+="px"),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 P.isStr(r)&&(r=r.split(" ")),P.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 P.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=>ye.find(e).addClass(t));let e=this.el.className.split(" ");return P.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=>ye.find(e).remClass(t));let e=this.el.className.split(" ");return P.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=>ye.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=>ye.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(P.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 ye.find(t.el).each(t=>{(t=>ye.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:y.first(i)}static inviewMaxX(t,e=null){if(P.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 ye.find(t.el).each(t=>{(t=>ye.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]=[ye.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}=ye.find(t).viewoffY(),[i,s]=[ye.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]=[ye.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}=ye.find(t).viewoffY(),[i,s]=[ye.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=ye.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."),ye.setMetaTitle(t));class gt{}class yt{}class bt{}function vt(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 wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vt(Object(r),!0).forEach(function(e){Mt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Mt(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 Ot{}class Dt{popover(t,e="botttom-center",r={}){return/^(top|bottom)-/.test(e)?this.popoverY(t,e,r):/^(left|right)-/.test(e)?this.popoverX(t,e,r):void 0}popoverY(t,e="bottom-center",r={}){t=ye.find(t);let[i,s]=[t.rect(),this.rect()];r.x&&(i=wt(wt({},i),{},{left:r.x,width:1})),r.y&&(i=wt(wt({},i),{},{top:r.y,height:1})),r.width;let[n,o]=[{x:0,y:0},i.width-s.width];/^top-/.test(e)&&(n.y=i.top-s.height),/^bottom-/.test(e)&&(n.y=i.top+i.height),/-start$/.test(e)&&(n.x=i.left),/-center$/.test(e)&&(n.x=i.left+.5*o),/-end$/.test(e)&&(n.x=i.left+o);let l=e;/^top-/.test(e)&&(l=l.replace(/^top-/,"bottom-")),/^bottom-/.test(e)&&(l=l.replace(/^bottom-/,"top-"));let a={x:window.innerWidth,y:window.innerHeight},u=n.y+s.height>a.y||n.y<0;n.y<0&&(u=!0);const c=wt(wt({},r),{},{offset:n});if(u&&!r.offset)return this.popoverY(t,l,c);return u&&r.offset&&(n=r.offset),n.y<0&&(n.y=0),n.y+s.height>a.height&&(n.y=a.height-s.height),u&&(e="auto"),wt(wt({},this.popoverNormalize(n,s,i,a)),{},{position:e})}popoverX(t,e="left-center",r={}){t=ye.find(t);let[i,s]=[t.rect(),this.rect()];r.height;let[n,o]=[{x:0,y:0},i.height-s.height];/^left-/.test(e)&&(n.x=i.left-s.width),/^right-/.test(e)&&(n.x=i.left+i.width),/-start$/.test(e)&&(n.y=i.top),/-center/.test(e)&&(n.y=i.top+.5*o),/-end/.test(e)&&(n.y=i.top+o);let l=e;/^left-/.test(e)&&(l=l.replace(/^left-/,"right-")),/^right-/.test(e)&&(l=l.replace(/^right-/,"left-"));let a={x:window.innerWidth,y:window.innerHeight},u=n.y+s.height>a.y;n.y<0&&(u=!0);const c=wt(wt({},r),{},{offset:n});if(u&&!r.offset)return this.popoverX(t,l,c);return u&&r.offset&&(n=r.offset),u&&(e="auto"),wt(wt({},this.popoverNormalize(n,s,i,a)),{},{position:e})}popoverNormalize(t,e,r,i){const s=ye.find(document.body).scroll();t.y<0&&(t.y=0),t.y+e.height>i.y&&(t.y=i.y-e.height),t.x<0&&(t.x=0);const n=document.body.clientWidth;return t.x+e.width>i.x&&(t.x=i.x-e.width-(i.x-n)),t={x:t.x+s.left,y:t.y+s.top},v.each(t,(e,r)=>{t[r]=Math.round(e)}),t.self={width:e.width,height:e.height},t.rect={width:r.width,height:r.height},t}}function Pt(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 kt=[function(t){return v.each(P.class(G),(e,r)=>{t[r]=e}),v.each(P.proto(X),(e,r)=>{t.prototype[r]=e}),t.init.push(X._constructFinder),t},function(t){return v.each(P.class(Z),(e,r)=>{t[r]=e}),v.each(P.proto(Q),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(z),(e,r)=>{t[r]=e}),v.each(P.proto(U),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(V),(e,r)=>{t[r]=e}),v.each(P.proto(_),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(J),(e,r)=>{t[r]=e}),v.each(P.proto(K),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(it),(e,r)=>{t[r]=e}),v.each(P.proto(st),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(at),(e,r)=>{t[r]=e}),v.each(P.proto(ut),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(ft),(e,r)=>{t[r]=e}),v.each(P.proto(pt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(mt),(e,r)=>{t[r]=e}),v.each(P.proto(gt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(yt),(e,r)=>{t[r]=e}),v.each(P.proto(bt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.class(Ot),(e,r)=>{t[r]=e}),v.each(P.proto(Dt),(e,r)=>{t.prototype[r]=e}),t}];class jt{constructor(t,...e){Pt(this,"el",null),Pt(this,"els",[]),y.each(ye.init,r=>{t=r.call(this,t,...e)}),t instanceof ye&&(t=t.el),P.isArr(t)||(t=[t]),this.el=t[0],this.els=t}static find(t,...e){return new ye(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:{}}}Pt(jt,"init",[]);const $t=function(){let t=jt;for(const e of kt)t=e.call(t,t);return t},xt={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 St{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){P.isNum(t)||(t=P.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)+P.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-P.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return P.isEmpty(t)||v.each(xt,(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=be.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"])}}St.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},St.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},St.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},St.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},St.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},St.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},St.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},St.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},St.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},St.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},St.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},St.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},St.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},St.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},St.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},St.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Nt={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm",LT:"HH:mm",LTS:"HH:mm:ss",LTSD:"DD/MM/YYYY HH:mm:ss"},Yt={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class Et{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in Yt)t=c.replace(t,Yt[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return P.isTime(t)&&(e="HH:mm:ss"),P.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):P.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 Yt)this.set(c.extract(t,Yt[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return v.has(Nt,t)&&(t=F.$text[t]??Nt[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 P.int(this.format(t))}}class Tt{before(t=null,e="x"){return this.code(e)<be.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)>be.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 be||(t=be.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=[be.make(t),be.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class It{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")}}It.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},It.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},It.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},It.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},It.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},It.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class At{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 Ht{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],s=[this.clone(),be.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}}Ht.prototype.getDatesRange=function(...t){return console.warn("NowRange.getDatesRange() is deprecated, use NowRange.range() instead."),this.range(...t)};const Ft=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ct=["January","February","March","April","May","June","July","August","September","October","November","December"];class Lt{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(!Ft[e])throw new Error(`Invalid day number "${e}".`);let r=F.trans(Ft[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!Ct[e])throw new Error(`Invalid month number "${e}".`);let r=F.trans(Ct[e]);return null!=t&&(r=r.substring(0,t)),r}}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}const Wt=[function(t){return v.each(P.proto(St),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.proto(Et),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.proto(Tt),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.proto(It),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.proto(At),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.proto(Ht),(e,r)=>{t.prototype[r]=e}),t},function(t){return v.each(P.proto(Lt),(e,r)=>{t.prototype[r]=e}),t}];class Bt{constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){Rt(this,"input",null),Rt(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,P.isNix(r)&&(this.input=r),this.value=t,P.isStr(r)&&this.parse(r,e),y.each(be.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 be(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 be(new Date(this.value),null,t)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}Rt(Bt,"init",[]),Bt.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const qt=function(){let t=Bt;for(const e of Wt)t=e.call(t,t);return t},Gt=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>P.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>P.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>P.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>P.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Xt=[{match:t=>P.isArr(t),parse:t=>JSON.stringify(t)}];class zt{static keyed(t,e=null){return P.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!P.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 Gt)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),P.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Xt)if(e.match(t))return e.parse(t);return P.str(t)}}const Ut={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Vt{static castParams(t={}){if(P.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+"]"),!P.isRef(e))return P.str(t)+"="+ve.casted(e,!0);return y.each(e,(r,i)=>this.castParam(P.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(P.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Ut.entry);if(null==e)return{};const[r,i]=[ve.keyed,ve.parsed];return y.reduce(Array.from(e),(t,{groups:e})=>v.set(t,r(e.key),i(e.val)),{})}}const _t={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Jt{static castOptions(t={},e=!0){if(P.isEmpty(t))return"";return y.each(t,(t,r)=>this.castOption(r,t,null,e)).join(e?"; ":";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let s=i?": ":":";return P.isObj(e)?y.map(e,(e,r)=>this.castOption(r,e,t,i)).join(i?"; ":";"):P.str(t)+s+ve.casted(e,!1)}static parseOptions(t){if(P.isEmpty(t))return{};let e=t.matchAll(_t.entry);if(null==e)return{};const[r,i]=[ve.keyed,ve.parsed];return y.reduce(Array.from(e),(t,{groups:e})=>v.set(t,r(e.key),i(e.val)),{})}}const Kt=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Zt{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),y.each(Kt,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const Qt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class te{static filesize(t,e=1){P.isNum(t)||(t=P.num(t,0));let r=r=>m.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<Qt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+Qt[e];return r(Qt.length)}}const ee=[function(t){return v.each(P.class(zt),(e,r)=>{t[r]=e}),t},function(t){return v.each(P.class(Vt),(e,r)=>{t[r]=e}),t},function(t){return v.each(P.class(Jt),(e,r)=>{t[r]=e}),t},function(t){return v.each(P.class(Zt),(e,r)=>{t[r]=e}),t},function(t){return v.each(P.class(te),(e,r)=>{t[r]=e}),t}];class re{static extend(t){t.call({},this)}}const ie=function(){let t=re;for(const e of ee)t=e.call(t,t);return t};function se(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function ne(){const t=se();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 oe(){const t=se();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 le{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)),P.isEqual(r,e)||(v.set(this.$data,i,e),Me.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 P.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}(le,"$data",{});const ae=le;class ue{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)}),P.isEmpty(r)||(i+="?"+ve.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}(ue,"$routes",{});const ce=ue;function he(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 de{constructor(t,e={}){if(he(this,"map",null),he(this,"markers",{}),he(this,"cluster",null),he(this,"clusterFilter",null),he(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(ye.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(),P.isFunction(e)&&(this.clusterFilter=e);let i=y.filter(this.markers,t=>{let e=this.getMarkerVisibility(t.key);return P.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(P.isEmpty(r))return console.error(`Marker "${t}" not found`);P.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 P.isEmpty(r)?e:r.marker.getVisible()}getMarkerPositon(t,e=null){let r=v.get(this.markers,t);return P.isEmpty(r)?e:r.marker.getPosition()}toggleMarker(t){let e=v.get(this.markers,t);return P.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(P.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(P.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(P.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(P.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 P.isEmpty(r)||!v.has(r,"info")?e:!!r.info.getMap()}toggleInfo(t){let e=v.get(this.markers,t);return P.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(P.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(P.keys(this.markers),this.closeInfo.bind(this)),r&&e.info.open(this.map,e.marker),P.isFunction(e.onOpen)&&e.onOpen(e),this.styleMarker(t,"active"),r}closeInfo(t){let e=v.get(this.markers,t);if(P.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(),P.isFunction(e.onClose)&&e.onClose(e),this.styleMarker(t,"default"),r}createMarker(t=null,e={}){P.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",()=>Me.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(P.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 P.isEmpty(t)||(e=v.filter(this.markers,t)),Map.hideMarkers&&v.each(P.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;P.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")&&!ye.find(t.panel).empty()&&r.setPanel(ye.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)})})}}he(de,"mapStyle",[]),he(de,"markerStyles",{}),he(de,"hideMarkers",!0),he(de,"closeInfoWindows",!0);const fe=de;function pe(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 me{static listen(){document.addEventListener("scroll",me.scroll),me.scroll()}static scroll(){y.each(this.invi,(t,e)=>{ye.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=ye.find(e),s=this.getPrefix(t);i.addClass(s);let n=v.get(this.inis,t,null);if(P.isEmpty(n))return console.error(`Element "${t}" is not defined.`);let o=(t,e)=>{let r=new n(t.get(0),e);return me.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 ye.ready(()=>o.call({},i,r)),this}static unbind(t,e,r={}){let i=ye.find(e),s=this.getPrefix(t),n=v.get(this.inis,t,null);if(P.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(me.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=me.getPrefix(t),s=y.filter(this.runs,{prefix:r});y.each(s,({el:i})=>{let s=c.objectify(ye.find(i).attr(r));if(e&&P.isEmpty(s)&&(s={_plain:ye.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)}),ye.find(`[${r}]:not(.${i})`).each(i=>{let s=c.objectify(ye.find(i).attr(r));e&&P.isEmpty(s)&&(s={_plain:ye.find(i).attr(r)});let n=()=>{this.bind(t,i,s)};v.pluck(s,"inview",!1)?this.bindInview(i,n):n()})};return ye.find(document.body).observer(s)(document.body,i),ye.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}}pe(me,"prefix","js"),pe(me,"mount","mount"),pe(me,"inis",{}),pe(me,"runs",[]),pe(me,"invi",[]);const ge=me,ye=$t(),be=qt(),ve=ie(),we=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>P[e](...t)}}),Me=new Proxy({},{get:function(t,e){return console.warn(`Event.${e} is deprecated, use Signal.${e}() instead.`),(...t)=>I[e](...t)}}),Oe=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),E.make()};globalThis.pi=r,globalThis.addEventListener&&globalThis.addEventListener("beforeunload",t=>{y.map(ye.$events,({el:t,cb:e,event:r})=>(t.removeEventListener(r,e),null))});var De=window;for(var Pe in e)De[Pe]=e[Pe];e.__esModule&&Object.defineProperty(De,"__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:()=>ie,Arr:()=>v,Cookie:()=>G,Data:()=>te,Dom:()=>Rt,Event:()=>ne,For:()=>Qt,Hash:()=>A,Locale:()=>C,Mix:()=>M,Now:()=>ht,Num:()=>m,Obj:()=>O,Route:()=>re,Run:()=>s,Signal:()=>I,Str:()=>c,UUID:()=>se,browser:()=>J,device:()=>z,go:()=>U,trait:()=>_});class n{static interval(t,e=0){const r=setInterval(()=>{t()},e);return()=>clearInterval(r)}static clear(t){return M.isArr(t)?v.each(t,t=>this.clear(t),this):M.isFunc(t)?(t(),this):(clearTimeout(t),clearInterval(t),this)}static tryin(t){try{t()}catch(t){}return this}static wait(t,e=0,r=500){let i,n;return n=setTimeout(()=>{this.clear([i,n])},e*r),i=setInterval(()=>{t()&&this.clear([n,i])},e),()=>clearInterval(i)}static frame(t){const e=requestAnimationFrame(()=>{t()});return()=>cancelAnimationFrame(e)}static async(t){const e=setTimeout(()=>{t()});return()=>clearTimeout(e)}static delay(t,e=0){let r=setTimeout(()=>{t()},e);return()=>clearTimeout(r)}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(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{r=!1},e),r||(this.frame(()=>t(...n)),r=!0)}}static framerate(t,e=30,r=!0){let i,n=0,s=1e3/e;const o=(...e)=>{if(clearTimeout(i),Date.now()-n<=s)return r&&(i=setTimeout(o,s+1));this.frame(()=>t(...e)),n=Date.now()};return o}static framebuffer(t,e,r=1e3){const i={key:e,cb:t,priority:r,args:[],active:!1};return v.add(this.$buffer,i),(t,...e)=>{/^drag/.test(t.type)&&t.preventDefault(),O.assign(i,{args:[t,...e],active:!0}),this.runFramebuffer()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{this.runFramebuffer()},50),Date.now()-this.$timer<50)return;this.$idler&&clearTimeout(this.$idler),this.$timer=Date.now();let t=v.filter(this.$buffer,{active:!0});0!==t.length&&(t=v.sort(t,"priority"),v.each(t.reverse(),t=>{t.cb(...t.args),t.active=!1}))}}i(n,"$idler",null),i(n,"$timer",0),i(n,"$buffer",[]);const s=n;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 M.isStr(t)||(t=M.str(t)),M.isInt(e)&&(e=M.int(e)),t.charAt(e)}static set(t,e,r=""){return M.isStr(t)||(t=M.str(t)),M.isInt(e)&&(e=M.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){M.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){M.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=M.str(t).match(e);return M.isEmpty(i)?[]:M.isFunc(r)?r(i):i}static regex(t){return M.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return M.str(t).toUpperCase()}static ucfirst(t){return M.str(t).charAt(0).toUpperCase()+t.slice(1)}static lc(t){return M.str(t).toLowerCase()}static lcfirst(t){return M.str(t).charAt(0).toLowerCase()+t.slice(1)}static cc(t){return v.each(Qt.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return Qt.slugify(t)}static sc(t){return Qt.slugify(t).replace("-","_")}static pc(t){return v.each(Qt.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=M.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return M.str(t).slice(e,r)}static string(t,e="-",r=!1){return M.isEmpty(t)?e:(t=M.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return M.isEmpty(t)?i:M.bool(t)?e:r}static number(t,e=null,r=null,i={}){return M.isNum(t)?(null==r&&(r=C.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),M.num(t).toLocaleString(r,i)):M.str(t)}static integer(t,e=0,r="0"){return M.isNum(t)?(M.isInt(t)||(t=M.int(t)),t=M.int(t),e?M.str(t).padStart(e,r):M.str(t)):M.str(t)}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return M.isDate(t)||(t=ht.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 M.isRef(t)?t:("params"===e&&(t=Qt.parseParams(t)),"options"===e&&(t=Qt.parseOptions(t)),M.isRef(t)||(t=JSON.parse(t)),r?M.vals(t):t)}static stringify(t,e="options"){return M.isStr(t)?t:"params"===e?Qt.castParams(t):"options"===e?Qt.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.pc(...t)),u.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),Qt.slugify(...t)),u.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),Qt.castOptions(...t)),u.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),Qt.parseOptions(...t)),u.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),Qt.castParams(...t)),u.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),Qt.parseParams(...t)),u.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),Qt.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 M.isNum(t)||(t=M.num(t)),t.toFixed(e)}static float(t){return M.isNum(t)||(t=M.num(t)),parseFloat(t)}static int(t){return M.isNum(t)||(t=M.num(t)),parseInt(t)}static ceil(t){return M.isNum(t)||(t=M.num(t)),Math.ceil(t)}static floor(t){return M.isNum(t)||(t=M.num(t)),Math.floor(t)}static round(t){return M.isNum(t)||(t=M.num(t)),Math.round(t)}static combine(t){return v.reduce(t,(t,e)=>t+e,0)}static subtract(t){return v.reduce(t,(t,e)=>t-e,0)}static decade(t){return M.isNum(t)||(t=M.num(t)),10*Math.floor(t/10)}static matrix(t,e=[]){M.isNum(t)||(t=M.num(t));let r=0;for(let i=20;i>=0;i--)t>=(r=Math.pow(2,i))&&(e.push(r),t-=r);return e}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[d(d({},i),t),d(d({},i),e)];let n=Math.PI*this.float(t.lat)/180,s=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(n)*Math.sin(s),Math.cos(n)*Math.cos(s)*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."),A.number(...t));const m=p;var g;function y(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 b{static all(t){return M.isArr(t)?t:[t]}static get(t,e,r=null){return M.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 prev(t,e){return M.isEmpty(t)||!M.isArr(t)?0:e-1<0?t.length-1:e-1}static next(t,e){return M.isEmpty(t)||!M.isArr(t)||e+1>t.length?0: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(!M.isPrim(e))return-1!==this.findIndex(t,e);return M.isRef(t)||(t=[t]),M.isArr(t)||(t=M.vals(t)),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return M.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(M.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(M.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=M.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[M.isArr(t),M.keys(t)],n=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],n(r));return t}static recursive(t,e,r,i=[]){let n=t=>i=>this.recursive(i,e,r,t);return M.isArr(t)?this.map(t,n(i)):(M.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],null==t||(M.isObj(t[e])&&(t[e]=n(i)(t[e])),M.isArr(t[e])&&(t[e]=this.map(t[e],n(i)))),t)}static cascade(t,e,r,i=[],n={}){if(null==t)return n;if(M.isObj(t))return this.cascade(t[r],e,r);const s=t=>this.cascade(t[e],e,r,n[t[r]],n);return this.each(t,t=>{n[t[r]]=[...i,t[r]],s(t)}),n}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!M.isEmpty(t)),M.keys(t).filter(r=>M.isFunc(e)?e.call({},t[r],r):M.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=>!M.isEmpty(t)),M.vals(t).filter((r,i)=>M.isFunc(e)?e.call({},r,i):M.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=>!M.isEmpty(t));for(let r=0;r<t.length;r++){if(M.isFunc(e)&&e.call({},t[r],r))return r;if(M.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 M.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=M.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=>O.get(t,e),i=M.keys(t).sort((e,i)=>M.compare(r(t[e]),r(t[i]))),n=[];for(const e of i)n.push(t[e]);return n}static sortPrim(t){let e=M.keys(t).sort((t,e)=>M.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(M.num(e),r)}static splice(t,e,r=1,...i){return t.splice(M.num(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(M.isPrim(t))return t;if(M.isObj(t))return O.clone(t);if(!M.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]=O.get(t[i],e);return r}static reduce(t,e,r){return M.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(M.isObj(e))return O.includes(t,e);if(!M.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let n=0;!1===r&&n<i;n++)r||=this.has(t,e[n]);return r}static contains(t,e){let r=!0;for(let i of M.vals(e))r&&=-1!==M.vals(t).indexOf(i);return r}static matches(t,e){if(M.isObj(e))return O.matches(t,e);if(!M.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let n=0;!0===r&&n<i;n++)r&&=this.has(t,e[n]);return r}}y(b,"diffrence",(g=b).diff),y(b,"intersect",g.isect),b.removeIndex=function(...t){return console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),this.unset(...t)},b.sortString=function(...t){return console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),this.sortPrim(...t)},b.push=function(...t){return console.warn("Arr.push() is deprecated, use Arr.append() instead."),this.append(...t)},b.concat=function(...t){return console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),this.merge(...t)},b.equal=function(...t){return console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),this.matches(...t)};const v=b;class w{static keyoptim(t,e=!1,r=null){return null===r&&(r=M.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=M.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[n,s,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[n];for(;null!=t&&s<o;)t=t[e[s++]];return null!=t&&void 0!==t[n]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=M.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e];let s=0,o=(e=this.keyoptim(e,i,n)).length;if(0===o)return r;for(;null!=t&&s<o;)t=t[e[s++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=M.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,n)).length)return t;let s=t;for(let t,i,n=0;n<e.length;n++)t=i=String(e[n]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==s[t]&&(s[t]=t===i?{}:[]),t!==i&&v.insert(e,n+1,s[t].length),e.length-1===n&&(s[t]=r),s=s[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=M.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[n,s,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&s<o;)l=l[e[s++]];return null==l||delete l[n],t}static empty(t,e){return M.isEmpty(this.get(t,e))}static remove(t,e){if(!M.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 M.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of M.keys(t))t[r]=e(t[r],r);return t}static filterIndex(t,e=null){return v.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 M.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 M.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return v.each(M.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(M.isPrim(t))return t;if(M.isArr(t))return v.clone(t);if(!M.isObj(t))return t;let r={};for(let e of M.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)=>{v.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)=>{v.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(M.isArr(e))return v.includes(t,e);if(!M.isObj(e))return t===e;let r=M.keys(e),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i=this.includes(t[r[s]],e[r[s]]);return i}static matches(t,e){if(M.isArr(e))return v.matches(t,e);if(!M.isObj(t))return t===e;let r=v.unique([...M.keys(e),...M.keys(t)]),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i&&=this.matches(t[r[s]],e[r[s]]);return i}static sort(t,e){let r=v.sort(t,e);return v.each(r,(e,r)=>{t[r]._key=r}),r}}w.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Obj.sort() instead."),w.sort(...t)),w.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),M.vals(...t)),w.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),v.find(...t)),w.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),v.findIndex(...t));const O=w;var D;function j(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 P={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class ${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||P.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.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!U().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&&!v.has(e,i)&&(r[i]=t[i]);return r}static extend(t,e,r=["constructor"]){if(null==e)return{};let i=Object.getPrototypeOf(e);for(const n of Object.getOwnPropertyNames(e)){if(!r.length||v.has(r,n))continue;let s=Object.getOwnPropertyDescriptor(i,n);s||(s=Object.getOwnPropertyDescriptor(e,n)),s||s.get||s.set||(t[n]=e[n]),s&&(s.get||s.set)&&Object.defineProperty(t,n,s)}return t}static class(t,e=[]){return e=v.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=v.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return O.each(O.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 M.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 C.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"),v.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)}}j($,"isPrimitive",(D=$).isPrim),j($,"isString",D.isStr),j($,"isNumber",D.isNum),j($,"isInteger",D.isInt),j($,"isBoolean",D.isBool),j($,"isFunction",D.isFunc),j($,"isReference",D.isRef),j($,"isObject",D.isObj),j($,"isArray",D.isArr),j($,"isIterable",D.isIter),j($,"length",D.len),j($,"array",D.arr),j($,"string",D.str),j($,"number",D.num),j($,"integer",D.int),j($,"boolean",D.bool),$.global=function(...t){return console.warn("Mix.global() is deprecated, use go() instead."),U(...t)},$.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),M.isObj(...t)},$.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),M.num(...t)},$.delay=function(...t){return console.warn("Mix.delay() is deprecated, use Run.delay() instead."),s.delay(...t)},$.async=function(...t){return console.warn("Mix.async() is deprecated, use Run.async() instead."),s.async(...t)},$.debounce=function(...t){return console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),s.debounce(...t)},$.throttle=function(...t){return console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),s.throttle(...t)},$.framerate=function(...t){return console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),s.framerate(...t)},$.convertString=function(...t){return console.warn("Mix.convertString() is deprecated, use Str.string() instead."),c.string(...t)},$.convertDatetime=function(...t){return console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),c.date(...t)},$.convertBool=function(...t){return console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),c.boolean(...t)},$.convertBoolean=function(...t){return console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),c.boolean(...t)};const M=$;const x=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],N=["8","9","a","b"],S=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class Y{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(N.length,N):this.radix(x.length,x);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||S],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var T,k,H;T=Y,H=["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"],(k=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+""}(k="RADIX"))in T?Object.defineProperty(T,k,{value:H,enumerable:!0,configurable:!0,writable:!0}):T[k]=H;const A=Y;class E{static bind(t,e,r={},i=!1){const n=[e,r,i];return M.isArr(t)?v.each(t,t=>this.bind(t,...n),this):(M.isPrim(r)&&(r={id:r}),this.$events=v.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){const r=[e];return M.isArr(t)?v.each(t,t=>this.unbind(t,...r),this):(M.isPrim(e)&&(e={id:e}),v.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return v.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){const r=[e];if(M.isArr(t))return v.each(t,t=>this.pause(t,...r),this);let i=v.find(this.$events,{event:t,options:e});return null!=i&&(i.paused=!0),this}static unpause(t,e={}){if(M.isArr(t))return v.each(t,t=>this.pause(t,...arguments),this);let r=v.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 I=E;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 R{static has(t=void 0){return void 0===t||O.has(R.$text,t)}static get(t=void 0,e=null){return void 0===t?R.$text:O.get(R.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?R.$text=t:O.set(R.$text,t,e)}static code(t=null){return M.isNull(t)?M.isNull(C.$code)?(C.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),C.$code):C.$code:C.$code=t}static collator(){return M.isNull(C.$sort)?(C.$sort=new Intl.Collator(C.code(),{numeric:!0,sensitivity:"base"}),C.$sort):C.$sort}static replace(t,e=null){return null==e||O.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=O.get(R.$text,t,t),C.replace(t,e)}static choice(t,e=0,r={}){return t=O.get(R.$text,t,t),void 0===r.count&&(r.count=e),t=C.countpick(t.split("|"),e),C.replace(t,r)}static countpick(t,e=0){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]}}F(R,"$text",{}),F(R,"$sort",void 0),F(R,"$code","en");const C=R;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 W(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){X(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}function X(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 q={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(q.entry);if(null==e)return this.$cookie;return v.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)?M.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?Qt.parseOptions(this.$cookie[t]):M.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof ht||(r=ht.make(r||"+7 days")),i=W({expires:r.toUTC(),path:"/"},i),M.isRef(e)&&(e=Qt.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let n=t+"="+M.str(e).replaceAll(";","{:}");return v.each(i,(t,e)=>{n+=`;${e}=${t}`}),globalThis.document.cookie=n,this}static forget(t,e={}){e=W({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return v.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}X(B,"$cookie",void 0);const G=B;function U(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function J(){const t=U();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 z(){const t=U();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}function _(t){const e=t[0];return v.each(t.slice(1),t=>{v.each(M.class(t),(t,r)=>{e[r]=t}),v.each(M.proto(t),(t,r)=>{e.prototype[r]=t})}),e}const Z={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 K{static test(t){return t instanceof Date}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){M.isNum(t)||(t=M.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)+M.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-M.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return M.isEmpty(t)||O.each(Z,(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=ht.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"])}}K.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},K.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},K.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},K.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},K.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},K.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},K.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},K.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},K.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},K.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},K.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},K.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},K.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},K.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},K.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},K.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Q={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm",LT:"HH:mm",LTS:"HH:mm:ss",LTSD:"DD/MM/YYYY HH:mm:ss"},V={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class tt{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in V)t=c.replace(t,V[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return M.isTime(t)&&(e="HH:mm:ss"),M.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):M.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 V)this.set(c.extract(t,V[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return O.has(Q,t)&&(t=C.$text[t]??Q[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 M.int(this.format(t))}}class et{before(t=null,e="x"){return this.code(e)<ht.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)>ht.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 ht||(t=ht.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=[ht.make(t),ht.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class rt{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),v.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),v.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),v.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")}}rt.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},rt.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},rt.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},rt.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},rt.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},rt.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class it{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 nt{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],n=[this.clone(),ht.make(t)];n[0].afterDate(n[1])&&(n=n.reverse()),n[1].add(1,e);for(let t=n[0];!t.equal(n[1],r);t=t.next(e))v.append(i,t);return i}}nt.prototype.getDatesRange=function(...t){return console.warn("Now.getDatesRange() is deprecated, use Now.range() instead."),this.range(...t)};const st=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ot=["January","February","March","April","May","June","July","August","September","October","November","December"];class lt{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(!st[e])throw new Error(`Invalid day number "${e}".`);let r=C.trans(st[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!ot[e])throw new Error(`Invalid month number "${e}".`);let r=C.trans(ot[e]);return null!=t&&(r=r.substring(0,t)),r}}function at(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 ut=[K,tt,et,rt,it,nt,lt];class ct extends(_(ut)){constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){super(),at(this,"input",null),at(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,M.isNix(r)&&(this.input=r),this.value=t,M.isStr(r)&&this.parse(r,e),v.each(ht.init,t=>{t.call(this,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new ht(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(){return new ht(new Date(this.value),null)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}at(ct,"init",[]),ct.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const ht=ct;class dt{static filterNodes(t,e=1){return v.filter(M.nodes(t),t=>t.nodeType===e)}static getNodePoint(t){t.touches?.[0]&&(t=t.touches[0]);let[e,r]=[null,[t.clientX,t.clientY]];return null!=Rt.doc().elementsFromPoint&&(e=document.elementsFromPoint(r[0],r[1])),null!=Rt.doc().msElementsFromPoint&&(e=document.msElementsFromPoint(r[0],r[1])),e}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=Rt.getNodePoint(e)),M.isArr(r)&&(r=v.first(r)),null==r&&(r=e.target),r.closest(t)}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?Rt.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?Rt.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?Rt.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=M.nodes(this.el.childNodes);return-1===t?r:v.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=Rt.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>Rt.find(e).is(t)),v.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!Rt.find(e).is(t)),v.filter(this.els,t)}find(t){if(null==this.el)return Rt.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return M.isStr(r)&&(r=e.querySelectorAll(t)),Rt.find(r)}get(t=-1){let e=this.els;return-1===t?e:v.get(e,t)}first(t=0){return this.get(t)}last(t=1){return v.get(this.els,this.els.length-t)}each(t){return v.each(this.els,t)}loopParent(t,e=null){null==e&&(e=Rt.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?Rt.find(null):t}child(t=null,e=1){for(let r of this.childs(t,e))return Rt.find(r);return Rt.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:v.filter(r,e=>Rt.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}upnode(t){return Rt.find(this.closest(t))}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return Rt.find(e);return Rt.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return Rt.find(e);return Rt.find(null)}length(){return this.els.length}is(t,e=!1){if(this.el===t)return!0;if(null==this.el)return e;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 this.el.contains(t)}}dt.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},dt.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},dt.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},dt.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},dt.prototype.getNot=()=>{console.error("Dom.getNot() is not implemented anymore.")};class ft{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class pt{bind(t,e,r,i=null,n=!1,s={}){M.isPrim(s)&&(s={id:s}),Rt.$events=v.append(Rt.$events,{el:t,event:e,cb:r,selector:i,pause:n,options:s}),console.log(this.els,t);try{t.addEventListener(e,r,s)}catch(e){console.log("ERRROR",this.els,t,e)}return this}unbind(t,e,r=null,i={}){M.isPrim(i)&&(i={id:i});let n=v.filterIndex(Rt.$events,{el:t,event:e,selector:r,options:i});if(0===n.length)return this;return v.each(n.reverse(),r=>{var i;t.removeEventListener(...(i=Rt.$events[r],[e,i.cb,i.options]))}),v.splices(Rt.$events,n),this}on(t,e,r={},i=!1,n=null){M.isPrim(r)&&(r={id:r});const s=[e,r,i,n];if(M.isArr(t))return v.each(t,t=>this.on(t,...s)),this;let o=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,o,n,i,r)}),this}off(t,e=null,r={}){M.isPrim(r)&&(r={id:r});const i=[e,r];return M.isArr(t)?(v.each(t,t=>this.off(t,...i)),this):(M.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}optoff(t={}){return s.async(()=>{v.filterRemove(Rt.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),this}once(t,e,r={}){return r.id=A.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},n=!1){return this.on(t,function(t){let i=Rt.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,n,e),this}fire(t,e={}){let r=new CustomEvent(t,{detail:e});return this.each(t=>{t.dispatchEvent(r)}),this}pointerdown(t=1){const e=this.rect(),[r,i]=[e.left+e.width/2,e.top+e.height/2],n=new PointerEvent("pointerdown",{view:window,bubbles:!0,cancelable:!0,buttons:1,clientX:r,clientY:i});return this.each(t=>{t.dispatchEvent(n)}),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}(pt,"$events",[]),pt.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},pt.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},pt.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},pt.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class mt{static make(t,e={}){t instanceof Rt&&(t=t.el),M.isStr(t)&&(t=document.createElement(t)),t=O.assign(t,e);let r=new Rt(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return Rt.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 Rt.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class gt{static getDomState(){return document.readyState}static isDomReady(){return"complete"===Rt.getDomState()}static isDomComplete(){let t=Rt.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,n,o]=[A.make(),Rt.find(document),"DOMContentLoaded"],l=()=>{s.delay(t,e),n.off(o,null,{id:i})},a=Rt.isDomReady;return a()?(s.wait(()=>{if(a())return l(),!0},10,r),this):(n.on(o,l,{id:i}),this)}static complete(t,e=0,r=6e3){let i=()=>{s.delay(t,e)},[n,o]=[Rt.find(document),"load"],l=Rt.isDomComplete;return l()?(s.wait(()=>{l()&&i()},10,r),this):(n.on(o,i),this)}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 s.wait(()=>{if(r.call(this))return t(),!0},10,e),this}}gt.required=()=>{console.error("Dom.required() is not implemented anymore.")};function yt(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 bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach(function(e){vt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}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}class wt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),M.num(t,0)}rect(t={left:0,top:0,width:0,height:0}){if(!this.el.getBoundingClientRect)return t;const e=this.el.getBoundingClientRect();return null==e?t:e.toJSON()}margin(t=null,e=0){let r=this.computed(),i={top:Rt.num(r.marginTop),right:Rt.num(r.marginRight),bottom:Rt.num(r.marginBottom),left:Rt.num(r.marginLeft)};return null==t?i:O.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:Rt.num(r.paddingTop),right:Rt.num(r.paddingRight),bottom:Rt.num(r.paddingBottom),left:Rt.num(r.paddingLeft)};return null==t?i:O.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:Rt.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=Rt.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:Rt.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=Rt.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:O.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=Rt.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:Rt.body().scrollWidth-t.left-e,bottom:Rt.body().scrollHeight-t.top-r};return bt(bt({},t),i)}getOffset(t=null){null==t&&(t=Rt.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=Rt.num(t.offsetTop,0),r.left+=Rt.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=Rt.find(t),n={top:0,left:0,bottom:0,right:0};return e=t=>{n.top+=Rt.num(t.offsetTop,0),n.left+=Rt.num(t.offsetLeft,0)},i.loopOffset(e),n=this.calcOffset(n,i.scrollWidth(),i.scrollHeight()),{top:r.top-n.top,bottom:r.bottom-n.bottom,left:r.left-n.left,right:r.right-n.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:O.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=Rt.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=Rt.num(t.scrollTop||t.pageYOffset||0),r.left+=Rt.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=Rt.num(t.scrollTop||t.pageYOffset||0),i.left+=Rt.num(t.scrollLeft||t.pageXOffset||0)},Rt.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}wt.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},wt.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},wt.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function Ot(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 Dt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(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 Pt{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return M.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(M.isArr(e)&&(e=e.join(" ")),M.isObj(e)&&(e=Qt.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:O.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 M.isStr(r)&&(r=Qt.parseOptions(r)),M.isUndef(t)?r:(e&&(t=Dt(Dt({},r),t)),t.translate&&(t.transform=`translate3d(${t.translate.join(",")}, 0)`),delete t.translate,M.isNum(t.top)&&(t.top+="px"),M.isNum(t.left)&&(t.left+="px"),M.isNum(t.width)&&(t.width+="px"),M.isNum(t.height)&&(t.height+="px"),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 M.isStr(r)&&(r=r.split(" ")),M.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 M.isArr(t)||(t=[t]),v.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Rt.find(e).addClass(t));let e=this.el.className.split(" ");return M.isStr(t)&&(t=t.split(" ")),e=v.append(e,...t),this.el.className=v.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Rt.find(e).remClass(t));let e=this.el.className.split(" ");return M.isStr(t)&&(t=t.split(" ")),e=v.diff(e,t),this.el.className=v.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>Rt.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=>Rt.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}Pt.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},Pt.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function $t(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 Mt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(r),!0).forEach(function(e){xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function xt(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 Nt{static inviewMaxY(t,e=null){if(M.isString(t)&&(t={el:t}),!(t=Mt(Mt({},{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 Rt.find(t.el).each(t=>{(t=>Rt.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:v.first(i)}static inviewMaxX(t,e=null){if(M.isString(t)&&(t={el:t}),!(t=Mt(Mt({},{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 Rt.find(t.el).each(t=>{(t=>Rt.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:v.first(i)}viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[Rt.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}=Rt.find(t).viewoffY(),[i,n]=[Rt.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-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]=[Rt.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}=Rt.find(t).viewoffY(),[i,n]=[Rt.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-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}}Nt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},Nt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class St{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=Rt.doc().title),document.title=C.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}(St,"$meta",{}),St.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),Rt.setMetaTitle(t));class Yt{}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 kt(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){Ht(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 Ht(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{popover(t,e="botttom-center",r={}){return/^(top|bottom)-/.test(e)?this.popoverY(t,e,r):/^(left|right)-/.test(e)?this.popoverX(t,e,r):void 0}popoverY(t,e="bottom-center",r={}){t=Rt.find(t);let[i,n]=[t.rect(),this.rect()];r.x&&(i=kt(kt({},i),{},{left:r.x,width:1})),r.y&&(i=kt(kt({},i),{},{top:r.y,height:1})),r.width;let[s,o]=[{x:0,y:0},i.width-n.width];/^top-/.test(e)&&(s.y=i.top-n.height),/^bottom-/.test(e)&&(s.y=i.top+i.height),/-start$/.test(e)&&(s.x=i.left),/-center$/.test(e)&&(s.x=i.left+.5*o),/-end$/.test(e)&&(s.x=i.left+o);let l=e;/^top-/.test(e)&&(l=l.replace(/^top-/,"bottom-")),/^bottom-/.test(e)&&(l=l.replace(/^bottom-/,"top-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y||s.y<0;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverY(t,l,c);return u&&r.offset&&(s=r.offset),s.y<0&&(s.y=0),s.y+n.height>a.height&&(s.y=a.height-n.height),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverX(t,e="left-center",r={}){t=Rt.find(t);let[i,n]=[t.rect(),this.rect()];r.height;let[s,o]=[{x:0,y:0},i.height-n.height];/^left-/.test(e)&&(s.x=i.left-n.width),/^right-/.test(e)&&(s.x=i.left+i.width),/-start$/.test(e)&&(s.y=i.top),/-center/.test(e)&&(s.y=i.top+.5*o),/-end/.test(e)&&(s.y=i.top+o);let l=e;/^left-/.test(e)&&(l=l.replace(/^left-/,"right-")),/^right-/.test(e)&&(l=l.replace(/^right-/,"left-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverX(t,l,c);return u&&r.offset&&(s=r.offset),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverNormalize(t,e,r,i){const n=Rt.find(document.body).scroll();t.y<0&&(t.y=0),t.y+e.height>i.y&&(t.y=i.y-e.height),t.x<0&&(t.x=0);const s=document.body.clientWidth;return t.x+e.width>i.x&&(t.x=i.x-e.width-(i.x-s)),t={x:t.x+n.left,y:t.y+n.top},O.each(t,(e,r)=>{t[r]=Math.round(e)}),t.self={width:e.width,height:e.height},t.rect={width:r.width,height:r.height},t}}function Et(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 It=[dt,gt,ft,pt,mt,wt,Pt,Nt,St,Yt,At];class Ft extends(_(It)){constructor(t,...e){return super(t,...e),Et(this,"el",null),Et(this,"els",[]),"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=M.nodes(t)),t instanceof Rt&&(t=t.el),M.isArr(t)||(t=[t]),this.el=t[0],this.els=t,this}static find(t,...e){return new Rt(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:{}}}Et(Ft,"init",[]);const Rt=Ft,Ct=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>M.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>M.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>M.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>M.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Lt=[{match:t=>M.isArr(t),parse:t=>JSON.stringify(t)}];class Wt{static keyed(t,e=null){return M.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!M.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 Ct)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),M.isStr(t))return t;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 M.str(t)}}const Xt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class qt{static castParams(t={}){if(M.isEmpty(t))return"";return v.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!M.isRef(e))return M.str(t)+"="+Qt.casted(e,!0);return v.each(e,(r,i)=>this.castParam(M.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(M.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Xt.entry);if(null==e)return{};const[r,i]=[Qt.keyed,Qt.parsed];return v.reduce(Array.from(e),(t,{groups:e})=>O.set(t,r(e.key),i(e.val)),{})}}const Bt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Gt{static castOptions(t={},e=!0){if(M.isEmpty(t))return"";return v.each(t,(t,r)=>this.castOption(r,t,null,e)).join(e?"; ":";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let n=i?": ":":";return M.isObj(e)?v.map(e,(e,r)=>this.castOption(r,e,t,i)).join(i?"; ":";"):M.str(t)+n+Qt.casted(e,!1)}static parseOptions(t){if(M.isEmpty(t))return{};let e=t.matchAll(Bt.entry);if(null==e)return{};const[r,i]=[Qt.keyed,Qt.parsed];return v.reduce(Array.from(e),(t,{groups:e})=>O.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 Jt{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),v.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){M.isNum(t)||(t=M.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 Zt=[Wt,qt,Gt,Jt,_t];class Kt extends(_(Zt)){static extend(t){t.call({},this)}}const Qt=Kt;class Vt{static has(t){return O.has(this.$data,v.first(t))}static set(t,e){let[r,i]=[null,v.first(t)];O.has(this.$data,i)&&(r=O.get(this.$data,i)),M.isEqual(r,e)||(O.set(this.$data,i,e),I.fire("store:"+i,e,i))}static unset(t){O.unset(this.$data,[...v.first(t)])}static get(t,e=null,r=!1){let i=v.first(t);if(!O.has(this.$data,i)&&!r)return e;O.has(this.$data,i)&&r&&O.set(this.$data,i,e);let n=O.get(this.$data,i,e);return M.isObj(n)?O.clone(n):n}static find(t,e,r=null){let i=v.first(t);if(!1===O.has(this.$data,i))return r;if(!1===O.has(e,"id"))return r;let n=v.findIndex(this.get(i),{id:e.id});return-1===n?r:this.get(i+"."+n)}static replace(t,e){let r=v.first(t);if(!1===O.has(this.$data,r))return;if(!1===O.has(e,"id"))return;let i=v.findIndex(this.get(r),{id:m.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,v.merge(this.get(t,[]),e))}static remove(t,...e){this.set(t,v.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}(Vt,"$data",{});const te=Vt;class ee{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),O.each(e,(t,e)=>{i=i.replace(new RegExp("{"+e+"}","g"),t)}),M.isEmpty(r)||(i+="?"+Qt.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}(ee,"$routes",{});const re=ee,ie=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>M[e](...t)}}),ne=new Proxy({},{get:function(t,e){return console.warn(`Event.${e} is deprecated, use Signal.${e}() instead.`),(...t)=>I[e](...t)}}),se=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),A.make()};globalThis.pi=r,globalThis.addEventListener&&globalThis.addEventListener("beforeunload",()=>{v.map(Rt.$events,({el:t,cb:e,event:r})=>(t.removeEventListener(r,e),null))});var oe=window;for(var le in e)oe[le]=e[le];e.__esModule&&Object.defineProperty(oe,"__esModule",{value:!0})})();
2
2
  //# sourceMappingURL=pico-js.browser.js.map