dynamic-html-helpers 1.5.0 → 1.5.1

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.
@@ -1,17 +1,17 @@
1
- var{IS:b,maybe:Q,$Wrap:Do,isNothing:qt,xProxy:Vt,addSymbolicExtensions:_t}=Xt({useSymbolicExtensions:!1});function Xt(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=Gt(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function Gt(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=Kt(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function Kt(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(qt(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||Q({trial:v=>String(i)===t.NAN}),isInfinity:Q({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:E,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(i,...l);switch(l=l.length&&l[0],!0){case J:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case H:return f?t.NAN:String(v)===String(i);case W:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case E===Boolean:return f?t.BOOLEAN:E===l;default:return S(i,l,f,x(i,E))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return Q({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||b(i,1/0)||b(i,NaN):u,u}}var en=rn(),ye=tn(),_=nn();function tn(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function nn(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function rn(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var Re={html:"innerHTML",text:"textContent",class:"className"},Y={},U={},Ge=e=>{console.error(`tinyDOM error: "${e}" is not a valid HTML tag`)};_t();var Ke=on();function on(){return Object.freeze(new Proxy(Y,et()))}function et(){return{get(e,t){let n=String(t);switch(!0){case n in e:return e[n];case pn(n):return He({tag:n,key:t});default:return He({tag:n,key:t,isError:!0})}},set(e,t,n){return t==="setError"&&typeof n=="function"&&(Ge=n),!0},enumerable:!1,configurable:!1}}function He({tag:e,key:t,custom:n,debug:r=!1,isError:o=!1}={}){let a=an();if(o)return Object.defineProperty(a,e,{get(){return s=>Ge(t)??""}}),We(a,e);if(e.includes("-")){let[s,m]=e.includes("-")?[e,Sn(e)]:[bn(e),e];U[s]=s,U[m]=s,n=m}return n&&Object.defineProperty(a,n,{get(){return Je(e)}}),Object.defineProperty(a,e,{get(){return Je(e)}}),We(a,e)}function We(e,t){return Y=Object.freeze(new Proxy(e,et())),Y[Symbol.for.proxy]="Proxy (Object)",Y[t]}function an(){return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(Y)))}function ln(e,t,n){return t=t?.isJQx&&t.node||(t?.[Symbol.is](Number)?String(t):t),Q({trial:r=>tt(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} not created, reason
2
- `,r)})}function sn(e,t,...n){let r=un(t,e);return n?.forEach(o=>ln(r,o,e)),r}function un(e,t){switch(e=we(t)?yn(e):e?.isJQx?e.node:e,!0){case e?.[Symbol.is](String):return ee(t,tt(e,t)?{html:e}:{text:e});case e?.[Symbol.is](Node):return cn(t,e);default:return ee(t,e)}}function cn(e,t){let n=ee(e);return n.append(t),n}function mn(e){if(Object.keys(e).length<1)return{assignable:{},specials:[...Array(3)]};let t=dn(e);return Object.keys(e).forEach(n=>{let r=n.toLowerCase();r in Re&&(e[Re[r]]=e[n])&&delete e[n]}),{assignable:e,specials:t}}function dn(e){if(!e?.[Symbol.is](Object))return Array(3);let t=Object.entries(e.data??{}),n=Object.entries(e.attributes??{}),r=e.class?.split(/[ ,]/).map(o=>o.trim()).filter(o=>o.length>1);return delete e.data,delete e.attributes,delete e.class,[t,n,r]}function fn(e,t){let[n,r,o]=e;n?.length&&n.forEach(([a,s])=>t.dataset[a]=s),r?.length&&r.forEach(([a,s])=>t.setAttribute(a,s)),o?.forEach(a=>t.classList.add(a))}function ee(e,t){t=t||{};let{assignable:n,specials:r}=mn(t),o=Object.assign(we(e)?new Comment:document.createElement(e),n);return fn(r,o),o}function yn(e){return e?.constructor===Comment?e?.textContent:String(e)}function tt(e,t){return!we(t)&&e?.[Symbol.is](String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function we(e){return/comment/i.test(e)}function pn(e){return gn(e)&&(e in U||!ee(e)?.[Symbol.is](HTMLUnknownElement))}function gn(e){return e=e.toLowerCase(),typeof e=="string"&&e.length>0&&/^[a-z]/.test(e)&&/^[a-z0-9-]+$/gi.test(e)}function Je(e){return e=e in U?U[e]:e,(t,...n)=>sn(e,t,...n)}function hn([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function bn(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function Sn(e){return e[Symbol.is](String)?e.toLowerCase().split("-").map((t,n)=>n&&`${hn(t)}`||t).join(""):e}var{IS:F,maybe:ce,$Wrap:Io,isNothing:xn,xProxy:Co,addSymbolicExtensions:Ao}=vn({useSymbolicExtensions:!1});function vn(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=Tn(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function Tn(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=wn(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function wn(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(xn(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||ce({trial:v=>String(i)===t.NAN}),isInfinity:ce({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:E,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(i,...l);switch(l=l.length&&l[0],!0){case J:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case H:return f?t.NAN:String(v)===String(i);case W:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case E===Boolean:return f?t.BOOLEAN:E===l;default:return S(i,l,f,x(i,E))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return ce({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||F(i,1/0)||F(i,NaN):u,u}}var nt=On;function On({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:a,removeRules:s,consider:m,currentSheetID:g}=$n({styleSheet:e,createWithId:t});function x(p,d){if(p&&d.removeProperties){Object.keys(d.removeProperties).forEach(i=>p.style.removeProperty(Be(i)));return}Object.entries(d).forEach(([i,l])=>{i=Be(i.trim()),l=l.trim();let u;if(/!important/.test(l)&&(l=l.slice(0,l.indexOf("!important")).trim(),u="important"),!CSS.supports(i,l))return console.error(`StylingFactory ${g} error: '${i}' with value '${l}' not supported (yet)`);Qe(()=>p.style.setProperty(i,l,u),`StylingFactory ${g} (setRule4Selector) failed`)})}function S(p,d,i=a){if(p=p?.trim?.(),!F(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${g} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(d.removeRule)return s(p);let l=r(p,!0),u=l||i.cssRules[i.insertRule(`${p} {}`,i.cssRules.length||0)];return m(()=>x(u,d),p,l)}function y(p){let d=p.trim().split(/{/,2),i=d.shift().trim();if(!F(i,String)||!i?.trim()?.length)return console.error(`StylingFactory ${g} (doParse): no (valid) selector could be extracted from rule ${pe(p)}`);let l=An(d.shift());return Qe(()=>S(i,l),`StylingFactory ${g} (setRules) failed`)}function c(p){let d=n(p);return d.done?d.existing:y(p)}function h(p,d){return p.trim().startsWith("@media")?c(Nn(p,d)):S(p,d)}return function(p,d={}){return o(p,d)&&(Object.keys(d).length?h(p,d):c(p))}}function $n({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(c){let h=document.querySelector(`#${c}`)?.sheet;if(h)return h;let p=Object.assign(document.createElement("style"),{id:c});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function a(c){return console.error(`StylingFactory ${r} [rule: ${c}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function s(c,h){return[...e.rules].find(p=>h?Ye(p.selectorText||"",c):Dn`${jn(c)}${[..."gim"]}`.test(p.cssText))}function m(c){return/^@charset|@import|namespace/i.test(c.trim())?a(c):c.match(/}/g)?.length>1?{existing:S(c,1),done:!0}:{done:!1}}function g(c){let h=[...e.cssRules].reduce((d,i,l)=>Ye(i.selectorText||"",c)&&d.concat(l)||d,[]),p=h.length;return h.forEach(d=>e.deleteRule(d)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${c} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${c} does not exist in ${r.slice(4)}`)}function x(c,h){return c&&F(c,String)&&c.trim().length>0&&F(h,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function S(c){c=c.trim();let h=c.slice(0,c.indexOf("{")).trim(),p=!!s(h);try{return e.insertRule(`${c}`,e.cssRules.length),p}catch(d){return console.error(`StylingFactory ${r} (tryParse) ${d.name} Error:
1
+ var{IS:b,maybe:K,$Wrap:Ao,isNothing:Vt,xProxy:_t,addSymbolicExtensions:Po}=Xt({useSymbolicExtensions:!1});function Xt(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=Gt(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function Gt(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=Kt(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function Kt(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(Vt(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||K({trial:v=>String(i)===t.NAN}),isInfinity:K({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:j,isNaN:W,isInfinity:J,shouldBeFirstElementIsNothing:B}=m(i,...l);switch(l=l.length&&l[0],!0){case B:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case W:return f?t.NAN:String(v)===String(i);case J:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case j===Boolean:return f?t.BOOLEAN:j===l;default:return S(i,l,f,x(i,j))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return K({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||b(i,1/0)||b(i,NaN):u,u}}var en=rn(),pe=tn(),_=nn();function tn(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function nn(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function rn(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var He={html:"innerHTML",text:"textContent",class:"className"},on=vn(),Y={},U={},Ke=e=>{console.error(`tinyDOM error: "${e}" is not a valid HTML tag`)},et=an();function an(){return Object.freeze(new Proxy(Y,tt()))}function tt(){return{get(e,t){let n=String(t);switch(!0){case n in e:return e[n];case gn(n):return We({tag:n,key:t});default:return We({tag:n,key:t,isError:!0})}},set(e,t,n){return t==="setError"&&typeof n=="function"&&(Ke=n),!0},enumerable:!1,configurable:!1}}function We({tag:e,key:t,custom:n,debug:r=!1,isError:o=!1}={}){let a=ln();if(o)return Object.defineProperty(a,e,{get(){return s=>Ke(t)??""}}),Je(a,e);if(e.includes("-")){let[s,m]=e.includes("-")?[e,xn(e)]:[Sn(e),e];U[s]=s,U[m]=s,n=m}return n&&Object.defineProperty(a,n,{get(){return Be(e)}}),Object.defineProperty(a,e,{get(){return Be(e)}}),Je(a,e)}function Je(e,t){return Y=Object.freeze(new Proxy(e,tt())),Y[Symbol.for.proxy]="Proxy (Object)",Y[t]}function ln(){return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(Y)))}function sn(e,t,n){return t=t?.isJQx&&t.node||(z(t,Number)?String(t):t),on({trial:r=>nt(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} not created, reason
2
+ `,r)})}function un(e,t,...n){let r=cn(t,e);return n?.forEach(o=>sn(r,o,e)),r}function cn(e,t){switch(e=Oe(t)?pn(e):e?.isJQx?e.node:e,!0){case z(e,String):return te(t,nt(e,t)?{html:e}:{text:e});case e instanceof Node:return mn(t,e);default:return te(t,e)}}function mn(e,t){let n=te(e);return n.append(t),n}function dn(e){if(Object.keys(e).length<1)return{assignable:{},specials:[...Array(3)]};let t=fn(e);return Object.keys(e).forEach(n=>{let r=n.toLowerCase();r in He&&(e[He[r]]=e[n])&&delete e[n]}),{assignable:e,specials:t}}function fn(e){if(e=z(e,Object)&&e||void 0,!e)return Array(3);let t=Object.entries(e.data??{}),n=Object.entries(e.attributes??{}),r=e.class?.split(/[ ,]/).map(o=>o.trim()).filter(o=>o.length>1);return delete e.data,delete e.attributes,delete e.class,[t,n,r]}function yn(e,t){let[n,r,o]=e;n?.length&&n.forEach(([a,s])=>t.dataset[a]=s),r?.length&&r.forEach(([a,s])=>t.setAttribute(a,s)),o?.forEach(a=>t.classList.add(a))}function te(e,t){t=t||{};let{assignable:n,specials:r}=dn(t),o=Object.assign(Oe(e)?new Comment:document.createElement(e),n);return yn(r,o),o}function pn(e){return e?.constructor===Comment?e?.textContent:String(e)}function nt(e,t){return!Oe(t)&&z(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function Oe(e){return/comment/i.test(e)}function gn(e){return hn(e)&&(e in U||!z(te(e),HTMLUnknownElement))}function hn(e){return e=e.toLowerCase(),typeof e=="string"&&e.length>0&&/^[a-z]/.test(e)&&/^[a-z0-9-]+$/gi.test(e)}function Be(e){return e=e in U?U[e]:e,(t,...n)=>un(e,t,...n)}function bn([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Sn(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function xn(e){return z(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${bn(t)}`||t).join(""):e}function vn(){let e=t=>{};return function({trial:t,whenError:n=e}={}){try{return t()}catch(r){return n(r)}}}function z(e,t){return t==null?!1:Object.prototype.toString.call(e).toLowerCase()===`[object ${Tn(t)}]`.toLowerCase()}function Tn(e){let t=e instanceof Function?String(e):"not a constructor";return t.slice(t.indexOf(" ")+1,t.indexOf("("))}var{IS:F,maybe:me,$Wrap:Lo,isNothing:wn,xProxy:ko,addSymbolicExtensions:Mo}=On({useSymbolicExtensions:!1});function On(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=$n(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function $n(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=Nn(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function Nn(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(wn(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||me({trial:v=>String(i)===t.NAN}),isInfinity:me({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:j,isNaN:W,isInfinity:J,shouldBeFirstElementIsNothing:B}=m(i,...l);switch(l=l.length&&l[0],!0){case B:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case W:return f?t.NAN:String(v)===String(i);case J:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case j===Boolean:return f?t.BOOLEAN:j===l;default:return S(i,l,f,x(i,j))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return me({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||F(i,1/0)||F(i,NaN):u,u}}var rt=jn;function jn({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:a,removeRules:s,consider:m,currentSheetID:g}=En({styleSheet:e,createWithId:t});function x(p,d){if(p&&d.removeProperties){Object.keys(d.removeProperties).forEach(i=>p.style.removeProperty(Qe(i)));return}Object.entries(d).forEach(([i,l])=>{i=Qe(i.trim()),l=l.trim();let u;if(/!important/.test(l)&&(l=l.slice(0,l.indexOf("!important")).trim(),u="important"),!CSS.supports(i,l))return console.error(`StylingFactory ${g} error: '${i}' with value '${l}' not supported (yet)`);Ye(()=>p.style.setProperty(i,l,u),`StylingFactory ${g} (setRule4Selector) failed`)})}function S(p,d,i=a){if(p=p?.trim?.(),!F(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${g} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(d.removeRule)return s(p);let l=r(p,!0),u=l||i.cssRules[i.insertRule(`${p} {}`,i.cssRules.length||0)];return m(()=>x(u,d),p,l)}function y(p){let d=p.trim().split(/{/,2),i=d.shift().trim();if(!F(i,String)||!i?.trim()?.length)return console.error(`StylingFactory ${g} (doParse): no (valid) selector could be extracted from rule ${ge(p)}`);let l=kn(d.shift());return Ye(()=>S(i,l),`StylingFactory ${g} (setRules) failed`)}function c(p){let d=n(p);return d.done?d.existing:y(p)}function h(p,d){return p.trim().startsWith("@media")?c(Dn(p,d)):S(p,d)}return function(p,d={}){return o(p,d)&&(Object.keys(d).length?h(p,d):c(p))}}function En({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(c){let h=document.querySelector(`#${c}`)?.sheet;if(h)return h;let p=Object.assign(document.createElement("style"),{id:c});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function a(c){return console.error(`StylingFactory ${r} [rule: ${c}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function s(c,h){return[...e.rules].find(p=>h?Ue(p.selectorText||"",c):An`${In(c)}${[..."gim"]}`.test(p.cssText))}function m(c){return/^@charset|@import|namespace/i.test(c.trim())?a(c):c.match(/}/g)?.length>1?{existing:S(c,1),done:!0}:{done:!1}}function g(c){let h=[...e.cssRules].reduce((d,i,l)=>Ue(i.selectorText||"",c)&&d.concat(l)||d,[]),p=h.length;return h.forEach(d=>e.deleteRule(d)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${c} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${c} does not exist in ${r.slice(4)}`)}function x(c,h){return c&&F(c,String)&&c.trim().length>0&&F(h,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function S(c){c=c.trim();let h=c.slice(0,c.indexOf("{")).trim(),p=!!s(h);try{return e.insertRule(`${c}`,e.cssRules.length),p}catch(d){return console.error(`StylingFactory ${r} (tryParse) ${d.name} Error:
4
4
  ${d.message}
5
- Rule: ${pe(c)}
5
+ Rule: ${ge(c)}
6
6
  ${n}`),p}}function y(c,h,p){try{return c(),p}catch(d){return console.error(`StylingFactory ${r} (tryAddOrModify) ${d.name} Error:
7
7
  ${d.message}
8
- Rule: ${pe(h)}
9
- ${n}`),p}}return{sheet:e,removeRules:g,tryParseAtOrNestedRules:m,ruleExists:s,checkParams:x,tryParse:S,consider:y,currentSheetID:r}}function Nn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${En(r)}`)}`}function pe(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function En(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
- `)}function jn(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function Dn(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,a)=>r.concat(t[a-1]||"").concat(o),"")||e.raw.join("")).split(`
11
- `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function Be(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Qe(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function In(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
8
+ Rule: ${ge(h)}
9
+ ${n}`),p}}return{sheet:e,removeRules:g,tryParseAtOrNestedRules:m,ruleExists:s,checkParams:x,tryParse:S,consider:y,currentSheetID:r}}function Dn(e,t){return`${e.trim()} ${Object.entries(t).map(([n,r])=>`${n}: { ${Cn(r)}`)}`}function ge(e){let t=(e||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return e.length>t.length?`${t.trim()}...truncated`:t}function Cn(e){return Object.entries(e).map(([t,n])=>`${t}: ${n.trim()}`).join(`;
10
+ `)}function In(e){return e.replace(/([*\[\]()-+{}.$?\\])/g,t=>`\\${t}`)}function An(e,...t){let n=t.length&&Array.isArray(t.slice(-1))?t.pop().join(""):"";return new RegExp((t.length&&e.raw.reduce((r,o,a)=>r.concat(t[a-1]||"").concat(o),"")||e.raw.join("")).split(`
11
+ `).map(r=>r.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),n)}function Qe(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Ye(e,t){try{return e()}catch(n){console.error(`${t||"an error occured"}: ${n.message}`)}}function Pn(e){return e.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(t,n)=>`${n}\\3b`).split(";").map(t=>t.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function Cn(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function An(e){return Cn(In(e))}function Ye(e,t){return e?.replace("::",":")===t?.replace("::",":")}var ge=!1,Pn={on:()=>ge=!0,off:()=>ge=!1},q={tagsRaw:_,allowUnknownHtmlTags:Pn,isAllowed(e){if(ge)return!0;let t=b(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!_[t]},allowTag:e=>_[e.toLowerCase()]=!0,prohibitTag:e=>_[e.toLowerCase()]=!1},Ln=!0,X={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function kn(e){if(Ln&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${te(r)} => ${o}`],[]).join("\\000A");N.error(`JQx: HTML creation error(s): ${t}`)}}function Mn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||q.isAllowed(t)}function Oe(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return b(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&Oe(n),n?.attributes){let r=b(n,SVGElement)?ye.svg:ye.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let a=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(X.whiteSpace,""),m=a==="href"?!X.validURL.test(s):X.notAllowedValues.test(s),g=a.startsWith("data")?!X.data.test(a):!!r[a];if(m||g){let x=qe(o.value||"none",60);x+=x.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${x}`,n.removeAttribute(o.name)}})}if(!(Mn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=qe(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),kn(t),e}function Fn(e){let t=document.createElement("div");return t.insertAdjacentHTML(I.end,e),t.childNodes.length?Oe(t):void 0}function Zn(e,t,n){switch(!0){case b(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case b(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function he(e=[],t=document.body,n=I.BeforeEnd){return n=n||I.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let a=Z(o)&&zn(o,t,n);return a?[...r,a]:r},[])}function zn(e,t=document.body,n=I.BeforeEnd){return n=n||I.BeforeEnd,t=t?.isJQx?t?.[0]:t,b(e,Comment,Text)?Zn(e,t,n):b(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function M(e){if(b(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||b(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Fn(e);return r.childNodes.length<1?M(`<span data-jqxcreationerror="1">${it(e,60)}</span>`):r.children[0]}function Rn(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...en);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:c,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:a,remove:s,removeModal:y});function a(d){if(r.open)switch(!0){case m(d):return;default:return s(),setTimeout(()=>a(d),200)}o={...d};let{content:i}=o;return e.IS(i,String,HTMLElement)||i?.isJQx?g():!0}function s(){return o.modal?p(o.warnMessage):x()}function m(d){for(let[i,l]of Object.entries(o))if(l!==d[i])return!1;return!0}function g(){n.clear();let{content:d,modal:i,closeAfter:l}=o;i=e.IS(i,Boolean)?i:!1;let u=i?"":e.div({id:"closeHandleIcon"});n.append(u,e.IS(d,String)?e.div(d):d),r.showModal(),!i&&e.IS(l,Number)&&h(s,l)}function x(){if(r.close(o.returnValue),S(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function S(){t.forEach(d=>clearTimeout(d)),t=[]}function y({callback:d,value:i}={}){o.returnValue=i,o.modal=!1,o.callback=d||o.callback,s()}function c({evt:d}){if(!(Object.keys(o).length<1||!r.open)&&(d.type==="cancel"&&o.modal&&d.preventDefault(),d.target.closest("#closeHandleIcon")||!d.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function h(d,i){e.IS(d,Function)&&e.IS(i,Number)&&i>0&&(S(),t.push(setTimeout(d,i*1e3)))}function p(d){if(!e.IS(d,String,HTMLElement,Proxy))return;let i=n.find$(".warn");switch(!0){case i.is.empty:i=e.div({class:"warn"},d);default:n.append(i.addClass("active")),h(()=>n.find$(".warn").removeClass("active"),2)}}}function Hn(e){let t={},n="anonymous_";function r(S){if(S){let{handler:y,capture:c,type:h}=S;document.addEventListener(h,y,{capture:c})}}function o(S){if(S){let{type:y,handler:c,capture:h}=S;document.removeEventListener(y,c,{capture:h})}}function a(S,y,c,h){return function(p){if(!$(y))return S({evt:p});let d=p.target.closest(y);if(d){let i=e(d);S({self:i,me:i,evt:p}),c&&g(p.type,h)}return!0}}function s(S){return t[S]=t[S]||{},t[S]}function m(S,y){return Object.entries(s(S)).find(([c])=>c===y)}function g(S,y){let c=m(S,y);c&&(o(c[1]),delete t[S][y],delete be[y],N.warn(`Removed listener [${y}] for event type [${S}].`))}function x(S){let{type:y,handler:c,name:h,capture:p,once:d,selector:i,node:l,about:u}=S;t[y]=t[y]||{};let f=Yn(h||c.name),v=c;if(l instanceof HTMLElement){let E=l.dataset.hid||f;l.dataset.hid=E,i=`[data-hid=${E}]`}switch(!0){case!t[y][f]:return N.log(`JQx: created listener for event type ${y}, with handler name ${f}`),t[y][f]={name:f,handler:a(c,i,d,f),capture:qn(y,p),once:!!d,type:y,initialHandler:v,selector:!!i&&i||!1,about:!!u&&u||!1,unListen(){g(y,f)}},t[y][f];default:return console.warn(`The listener [${f}] for [${y}] exists, it is not re-assigned.`)}}return{remove(...S){return g(...S)},listen:function(S){let{type:y,handler:c}=S;if(!$(y)||!b(c,Function))return;let h=x(S);if(h)return r(h),{type:y,name:h.name,unListen(){g(y,h.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var N=Vn(),Wn=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],I=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(e,t){return e[String(t).toLowerCase()]??e[t]}})),Jn=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Bn=Object.freeze({get(e,t){return e[$e(t)]||e[t]},enumerable:!1,configurable:!1}),be={};Vt.custom();function Qn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Yn(e){return $(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():rt()}function Un(e){let t=!!e.node&&!b(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function rt(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return be[t]?rt():(be[t]=t,t)}function qn(e,t){return!!Wn.find(n=>n===e)||!!t}function ot(e){return e.startsWith("data")||ye.html.find(t=>e.toLowerCase()===t)}function Ue(e){return e&&(e.textContent="")}function Se(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?Se(e,t,n):t}function $(e,t=1){return t=b(t,Number)&&t||1,b(e,String)&&e.length>=t}function qe(e,t=120){return it(e,t).replace(/&lt;/g,"<")}function it(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function te(e){switch(!0){case b(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function me(e){return b(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function Vn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function a(){t=!1}function s(...x){return n.unshift(...x.map(S=>`${de()} \u2A3B ${me(S)}`)),console.error(n.slice(0,x.length).join(`
14
- `)),r}function m(...x){return n.unshift(...x.map(S=>`${de()} \u26A0 ${me(S)}`)),console.warn(n.slice(0,x.length).join(`
15
- `)),r}function g(...x){let S=x.map(y=>`${de()} \u2714 ${me(y)}`);switch(!t&&n.unshift(...S),e){case!0:console.log(S.join(`
16
- `));default:return r}}return Object.defineProperties(r,{log:{value:g,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:m,enumerable:!1}}),Object.freeze(r)}function de(){return(e=>`[${G(e.getHours())}:${G(e.getMinutes())}:${G(e.getSeconds())}.${G(e.getMilliseconds(),3)}]`)(new Date)}function _n(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=C(n),n.startsWith("data"))return at(e,r);b(r,String)&&ot(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function at(e,t){if(e&&b(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${C(n)}`,r)}function lt(e){return e?b(e,Proxy)?[e.EL]:b(e,NodeList)?[...e]:Z(e)?[e]:je(e)?e:e.isJQx?e.collection:void 0:[]}function B(e,t,n=!0,...r){if(e.is.empty)return N.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."),e;if(r=r.map(o=>o.isJQx?o.node:b(o,String)?t(o).node??o:o),r.find(o=>!b(o,String,Element))){let o=n?"after":"before";return N.log(`[JQx instance].[${o}(Me)]: invalid/-sufficient input.`),e}return e.node[n?"after":"before"](...r),e}function Z(e){return b(e,Text,HTMLElement,Comment)}function fe(e,t){if(b(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(C(n),r,o)}}function k(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function Xn(e){if(!b(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),a=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,m=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,g=+n.opacity==0||+(t.opacity||1)==0;return!(a||m||g||o||r||s)}function Gn(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function Kn(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(ut(n)?`<!--${n.data}-->`:Ne(n)?n.textContent:n.outerHTML),"")}function G(e,t=2){return`${e}`.padStart(t,"0")}function er(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function st(){return`_${or(Jn).slice(0,8).join("")}`}function tr(e){return e=b(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,b(e,Array)?e:b(e,String)&&e?.trim().toLowerCase()||""}function nr(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function rr(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function or(e){let t=e.length;for(;t--;){let n=er(t);[e[t],e[n]]=[e[n],e[t]]}return e}function $e(e){return b(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${ir(t)}`||t).join(""):e}function C(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function ir([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function Ne(e){return b(e,Comment,Text)}function ut(e){b(e,Comment)}function ar(e){return b(e,Text)}function Ee(e){return b(e,String)&&/^<|>$/.test(`${e}`.trim())}function je(e){return b(e,Array)&&!e?.find(t=>!Z(t))}function ct(e){return b(e,Array)&&!e?.find(t=>!Ee(t))}function T(e,t){let n=e.collection.filter(r=>!Ne(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function lr(e){return e.node?b(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function mt(e,t,n){let r=t!==document.body&&b(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{N.warn(`JQx: Invalid CSS querySelector. [${b(e,String)?e:"Not a string!"}]`)}}function sr(){return{isCommentOrTextNode:Ne,isNode:Z,isComment:ut,isText:ar,isHtmlString:Ee,isArrayOfHtmlElements:je,isArrayOfHtmlStrings:ct,ElemArray2HtmlString:Kn,input2Collection:lt,setCollectionFromCssSelector:mt,cssRuleEdit:nt({createWithId:"JQxStylesheet"})}}function ur(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return b(n,Node)?Object.freeze({get writable(){return Gn(n)},get modal(){return nr(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Xn(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function cr(e,t,n,r){n&&b(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${st().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var mr=ur();function dr(e){return{factoryExtensions:fr(e),instanceExtensions:yr(e)}}function fr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Bn)},set(n={}){if(!t.is.empty&&b(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&b(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${C(n)}`),t}}},dimensions(t){if(t.is.empty)return N.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=Se(n,0),r.scrollLeftDistance=Se(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?te(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let a=b(n,String);return n=a&&o?te(n):n,a&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return mr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[C(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=b(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&b(r,String)?[r]:r,n=n&&b(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let a of n)t.addClass(a);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function yr(e){return{addClass(t,...n){return T(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after(t,...n){return B(t,e,!0,...n)},afterMe(t,...n){return B(t,e,!0,...n)},andThen(t,...n){return B(t,e,!0,...n)},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&$(o)){let a=o.trim(),s=/^<(.+)[^>]+>$/m.test(a)?M(o):e.text(o);T(t,m=>m.append(r?s:k(s)))}Z(o)&&T(t,a=>a.append(r?o:k(o))),o.isJQx&&!o.is.empty&&T(t,a=>o.collection.forEach(s=>a.append(r?s:k(s))))}return t},appendTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||b(t.node,Text,Comment))return t;if(!r&&$(n))return n=C(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if($(n)&&r)switch(n=C(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return b(n,Object)&&!t.is.empty&&_n(t.node,n),t},before(t,...n){return B(t,e,!1,...n)},beforeMe(t,...n){B(t,e,!1,...n)},clear(t){return T(t,Ue)},closest(t,n){let r=$(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return T(t,o=>cr(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return N.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(a=>{a.removeAttribute&&a?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return T(t,n)},empty(t){return T(t,Ue)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return T(t,n=>fe(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!$(n)):return"";case!$(n):return t.node?.getHTML()??"";default:let o=M(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return T(t,a=>(a.textContent=r?a.textContent:"",a.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!$(n)||!$(r))return t;let a=t.find$(n);if(a.length<1)return t;let s=M(`<span>${r}</span>`);return a.each(m=>{o||(m.textContent=""),m.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if($(o)){o=o.trim();let a=/^<(.+)[^>]+>$/m.test(o)?M(o):e.text(o);a=r?a:k(a),T(t,s=>s.prepend(a.cloneNode(!0)))}Z(o)&&T(t,a=>a.prepend(r?o:k(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(t,a=>T(o,s=>a.prepend(r?s:k(s)))),o.collection.reverse())}return t},prependTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).prepend(t),t}},prop(t,n,r){if(b(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=b(n,Object)?n:{[n]:r};for(let[a,s]of Object.entries(o)){if(a=a.trim(),s&&!ot(a)||!s)return!1;if(a.toLowerCase()==="id")return t[0].id=s;T(t,m=>{if(a.startsWith("data"))return m.dataset[a.slice(a.indexOf("-")+1)]=s;m[a]=s})}return t},remove(t,n){let r=a=>a.remove(),o=()=>t.collection=t.collection.filter(a=>document.documentElement.contains(a));if(n){let a=t.find$(n);return a.is.empty||(T(a,r),o()),t}return T(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return T(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=b(n,HTMLElement)||n.isJQx?n:document.body,r=b(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!b(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||b(r,NodeList))&&(r=r[0]),o&&n&&(n=b(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,b(n,HTMLElement,NodeList,Array)&&b(r,HTMLElement)&&(b(n,HTMLElement)?[n]:[...n]).forEach(a=>a.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return T(t,o=>{o.classList.remove(n);for(let a of r)o.classList.add(a)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=b(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return T(t,r=>at(r,n))},show(t){return T(t,n=>fe(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&b(n,String)):return t.find$(n);case(r&&b(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return T(t,o=>{r&&b(n,String)&&(n={[n]:r||"none"}),fe(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!b(n,String):return t.node.textContent;default:return T(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=I.BeforeEnd){return t.isVirtual=!1,he(t.collection,n,r),t},toggleClass(t,n){return T(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){r=b(r,Function)?r:Event,o=b(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let a=new r(n,o);return t.is.empty||t.each(s=>s.dispatchEvent(a)),t},val(t,n){switch(!0){case(t.is.empty||!b(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!b(n,String):return t.node.value;default:return t.node.value=b(n,String)?n:"",t}}}}var xe,ne,{isComment:Po,isText:Lo,isHtmlString:ko,isArrayOfHtmlElements:Mo,isArrayOfHtmlStrings:Fo,ElemArray2HtmlString:Zo,cssRuleEdit:ve,addFn:pr}=gr();function gr(){return{...sr(),addFn:hr}}function hr(e,t){return e=e?.trim(),!$(e)||!b(t,Function)?N.error("JQx.fn: method invalid parameter(s)"):(ne[e]=(n,...r)=>t(n,...r),N.log(`JQx: added extension function [${e}]`))}function br(e){return function(t,n,r){if(t=t?.trim(),!$(t)||!b(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...a){return n(...a)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return N.log(`JQx: added static extension function [${t}]`)}}function K(e){return new Proxy(e,Object.freeze({get:(t,n)=>Sr(t,n,e)}))}function Ve(e,t){return(...n)=>b(e,Function)&&e(K(t),...n)}function Sr(e,t,n){switch(!0){case b(t,Symbol):return Q({trial:()=>e[t],whenError:()=>e});case b(+t,Number):return e.collection?.[t]||void 0;case t in xe:return Ve(xe[t],n)();case t in ne:return Ve(ne[t],n);default:return e[t]}}function xr(e){let t=$r(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function vr(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?$e(t):t.toLowerCase(),q.allowTag(t),Object.defineProperties(e,Te(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),q.prohibitTag(t),Object.defineProperties(e,Te(t,!1,e))}}}function _e(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))ve(t,{removeRule:1})}function Tr(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(I).find(a=>r===a);let o=e(t,document.createElement("br"));if(n&&!b(n,HTMLBRElement))for(let a of o.collection)r?n.insertAdjacentElement(r,a):n.append(a);return o}}function wr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,a]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...a,enumerable:!1})}return t}function Or(e,t,n,r){return e=C(r||e.toLowerCase()),{get(){return(...o)=>{let a=t&&n.virtual(Oe(Ke[e](...o)))||void 0,s=b(a?.node,Comment,Text,void 0)?"":Un(a);return N.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),a}},enumerable:!1,configurable:!0}}function Te(e,t,n,r){e=e.toLowerCase();let o=Or(e,t,n,r);return r?{[r]:o,[$e(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function $r(e){return wr(Object.entries(q.tagsRaw).reduce(Nr(e),{}),Ar(e))}function Nr(e){return function(t,[n,r]){return Object.defineProperties(t,Te(n,r,e)),t}}function Er(e){return function(t,n,...r){b(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function jr(e){return function(t){let{type:n,types:r,origin:o,selector:a,handler:s,handlers:m,node:g,name:x,capture:S,once:y,about:c}=t;s=m||s,n=r||n,a=o||a;let h=tr(n),p=x;s=b(s,Function)?[s]:s;let d={type:h,selector:a||o,capture:S,name:p,once:y,node:g,about:c};switch(!0){case(b(h,Array)&&h.length>0):for(let i of h)d.type=i,Xe(s,d,e);break;default:return Xe(s,d,e)}}}function Xe(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Dr(e){return function(t,n){return n=$(n)&&n,t=$(t)&&t,n&&t&&e.listenerStore[t][n]}}function Ir(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:Rn(e),enumerable:!1}),e.activePopup}function Cr(e){let t=(m,g)=>ve(m,g),n=function(m){return nt({createWithId:m||`jqx${st()}`})},r=function(...m){for(let g of m)ve(g)},o=vr(e),a=Hn(e),s=jr(a);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...m)=>N.on.log(...m).off,warn:(...m)=>N.on.warn(...m).off,error:(...m)=>N.on.error(...m).off,handlerWrapper:a}}function Ar(e){let{factoryExtensions:t,instanceExtensions:n}=dr(e);xe=t,ne=n;let{editCssRule:r,createStyle:o,editCssRules:a,allowProhibit:s,handle:m,capturedHandling:g,log:x,warn:S,error:y,handlerWrapper:c}=Cr(e),h=Dr(e),p=br(e);return Ke.setError=d=>(y(`JQx direct element creation error: [${d}] is not a valid tag`),e.br()),{log:x,warn:S,error:y,editCssRules:a,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:te,logger:N,text(d,i=!1){return i?e.comment(d):document.createTextNode(d)},node(d,i=document){return i.querySelector(d,i)},nodes(d,i=document){return[...i.querySelectorAll(d,i)]},clearAllTimers:Qn,get staticFn(){return function(d,i,l){return p(d,i,l)}},get toBool(){return rr},get getNamedListener(){return h},get virtual(){return Tr(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return _e},get removeCssRules(){return _e},get delegate(){return Er(g)},get delegateCaptured(){return g},get handle(){return g},get listen(){return c.listen},get at(){return I},get setStyle(){return r},get fn(){return pr},get lenient(){return q.allowUnknownHtmlTags},get IS(){return b},get Popup(){return Ir(e)},get listenerStore(){return c.ListenerStore}}}var Pr=xr(Lr());function Lr(){return function(e,t,n=I.BeforeEnd){if(e?.isJQx)return e;let r=b(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(I).find(g=>n===g)?n:void 0;let o=Ee(e),a=!o&&ct(e)||o,s={collection:lt(e)??[],isVirtual:r,isJQx:!0},m=je(s.collection);if(s.collection.length&&m)return r||s.collection.forEach(g=>{t.contains(g)||he([g],t,n)}),K(s);if(a){if([e].flat().forEach(g=>s.collection.push(M(g))),s.collection.length>0){let g=s.collection.filter(y=>y?.dataset?.jqxcreationerror);s.collection=s.collection.filter(y=>!y?.dataset?.jqxcreationerror);let x=s.collection.map(y=>`${String(y.constructor).split(/function|\(/)[1].trim()}`).length>1;s=K(s);let S=s.collection.length>0?lr(s):"sanitized: no elements remaining";N.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${x?"array of ":""}HTML string${x?"s":""} ${S}`),s.isVirtual||he(s.collection,t,n)}return s}return mt(e,t,s),K(s)}}var A=Pr;var le=kr();function kr(){let[e,t,n,r]=["2-digit","numeric","long","short"],o={fixed:{MM:{month:n},M:{month:r},m:{month:t},mm:{month:e},yyyy:{year:t},yy:{year:e},WD:{weekday:n},wd:{weekday:r},d:{day:t},dd:{day:e},h:{hour:t},hh:{hour:e},mi:{minute:t},mmi:{minute:e},s:{second:t},ss:{second:e},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:c=>({timeZoneName:c.slice(4)}),hrc:c=>({hourCycle:`h${c.slice(4)}`}),ds:c=>({dateStyle:c.slice(3)}),ts:c=>({timeStyle:c.slice(3)}),tz:c=>({timeZone:c.slice(3)}),e:c=>({era:c.slice(2)}),l:c=>({locale:c.slice(2)})}},a={...o,retrieveDyn(c){let h=c?.slice(0,c.indexOf(":"));return o.dynamic[h]&&o.dynamic[h](c)},get re(){return new RegExp(`\\b(${Object.keys(o.fixed).join("|")})\\b`,"g")}},s=(c="dtf",h=0)=>{let p=` ${c.replace(/(?<=\{)(.+?)(?=})/g,i=>`[${h++}]`).replace(/[{}]/g,"").trim()} `,d=c.match(/(?<=\{)(.+?)(?=})/g)||[];return{get texts(){return d},formatString(i){p=i},set formatStr(i){p=i},get formatStr(){return p},get units(){return p.match(a.re)||[]},finalize(i="",l="",u="",f=""){return p.replace(/~([\d+]?)/g,"$1").replace(/dtf/,i).replace(/era/,u).replace(/dp\b|~dp\b/,l).replace(/yn\b/,f).replace(/\[(\d+?)]/g,(v,E)=>d[E].trim()).trim()}}},m=c=>c.replace(/\s+/g,""),g=(...c)=>c?.reduce((h,p)=>({...h,...a.retrieveDyn(p)||a.fixed[p]}),a.fixed.dl),x=(c,h,p)=>{let d=g(...m(p).split(",")),i=Intl.DateTimeFormat(d.locale,d).format(c);return h.finalize(i)},S=(c,h,p,d)=>c.toLocaleString(h,{timeZone:p,month:d?r:n}),y=(c,h,p)=>{let d=g(...h.units.concat(m(p).split(",")).flat()),i={...a.fixed},l=(f,v)=>d[f]==="numeric"&&v.startsWith("0")?v.slice(1):v,u=Intl.DateTimeFormat(d.locale,d).formatToParts(c).reduce((f,v)=>v.type==="literal"&&/[ ,/-]/.test(v.value)?f:{...f,[v.type]:l(v.type,v.value)},{});return i.ms=d.fractionalSecondDigits?i.msp:i.ms,i.yyyy=u.relatedYear?i.ry:i.yyyy,h.formatStr=h.formatStr.replace(a.re,f=>/^(M|MM)$/.test(f)?S(c,d.locale,d.timeZone,/^M$/.test(f)):u[Object.keys(i[f]).shift()]||f),h.finalize(void 0,u.dayPeriod,u.era,u.yearName)};return(c,h,p="l:default")=>/ds:|ts:/.test(p)?x(c,s(void 0),p):y(c,s(h||void 0),p)}var Mr=Fr;function Fr(){let e=(r,o)=>{let a=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[m,g,x]=Array(3).fill("end date not valid");return{error:!0,message:m,full:g,clean:x}}if(a){let[m,g,x]=Array(3).fill("start date not valid");return{error:!0,message:m,full:g,clean:x}}if(a&&!s){let[m,g,x]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:m,full:g,clean:x}}return{error:!1}},t=n();return function({start:r,end:o,diffs:a={}}={}){let s=e(r,o),m=o>r?"+":"-";if(s.error)return s;let g=Math.abs(r-o),x=new Date(g),S=x.getUTCFullYear()-1970,y=x.getUTCMonth(),c=x.getUTCDate()-1,h=c%7,p=Math.floor(c/7),d=x.getUTCHours(),i=x.getUTCMinutes(),l=x.getUTCSeconds(),u=x.getUTCMilliseconds(),f=Math.floor(g/864e5);a={...a,fromUTC:r,toUTC:o,sign:"",years:S,months:y,days:c,hours:d,minutes:i,seconds:l,milliseconds:u,diffInDays:f},a.full=t({values:a,full:!0}),a.clean=t({values:a}),a.equalDates=a.clean==="Dates are equal";let v=d+i+l>0?"T":"";return a.clean!=="Dates are equal"&&(a.sign=m,a.jsPeriod=`${m}P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${p>0?`${p}W`:""}${h>0?`${h}D`:""}${v}${d>0?`${d}H`:""}${i>0?`${i}M`:""}${l>0?`${l}S`:""}`,a.ISOPeriod=`P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${c>0?`${c}D`:""}${v}${d>0?`${d}H`:""}${i>0?`${i}M`:""}${l>0?`${l}S`:""}`),a};function n(){let r=(...a)=>s=>a.reduce((m,g)=>g(m),s),o=(a,s)=>a===1?s.slice(0,-1):s;return r(({values:a,full:s})=>[Object.entries(a).filter(([m])=>/^(years|month|days|hours|minutes|seconds)/i.test(m)),s],([a,s])=>s?a:a.filter(([,m])=>s?+m:m>0),a=>a.reduce((s,[m,g])=>[...s,`${g} ${o(g,m)}`],[]),a=>a.length<1?"Dates are equal":`${a.slice(0,-1).join(", ")}${a.length>1?" and ":""}${a.slice(-1).shift()}`)}}var Zr=zr;function zr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,a])=>({...r,[o]:a,[`${o}s`]:a}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(a=>a.trim()):r.filter(a=>!a.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(a=>a.trim())),r.map(function(a){if(!a)return!1;let s=a.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(m=>{m=`${m}`.trim().replace(/[^a-z0-9-+]/g,"");let g=parseInt(m,10);return Number.isNaN(g)?m:t?-g:+g})}).filter(a=>a)};return function(r,...o){if(o.length<1)return r;let a=n(...o);return a.length&&a.forEach(([s,m])=>{m=m,m=e[m],s&&m&&r[`set${m}`](r[`get${m}`]()+s)}),r}}var jt=Mr(),Dt=_r(),P=Zr(),Rr=["sun","mon","tue","wed","thu","fri","sat"],It=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function dt(e,t=!1){let n=e.month+1,r=e.month;if(e.month+=t?-1:1,!t&&e.month>=n)for(;e.month>n;)e.dateNr-=1;if(t&&e.month===r)for(;e.month>=r;)e.dateNr-=1;return e}function ft(e,...t){return P(e,...t),e}function Hr(e,t=!1){let n=Ct(e.clone,{sunday:t}),r=[n];return{weekStart:n.format("WD","l:en-GB"),inputDate:e,dates:r.concat([...Array(6)].map((o,a)=>n.clone.addDays(a+1)))}}function De(e,{start:t,end:n,future:r,past:o,include:a={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?w(t?.value||t).UTC:w.now.UTC,n=n&&n?.value||n?.constructor===Date?w(n?.value||n).UTC:w.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(a.start?+s>=+t:+s>+t)&&(a.end?+s<=+n:+s<+n)}function yt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):O.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=O),le(e,n,r)):Wr(e,n,r)}function Wr(e,t,n){let r=e.clone.relocate(O);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,le(r,t,n)}function Jr(e,t){let n=jt({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function pt(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:O,o=Jt(n,r),a=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:a[0],dayName:a[1],dayNames:Ht(n),monthNames:Le(n)}}function gt(e,t=!1){let[n,r,o,a]=Ie(e,t),s={values4Timezone:t?O.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:a};return Object.freeze(s)}function Ie(e,t=!1){let n=`l:en-CA,${t?`tz:${O.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function ht(e,t){let n=t?`tz:${O.timeZone}`:`,tz:${e.timeZone}`,[r,o,a]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?O.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:a})}function bt(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Br(e){let t=new Intl.Locale(e.locale),n=t.weekInfo?t.weekInfo.firstDay:t.getWeekInfo?t.getWeekInfo().firstDay:1;return n=n===7?0:n,It[n]}function Ct(e,{sunday:t=!1}={}){let n=t?"sunday":Br(e);return Ce(e,{day:n,preserveTodayWhenEqual:!0})}function Qr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=Ae(n.slice(0,3)+":"+n.slice(-2),!0),r=Ae(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function At({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=w(t,{timeZone:e.timeZone})),e=w(Tt(e,e.timeZone),{timeZone:e.timeZone}),t=w(Tt(t,t.timeZone),{timeZone:t.timeZone});let n=jt({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=Qr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[a,s]=r.map(x=>Math.abs(x)),[m,g]=[`${a} ${se(a,"hour")}`,`${s} ${se(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||a+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${m}${s>0?` and ${g}`:""} ${o} ${t.timeZone}`,n}function St(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):w(e.value,{timeZone:t.timeZone||O.timeZone});let n=At({start:e.clone,end:t}),r=`${n.sign}${xt(n.hours)}:${xt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Yr(r)} ${e.timeZone}`}}function xt(e,t=2){return`${e}`.padStart(t,"0")}function se(e,t){return`${t}${e>1||e===0?"s":""}`}function Yr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=se(n,"hour"),a=se(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${a} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function vt(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function Ur(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?vt(e,t,$D.localeInformation.formatOptions):vt(e,t,n);let o=e.clone.relocate({locale:"en"}),a=r?O.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",a+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,a+",tzn:long, hrc:23")}function Pt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:O.timeZone,weekday:"short"});return Dt(n.format(e))}function qr(e){let t=O,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),a=r.offsetFrom(e),s=t,m=n,g=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),x=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),S={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:x,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(S.locales.remote={locale:m.locale,timeZone:m.timeZone},S.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Pt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:g,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:a.offset,string:e.toString()},S.offset.fromUserTime=a.offsetText),S}function re(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function Lt(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function kt(e,t){t=j({locale:t||e.localeInfo.locale}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(Lt(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function Ce(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=Dt(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let a=n?1:-1,s=w(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:Vr(s.addDays(n?1:-1),o,a)}function Vr(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function oe(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function Tt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function V(e,{year:t,month:n,date:r}={}){return D(t)&&e.setFullYear(parseInt(t)),D(r)&&e.setDate(parseInt(r)),D(n)&&e.setMonth(parseInt(n)),e}function z(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return D(t)&&e.setHours(parseInt(t)),D(n)&&e.setMinutes(parseInt(n)),D(r)&&e.setSeconds(parseInt(r)),D(o)&&e.setMilliseconds(parseInt(o)),e}function Mt(e){return e?.constructor===Date||e?.value}function wt(e,t){return Mt(t)?w(t?.value||t,e.localeInfo):w.from(...e.dateTimeValues).relocate(e.localeInfo)}function _r(){return function(e){e=`${e}`.toLowerCase();let t=Rr.indexOf(e);return t<0?It.indexOf(e):t}}function Ae(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function Xr(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function Ot(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Ft(e,t){t=t||e?.timeZone||O.timeZone,e=e?.value?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t});let n=e.year||e.getFullYear(),r=Ot(new Date(n,0,1),t),o=Ot(new Date(n,5,1),t);return r!==o}function Zt(e,t){return t=t||e?.timeZone||O.timeZone,e=e?.hasDST?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function Gr(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=j({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function Kr(e,t){return Mt(t)&&(e=w(t.value||t,t.localeInfo||e.localeInfo)),e}function Pe(e,t){let n=zt(new Date(e,11,t||31));return n===1?Pe(e,(t||31)-1):n}function $t(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function zt(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Rt=eo;function eo({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...a){return ft(r,...a)},between({start:a,end:s,include:m}={}){return De(r,{start:a,end:s,include:m})},cloneWith(a){return wt(r,a)},daysUntil(a){return Jr(r,a)},differenceTo(a){return At({start:r,end:a})},differenceUntil(a){return r.differenceTo(a).clean},firstWeekday({sunday:a=!1,midnight:s=!1}={}){return Ct(r,{sunday:a,midnight:s})},format(a,s){return yt(r,{formatStr:a,moreOptions:s})},fullMonth(a){return kt(r,a)},fullWeek(a=!1){return Hr(r,!!a)},isFuture(a){return De(r,{start:r,end:a,future:!0})},isPast(a){return De(r,{start:r,end:a,past:!0})},next(a,s){return Ce(r,{day:a,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(a){return St(r,a)},previous(a,s){return Ce(r,{day:a,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:a,timeZone:s,l:m,tz:g}={}){return Gr(r,{locale:a,timeZone:s,l:m,tz:g})},revalue(a){return r=Kr(r,a),r},setDateValues({year:a,month:s,date:m}={}){return V(r,{year:a,month:s,date:m})},setTimeValues({hours:a,minutes:s,seconds:m,milliseconds:g}={}){return z(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},subtract(...a){return ft(r,"subtract,"+a.join(","))},toArray(a=!1){return re(r,a)},toString({template:a,formatOptions:s,local:m}={}){return Ur(r,{withFormat:a,withFormatOptions:s,local:m})},values(a=!1){return a?r.dateTime:r.zoneDateTime},zoneFormat(a,s){return yt(r,{zoneTime:!0,formatStr:a,moreOptions:s})},set date({year:a,month:s,date:m}){V(r,{year:a,month:s,date:m})},set dateNr(a){V(r,{date:a})},set hours(a){z(r,{hours:a})},set localeInfo({locale:a,timeZone:s,l:m,tz:g}){e=ie({locale:a,timeZone:s,l:m,tz:g})},set milliseconds(a){z(r,{milliseconds:`${a}`})},set minutes(a){z(r,{minutes:a})},set month(a){V(r,{month:a})},set seconds(a){z(r,{seconds:a})},set time({hours:a,minutes:s,seconds:m,milliseconds:g}){z(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},set year(a){V(r,{year:a})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return wt(r)},get date(){return ht(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return re(r,!0)},get dateValues(){return bt(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return Lt(r)},get DSTActive(){return Zt(r)},get hasDST(){return Ft(r)},get hours(){return r.time.hours},get info(){return qr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return oe(r)},get localDate(){return oe(r,{dateOnly:!0})},get locale(){return(e||ie()).locale},get localeInfo(){return e},get localeString(){return oe(r)},get localTime(){return oe(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return pt(r)},get quarter(){return $t(r)},get quarterNr(){return $t(r,!0)},get removeTime(){return Xr(r)},get seconds(){return r.time.seconds},get time(){return gt(r,!0)},get timeValues(){return Ie(r,!0)},get timeZone(){return(e||ie()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return O},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return St(r,"UTC")},get value(){return new Date(r)},get weeknr(){return zt(r)},get weeksInYear(){return Pe(r.year,31)},get year(){return r.date.year},get zoneDate(){return ht(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return re(r,!1)},get zoneDateValues(){return bt(r,!1)},get zoneDay(){return Pt(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return pt(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return gt(r)},get zoneTimeValues(){return Ie(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return re(r,!1)}};return!e&&!n?o:(o.localeInfo=e||ie(),r=new Proxy(n,to(o)),Object.entries(Object.getOwnPropertyDescriptors(Bt(r,t))).forEach(([a,s])=>Object.defineProperty(o,a,s)),Object.freeze(r))}function to(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var O=Wt(Intl.DateTimeFormat().resolvedOptions()),no=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]);function Ht(e="en-GB"){return e=j({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function Le(e="en"){return e=j({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function ro({year:e,locale:t}={}){e=D(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=Le().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let a=w.from(e,o,1);n.calendar[r[o]]=kt(a,t)}return n}function oo({year:e,monthNr:t,locale:n="en-CA"}={}){e=D(t)&&parseInt(e)||-1,t=D(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=j({locale:n}).locale,t=r?t-1:void 0,r?w.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function Wt(e){let t=Jt(e.locale,e.timeZone),n=new Intl.Locale(e.locale);return e.weekInfo=n.getWeekInfo?n.getWeekInfo():null,Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Jt(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function j({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,e=Et({trial:function(){return Intl.DateTimeFormat(e,{timeZone:O.timeZone}).resolvedOptions().locale},onError:function(){return console.warn(`Intl locale "${e}" best fit impossible, using "${O.locale}"`),O.locale}}),t=Et({trial:function(){return Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions().timeZone},onError:function(){return console.warn(`timeZone "${t}" not valid. Using "${O.timeZone}"`),O.timeZone}}),Wt(Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions())}function ie({locale:e,timeZone:t,l:n,tz:r}={}){return j({locale:e,timeZone:t,l:n,tz:r},!0)}function Nt(e){return!Number.isNaN(+e)&&e?.constructor===Date?e:new Date}function io(e){let t=new Date;switch(!0){case(typeof e=="string"||typeof e=="number"):return Nt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return Nt(e);default:return t}}function Et({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function ao({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:j({timeZone:t}).timeZone},o={timeZone:j({timeZone:n||""}).timeZone},a=w(e,r),s=w(e,o),m=s.differenceTo(a),g=a.offsetFrom(s).offset,[x,S]=Ae(g,!0),y=s.clone.add(`${x} hours, ${S} minutes`),c=m.equalDates?"No difference":`Time offset ${g}: ${o.timeZone} is ${m.clean} ${x<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:c,result:{[r.timeZone.replace(/\//,"_")]:w(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:y.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function D(e){return!Number.isNaN(parseInt(e))}function ae(e,t,n){return e?.constructor===Number?P(t,`${e} ${n}`):t}function lo(e){let t={addYears(n=1){return ae(n,e,"years")},addMonths(n=1){return ae(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,ae(n,e,"days")},addDays(n=1){return ae(n,e,"days")},get nextYear(){return P(e,"1 year")},get nextWeek(){return P(e,"7 days")},get previousWeek(){return P(e,"-7 days")},get previousYear(){return P(e,"-1 year")},get nextMonth(){return dt(e)},get previousMonth(){return dt(e,!0)},get tomorrow(){return P(e,"1 day")},get yesterday(){return P(e,"-1 day")}};for(let n of no)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Bt(e,t){let n=lo(e);for(let[r,o]of Object.entries(t||{})){let a=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:a}:{value(...m){return o.method(e,...m)},enumerable:a};Object.defineProperty(n,r,s)}return n}function so(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return j()}},localWeekdaynames:{value(n){return Ht(n)}},localMonthnames:{value(n){return Le(n)}},daysInMonth:{value(n,r=!1){return n=D(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:ro},monthCalendar:{value:oo},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=D(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return w(o,r||O)}},hasDST:{value({date:n,timeZone:r}={}){return Ft(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return Zt(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=le(n,"yyyy-m-d-h-mi-s",j({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:a,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let m=j({timeZone:o,locale:a}).formatOptions;return m+=s?`,${s}`:"",le(n,r,m)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:a=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:a})}},validateLocaleInformation:{value:j},timeAcrossZones:{value:ao},weeksInYear:{value(n){return Pe(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Rt()),...Object.keys(Bt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Qt={},w=so(uo,Qt);function uo(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Rt({localeInfo:j(n?e:t),dateValue:new Date(n?Date.now():io(e)),customMethods:Qt})}var co=Object.defineProperties(Yt,{escape:{value:xo,enumerable:!0}});function Yt(e,...t){let{flags:n,cleanedArgs:r}=fo(...t);return po(new RegExp(vo(mo(e,...r)),n))}function mo(e,...t){return R(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function fo(...e){let t=ke(yo(e.at(-1)));return{flags:t,cleanedArgs:R(t)?e.slice(0,-1):e}}function yo(e){return ue(e,Array)?e.join(""):""}function po(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=So(n,e),t},enumerable:!1},clone:{get(){return bo(t)},enumerable:!1}}),ho(e));return t}function R(e){return e?.length>0}function ue(e,t){return e?.constructor===t}function go(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ue(r,Function)?r.bind(e.re):e.re[t]}}function ho(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=go(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function bo(e){let t=e.re.source,n=R(e.re.flags)?[...e.re.flags]:[];return Yt`${t} ${n}`}function ke(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ue(e,String)&&R(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function So(e,t){switch(!0){case(!ue(e,String)||!R(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,ke(e));default:return t=new RegExp(t.source,ke(t.flags,e))}}function xo(e){switch(!0){case(e?.constructor!==String||!R(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function vo(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:L,maybe:Me,$Wrap:Wo,isNothing:To,xProxy:Jo,addSymbolicExtensions:Bo}=wo({useSymbolicExtensions:!1});function wo(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=Oo(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function Oo(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=$o(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function $o(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return(To(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||Me({trial:v=>String(i)===t.NAN}),isInfinity:Me({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:E,isNaN:H,isInfinity:W,shouldBeFirstElementIsNothing:J}=m(i,...l);switch(l=l.length&&l[0],!0){case J:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case H:return f?t.NAN:String(v)===String(i);case W:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case E===Boolean:return f?t.BOOLEAN:E===l;default:return S(i,l,f,x(i,E))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return Me({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||L(i,1/0)||L(i,NaN):u,u}}var Fe=Ut(),Ze=Ut("");function Ut(e,t={}){let{useSymbolicExtensions:n}=t;return e=L(e,String,Number)?String(e):void 0,n&&ze(),function(y,...c){return S(y,x(c))};function r(y,c){return c&&L(e,String,Number)?String(e):`{${y}}`}function o(y,c){let h=y in c;return h&&L(c[y],String,Number)?String(c[y]):r(y,h)}function a(y){return(...c)=>{let h=c.find(p=>p.key);return o(h?h.key:"_",y)}}function s(y,c){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,a(c))}function m(y){let c=[];return Object.entries(y).forEach(([h,p])=>{p.forEach((d,i)=>(c[i]??={},c[i][h]=d))}),c}function g(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function x(y){return g(y)?m(y[0]):y}function S(y,c){let h=c?.length?c.filter(p=>L(p,Object)).map((p,d)=>s(y,{...p,index:d+1})).join(""):y;return L(e,void 0)?h:h.replace(/\{[a-z_\d].+\}/gim,String(e))}}function ze(){return String.prototype[Symbol.for("interpolate")]||Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Fe(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return Ze(this,...e)}}}),[Symbol.for("interpolate"),Symbol.for("interpolate$")]}jo();No();var _o={interpolate:Fe,interpolateClear:Ze,addSymbolicStringExtensions:ze};function No(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function Xo(e=!0){let t=A('<ul id="log2screen">').first();function n(a=!1){let s=a?A.at.start:A.at.end;return m=>{if(m?.isJQx)return A.li(m.data.get("header")?{class:"head"}:"",m).renderTo(t,s);m=A.IS(m,String,Number,Symbol)?String(m):Eo(m,e);let g=m.startsWith("!!");m=g?m.slice(2):m,A.li(g?{class:"head"}:"",m).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...a)=>a.forEach(r),logTop:(...a)=>a.forEach(o)}}function Eo(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function jo(){A.editCssRules("li::marker{vertical-align:top;}","code{color:green;background-color:#eee;padding:2px;font-family:monospace;}","code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}","h3{marginTop:1.5rem;}",".thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}","a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}",".cmmt{color:#888;}",".hidden{display:none;}",".attention{color:red; font-size:1.2em; font-weight:bold;}","#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}","#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}",".err{fontStyle:italic; color:red; }","a{text-decoration:none; font-weight:bold;}","a:hover{text-decoration:underline;}","a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}",`a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`,`a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`)}export{A as $,w as $D,Xo as logFactory,co as regexhelper,_o as splatModule};
13
+ `)}function Ln(e){return e.reduce((t,n)=>{let[r,o]=[n.slice(0,n.indexOf(":")).trim(),n.slice(n.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return r&&o?{...t,[r]:o}:t},{})}function kn(e){return Ln(Pn(e))}function Ue(e,t){return e?.replace("::",":")===t?.replace("::",":")}var he=!1,Mn={on:()=>he=!0,off:()=>he=!1},q={tagsRaw:_,allowUnknownHtmlTags:Mn,isAllowed(e){if(he)return!0;let t=b(e,String)?e.toLowerCase():e?.nodeName.toLowerCase()||"none";return t==="#text"||!!_[t]},allowTag:e=>_[e.toLowerCase()]=!0,prohibitTag:e=>_[e.toLowerCase()]=!1},Fn=!0,X={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function Zn(e){if(Fn&&Object.keys(e.removed).length){let t=Object.entries(e.removed).reduce((n,[r,o])=>[...n,`${ne(r)} => ${o}`],[]).join("\\000A");N.error(`JQx: HTML creation error(s): ${t}`)}}function zn(e){let t=e.nodeName.toLowerCase(),n=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(t)&&!n.find(r=>r===t)||q.isAllowed(t)}function $e(e){let t={rawHTML:e?.parentElement?.getHTML()??"no html",removed:{}};return b(e,HTMLElement)&&[...e.childNodes].forEach(n=>{if(n?.children?.length&&$e(n),n?.attributes){let r=b(n,SVGElement)?pe.svg:pe.html;[...(n??{attributes:[]}).attributes].forEach(o=>{let a=o.name.trim().toLowerCase(),s=o.value.trim().toLowerCase().replace(X.whiteSpace,""),m=a==="href"?!X.validURL.test(s):X.notAllowedValues.test(s),g=a.startsWith("data")?!X.data.test(a):!!r[a];if(m||g){let x=Ve(o.value||"none",60);x+=x.length===60?"...":"",t.removed[`${o.name}`]=`attribute/property/value not allowed, removed. Value: ${x}`,n.removeAttribute(o.name)}})}if(!(zn(n)||n.constructor===CharacterData||n.constructor===Comment)){let r=(n?.outerHTML||n?.textContent).trim(),o=Ve(r,60)??"EMPTY";o+=o.length===60?"...":"",t.removed[`<${n.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${o}`,n.remove()}}),Zn(t),e}function Rn(e){let t=document.createElement("div");return t.insertAdjacentHTML(C.end,e),t.childNodes.length?$e(t):void 0}function Hn(e,t,n){switch(!0){case b(e,Comment):return t.insertAdjacentHTML(n,`<!--${e.data}-->`);case b(e,Text):return t.insertAdjacentText(n,e.data||e.textContent);default:return}}function be(e=[],t=document.body,n=C.BeforeEnd){return n=n||C.BeforeEnd,t=t?.isJQx?t.node:t||document.body,e.reduce((r,o)=>{let a=Z(o)&&Wn(o,t,n);return a?[...r,a]:r},[])}function Wn(e,t=document.body,n=C.BeforeEnd){return n=n||C.BeforeEnd,t=t?.isJQx?t?.[0]:t,b(e,Comment,Text)?Hn(e,t,n):b(e,HTMLElement)?t.insertAdjacentElement(n,e):void 0}function M(e){if(b(e,Text,Comment))return e;let t=e?.trim(),n=t?.split(/<text>|<\/text>/i)??[];if(n?.length&&(n=n.length>1?n.filter(o=>o.length).shift():void 0),t.startsWith("<!--")&&t.endsWith("-->"))return document.createComment(e.replace(/<!--|-->$/g,""));if(n||b(t,String)&&!/^<(.+)[^>]+>/m.test(t))return document.createTextNode(n??t);let r=Rn(e);return r.childNodes.length<1?M(`<span data-jqxcreationerror="1">${at(e,60)}</span>`):r.children[0]}function Jn(e){if(e.node("#jqxPopup"))return;e.logger.log("JQx: [JQx].Popup first call. Dialog element created."),e.dialog({id:"jqxPopup"},e.div({id:"jqxPopupContent"})).render,e.editCssRules(...en);let t=[],[n,r]=[e("#jqxPopupContent"),e.node("#jqxPopup")],o={};return e.handle({type:"click, cancel",handlers:c,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:a,remove:s,removeModal:y});function a(d){if(r.open)switch(!0){case m(d):return;default:return s(),setTimeout(()=>a(d),200)}o={...d};let{content:i}=o;return e.IS(i,String,HTMLElement)||i?.isJQx?g():!0}function s(){return o.modal?p(o.warnMessage):x()}function m(d){for(let[i,l]of Object.entries(o))if(l!==d[i])return!1;return!0}function g(){n.clear();let{content:d,modal:i,closeAfter:l}=o;i=e.IS(i,Boolean)?i:!1;let u=i?"":e.div({id:"closeHandleIcon"});n.append(u,e.IS(d,String)?e.div(d):d),r.showModal(),!i&&e.IS(l,Number)&&h(s,l)}function x(){if(r.close(o.returnValue),S(),e.IS(o.callback,Function))return t.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function S(){t.forEach(d=>clearTimeout(d)),t=[]}function y({callback:d,value:i}={}){o.returnValue=i,o.modal=!1,o.callback=d||o.callback,s()}function c({evt:d}){if(!(Object.keys(o).length<1||!r.open)&&(d.type==="cancel"&&o.modal&&d.preventDefault(),d.target.closest("#closeHandleIcon")||!d.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),s()}function h(d,i){e.IS(d,Function)&&e.IS(i,Number)&&i>0&&(S(),t.push(setTimeout(d,i*1e3)))}function p(d){if(!e.IS(d,String,HTMLElement,Proxy))return;let i=n.find$(".warn");switch(!0){case i.is.empty:i=e.div({class:"warn"},d);default:n.append(i.addClass("active")),h(()=>n.find$(".warn").removeClass("active"),2)}}}function Bn(e){let t={},n="anonymous_";function r(S){if(S){let{handler:y,capture:c,type:h}=S;document.addEventListener(h,y,{capture:c})}}function o(S){if(S){let{type:y,handler:c,capture:h}=S;document.removeEventListener(y,c,{capture:h})}}function a(S,y,c,h){return function(p){if(!$(y))return S({evt:p});let d=p.target.closest(y);if(d){let i=e(d);S({self:i,me:i,evt:p}),c&&g(p.type,h)}return!0}}function s(S){return t[S]=t[S]||{},t[S]}function m(S,y){return Object.entries(s(S)).find(([c])=>c===y)}function g(S,y){let c=m(S,y);c&&(o(c[1]),delete t[S][y],delete Se[y],N.warn(`Removed listener [${y}] for event type [${S}].`))}function x(S){let{type:y,handler:c,name:h,capture:p,once:d,selector:i,node:l,about:u}=S;t[y]=t[y]||{};let f=Vn(h||c.name),v=c;if(l instanceof HTMLElement){let j=l.dataset.hid||f;l.dataset.hid=j,i=`[data-hid=${j}]`}switch(!0){case!t[y][f]:return N.log(`JQx: created listener for event type ${y}, with handler name ${f}`),t[y][f]={name:f,handler:a(c,i,d,f),capture:Xn(y,p),once:!!d,type:y,initialHandler:v,selector:!!i&&i||!1,about:!!u&&u||!1,unListen(){g(y,f)}},t[y][f];default:return console.warn(`The listener [${f}] for [${y}] exists, it is not re-assigned.`)}}return{remove(...S){return g(...S)},listen:function(S){let{type:y,handler:c}=S;if(!$(y)||!b(c,Function))return;let h=x(S);if(h)return r(h),{type:y,name:h.name,unListen(){g(y,h.name)}}},get ListenerStore(){return Object.freeze({...t})}}}var N=Gn(),Qn=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],C=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(e,t){return e[String(t).toLowerCase()]??e[t]}})),Yn=[...Array(26)].map((e,t)=>String.fromCharCode(t+65)).concat([...Array(26)].map((e,t)=>String.fromCharCode(t+97))).concat([...Array(10)].map((e,t)=>`${t}`)),Un=Object.freeze({get(e,t){return e[Ne(t)]||e[t]},enumerable:!1,configurable:!1}),Se={};_t.custom();function qn(){let e=setTimeout(()=>{});for(;e>=0;)clearTimeout(e--)}function Vn(e){return $(e)&&!/^handler|handlers$/gi.test(e.trim())?e.trim():ot()}function _n(e){let t=!!e.node&&!b(e,Text,Comment);switch(!0){case t:let n=e.node.dataset?Object.keys(e.node.dataset).map(o=>`[data-${o}]`):[],r=[e.attr("id")&&`#${e?.attr("id")}`||void 0,e.attr("class")&&e?.attr("class").split(" ").map(o=>`.${o}`).join(", ")||void 0,n.length>0&&n.join(", ")||void 0].filter(o=>!!o).join(", ")||[];return r.length?`(${r})`:"";default:return""}}function ot(e){let t=`anonymous_${Math.random().toString(36).slice(2)}`;return Se[t]?ot():(Se[t]=t,t)}function Xn(e,t){return!!Qn.find(n=>n===e)||!!t}function it(e){return e.startsWith("data")||pe.html.find(t=>e.toLowerCase()===t)}function qe(e){return e&&(e.textContent="")}function xe(e,t=0,n=!0){return e=e?.parentElement,t+=e?e[n?"scrollTop":"scrollLeft"]:0,e?xe(e,t,n):t}function $(e,t=1){return t=b(t,Number)&&t||1,b(e,String)&&e.length>=t}function Ve(e,t=120){return at(e,t).replace(/&lt;/g,"<")}function at(e,t=120){return`${e}`.trim().slice(0,t).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(e.length>t?" &hellip;":"").trim()}function ne(e){switch(!0){case b(e,String):let t=document.createElement("div");return t.append(e),t.innerHTML;default:return e}}function de(e){return b(e,String)&&Object.assign(document.createElement("textarea"),{innerHTML:e}).textContent||e}function Gn(){let[e,t]=[!1,!0],n=[],r={get on(){return e=!0,r},get off(){return e=!1,r},get disable(){return t=!0,r},get enable(){return t=!1,r},get backLog(){return n}};function o(){t=!0}function a(){t=!1}function s(...x){return n.unshift(...x.map(S=>`${fe()} \u2A3B ${de(S)}`)),console.error(n.slice(0,x.length).join(`
14
+ `)),r}function m(...x){return n.unshift(...x.map(S=>`${fe()} \u26A0 ${de(S)}`)),console.warn(n.slice(0,x.length).join(`
15
+ `)),r}function g(...x){let S=x.map(y=>`${fe()} \u2714 ${de(y)}`);switch(!t&&n.unshift(...S),e){case!0:console.log(S.join(`
16
+ `));default:return r}}return Object.defineProperties(r,{log:{value:g,enumerable:!1},error:{value:s,enumerable:!1},warn:{value:m,enumerable:!1}}),Object.freeze(r)}function fe(){return(e=>`[${G(e.getHours())}:${G(e.getMinutes())}:${G(e.getSeconds())}.${G(e.getMilliseconds(),3)}]`)(new Date)}function Kn(e,t){if(e)for(let[n,r]of Object.entries(t)){if(n=I(n),n.startsWith("data"))return lt(e,r);b(r,String)&&it(n)&&e.setAttribute(n,r.split(/[, ]/)?.join(" "))}}function lt(e,t){if(e&&b(t,Object))for(let[n,r]of Object.entries(t))e.setAttribute(`data-${I(n)}`,r)}function st(e){return e?b(e,Proxy)?[e.EL]:b(e,NodeList)?[...e]:Z(e)?[e]:De(e)?e:e.isJQx?e.collection:void 0:[]}function Q(e,t,n=!0,...r){if(e.is.empty)return N.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."),e;if(r=r.map(o=>o.isJQx?o.node:b(o,String)?t(o).node??o:o),r.find(o=>!b(o,String,Element))){let o=n?"after":"before";return N.log(`[JQx instance].[${o}(Me)]: invalid/-sufficient input.`),e}return e.node[n?"after":"before"](...r),e}function Z(e){return b(e,Text,HTMLElement,Comment)}function ye(e,t){if(b(t,Object))for(let[n,r]of Object.entries(t)){let o;/!important/i.test(r)&&(r=r.slice(0,r.indexOf("!")).trim(),o="important"),e.style.setProperty(I(n),r,o)}}function k(e){let t=e.cloneNode(!0);return t.removeAttribute&&t.removeAttribute("id"),e.isConnected?e.remove():e=null,t}function er(e){if(!b(e,HTMLElement))return;let t=e.style,n=getComputedStyle(e),r=!![t.visibility,n.visibility].includes("hidden"),o=!![t.display,n.display].includes("none"),a=!!e.hidden,s=parseInt(n.height)<1||parseInt(n.width)<1,m=e.offsetTop<0||e.offsetLeft+e.offsetWidth<0||e.offsetLeft>document.body.offsetWidth,g=+n.opacity==0||+(t.opacity||1)==0;return!(a||m||g||o||r||s)}function tr(e){return e?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(t=>t===e):!1}function nr(e){return e?.filter(t=>t).reduce((t,n)=>t.concat(ct(n)?`<!--${n.data}-->`:je(n)?n.textContent:n.outerHTML),"")}function G(e,t=2){return`${e}`.padStart(t,"0")}function rr(e,t=0){return[e,t]=[Math.floor(e),Math.ceil(t)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(e-t+1)+t)}function ut(){return`_${lr(Yn).slice(0,8).join("")}`}function or(e){return e=b(e,String)&&/,/.test(e)?e.split(",").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0):e,b(e,Array)?e:b(e,String)&&e?.trim().toLowerCase()||""}function ir(e){return e?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(t=>t===e):!1}function ar(e,t){switch(e=String(e).trim(),!0){case/^(0|false|f)$/i.test(e):return!1;case/^(1|true|t)$/i.test(e):return!0;default:return t}}function lr(e){let t=e.length;for(;t--;){let n=rr(t);[e[t],e[n]]=[e[n],e[t]]}return e}function Ne(e){return b(e,String)?e.toLowerCase().split("-").map((t,n)=>n&&`${sr(t)}`||t).join(""):e}function I(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`).replace(/^-|-$/,"")}function sr([e,...t]){return`${e.toUpperCase()}${t.join("")}`}function je(e){return b(e,Comment,Text)}function ct(e){b(e,Comment)}function ur(e){return b(e,Text)}function Ee(e){return b(e,String)&&/^<|>$/.test(`${e}`.trim())}function De(e){return b(e,Array)&&!e?.find(t=>!Z(t))}function mt(e){return b(e,Array)&&!e?.find(t=>!Ee(t))}function T(e,t){let n=e.collection.filter(r=>!je(r));for(let r=0;r<n.length;r+=1)t(n[r],r);return e}function cr(e){return e.node?b(e.node,Comment)?`<!--${e.node.textContent}-->`:e.HTML.get(1).split(">")[0]+">...":""}function dt(e,t,n){let r=t!==document.body&&b(e,String)&&e.toLowerCase()!=="body"?t:document;try{n.collection=[...r.querySelectorAll(e)]}catch{N.warn(`JQx: Invalid CSS querySelector. [${b(e,String)?e:"Not a string!"}]`)}}function mr(){return{isCommentOrTextNode:je,isNode:Z,isComment:ct,isText:ur,isHtmlString:Ee,isArrayOfHtmlElements:De,isArrayOfHtmlStrings:mt,ElemArray2HtmlString:nr,input2Collection:st,setCollectionFromCssSelector:dt,cssRuleEdit:rt({createWithId:"JQxStylesheet"})}}function dr(){let e=Object.freeze({notInDOM:"n/a",writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return t=>{let n=t.node;return b(n,Node)?Object.freeze({get writable(){return tr(n)},get modal(){return ir(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return er(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return t.collection.length<1},get virtual(){return t.isVirtual}}):e}}function fr(e,t,n,r){n&&b(t,String)&&(t={[t]:n==="-"?"":n});let o;t.className&&(o=t.className,delete t.className),o=[...e.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ut().slice(1)}`,r.editCssRule(`.${o}`,t),e.classList.add(o)}var yr=dr();function pr(e){return{factoryExtensions:gr(e),instanceExtensions:hr(e)}}function gr(e){return{data(t){return{get all(){return new Proxy(t[0]?.dataset??{},Un)},set(n={}){if(!t.is.empty&&b(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},get(n,r){return t.data.all[n]??r},add(n={}){if(!t.is.empty&&b(n,Object))for(let[r,o]of Object.entries(n))t.setData({[r]:o});return t},remove(n){return t[0]?.removeAttribute(`data-${I(n)}`),t}}},dimensions(t){if(t.is.empty)return N.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:n}=t,r=n.getBoundingClientRect().toJSON();return r.scrollTopDistance=xe(n,0),r.scrollLeftDistance=xe(n,0,!1),r},node(t){return t[0]},HTML(t){return{get(n,r){if(t.is.empty)return"NO ELEMENTS IN COLLECTION";let o=n?t.outerHtml:t.html();return r?ne(o):o},set(n,r=!1,o=!1){n=n.isJQx?n.HTML.get(1):n;let a=b(n,String);return n=a&&o?ne(n):n,a&&(n||"").trim().length&&t.html(n,r),t},replace(n,r=!1){return t.HTML.set(n,!1,r)},append(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n,!0,r)},insert(n,r=!1){return n=b(n,HTMLElement)?e(n).HTML.get(1):n.isJQx?n.HTML.get(1):n,t.HTML.set(n+t.HTML.get(),!1,r)}}},is(t){return yr(t)},length(t){return t.collection.length},outerHtml(t){return(t.first()||{outerHTML:void 0}).outerHTML},parent(t){let n=e(t[0]?.parentNode);return n.is.empty?t:n},render(t){switch(!0){case!t.is.empty:return t.toDOM();default:return e.logger.warn("[JQx.render]: empty collection"),t}},Style(t){return{get computed(){return t.is.empty?{}:getComputedStyle(t[0])},inline(n){return t.style(n)},inSheet(n){return t.css(n)},valueOf(n){return t.is.empty?void 0:getComputedStyle(t[0])[I(n)]},nwRule(n){return t.Style.byRule({rules:n})},byRule({classes2Apply:n=[],rules:r=[]}={}){let o=b(r,String)&&!n.length?r.split("{")[0].trim():"";if(r=r&&b(r,String)?[r]:r,n=n&&b(n,String)?[n]:n,(r?.length||n?.length)&&(r?.length&&e.editCssRules(...r),n))for(let a of n)t.addClass(a);return o?.startsWith(".")&&t.addClass(o.slice(1)),o?.startsWith("#")&&!t.attr("id")&&t.prop({id:o.slice(1)}),t}}}}}function hr(e){return{addClass(t,...n){return T(t,r=>r&&n.forEach(o=>r.classList.add(o)))},after(t,...n){return Q(t,e,!0,...n)},afterMe(t,...n){return Q(t,e,!0,...n)},andThen(t,...n){return Q(t,e,!0,...n)},append(t,...n){if(t.is.empty||n.length<1)return t;let r=t.length===1;for(let o of n){if(!o.isJQx&&$(o)){let a=o.trim(),s=/^<(.+)[^>]+>$/m.test(a)?M(o):e.text(o);T(t,m=>m.append(r?s:k(s)))}Z(o)&&T(t,a=>a.append(r?o:k(o))),o.isJQx&&!o.is.empty&&T(t,a=>o.collection.forEach(s=>a.append(r?s:k(s))))}return t},appendTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).append(t),t}},attr(t,n,r){if(!t.node||b(t.node,Text,Comment))return t;if(!r&&$(n))return n=I(n),n==="class"?[...t.node.classList].join(" "):t.node.getAttribute(n);if($(n)&&r)switch(n=I(n),!0){case n.startsWith("data-"):n={data:{[n.replace("data-","")]:r}};break;default:n={[n]:r}}return b(n,Object)&&!t.is.empty&&Kn(t.node,n),t},before(t,...n){return Q(t,e,!1,...n)},beforeMe(t,...n){Q(t,e,!1,...n)},clear(t){return T(t,qe)},closest(t,n){let r=$(n)?t.node?.closest(n):void 0;return r?e(r):t},computedStyle(t,n){let{node:r}=t;return r&&getComputedStyle(r)[n]},css(t,n,r){return T(t,o=>fr(o,n,r,e))},duplicate(t,n=!1,r=document.body){switch(!0){case t.is.empty:return N.error("Duplicating an empty JQx instance is not possible"),t;default:let o=t.collection[0].cloneNode(!0);return o.childNodes.forEach(a=>{a.removeAttribute&&a?.removeAttribute("id")}),n?e(o).toDOM(r):e.virtual(o)}},each(t,n){return T(t,n)},empty(t){return T(t,qe)},find(t,n){return t.collection.length>0?[...t.first()?.querySelectorAll(n)]:[]},find$(t,n){return t.collection.length>0?e(n,t):t},first(t,n=!1){return t.collection.length>0?n?t.single():t.collection[0]:void 0},first$(t,n){return t.single(n)},getData(t,n,r){return t.node?.dataset?.[n]||r},hasClass(t,...n){return t.is.empty||!t.node.classList.length?!1:n.find(r=>t.node.classList.contains(r))&&!0||!1},hide(t){return T(t,n=>ye(n,{display:"none !important"}))},html(t,n,r){switch(!0){case(t.is.empty&&!$(n)):return"";case!$(n):return t.node?.getHTML()??"";default:let o=M(`<div>${n.isJQx?n.HTML.get(!0):n}</div>`);return T(t,a=>(a.textContent=r?a.textContent:"",a.insertAdjacentHTML(e.at.end,o.getHTML())))}},htmlFor(t,n,r="",o=!1){if(t.is.empty||!$(n)||!$(r))return t;let a=t.find$(n);if(a.length<1)return t;let s=M(`<span>${r}</span>`);return a.each(m=>{o||(m.textContent=""),m.insertAdjacentHTML(e.at.end,s?.getHTML())}),t},isEmpty(t){return!t.node},nth$(t,n){return t.single(n)},on(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,node:t.node,handler:r}),t}},once(t,n,...r){switch(!0){case(t.is.empty||!b(n,String,Array)||!$(n)||r.length<1):return t;default:return e.handle({type:n,once:!0,node:t.node,handler:r}),t}},prepend(t,...n){if(t.is.empty||!n)return;let r=t.length===1;for(let o of n){if($(o)){o=o.trim();let a=/^<(.+)[^>]+>$/m.test(o)?M(o):e.text(o);a=r?a:k(a),T(t,s=>s.prepend(a.cloneNode(!0)))}Z(o)&&T(t,a=>a.prepend(r?o:k(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(t,a=>T(o,s=>a.prepend(r?s:k(s)))),o.collection.reverse())}return t},prependTo(t,n){switch(n=typeof n=="string"?e(n):n,!0){case(!n?.isJQx&&!b(n,HTMLElement)||n?.collection?.length<1):return e.warn("[JQx instance].appendTo: invalid input"),t;default:return(n.isJQx?n:e(n)).prepend(t),t}},prop(t,n,r){if(b(n,String)&&!r)return n.startsWith("data")?t[0]?.dataset[n.slice(n.indexOf("-")+1)]:t[0]?.[n];let o=b(n,Object)?n:{[n]:r};for(let[a,s]of Object.entries(o)){if(a=a.trim(),s&&!it(a)||!s)return!1;if(a.toLowerCase()==="id")return t[0].id=s;T(t,m=>{if(a.startsWith("data"))return m.dataset[a.slice(a.indexOf("-")+1)]=s;m[a]=s})}return t},remove(t,n){let r=a=>a.remove(),o=()=>t.collection=t.collection.filter(a=>document.documentElement.contains(a));if(n){let a=t.find$(n);return a.is.empty||(T(a,r),o()),t}return T(t,r),o(),t},rmAttr(t,...n){for(let r of n)t.node.removeAttribute(r);return t},removeClass(t,...n){return T(t,r=>{if(r)for(let o of n)r.classList.remove(o)})},renderTo(t,n,r){return n=b(n,HTMLElement)||n.isJQx?n:document.body,r=b(r,String)&&e.at[r]?r:e.at.end,t.first$().toDOM(n,r),t},replace(t,n,r){let o=t.node;return!n||!b(r,HTMLElement)&&!r?.isJQx?(e.logger.error("JQx replace: invalid replacement value"),t):((r.isJQx||b(r,NodeList))&&(r=r[0]),o&&n&&(n=b(n,String)?o.querySelectorAll(n):n.isJQx?n.collection:n,b(n,HTMLElement,NodeList,Array)&&b(r,HTMLElement)&&(b(n,HTMLElement)?[n]:[...n]).forEach(a=>a.replaceWith(r.cloneNode(!0)))),t)},replaceClass(t,n,...r){return T(t,o=>{o.classList.remove(n);for(let a of r)o.classList.add(a)})},replaceMe(t,n){return t.replaceWith(n)},replaceWith(t,n){return n=b(n,Element)?n:n.isJQx?n[0]:void 0,n&&(t[0].replaceWith(n),t=e.virtual(n)),t},setData(t,n){return T(t,r=>lt(r,n))},show(t){return T(t,n=>ye(n,{display:"revert-layer !important"}))},single(t,n){let r=t.collection.length>0;switch(n=n??0,!0){case(r&&b(n,String)):return t.find$(n);case(r&&b(n,Number)):return e(t.collection[n]);case r:return t.collection[0];default:return t}},style(t,n,r){return T(t,o=>{r&&b(n,String)&&(n={[n]:r||"none"}),ye(o,n)})},text(t,n,r=!1){switch(!0){case t.isEmpty():return t;case!b(n,String):return t.node.textContent;default:return T(t,o=>o.textContent=r?o.textContent+n:n)}},toDOM(t,n=document.body,r=C.BeforeEnd){return t.isVirtual=!1,be(t.collection,n,r),t},toggleClass(t,n){return T(t,r=>r.classList.toggle(n))},toNodeList(t){return[...t.collection].map(n=>document.importNode(n,!0))},trigger(t,n,r,o){r=b(r,Function)?r:Event,o=b(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let a=new r(n,o);return t.is.empty||t.each(s=>s.dispatchEvent(a)),t},val(t,n){switch(!0){case(t.is.empty||!b(t.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return t;case!b(n,String):return t.node.value;default:return t.node.value=b(n,String)?n:"",t}}}}var ve,re,{isComment:Fo,isText:Zo,isHtmlString:zo,isArrayOfHtmlElements:Ro,isArrayOfHtmlStrings:Ho,ElemArray2HtmlString:Wo,cssRuleEdit:Te,addFn:br}=Sr();function Sr(){return{...mr(),addFn:xr}}function xr(e,t){return e=e?.trim(),!$(e)||!b(t,Function)?N.error("JQx.fn: method invalid parameter(s)"):(re[e]=(n,...r)=>t(n,...r),N.log(`JQx: added extension function [${e}]`))}function vr(e){return function(t,n,r){if(t=t?.trim(),!$(t)||!b(n,Function))return e.error("JQx.staticFn: invalid parameter(s)");let o=r?{get(){return n()}}:{value(...a){return n(...a)}};try{Object.defineProperty(e,t,o)}catch{return e.warn(`JQx.staticFn: extension [${t}] already exists`)}return N.log(`JQx: added static extension function [${t}]`)}}function ee(e){return new Proxy(e,Object.freeze({get:(t,n)=>Tr(t,n,e)}))}function _e(e,t){return(...n)=>b(e,Function)&&e(ee(t),...n)}function Tr(e,t,n){switch(!0){case b(t,Symbol):return K({trial:()=>e[t],whenError:()=>e});case b(+t,Number):return e.collection?.[t]||void 0;case t in ve:return _e(ve[t],n)();case t in re:return _e(re[t],n);default:return e[t]}}function wr(e){let t=Er(e);for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(t)))Object.defineProperty(e,n,r);return e}function Or(e){return{allow(t){let n=/-/.test(t),r=n&&t;t=n?Ne(t):t.toLowerCase(),q.allowTag(t),Object.defineProperties(e,we(t,!0,e,r))},prohibit(t){t=t.toLowerCase(),q.prohibitTag(t),Object.defineProperties(e,we(t,!1,e))}}}function Xe(...e){if(e.length===1){let t=String(e.shift().trim());e=t.startsWith("!")?[t.slice(1,-1)]:t.split(",").map(n=>n.trim())}for(let t of e.map(n=>n.startsWith("!")?n.slice(1,-1):n))Te(t,{removeRule:1})}function $r(e){return function(t,n,r){n=n?.isJQx?n?.[0]:n,r=r&&Object.values(C).find(a=>r===a);let o=e(t,document.createElement("br"));if(n&&!b(n,HTMLBRElement))for(let a of o.collection)r?n.insertAdjacentElement(r,a):n.append(a);return o}}function Nr(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);for(let[o,a]of Object.entries(r))!(o in t)&&Object.defineProperty(t,o,{...a,enumerable:!1})}return t}function jr(e,t,n,r){return e=I(r||e.toLowerCase()),{get(){return(...o)=>{let a=t&&n.virtual($e(et[e](...o)))||void 0,s=b(a?.node,Comment,Text,void 0)?"":_n(a);return N.log(t?`JQx: created (virtual) instance from [JQx].${e} ${s}`:`JQx: ${e.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),a}},enumerable:!1,configurable:!0}}function we(e,t,n,r){e=e.toLowerCase();let o=jr(e,t,n,r);return r?{[r]:o,[Ne(r)]:o}:{[e]:o,[e.toUpperCase()]:o}}function Er(e){return Nr(Object.entries(q.tagsRaw).reduce(Dr(e),{}),kr(e))}function Dr(e){return function(t,[n,r]){return Object.defineProperties(t,we(n,r,e)),t}}function Cr(e){return function(t,n,...r){b(n,Function)&&(r.push(n),n=void 0),e({type:t,selector:n,handlers:r})}}function Ir(e){return function(t){let{type:n,types:r,origin:o,selector:a,handler:s,handlers:m,node:g,name:x,capture:S,once:y,about:c}=t;s=m||s,n=r||n,a=o||a;let h=or(n),p=x;s=b(s,Function)?[s]:s;let d={type:h,selector:a||o,capture:S,name:p,once:y,node:g,about:c};switch(!0){case(b(h,Array)&&h.length>0):for(let i of h)d.type=i,Ge(s,d,e);break;default:return Ge(s,d,e)}}}function Ge(e,t,n){for(let r of e)n.listen({...t,handler:r})}function Ar(e){return function(t,n){return n=$(n)&&n,t=$(t)&&t,n&&t&&e.listenerStore[t][n]}}function Pr(e){return e.activePopup||Object.defineProperty(e,"activePopup",{value:Jn(e),enumerable:!1}),e.activePopup}function Lr(e){let t=(m,g)=>Te(m,g),n=function(m){return rt({createWithId:m||`jqx${ut()}`})},r=function(...m){for(let g of m)Te(g)},o=Or(e),a=Bn(e),s=Ir(a);return{editCssRule:t,createStyle:n,editCssRules:r,allowProhibit:o,handle:s,capturedHandling:s,log:(...m)=>N.on.log(...m).off,warn:(...m)=>N.on.warn(...m).off,error:(...m)=>N.on.error(...m).off,handlerWrapper:a}}function kr(e){let{factoryExtensions:t,instanceExtensions:n}=pr(e);ve=t,re=n;let{editCssRule:r,createStyle:o,editCssRules:a,allowProhibit:s,handle:m,capturedHandling:g,log:x,warn:S,error:y,handlerWrapper:c}=Lr(e),h=Ar(e),p=vr(e);return et.setError=d=>(y(`JQx direct element creation error: [${d}] is not a valid tag`),e.br()),{log:x,warn:S,error:y,editCssRules:a,createStyle:o,editStylesheet:o,editCssRule:r,escHtml:ne,logger:N,text(d,i=!1){return i?e.comment(d):document.createTextNode(d)},node(d,i=document){return i.querySelector(d,i)},nodes(d,i=document){return[...i.querySelectorAll(d,i)]},clearAllTimers:qn,get staticFn(){return function(d,i,l){return p(d,i,l)}},get toBool(){return ar},get getNamedListener(){return h},get virtual(){return $r(e)},get allowTag(){return s.allow},get prohibitTag(){return s.prohibit},get removeCssRule(){return Xe},get removeCssRules(){return Xe},get delegate(){return Cr(g)},get delegateCaptured(){return g},get handle(){return g},get listen(){return c.listen},get at(){return C},get setStyle(){return r},get fn(){return br},get lenient(){return q.allowUnknownHtmlTags},get IS(){return b},get Popup(){return Pr(e)},get listenerStore(){return c.ListenerStore}}}var Mr=wr(Fr());function Fr(){return function(e,t,n=C.BeforeEnd){if(e?.isJQx)return e;let r=b(t,HTMLBRElement);t=(!r&&t&&t.isJQx?t[0]:t)||document.body,n=n&&Object.values(C).find(g=>n===g)?n:void 0;let o=Ee(e),a=!o&&mt(e)||o,s={collection:st(e)??[],isVirtual:r,isJQx:!0},m=De(s.collection);if(s.collection.length&&m)return r||s.collection.forEach(g=>{t.contains(g)||be([g],t,n)}),ee(s);if(a){if([e].flat().forEach(g=>s.collection.push(M(g))),s.collection.length>0){let g=s.collection.filter(y=>y?.dataset?.jqxcreationerror);s.collection=s.collection.filter(y=>!y?.dataset?.jqxcreationerror);let x=s.collection.map(y=>`${String(y.constructor).split(/function|\(/)[1].trim()}`).length>1;s=ee(s);let S=s.collection.length>0?cr(s):"sanitized: no elements remaining";N.log(`JQx: created ${s.isVirtual?"(virtual)":""} instance from ${x?"array of ":""}HTML string${x?"s":""} ${S}`),s.isVirtual||be(s.collection,t,n)}return s}return dt(e,t,s),ee(s)}}var A=Mr;var se=Zr();function Zr(){let[e,t,n,r]=["2-digit","numeric","long","short"],o={fixed:{MM:{month:n},M:{month:r},m:{month:t},mm:{month:e},yyyy:{year:t},yy:{year:e},WD:{weekday:n},wd:{weekday:r},d:{day:t},dd:{day:e},h:{hour:t},hh:{hour:e},mi:{minute:t},mmi:{minute:e},s:{second:t},ss:{second:e},ms:{fractionalSecondDigits:3},tz:{timeZoneName:"shortOffset"},dl:{locale:"default"},h12:{hour12:!1},yn:{yearName:""},ry:{relatedYear:!0},msp:{fractionalSecond:!0}},dynamic:{tzn:c=>({timeZoneName:c.slice(4)}),hrc:c=>({hourCycle:`h${c.slice(4)}`}),ds:c=>({dateStyle:c.slice(3)}),ts:c=>({timeStyle:c.slice(3)}),tz:c=>({timeZone:c.slice(3)}),e:c=>({era:c.slice(2)}),l:c=>({locale:c.slice(2)})}},a={...o,retrieveDyn(c){let h=c?.slice(0,c.indexOf(":"));return o.dynamic[h]&&o.dynamic[h](c)},get re(){return new RegExp(`\\b(${Object.keys(o.fixed).join("|")})\\b`,"g")}},s=(c="dtf",h=0)=>{let p=` ${c.replace(/(?<=\{)(.+?)(?=})/g,i=>`[${h++}]`).replace(/[{}]/g,"").trim()} `,d=c.match(/(?<=\{)(.+?)(?=})/g)||[];return{get texts(){return d},formatString(i){p=i},set formatStr(i){p=i},get formatStr(){return p},get units(){return p.match(a.re)||[]},finalize(i="",l="",u="",f=""){return p.replace(/~([\d+]?)/g,"$1").replace(/dtf/,i).replace(/era/,u).replace(/dp\b|~dp\b/,l).replace(/yn\b/,f).replace(/\[(\d+?)]/g,(v,j)=>d[j].trim()).trim()}}},m=c=>c.replace(/\s+/g,""),g=(...c)=>c?.reduce((h,p)=>({...h,...a.retrieveDyn(p)||a.fixed[p]}),a.fixed.dl),x=(c,h,p)=>{let d=g(...m(p).split(",")),i=Intl.DateTimeFormat(d.locale,d).format(c);return h.finalize(i)},S=(c,h,p,d)=>c.toLocaleString(h,{timeZone:p,month:d?r:n}),y=(c,h,p)=>{let d=g(...h.units.concat(m(p).split(",")).flat()),i={...a.fixed},l=(f,v)=>d[f]==="numeric"&&v.startsWith("0")?v.slice(1):v,u=Intl.DateTimeFormat(d.locale,d).formatToParts(c).reduce((f,v)=>v.type==="literal"&&/[ ,/-]/.test(v.value)?f:{...f,[v.type]:l(v.type,v.value)},{});return i.ms=d.fractionalSecondDigits?i.msp:i.ms,i.yyyy=u.relatedYear?i.ry:i.yyyy,h.formatStr=h.formatStr.replace(a.re,f=>/^(M|MM)$/.test(f)?S(c,d.locale,d.timeZone,/^M$/.test(f)):u[Object.keys(i[f]).shift()]||f),h.finalize(void 0,u.dayPeriod,u.era,u.yearName)};return(c,h,p="l:default")=>/ds:|ts:/.test(p)?x(c,s(void 0),p):y(c,s(h||void 0),p)}var zr=Rr;function Rr(){let e=(r,o)=>{let a=isNaN(new Date(r)),s=isNaN(new Date(o));if(s){let[m,g,x]=Array(3).fill("end date not valid");return{error:!0,message:m,full:g,clean:x}}if(a){let[m,g,x]=Array(3).fill("start date not valid");return{error:!0,message:m,full:g,clean:x}}if(a&&!s){let[m,g,x]=Array(3).fill("start- and/or end date are not valid");return{error:!0,message:m,full:g,clean:x}}return{error:!1}},t=n();return function({start:r,end:o,diffs:a={}}={}){let s=e(r,o),m=o>r?"+":"-";if(s.error)return s;let g=Math.abs(r-o),x=new Date(g),S=x.getUTCFullYear()-1970,y=x.getUTCMonth(),c=x.getUTCDate()-1,h=c%7,p=Math.floor(c/7),d=x.getUTCHours(),i=x.getUTCMinutes(),l=x.getUTCSeconds(),u=x.getUTCMilliseconds(),f=Math.floor(g/864e5);a={...a,fromUTC:r,toUTC:o,sign:"",years:S,months:y,days:c,hours:d,minutes:i,seconds:l,milliseconds:u,diffInDays:f},a.full=t({values:a,full:!0}),a.clean=t({values:a}),a.equalDates=a.clean==="Dates are equal";let v=d+i+l>0?"T":"";return a.clean!=="Dates are equal"&&(a.sign=m,a.jsPeriod=`${m}P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${p>0?`${p}W`:""}${h>0?`${h}D`:""}${v}${d>0?`${d}H`:""}${i>0?`${i}M`:""}${l>0?`${l}S`:""}`,a.ISOPeriod=`P${S>0?`${S}Y`:""}${y>0?`${y}M`:""}${c>0?`${c}D`:""}${v}${d>0?`${d}H`:""}${i>0?`${i}M`:""}${l>0?`${l}S`:""}`),a};function n(){let r=(...a)=>s=>a.reduce((m,g)=>g(m),s),o=(a,s)=>a===1?s.slice(0,-1):s;return r(({values:a,full:s})=>[Object.entries(a).filter(([m])=>/^(years|month|days|hours|minutes|seconds)/i.test(m)),s],([a,s])=>s?a:a.filter(([,m])=>s?+m:m>0),a=>a.reduce((s,[m,g])=>[...s,`${g} ${o(g,m)}`],[]),a=>a.length<1?"Dates are equal":`${a.slice(0,-1).join(", ")}${a.length>1?" and ":""}${a.slice(-1).shift()}`)}}var Hr=Wr;function Wr(){let e=Object.entries({year:"FullYear",month:"Month",date:"Date",day:"Date",hour:"Hours",minute:"Minutes",second:"Seconds",millisecond:"Milliseconds"}).reduce((r,[o,a])=>({...r,[o]:a,[`${o}s`]:a}),{}),t=!1,n=function(...r){let o=r.length===1;return t=r[0].trim().startsWith("subtract,"),t&&(r=o?r[0].trim().replace(/^subtract,/i,"").split(",").map(a=>a.trim()):r.filter(a=>!a.startsWith("subtract"))),o&&!t&&(r=r[0].split(",").map(a=>a.trim())),r.map(function(a){if(!a)return!1;let s=a.toLowerCase().split(/ {1,}/);return s.length<2?!1:s.map(m=>{m=`${m}`.trim().replace(/[^a-z0-9-+]/g,"");let g=parseInt(m,10);return Number.isNaN(g)?m:t?-g:+g})}).filter(a=>a)};return function(r,...o){if(o.length<1)return r;let a=n(...o);return a.length&&a.forEach(([s,m])=>{m=m,m=e[m],s&&m&&r[`set${m}`](r[`get${m}`]()+s)}),r}}var Dt=zr(),Ct=Kr(),P=Hr(),Jr=["sun","mon","tue","wed","thu","fri","sat"],It=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ft(e,t=!1){let n=e.month+1,r=e.month;if(e.month+=t?-1:1,!t&&e.month>=n)for(;e.month>n;)e.dateNr-=1;if(t&&e.month===r)for(;e.month>=r;)e.dateNr-=1;return e}function yt(e,...t){return P(e,...t),e}function Br(e,t=!1){let n=At(e.clone,{sunday:t}),r=[n];return{weekStart:n.format("WD","l:en-GB"),inputDate:e,dates:r.concat([...Array(6)].map((o,a)=>n.clone.addDays(a+1)))}}function Ce(e,{start:t,end:n,future:r,past:o,include:a={start:!1,end:!1}}={}){let s=e.clone.UTC;return t=t?.value||t?.constructor===Date?w(t?.value||t).UTC:w.now.UTC,n=n&&n?.value||n?.constructor===Date?w(n?.value||n).UTC:w.now.UTC,s.milliseconds=0,t.milliseconds=0,n.milliseconds=0,r?t>n:o?t<n:(a.start?+s>=+t:+s>+t)&&(a.end?+s<=+n:+s<+n)}function pt(e,{zoneTime:t=!1,formatStr:n,moreOptions:r}={}){return r=t?e.localeInfo.formatOptions+(r?`,${r}`:""):O.formatOptions+(r?`,${r}`:""),t?(e.localeInfo||(e.localeInfo=O),se(e,n,r)):Qr(e,n,r)}function Qr(e,t,n){let r=e.clone.relocate(O);return n=(n||"").startsWith("+")?`${r.localeInfo.formatOptions},${n.slice(1)}`:n||r.localeInfo.formatOptions,se(r,t,n)}function Yr(e,t){let n=Dt({start:e,end:t||e});return parseInt(`${n.sign}${n.diffInDays}`)}function gt(e,t=!1){let{locale:n,timeZone:r}=t?e.localeInfo:O,o=Bt(n,r),a=e.format("MM|WD",o).split("|");return{locale:n,timeZone:r,monthName:a[0],dayName:a[1],dayNames:Wt(n),monthNames:ke(n)}}function ht(e,t=!1){let[n,r,o,a]=Ie(e,t),s={values4Timezone:t?O.timeZone:e.timeZone,hours:n,minutes:r,seconds:o,milliseconds:a};return Object.freeze(s)}function Ie(e,t=!1){let n=`l:en-CA,${t?`tz:${O.timeZone}`:`tz:${e.timeZone}`},hrc:23,ts:medium`;return e.format("",n).split(/:/).map(Number).concat(e.getMilliseconds())}function bt(e,t){let n=t?`tz:${O.timeZone}`:`,tz:${e.timeZone}`,[r,o,a]=e.format("yyyy-mm-dd",n).split(/-/).map(Number);o-=1;let s=t?O.timeZone:e.timeZone;return Object.freeze({values4Timezone:s,year:r,month:o,date:a})}function St(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate()];let n=e.format("yyyy-m-d",e.localeInfo.formatOptions).split(/-/).map(Number);return n[1]-=1,n}function Ur(e){let t=new Intl.Locale(e.locale),n=t.weekInfo?t.weekInfo.firstDay:t.getWeekInfo?t.getWeekInfo().firstDay:1;return n=n===7?0:n,It[n]}function At(e,{sunday:t=!1}={}){let n=t?"sunday":Ur(e);return Ae(e,{day:n,preserveTodayWhenEqual:!0})}function qr(e,t){let n=e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000",r=t.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3)??"+0000";return n=Pe(n.slice(0,3)+":"+n.slice(-2),!0),r=Pe(r.slice(0,3)+":"+r.slice(-2),!0),[-n[0]+r[0],-n[1]+r[1]].map(o=>n[0]<0?-o:o)}function Pt({start:e,end:t}={}){t||(t=e.clone),t?.clone||(t=w(t,{timeZone:e.timeZone})),e=w(wt(e,e.timeZone),{timeZone:e.timeZone}),t=w(wt(t,t.timeZone),{timeZone:t.timeZone});let n=Dt({start:e,end:t,diffs:{timeZoneStart:e.timeZone,timeZoneEnd:t.timeZone}}),r=qr(t,e),o=n.sign.startsWith("-")?"ahead of":"behind",[a,s]=r.map(x=>Math.abs(x)),[m,g]=[`${a} ${ue(a,"hour")}`,`${s} ${ue(s,"minute")}`];return n.timeZonesOffsetDifference=n.sign.length<1||a+s===0?`Offsets of ${e.timeZone} and ${t.timeZone} are equal`:`${e.timeZone} is ${m}${s>0?` and ${g}`:""} ${o} ${t.timeZone}`,n}function xt(e,t){t=String(t).toLowerCase()==="utc"||t.timeZone==="UTC"?e.clone.relocate({timeZone:"UTC"}):w(e.value,{timeZone:t.timeZone||O.timeZone});let n=Pt({start:e.clone,end:t}),r=`${n.sign}${vt(n.hours)}:${vt(n.minutes)}`;return{fromTZ:e.timeZone,toTZ:t.timeZone,offset:r,offsetText:`${t.timeZone} ${Vr(r)} ${e.timeZone}`}}function vt(e,t=2){return`${e}`.padStart(t,"0")}function ue(e,t){return`${t}${e>1||e===0?"s":""}`}function Vr(e){if(/00:00/.test(e))return"no time diffence to";let t=e.slice(1).split(":").map(Number),[n,r]=t,o=ue(n,"hour"),a=ue(r,"minute"),s=e.startsWith("+");return r>0?`${n} ${o} and ${r} ${a} ${s?"ahead of":"behind"}`:`${n} ${o} ${s?"ahead of":"behind"}`}function Tt(e,t,n){return e.clone.format(t,n||e.localeInfo.formatOptions)}function _r(e,{withFormat:t,withFormatOptions:n,local:r=!1}={}){if(t)return r?Tt(e,t,$D.localeInformation.formatOptions):Tt(e,t,n);let o=e.clone.relocate({locale:"en"}),a=r?O.formatOptions:o.localeInfo.formatOptions,s=`wd M dd yyyy hh:mmi:ss ${o.format("tz",a+",tzn:longOffset").replace(":","")} (tz)`;return o.format(s,a+",tzn:long, hrc:23")}function Lt(e,t=!1){let n=Intl.DateTimeFormat("en",{timeZone:t?e.timeZone:O.timeZone,weekday:"short"});return Ct(n.format(e))}function Xr(e){let t=O,n=e.localeInfo,r=e.clone.relocate({locale:t.locale,timeZone:t.timeZone}),o=e.offsetFrom(r),a=r.offsetFrom(e),s=t,m=n,g=e.format("hh:mmi:ss dp",`hrc:12,tz:${e.timeZone}`),x=r.format("hh:mmi:ss dp",`hrc:12,tz:${r.timeZone}`),S={note:"'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance",locales:{user:{locale:s.locale,timeZone:s.timeZone}},dateTime:{user:{...e.dateTime,monthName:r.monthName,weekdayNr:r.day,weekdayName:r.dayName,dayPeriodTime:x,hasDST:r.hasDST,DSTActive:r.DSTActive,offsetFromRemote:o.offset,string:r.toString()}},offset:{fromUTC:e.UTC.offsetFrom(e).offsetText}};return n.timeZone!==t.timeZone&&(S.locales.remote={locale:m.locale,timeZone:m.timeZone},S.dateTime.remote={...e.zoneDateTime,monthName:e.zoneNames.monthName,weekdayNr:Lt(e,!0),weekdayName:e.zoneNames.dayName,dayPeriodTime:g,hasDST:e.hasDST,DSTActive:e.DSTActive,offsetFromUser:a.offset,string:e.toString()},S.offset.fromUserTime=a.offsetText),S}function oe(e,t=!0){if(t)return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];let n=e.format("yyyy-m-d-hh-mmi-ss",`${e.localeInfo.formatOptions},hrc23:true`).split(/-/).map(Number).concat(e.getMilliseconds());return n[1]-=1,n}function kt(e){return new Date(e.year,e.month+1,0,0,0,0).getDate()}function Mt(e,t){t=E({locale:t||e.localeInfo.locale}).locale;let n=e.clone.relocate({locale:t});return n.date={date:1},[n].concat([...Array(kt(n)-1)].map((r,o)=>n.clone.add(`${o+1} days`)))}function Ae(e,{day:t,next:n=!1,preserveTodayWhenEqual:r=!1}={}){t=t?.toLowerCase()||"-";let o=Ct(t);if(o<0)return console.error(`[TickTock instance].next/previous invalid day value ${t}`),e.clone;let a=n?1:-1,s=w(new Date(...e.dateTimeValues),e.localeInfo);return r&&o===s.day?s:Gr(s.addDays(n?1:-1),o,a)}function Gr(e,t,n){function r(o){switch(!0){case o.day===t:return o;default:return r(o.add(`${n} days`))}}return r(e)}function ie(e,{dateOnly:t=!1,timeOnly:n=!1}={}){let{locale:r,timeZone:o}=e.localeInfo;return t?new Date(e).toLocaleDateString(r,{timeZone:o}):n?new Date(e).toLocaleTimeString(r,{timeZone:o}):new Date(e).toLocaleString(r,{timeZone:o})}function wt(e,t){let n={timeZone:t,hourCycle:"h23"};return new Date(new Date(e).toLocaleString("en",n))}function V(e,{year:t,month:n,date:r}={}){return D(t)&&e.setFullYear(parseInt(t)),D(r)&&e.setDate(parseInt(r)),D(n)&&e.setMonth(parseInt(n)),e}function R(e,{hours:t,minutes:n,seconds:r,milliseconds:o}={}){return D(t)&&e.setHours(parseInt(t)),D(n)&&e.setMinutes(parseInt(n)),D(r)&&e.setSeconds(parseInt(r)),D(o)&&e.setMilliseconds(parseInt(o)),e}function Ft(e){return e?.constructor===Date||e?.value}function Ot(e,t){return Ft(t)?w(t?.value||t,e.localeInfo):w.from(...e.dateTimeValues).relocate(e.localeInfo)}function Kr(){return function(e){e=`${e}`.toLowerCase();let t=Jr.indexOf(e);return t<0?It.indexOf(e):t}}function Pe(e){let t=e.slice(1).split(/[-:]/).map(Number),n=e.startsWith("-");return t=t.map(r=>n?-r:r),t}function eo(e){return e.time={hours:0,minutes:0,seconds:0,milliseconds:0},e}function $t(e,t){return Intl.DateTimeFormat("en-CA",{timeZone:t,timeZoneName:"long"}).format(e).split(/,/)[1].trim()}function Zt(e,t){t=t||e?.timeZone||O.timeZone,e=e?.value?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t});let n=e.year||e.getFullYear(),r=$t(new Date(n,0,1),t),o=$t(new Date(n,5,1),t);return r!==o}function zt(e,t){return t=t||e?.timeZone||O.timeZone,e=e?.hasDST?e:e?.constructor===Date?w(e,{timeZone:t}):w({timeZone:t}),e.hasDST?!/standard/i.test(e.toString()):!1}function to(e,{locale:t,timeZone:n,l:r,tz:o}={}){return e.localeInfo=E({locale:r||t||e.l||e.locale,timeZone:o||n||e.tz||e.timeZone}),e}function no(e,t){return Ft(t)&&(e=w(t.value||t,t.localeInfo||e.localeInfo)),e}function Le(e,t){let n=Rt(new Date(e,11,t||31));return n===1?Le(e,(t||31)-1):n}function Nt(e,t){let n=e.month;switch(!0){case n<3:return t?1:"First";case n<6:return t?2:"Second";case n<9:return t?3:"Third";case n<12:return t?4:"Fourth";default:return"unknown"}}function Rt(e){let t=new Date(e),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);let r=t.valueOf();return t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((r-t)/6048e5)}var Ht=ro;function ro({localeInfo:e,customMethods:t,dateValue:n}={}){let r,o={add(...a){return yt(r,...a)},between({start:a,end:s,include:m}={}){return Ce(r,{start:a,end:s,include:m})},cloneWith(a){return Ot(r,a)},daysUntil(a){return Yr(r,a)},differenceTo(a){return Pt({start:r,end:a})},differenceUntil(a){return r.differenceTo(a).clean},firstWeekday({sunday:a=!1,midnight:s=!1}={}){return At(r,{sunday:a,midnight:s})},format(a,s){return pt(r,{formatStr:a,moreOptions:s})},fullMonth(a){return Mt(r,a)},fullWeek(a=!1){return Br(r,!!a)},isFuture(a){return Ce(r,{start:r,end:a,future:!0})},isPast(a){return Ce(r,{start:r,end:a,past:!0})},next(a,s){return Ae(r,{day:a,next:!0,preserveTodayWhenEqual:!!s})},offsetFrom(a){return xt(r,a)},previous(a,s){return Ae(r,{day:a,next:!1,preserveTodayWhenEqual:!!s})},relocate({locale:a,timeZone:s,l:m,tz:g}={}){return to(r,{locale:a,timeZone:s,l:m,tz:g})},revalue(a){return r=no(r,a),r},setDateValues({year:a,month:s,date:m}={}){return V(r,{year:a,month:s,date:m})},setTimeValues({hours:a,minutes:s,seconds:m,milliseconds:g}={}){return R(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},subtract(...a){return yt(r,"subtract,"+a.join(","))},toArray(a=!1){return oe(r,a)},toString({template:a,formatOptions:s,local:m}={}){return _r(r,{withFormat:a,withFormatOptions:s,local:m})},values(a=!1){return a?r.dateTime:r.zoneDateTime},zoneFormat(a,s){return pt(r,{zoneTime:!0,formatStr:a,moreOptions:s})},set date({year:a,month:s,date:m}){V(r,{year:a,month:s,date:m})},set dateNr(a){V(r,{date:a})},set hours(a){R(r,{hours:a})},set localeInfo({locale:a,timeZone:s,l:m,tz:g}){e=ae({locale:a,timeZone:s,l:m,tz:g})},set milliseconds(a){R(r,{milliseconds:`${a}`})},set minutes(a){R(r,{minutes:a})},set month(a){V(r,{month:a})},set seconds(a){R(r,{seconds:a})},set time({hours:a,minutes:s,seconds:m,milliseconds:g}){R(r,{hours:a,minutes:s,seconds:m,milliseconds:g})},set year(a){V(r,{year:a})},get age(){return r.differenceTo(new Date).years},get ageFull(){return r.differenceTo(new Date).clean},get clone(){return Ot(r)},get date(){return bt(r,!0)},get dateNr(){return r.date.date},get dateTime(){return{...r.date,...r.time}},get dateTimeValues(){return oe(r,!0)},get dateValues(){return St(r,!0)},get day(){return r.getDay()},get dayName(){return r.names.dayName},get daysThisMonth(){return kt(r)},get DSTActive(){return zt(r)},get hasDST(){return Zt(r)},get hours(){return r.time.hours},get info(){return Xr(r)},get isLeapYear(){return new Date(r.getFullYear(),2,0).getDate()===29},get ISO(){return r.toISOString()},get local(){return ie(r)},get localDate(){return ie(r,{dateOnly:!0})},get locale(){return(e||ae()).locale},get localeInfo(){return e},get localeString(){return ie(r)},get localTime(){return ie(r,{timeOnly:!0})},get milliseconds(){return r.getMilliseconds()},get minutes(){return r.time.minutes},get month(){return r.date.month},get monthName(){return r.names.monthName},get names(){return gt(r)},get quarter(){return Nt(r)},get quarterNr(){return Nt(r,!0)},get removeTime(){return eo(r)},get seconds(){return r.time.seconds},get time(){return ht(r,!0)},get timeValues(){return Ie(r,!0)},get timeZone(){return(e||ae()).timeZone},get unixEpochTimestamp(){return Math.floor(+r/1e3)},get userLocaleInfo(){return O},get UTC(){return r.clone.relocate({locale:r.locale,timeZone:"UTC"})},get UTCOffset(){return xt(r,"UTC")},get value(){return new Date(r)},get weeknr(){return Rt(r)},get weeksInYear(){return Le(r.year,31)},get year(){return r.date.year},get zoneDate(){return bt(r,!1)},get zoneDateNr(){return r.zoneDate.date},get zoneDateTime(){return{...r.zoneDate,...r.zoneTime}},get zoneDateTimeValues(){return oe(r,!1)},get zoneDateValues(){return St(r,!1)},get zoneDay(){return Lt(r,!0)},get zoneDayname(){return r.zoneNames.dayName},get zoneHours(){return r.zoneTime.hours},get zoneMinutes(){return r.zoneTime.minutes},get zoneMonth(){return r.zoneDate.month},get zoneMonthname(){return r.zoneNames.monthName},get zoneNames(){return gt(r,!0)},get zoneSeconds(){return r.zoneTime.seconds},get zoneTime(){return ht(r)},get zoneTimeValues(){return Ie(r)},get zoneYear(){return r.zoneDate.year},get zoneValues(){return r.zoneDateTime},get zoneArray(){return oe(r,!1)}};return!e&&!n?o:(o.localeInfo=e||ae(),r=new Proxy(n,oo(o)),Object.entries(Object.getOwnPropertyDescriptors(Qt(r,t))).forEach(([a,s])=>Object.defineProperty(o,a,s)),Object.freeze(r))}function oo(e){return{get(t,n){return n!=="toString"&&n in t?t[n].bind(t):Reflect.get(e,n)},set(t,n,r){return n in e&&Reflect.set(e,n,r)}}}var O=Jt(Intl.DateTimeFormat().resolvedOptions()),io=Object.getOwnPropertyNames(Date.prototype).filter(e=>e.startsWith("set")).reduce((e,t)=>[...e,{native:t,syn:"change"+t.slice(3)}],[]);function Wt(e="en-GB"){return e=E({locale:e}).locale,{long:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"long"})),short:[...Array(7).keys()].map(t=>new Date(Date.UTC(1970,0,4+t)).toLocaleDateString(e,{timeZone:"Etc/UTC",weekday:"short"}))}}function ke(e="en"){return e=E({locale:e}).locale,{long:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"long"})),short:[...Array(12).keys()].map(t=>new Date(Date.UTC(1970,t,1)).toLocaleDateString(e,{timeZone:"Etc/UTC",month:"short"}))}}function ao({year:e,locale:t}={}){e=D(e)?parseInt(e):new Date().getFullYear();let n={year:e,calendar:{}},r=ke().long.map(o=>o.toLowerCase());for(let o=0;o<12;o+=1){let a=w.from(e,o,1);n.calendar[r[o]]=Mt(a,t)}return n}function lo({year:e,monthNr:t,locale:n="en-CA"}={}){e=D(t)&&parseInt(e)||-1,t=D(t)&&parseInt(t)||new Date().getFullYear();let r=t>=1&&t<=12;return n=E({locale:n}).locale,t=r?t-1:void 0,r?w.from(e,t,1).relocate({locale:n}).fullMonth(n):"MonthNr should be a specific number (1 = january - 12 = december)"}function Jt(e){let t=Bt(e.locale,e.timeZone),n=new Intl.Locale(e.locale);return e.weekInfo=n.getWeekInfo?n.getWeekInfo():null,Object.defineProperty(e,"formatOptions",{value:t,enumerable:!1})}function Bt(e,t){return[`${e&&!(Array.isArray(e)&&e.length<1)?`l:${e}`:""}`,`${t?`tz:${t}`:""}`].filter(n=>n).join(",")}function E({locale:e,timeZone:t,l:n,tz:r}={}){return t=t||r,e=e||n,e=Et({trial:function(){return Intl.DateTimeFormat(e,{timeZone:O.timeZone}).resolvedOptions().locale},onError:function(){return console.warn(`Intl locale "${e}" best fit impossible, using "${O.locale}"`),O.locale}}),t=Et({trial:function(){return Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions().timeZone},onError:function(){return console.warn(`timeZone "${t}" not valid. Using "${O.timeZone}"`),O.timeZone}}),Jt(Intl.DateTimeFormat(e,{timeZone:t}).resolvedOptions())}function ae({locale:e,timeZone:t,l:n,tz:r}={}){return E({locale:e,timeZone:t,l:n,tz:r},!0)}function jt(e){return!Number.isNaN(+e)&&e?.constructor===Date?e:new Date}function so(e){let t=new Date;switch(!0){case(typeof e=="string"||typeof e=="number"):return jt(new Date(e));case(Array.isArray(e)&&e.map(Number).length===e.length):return e.length===1?new Date(e[0],0,1):new Date(...e);case e?.constructor===Date:return jt(e);default:return t}}function Et({trial:e,onError:t=()=>{}}={}){if(e?.constructor===Function)try{return e()}catch(n){return t?.constructor===Function?t(n):void 0}}function uo({timeZoneDate:e,timeZoneID:t,userTimeZoneID:n}={}){let r={timeZone:E({timeZone:t}).timeZone},o={timeZone:E({timeZone:n||""}).timeZone},a=w(e,r),s=w(e,o),m=s.differenceTo(a),g=a.offsetFrom(s).offset,[x,S]=Pe(g,!0),y=s.clone.add(`${x} hours, ${S} minutes`),c=m.equalDates?"No difference":`Time offset ${g}: ${o.timeZone} is ${m.clean} ${x<0?"behind":"ahead of"} ${r.timeZone}`;return{remoteTimezone:r.timeZone,userTimezone:o.timeZone,timeDifference:c,result:{[r.timeZone.replace(/\//,"_")]:w(e).toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"}),[o.timeZone.replace(/\//,"_")]:y.toString({template:"yyyy/mm/dd hh:mmi:ss",formatOptions:"hrc:23"})}}}function D(e){return!Number.isNaN(parseInt(e))}function le(e,t,n){return e?.constructor===Number?P(t,`${e} ${n}`):t}function co(e){let t={addYears(n=1){return le(n,e,"years")},addMonths(n=1){return le(n,e,"months")},addWeeks(n=1){return n=n?.constructor===Number?n*7:1,le(n,e,"days")},addDays(n=1){return le(n,e,"days")},get nextYear(){return P(e,"1 year")},get nextWeek(){return P(e,"7 days")},get previousWeek(){return P(e,"-7 days")},get previousYear(){return P(e,"-1 year")},get nextMonth(){return ft(e)},get previousMonth(){return ft(e,!0)},get tomorrow(){return P(e,"1 day")},get yesterday(){return P(e,"-1 day")}};for(let n of io)t[n.syn]=function(...r){return e[n.native](...r),e};return t}function Qt(e,t){let n=co(e);for(let[r,o]of Object.entries(t||{})){let a=o.enumerable,s=o.isGetter?{get(){return o.method(e)},enumerable:a}:{value(...m){return o.method(e,...m)},enumerable:a};Object.defineProperty(n,r,s)}return n}function mo(e,t){return Object.defineProperties(e,{now:{get(){return e(new Date)}},localeInformation:{get(){return E()}},localWeekdaynames:{value(n){return Wt(n)}},localMonthnames:{value(n){return ke(n)}},daysInMonth:{value(n,r=!1){return n=D(n)?parseInt(n):0,n>=1&&n<=12?new Date(r?2e3:2005,n,0).getDate():`${n} should be a Number between (1 (january) - 12 (december))`}},yearCalendar:{value:ao},monthCalendar:{value:lo},from:{value(...n){return e(n)}},fromUxTS:{value(n,r){n=D(n)?parseInt(n)*1e3:void 0;let o=n?new Date(n):new Date;return w(o,r||O)}},hasDST:{value({date:n,timeZone:r}={}){return Zt(n,r)}},DSTActive:{value({date:n,timeZone:r}={}){return zt(n,r)}},values:{value({date:n,timeZone:r}={}){n=n||n?.value||new Date;let o=se(n,"yyyy-m-d-h-mi-s",E({timeZone:r}).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());return o[1]-=1,o}},format:{value({date:n,template:r,timeZone:o,locale:a,opts:s}={}){n=n||n?.value||new Date,r=r?.constructor===String?r:"yyyy/mm/dd hh:mmi:ss dp";let m=E({timeZone:o,locale:a}).formatOptions;return m+=s?`,${s}`:"",se(n,r,m)}},addCustom:{value({name:n,method:r,enumerable:o=!1,isGetter:a=!1}={}){n?.constructor===String&&r?.constructor===Function&&r.length>0&&(t[n]={method:r,enumerable:o,isGetter:a})}},validateLocaleInformation:{value:E},timeAcrossZones:{value:uo},weeksInYear:{value(n){return Le(n,31)}},keys:{get(){let n=Object.fromEntries(Object.entries(t).filter(([r,o])=>o.enumerable===!0));return[...Object.keys(Ht()),...Object.keys(Qt()),...Object.keys(n)].sort((r,o)=>r.localeCompare(o))}}}),e}var Yt={},w=mo(fo,Yt);function fo(e,t){if(e?.localeInfo)return e.clone;let n=e?.locale||e?.timeZone||e?.tz||e?.l;return Ht({localeInfo:E(n?e:t),dateValue:new Date(n?Date.now():so(e)),customMethods:Yt})}var yo=Object.defineProperties(Ut,{escape:{value:wo,enumerable:!0}});function Ut(e,...t){let{flags:n,cleanedArgs:r}=go(...t);return bo(new RegExp(Oo(po(e,...r)),n))}function po(e,...t){return H(t)?e.raw.reduce((n,r,o)=>n.concat(t[o-1]||"").concat(r),""):e.raw.join("")}function go(...e){let t=Me(ho(e.at(-1)));return{flags:t,cleanedArgs:H(t)?e.slice(0,-1):e}}function ho(e){return ce(e,Array)?e.join(""):""}function bo(e){let t=new Proxy(Object.defineProperties({},{re:{get(){return e},enumerable:!1},toString:{value:()=>e.toString(),enumerable:!1},valueOf:{value:()=>e,enumerable:!1},flags:{value(n){return e=To(n,e),t},enumerable:!1},clone:{get(){return vo(t)},enumerable:!1}}),xo(e));return t}function H(e){return e?.length>0}function ce(e,t){return e?.constructor===t}function So(e,t,n){let r=Reflect.get(n,t);return{fromInstance:Reflect.get(e,t),fromRegExpMethod:ce(r,Function)?r.bind(e.re):e.re[t]}}function xo(e){return{get(t,n){let{fromInstance:r,fromRegExpMethod:o}=So(t,n,e);switch(!0){case!!r:return r;default:return o}}}}function vo(e){let t=e.re.source,n=H(e.re.flags)?[...e.re.flags]:[];return Ut`${t} ${n}`}function Me(e,t){return t=(t??"").replace(/^-r\|/,""),e=t.concat(ce(e,String)&&H(e)?e:""),[...new Set([...e])].join("").replace(/[^dgimsuvy]/g,"")}function To(e,t){switch(!0){case(!ce(e,String)||!H(e)):return t;case e==="-r":return t=new RegExp(t.source);case e.startsWith("-r|"):return t=new RegExp(t.source,Me(e));default:return t=new RegExp(t.source,Me(t.flags,e))}}function wo(e){switch(!0){case(e?.constructor!==String||!H(e)):return"";case!!RegExp.escape:return RegExp.escape(e);default:return(`\\x${e.at(0)}`+e.slice(1).replace(/\p{S}|\p{P}/gu,t=>`\\${t}`)).replace(/ |\\x /g,"\\x20")}}function Oo(e){return e.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm,"").replace(/\s/g,"").trim().replace(/<!([^>]\d+)>/g,(t,n)=>String.fromCharCode(+n)??t)}var{IS:L,maybe:Fe,$Wrap:Yo,isNothing:$o,xProxy:Uo,addSymbolicExtensions:qo}=No({useSymbolicExtensions:!1});function No(e={}){let{useSymbolicExtensions:t}=e,{shouldbeIsSingleObject:n,ISOneOf:r,isExcept:o,verifyNothingness:a,xProxy:s,determineType:m,addSymbolicExtensions:g,maybe:x,$Wrap:S}=jo(y,t);return t&&g(),{IS:y,maybe:x,$Wrap:S,isNothing:a,xProxy:s,addSymbolicExtensions:g};function y(c,...h){let p=typeof c=="symbol"?Symbol.isSymbol:c;switch(!0){case!!x({trial:d=>"isTypes"in(h?.[0]??{})}):return n(c,h[0]);default:return h.length>1?r(p,...h):m(c,...h)}}}function jo(e,t){let{SymbolAndCustomProxyFactory:n,maybeFactory:r,WrapAnyFactory:o,verifyNothingness:a,determineType:s}=Eo(e,y),{xProxy:m,addSymbolicExtensions:g}=n(e,y,t),[x,S]=[r(),o(e,y)];return Object.freeze({shouldbeIsSingleObject:c,ISOneOf:h,isExcept:d,verifyNothingness:a,xProxy:m,determineType:s,addSymbolicExtensions:g,maybe:x,$Wrap:S});function y(i){return i?.[Symbol.proxy]??e(i)}function c(i,l){switch(!0){case"defaultValue"in l:return p(i,l);case"notTypes"in l:return d(i,l);default:return e(i,...[l.isTypes].flat())}}function h(i,...l){return l.some(u=>e(i,u))}function p(i,{defaultValue:l,isTypes:u=[void 0],notTypes:f}={}){return u=u?.constructor!==Array?[u]:u,f=f&&f?.constructor!==Array?[f]:[],f.length<1?e(i,...u)?i:l:d(i,{isTypes:u,notTypes:f})?i:l}function d(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,e(i,...l)&&!e(i,...u)}}function Eo(){let e={IS:"toa.is",TYPE:"toa.type",IS_SYMBOL:"toa.isASymbol",PROXY:"toa.proxy"},t={NAN:"NaN",INFINITY:"Infinity",BOOLEAN:"Boolean",OBJECT:"Object",PROXY_PREFIX:"Proxy ("};return Object.freeze({SymbolAndCustomProxyFactory:r,maybeFactory:p,WrapAnyFactory:h,verifyNothingness:d,determineType:g});function n(i,l){Symbol.is||(Symbol.is=Symbol.for(e.IS),Symbol.type=Symbol.for(e.TYPE),Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return l(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return i(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return l(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...f){return i(u,...f)},enumerable:!1,configurable:!1}}))}function r(i,l,u){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for(e.IS_SYMBOL)),{xProxy:s(),addSymbolicExtensions:()=>n(i,l)}}function o(i){return($o(i,!0)?{name:"unknown"}:Object.getPrototypeOf(i)?.constructor).name}function a(i,l){return Proxy=new i(i,{construct(u,f){let v=new u(...f);return Object.defineProperty(v,l,{value:`${t.PROXY_PREFIX}${o(f[0])})`}),v}}),Proxy}function s(){Symbol.proxy||(Symbol.proxy=Symbol.for(e.PROXY));let i=Proxy;return{native(){Proxy=i},custom(){Proxy=a(i,Symbol.proxy)}}}function m(i,...l){let u=l.length<1,f=i==null;return{noInput:f,noShouldbe:u,compareTo:!u&&l[0],inputCTOR:!f&&(i?.constructor||Object.getPrototypeOf(i)?.constructor),isNaN:Number.isNaN(i)||Fe({trial:v=>String(i)===t.NAN}),isInfinity:Fe({trial:v=>String(i)})===t.INFINITY,shouldBeFirstElementIsNothing:!u&&d(l[0])}}function g(i,...l){let{noInput:u,noShouldbe:f,compareTo:v,inputCTOR:j,isNaN:W,isInfinity:J,shouldBeFirstElementIsNothing:B}=m(i,...l);switch(l=l.length&&l[0],!0){case B:return String(i)===String(v);case(i?.[Symbol.proxy]&&f):return i[Symbol.proxy];case W:return f?t.NAN:String(v)===String(i);case J:return f?t.INFINITY:String(v)===String(i);case u:return f?String(i):String(v)===String(i);case j===Boolean:return f?t.BOOLEAN:j===l;default:return S(i,l,f,x(i,j))}}function x(i,l){switch(!0){case i===0:return Number;case i==="":return String;case!i:return{name:String(i)};default:return l}}function S(i,l,u,f){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case String(l)===t.NAN:return String(i)===t.NAN;case(i?.[Symbol.toStringTag]&&typeof l=="string"):return String(l)===i[Symbol.toStringTag];default:return l?c(i,l,f):y(i,f)}}function y(i,l){return(i?.[Symbol.toStringTag]??i?.prototype?.[Symbol.toStringTag])||l?.name||String(l)}function c(i,l,u){return Fe({trial:f=>i instanceof l})||l===u||l===Object.getPrototypeOf(u)||`${l?.name}`===u?.name}function h(i,l){return function(u){let f={get value(){return u},is(...v){return i(u,...v)},get type(){return l(u)}};return Object[Symbol.type]&&Object.defineProperties(f,{[Symbol.type]:{get(){return l(u)}},[Symbol.is]:{value(...v){return i(u,...v)}}}),Object.freeze(f)}}function p(){let i=l=>{};return function({trial:l,whenError:u=i}={}){try{return l()}catch(f){return u(f)}}}function d(i,l=!1){let u=i==null;return u=l?u||L(i,1/0)||L(i,NaN):u,u}}var Ze=qt(),ze=qt("");function qt(e,t={}){let{useSymbolicExtensions:n}=t;return e=L(e,String,Number)?String(e):void 0,n&&Re(),function(y,...c){return S(y,x(c))};function r(y,c){return c&&L(e,String,Number)?String(e):`{${y}}`}function o(y,c){let h=y in c;return h&&L(c[y],String,Number)?String(c[y]):r(y,h)}function a(y){return(...c)=>{let h=c.find(p=>p.key);return o(h?h.key:"_",y)}}function s(y,c){return y.replace(/\{(?<key>[a-z_\d]+)}/gim,a(c))}function m(y){let c=[];return Object.entries(y).forEach(([h,p])=>{p.forEach((d,i)=>(c[i]??={},c[i][h]=d))}),c}function g(y){return y.length===1&&Object.values(y[0]).every(Array.isArray)}function x(y){return g(y)?m(y[0]):y}function S(y,c){let h=c?.length?c.filter(p=>L(p,Object)).map((p,d)=>s(y,{...p,index:d+1})).join(""):y;return L(e,void 0)?h:h.replace(/\{[a-z_\d].+\}/gim,String(e))}}function Re(){return String.prototype[Symbol.for("interpolate")]||Object.defineProperties(String.prototype,{[Symbol.for("interpolate")]:{value(...e){return Ze(this,...e)}},[Symbol.for("interpolate$")]:{value(...e){return ze(this,...e)}}}),[Symbol.for("interpolate"),Symbol.for("interpolate$")]}Io();Do();var ei={interpolate:Ze,interpolateClear:ze,addSymbolicStringExtensions:Re};function Do(){/stackblitz/i.test(location.href)&&console.info("\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it."),document.addEventListener("click",e=>{if(e.target.href){let t=e.target;if(t.dataset.top||t.classList.contains("internalLink")||t.target==="_top")return top.location.href=t.href}return!0})}function ti(e=!0){let t=A('<ul id="log2screen">').first();function n(a=!1){let s=a?A.at.start:A.at.end;return m=>{if(m?.isJQx)return A.li(m.data.get("header")?{class:"head"}:"",m).renderTo(t,s);m=A.IS(m,String,Number,Symbol)?String(m):Co(m,e);let g=m.startsWith("!!");m=g?m.slice(2):m,A.li(g?{class:"head"}:"",m).renderTo(t,s)}}let[r,o]=[n(),n(!0)];return{log:(...a)=>a.forEach(r),logTop:(...a)=>a.forEach(o)}}function Co(e,t){try{return t?`<pre>${JSON.stringify(e,null,2)}</pre>`:JSON.stringify(e)}catch{return"Some [Object object] can not be converted to JSON"}}function Io(){A.editCssRules("li::marker{vertical-align:top;}","code{color:green;background-color:#eee;padding:2px;font-family:monospace;}","code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}","h3{marginTop:1.5rem;}",".thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}","a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}",".cmmt{color:#888;}",".hidden{display:none;}",".attention{color:red; font-size:1.2em; font-weight:bold;}","#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}","#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}",".err{fontStyle:italic; color:red; }","a{text-decoration:none; font-weight:bold;}","a:hover{text-decoration:underline;}","a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}",`a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`,`a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`)}export{A as $,w as $D,ti as logFactory,yo as regexhelper,ei as splatModule};
17
17
  //# sourceMappingURL=htmlhelpers.min.js.map