diff --git a/dist/assets/index-2eb46068.js b/dist/assets/index-2b6e3d14.js similarity index 97% rename from dist/assets/index-2eb46068.js rename to dist/assets/index-2b6e3d14.js index 53abcee..4921a39 100644 --- a/dist/assets/index-2eb46068.js +++ b/dist/assets/index-2b6e3d14.js @@ -26,7 +26,7 @@ object-assign `+l))}),t.state=i,Object.defineProperty(window.choo,"debug",{get:function(){return window.localStorage.logLevel="debug",n.emit("debug",!0),s=!0,Kl},set:function(o){tS.equal(typeof o,"boolean","choo-devtools.debug: bool should be type boolean"),window.localStorage.logLevel=o?"debug":"info",s=o,n.emit("debug",s),s?r.info(Kl):r.info(iS)}})}var eO=Qs;Qs.default=Qs;Qs.stable=nO;Qs.stableStringify=nO;var Ma="[...]",tO="[Circular]",Jn=[],Tn=[];function iO(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Qs(i,e,t,n){typeof n>"u"&&(n=iO()),xh(i,"",0,[],void 0,0,n);var r;try{Tn.length===0?r=JSON.stringify(i,e,t):r=JSON.stringify(i,rO(e),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Jn.length!==0;){var s=Jn.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return r}function pr(i,e,t,n){var r=Object.getOwnPropertyDescriptor(n,t);r.get!==void 0?r.configurable?(Object.defineProperty(n,t,{value:i}),Jn.push([n,t,e,r])):Tn.push([e,t,i]):(n[t]=i,Jn.push([n,t,e]))}function xh(i,e,t,n,r,s,o){s+=1;var a;if(typeof i=="object"&&i!==null){for(a=0;ao.depthLimit){pr(Ma,i,e,r);return}if(typeof o.edgesLimit<"u"&&t+1>o.edgesLimit){pr(Ma,i,e,r);return}if(n.push(i),Array.isArray(i))for(a=0;ae?1:0}function nO(i,e,t,n){typeof n>"u"&&(n=iO());var r=kh(i,"",0,[],void 0,0,n)||i,s;try{Tn.length===0?s=JSON.stringify(r,e,t):s=JSON.stringify(r,rO(e),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Jn.length!==0;){var o=Jn.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function kh(i,e,t,n,r,s,o){s+=1;var a;if(typeof i=="object"&&i!==null){for(a=0;ao.depthLimit){pr(Ma,i,e,r);return}if(typeof o.edgesLimit<"u"&&t+1>o.edgesLimit){pr(Ma,i,e,r);return}if(n.push(i),Array.isArray(i))for(a=0;a0)for(var n=0;n */var oS=aS;function aS(i){if(navigator.clipboard)return navigator.clipboard.writeText(i).catch(function(s){throw s!==void 0?s:new DOMException("The request is not allowed","NotAllowedError")});var e=document.createElement("span");e.textContent=i,e.style.whiteSpace="pre",e.style.webkitUserSelect="auto",e.style.userSelect="all",document.body.appendChild(e);var t=window.getSelection(),n=window.document.createRange();t.removeAllRanges(),n.selectNode(e),t.addRange(n);var r=!1;try{r=window.document.execCommand("copy")}catch(s){console.log("error",s)}return t.removeAllRanges(),window.document.body.removeChild(e),r?Promise.resolve():Promise.reject(new DOMException("The request is not allowed","NotAllowedError"))}var lS=eO,uS=oS;function hS(i){try{return JSON.stringify(i)}catch{}}function fS(i){var e=hS(i)||lS(i);uS(e)}var cS=fS,dS=pS;function pS(i,e){return arguments.length>=2?Td(i)(e):Td(i)}function Td(i){if(i=typeof i=="string"?String(i).trim().split("."):i,i.length<2)return i=i[0],t;var e=i.length;return n;function t(r){return r[i]}function n(r){for(var s=0;s"u");s++)r=r[i[s]];return r}}var gS=cS,mS=dS,yS=OS;function OS(i){var e=i&&typeof i=="string",t=e&&arguments.length===1&&i.indexOf("state.")===0;(!i||typeof i=="function")&&(i=window.choo.state),t&&[].push.call(arguments,{state:window.choo.state}),gS(e?mS.apply(this,arguments):i)}var _S=wS;function wS(){Object.defineProperty(window.choo,"help",{get:i,set:bS});function i(){return setTimeout(function(){di("copy","Serialize the current state to the clipboard."),di("debug","Enable Choo debug mode."),di("emit","Emit an event in the Choo emitter."),di("help","Print usage information."),di("log","Print the last 150 events emitted."),di("on","Listen for an event in the Choo emitter."),di("once","Listen for an event once in the Choo emitter."),di("perf","Print out performance metrics"),di("state","Print the Choo state object."),di("storage","Print browser storage information.")},0),"Choo command overview"}}function di(i,e){var t="#cc99cc";console.log(" %cchoo."+i,"color: "+t,"— "+e)}function bS(){}var vS=Hy,SS="█",xS=kS;function kS(i,e,t,n){var r={};window.choo.perf={};var s=new fs(r,"all");Object.defineProperty(window.choo.perf,"all",{get:s.get.bind(s),set:yo});var o=new fs(r,"core",function(u){return/^choo/.test(u)});Object.defineProperty(window.choo.perf,"core",{get:o.get.bind(o),set:yo});var a=new fs(r,"components",function(u){return!/^choo/.test(u)&&!/^bankai/.test(u)});Object.defineProperty(window.choo.perf,"components",{get:a.get.bind(a),set:yo});var l=new fs(r,"events",function(u){return/^choo\.emit/.test(u)},function(u){return u.replace(/^choo\.emit\('/,"").replace(/'\)$/,"")});Object.defineProperty(window.choo.perf,"events",{get:l.get.bind(l),set:yo}),vS(function(u){if(u.entryType==="measure"){var h=u.name.replace(/ .*$/,"");r[h]||(r[h]={name:h,count:0,entries:[]});var f=r[h];f.count+=1,f.entries.push(u.duration)}})}function fs(i,e,t,n){this.stats=i,this.name=e,this.filter=t||function(){return!0},this.rename=n||function(r){return r}}fs.prototype.get=function(){var i=Object.keys(this.stats).filter(this.filter),e=this,t=0,n=0,r=i.map(function(l){var u=e.stats[l],h=Number(u.entries.reduce(function(p,v){return p+v},0).toFixed(2));h>t&&(t=h);var f=TS(u.entries);f>n&&(n=f);var c=e.rename(u.name);return new MS(c,h,f,u.count)}),s=10;r.forEach(function(l){var u=l["Total Time (ms)"],h=l["Median (ms)"];l[" "]=o(u/t*100/s),l[" "]=o(h/n*100/s)});function o(l){for(var u="",h=0,f=Math.round(l);h=r||t<=0||e<0)){t=e+t>r?r-e:t;var s=r-t;for(n=e;n"u"&&(p=!0),typeof v>"u"&&(v=1/0);function S(T,k){if(T===null)return null;if(k===0)return T;var Q,C;if(typeof T!="object")return T;if(t(T,n))Q=new n;else if(t(T,r))Q=new r;else if(t(T,s))Q=new s(function(R,N){T.then(function(Y){R(S(Y,k-1))},function(Y){N(S(Y,k-1))})});else if(o.__isArray(T))Q=[];else if(o.__isRegExp(T))Q=new RegExp(T.source,f(T)),T.lastIndex&&(Q.lastIndex=T.lastIndex);else if(o.__isDate(T))Q=new Date(T.getTime());else{if(A&&Buffer.isBuffer(T))return Buffer.allocUnsafe?Q=Buffer.allocUnsafe(T.length):Q=new Buffer(T.length),T.copy(Q),Q;t(T,Error)?Q=Object.create(T):typeof x>"u"?(C=Object.getPrototypeOf(T),Q=Object.create(C)):(Q=Object.create(x),C=x)}if(p){var I=d.indexOf(T);if(I!=-1)return b[I];d.push(T),b.push(Q)}t(T,n)&&T.forEach(function(R,N){var Y=S(N,k-1),te=S(R,k-1);Q.set(Y,te)}),t(T,r)&&T.forEach(function(R){var N=S(R,k-1);Q.add(N)});for(var _ in T){var j;C&&(j=Object.getOwnPropertyDescriptor(C,_)),!(j&&j.set==null)&&(Q[_]=S(T[_],k-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(T),_=0;_Hl&&RS(s,0,v-Hl)})});function l(){setTimeout(function(){console.table(s)},0);var f=o===1?"event":"events",c=o+" "+f+" recorded, showing the last "+Hl+".";return r===!1?c+=" Enable state capture by calling `choo.debug`.":c+=" Disable state capture by calling `choo.debug = false`.",c}function u(f,c,p){this.name=f,this.data=c===void 0?"":c,this.state=r?h(p):""}function h(f){try{var c=JS(f);return a||(a=!0),c}catch{return a&&(PS.warn("Could not clone your app state. Make sure to have a serializable state so it can be cloned"),a=!1),""}}}function Ed(){}var Qd=Pt,LS=jS,sO=function(i,e){var t=e||"/",n={},r=i.nodes;return Object.keys(r).forEach(function(s){var o=(t==="/"?t:t+"/")+(s==="$$"?":"+i.name:s),a=r[s].cb;if(a!==void 0&&(n[o]=a),Object.keys(r[s].nodes).length!==0){var l=sO(r[s],o);Object.keys(l).forEach(function(u){n[u]=l[u]})}}),n};function jS(i){Qd.equal(typeof i,"function","wayfarer.getAllRoutes: router should be an function");var e=i._trie;Qd.equal(typeof e,"object","wayfarer.getAllRoutes: trie should be an object");var t=e.trie;return sO(t)}var DS=yl.EventEmitter,NS=cv,ZS=zv,FS=nS,XS=yS,GS=_S,WS=xS,YS=IS,zS=LS,VS=KS;function KS(i){return i=i||{},e.storeName="choo-devtools",e;function e(t,n,r){var s=new DS;typeof window<"u"&&ZS(t,n,i),n.on("DOMContentLoaded",function(){typeof window>"u"||(window.choo={},window.choo.state=t,window.choo.emit=function(){n.emit.apply(n,arguments)},window.choo.on=function(o,a){n.on(o,a)},FS(t,n,r,s),YS(t,n,r,s),WS(),window.choo.copy=XS,r.router&&r.router.router&&(window.choo.routes=Object.keys(zS(r.router.router))),NS(),GS())})}}const qS=zt(VS);var HS=e1;function e1(i,e){if(i)try{var t=document.querySelector(i);t&&t.scrollIntoView(e)}catch{}}var t1=i1;function i1(i){if(typeof document>"u")throw new Error("document-ready only runs in the browser");var e=document.readyState;if(e==="complete"||e==="interactive")return setTimeout(i,0);document.addEventListener("DOMContentLoaded",function(){i()})}var oO=no(),n1=Pt,Vi;_l.disabled=!0;try{Vi=window.performance,_l.disabled=window.localStorage.DISABLE_NANOTIMING==="true"||!Vi.mark}catch{}var ic=_l;function _l(i){if(n1.equal(typeof i,"string","nanotiming: name should be type string"),_l.disabled)return r1;var e=(Vi.now()*1e4).toFixed()%Number.MAX_SAFE_INTEGER,t="start-"+e+"-"+i;Vi.mark(t);function n(r){var s="end-"+e+"-"+i;Vi.mark(s),oO.push(function(){var o=null;try{var a=i+" ["+e+"]";Vi.measure(a,t,s),Vi.clearMarks(t),Vi.clearMarks(s)}catch(l){o=l}r&&r(o,i)})}return n.uuid=e,n}function r1(i){i&&oO.push(function(){i(new Error("nanotiming: performance API unavailable"))})}var Ta=Pt,s1=Mr;function Mr(){if(!(this instanceof Mr))return new Mr;this.trie={nodes:{}}}Mr.prototype.create=function(i){Ta.equal(typeof i,"string","route should be a string");var e=i.replace(/^\//,"").split("/");function t(n,r){var s=ua(e,n)&&e[n];if(s===!1)return r;var o=null;return/^:|^\*/.test(s)?(ua(r.nodes,"$$")?o=r.nodes.$$:(o={nodes:{}},r.nodes.$$=o),s[0]==="*"&&(r.wildcard=!0),r.name=s.replace(/^:|^\*/,"")):ua(r.nodes,s)?o=r.nodes[s]:(o={nodes:{}},r.nodes[s]=o),t(n+1,o)}return t(0,this.trie)};Mr.prototype.match=function(i){Ta.equal(typeof i,"string","route should be a string");var e=i.replace(/^\//,"").split("/"),t={};function n(s,o){if(o!==void 0){var a=e[s];if(a===void 0)return o;if(ua(o.nodes,a))return n(s+1,o.nodes[a]);if(o.name){try{t[o.name]=decodeURIComponent(a)}catch{return n(s,void 0)}return n(s+1,o.nodes.$$)}else if(o.wildcard){try{t.wildcard=decodeURIComponent(e.slice(s).join("/"))}catch{return n(s,void 0)}return o.nodes.$$}else return n(s+1)}}var r=n(0,this.trie);if(r)return r=Object.assign({},r),r.params=t,r};Mr.prototype.mount=function(i,e){Ta.equal(typeof i,"string","route should be a string"),Ta.equal(typeof e,"object","trie should be a object");var t=i.replace(/^\//,"").split("/"),n=null,r=null;if(t.length===1)r=t[0],n=this.create(r);else{var s=t.join("/");r=t[0],n=this.create(s)}Object.assign(n.nodes,e.nodes),e.name&&(n.name=e.name),n.nodes[""]&&(Object.keys(n.nodes[""]).forEach(function(o){o!=="nodes"&&(n[o]=n.nodes[""][o])}),Object.assign(n.nodes,n.nodes[""].nodes),delete n.nodes[""].nodes)};function ua(i,e){return Object.prototype.hasOwnProperty.call(i,e)}var eu=Pt,o1=s1,a1=Mh;function Mh(i){if(!(this instanceof Mh))return new Mh(i);var e=(i||"").replace(/^\//,""),t=o1();return r._trie=t,r.on=n,r.emit=r,r.match=s,r._wayfarer=!0,r;function n(a,l){if(eu.equal(typeof a,"string"),eu.equal(typeof l,"function"),a=a||"/",l._wayfarer&&l._trie)t.mount(a,l._trie.trie);else{var u=t.create(a);u.cb=l,u.route=a}return r}function r(a){var l=s(a),u=new Array(arguments.length);u[0]=l.params;for(var h=1;h=0;--u)l=n[u],a=l.name,r=l.namespaceURI,s=l.value,r?(a=l.localName||a,o=e.getAttributeNS(r,a),o!==s&&e.setAttributeNS(r,a,s)):e.hasAttribute(a)?(o=e.getAttribute(a),o!==s&&(s==="null"||s==="undefined"?e.removeAttribute(a):e.setAttribute(a,s))):e.setAttribute(a,s);for(var h=t.length-1;h>=0;--h)l=t[h],l.specified!==!1&&(a=l.name,r=l.namespaceURI,r?(a=l.localName||a,i.hasAttributeNS(r,a)||e.removeAttributeNS(r,a)):i.hasAttributeNS(null,a)||e.removeAttribute(a))}function M1(i,e){for(var t=0;t<_1;t++){var n=uO[t];i[n]?e[n]=i[n]:e[n]&&(e[n]=void 0)}}function T1(i,e){Th(i,e,"selected")}function C1(i,e){var t=i.value,n=e.value;Th(i,e,"checked"),Th(i,e,"disabled"),i.indeterminate!==e.indeterminate&&(e.indeterminate=i.indeterminate),e.type!=="file"&&(t!==n&&(e.setAttribute("value",t),e.value=t),t==="null"&&(e.value="",e.removeAttribute("value")),i.hasAttributeNS(null,"value")?e.type==="range"&&(e.value=t):e.removeAttribute("value"))}function E1(i,e){var t=i.value;if(t!==e.value&&(e.value=t),e.firstChild&&e.firstChild.nodeValue!==t){if(t===""&&e.firstChild.nodeValue===e.placeholder)return;e.firstChild.nodeValue=t}}function Th(i,e,t){i[t]!==e[t]&&(e[t]=i[t],i[t]?e.setAttribute(t,""):e.removeAttribute(t))}var tu=Pt,Q1=S1,A1=3,hO=R1;function R1(i,e,t){return tu.equal(typeof i,"object","nanomorph: oldTree should be an object"),tu.equal(typeof e,"object","nanomorph: newTree should be an object"),t&&t.childrenOnly?(fO(e,i),i):(tu.notEqual(e.nodeType,11,"nanomorph: newTree should have one root node (which is not a DocumentFragment)"),ha(e,i))}function ha(i,e){return e?i?i.isSameNode&&i.isSameNode(e)?e:i.tagName!==e.tagName||Ad(i)!==Ad(e)?i:(Q1(i,e),fO(i,e),e):null:i}function Ad(i){return i.dataset?i.dataset.nanomorphComponentId:void 0}function fO(i,e){for(var t,n,r,s,o=0,a=0;t=e.childNodes[a],n=i.childNodes[a-o],!(!t&&!n);a++)if(!n)e.removeChild(t),a--;else if(!t)e.appendChild(n),o++;else if(Rd(n,t))r=ha(n,t),r!==t&&(e.replaceChild(r,t),o++);else{s=null;for(var l=a;l"u","nanoraf: raf should be a function or undefined"),e||(e=window.requestAnimationFrame);var t=!1,n=null;return function(){n===null&&!t&&(t=!0,e(function(){t=!1;for(var o=n.length,a=new Array(o),l=0;l=s||n===0)){n=t+n>s?s-t:n;var o=s-n;for(r=t;r0&&this._emit(this._listeners[i],e),this._starListeners.length>0&&this._emit(this._starListeners,i,e,r.uuid),r(),this};Dt.prototype.on=Dt.prototype.addListener=function(i,e){return li.ok(typeof i=="string"||typeof i=="symbol","nanobus.on: eventName should be type string or symbol"),li.equal(typeof e,"function","nanobus.on: listener should be type function"),i==="*"?this._starListeners.push(e):(this._listeners[i]||(this._listeners[i]=[]),this._listeners[i].push(e)),this};Dt.prototype.prependListener=function(i,e){return li.ok(typeof i=="string"||typeof i=="symbol","nanobus.prependListener: eventName should be type string or symbol"),li.equal(typeof e,"function","nanobus.prependListener: listener should be type function"),i==="*"?this._starListeners.unshift(e):(this._listeners[i]||(this._listeners[i]=[]),this._listeners[i].unshift(e)),this};Dt.prototype.once=function(i,e){li.ok(typeof i=="string"||typeof i=="symbol","nanobus.once: eventName should be type string or symbol"),li.equal(typeof e,"function","nanobus.once: listener should be type function");var t=this;this.on(i,n);function n(){e.apply(t,arguments),t.removeListener(i,n)}return this};Dt.prototype.prependOnceListener=function(i,e){li.ok(typeof i=="string"||typeof i=="symbol","nanobus.prependOnceListener: eventName should be type string or symbol"),li.equal(typeof e,"function","nanobus.prependOnceListener: listener should be type function");var t=this;this.prependListener(i,n);function n(){e.apply(t,arguments),t.removeListener(i,n)}return this};Dt.prototype.removeListener=function(i,e){if(li.ok(typeof i=="string"||typeof i=="symbol","nanobus.removeListener: eventName should be type string or symbol"),li.equal(typeof e,"function","nanobus.removeListener: listener should be type function"),i==="*")return this._starListeners=this._starListeners.slice(),t(this._starListeners,e);return typeof this._listeners[i]<"u"&&(this._listeners[i]=this._listeners[i].slice()),t(this._listeners[i],e);function t(n,r){if(n){var s=n.indexOf(r);if(s!==-1)return F1(n,s,1),!0}}};Dt.prototype.removeAllListeners=function(i){return i?i==="*"?this._starListeners=[]:this._listeners[i]=[]:(this._starListeners=[],this._listeners={}),this};Dt.prototype.listeners=function(i){var e=i!=="*"?this._listeners[i]:this._starListeners,t=[];if(e)for(var n=e.length,r=0;r"u")&&i.length!==0){t===void 0&&(t=e,e=null),e&&(n!==void 0?t=[e].concat(t,n):t=[e].concat(t));for(var r=i.length,s=0;sthis.maxAge?(this.remove(i),!1):!0};Wt.prototype.get=function(i){if(typeof i!="string"&&(i=""+i),!!this.cache.hasOwnProperty(i)){var e=this.cache[i];if(this._checkAge(i,e))return this.head!==i&&(i===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=i,e.prev=this.head,e.next=null,this.head=i),e.value}};Wt.prototype.evict=function(){this.tail&&this.remove(this.tail)};var vs=Pt,$d=W1,Y1=rc;function rc(i,e,t){vs.ok(this instanceof rc,"ChooComponentCache should be created with `new`"),vs.equal(typeof i,"object","ChooComponentCache: state should be type object"),vs.equal(typeof e,"function","ChooComponentCache: emit should be type function"),typeof t=="number"?this.cache=new $d(t):this.cache=t||new $d(100),this.state=i,this.emit=e}rc.prototype.render=function(i,e){vs.equal(typeof i,"function","ChooComponentCache.render: Component should be type function"),vs.ok(typeof e=="string"||typeof e=="number","ChooComponentCache.render: id should be type string or type number");var t=this.cache.get(e);if(!t){for(var n=[],r=2,s=arguments.length;r is not the same type as the new node <"+n.nodeName.toLowerCase()+">.");var r=Qi("choo.morph");pO(e._tree,n),r(),t()})),dO(function(){e.emitter.emit(e._events.DOMCONTENTLOADED),e._loaded=!0}),i(),this._tree};ui.prototype.mount=function(e){var t=Qi("choo.mount('"+e+"')");if(typeof window!="object")return ze.ok(typeof e=="string","choo.mount: selector should be type String"),this.selector=e,t(),this;ze.ok(typeof e=="string"||typeof e=="object","choo.mount: selector should be type String or HTMLElement");var n=this;dO(function(){var r=Qi("choo.render"),s=n.start();typeof e=="string"?n._tree=document.querySelector(e):n._tree=e,ze.ok(n._tree,"choo.mount: could not query selector: "+e),ze.equal(n._tree.nodeName,s.nodeName,"choo.mount: The target node <"+n._tree.nodeName.toLowerCase()+"> is not the same type as the new node <"+s.nodeName.toLowerCase()+">.");var o=Qi("choo.morph");pO(n._tree,s),o(),r()}),t()};ui.prototype.toString=function(i,e){e=e||{},e.components=e.components||{},e.events=Object.assign({},e.events,this._events),ze.notEqual(typeof window,"object","choo.mount: window was found. .toString() must be called in Node, use .start() or .mount() if running in the browser"),ze.equal(typeof i,"string","choo.toString: location should be type string"),ze.equal(typeof e,"object","choo.toString: state should be type object"),this._setCache(e),this._matchRoute(e,i),this.emitter.removeAllListeners(),this._stores.forEach(function(n){n(e)});var t=this._prerender(e);return ze.ok(t,"choo.toString: no valid value returned for the route "+i),ze(!Array.isArray(t),"choo.toString: return value was an array for the route "+i),typeof t.outerHTML=="string"?t.outerHTML:t.toString()};ui.prototype._matchRoute=function(i,e){var t,n;e?(t=e.replace(/\?.+$/,"").replace(/\/$/,""),this._hashEnabled||(t=t.replace(/#.+$/,"")),n=e):(t=window.location.pathname.replace(/\/$/,""),this._hashEnabled&&(t+=window.location.hash.replace(/^#/,"/")),n=window.location.search);var r=this.router.match(t);this._handler=r.cb,i.href=t,i.query=V1(n),i.route=r.route,i.params=r.params};ui.prototype._prerender=function(i){var e=Qi("choo.prerender('"+i.route+"')"),t=this._handler(i,this.emit);return e(),t};ui.prototype._setCache=function(i){var e=new ex(i,this.emitter.emit.bind(this.emitter),this._cache);i.cache=t;function t(n,r){ze.equal(typeof n,"function","choo.state.cache: Component should be type function");for(var s=[],o=0,a=arguments.length;o{Ai=i},fa=(i,e="")=>{console.log("logging",i,e),Ai&&(Ai.innerHTML=` >> ${i} `)},rx=()=>{Ai&&(Ai.style.display="none")},sx=()=>{Ai&&(Ai.style.display="block")},ox=()=>{Ai.style.display=="none"?Ai.style.display="block":Ai.style.display="none"},ax={init:nx,log:fa,hide:rx,show:sx,toggle:ox},lx={eval:(i,e)=>{var t=`(async() => { ${i} })().catch(${r=>fa(r.message,"log-error")})`,n=!1;try{window.eval(t),fa("")}catch(r){n=!0,console.log("logging",r),fa(r.message,"log-error")}e&&e(t,n)}};function ux(i,e){i.showInfo=!1,i.showUI=!0,i.showExtensions=!1;const t="https://api.hydrasynth.xyz";i.serverURL=t,e.on("load and eval code",(r,s=!0)=>{e.emit("editor: load code",r),e.emit("repl: eval",r),s&&e.emit("gallery: save to URL",r)}),e.on("repl: eval",(r="",s)=>{lx.eval(r,s)}),e.on("screencap",()=>{screencap();const s=i.editor.editor.getValue(),o=new Blob([s],{type:"text/plain"}),a=document.createElement("a");a.style.display="none";let l=new Date;a.download=`hydra-${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}-${l.getHours()}.${l.getMinutes()}.${l.getSeconds()}.js`,a.href=URL.createObjectURL(o),a.click(),setTimeout(()=>{window.URL.revokeObjectURL(a.href)},300)});function n(){const r=i.editor.editor;hush(),speed=1,e.emit("gallery: clear"),r.clear()}e.on("clear all",()=>{n()}),e.on("ui: hide all",function(){i.showUI=!i.showUI,e.emit("render")}),e.on("ui: toggle info",function(r){i.showInfo?e.emit("ui: hide info"):e.emit("ui: show info")}),e.on("ui: show info",()=>{i.showInfo=!0,e.emit("render")}),e.on("ui: hide info",()=>{i.showInfo=!1,i.showExtensions=!1,e.emit("render")}),e.on("ui: show extensions",()=>{i.showExtensions=!0,i.showInfo=!0,e.emit("extensions: select category"),e.emit("render")}),e.on("ui: hide extensions",()=>{i.showExtensions=!1,e.emit("render")})}function oi(i){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(i)}function hi(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function hx(i,e){if(oi(i)!=="object"||i===null)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e||"default");if(oi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function gO(i){var e=hx(i,"string");return oi(e)==="symbol"?e:String(e)}function Bd(i,e){for(var t=0;ti.length)&&(e=i.length);for(var t=0,n=new Array(e);t1&&arguments[1]!==void 0?arguments[1]:{};hi(this,i),this.init(e,t)}return fi(i,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||mx,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),s=1;s-1?a.replace(/###/g,"."):a}function r(){return!i||typeof i=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(r())return{};var o=n(s.shift());!i[o]&&t&&(i[o]=new t),Object.prototype.hasOwnProperty.call(i,o)?i=i[o]:i={}}return r()?{}:{obj:i,k:n(s.shift())}}function Zd(i,e,t){var n=sc(i,e,Object),r=n.obj,s=n.k;r[s]=t}function _x(i,e,t,n){var r=sc(i,e,Object),s=r.obj,o=r.k;s[o]=s[o]||[],n&&(s[o]=s[o].concat(t)),n||s[o].push(t)}function Ca(i,e){var t=sc(i,e),n=t.obj,r=t.k;if(n)return n[r]}function Fd(i,e,t){var n=Ca(i,t);return n!==void 0?n:Ca(e,t)}function mO(i,e,t){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in i?typeof i[n]=="string"||i[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(i[n]=e[n]):mO(i[n],e[n],t):i[n]=e[n]);return i}function zn(i){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var wx={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function bx(i){return typeof i=="string"?i.replace(/[&<>"'\/]/g,function(e){return wx[e]}):i}var bl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,vx=[" ",",","?","!",";"];function Sx(i,e,t){e=e||"",t=t||"";var n=vx.filter(function(a){return e.indexOf(a)<0&&t.indexOf(a)<0});if(n.length===0)return!0;var r=new RegExp("(".concat(n.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),s=!r.test(i);if(!s){var o=i.indexOf(t);o>0&&!r.test(i.substring(0,o))&&(s=!0)}return s}function Xd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Oo(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yO(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(i){if(i[e])return i[e];for(var n=e.split(t),r=i,s=0;ss+o;)o++,a=n.slice(s,s+o).join(t),l=r[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var u=n.slice(s+o).join(t);return u?yO(l,u,t):void 0}r=r[n[s]]}return r}}var Mx=function(i){wl(t,i);var e=xx(t);function t(n){var r,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return hi(this,t),r=e.call(this),bl&&cn.call(un(r)),r.data=n||{},r.options=s,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.options.ignoreJSONStructure===void 0&&(r.options.ignoreJSONStructure=!0),r}return fi(t,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var s=this.options.ns.indexOf(r);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(r,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[r,s];o&&typeof o!="string"&&(h=h.concat(o)),o&&typeof o=="string"&&(h=h.concat(l?o.split(l):o)),r.indexOf(".")>-1&&(h=r.split("."));var f=Ca(this.data,h);return f||!u||typeof o!="string"?f:yO(this.data&&this.data[r]&&this.data[r][s],o,l)}},{key:"addResource",value:function(r,s,o,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var h=[r,s];o&&(h=h.concat(u?o.split(u):o)),r.indexOf(".")>-1&&(h=r.split("."),a=s,s=h[1]),this.addNamespaces(s),Zd(this.data,h,a),l.silent||this.emit("added",r,s,o,a)}},{key:"addResources",value:function(r,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in o)(typeof o[l]=="string"||Object.prototype.toString.apply(o[l])==="[object Array]")&&this.addResource(r,s,l,o[l],{silent:!0});a.silent||this.emit("added",r,s,o)}},{key:"addResourceBundle",value:function(r,s,o,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[r,s];r.indexOf(".")>-1&&(h=r.split("."),a=o,o=s,s=h[1]),this.addNamespaces(s);var f=Ca(this.data,h)||{};a?mO(f,o,l):f=Oo(Oo({},f),o),Zd(this.data,h,f),u.silent||this.emit("added",r,s,o)}},{key:"removeResourceBundle",value:function(r,s){this.hasResourceBundle(r,s)&&delete this.data[r][s],this.removeNamespaces(s),this.emit("removed",r,s)}},{key:"hasResourceBundle",value:function(r,s){return this.getResource(r,s)!==void 0}},{key:"getResourceBundle",value:function(r,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Oo(Oo({},{}),this.getResource(r,s)):this.getResource(r,s)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"hasLanguageSomeTranslations",value:function(r){var s=this.getDataByLanguage(r),o=s&&Object.keys(s)||[];return!!o.find(function(a){return s[a]&&Object.keys(s[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t}(cn),OO={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,s){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,n,r,s))}),t}};function Gd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function St(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wd={},Yd=function(i){wl(t,i);var e=Tx(t);function t(n){var r,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return hi(this,t),r=e.call(this),bl&&cn.call(un(r)),Ox(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,un(r)),r.options=s,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=Mi.create("translator"),r}return fi(t,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(r==null)return!1;var o=this.resolve(r,s);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(r,s){var o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],u=o&&r.indexOf(o)>-1,h=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!Sx(r,o,a);if(u&&!h){var f=r.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:r,namespaces:l};var c=r.split(o);(o!==a||o===a&&this.options.ns.indexOf(c[0])>-1)&&(l=c.shift()),r=c.join(a)}return typeof l=="string"&&(l=[l]),{key:r,namespaces:l}}},{key:"translate",value:function(r,s,o){var a=this;if(oi(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,h=this.extractFromKey(r[r.length-1],s),f=h.key,c=h.namespaces,p=c[c.length-1],v=s.lng||this.language,x=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(x){var m=s.nsSeparator||this.options.nsSeparator;return l?(d.res="".concat(p).concat(m).concat(f),d):"".concat(p).concat(m).concat(f)}return l?(d.res=f,d):f}var d=this.resolve(r,s),b=d&&d.res,A=d&&d.usedKey||f,S=d&&d.exactUsedKey||f,T=Object.prototype.toString.apply(b),k=["[object Number]","[object Function]","[object RegExp]"],Q=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,I=typeof b!="string"&&typeof b!="boolean"&&typeof b!="number";if(C&&b&&I&&k.indexOf(T)<0&&!(typeof Q=="string"&&T==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,b,St(St({},s),{},{ns:c})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(d.res=_,d):_}if(u){var j=T==="[object Array]",D=j?[]:{},V=j?S:A;for(var ee in b)if(Object.prototype.hasOwnProperty.call(b,ee)){var B="".concat(V).concat(u).concat(ee);D[ee]=this.translate(B,St(St({},s),{joinArrays:!1,ns:c})),D[ee]===B&&(D[ee]=b[ee])}b=D}}else if(C&&typeof Q=="string"&&T==="[object Array]")b=b.join(Q),b&&(b=this.extendTranslation(b,r,s,o));else{var Z=!1,R=!1,N=s.count!==void 0&&typeof s.count!="string",Y=t.hasDefaultValue(s),te=N?this.pluralResolver.getSuffix(v,s.count,s):"",se=s["defaultValue".concat(te)]||s.defaultValue;!this.isValidLookup(b)&&Y&&(Z=!0,b=se),this.isValidLookup(b)||(R=!0,b=f);var le=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ue=le&&R?void 0:b,de=Y&&se!==b&&this.options.updateMissing;if(R||Z||de){if(this.logger.log(de?"updateKey":"missingKey",v,p,f,de?se:b),u){var Qe=this.resolve(f,St(St({},s),{},{keySeparator:!1}));Qe&&Qe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var W=[],G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(var ne=0;ne1&&arguments[1]!==void 0?arguments[1]:{},a,l,u,h,f;return typeof r=="string"&&(r=[r]),r.forEach(function(c){if(!s.isValidLookup(a)){var p=s.extractFromKey(c,o),v=p.key;l=v;var x=p.namespaces;s.options.fallbackNS&&(x=x.concat(s.options.fallbackNS));var m=o.count!==void 0&&typeof o.count!="string",d=m&&!o.ordinal&&o.count===0&&s.pluralResolver.shouldUseIntlApi(),b=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",A=o.lngs?o.lngs:s.languageUtils.toResolveHierarchy(o.lng||s.language,o.fallbackLng);x.forEach(function(S){s.isValidLookup(a)||(f=S,!Wd["".concat(A[0],"-").concat(S)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(f)&&(Wd["".concat(A[0],"-").concat(S)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(A.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),A.forEach(function(T){if(!s.isValidLookup(a)){h=T;var k=[v];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(k,v,T,S,o);else{var Q;m&&(Q=s.pluralResolver.getSuffix(T,o.count,o));var C="".concat(s.options.pluralSeparator,"zero");if(m&&(k.push(v+Q),d&&k.push(v+C)),b){var I="".concat(v).concat(s.options.contextSeparator).concat(o.context);k.push(I),m&&(k.push(I+Q),d&&k.push(I+C))}}for(var _;_=k.pop();)s.isValidLookup(a)||(u=_,a=s.getResource(T,S,_,o))}}))})}}),{res:a,usedKey:l,exactUsedKey:u,usedLng:h,usedNS:f}}},{key:"isValidLookup",value:function(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,s,o,a):this.resourceStore.getResource(r,s,o,a)}}],[{key:"hasDefaultValue",value:function(r){var s="defaultValue";for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&s===o.substring(0,s.length)&&r[o]!==void 0)return!0;return!1}}]),t}(cn);function nu(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Ex=function(){function i(e){hi(this,i),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Mi.create("languageUtils")}return fi(i,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map(function(s){return s.toLowerCase()}):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=nu(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=nu(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=nu(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var n=this;if(!t)return null;var r;return t.forEach(function(s){if(!r){var o=n.formatLanguageCode(s);(!n.options.supportedLngs||n.isSupportedCode(o))&&(r=o)}}),!r&&this.options.supportedLngs&&t.forEach(function(s){if(!r){var o=n.getLanguagePartFromCode(s);if(n.isSupportedCode(o))return r=o;r=n.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}},{key:"getFallbackCodes",value:function(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,n){var r=this,s=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=function(u){u&&(r.isSupportedCode(u)?o.push(u):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),s.forEach(function(l){o.indexOf(l)<0&&a(r.formatLanguageCode(l))}),o}}]),i}(),Qx=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ax={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},Rx=["v1","v2","v3"],zd={zero:0,one:1,two:2,few:3,many:4,other:5};function Ux(){var i={};return Qx.forEach(function(e){e.lngs.forEach(function(t){i[t]={numbers:e.nr,plurals:Ax[e.fc]}})}),i}var $x=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hi(this,i),this.languageUtils=e,this.options=t,this.logger=Mi.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Ux()}return fi(i,[{key:"addRule",value:function(t,n){this.rules[t]=n}},{key:"getRule",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(function(s){return"".concat(n).concat(s)})}},{key:"getSuffixes",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(t,r);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(o,a){return zd[o]-zd[a]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):s.numbers.map(function(o){return n.getSuffix(t,o,r)}):[]}},{key:"getSuffix",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(t,r);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(n)):this.getSuffixRetroCompatible(s,n):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,n){var r=this,s=t.noAbs?t.plurals(n):t.plurals(Math.abs(n)),o=t.numbers[s];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!Rx.includes(this.options.compatibilityJSON)}}]),i}();function Vd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function qt(i){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};hi(this,i),this.logger=Mi.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return fi(i,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=n.escape!==void 0?n.escape:bx,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?zn(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?zn(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?zn(n.nestingPrefix):n.nestingPrefixEscaped||zn("$t("),this.nestingSuffix=n.nestingSuffix?zn(n.nestingSuffix):n.nestingSuffixEscaped||zn(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,n,r,s){var o=this,a,l,u,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(m){return m.replace(/\$/g,"$$$$")}var c=function(d){if(d.indexOf(o.formatSeparator)<0){var b=Fd(n,h,d);return o.alwaysFormat?o.format(b,void 0,r,qt(qt(qt({},s),n),{},{interpolationkey:d})):b}var A=d.split(o.formatSeparator),S=A.shift().trim(),T=A.join(o.formatSeparator).trim();return o.format(Fd(n,h,S),T,r,qt(qt(qt({},s),n),{},{interpolationkey:S}))};this.resetRegExp();var p=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,v=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(d){return f(d)}},{regex:this.regexp,safeValue:function(d){return o.escapeValue?f(o.escape(d)):f(d)}}];return x.forEach(function(m){for(u=0;a=m.regex.exec(t);){var d=a[1].trim();if(l=c(d),l===void 0)if(typeof p=="function"){var b=p(t,a,s);l=typeof b=="string"?b:""}else if(s&&s.hasOwnProperty(d))l="";else if(v){l=a[0];continue}else o.logger.warn("missed to pass in variable ".concat(d," for interpolating ").concat(t)),l="";else typeof l!="string"&&!o.useRawValueToEscape&&(l=Nd(l));var A=m.safeValue(l);if(t=t.replace(a[0],A),v?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,u++,u>=o.maxReplaces)break}}),t}},{key:"nest",value:function(t,n){var r=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,l=qt({},s);l.applyPostProcessor=!1,delete l.defaultValue;function u(p,v){var x=this.nestingOptionsSeparator;if(p.indexOf(x)<0)return p;var m=p.split(new RegExp("".concat(x,"[ ]*{"))),d="{".concat(m[1]);p=m[0],d=this.interpolate(d,l);var b=d.match(/'/g),A=d.match(/"/g);(b&&b.length%2===0&&!A||A.length%2!==0)&&(d=d.replace(/'/g,'"'));try{l=JSON.parse(d),v&&(l=qt(qt({},v),l))}catch(S){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),S),"".concat(p).concat(x).concat(d)}return delete l.defaultValue,p}for(;o=this.nestingRegexp.exec(t);){var h=[],f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var c=o[1].split(this.formatSeparator).map(function(p){return p.trim()});o[1]=c.shift(),h=c,f=!0}if(a=n(u.call(this,o[1].trim(),l),l),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=Nd(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),f&&(a=h.reduce(function(p,v){return r.format(p,v,s.lng,qt(qt({},s),{},{interpolationkey:o[1].trim()}))},a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),i}();function Kd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Yi(i){for(var e=1;e-1){var n=i.split("(");e=n[0].toLowerCase().trim();var r=n[1].substring(0,n[1].length-1);if(e==="currency"&&r.indexOf(":")<0)t.currency||(t.currency=r.trim());else if(e==="relativetime"&&r.indexOf(":")<0)t.range||(t.range=r.trim());else{var s=r.split(";");s.forEach(function(o){if(o){var a=o.split(":"),l=gx(a),u=l[0],h=l.slice(1),f=h.join(":").trim().replace(/^'+|'+$/g,"");t[u.trim()]||(t[u.trim()]=f),f==="false"&&(t[u.trim()]=!1),f==="true"&&(t[u.trim()]=!0),isNaN(f)||(t[u.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:t}}function Vn(i){var e={};return function(n,r,s){var o=r+JSON.stringify(s),a=e[o];return a||(a=i(r,s),e[o]=a),a(n)}}var Ix=function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hi(this,i),this.logger=Mi.create("formatter"),this.options=e,this.formats={number:Vn(function(t,n){var r=new Intl.NumberFormat(t,n);return function(s){return r.format(s)}}),currency:Vn(function(t,n){var r=new Intl.NumberFormat(t,Yi(Yi({},n),{},{style:"currency"}));return function(s){return r.format(s)}}),datetime:Vn(function(t,n){var r=new Intl.DateTimeFormat(t,Yi({},n));return function(s){return r.format(s)}}),relativetime:Vn(function(t,n){var r=new Intl.RelativeTimeFormat(t,Yi({},n));return function(s){return r.format(s,n.range||"day")}}),list:Vn(function(t,n){var r=new Intl.ListFormat(t,Yi({},n));return function(s){return r.format(s)}})},this.init(e)}return fi(i,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},r=n.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(t,n){this.formats[t.toLowerCase().trim()]=n}},{key:"addCached",value:function(t,n){this.formats[t.toLowerCase().trim()]=Vn(n)}},{key:"format",value:function(t,n,r,s){var o=this,a=n.split(this.formatSeparator),l=a.reduce(function(u,h){var f=Jx(h),c=f.formatName,p=f.formatOptions;if(o.formats[c]){var v=u;try{var x=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=x.locale||x.lng||s.locale||s.lng||r;v=o.formats[c](u,m,Yi(Yi(Yi({},p),s),x))}catch(d){o.logger.warn(d)}return v}else o.logger.warn("there was no format function for ".concat(c));return u},t);return l}}]),i}();function qd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Hd(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jx(i,e){i.pending[e]!==void 0&&(delete i.pending[e],i.pendingCount--)}var Dx=function(i){wl(t,i);var e=Bx(t);function t(n,r,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return hi(this,t),o=e.call(this),bl&&cn.call(un(o)),o.backend=n,o.store=r,o.services=s,o.languageUtils=s.languageUtils,o.options=a,o.logger=Mi.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(s,a.backend,a),o}return fi(t,[{key:"queueLoad",value:function(r,s,o,a){var l=this,u={},h={},f={},c={};return r.forEach(function(p){var v=!0;s.forEach(function(x){var m="".concat(p,"|").concat(x);!o.reload&&l.store.hasResourceBundle(p,x)?l.state[m]=2:l.state[m]<0||(l.state[m]===1?h[m]===void 0&&(h[m]=!0):(l.state[m]=1,v=!1,h[m]===void 0&&(h[m]=!0),u[m]===void 0&&(u[m]=!0),c[x]===void 0&&(c[x]=!0)))}),v||(f[p]=!0)}),(Object.keys(u).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(u),pending:Object.keys(h),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(r,s,o){var a=r.split("|"),l=a[0],u=a[1];s&&this.emit("failedLoading",l,u,s),o&&this.store.addResourceBundle(l,u,o),this.state[r]=s?-1:2;var h={};this.queue.forEach(function(f){_x(f.loaded,[l],u),jx(f,r),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(c){h[c]||(h[c]={});var p=f.loaded[c];p.length&&p.forEach(function(v){h[c][v]===void 0&&(h[c][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(r,s,o){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!r.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:r,ns:s,fcName:o,tried:l,wait:u,callback:h});return}return this.readingCalls++,this.backend[o](r,s,function(f,c){if(a.readingCalls--,a.waitingReads.length>0){var p=a.waitingReads.shift();a.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(f&&c&&l2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof s=="string"&&(s=[s]);var u=this.queueLoad(r,s,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(h){o.loadOne(h)})}},{key:"load",value:function(r,s,o){this.prepareLoading(r,s,{},o)}},{key:"reload",value:function(r,s,o){this.prepareLoading(r,s,{reload:!0},o)}},{key:"loadOne",value:function(r){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=r.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,function(h,f){h&&s.logger.warn("".concat(o,"loading namespace ").concat(u," for language ").concat(l," failed"),h),!h&&f&&s.logger.log("".concat(o,"loaded namespace ").concat(u," for language ").concat(l),f),s.loaded(r,h,f)})}},{key:"saveMissing",value:function(r,s,o,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}o==null||o===""||(this.backend&&this.backend.create&&this.backend.create(r,s,o,a,null,Hd(Hd({},u),{},{isUpdate:l})),!(!r||!r[0])&&this.store.addResource(r[0],s,o,a))}}]),t}(cn);function Nx(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(oi(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),oi(e[2])==="object"||oi(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(r){t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ep(i){return typeof i.ns=="string"&&(i.ns=[i.ns]),typeof i.fallbackLng=="string"&&(i.fallbackLng=[i.fallbackLng]),typeof i.fallbackNS=="string"&&(i.fallbackNS=[i.fallbackNS]),i.supportedLngs&&i.supportedLngs.indexOf("cimode")<0&&(i.supportedLngs=i.supportedLngs.concat(["cimode"])),i}function tp(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function pi(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _o(){}function Xx(i){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(i));e.forEach(function(t){typeof i[t]=="function"&&(i[t]=i[t].bind(i))})}var Ea=function(i){wl(t,i);var e=Zx(t);function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(hi(this,t),n=e.call(this),bl&&cn.call(un(n)),n.options=ep(r),n.services={},n.logger=Mi,n.modules={external:[]},Xx(un(n)),s&&!n.isInitialized&&!r.isClone){if(!n.options.initImmediate)return n.init(r,s),ro(n,un(n));setTimeout(function(){n.init(r,s)},0)}return n}return fi(t,[{key:"init",value:function(){var r=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(o=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var a=Nx();this.options=pi(pi(pi({},a),this.options),ep(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=pi(pi({},a.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Mi.init(l(this.modules.logger),this.options):Mi.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Ix);var h=new Ex(this.options);this.store=new Mx(this.options.resources,this.options);var f=this.services;f.logger=Mi,f.resourceStore=this.store,f.languageUtils=h,f.pluralResolver=new $x(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(f.formatter=l(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Px(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Dx(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(d){for(var b=arguments.length,A=new Array(b>1?b-1:0),S=1;S1?b-1:0),S=1;S0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(d){r[d]=function(){var b;return(b=r.store)[d].apply(b,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(d){r[d]=function(){var b;return(b=r.store)[d].apply(b,arguments),r}});var x=Kr(),m=function(){var b=function(S,T){r.isInitialized&&!r.initializedStoreOnce&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),x.resolve(T),o(S,T)};if(r.languages&&r.options.compatibilityAPI!=="v1"&&!r.isInitialized)return b(null,r.t.bind(r));r.changeLanguage(r.options.lng,b)};return this.options.resources||!this.options.initImmediate?m():setTimeout(m,0),x}},{key:"loadResources",value:function(r){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_o,a=o,l=typeof r=="string"?r:this.language;if(typeof r=="function"&&(a=r),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var u=[],h=function(p){if(p){var v=s.services.languageUtils.toResolveHierarchy(p);v.forEach(function(x){u.indexOf(x)<0&&u.push(x)})}};if(l)h(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(c){return h(c)})}this.options.preload&&this.options.preload.forEach(function(c){return h(c)}),this.services.backendConnector.load(u,this.options.ns,function(c){!c&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),a(c)})}else a(null)}},{key:"reloadResources",value:function(r,s,o){var a=Kr();return r||(r=this.languages),s||(s=this.options.ns),o||(o=_o),this.services.backendConnector.reload(r,s,function(l){a.resolve(),o(l)}),a}},{key:"use",value:function(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&OO.addPostProcessor(r),r.type==="formatter"&&(this.modules.formatter=r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"setResolvedLanguage",value:function(r){if(!(!r||!this.languages)&&!(["cimode","dev"].indexOf(r)>-1))for(var s=0;s-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(r,s){var o=this;this.isLanguageChangingTo=r;var a=Kr();this.emit("languageChanging",r);var l=function(c){o.language=c,o.languages=o.services.languageUtils.toResolveHierarchy(c),o.resolvedLanguage=void 0,o.setResolvedLanguage(c)},u=function(c,p){p?(l(p),o.translator.changeLanguage(p),o.isLanguageChangingTo=void 0,o.emit("languageChanged",p),o.logger.log("languageChanged",p)):o.isLanguageChangingTo=void 0,a.resolve(function(){return o.t.apply(o,arguments)}),s&&s(c,function(){return o.t.apply(o,arguments)})},h=function(c){!r&&!c&&o.services.languageDetector&&(c=[]);var p=typeof c=="string"?c:o.services.languageUtils.getBestMatchFromCodes(c);p&&(o.language||l(p),o.translator.language||o.translator.changeLanguage(p),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(p)),o.loadResources(p,function(v){u(v,p)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(h):h(r),a}},{key:"getFixedT",value:function(r,s,o){var a=this,l=function u(h,f){var c;if(oi(f)!=="object"){for(var p=arguments.length,v=new Array(p>2?p-2:0),x=2;x1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var h=function(p,v){var x=s.services.backendConnector.state["".concat(p,"|").concat(v)];return x===-1||x===2};if(o.precheck){var f=o.precheck(this,h);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,r)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(a,r)&&(!l||h(u,r)))}},{key:"loadNamespaces",value:function(r,s){var o=this,a=Kr();return this.options.ns?(typeof r=="string"&&(r=[r]),r.forEach(function(l){o.options.ns.indexOf(l)<0&&o.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),s&&s(l)}),a):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(r,s){var o=Kr();typeof r=="string"&&(r=[r]);var a=this.options.preload||[],l=r.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){o.resolve(),s&&s(u)}),o):(s&&s(),Promise.resolve())}},{key:"dir",value:function(r){if(r||(r=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!r)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>-1||r.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var r=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_o,a=pi(pi(pi({},this.options),s),{isClone:!0}),l=new t(a);(s.debug!==void 0||s.prefix!==void 0)&&(l.logger=l.logger.clone(s));var u=["store","services","language"];return u.forEach(function(h){l[h]=r[h]}),l.services=pi({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Yd(l.services,l.options),l.translator.on("*",function(h){for(var f=arguments.length,c=new Array(f>1?f-1:0),p=1;p0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new Ea(i,e)});var Ge=Ea.createInstance();Ge.createInstance=Ea.createInstance;Ge.createInstance;Ge.init;Ge.loadResources;Ge.reloadResources;Ge.use;Ge.changeLanguage;Ge.getFixedT;Ge.t;Ge.exists;Ge.setDefaultNamespace;Ge.hasLoadedNamespace;Ge.loadNamespaces;Ge.loadLanguages;var _O=[],Gx=_O.forEach,Wx=_O.slice;function Yx(i){return Gx.call(Wx.call(arguments,1),function(e){if(e)for(var t in e)i[t]===void 0&&(i[t]=e[t])}),i}var ip=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,zx=function(e,t,n){var r=n||{};r.path=r.path||"/";var s=encodeURIComponent(t),o="".concat(e,"=").concat(s);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!ip.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!ip.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite){var l=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(l){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},np={create:function(e,t,n,r){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=zx(e,encodeURIComponent(t),s)},read:function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1),s=r.split("&"),o=0;o0){var l=s[o].substring(0,a);l===e.lookupQuerystring&&(t=s[o].substring(a+1))}}}return t}},qr=null,rp=function(){if(qr!==null)return qr;try{qr=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{qr=!1}return qr},qx={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&rp()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&rp()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Hr=null,sp=function(){if(Hr!==null)return Hr;try{Hr=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Hr=!1}return Hr},Hx={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&sp()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&sp()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},ek={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n0?t:void 0}},tk={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},ik={name:"path",lookup:function(e){var t;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof n[e.lookupFromPathIndex]!="string")return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},nk={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};function rk(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var wO=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hi(this,i),this.type="languageDetector",this.detectors={},this.init(e,t)}return fi(i,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Yx(n,this.options||{},rk()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Vx),this.addDetector(Kx),this.addDetector(qx),this.addDetector(Hx),this.addDetector(ek),this.addDetector(tk),this.addDetector(ik),this.addDetector(nk)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var n=this;t||(t=this.options.order);var r=[];return t.forEach(function(s){if(n.detectors[s]){var o=n.detectors[s].lookup(n.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(t,n){var r=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(function(s){r.detectors[s]&&r.detectors[s].cacheUserLanguage(t,r.options)}))}}]),i}();wO.type="languageDetector";const bO={en:{translation:{"language-name":"english",toolbar:{run:"Run all code (ctrl+shift+enter)",upload:"upload to gallery",clear:"clear all",shuffle:"show random sketch",random:"make random change","load-extension":"load library or extension","show-info":"show info window","hide-info":"hide info window"},info:{title:"hydra",subtitle:"live coding video synth",description:"Hydra is live code-able video synth and coding environment that runs directly in the browser. It is free and open-source and made for beginners and experts alike.","get-started-title":"To get started:","get-started-list":["Close this window","Change some numbers","Type Ctrl + Shift + Enter"],"description-detailed":"Hydra is written in JavaScript and compiles to WebGL under the hood. The syntax is inspired by analog modular synthesis, in which chaining or patching a set of transformations together generates a visual result.",uses:"Hydra can be used:","uses-list":["to mix and add effects to camera feeds, screenshares, live streams, and videos","to create generative and audio-reactive visuals, and share them online with others","in combination with other javascript libraries such as P5.js, Tone.js, THREE.js, or gibber","to add interactive video effects to a website","to experiment with and learn about video feedback, fractals, and pixel operations","to stream video between browsers and live-jam with others online"],author:"Created by olivia.","more-info":"For more information and instructions, see: the interactive documentation, a list of hydra functions, the community database of projects and tutorials, a gallery of user-generated sketches, and the source code on github,","more-info-forums":"There is also an active Discord server and facebook group for hydra users+contributors.",support:"If you enjoy using Hydra, please consider supporting continued development <3 ."},extensions:{"about-extensions":"Load community extensions to hydra-synth."}}}},sk=["ja","es","ar","id","pt-br","ch"],ok=i=>`https://raw.githubusercontent.com/hydra-synth/l10n/main/${i}/editor.json`;Ge.use(wO).init({debug:!0,fallbackLng:"en",partialBundledLanguages:!0,resources:bO});function ak(i,e){const t={};let n=new URLSearchParams(window.location.search),r=n.get("l10n-lang"),s=n.get("l10n-url");sk.forEach(l=>{a(l,ok(l))}),r!==null&&s!==null&&a(r,s),o(),e.on("set language",l=>{Ge.changeLanguage(l,(u,h)=>{i.translation.selectedLanguage=l,e.emit("render")})});function o(){Object.keys(bO).forEach(l=>{const u=l.split("-")[0];t[u]=Ge.getFixedT(u)("language-name")}),i.translation={t:Ge.t,languages:t,selectedLanguage:Ge.language,textDirection:Ge.language==="ar"?"rtl":"ltr"}}function a(l="es",u){const h="color: purple; background: orange; font-size: 14px;padding:10px";console.log(`%cloading translation for ${l} from ${u}`,h),fetch(u).then(f=>f.ok?f.json():f.text().then(c=>{throw new Error(c)})).then(f=>{window.i18n=Ge,console.log("adding language",l,f);const c=l.split("-")[0];Ge.addResourceBundle(c,"translation",f),o(),e.emit("render")})}}const lk="https://raw.githubusercontent.com/hydra-synth/hydra-extensions/main/";async function uk(i,e){i.extensions={baseURL:lk,selectedCategoryIndex:0,categories:[{name:"extensions",slug:"extensions",entries:[],hasLoaded:!1},{name:"external libraries",slug:"external-libraries",entries:[],hasLoaded:!1},{name:"examples",slug:"examples",entries:[],hasLoaded:!1}]},e.on("extensions: select category",(t=i.extensions.selectedCategoryIndex)=>{i.extensions.selectedCategoryIndex=t,e.emit("render");const n=i.extensions.categories[t];if(!n.hasLoaded){const r=i.extensions.baseURL+n.slug+".json?laskd";fetch(r).then(s=>s.json()).then(s=>{console.log("loaded d",s),s.forEach(o=>{o.thumbnail=i.extensions.baseURL+"thumbnails/"+o.thumbnail}),n.entries=s,e.emit("render")})}}),e.on("extensions: add to editor",t=>{const{categories:n,selectedCategoryIndex:r}=i.extensions,s=n[r].entries[t].load;e.emit("editor: add code to top",s)}),e.on("extensions: load example",(t,n)=>{const{categories:r,selectedCategoryIndex:s}=i.extensions,o=r[s].entries[t].examples[n],a=new URL(o);console.log(a,i.gallery),i.gallery.setSketchFromURL(a.search,l=>{e.emit("load and eval code",l)})})}function hk(i,e){e.on("editor: randomize",function(t){const n=i.editor.editor;t.shiftKey?n.mutator.doUndo():(n.mutator.mutate({reroll:!1,changeTransform:t.metaKey}),n.formatCode(),e.emit("gallery: save to URL",n.getValue()))}),e.on("editor: add code to top",t=>{i.editor.editor.addCodeToTop(t)}),e.on("editor: trigger eval",()=>{i.editor.editor.flashCode()}),e.on("editor: format code",()=>{i.editor.editor.formatCode()}),e.on("editor: load code",t=>{i.editor.editor.setValue(t)})}var Eh={exports:{}},vO={exports:{}};(function(i){i.exports=e;function e(n){if(n)return t(n)}function t(n){for(var r in e.prototype)n[r]=e.prototype[r];return n}e.prototype.on=e.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this},e.prototype.once=function(n,r){function s(){this.off(n,s),r.apply(this,arguments)}return s.fn=r,this.on(n,s),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,a=0;a"u"||!at?be:at(Uint8Array),Rn={"%AggregateError%":typeof AggregateError>"u"?be:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?be:ArrayBuffer,"%ArrayIteratorPrototype%":Kn&&at?at([][Symbol.iterator]()):be,"%AsyncFromSyncIteratorPrototype%":be,"%AsyncFunction%":sr,"%AsyncGenerator%":sr,"%AsyncGeneratorFunction%":sr,"%AsyncIteratorPrototype%":sr,"%Atomics%":typeof Atomics>"u"?be:Atomics,"%BigInt%":typeof BigInt>"u"?be:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?be:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?be:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?be:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?be:Float32Array,"%Float64Array%":typeof Float64Array>"u"?be:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?be:FinalizationRegistry,"%Function%":SO,"%GeneratorFunction%":sr,"%Int8Array%":typeof Int8Array>"u"?be:Int8Array,"%Int16Array%":typeof Int16Array>"u"?be:Int16Array,"%Int32Array%":typeof Int32Array>"u"?be:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kn&&at?at(at([][Symbol.iterator]())):be,"%JSON%":typeof JSON=="object"?JSON:be,"%Map%":typeof Map>"u"?be:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kn||!at?be:at(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?be:Promise,"%Proxy%":typeof Proxy>"u"?be:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?be:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?be:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kn||!at?be:at(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?be:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kn&&at?at(""[Symbol.iterator]()):be,"%Symbol%":Kn?Symbol:be,"%SyntaxError%":Cr,"%ThrowTypeError%":Sk,"%TypedArray%":kk,"%TypeError%":gr,"%Uint8Array%":typeof Uint8Array>"u"?be:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?be:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?be:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?be:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?be:WeakMap,"%WeakRef%":typeof WeakRef>"u"?be:WeakRef,"%WeakSet%":typeof WeakSet>"u"?be:WeakSet};if(at)try{null.error}catch(i){var Mk=at(at(i));Rn["%Error.prototype%"]=Mk}var Tk=function i(e){var t;if(e==="%AsyncFunction%")t=su("async function () {}");else if(e==="%GeneratorFunction%")t=su("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=su("async function* () {}");else if(e==="%AsyncGenerator%"){var n=i("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var r=i("%AsyncGenerator%");r&&at&&(t=at(r.prototype))}return Rn[e]=t,t},lp={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},so=oc,Qa=vk,Ck=so.call(Function.call,Array.prototype.concat),Ek=so.call(Function.apply,Array.prototype.splice),up=so.call(Function.call,String.prototype.replace),Aa=so.call(Function.call,String.prototype.slice),Qk=so.call(Function.call,RegExp.prototype.exec),Ak=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rk=/\\(\\)?/g,Uk=function(e){var t=Aa(e,0,1),n=Aa(e,-1);if(t==="%"&&n!=="%")throw new Cr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Cr("invalid intrinsic syntax, expected opening `%`");var r=[];return up(e,Ak,function(s,o,a,l){r[r.length]=a?up(l,Rk,"$1"):o||s}),r},$k=function(e,t){var n=e,r;if(Qa(lp,n)&&(r=lp[n],n="%"+r[0]+"%"),Qa(Rn,n)){var s=Rn[n];if(s===sr&&(s=Tk(n)),typeof s>"u"&&!t)throw new gr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:s}}throw new Cr("intrinsic "+e+" does not exist!")},ac=function(e,t){if(typeof e!="string"||e.length===0)throw new gr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new gr('"allowMissing" argument must be a boolean');if(Qk(/^%?[^%]*%?$/,e)===null)throw new Cr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Uk(e),r=n.length>0?n[0]:"",s=$k("%"+r+"%",t),o=s.name,a=s.value,l=!1,u=s.alias;u&&(r=u[0],Ek(n,Ck([0,1],u)));for(var h=1,f=!0;h=n.length){var x=An(a,c);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?a=x.get:a=a[c]}else f=Qa(a,c),a=a[c];f&&!l&&(Rn[o]=a)}}return a},xO={exports:{}};(function(i){var e=oc,t=ac,n=t("%Function.prototype.apply%"),r=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(r,n),o=t("%Object.getOwnPropertyDescriptor%",!0),a=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}i.exports=function(f){var c=s(e,r,arguments);if(o&&a){var p=o(c,"length");p.configurable&&a(c,"length",{value:1+l(0,f.length-(arguments.length-1))})}return c};var u=function(){return s(e,n,arguments)};a?a(i.exports,"apply",{value:u}):i.exports.apply=u})(xO);var Pk=xO.exports,kO=ac,MO=Pk,Jk=MO(kO("String.prototype.indexOf")),Ik=function(e,t){var n=kO(e,!!t);return typeof n=="function"&&Jk(e,".prototype.")>-1?MO(n):n};const Bk={},Lk=Object.freeze(Object.defineProperty({__proto__:null,default:Bk},Symbol.toStringTag,{value:"Module"})),jr=Py(Lk);var lc=typeof Map=="function"&&Map.prototype,au=Object.getOwnPropertyDescriptor&&lc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ra=lc&&au&&typeof au.get=="function"?au.get:null,hp=lc&&Map.prototype.forEach,uc=typeof Set=="function"&&Set.prototype,lu=Object.getOwnPropertyDescriptor&&uc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ua=uc&&lu&&typeof lu.get=="function"?lu.get:null,fp=uc&&Set.prototype.forEach,jk=typeof WeakMap=="function"&&WeakMap.prototype,Ss=jk?WeakMap.prototype.has:null,Dk=typeof WeakSet=="function"&&WeakSet.prototype,xs=Dk?WeakSet.prototype.has:null,Nk=typeof WeakRef=="function"&&WeakRef.prototype,cp=Nk?WeakRef.prototype.deref:null,Zk=Boolean.prototype.valueOf,Fk=Object.prototype.toString,Xk=Function.prototype.toString,Gk=String.prototype.match,hc=String.prototype.slice,rn=String.prototype.replace,Wk=String.prototype.toUpperCase,dp=String.prototype.toLowerCase,TO=RegExp.prototype.test,pp=Array.prototype.concat,bi=Array.prototype.join,Yk=Array.prototype.slice,gp=Math.floor,Qh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,uu=Object.getOwnPropertySymbols,Ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Er=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Er||"symbol")?Symbol.toStringTag:null,CO=Object.prototype.propertyIsEnumerable,mp=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function yp(i,e){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||TO.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var n=i<0?-gp(-i):gp(i);if(n!==i){var r=String(n),s=hc.call(e,r.length+1);return rn.call(r,t,"$&_")+"."+rn.call(rn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return rn.call(e,t,"$&_")}var Rh=jr,Op=Rh.custom,_p=QO(Op)?Op:null,zk=function i(e,t,n,r){var s=t||{};if(Ki(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ki(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ki(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ki(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ki(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return RO(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?yp(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return a?yp(e,u):u}var h=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=h&&h>0&&typeof e=="object")return Uh(e)?"[Array]":"[Object]";var f=dM(s,n);if(typeof r>"u")r=[];else if(AO(r,e)>=0)return"[Circular]";function c(V,ee,B){if(ee&&(r=Yk.call(r),r.push(ee)),B){var Z={depth:s.depth};return Ki(s,"quoteStyle")&&(Z.quoteStyle=s.quoteStyle),i(V,Z,n+1,r)}return i(V,s,n+1,r)}if(typeof e=="function"&&!wp(e)){var p=rM(e),v=wo(e,c);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(v.length>0?" { "+bi.call(v,", ")+" }":"")}if(QO(e)){var x=Er?rn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ah.call(e);return typeof e=="object"&&!Er?es(x):x}if(hM(e)){for(var m="<"+dp.call(String(e.nodeName)),d=e.attributes||[],b=0;b",m}if(Uh(e)){if(e.length===0)return"[]";var A=wo(e,c);return f&&!cM(A)?"["+$h(A,f)+"]":"[ "+bi.call(A,", ")+" ]"}if(qk(e)){var S=wo(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!CO.call(e,"cause")?"{ ["+String(e)+"] "+bi.call(pp.call("[cause]: "+c(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+bi.call(S,", ")+" }"}if(typeof e=="object"&&o){if(_p&&typeof e[_p]=="function"&&Rh)return Rh(e,{depth:h-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(sM(e)){var T=[];return hp&&hp.call(e,function(V,ee){T.push(c(ee,e,!0)+" => "+c(V,e))}),bp("Map",Ra.call(e),T,f)}if(lM(e)){var k=[];return fp&&fp.call(e,function(V){k.push(c(V,e))}),bp("Set",Ua.call(e),k,f)}if(oM(e))return hu("WeakMap");if(uM(e))return hu("WeakSet");if(aM(e))return hu("WeakRef");if(eM(e))return es(c(Number(e)));if(iM(e))return es(c(Qh.call(e)));if(tM(e))return es(Zk.call(e));if(Hk(e))return es(c(String(e)));if(!Kk(e)&&!wp(e)){var Q=wo(e,c),C=mp?mp(e)===Object.prototype:e instanceof Object||e.constructor===Object,I=e instanceof Object?"":"null prototype",_=!C&&bt&&Object(e)===e&&bt in e?hc.call(On(e),8,-1):I?"Object":"",j=C||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",D=j+(_||I?"["+bi.call(pp.call([],_||[],I||[]),": ")+"] ":"");return Q.length===0?D+"{}":f?D+"{"+$h(Q,f)+"}":D+"{ "+bi.call(Q,", ")+" }"}return String(e)};function EO(i,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+i+n}function Vk(i){return rn.call(String(i),/"/g,""")}function Uh(i){return On(i)==="[object Array]"&&(!bt||!(typeof i=="object"&&bt in i))}function Kk(i){return On(i)==="[object Date]"&&(!bt||!(typeof i=="object"&&bt in i))}function wp(i){return On(i)==="[object RegExp]"&&(!bt||!(typeof i=="object"&&bt in i))}function qk(i){return On(i)==="[object Error]"&&(!bt||!(typeof i=="object"&&bt in i))}function Hk(i){return On(i)==="[object String]"&&(!bt||!(typeof i=="object"&&bt in i))}function eM(i){return On(i)==="[object Number]"&&(!bt||!(typeof i=="object"&&bt in i))}function tM(i){return On(i)==="[object Boolean]"&&(!bt||!(typeof i=="object"&&bt in i))}function QO(i){if(Er)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return!0;if(!i||typeof i!="object"||!Ah)return!1;try{return Ah.call(i),!0}catch{}return!1}function iM(i){if(!i||typeof i!="object"||!Qh)return!1;try{return Qh.call(i),!0}catch{}return!1}var nM=Object.prototype.hasOwnProperty||function(i){return i in this};function Ki(i,e){return nM.call(i,e)}function On(i){return Fk.call(i)}function rM(i){if(i.name)return i.name;var e=Gk.call(Xk.call(i),/^function\s*([\w$]+)/);return e?e[1]:null}function AO(i,e){if(i.indexOf)return i.indexOf(e);for(var t=0,n=i.length;te.maxStringLength){var t=i.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return RO(hc.call(i,0,e.maxStringLength),e)+n}var r=rn.call(rn.call(i,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fM);return EO(r,"single",e)}function fM(i){var e=i.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Wk.call(e.toString(16))}function es(i){return"Object("+i+")"}function hu(i){return i+" { ? }"}function bp(i,e,t,n){var r=n?$h(t,n):bi.call(t,", ");return i+" ("+e+") {"+r+"}"}function cM(i){for(var e=0;e1&&arguments[1]!==void 0?arguments[1]:{};hi(this,i),this.init(e,t)}return fi(i,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||mx,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),s=1;s-1?a.replace(/###/g,"."):a}function r(){return!i||typeof i=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(r())return{};var o=n(s.shift());!i[o]&&t&&(i[o]=new t),Object.prototype.hasOwnProperty.call(i,o)?i=i[o]:i={}}return r()?{}:{obj:i,k:n(s.shift())}}function Zd(i,e,t){var n=sc(i,e,Object),r=n.obj,s=n.k;r[s]=t}function _x(i,e,t,n){var r=sc(i,e,Object),s=r.obj,o=r.k;s[o]=s[o]||[],n&&(s[o]=s[o].concat(t)),n||s[o].push(t)}function Ca(i,e){var t=sc(i,e),n=t.obj,r=t.k;if(n)return n[r]}function Fd(i,e,t){var n=Ca(i,t);return n!==void 0?n:Ca(e,t)}function mO(i,e,t){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in i?typeof i[n]=="string"||i[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(i[n]=e[n]):mO(i[n],e[n],t):i[n]=e[n]);return i}function zn(i){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var wx={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function bx(i){return typeof i=="string"?i.replace(/[&<>"'\/]/g,function(e){return wx[e]}):i}var bl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,vx=[" ",",","?","!",";"];function Sx(i,e,t){e=e||"",t=t||"";var n=vx.filter(function(a){return e.indexOf(a)<0&&t.indexOf(a)<0});if(n.length===0)return!0;var r=new RegExp("(".concat(n.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),s=!r.test(i);if(!s){var o=i.indexOf(t);o>0&&!r.test(i.substring(0,o))&&(s=!0)}return s}function Xd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Oo(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yO(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(i){if(i[e])return i[e];for(var n=e.split(t),r=i,s=0;ss+o;)o++,a=n.slice(s,s+o).join(t),l=r[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var u=n.slice(s+o).join(t);return u?yO(l,u,t):void 0}r=r[n[s]]}return r}}var Mx=function(i){wl(t,i);var e=xx(t);function t(n){var r,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return hi(this,t),r=e.call(this),bl&&cn.call(un(r)),r.data=n||{},r.options=s,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.options.ignoreJSONStructure===void 0&&(r.options.ignoreJSONStructure=!0),r}return fi(t,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var s=this.options.ns.indexOf(r);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(r,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[r,s];o&&typeof o!="string"&&(h=h.concat(o)),o&&typeof o=="string"&&(h=h.concat(l?o.split(l):o)),r.indexOf(".")>-1&&(h=r.split("."));var f=Ca(this.data,h);return f||!u||typeof o!="string"?f:yO(this.data&&this.data[r]&&this.data[r][s],o,l)}},{key:"addResource",value:function(r,s,o,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var h=[r,s];o&&(h=h.concat(u?o.split(u):o)),r.indexOf(".")>-1&&(h=r.split("."),a=s,s=h[1]),this.addNamespaces(s),Zd(this.data,h,a),l.silent||this.emit("added",r,s,o,a)}},{key:"addResources",value:function(r,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in o)(typeof o[l]=="string"||Object.prototype.toString.apply(o[l])==="[object Array]")&&this.addResource(r,s,l,o[l],{silent:!0});a.silent||this.emit("added",r,s,o)}},{key:"addResourceBundle",value:function(r,s,o,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[r,s];r.indexOf(".")>-1&&(h=r.split("."),a=o,o=s,s=h[1]),this.addNamespaces(s);var f=Ca(this.data,h)||{};a?mO(f,o,l):f=Oo(Oo({},f),o),Zd(this.data,h,f),u.silent||this.emit("added",r,s,o)}},{key:"removeResourceBundle",value:function(r,s){this.hasResourceBundle(r,s)&&delete this.data[r][s],this.removeNamespaces(s),this.emit("removed",r,s)}},{key:"hasResourceBundle",value:function(r,s){return this.getResource(r,s)!==void 0}},{key:"getResourceBundle",value:function(r,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Oo(Oo({},{}),this.getResource(r,s)):this.getResource(r,s)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"hasLanguageSomeTranslations",value:function(r){var s=this.getDataByLanguage(r),o=s&&Object.keys(s)||[];return!!o.find(function(a){return s[a]&&Object.keys(s[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t}(cn),OO={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,s){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,n,r,s))}),t}};function Gd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function St(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wd={},Yd=function(i){wl(t,i);var e=Tx(t);function t(n){var r,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return hi(this,t),r=e.call(this),bl&&cn.call(un(r)),Ox(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,un(r)),r.options=s,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=Mi.create("translator"),r}return fi(t,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(r==null)return!1;var o=this.resolve(r,s);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(r,s){var o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],u=o&&r.indexOf(o)>-1,h=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!Sx(r,o,a);if(u&&!h){var f=r.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:r,namespaces:l};var c=r.split(o);(o!==a||o===a&&this.options.ns.indexOf(c[0])>-1)&&(l=c.shift()),r=c.join(a)}return typeof l=="string"&&(l=[l]),{key:r,namespaces:l}}},{key:"translate",value:function(r,s,o){var a=this;if(oi(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,h=this.extractFromKey(r[r.length-1],s),f=h.key,c=h.namespaces,p=c[c.length-1],v=s.lng||this.language,x=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(x){var m=s.nsSeparator||this.options.nsSeparator;return l?(d.res="".concat(p).concat(m).concat(f),d):"".concat(p).concat(m).concat(f)}return l?(d.res=f,d):f}var d=this.resolve(r,s),b=d&&d.res,A=d&&d.usedKey||f,S=d&&d.exactUsedKey||f,T=Object.prototype.toString.apply(b),k=["[object Number]","[object Function]","[object RegExp]"],Q=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,I=typeof b!="string"&&typeof b!="boolean"&&typeof b!="number";if(C&&b&&I&&k.indexOf(T)<0&&!(typeof Q=="string"&&T==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,b,St(St({},s),{},{ns:c})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(d.res=_,d):_}if(u){var j=T==="[object Array]",D=j?[]:{},V=j?S:A;for(var ee in b)if(Object.prototype.hasOwnProperty.call(b,ee)){var B="".concat(V).concat(u).concat(ee);D[ee]=this.translate(B,St(St({},s),{joinArrays:!1,ns:c})),D[ee]===B&&(D[ee]=b[ee])}b=D}}else if(C&&typeof Q=="string"&&T==="[object Array]")b=b.join(Q),b&&(b=this.extendTranslation(b,r,s,o));else{var Z=!1,R=!1,N=s.count!==void 0&&typeof s.count!="string",Y=t.hasDefaultValue(s),te=N?this.pluralResolver.getSuffix(v,s.count,s):"",se=s["defaultValue".concat(te)]||s.defaultValue;!this.isValidLookup(b)&&Y&&(Z=!0,b=se),this.isValidLookup(b)||(R=!0,b=f);var le=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ue=le&&R?void 0:b,de=Y&&se!==b&&this.options.updateMissing;if(R||Z||de){if(this.logger.log(de?"updateKey":"missingKey",v,p,f,de?se:b),u){var Qe=this.resolve(f,St(St({},s),{},{keySeparator:!1}));Qe&&Qe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var W=[],G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(var ne=0;ne1&&arguments[1]!==void 0?arguments[1]:{},a,l,u,h,f;return typeof r=="string"&&(r=[r]),r.forEach(function(c){if(!s.isValidLookup(a)){var p=s.extractFromKey(c,o),v=p.key;l=v;var x=p.namespaces;s.options.fallbackNS&&(x=x.concat(s.options.fallbackNS));var m=o.count!==void 0&&typeof o.count!="string",d=m&&!o.ordinal&&o.count===0&&s.pluralResolver.shouldUseIntlApi(),b=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",A=o.lngs?o.lngs:s.languageUtils.toResolveHierarchy(o.lng||s.language,o.fallbackLng);x.forEach(function(S){s.isValidLookup(a)||(f=S,!Wd["".concat(A[0],"-").concat(S)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(f)&&(Wd["".concat(A[0],"-").concat(S)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(A.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),A.forEach(function(T){if(!s.isValidLookup(a)){h=T;var k=[v];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(k,v,T,S,o);else{var Q;m&&(Q=s.pluralResolver.getSuffix(T,o.count,o));var C="".concat(s.options.pluralSeparator,"zero");if(m&&(k.push(v+Q),d&&k.push(v+C)),b){var I="".concat(v).concat(s.options.contextSeparator).concat(o.context);k.push(I),m&&(k.push(I+Q),d&&k.push(I+C))}}for(var _;_=k.pop();)s.isValidLookup(a)||(u=_,a=s.getResource(T,S,_,o))}}))})}}),{res:a,usedKey:l,exactUsedKey:u,usedLng:h,usedNS:f}}},{key:"isValidLookup",value:function(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,s,o,a):this.resourceStore.getResource(r,s,o,a)}}],[{key:"hasDefaultValue",value:function(r){var s="defaultValue";for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&s===o.substring(0,s.length)&&r[o]!==void 0)return!0;return!1}}]),t}(cn);function nu(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Ex=function(){function i(e){hi(this,i),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Mi.create("languageUtils")}return fi(i,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map(function(s){return s.toLowerCase()}):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=nu(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=nu(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=nu(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var n=this;if(!t)return null;var r;return t.forEach(function(s){if(!r){var o=n.formatLanguageCode(s);(!n.options.supportedLngs||n.isSupportedCode(o))&&(r=o)}}),!r&&this.options.supportedLngs&&t.forEach(function(s){if(!r){var o=n.getLanguagePartFromCode(s);if(n.isSupportedCode(o))return r=o;r=n.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}},{key:"getFallbackCodes",value:function(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,n){var r=this,s=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=function(u){u&&(r.isSupportedCode(u)?o.push(u):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),s.forEach(function(l){o.indexOf(l)<0&&a(r.formatLanguageCode(l))}),o}}]),i}(),Qx=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ax={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},Rx=["v1","v2","v3"],zd={zero:0,one:1,two:2,few:3,many:4,other:5};function Ux(){var i={};return Qx.forEach(function(e){e.lngs.forEach(function(t){i[t]={numbers:e.nr,plurals:Ax[e.fc]}})}),i}var $x=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hi(this,i),this.languageUtils=e,this.options=t,this.logger=Mi.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Ux()}return fi(i,[{key:"addRule",value:function(t,n){this.rules[t]=n}},{key:"getRule",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(function(s){return"".concat(n).concat(s)})}},{key:"getSuffixes",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(t,r);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(o,a){return zd[o]-zd[a]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):s.numbers.map(function(o){return n.getSuffix(t,o,r)}):[]}},{key:"getSuffix",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(t,r);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(n)):this.getSuffixRetroCompatible(s,n):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,n){var r=this,s=t.noAbs?t.plurals(n):t.plurals(Math.abs(n)),o=t.numbers[s];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!Rx.includes(this.options.compatibilityJSON)}}]),i}();function Vd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function qt(i){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};hi(this,i),this.logger=Mi.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return fi(i,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=n.escape!==void 0?n.escape:bx,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?zn(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?zn(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?zn(n.nestingPrefix):n.nestingPrefixEscaped||zn("$t("),this.nestingSuffix=n.nestingSuffix?zn(n.nestingSuffix):n.nestingSuffixEscaped||zn(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,n,r,s){var o=this,a,l,u,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(m){return m.replace(/\$/g,"$$$$")}var c=function(d){if(d.indexOf(o.formatSeparator)<0){var b=Fd(n,h,d);return o.alwaysFormat?o.format(b,void 0,r,qt(qt(qt({},s),n),{},{interpolationkey:d})):b}var A=d.split(o.formatSeparator),S=A.shift().trim(),T=A.join(o.formatSeparator).trim();return o.format(Fd(n,h,S),T,r,qt(qt(qt({},s),n),{},{interpolationkey:S}))};this.resetRegExp();var p=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,v=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(d){return f(d)}},{regex:this.regexp,safeValue:function(d){return o.escapeValue?f(o.escape(d)):f(d)}}];return x.forEach(function(m){for(u=0;a=m.regex.exec(t);){var d=a[1].trim();if(l=c(d),l===void 0)if(typeof p=="function"){var b=p(t,a,s);l=typeof b=="string"?b:""}else if(s&&s.hasOwnProperty(d))l="";else if(v){l=a[0];continue}else o.logger.warn("missed to pass in variable ".concat(d," for interpolating ").concat(t)),l="";else typeof l!="string"&&!o.useRawValueToEscape&&(l=Nd(l));var A=m.safeValue(l);if(t=t.replace(a[0],A),v?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,u++,u>=o.maxReplaces)break}}),t}},{key:"nest",value:function(t,n){var r=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,l=qt({},s);l.applyPostProcessor=!1,delete l.defaultValue;function u(p,v){var x=this.nestingOptionsSeparator;if(p.indexOf(x)<0)return p;var m=p.split(new RegExp("".concat(x,"[ ]*{"))),d="{".concat(m[1]);p=m[0],d=this.interpolate(d,l);var b=d.match(/'/g),A=d.match(/"/g);(b&&b.length%2===0&&!A||A.length%2!==0)&&(d=d.replace(/'/g,'"'));try{l=JSON.parse(d),v&&(l=qt(qt({},v),l))}catch(S){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),S),"".concat(p).concat(x).concat(d)}return delete l.defaultValue,p}for(;o=this.nestingRegexp.exec(t);){var h=[],f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var c=o[1].split(this.formatSeparator).map(function(p){return p.trim()});o[1]=c.shift(),h=c,f=!0}if(a=n(u.call(this,o[1].trim(),l),l),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=Nd(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),f&&(a=h.reduce(function(p,v){return r.format(p,v,s.lng,qt(qt({},s),{},{interpolationkey:o[1].trim()}))},a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),i}();function Kd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Yi(i){for(var e=1;e-1){var n=i.split("(");e=n[0].toLowerCase().trim();var r=n[1].substring(0,n[1].length-1);if(e==="currency"&&r.indexOf(":")<0)t.currency||(t.currency=r.trim());else if(e==="relativetime"&&r.indexOf(":")<0)t.range||(t.range=r.trim());else{var s=r.split(";");s.forEach(function(o){if(o){var a=o.split(":"),l=gx(a),u=l[0],h=l.slice(1),f=h.join(":").trim().replace(/^'+|'+$/g,"");t[u.trim()]||(t[u.trim()]=f),f==="false"&&(t[u.trim()]=!1),f==="true"&&(t[u.trim()]=!0),isNaN(f)||(t[u.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:t}}function Vn(i){var e={};return function(n,r,s){var o=r+JSON.stringify(s),a=e[o];return a||(a=i(r,s),e[o]=a),a(n)}}var Ix=function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hi(this,i),this.logger=Mi.create("formatter"),this.options=e,this.formats={number:Vn(function(t,n){var r=new Intl.NumberFormat(t,n);return function(s){return r.format(s)}}),currency:Vn(function(t,n){var r=new Intl.NumberFormat(t,Yi(Yi({},n),{},{style:"currency"}));return function(s){return r.format(s)}}),datetime:Vn(function(t,n){var r=new Intl.DateTimeFormat(t,Yi({},n));return function(s){return r.format(s)}}),relativetime:Vn(function(t,n){var r=new Intl.RelativeTimeFormat(t,Yi({},n));return function(s){return r.format(s,n.range||"day")}}),list:Vn(function(t,n){var r=new Intl.ListFormat(t,Yi({},n));return function(s){return r.format(s)}})},this.init(e)}return fi(i,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},r=n.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(t,n){this.formats[t.toLowerCase().trim()]=n}},{key:"addCached",value:function(t,n){this.formats[t.toLowerCase().trim()]=Vn(n)}},{key:"format",value:function(t,n,r,s){var o=this,a=n.split(this.formatSeparator),l=a.reduce(function(u,h){var f=Jx(h),c=f.formatName,p=f.formatOptions;if(o.formats[c]){var v=u;try{var x=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=x.locale||x.lng||s.locale||s.lng||r;v=o.formats[c](u,m,Yi(Yi(Yi({},p),s),x))}catch(d){o.logger.warn(d)}return v}else o.logger.warn("there was no format function for ".concat(c));return u},t);return l}}]),i}();function qd(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Hd(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jx(i,e){i.pending[e]!==void 0&&(delete i.pending[e],i.pendingCount--)}var Dx=function(i){wl(t,i);var e=Bx(t);function t(n,r,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return hi(this,t),o=e.call(this),bl&&cn.call(un(o)),o.backend=n,o.store=r,o.services=s,o.languageUtils=s.languageUtils,o.options=a,o.logger=Mi.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(s,a.backend,a),o}return fi(t,[{key:"queueLoad",value:function(r,s,o,a){var l=this,u={},h={},f={},c={};return r.forEach(function(p){var v=!0;s.forEach(function(x){var m="".concat(p,"|").concat(x);!o.reload&&l.store.hasResourceBundle(p,x)?l.state[m]=2:l.state[m]<0||(l.state[m]===1?h[m]===void 0&&(h[m]=!0):(l.state[m]=1,v=!1,h[m]===void 0&&(h[m]=!0),u[m]===void 0&&(u[m]=!0),c[x]===void 0&&(c[x]=!0)))}),v||(f[p]=!0)}),(Object.keys(u).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(u),pending:Object.keys(h),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(r,s,o){var a=r.split("|"),l=a[0],u=a[1];s&&this.emit("failedLoading",l,u,s),o&&this.store.addResourceBundle(l,u,o),this.state[r]=s?-1:2;var h={};this.queue.forEach(function(f){_x(f.loaded,[l],u),jx(f,r),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(c){h[c]||(h[c]={});var p=f.loaded[c];p.length&&p.forEach(function(v){h[c][v]===void 0&&(h[c][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(r,s,o){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!r.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:r,ns:s,fcName:o,tried:l,wait:u,callback:h});return}return this.readingCalls++,this.backend[o](r,s,function(f,c){if(a.readingCalls--,a.waitingReads.length>0){var p=a.waitingReads.shift();a.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(f&&c&&l2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof s=="string"&&(s=[s]);var u=this.queueLoad(r,s,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(h){o.loadOne(h)})}},{key:"load",value:function(r,s,o){this.prepareLoading(r,s,{},o)}},{key:"reload",value:function(r,s,o){this.prepareLoading(r,s,{reload:!0},o)}},{key:"loadOne",value:function(r){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=r.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,function(h,f){h&&s.logger.warn("".concat(o,"loading namespace ").concat(u," for language ").concat(l," failed"),h),!h&&f&&s.logger.log("".concat(o,"loaded namespace ").concat(u," for language ").concat(l),f),s.loaded(r,h,f)})}},{key:"saveMissing",value:function(r,s,o,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}o==null||o===""||(this.backend&&this.backend.create&&this.backend.create(r,s,o,a,null,Hd(Hd({},u),{},{isUpdate:l})),!(!r||!r[0])&&this.store.addResource(r[0],s,o,a))}}]),t}(cn);function Nx(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(oi(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),oi(e[2])==="object"||oi(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(r){t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ep(i){return typeof i.ns=="string"&&(i.ns=[i.ns]),typeof i.fallbackLng=="string"&&(i.fallbackLng=[i.fallbackLng]),typeof i.fallbackNS=="string"&&(i.fallbackNS=[i.fallbackNS]),i.supportedLngs&&i.supportedLngs.indexOf("cimode")<0&&(i.supportedLngs=i.supportedLngs.concat(["cimode"])),i}function tp(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function pi(i){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _o(){}function Xx(i){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(i));e.forEach(function(t){typeof i[t]=="function"&&(i[t]=i[t].bind(i))})}var Ea=function(i){wl(t,i);var e=Zx(t);function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(hi(this,t),n=e.call(this),bl&&cn.call(un(n)),n.options=ep(r),n.services={},n.logger=Mi,n.modules={external:[]},Xx(un(n)),s&&!n.isInitialized&&!r.isClone){if(!n.options.initImmediate)return n.init(r,s),ro(n,un(n));setTimeout(function(){n.init(r,s)},0)}return n}return fi(t,[{key:"init",value:function(){var r=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(o=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var a=Nx();this.options=pi(pi(pi({},a),this.options),ep(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=pi(pi({},a.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Mi.init(l(this.modules.logger),this.options):Mi.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Ix);var h=new Ex(this.options);this.store=new Mx(this.options.resources,this.options);var f=this.services;f.logger=Mi,f.resourceStore=this.store,f.languageUtils=h,f.pluralResolver=new $x(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(f.formatter=l(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Px(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Dx(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(d){for(var b=arguments.length,A=new Array(b>1?b-1:0),S=1;S1?b-1:0),S=1;S0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(d){r[d]=function(){var b;return(b=r.store)[d].apply(b,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(d){r[d]=function(){var b;return(b=r.store)[d].apply(b,arguments),r}});var x=Kr(),m=function(){var b=function(S,T){r.isInitialized&&!r.initializedStoreOnce&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),x.resolve(T),o(S,T)};if(r.languages&&r.options.compatibilityAPI!=="v1"&&!r.isInitialized)return b(null,r.t.bind(r));r.changeLanguage(r.options.lng,b)};return this.options.resources||!this.options.initImmediate?m():setTimeout(m,0),x}},{key:"loadResources",value:function(r){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_o,a=o,l=typeof r=="string"?r:this.language;if(typeof r=="function"&&(a=r),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var u=[],h=function(p){if(p){var v=s.services.languageUtils.toResolveHierarchy(p);v.forEach(function(x){u.indexOf(x)<0&&u.push(x)})}};if(l)h(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(c){return h(c)})}this.options.preload&&this.options.preload.forEach(function(c){return h(c)}),this.services.backendConnector.load(u,this.options.ns,function(c){!c&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),a(c)})}else a(null)}},{key:"reloadResources",value:function(r,s,o){var a=Kr();return r||(r=this.languages),s||(s=this.options.ns),o||(o=_o),this.services.backendConnector.reload(r,s,function(l){a.resolve(),o(l)}),a}},{key:"use",value:function(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&OO.addPostProcessor(r),r.type==="formatter"&&(this.modules.formatter=r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"setResolvedLanguage",value:function(r){if(!(!r||!this.languages)&&!(["cimode","dev"].indexOf(r)>-1))for(var s=0;s-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(r,s){var o=this;this.isLanguageChangingTo=r;var a=Kr();this.emit("languageChanging",r);var l=function(c){o.language=c,o.languages=o.services.languageUtils.toResolveHierarchy(c),o.resolvedLanguage=void 0,o.setResolvedLanguage(c)},u=function(c,p){p?(l(p),o.translator.changeLanguage(p),o.isLanguageChangingTo=void 0,o.emit("languageChanged",p),o.logger.log("languageChanged",p)):o.isLanguageChangingTo=void 0,a.resolve(function(){return o.t.apply(o,arguments)}),s&&s(c,function(){return o.t.apply(o,arguments)})},h=function(c){!r&&!c&&o.services.languageDetector&&(c=[]);var p=typeof c=="string"?c:o.services.languageUtils.getBestMatchFromCodes(c);p&&(o.language||l(p),o.translator.language||o.translator.changeLanguage(p),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(p)),o.loadResources(p,function(v){u(v,p)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(h):h(r),a}},{key:"getFixedT",value:function(r,s,o){var a=this,l=function u(h,f){var c;if(oi(f)!=="object"){for(var p=arguments.length,v=new Array(p>2?p-2:0),x=2;x1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var h=function(p,v){var x=s.services.backendConnector.state["".concat(p,"|").concat(v)];return x===-1||x===2};if(o.precheck){var f=o.precheck(this,h);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,r)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(a,r)&&(!l||h(u,r)))}},{key:"loadNamespaces",value:function(r,s){var o=this,a=Kr();return this.options.ns?(typeof r=="string"&&(r=[r]),r.forEach(function(l){o.options.ns.indexOf(l)<0&&o.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),s&&s(l)}),a):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(r,s){var o=Kr();typeof r=="string"&&(r=[r]);var a=this.options.preload||[],l=r.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){o.resolve(),s&&s(u)}),o):(s&&s(),Promise.resolve())}},{key:"dir",value:function(r){if(r||(r=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!r)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>-1||r.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var r=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_o,a=pi(pi(pi({},this.options),s),{isClone:!0}),l=new t(a);(s.debug!==void 0||s.prefix!==void 0)&&(l.logger=l.logger.clone(s));var u=["store","services","language"];return u.forEach(function(h){l[h]=r[h]}),l.services=pi({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Yd(l.services,l.options),l.translator.on("*",function(h){for(var f=arguments.length,c=new Array(f>1?f-1:0),p=1;p0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new Ea(i,e)});var Ge=Ea.createInstance();Ge.createInstance=Ea.createInstance;Ge.createInstance;Ge.init;Ge.loadResources;Ge.reloadResources;Ge.use;Ge.changeLanguage;Ge.getFixedT;Ge.t;Ge.exists;Ge.setDefaultNamespace;Ge.hasLoadedNamespace;Ge.loadNamespaces;Ge.loadLanguages;var _O=[],Gx=_O.forEach,Wx=_O.slice;function Yx(i){return Gx.call(Wx.call(arguments,1),function(e){if(e)for(var t in e)i[t]===void 0&&(i[t]=e[t])}),i}var ip=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,zx=function(e,t,n){var r=n||{};r.path=r.path||"/";var s=encodeURIComponent(t),o="".concat(e,"=").concat(s);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!ip.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!ip.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite){var l=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(l){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},np={create:function(e,t,n,r){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=zx(e,encodeURIComponent(t),s)},read:function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1),s=r.split("&"),o=0;o0){var l=s[o].substring(0,a);l===e.lookupQuerystring&&(t=s[o].substring(a+1))}}}return t}},qr=null,rp=function(){if(qr!==null)return qr;try{qr=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{qr=!1}return qr},qx={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&rp()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&rp()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Hr=null,sp=function(){if(Hr!==null)return Hr;try{Hr=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Hr=!1}return Hr},Hx={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&sp()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&sp()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},ek={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n0?t:void 0}},tk={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},ik={name:"path",lookup:function(e){var t;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof n[e.lookupFromPathIndex]!="string")return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},nk={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};function rk(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var wO=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hi(this,i),this.type="languageDetector",this.detectors={},this.init(e,t)}return fi(i,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Yx(n,this.options||{},rk()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Vx),this.addDetector(Kx),this.addDetector(qx),this.addDetector(Hx),this.addDetector(ek),this.addDetector(tk),this.addDetector(ik),this.addDetector(nk)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var n=this;t||(t=this.options.order);var r=[];return t.forEach(function(s){if(n.detectors[s]){var o=n.detectors[s].lookup(n.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(t,n){var r=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(function(s){r.detectors[s]&&r.detectors[s].cacheUserLanguage(t,r.options)}))}}]),i}();wO.type="languageDetector";const bO={en:{translation:{"language-name":"english",toolbar:{run:"Run all code (ctrl+shift+enter)",upload:"upload to gallery",clear:"clear all",shuffle:"show random sketch",random:"make random change","load-extension":"load library or extension","show-info":"show info window","hide-info":"hide info window"},info:{title:"hydra",subtitle:"live coding video synth",description:"Hydra is live code-able video synth and coding environment that runs directly in the browser. It is free and open-source and made for beginners and experts alike.","get-started-title":"To get started:","get-started-list":["Close this window","Change some numbers","Type Ctrl + Shift + Enter"],"description-detailed":"Hydra is written in JavaScript and compiles to WebGL under the hood. The syntax is inspired by analog modular synthesis, in which chaining or patching a set of transformations together generates a visual result.",uses:"Hydra can be used:","uses-list":["to mix and add effects to camera feeds, screenshares, live streams, and videos","to create generative and audio-reactive visuals, and share them online with others","in combination with other javascript libraries such as P5.js, Tone.js, THREE.js, or gibber","to add interactive video effects to a website","to experiment with and learn about video feedback, fractals, and pixel operations","to stream video between browsers and live-jam with others online"],author:"Created by olivia.","more-info":"For more information and instructions, see: the interactive documentation, a list of hydra functions, the community database of projects and tutorials, a gallery of user-generated sketches, and the source code on github,","more-info-forums":"There is also an active Discord server and facebook group for hydra users+contributors.",support:"If you enjoy using Hydra, please consider supporting continued development <3 ."},extensions:{"about-extensions":"Show community extensions for hydra-synth.","show-example":"Load and run {{extension-name}} example.","show-library":"Add code for loading {{extension-name}} to the top of the current sketch.","show-docs":"Documentation of usage for {{extension-name}}"}}}},sk=["ja","es","ar","id","pt-br","ch"],ok=i=>`https://raw.githubusercontent.com/hydra-synth/l10n/main/${i}/editor.json`;Ge.use(wO).init({debug:!0,fallbackLng:"en",partialBundledLanguages:!0,resources:bO});function ak(i,e){const t={};let n=new URLSearchParams(window.location.search),r=n.get("l10n-lang"),s=n.get("l10n-url");sk.forEach(l=>{a(l,ok(l))}),r!==null&&s!==null&&a(r,s),o(),e.on("set language",l=>{Ge.changeLanguage(l,(u,h)=>{i.translation.selectedLanguage=l,e.emit("render")})});function o(){Object.keys(bO).forEach(l=>{const u=l.split("-")[0];t[u]=Ge.getFixedT(u)("language-name")}),i.translation={t:Ge.t,languages:t,selectedLanguage:Ge.language,textDirection:Ge.language==="ar"?"rtl":"ltr"}}function a(l="es",u){const h="color: purple; background: orange; font-size: 14px;padding:10px";console.log(`%cloading translation for ${l} from ${u}`,h),fetch(u).then(f=>f.ok?f.json():f.text().then(c=>{throw new Error(c)})).then(f=>{window.i18n=Ge,console.log("adding language",l,f);const c=l.split("-")[0];Ge.addResourceBundle(c,"translation",f),o(),e.emit("render")})}}const lk="https://raw.githubusercontent.com/hydra-synth/hydra-extensions/main/";async function uk(i,e){i.extensions={baseURL:lk,selectedCategoryIndex:0,categories:[{name:"extensions",slug:"extensions",entries:[],hasLoaded:!1},{name:"external libraries",slug:"external-libraries",entries:[],hasLoaded:!1},{name:"examples",slug:"examples",entries:[],hasLoaded:!1}]},e.on("extensions: select category",(t=i.extensions.selectedCategoryIndex)=>{i.extensions.selectedCategoryIndex=t,e.emit("render");const n=i.extensions.categories[t];if(!n.hasLoaded){const r=i.extensions.baseURL+n.slug+".json?laskd";fetch(r).then(s=>s.json()).then(s=>{console.log("loaded d",s),s.forEach(o=>{o.thumbnail=i.extensions.baseURL+"thumbnails/"+o.thumbnail}),n.entries=s,e.emit("render")})}}),e.on("extensions: add to editor",t=>{const{categories:n,selectedCategoryIndex:r}=i.extensions,s=n[r].entries[t].load;e.emit("editor: add code to top",s)}),e.on("extensions: load example",(t,n)=>{const{categories:r,selectedCategoryIndex:s}=i.extensions,o=r[s].entries[t].examples[n],a=new URL(o);console.log(a,i.gallery),i.gallery.setSketchFromURL(a.search,l=>{e.emit("load and eval code",l)})})}function hk(i,e){e.on("editor: randomize",function(t){const n=i.editor.editor;t.shiftKey?n.mutator.doUndo():(n.mutator.mutate({reroll:!1,changeTransform:t.metaKey}),n.formatCode(),e.emit("gallery: save to URL",n.getValue()))}),e.on("editor: add code to top",t=>{i.editor.editor.addCodeToTop(t)}),e.on("editor: trigger eval",()=>{i.editor.editor.flashCode()}),e.on("editor: format code",()=>{i.editor.editor.formatCode()}),e.on("editor: load code",t=>{i.editor.editor.setValue(t)})}var Eh={exports:{}},vO={exports:{}};(function(i){i.exports=e;function e(n){if(n)return t(n)}function t(n){for(var r in e.prototype)n[r]=e.prototype[r];return n}e.prototype.on=e.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this},e.prototype.once=function(n,r){function s(){this.off(n,s),r.apply(this,arguments)}return s.fn=r,this.on(n,s),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,a=0;a"u"||!at?be:at(Uint8Array),Rn={"%AggregateError%":typeof AggregateError>"u"?be:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?be:ArrayBuffer,"%ArrayIteratorPrototype%":Kn&&at?at([][Symbol.iterator]()):be,"%AsyncFromSyncIteratorPrototype%":be,"%AsyncFunction%":sr,"%AsyncGenerator%":sr,"%AsyncGeneratorFunction%":sr,"%AsyncIteratorPrototype%":sr,"%Atomics%":typeof Atomics>"u"?be:Atomics,"%BigInt%":typeof BigInt>"u"?be:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?be:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?be:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?be:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?be:Float32Array,"%Float64Array%":typeof Float64Array>"u"?be:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?be:FinalizationRegistry,"%Function%":SO,"%GeneratorFunction%":sr,"%Int8Array%":typeof Int8Array>"u"?be:Int8Array,"%Int16Array%":typeof Int16Array>"u"?be:Int16Array,"%Int32Array%":typeof Int32Array>"u"?be:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kn&&at?at(at([][Symbol.iterator]())):be,"%JSON%":typeof JSON=="object"?JSON:be,"%Map%":typeof Map>"u"?be:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kn||!at?be:at(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?be:Promise,"%Proxy%":typeof Proxy>"u"?be:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?be:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?be:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kn||!at?be:at(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?be:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kn&&at?at(""[Symbol.iterator]()):be,"%Symbol%":Kn?Symbol:be,"%SyntaxError%":Cr,"%ThrowTypeError%":Sk,"%TypedArray%":kk,"%TypeError%":gr,"%Uint8Array%":typeof Uint8Array>"u"?be:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?be:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?be:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?be:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?be:WeakMap,"%WeakRef%":typeof WeakRef>"u"?be:WeakRef,"%WeakSet%":typeof WeakSet>"u"?be:WeakSet};if(at)try{null.error}catch(i){var Mk=at(at(i));Rn["%Error.prototype%"]=Mk}var Tk=function i(e){var t;if(e==="%AsyncFunction%")t=su("async function () {}");else if(e==="%GeneratorFunction%")t=su("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=su("async function* () {}");else if(e==="%AsyncGenerator%"){var n=i("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var r=i("%AsyncGenerator%");r&&at&&(t=at(r.prototype))}return Rn[e]=t,t},lp={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},so=oc,Qa=vk,Ck=so.call(Function.call,Array.prototype.concat),Ek=so.call(Function.apply,Array.prototype.splice),up=so.call(Function.call,String.prototype.replace),Aa=so.call(Function.call,String.prototype.slice),Qk=so.call(Function.call,RegExp.prototype.exec),Ak=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rk=/\\(\\)?/g,Uk=function(e){var t=Aa(e,0,1),n=Aa(e,-1);if(t==="%"&&n!=="%")throw new Cr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Cr("invalid intrinsic syntax, expected opening `%`");var r=[];return up(e,Ak,function(s,o,a,l){r[r.length]=a?up(l,Rk,"$1"):o||s}),r},$k=function(e,t){var n=e,r;if(Qa(lp,n)&&(r=lp[n],n="%"+r[0]+"%"),Qa(Rn,n)){var s=Rn[n];if(s===sr&&(s=Tk(n)),typeof s>"u"&&!t)throw new gr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:s}}throw new Cr("intrinsic "+e+" does not exist!")},ac=function(e,t){if(typeof e!="string"||e.length===0)throw new gr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new gr('"allowMissing" argument must be a boolean');if(Qk(/^%?[^%]*%?$/,e)===null)throw new Cr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Uk(e),r=n.length>0?n[0]:"",s=$k("%"+r+"%",t),o=s.name,a=s.value,l=!1,u=s.alias;u&&(r=u[0],Ek(n,Ck([0,1],u)));for(var h=1,f=!0;h=n.length){var x=An(a,c);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?a=x.get:a=a[c]}else f=Qa(a,c),a=a[c];f&&!l&&(Rn[o]=a)}}return a},xO={exports:{}};(function(i){var e=oc,t=ac,n=t("%Function.prototype.apply%"),r=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(r,n),o=t("%Object.getOwnPropertyDescriptor%",!0),a=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}i.exports=function(f){var c=s(e,r,arguments);if(o&&a){var p=o(c,"length");p.configurable&&a(c,"length",{value:1+l(0,f.length-(arguments.length-1))})}return c};var u=function(){return s(e,n,arguments)};a?a(i.exports,"apply",{value:u}):i.exports.apply=u})(xO);var Pk=xO.exports,kO=ac,MO=Pk,Jk=MO(kO("String.prototype.indexOf")),Ik=function(e,t){var n=kO(e,!!t);return typeof n=="function"&&Jk(e,".prototype.")>-1?MO(n):n};const Bk={},Lk=Object.freeze(Object.defineProperty({__proto__:null,default:Bk},Symbol.toStringTag,{value:"Module"})),jr=Py(Lk);var lc=typeof Map=="function"&&Map.prototype,au=Object.getOwnPropertyDescriptor&&lc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ra=lc&&au&&typeof au.get=="function"?au.get:null,hp=lc&&Map.prototype.forEach,uc=typeof Set=="function"&&Set.prototype,lu=Object.getOwnPropertyDescriptor&&uc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ua=uc&&lu&&typeof lu.get=="function"?lu.get:null,fp=uc&&Set.prototype.forEach,jk=typeof WeakMap=="function"&&WeakMap.prototype,Ss=jk?WeakMap.prototype.has:null,Dk=typeof WeakSet=="function"&&WeakSet.prototype,xs=Dk?WeakSet.prototype.has:null,Nk=typeof WeakRef=="function"&&WeakRef.prototype,cp=Nk?WeakRef.prototype.deref:null,Zk=Boolean.prototype.valueOf,Fk=Object.prototype.toString,Xk=Function.prototype.toString,Gk=String.prototype.match,hc=String.prototype.slice,rn=String.prototype.replace,Wk=String.prototype.toUpperCase,dp=String.prototype.toLowerCase,TO=RegExp.prototype.test,pp=Array.prototype.concat,bi=Array.prototype.join,Yk=Array.prototype.slice,gp=Math.floor,Qh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,uu=Object.getOwnPropertySymbols,Ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Er=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Er||"symbol")?Symbol.toStringTag:null,CO=Object.prototype.propertyIsEnumerable,mp=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function yp(i,e){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||TO.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var n=i<0?-gp(-i):gp(i);if(n!==i){var r=String(n),s=hc.call(e,r.length+1);return rn.call(r,t,"$&_")+"."+rn.call(rn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return rn.call(e,t,"$&_")}var Rh=jr,Op=Rh.custom,_p=QO(Op)?Op:null,zk=function i(e,t,n,r){var s=t||{};if(Ki(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ki(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ki(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ki(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ki(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return RO(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?yp(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return a?yp(e,u):u}var h=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=h&&h>0&&typeof e=="object")return Uh(e)?"[Array]":"[Object]";var f=dM(s,n);if(typeof r>"u")r=[];else if(AO(r,e)>=0)return"[Circular]";function c(V,ee,B){if(ee&&(r=Yk.call(r),r.push(ee)),B){var Z={depth:s.depth};return Ki(s,"quoteStyle")&&(Z.quoteStyle=s.quoteStyle),i(V,Z,n+1,r)}return i(V,s,n+1,r)}if(typeof e=="function"&&!wp(e)){var p=rM(e),v=wo(e,c);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(v.length>0?" { "+bi.call(v,", ")+" }":"")}if(QO(e)){var x=Er?rn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ah.call(e);return typeof e=="object"&&!Er?es(x):x}if(hM(e)){for(var m="<"+dp.call(String(e.nodeName)),d=e.attributes||[],b=0;b",m}if(Uh(e)){if(e.length===0)return"[]";var A=wo(e,c);return f&&!cM(A)?"["+$h(A,f)+"]":"[ "+bi.call(A,", ")+" ]"}if(qk(e)){var S=wo(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!CO.call(e,"cause")?"{ ["+String(e)+"] "+bi.call(pp.call("[cause]: "+c(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+bi.call(S,", ")+" }"}if(typeof e=="object"&&o){if(_p&&typeof e[_p]=="function"&&Rh)return Rh(e,{depth:h-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(sM(e)){var T=[];return hp&&hp.call(e,function(V,ee){T.push(c(ee,e,!0)+" => "+c(V,e))}),bp("Map",Ra.call(e),T,f)}if(lM(e)){var k=[];return fp&&fp.call(e,function(V){k.push(c(V,e))}),bp("Set",Ua.call(e),k,f)}if(oM(e))return hu("WeakMap");if(uM(e))return hu("WeakSet");if(aM(e))return hu("WeakRef");if(eM(e))return es(c(Number(e)));if(iM(e))return es(c(Qh.call(e)));if(tM(e))return es(Zk.call(e));if(Hk(e))return es(c(String(e)));if(!Kk(e)&&!wp(e)){var Q=wo(e,c),C=mp?mp(e)===Object.prototype:e instanceof Object||e.constructor===Object,I=e instanceof Object?"":"null prototype",_=!C&&bt&&Object(e)===e&&bt in e?hc.call(On(e),8,-1):I?"Object":"",j=C||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",D=j+(_||I?"["+bi.call(pp.call([],_||[],I||[]),": ")+"] ":"");return Q.length===0?D+"{}":f?D+"{"+$h(Q,f)+"}":D+"{ "+bi.call(Q,", ")+" }"}return String(e)};function EO(i,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+i+n}function Vk(i){return rn.call(String(i),/"/g,""")}function Uh(i){return On(i)==="[object Array]"&&(!bt||!(typeof i=="object"&&bt in i))}function Kk(i){return On(i)==="[object Date]"&&(!bt||!(typeof i=="object"&&bt in i))}function wp(i){return On(i)==="[object RegExp]"&&(!bt||!(typeof i=="object"&&bt in i))}function qk(i){return On(i)==="[object Error]"&&(!bt||!(typeof i=="object"&&bt in i))}function Hk(i){return On(i)==="[object String]"&&(!bt||!(typeof i=="object"&&bt in i))}function eM(i){return On(i)==="[object Number]"&&(!bt||!(typeof i=="object"&&bt in i))}function tM(i){return On(i)==="[object Boolean]"&&(!bt||!(typeof i=="object"&&bt in i))}function QO(i){if(Er)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return!0;if(!i||typeof i!="object"||!Ah)return!1;try{return Ah.call(i),!0}catch{}return!1}function iM(i){if(!i||typeof i!="object"||!Qh)return!1;try{return Qh.call(i),!0}catch{}return!1}var nM=Object.prototype.hasOwnProperty||function(i){return i in this};function Ki(i,e){return nM.call(i,e)}function On(i){return Fk.call(i)}function rM(i){if(i.name)return i.name;var e=Gk.call(Xk.call(i),/^function\s*([\w$]+)/);return e?e[1]:null}function AO(i,e){if(i.indexOf)return i.indexOf(e);for(var t=0,n=i.length;te.maxStringLength){var t=i.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return RO(hc.call(i,0,e.maxStringLength),e)+n}var r=rn.call(rn.call(i,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fM);return EO(r,"single",e)}function fM(i){var e=i.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Wk.call(e.toString(16))}function es(i){return"Object("+i+")"}function hu(i){return i+" { ? }"}function bp(i,e,t,n){var r=n?$h(t,n):bi.call(t,", ");return i+" ("+e+") {"+r+"}"}function cM(i){for(var e=0;e=0)return!1;return!0}function dM(i,e){var t;if(i.indent===" ")t=" ";else if(typeof i.indent=="number"&&i.indent>0)t=bi.call(Array(i.indent+1)," ");else return null;return{base:t,prev:bi.call(Array(e+1),t)}}function $h(i,e){if(i.length===0)return"";var t=` `+e.prev+e.base;return t+bi.call(i,","+t)+` `+e.prev}function wo(i,e){var t=Uh(i),n=[];if(t){n.length=i.length;for(var r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(Sn(n)){for(var r=[],s=0;s=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===CM.RFC1738&&(u===40||u===41)){a+=o.charAt(l);continue}if(u<128){a=a+gi[u];continue}if(u<2048){a=a+(gi[192|u>>6]+gi[128|u&63]);continue}if(u<55296||u>=57344){a=a+(gi[224|u>>12]+gi[128|u>>6&63]+gi[128|u&63]);continue}l+=1,u=65536+((u&1023)<<10|o.charCodeAt(l)&1023),a+=gi[240|u>>18]+gi[128|u>>12&63]+gi[128|u>>6&63]+gi[128|u&63]}return a},$M=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(A=0)}if(typeof l=="function"?d=l(t,d):d instanceof Date?d=f(d):n==="comma"&&Ii(d)&&(d=ca.maybeMap(d,function(Z){return Z instanceof Date?f(Z):Z})),d===null){if(s)return a&&!v?a(t,Ot.encoder,x,"key",c):t;d=""}if(NM(d)||ca.isBuffer(d)){if(a){var k=v?t:a(t,Ot.encoder,x,"key",c);return[p(k)+"="+p(a(d,Ot.encoder,x,"value",c))]}return[p(t)+"="+p(String(d))]}var Q=[];if(typeof d>"u")return Q;var C;if(n==="comma"&&Ii(d))v&&a&&(d=ca.maybeMap(d,a)),C=[{value:d.length>0?d.join(",")||null:void 0}];else if(Ii(l))C=l;else{var I=Object.keys(d);C=u?I.sort(u):I}for(var _=r&&Ii(d)&&d.length===1?t+"[]":t,j=0;j"u"?Ot.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ot.charsetSentinel,delimiter:typeof e.delimiter>"u"?Ot.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ot.encode,encoder:typeof e.encoder=="function"?e.encoder:Ot.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ot.encodeValuesOnly,filter:s,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ot.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ot.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ot.strictNullHandling}},XM=function(i,e){var t=i,n=FM(e),r,s;typeof n.filter=="function"?(s=n.filter,t=s("",t)):Ii(n.filter)&&(s=n.filter,r=s);var o=[];if(typeof t!="object"||t===null)return"";var a;e&&e.arrayFormat in vp?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var l=vp[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=l==="comma"&&e&&e.commaRoundTrip;r||(r=Object.keys(t)),n.sort&&r.sort(n.sort);for(var h=PO(),f=0;f0?v+p:""},Qr=$O,Ph=Object.prototype.hasOwnProperty,GM=Array.isArray,ot={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Qr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},WM=function(i){return i.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},IO=function(i,e){return i&&typeof i=="string"&&e.comma&&i.indexOf(",")>-1?i.split(","):i},YM="utf8=%26%2310003%3B",zM="utf8=%E2%9C%93",VM=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,s),a=-1,l,u=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(v=GM(v)?[v]:v),Ph.call(n,p)?n[p]=Qr.combine(n[p],v):n[p]=v}return n},KM=function(i,e,t,n){for(var r=n?e:IO(e,t),s=i.length-1;s>=0;--s){var o,a=i[s];if(a==="[]"&&t.parseArrays)o=[].concat(r);else{o=t.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=parseInt(l,10);!t.parseArrays&&l===""?o={0:r}:!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&t.parseArrays&&u<=t.arrayLimit?(o=[],o[u]=r):l!=="__proto__"&&(o[l]=r)}r=o}return r},qM=function(e,t,n,r){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=n.depth>0&&o.exec(s),u=l?s.slice(0,l.index):s,h=[];if(u){if(!n.plainObjects&&Ph.call(Object.prototype,u)&&!n.allowPrototypes)return;h.push(u)}for(var f=0;n.depth>0&&(l=a.exec(s))!==null&&f"u"?ot.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?ot.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ot.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ot.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ot.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ot.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ot.comma,decoder:typeof e.decoder=="function"?e.decoder:ot.decoder,delimiter:typeof e.delimiter=="string"||Qr.isRegExp(e.delimiter)?e.delimiter:ot.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ot.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ot.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ot.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ot.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ot.strictNullHandling}},eT=function(i,e){var t=HM(e);if(i===""||i===null||typeof i>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof i=="string"?VM(i,t):i,r=t.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o=s.length?{done:!0}:{done:!1,value:s[l++]}},e:function(v){throw v},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. @@ -61,26 +61,26 @@ Include your name or twitter handle (optional):`);t!==null?i(t):e()}var bT=vT,kp `},zT=(i,e,t)=>()=>t(i,e),Ep=(i,e,t,n)=>nt` -`,VT=(i,e,t)=>nt`
- +`,VT=(i,e,t,n)=>nt`
+
-
${i.name} - ${i.author}
+
{t("extensions: load example",e,0)}} style="cursor:pointer">${i.name} - ${i.author}
${i.description}
- ${Ep("add-extension","fa-solid fa-plus","add to editor",zT("extensions: add to editor",e,t))} - ${Ep("show-documentation","fa-book-open","show documentation",()=>{window.open(i.documentation,"_blank")})} + ${Ep("add-extension","fa-solid fa-plus",n("extensions.show-library",{"extension-name":i.name}),zT("extensions: add to editor",e,t))} + ${Ep("show-documentation","fa-book-open",n("extensions.show-docs",{"extension-name":i.name}),()=>{window.open(i.documentation,"_blank")})}
- ${i.examples.map((n,r)=>nt`
{t("extensions: load example",e,r)}}>${r+1}
`)} + ${i.examples.map((r,s)=>nt`
{t("extensions: load example",e,s)}}>${s+1}
`)}
`,KT=(i,e)=>{const{categories:t,selectedCategoryIndex:n}=i.extensions,r=t[n].entries,{t:s}=i.translation,o=nt` `,a=nt`
@@ -187,7 +187,9 @@ You passed in: '`+this.raw_options[n]+"'");return o},i.prototype._is_valid_selec `+I)}Q&&(S?S=Q+S+` `+C:S=Q+C),m.print_newline(!1),S&&(d.text=S,d.whitespace_before="",d.newlines=0,m.add_raw_token(d),m.print_newline(!0))}},c.prototype._handle_tag_open=function(m,d,b,A,S){var T=this._get_tag_open_token(d);if((b.is_unformatted||b.is_content_unformatted)&&!b.is_empty_element&&d.type===n.TAG_OPEN&&!T.is_start_tag?(m.add_raw_token(d),T.start_tag_token=this._tag_stack.try_pop(T.tag_name)):(m.traverse_whitespace(d),this._set_tag_position(m,d,T,b,A),T.is_inline_element||m.set_wrap_point(),m.print_token(d)),T.is_start_tag&&this._is_wrap_attributes_force){var k=0,Q;do Q=S.peek(k),Q.type===n.ATTRIBUTE&&(T.attr_count+=1),k+=1;while(Q.type!==n.EOF&&Q.type!==n.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(T.alignment_size=d.text.length+1),!T.tag_complete&&!T.is_unformatted&&(m.alignment_size=T.alignment_size),T};var p=function(m,d){if(this.parent=m||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!d)this.tag_complete=!0;else{var b;this.tag_start_char=d.text[0],this.text=d.text,this.tag_start_char==="<"?(b=d.text.match(/^<([^\s>]*)/),this.tag_check=b?b[1]:""):(b=d.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=b?b[1]:"",(d.text.startsWith("{{#>")||d.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&d.next!==null?this.tag_check=d.next.text.split(" ")[0]:this.tag_check=d.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),d.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||d.closed&&d.closed.text==="/>";var A=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(A=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(A)))}};c.prototype._get_tag_open_token=function(m){var d=new p(this._tag_stack.get_parser_token(),m);return d.alignment_size=this._options.wrap_attributes_indent_size,d.is_end_tag=d.is_end_tag||u(d.tag_check,this._options.void_elements),d.is_empty_element=d.tag_complete||d.is_start_tag&&d.is_end_tag,d.is_unformatted=!d.tag_complete&&u(d.tag_check,this._options.unformatted),d.is_content_unformatted=!d.is_empty_element&&u(d.tag_check,this._options.content_unformatted),d.is_inline_element=u(d.tag_name,this._options.inline)||d.tag_name.includes("-")||d.tag_start_char==="{",d},c.prototype._set_tag_position=function(m,d,b,A,S){if(b.is_empty_element||(b.is_end_tag?b.start_tag_token=this._tag_stack.try_pop(b.tag_name):(this._do_optional_end_element(b)&&(b.is_inline_element||m.print_newline(!1)),this._tag_stack.record_tag(b),(b.tag_name==="script"||b.tag_name==="style")&&!(b.is_unformatted||b.is_content_unformatted)&&(b.custom_beautifier_name=l(b.tag_check,d)))),u(b.tag_check,this._options.extra_liners)&&(m.print_newline(!1),m._output.just_added_blankline()||m.print_newline(!0)),b.is_empty_element){if(b.tag_start_char==="{"&&b.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),b.indent_content=!0;var T=m.current_line_has_match(/{{#if/);T||m.print_newline(!1)}b.tag_name==="!--"&&S.type===n.TAG_CLOSE&&A.is_end_tag&&b.text.indexOf(` `)===-1||(b.is_inline_element||b.is_unformatted||m.print_newline(!1),this._calcluate_parent_multiline(m,b))}else if(b.is_end_tag){var k=!1;k=b.start_tag_token&&b.start_tag_token.multiline_content,k=k||!b.is_inline_element&&!(A.is_inline_element||A.is_unformatted)&&!(S.type===n.TAG_CLOSE&&b.start_tag_token===A)&&S.type!=="TK_CONTENT",(b.is_content_unformatted||b.is_unformatted)&&(k=!1),k&&m.print_newline(!1)}else b.indent_content=!b.custom_beautifier_name,b.tag_start_char==="<"&&(b.tag_name==="html"?b.indent_content=this._options.indent_inner_html:b.tag_name==="head"?b.indent_content=this._options.indent_head_inner_html:b.tag_name==="body"&&(b.indent_content=this._options.indent_body_inner_html)),!(b.is_inline_element||b.is_unformatted)&&(S.type!=="TK_CONTENT"||b.is_content_unformatted)&&m.print_newline(!1),this._calcluate_parent_multiline(m,b)},c.prototype._calcluate_parent_multiline=function(m,d){d.parent&&m._output.just_added_newline()&&!((d.is_inline_element||d.is_unformatted)&&d.parent.is_inline_element)&&(d.parent.multiline_content=!0)};var v=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],x=["a","audio","del","ins","map","noscript","video"];return c.prototype._do_optional_end_element=function(m){var d=null;if(!(m.is_empty_element||!m.is_start_tag||!m.parent)){if(m.tag_name==="body")d=d||this._tag_stack.try_pop("head");else if(m.tag_name==="li")d=d||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(m.tag_name==="dd"||m.tag_name==="dt")d=d||this._tag_stack.try_pop("dt",["dl"]),d=d||this._tag_stack.try_pop("dd",["dl"]);else if(m.parent.tag_name==="p"&&v.indexOf(m.tag_name)!==-1){var b=m.parent.parent;(!b||x.indexOf(b.tag_name)===-1)&&(d=d||this._tag_stack.try_pop("p"))}else m.tag_name==="rp"||m.tag_name==="rt"?(d=d||this._tag_stack.try_pop("rt",["ruby","rtc"]),d=d||this._tag_stack.try_pop("rp",["ruby","rtc"])):m.tag_name==="optgroup"?d=d||this._tag_stack.try_pop("optgroup",["select"]):m.tag_name==="option"?d=d||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):m.tag_name==="colgroup"?d=d||this._tag_stack.try_pop("caption",["table"]):m.tag_name==="thead"?(d=d||this._tag_stack.try_pop("caption",["table"]),d=d||this._tag_stack.try_pop("colgroup",["table"])):m.tag_name==="tbody"||m.tag_name==="tfoot"?(d=d||this._tag_stack.try_pop("caption",["table"]),d=d||this._tag_stack.try_pop("colgroup",["table"]),d=d||this._tag_stack.try_pop("thead",["table"]),d=d||this._tag_stack.try_pop("tbody",["table"])):m.tag_name==="tr"?(d=d||this._tag_stack.try_pop("caption",["table"]),d=d||this._tag_stack.try_pop("colgroup",["table"]),d=d||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(m.tag_name==="th"||m.tag_name==="td")&&(d=d||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),d=d||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return m.parent=this._tag_stack.get_parser_token(),d}},bh.Beautifier=c,bh}var Uy;function vB(){if(Uy)return oa.exports;Uy=1;var i=bB().Beautifier,e=Hb().Options;function t(n,r,s,o){var a=new i(n,r,s,o);return a.beautify()}return oa.exports=t,oa.exports.defaultOptions=function(){return new e},oa.exports}var $y;function SB(){if($y)return ls;$y=1;var i=OB(),e=wB(),t=vB();function n(r,s,o,a){return o=o||i,a=a||e,t(r,s,o,a)}return n.defaultOptions=t.defaultOptions,ls.js=i,ls.css=e,ls.html=n,ls}(function(i){function e(t,n,r){var s=function(o,a){return t.js_beautify(o,a)};return s.js=t.js_beautify,s.css=n.css_beautify,s.html=r.html_beautify,s.js_beautify=t.js_beautify,s.css_beautify=n.css_beautify,s.html_beautify=r.html_beautify,s}(function(t){var n=SB();n.js_beautify=n.js,n.css_beautify=n.css,n.html_beautify=n.html,t.exports=e(n,n,n)})(i)})(Wb);var xB=Wb.exports;const kB=zt(xB);let MB=class extends G1{constructor(e,t){super(),console.log("*** Editor class created"),this.cm=new he({lineWrapping:!0,extensions:[mI,tB(),zU(`// -// Type some code on a new line (such as "osc().out()"), and press CTRL+shift+enter`),cB((n,r=!1)=>{t("repl: eval",n),r&&t("gallery: save to URL",n)}),lB,Gn.of(pB(t))],parent:e})}clear(){this.setValue("")}flashCode(){Gb(this.cm)}setValue(e){this.cm.dispatch({changes:{from:0,to:this.cm.state.doc.length,insert:e}})}getValue(){this.cm.state.doc.toString()}formatCode(){const e=kB(this.cm.state.doc.toString(),{indent_size:2,break_chained_methods:!0});this.cm.dispatch({changes:{from:0,to:this.cm.state.doc.length,insert:e}})}addCodeToTop(e=""){}toggle(){}};class TB extends GO{constructor(e,t,n){super(e),this.local=t.components[e]={},t.editor=this,this.emit=n}load(e){ax.init(this.logElement),this.editor=new MB(this.textEl,this.emit),this.textEl.style.transition="opacity 0.5s"}hide(){this.textEl.style.opacity=0}show(){this.textEl.style.opacity=1,this.textEl.style.pointerEvents="all"}update(e){return e.showInfo===!0&&e.showExtensions===!1||e.showUI===!1?this.hide():this.show(),!1}createElement({width:e=window.innerWidth,height:t=window.innerHeight}={}){return this.textEl=nt`
`,this.logElement=nt`
`,nt`
+// Type some code on a new line (such as "osc().out()"), and press CTRL+shift+enter`),cB((n,r=!1)=>{t("repl: eval",n),r&&t("gallery: save to URL",n)}),lB,Gn.of(pB(t))],parent:e})}clear(){this.setValue("")}flashCode(){Gb(this.cm)}setValue(e){this.cm.dispatch({changes:{from:0,to:this.cm.state.doc.length,insert:e}})}getValue(){this.cm.state.doc.toString()}formatCode(){const e=kB(this.cm.state.doc.toString(),{indent_size:2,break_chained_methods:!0});this.cm.dispatch({changes:{from:0,to:this.cm.state.doc.length,insert:e}})}addCodeToTop(e=""){this.cm.dispatch({changes:{from:0,insert:`${e} + +`}})}toggle(){}};class TB extends GO{constructor(e,t,n){super(e),this.local=t.components[e]={},t.editor=this,this.emit=n}load(e){ax.init(this.logElement),this.editor=new MB(this.textEl,this.emit),this.textEl.style.transition="opacity 0.5s"}hide(){this.textEl.style.opacity=0}show(){this.textEl.style.opacity=1,this.textEl.style.pointerEvents="all"}update(e){return e.showInfo===!0&&e.showExtensions===!1||e.showUI===!1?this.hide():this.show(),!1}createElement({width:e=window.innerWidth,height:t=window.innerHeight}={}){return this.textEl=nt`
`,this.logElement=nt`
`,nt`
${this.textEl}
${this.logElement}
`}}function ev(i,e){return nt` diff --git a/dist/css/modal.css b/dist/css/modal.css index 8ccb7a3..94eb15b 100644 --- a/dist/css/modal.css +++ b/dist/css/modal.css @@ -217,14 +217,14 @@ transition: width 1s; } .extension-list-item { - cursor: pointer; + /* cursor: pointer; */ margin: 1px; - padding: 5px; + padding: 1px; overflow: hidden; } .extension-list-item:hover { - /* background: white; */ + background: #111; /* color: black; */ /* border: solid white 1px; */ } diff --git a/dist/index.html b/dist/index.html index ffef20a..99c4384 100644 --- a/dist/index.html +++ b/dist/index.html @@ -27,7 +27,7 @@ - + diff --git a/package.json b/package.json index 4837550..e11a3a0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "vite build", - "dev": "vite .", + "dev": "vite . --host", "publish": "git subtree push --prefix=dist origin gh-pages" }, "author": "",