@pie-element/simple-cloze 0.1.7-next.20261007184841 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- this.SimpleClozeElement=(function(){typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var e={},t=Symbol(`uninitialized`),n=`http://www.w3.org/1999/xhtml`,r=`http://www.w3.org/2000/svg`,i=`http://www.w3.org/1998/Math/MathML`,a=Array.isArray,o=Array.prototype.indexOf,s=Array.prototype.includes,c=Array.from,l=Object.keys,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyDescriptors,p=Object.prototype,m=Array.prototype,h=Object.getPrototypeOf,g=Object.isExtensible,_=()=>{};function v(e){for(var t=0;t<e.length;t++)e[t]()}function y(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var b=1024,x=2048,ee=4096,te=8192,ne=16384,S=32768,C=1<<25,re=65536,ie=1<<19,ae=1<<20,oe=1<<21,se=1<<22,ce=1<<23,le=Symbol(`$state`),ue=Symbol(`component`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),w=Symbol(`text`),ge=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},_e=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ve(){console.warn(`https://svelte.dev/e/derived_inert`)}function ye(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function xe(e){T=e}var E;function Se(t){if(t===null)throw ye(),e;return E=t}function D(){return Se(qt(E))}function Ce(t){if(T){if(qt(E)!==null)throw ye(),e;E=t}}function O(e=1){if(T){for(var t=e,n=E;t--;)n=qt(n);E=n}}function we(e=!0){for(var t=0,n=E;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=qt(n);e&&n.remove(),n=i}}function Te(t){if(!t||t.nodeType!==8)throw ye(),e;return t.data}function Ee(e){return e===this.v}function De(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Oe(e){return!De(e,this.v)}function ke(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ae(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function je(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Me(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ne(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Pe(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Fe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ie(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Le(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Re(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function ze(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var k=null;function Be(e){k=e}function Ve(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:V,l:null}}function He(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)un(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,Ue(e)}function Ue(e={}){return u(e,ue,{value:!0}),e}function We(){return!0}var Ge=[];function Ke(){var e=Ge;Ge=[],v(e)}function qe(e){if(Ge.length===0&&!mt){var t=Ge;queueMicrotask(()=>{t===Ge&&Ke()})}Ge.push(e)}function Je(){for(;Ge.length>0;)Ke()}var Ye=~(x|ee|b);function A(e,t){e.f=e.f&Ye|t}function Xe(e){e.f&512||e.deps===null?A(e,b):A(e,ee)}function Ze(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),A(e,b)}function Qe(e){var t=B,n=V;Pn(null),Fn(null);try{return e()}finally{Pn(t),Fn(n)}}function $e(e,t,n,r){let i=We()?nt:at;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=V,c=et(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){nn(e,s)}j()}}var d=tt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>it(e))).then(u).catch(e=>nn(e,s)).finally(d)}l?l.then(()=>{c(),f(),j()}):f()}function et(){var e=V,t=B,n=k,r=P;return function(i=!0){Fn(e),Pn(t),Be(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function j(e=!0){Fn(null),Pn(null),Be(null),e&&P?.deactivate()}function tt(){var e=V,t=e.b,n=P,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function nt(e){var n=2|x;return V!==null&&(V.f|=ie),{ctx:k,deps:null,effects:null,equals:Ee,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:V,ac:null}}var rt=Symbol(`obsolete`);function it(e,n,r){let i=V;i===null&&ke();var a=void 0,o=Mt(t),s=!B,c=new Set;return mn(()=>{var t=V,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ge&&n.reject(e)}).finally(j)}catch(e){n.reject(e),j()}var r=P;if(s){if(t.f&32768)var l=tt();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(rt);else for(let e of c.values())e.reject(rt);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==rt&&(r.activate(),t?(o.f|=ce,It(o,t)):(o.f&8388608&&(o.f^=ce),It(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),cn(()=>{for(let e of c)e.reject(rt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function M(e){let t=nt(e);return Ln(t),t}function at(e){let t=nt(e);return t.equals=Oe,t}function ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function st(e){var n,r=V,i=e.parent;if(!jn&&i!==null&&e.v!==t&&i.f&24576)return ve(),e.v;Fn(i);try{ot(e),n=Jn(e)}finally{Fn(r)}return n}function ct(e){var t=st(e);if(!e.equals(t)&&(e.wv=Gn(),(!P?.is_fork||e.deps===null)&&(P===null?e.v=t:(P.capture(e,t,!0),dt?.capture(e,t,!0)),e.deps===null))){A(e,b);return}jn||(ft===null?Xe(e):(sn()||P?.is_fork)&&ft.set(e,t))}function lt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Qe(()=>{t.ac.abort(ge),t.ac=null}),t.fn!==null&&(t.teardown=_),Zn(t,0),bn(t))}function ut(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Qn(t)}var N=null,P=null,dt=null,ft=null,pt=null,mt=!1,ht=!1,gt=null,_t=null,vt=0,yt=1,bt=class e{id=yt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){N===null?N=this:(N.#n=this,this.#t=N),N=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)A(r,x),t(r);for(r of n.m)A(r,ee),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=b}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),A(e,x),this.schedule(e);for(let e of this.#d)A(e,ee),this.schedule(e);this.apply();for(var t=gt=[],n=[],r=_t=[];this.#c.length>0;){vt++>1e3&&(this.#S(),St());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw Ot(e),this.#h()||this.discard(),t}}if(P=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(gt=null,_t=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Dt(e,t);r.length>0&&P.#_();return}let a=this.#y();if(a){this.#x(n),this.#x(t),a.#b(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),dt=this,Ct(n),Ct(t),dt=null,this.#s?.resolve();var o=P;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0)if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this;o!==null&&(At.clear(),o.#_())}#v(e,t,n){e.f^=b;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=b:i&4?t.push(r):Kn(r)&&(i&16&&this.#d.add(r),Qn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),A(i,x),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),P=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)Ze(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),ft?.set(e,n)),this.is_fork||(e.v=n)}activate(){P=this}deactivate(){P=null,ft=null}flush(){try{ht=!0,P=this,this.#_()}finally{vt=0,pt=null,gt=null,_t=null,ht=!1,P=null,ft=null,At.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(rt);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,qe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=y()).promise}static ensure(){if(P===null){let t=P=new e;!ht&&!mt&&qe(()=>{t.#e||t.flush()})}return P}apply(){ft=null}schedule(e){if(pt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?N=e:t.#t=e,this.linked=!1}}};function xt(e){var t=mt;mt=!0;try{var n;for(e&&(P!==null&&!P.is_fork&&P.flush(),n=e());;){if(Je(),P===null)return n;P.flush()}}finally{mt=t}}function St(){try{Ne()}catch(e){nn(e,pt)}}var F=null;function Ct(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Kn(r)&&(F=new Set,Qn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Cn(r),F?.size>0)){At.clear();for(let e of F){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)F.has(n)&&(F.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Qn(n)}}F.clear()}}F=null}}function wt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?wt(i,t,n,r):e&4194320&&!(e&2048)&&Tt(i,t,r)&&(A(i,x),Et(i))}}function Tt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(s.call(t,r))return!0;if(r.f&2&&Tt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Et(e){P.schedule(e)}function Dt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),A(e,b);for(var n=e.first;n!==null;)Dt(n,t),n=n.next}}function Ot(e){A(e,b);for(var t=e.first;t!==null;)Ot(t),t=t.next}var kt=new Set,At=new Map,jt=!1;function Mt(e,t){return{f:0,v:e,reactions:null,equals:Ee,rv:0,wv:0}}function I(e,t){let n=Mt(e,t);return Ln(n),n}function Nt(e,t=!1,n=!0){let r=Mt(e);return t||(r.equals=Oe),r}function L(e,t,n=!1){return B!==null&&(!Nn||B.f&131072)&&We()&&B.f&4325394&&(In===null||!In.has(e))&&Re(),It(e,n?Bt(t):t,_t)}var Pt=null,Ft=0;function It(e,t,n=null){if(!e.equals(t)){jn?At.set(e,t):At.has(e)||At.set(e,e.v);var r=bt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&st(t),ft===null&&Xe(t)}e.wv=Gn(),Pt=null,Ft=0,zt(e,x,n),Pt=null,We()&&V!==null&&V.f&1024&&!(V.f&96)&&(zn===null?Bn([e]):zn.push(e)),!r.is_fork&&kt.size>0&&!jt&&Lt()}return t}function Lt(){jt=!1;for(let e of kt){e.f&1024&&A(e,ee);let t;try{t=Kn(e)}catch{t=!0}t&&Qn(e)}kt.clear()}function Rt(e){L(e,e.v+1)}function zt(e,t,n){var r=e.reactions;if(r!==null){var i=We(),a=r.length;if(Ft+=a,Ft>1e5&&Pt===null&&(Pt=new Set),Pt!==null){if(Pt.has(e))return;Pt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===V)){var l=(c&x)===0;if(l&&A(s,t),c&131072)kt.add(s);else if(c&2){var u=s;ft?.delete(u),zt(u,ee,n)}else if(l){var d=s;c&16&&F!==null&&F.add(d),n===null?Et(d):n.push(d)}}}}}function Bt(e){if(typeof e!=`object`||!e||le in e||ue in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=I(0),s=null,c=Un,l=e=>{if(Un===c)return e();var t=B,n=Un;Pn(null),Wn(c);var r=e();return Pn(t),Wn(n),r};return i&&r.set(`length`,I(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Ie();var i=r.get(t);return i===void 0?l(()=>{var e=I(n.value,s);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>I(t,s));r.set(n,e),Rt(o)}}else L(i,t),Rt(o);return!0},get(n,i,a){if(i===le)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>I(Bt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=U(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){this.has?.(e,n);var i=Reflect.getOwnPropertyDescriptor(e,n),a=r.get(n);if(a!==void 0){var o=U(a);if(o===t)return;if(i&&`value`in i)i.value=o;else return{enumerable:!0,configurable:!0,value:o,writable:!0}}return i},has(e,n){if(n===le)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||V!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>I(a?Bt(e[n]):t,s)),r.set(n,i)),U(i)===t)?!1:a},set(e,n,a,c){var u=r.get(n),f=n in e;if(i&&n===`length`)for(var p=a;p<u.v;p+=1){var m=r.get(p+``);m===void 0?p in e&&(m=l(()=>I(t,s)),r.set(p+``,m)):L(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>I(void 0,s)),L(u,Bt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Bt(a));L(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(c,a),!f){if(i&&typeof n==`string`){var _=r.get(`length`),v=Number(n);Number.isInteger(v)&&v>=_.v&&L(_,v+1)}Rt(o)}return!0},ownKeys(e){U(o);var n=Reflect.ownKeys(e).filter(e=>{var n=r.get(e);return n===void 0||n.v!==t});for(var[i,a]of r)a.v!==t&&!(i in e)&&n.push(i);return n},setPrototypeOf(){Le()}})}var Vt,Ht,Ut,Wt;function Gt(){if(Vt===void 0){Vt=window,Ht=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=d(t,`firstChild`).get,Wt=d(t,`nextSibling`).get,g(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),g(n)&&(n[w]=void 0)}}function Kt(e=``){return document.createTextNode(e)}function R(e){return Ut.call(e)}function qt(e){return Wt.call(e)}function Jt(e,t){if(!T)return R(e);var n=R(E);if(n===null)n=E.appendChild(Kt());else if(t&&n.nodeType!==3){var r=Kt();return n?.before(r),Se(r),r}return t&&en(n),Se(n),n}function Yt(e,t=!1){if(!T)return R(e);var n=Jt(e,t);return Ce(e),n}function Xt(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=qt(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=Kt();return r===null?i?.after(a):r.before(a),Se(a),a}en(r)}return Se(r),r}function Zt(e){e.textContent=``}function Qt(){return!1}function $t(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function en(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function tn(e){var t=V;if(t===null)return B.f|=ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;nn(e,t)}function nn(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function rn(e){V===null&&(B===null&&Me(e),je()),jn&&Ae(e)}function an(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function on(e,t){var n=V;n!==null&&n.f&8192&&(e|=te);var r={ctx:k,deps:null,nodes:null,f:e|x|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};P?.register_created_effect(r);var i=r;if(e&4)gt===null?bt.ensure().schedule(r):gt.push(r);else if(t!==null){try{Qn(r)}catch(e){throw z(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=re))}if(i!==null&&(i.parent=n,n!==null&&an(i,n),B!==null&&B.f&2&&!(e&64))){var a=B;(a.effects??=[]).push(i)}return r}function sn(){return B!==null&&!Nn}function cn(e){let t=on(8,null);return A(t,b),t.teardown=e,t}function ln(e){rn(`$effect`);var t=V.f;if(!B&&t&32&&k!==null&&!k.i){var n=k;(n.e??=[]).push(e)}else return un(e)}function un(e){return on(4|ae,e)}function dn(e){bt.ensure();let t=on(64|ie,e);return()=>{z(t)}}function fn(e){bt.ensure();let t=on(64|ie,e);return(e={})=>new Promise(n=>{e.outro?wn(t,()=>{z(t),n(void 0)}):(z(t),n(void 0))})}function pn(e){return on(4,e)}function mn(e){return on(se|ie,e)}function hn(e,t=0){return on(8|t,e)}function gn(e,t=[],n=[],r=[]){$e(r,t,n,t=>{on(8,()=>{e(...t.map(U))})})}function _n(e,t=0){return on(16|t,e)}function vn(e){return on(32|ie,e)}function yn(e){var t=e.teardown;if(t!==null){let n=jn,r=B;Mn(!0),Pn(null);try{t.call(null)}catch(t){nn(t,e.parent)}finally{Mn(n),Pn(r)}}}function bn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Qe(()=>{e.abort(ge)});var r=n.next;n.f&64?n.parent=null:z(n,t),n=r}}function xn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||z(t),t=n}}function z(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Sn(e.nodes.start,e.nodes.end),n=!0),e.f|=C,bn(e,t&&!n),Zn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();yn(e),e.f^=C,e.f|=ne;var i=e.parent;i!==null&&i.first!==null&&Cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Sn(e,t){for(;e!==null;){var n=e===t?null:qt(e);e.remove(),e=n}}function Cn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function wn(e,t,n=!0){var r=[];e.f|=256,Tn(e,r,!0);var i=()=>{n&&z(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Tn(e,t,n){if(!(e.f&8192)){e.f^=te;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Tn(i,t,o?n:!1)}i=a}}}function En(e){e.f&=-257,Dn(e,!0)}function Dn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=te,e.f&1024||(A(e,x),bt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Dn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function On(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:qt(n);t.append(n),n=i}}var kn=null,An=!1,jn=!1;function Mn(e){jn=e}var B=null,Nn=!1;function Pn(e){B=e}var V=null;function Fn(e){V=e}var In=null;function Ln(e){B!==null&&(B.f&2097152||B.f&2)&&(In??=new Set).add(e)}var H=null,Rn=0,zn=null;function Bn(e){zn=e}var Vn=1,Hn=0,Un=Hn;function Wn(e){Un=e}function Gn(){return++Vn}function Kn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Kn(a)&&ct(a),a.wv>e.wv)return!0}t&512&&ft===null&&A(e,b)}return!1}function qn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(In!==null&&In.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?qn(a,t,!1):t===a&&(n?A(a,x):a.f&1024&&A(a,ee),Et(a))}}function Jn(e){var t=H,n=Rn,r=zn,i=B,a=In,o=k,s=Nn,c=Un,l=e.f;H=null,Rn=0,zn=null,B=l&96?null:e,In=null,Be(e.ctx),Nn=!1,Un=++Hn,e.ac!==null&&(Qe(()=>{e.ac.abort(ge)}),e.ac=null);try{e.f|=oe;var u=e.fn,d=u();e.f|=S;var f=Yn(e);if(We()&&zn!==null&&!Nn&&f!==null&&!(e.f&6146))for(var p=0;p<zn.length;p++)qn(zn[p],e);if(i!==null&&i!==e){if(Hn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Hn;if(t!==null)for(let e of t)e.rv=Hn;zn!==null&&(r===null?r=zn:r.push(...zn))}return e.f&8388608&&(e.f^=ce),d}catch(t){return Yn(e),tn(t)}finally{e.f^=oe,H=t,Rn=n,zn=r,B=i,In=a,Be(o),Nn=s,Un=c}}function Yn(e){var t=e.deps,n=P?.is_fork;if(H!==null){var r;if(n||Zn(e,Rn),t!==null&&Rn>0)for(t.length=Rn+H.length,r=0;r<H.length;r++)t[Rn+r]=H[r];else e.deps=t=H;if(sn()&&e.f&512)for(r=Rn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Rn<t.length&&(Zn(e,Rn),t.length=Rn);return t}function Xn(e,n){let r=n.reactions;if(r!==null){var i=o.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=n.reactions=null:(r[i]=r[a],r.pop())}}if(r===null&&n.f&2&&(H===null||!s.call(H,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&Xe(c),c.ac!==null&&Qe(()=>{c.ac.abort(ge),c.ac=null,A(c,x)}),lt(c),Zn(c,0)}}function Zn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Xn(e,n[r])}function Qn(e){var t=e.f;if(!(t&16384)){A(e,b);var n=V,r=An;V=e,An=(t&96)==0;try{t&16777232?xn(e):bn(e),yn(e);var i=Jn(e);e.teardown=typeof i==`function`?i:null,e.wv=Vn}finally{An=r,V=n}}}function U(e){var t=(e.f&2)!=0;if(kn?.add(e),B!==null&&!Nn&&!(V!==null&&V.f&16384)&&(In===null||!In.has(e))){var n=B.deps;if(B.f&2097152)e.rv<Hn&&(e.rv=Hn,H===null&&n!==null&&n[Rn]===e?Rn++:H===null?H=[e]:H.push(e));else{B.deps??=[],s.call(B.deps,e)||B.deps.push(e);var r=e.reactions;r===null?e.reactions=[B]:s.call(r,B)||r.push(B)}}if(jn&&At.has(e))return At.get(e);if(t){var i=e;if(jn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||er(i))&&(a=st(i)),At.set(i,a),a}var o=(i.f&512)==0&&!Nn&&B!==null&&(An||(B.f&512)!=0),c=(i.f&S)===0;Kn(i)&&(o&&(i.f|=512),ct(i)),o&&!c&&(ut(i),$n(i))}if(ft?.has(e))return ft.get(e);if(e.f&8388608)throw e.v;return e.v}function $n(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(ut(t),$n(t))}function er(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(At.has(t)||t.f&2&&er(t))return!0;return!1}function tr(e){var t=Nn;try{return Nn=!0,e()}finally{Nn=t}}var nr=Symbol(`events`),rr=new Set,ir=new Set;function ar(e,t,n){(t[nr]??={})[e]=n}function or(e){for(var t=0;t<e.length;t++)rr.add(e[t]);for(var n of ir)n(e)}var sr=null,cr=!1;function lr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;sr=e,cr||(cr=!0,setTimeout(()=>{cr=!1,sr=null}));var o=0,s=sr===e&&e[nr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[nr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){u(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=B,f=V;Pn(null),Fn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[nr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[nr]=t,delete e.currentTarget,Pn(d),Fn(f)}}}var ur=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function dr(e){return ur?.createHTML(e)??e}function fr(e){var t=$t(`template`);return t.innerHTML=dr(e.replaceAll(`<!>`,`<!---->`)),t.content}function pr(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function mr(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return pr(E,null),E;i===void 0&&(i=fr(a?e:`<!>`+e),n||(i=R(i)));var t=r||Ht?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=R(t),s=t.lastChild;pr(o,s)}else pr(t,t);return t}}function hr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return pr(E,null),E;if(!o){var e=R(fr(a));if(i)for(o=document.createDocumentFragment();R(e);)o.appendChild(R(e));else o=R(e)}var t=o.cloneNode(!0);if(i){var n=R(t),r=t.lastChild;pr(n,r)}else pr(t,t);return t}}function gr(e,t){return hr(e,t,`svg`)}function _r(e,t){if(T){var n=V;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),D();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var vr=[`touchstart`,`touchmove`];function yr(e){return vr.includes(e)}function br(e){let t=0,n=Mt(0),r;return()=>{sn()&&(U(n),hn(()=>(t===0&&(r=tr(()=>e(()=>Rt(n)))),t+=1,()=>{qe(()=>{--t,t===0&&(r?.(),r=void 0,Rt(n))})})))}}var xr=re|ie;function Sr(e,t,n,r){new Cr(e,t,n,r)}var Cr=class{parent;is_pending=!1;transform_error;#e;#t=T?E:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=br(()=>(this.#m=Mt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=V;t.b=this,t.f|=128,n(e)},this.parent=V.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=_n(()=>{if(T){let e=this.#t;D();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},xr),T&&(this.#e=E)}#g(){try{this.#a=vn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);qe(r),t&&(this.#s=vn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){be();return}t=!0,n&&ze(),this.#s!==null&&wn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){nn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=vn(()=>e(this.#e)),qe(()=>{var e=this.#c=document.createDocumentFragment(),t=Kt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return vn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){nn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(P);return}this.#u===0&&(this.#e.before(e),this.#c=null,wn(this.#o,()=>{this.#o=null}),this.#x(P))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=vn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();On(this.#a,e);let t=this.#n.pending;this.#o=vn(()=>t(this.#e))}else this.#x(P)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Ze(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=V,n=B,r=k;Fn(this.#i),Pn(this.#i),Be(this.#i.ctx);try{return bt.ensure(),e()}finally{Fn(t),Pn(n),Be(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&wn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,qe(()=>{this.#d=!1,this.#m&&It(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),U(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;P?.is_fork?(this.#a&&P.skip_effect(this.#a),this.#o&&P.skip_effect(this.#o),this.#s&&P.skip_effect(this.#s),P.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(z(this.#a),null),this.#o&&=(z(this.#o),null),this.#s&&=(z(this.#s),null),T&&(Se(this.#t),O(),Se(we()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return vn(()=>{var r=V;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return nn(e,this.#i.parent),null}}))};qe(()=>{var t;try{t=this.transform_error(e)}catch(e){nn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>nn(e,this.#i&&this.#i.parent)):n(t)})}};function wr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[w]??=e.nodeValue)&&(e[w]=n,e.nodeValue=`${n}`)}function Tr(e,t){return Or(e,t)}function Er(t,n){Gt(),n.intro=n.intro??!1;let r=n.target,i=T,a=E;try{for(var o=R(r);o&&(o.nodeType!==8||o.data!==`[`);)o=qt(o);if(!o)throw e;xe(!0),Se(o);let i=Or(t,{...n,anchor:o});return xe(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
2
- `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==e&&console.warn(`Failed to hydrate: `,i),n.recover===!1&&Pe(),Gt(),Zt(r),xe(!1),Tr(t,n)}finally{xe(i),Se(a)}}var Dr=new Map;function Or(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){Gt();var u=void 0,d=fn(()=>{var s=r??n.appendChild(Kt());Sr(s,{pending:()=>{}},n=>{Ve({});var r=k;if(o&&(r.c=o),a&&(i.$$events=a),T&&pr(n,null),u=t(n,i)||Ue(),T&&(V.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw ye(),e;He()},l);var d=new Set,f=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!d.has(r)){d.add(r);var i=yr(r);for(let e of[n,document]){var a=Dr.get(e);a===void 0&&(a=new Map,Dr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,lr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(rr)),ir.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=Dr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,lr),t.delete(e),t.size===0&&Dr.delete(r)):t.set(e,i)}ir.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return kr.set(u,d),u}var kr=new WeakMap;function Ar(e,t){let n=kr.get(e);return n?(kr.delete(e),n(t)):Promise.resolve()}var jr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)En(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(En(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(z(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();On(r,t),t.append(Kt()),this.#n.set(e,{effect:r,fragment:t})}else z(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),wn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(z(n.effect),this.#n.delete(e))};ensure(e,t){var n=P,r=Qt();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Kt();i.append(a),this.#n.set(e,{effect:vn(()=>t(a)),fragment:i})}else this.#t.set(e,vn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else T&&(this.anchor=E),this.#a(n)}};function Mr(e,t,n=!1){var r;T&&(r=E,D());var i=new jr(e),a=n?re:0;function o(e,t){if(T){var n=Te(r);if(e!==parseInt(n.substring(1))){var a=we();Se(a),i.anchor=a,xe(!1),i.ensure(e,t),xe(!0);return}}i.ensure(e,t)}_n(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Nr(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;T&&(l=Se(R(d)))}gn(()=>{var t=V;if(u===(u=n()??``)){T&&D();return}if(a&&!T){t.nodes=null,d.innerHTML=u,u!==``&&pr(R(d),d.lastChild);return}if(t.nodes!==null&&(Sn(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(T){for(var c=E.data,f=D(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=qt(f);if(f===null)throw ye(),e;pr(E,p),l=Se(f);return}var m=$t(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(pr(R(h),h.lastChild),o||s)for(;R(h);)l.before(R(h));else l.before(h)}})}function Pr(e,t){pn(()=>{e=V?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=$t(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var Fr=[...`
3
- \r\f\xA0\v`];function Ir(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Fr.includes(r[o-1]))&&(s===r.length||Fr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Lr(e,t,n,r,i,a){var o=e[me];if(T||o!==n||o===void 0){var s=Ir(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var Rr=Symbol(`is custom element`),zr=Symbol(`is html`),Br=_e?`link`:`LINK`;function Vr(e,t,n,r){var i=Hr(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Br)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Wr(e).has(t)?e[t]=n:e.setAttribute(t,n))}function Hr(e){return e[pe]??={[Rr]:e.nodeName.includes(`-`),[zr]:e.namespaceURI===n}}var Ur=new Map;function Wr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ur.get(t);if(n)return n;Ur.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=f(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=h(i)}return n}function Gr(e,t){return e===t||e?.[le]===t}function Kr(e=Ue(),t,n,r){var i=k.r,a=V;return pn(()=>{var o,s;return hn(()=>{o=s,s=r?.()||[],tr(()=>{Gr(n(...s),e)||(t(e,...s),o&&Gr(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Gr(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var qr=!1;function Jr(e){var t=qr;try{return qr=!1,[e(),qr]}finally{qr=t}}function Yr(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=nt(r),U(l)):(c&&(c=!1,s=o?tr(r):r),s);let f;if(a){var p=le in e||de in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=Jr(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Fe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?nt:at)(()=>(v=!1,g()));a&&U(y);var b=V;return(function(e,t){if(arguments.length>0){let n=t?U(y):i&&a?Bt(e):e;return L(y,n),v=!0,s!==void 0&&(s=n),e}return jn&&v||b.f&16384?y.v:U(y)})}function Xr(e){return new Zr(e)}var Zr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Nt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return U(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===de?!0:(U(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return L(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Er:Tr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),(!e?.props?.$$host||e.sync===!1)&&xt(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||u(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Ar(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Qr;typeof HTMLElement==`function`&&(Qr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=$t(`slot`);e!=="default"&&(n.name=e),_r(t,n)}}let t={},n=ei(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=$r(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Xr({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=dn(()=>{hn(()=>{this.$$r=!0;for(let e of l(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=$r(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=$r(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return l(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function $r(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function ei(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function ti(e,t,n,r,i,a){let o=class extends Qr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return l(t).map(e=>(t[e].attribute||e).toLowerCase())}};return l(t).forEach(e=>{u(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=$r(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(d(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{u(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}function ni(e,t){this.v=e,this.k=t}function ri(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ii(e){if(Array.isArray(e))return e}function ai(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function oi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function si(e,t){return ii(e)||ai(e,t)||ci(e,t)||oi()}function ci(e,t){if(e){if(typeof e==`string`)return ri(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ri(e,t):void 0}}function li(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof ni;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}li.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},li.prototype.next=function(e){return this._invoke(`next`,e)},li.prototype.throw=function(e){return this._invoke(`throw`,e)},li.prototype.return=function(e){return this._invoke(`return`,e)};var ui=Object.entries,di=Object.setPrototypeOf,fi=Object.isFrozen,pi=Object.getPrototypeOf,mi=Object.getOwnPropertyDescriptor,W=Object.freeze,G=Object.seal,hi=Object.create,gi=typeof Reflect<`u`&&Reflect,_i=gi.apply,vi=gi.construct;W||=function(e){return e},G||=function(e){return e},_i||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},vi||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var yi=J(Array.prototype.forEach);Array.prototype.indexOf;var bi=J(Array.prototype.lastIndexOf),xi=J(Array.prototype.pop),Si=J(Array.prototype.push);Array.prototype.slice;var Ci=J(Array.prototype.splice),wi=Array.isArray,Ti=J(String.prototype.toLowerCase),Ei=J(String.prototype.toString),Di=J(String.prototype.match),Oi=J(String.prototype.replace),ki=J(String.prototype.indexOf),Ai=J(String.prototype.trim),ji=J(Number.prototype.toString),Mi=J(Boolean.prototype.toString),Ni=typeof BigInt>`u`?null:J(BigInt.prototype.toString),Pi=typeof Symbol>`u`?null:J(Symbol.prototype.toString),K=J(Object.prototype.hasOwnProperty),Fi=J(Object.prototype.toString),q=J(RegExp.prototype.test),Ii=Li(TypeError);function J(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return _i(e,t,r)}}function Li(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return vi(e,n)}}function Y(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(di&&di(e,null),!wi(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(fi(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ri(e){for(let t=0;t<e.length;t++)K(e,t)||(e[t]=null);return e}function zi(e){let t=hi(null);for(let r of ui(e)){var n=si(r,2);let i=n[0],a=n[1];K(e,i)&&(wi(a)?t[i]=Ri(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=zi(a):t[i]=a)}return t}function Bi(e){switch(typeof e){case`string`:return e;case`number`:return ji(e);case`boolean`:return Mi(e);case`bigint`:return Ni?Ni(e):`0`;case`symbol`:return Pi?Pi(e):`Symbol()`;case`undefined`:return Fi(e);case`function`:case`object`:{if(e===null)return Fi(e);let t=e,n=Vi(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Fi(e)}return Fi(e)}default:return Fi(e)}}function Vi(e,t){for(;e!==null;){let n=mi(e,t);if(n){if(n.get)return J(n.get);if(typeof n.value==`function`)return J(n.value)}e=pi(e)}function n(){return null}return n}function Hi(e){try{return q(e,``),!0}catch{return!1}}var Ui=W(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Wi=W(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Gi=W([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ki=W([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),qi=W(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ji=W([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Yi=W([`#text`]),Xi=W(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Zi=W(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Qi=W(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),$i=W([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ea=G(/{{[\w\W]*|^[\w\W]*}}/g),ta=G(/<%[\w\W]*|^[\w\W]*%>/g),na=G(/\${[\w\W]*/g),ra=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),ia=G(/^aria-[\-\w]+$/),aa=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oa=G(/^(?:\w+script|data):/i),sa=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ca=G(/^html$/i),la=G(/^[a-z][.\w]*(-[.\w]+)+$/i),ua=G(/<[/\w!]/g),da=G(/<[/\w]/g),fa=G(/<\/no(script|embed|frames)/i),pa=G(/\/>/i),ma={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ha=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],ga=W(Y({},ha)),_a=function(){let e={};return yi(ha,t=>{e[t]=G(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),W(e)}(),va=function(){return typeof window>`u`?null:window},ya=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ba=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},xa=function(e,t,n,r){return K(e,t)&&wi(e[t])?Y(r.base?zi(r.base):{},e[t],r.transform):n},Sa=function(e,t,n){let r=K(e,t)?e[t]:void 0;return r&&typeof r==`object`?zi(r):n()};function Ca(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:va(),t=e=>Ca(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==ma.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Vi(d,`cloneNode`),p=Vi(d,`remove`),m=Vi(d,`removeAttributeNode`),h=Vi(d,`nextSibling`),g=Vi(d,`childNodes`),_=Vi(d,`parentNode`),v=Vi(d,`shadowRoot`),y=Vi(d,`attributes`),b=o&&o.prototype?Vi(o.prototype,`nodeType`):null,x=o&&o.prototype?Vi(o.prototype,`nodeName`):null,ee=o&&o.prototype?Vi(o.prototype,`ownerDocument`):null,te=function(e){return b?b(e):e.nodeType},ne=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let S,C=``,re,ie=!1,ae=0,oe=function(){if(ae>0)throw Ii(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},se=function(e){oe(),ae++;try{return S.createHTML(e)}finally{ae--}},ce=function(e){oe(),ae++;try{return S.createScriptURL(e)}finally{ae--}},le=function(){return ie||=(re=ya(u,i),!0),re},ue=n,de=ue.implementation,fe=ue.createNodeIterator,pe=ue.createDocumentFragment,me=ue.getElementsByTagName,he=r.importNode,w=ba();t.isSupported=typeof ui==`function`&&typeof _==`function`&&de&&de.createHTMLDocument!==void 0;let ge=ea,_e=ta,ve=na,ye=ra,be=ia,T=oa,xe=sa,E=la,Se=aa,D=null,Ce=Y({},[...Ui,...Wi,...Gi,...qi,...Yi]),O=null,we=Y({},[...Xi,...Zi,...Qi,...$i]),Te=Object.seal(hi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,De=null,Oe=Object.seal(hi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ke=!0,Ae=!0,je=!1,Me=!0,Ne=!1,Pe=!0,Fe=!1,Ie=!1,Le=null,Re=null,ze=!1,k=!1,Be=!1,Ve=!1,He=!0,Ue=!1,We=`user-content-`,Ge=!0,Ke=!1,qe={},Je=null,Ye=Y({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),A=null,Xe=Y({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ze=null,Qe=Y({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),$e=`http://www.w3.org/1998/Math/MathML`,et=`http://www.w3.org/2000/svg`,j=`http://www.w3.org/1999/xhtml`,tt=j,nt=!1,rt=null,it=Y({},[$e,et,j],Ei),M=W([`mi`,`mo`,`mn`,`ms`,`mtext`]),at=Y({},M),ot=W([`annotation-xml`]),st=Y({},ot),ct=Y({},[`title`,`style`,`font`,`a`,`script`]),lt=null,ut=[`application/xhtml+xml`,`text/html`],N=null,P=null,dt=n.createElement(`form`),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(P&&P===e)return;(!e||typeof e!=`object`)&&(e={}),e=zi(e),lt=ut.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,N=lt===`application/xhtml+xml`?Ei:Ti,D=xa(e,`ALLOWED_TAGS`,Ce,{transform:N}),O=xa(e,`ALLOWED_ATTR`,we,{transform:N}),rt=xa(e,`ALLOWED_NAMESPACES`,it,{transform:Ei}),Ze=xa(e,`ADD_URI_SAFE_ATTR`,Qe,{transform:N,base:Qe}),A=xa(e,`ADD_DATA_URI_TAGS`,Xe,{transform:N,base:Xe}),Je=xa(e,`FORBID_CONTENTS`,Ye,{transform:N}),Ee=xa(e,`FORBID_TAGS`,zi({}),{transform:N}),De=xa(e,`FORBID_ATTR`,zi({}),{transform:N}),qe=K(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?zi(e.USE_PROFILES):e.USE_PROFILES:!1,ke=e.ALLOW_ARIA_ATTR!==!1,Ae=e.ALLOW_DATA_ATTR!==!1,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=e.SAFE_FOR_TEMPLATES||!1,Pe=e.SAFE_FOR_XML!==!1,Fe=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,Ve=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,He=e.SANITIZE_DOM!==!1,Ue=e.SANITIZE_NAMED_PROPS||!1,Ge=e.KEEP_CONTENT!==!1,Ke=e.IN_PLACE||!1,Se=Hi(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:aa,tt=typeof e.NAMESPACE==`string`?e.NAMESPACE:j,at=Sa(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Y({},M)),st=Sa(e,`HTML_INTEGRATION_POINTS`,()=>Y({},ot));let t=Sa(e,`CUSTOM_ELEMENT_HANDLING`,()=>hi(null));if(Te=hi(null),K(t,`tagNameCheck`)&&ft(t.tagNameCheck)&&(Te.tagNameCheck=t.tagNameCheck),K(t,`attributeNameCheck`)&&ft(t.attributeNameCheck)&&(Te.attributeNameCheck=t.attributeNameCheck),K(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),G(Te),Ne&&(Ae=!1),Be&&(k=!0),qe&&(D=Y({},Yi),O=hi(null),qe.html===!0&&(Y(D,Ui),Y(O,Xi)),qe.svg===!0&&(Y(D,Wi),Y(O,Zi),Y(O,$i)),qe.svgFilters===!0&&(Y(D,Gi),Y(O,Zi),Y(O,$i)),qe.mathMl===!0&&(Y(D,qi),Y(O,Qi),Y(O,$i))),Oe.tagCheck=null,Oe.attributeCheck=null,K(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Oe.tagCheck=e.ADD_TAGS:wi(e.ADD_TAGS)&&(D===Ce&&(D=zi(D)),Y(D,e.ADD_TAGS,N))),K(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Oe.attributeCheck=e.ADD_ATTR:wi(e.ADD_ATTR)&&(O===we&&(O=zi(O)),Y(O,e.ADD_ATTR,N))),K(e,`ADD_FORBID_CONTENTS`)&&wi(e.ADD_FORBID_CONTENTS)&&(Je===Ye&&(Je=zi(Je)),Y(Je,e.ADD_FORBID_CONTENTS,N)),Ge&&(D[`#text`]=!0),Fe&&Y(D,[`html`,`head`,`body`]),D.table&&(Y(D,[`tbody`]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ii(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ii(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=S;S=e.TRUSTED_TYPES_POLICY;try{C=se(``)}catch(e){throw S=t,e}}else e.TRUSTED_TYPES_POLICY===null?(S=void 0,C=``):(S===void 0&&(S=le()),S&&typeof C==`string`&&(C=se(``)));W&&W(e),P=e},mt=Y({},[...Wi,...Gi,...Ki]),ht=Y({},[...qi,...Ji]),gt=function(e,t,n){return t.namespaceURI===j?e===`svg`:t.namespaceURI===$e?e===`svg`&&(n===`annotation-xml`||at[n]):!!mt[e]},_t=function(e,t,n){return t.namespaceURI===j?e===`math`:t.namespaceURI===et?e===`math`&&st[n]:!!ht[e]},vt=function(e,t,n){return t.namespaceURI===et&&!st[n]||t.namespaceURI===$e&&!at[n]?!1:!ht[e]&&(ct[e]||!mt[e])},yt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:tt,tagName:`template`});let n=Ti(e.tagName),r=Ti(t.tagName);return rt[e.namespaceURI]?e.namespaceURI===et?gt(n,t,r):e.namespaceURI===$e?_t(n,t,r):e.namespaceURI===j?vt(n,t,r):!!(lt===`application/xhtml+xml`&&rt[e.namespaceURI]):!1},bt=function(e){Si(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw Ii(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},xt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},St=function(e){wt(e);let t=g(e);if(t){let e=[];yi(t,t=>{Si(e,t)}),yi(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&xt(e,r,i)}},F=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Si(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(k||Be)try{bt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ct=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||O[N(i)]||xt(e,r,i)}},wt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();te(e)===ma.element&&Ct(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Tt=function(e,t){return Pe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Et=function(e){if(!Pe)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=te(e);if(n===ma.processingInstruction||n===ma.comment&&q(da,e.data)){try{p(e)}catch{}continue}if(n===ma.element){let t=e,n=N(ne(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Tt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Dt=function(e){let t=null,r=null;if(ze)e=`<remove></remove>`+e;else{let t=Di(e,/^[\r\n\t ]+/);r=t&&t[0]}lt===`application/xhtml+xml`&&tt===j&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=S?se(e):e;if(tt===j)try{t=new l().parseFromString(i,lt)}catch{}if(!t||!t.documentElement){t=de.createDocument(tt,`template`,null);try{t.documentElement.innerHTML=nt?C:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),tt===j?me.call(t,Fe?`html`:`body`)[0]:Fe?t.documentElement:a},Ot=function(e){let t=ee?ee(e):e.ownerDocument;return fe.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},kt=function(e){return e=Oi(e,ge,` `),e=Oi(e,_e,` `),e=Oi(e,ve,` `),e},At=function(e){e.normalize();let t=ee?ee(e):e.ownerDocument,n=fe.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=kt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&yi(i,e=>{Mt(e.content)&&At(e.content)})},jt=function(e){let t=x?x(e):null;return typeof t!=`string`||N(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Mt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===ma.documentFragment}catch{return!1}},I=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Nt(e,n,r){e.length!==0&&yi(e,e=>{e.call(t,n,r,P)})}let L=function(e,t){return!!(Pe&&e.hasChildNodes()&&!I(e.firstElementChild)&&q(ua,e.textContent)&&q(ua,e.innerHTML)||Pe&&e.namespaceURI===j&&ga[t]&&(I(e.firstElementChild)||typeof e.textContent==`string`&&q(_a[t],e.textContent))||e.nodeType===ma.processingInstruction||Pe&&e.nodeType===ma.comment&&q(da,e.data))},Pt=function(e,t){if(e instanceof RegExp)return q(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},Ft=function(e,t,n){if(!Ee[t]&&Vt(t)&&Pt(Te.tagNameCheck,t))return!1;if(Ge&&!Je[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return bt(e),!0},It=function(e,t,n,r){return e.length===0?t:t===n||t===r?zi(t):t},Lt=function(e,t){return e===t||_(e)!==null?!1:(Ke&&wt(e),!0)},Rt=function(e,n){if(Nt(w.beforeSanitizeElements,e,null),Lt(e,n))return!0;if(jt(e))return bt(e),!0;let r=N(ne(e));if(D=It(w.uponSanitizeElement,D,Ce,Le),Nt(w.uponSanitizeElement,e,{tagName:r,allowedTags:D}),Lt(e,n))return!0;if(L(e,r))return bt(e),!0;if(Ee[r]||!(Oe.tagCheck instanceof Function&&Oe.tagCheck(r))&&!D[r]){let t=Ft(e,r,n);return t===!1&&(Nt(w.afterSanitizeElements,e,null),Lt(e,n))?!0:t}if(te(e)===ma.element&&!yt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&q(fa,e.innerHTML))return bt(e),!0;if(Ne&&e.nodeType===ma.text){let n=kt(e.textContent);e.textContent!==n&&(Si(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Nt(w.afterSanitizeElements,e,null),Lt(e,n)},zt=function(e,t,r){if(De[t]||Tt(t,e)||He&&(t===`id`||t===`name`)&&(r in n||r in dt))return!1;let i=O[t]||Oe.attributeCheck instanceof Function&&Oe.attributeCheck(t,e);return Ae&&q(ye,t)||ke&&q(be,t)?!0:i?Ze[t]||q(Se,Oi(r,xe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ki(r,`data:`)===0&&A[e]||je&&!q(T,Oi(r,xe,``))?!0:!r:Vt(e)&&Pt(Te.tagNameCheck,e)&&Pt(Te.attributeNameCheck,t,e)||t===`is`&&Te.allowCustomizedBuiltInElements&&Pt(Te.tagNameCheck,r)},Bt=Y({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Vt=function(e){return!Bt[Ti(e)]&&q(E,e)},Ht=function(e,t,n,r){if(S&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return se(r);case`TrustedScriptURL`:return ce(r)}return r},Ut=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),jt(e)?(bt(e),!1):!0}catch{return F(t,e),!1}},Wt=function(e,n){if(Nt(w.beforeSanitizeAttributes,e,null),Lt(e,n))return;let r=e.attributes;if(!r||jt(e))return;O=It(w.uponSanitizeAttribute,O,we,Re);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0},a=r.length,o=N(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=N(s),d=l,f=s===`value`?d:Ai(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Nt(w.uponSanitizeAttribute,e,i),f=i.attrValue,Ue&&(u===`id`||u===`name`)&&ki(f,We)!==0&&(F(s,e,n),f=We+f,p=!0),Pe&&q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){F(s,e,n);continue}if(u===`attributename`&&Di(f,`href`)){F(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){F(s,e,n);continue}if(!Me&&q(pa,f)){F(s,e,n);continue}if(Ne&&(f=kt(f)),!zt(o,u,f)){F(s,e,n);continue}f=Ht(o,u,c,f),f!==d&&Ut(e,s,c,f)&&p&&xi(t.removed)}}Nt(w.afterSanitizeAttributes,e,null),Lt(e,n)},Gt=function(e){let t=null,n=Ot(e);for(Nt(w.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Nt(w.uponSanitizeShadowNode,t,null),Rt(t,e),Wt(t,e),Mt(t.content)&&Gt(t.content),te(t)===ma.element){let e=v(t);Mt(e)&&(Kt(e),Gt(e))}Nt(w.afterSanitizeShadowDOM,e,null)},Kt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Gt(e.shadow);continue}let n=e.node,r=te(n)===ma.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&N(e)===`template`){let e=n.content;Mt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Mt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(nt=!e,nt&&(e=`<!-->`),typeof e!=`string`&&!I(e)&&(e=Bi(e),typeof e!=`string`))throw Ii(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ie?(D=Le,O=Re):pt(n),(w.uponSanitizeElement.length>0||w.uponSanitizeAttribute.length>0)&&(D=zi(D)),w.uponSanitizeAttribute.length>0&&(O=zi(O)),t.removed=[];let c=Ke&&typeof e!=`string`&&I(e);if(c){Et(e);let t=ne(e);if(typeof t==`string`){let n=N(t);if(!D[n]||Ee[n])throw St(e),Ii(`root node is forbidden and cannot be sanitized in-place`)}if(jt(e))throw St(e),Ii(`root node is clobbered and cannot be sanitized in-place`);try{Kt(e)}catch(t){throw St(e),t}}else if(I(e))i=Dt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===ma.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Kt(i);else{if(!k&&!Ne&&!Fe&&e.indexOf(`<`)===-1)return S&&Ve?se(e):e;if(i=Dt(e),!i)return k?null:Ve?C:``}i&&ze&&bt(i.firstChild);let l=c?e:i;try{let e=Ot(l);for(;o=e.nextNode();)Rt(o,l),Wt(o,l),Mt(o.content)&&Gt(o.content)}catch(n){throw c&&(St(e),yi(t.removed,e=>{e.element&&wt(e.element)})),n}if(c){let n=!1;if(yi(t.removed,t=>{t.element&&(t.element===e&&(n=!0),wt(t.element))}),n)throw Ii(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Ne&&At(e),e}if(k){if(Ne&&At(i),Be)for(s=pe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(O.shadowroot||O.shadowrootmode)&&(s=he.call(r,s,!0)),s}let u=Fe?i.outerHTML:i.innerHTML;return Fe&&D[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&q(ca,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
5
- `+u),Ne&&(u=kt(u)),S&&Ve?se(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(e),Ie=!0,Le=D,Re=O},t.clearConfig=function(){P=null,Ie=!1,Le=null,Re=null,S=re,C=``},t.isValidAttribute=function(e,t,n){P||pt({});let r=N(e),i=N(t);return zt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&K(w,e)&&Si(w[e],t)},t.removeHook=function(e,t){if(K(w,e)){if(t!==void 0){let n=bi(w[e],t);return n===-1?void 0:Ci(w[e],n,1)[0]}return xi(w[e])}},t.removeHooks=function(e){K(w,e)&&(w[e]=[])},t.removeAllHooks=function(){w=ba()},t}var wa=Ca(),Ta=`data-pie-authored-ink`,Ea=`data-pie-authored-fill`,Da=`data-pie-authored-border`,Oa=[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],ka=new Set([`currentcolor`,`inherit`,`initial`,`unset`,`revert`,`revert-layer`,`transparent`]);function Aa(e){let t=e?.trim().toLowerCase();return!t||ka.has(t)||t.includes(`var(`)?!1:Pa(t)?.a!==0}function ja(e){let t=Pa(e);if(!t)return`shade`;let n=e=>(e*t.a+255*(1-t.a))/255,[r,i,a]=[n(t.r),n(t.g),n(t.b)],o=.2126*$a(r)+.7152*$a(i)+.0722*$a(a),s=Math.max(r,i,a)-Math.min(r,i,a);return o>=.85&&s<=.08?`light`:`shade`}function Ma(e){e.removeAttribute(Ta),e.removeAttribute(Ea),e.removeAttribute(Da);let t=e.hasAttribute(`style`)?e.style:void 0,n=e=>t?.getPropertyValue(e).trim()??``,r=[],i=n(`color`),a=e.localName===`font`?e.getAttribute(`color`):null;Aa(i||a)&&(e.setAttribute(`data-pie-authored-ink`,``),i&&r.push(`color`));let o=n(`background-color`),s=o||Na(e.getAttribute(`bgcolor`));Aa(s)&&(e.setAttribute(`data-pie-authored-fill`,ja(s)),o&&r.push(`background-color`));let c=Oa.filter(e=>Aa(n(e)));c.length&&(e.setAttribute(`data-pie-authored-border`,``),r.push(...c));for(let e of r)t?.getPropertyPriority(e)===`important`&&t.setProperty(e,t.getPropertyValue(e))}function Na(e){let t=e?.trim()??``;return/^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t)?`#${t}`:t}function Pa(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};let n=Ia().get(t);if(n)return La(n);if(t.startsWith(`#`))return La(t.slice(1));let r=/^([a-z]+)\(([^()]*)\)$/.exec(t);if(!r)return null;let i=r[2].trim().split(/\s*[\s,/]\s*/);if(i.length!==3&&i.length!==4)return null;let[a,o,s,c]=i,l=Ba(c),u;switch(r[1]){case`rgb`:case`rgba`:u=[a,o,s].map(e=>X(e,255)/255);break;case`hsl`:case`hsla`:u=Ha(za(a),X(o,100)/100,X(s,100)/100);break;case`hwb`:u=Ua(za(a),X(o,100)/100,X(s,100)/100);break;case`lab`:u=Ya(X(a,100),X(o,125),X(s,125));break;case`lch`:u=Ya(X(a,100),...Va(X(o,150),za(s)));break;case`oklab`:u=Xa(X(a,1),X(o,.4),X(s,.4));break;case`oklch`:u=Xa(X(a,1),...Va(X(o,.4),za(s)));break;default:return null}if(Number.isNaN(l)||u.some(Number.isNaN))return null;let[d,f,p]=u.map(e=>eo(e,0,1)*255);return{r:d,g:f,b:p,a:l}}var Fa;function Ia(){return Fa??=new Map(`aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32`.split(` `).map(e=>e.split(`:`))),Fa}function La(e){if(!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e))return null;let[t,n,r,i=255]=(e.length<=4?[...e].map(e=>e+e):e.match(/../g)??[]).map(e=>Number.parseInt(e,16));return{r:t,g:n,b:r,a:i/255}}var Ra=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;function X(e,t){if(e===`none`)return 0;let n=Ra.exec(e);return!n||n[2]&&n[2]!==`%`?NaN:n[2]?Number(n[1])/100*t:Number(n[1])}function za(e){if(e===`none`)return 0;let t=Ra.exec(e);if(!t||t[2]===`%`)return NaN;let n=Number(t[1]);return((t[2]===`rad`?n*180/Math.PI:t[2]===`grad`?n*.9:t[2]===`turn`?n*360:n)%360+360)%360}function Ba(e){return e===void 0?1:eo(X(e,1),0,1)}function Va(e,t){let n=Math.max(0,e),r=t*Math.PI/180;return[n*Math.cos(r),n*Math.sin(r)]}function Ha(e,t,n){let r=eo(t,0,1),i=eo(n,0,1),a=t=>{let n=(t+e/30)%12,a=r*Math.min(i,1-i);return i-a*Math.max(-1,Math.min(n-3,9-n,1))};return[a(0),a(8),a(4)]}function Ua(e,t,n){let r=eo(t,0,1),i=eo(n,0,1);return r+i>=1?[,,,].fill(r/(r+i)):Ha(e,1,.5).map(e=>e*(1-r-i)+r)}var Wa=24389/27,Ga=216/24389,Ka=[.3457/.3585,1,.2958/.3585],qa=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],Ja=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]];function Ya(e,t,n){let r=eo(e,0,100),i=(r+16)/116,a=t/500+i,o=i-n/200;return Za(Ja,Za(qa,[a**3>Ga?a**3:(116*a-16)/Wa,r>Wa*Ga?i**3:r/Wa,o**3>Ga?o**3:(116*o-16)/Wa].map((e,t)=>e*Ka[t]))).map(Qa)}function Xa(e,t,n){let r=eo(e,0,1);return Za([[4.0767416621,-3.3077115913,.2309699292],[-1.2684380046,2.6097574011,-.3413193965],[-.0041960863,-.7034186147,1.707614701]],[r+.3963377774*t+.2158037573*n,r-.1055613458*t-.0638541728*n,r-.0894841775*t-1.291485548*n].map(e=>e**3)).map(Qa)}function Za(e,t){return e.map(e=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2])}function Qa(e){let t=eo(e,0,1);return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function $a(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function eo(e,t,n){return Math.min(n,Math.max(t,e))}var to=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],no=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],ro=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),io=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,ao=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],oo=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,so=`data-pie-play-audio`,co={ADD_TAGS:e=>ro.has(e)||io.test(e),ADD_ATTR:ao,FORBID_TAGS:to,FORBID_ATTR:no,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},lo=!1;function uo(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(so);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var fo=null;function po(){return fo||(fo=wa(window),fo.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=oo.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(`data-pie-play-audio`,t),lo||=(document.addEventListener(`click`,uo),!0))}),fo.addHook(`afterSanitizeAttributes`,Ma),fo)}var mo=1e6,ho=new Map,go=0;function _o(e){if(e==null||e===``||!wa.isSupported)return``;let t=typeof e==`string`?e:String(e),n=ho.get(t);if(n!==void 0)return n;let r=String(po().sanitize(t,co)),i=t.length+r.length;if(i>mo)return r;for(let[e,t]of ho){if(go+i<=mo)break;ho.delete(e),go-=e.length+t.length}return ho.set(t,r),go+=i,r}var vo=`4.1.3`,yo=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,bo=`@pie-lib/math-rendering@2`,xo=[`nemeth`,`euro`],So=`mathjax@${vo}/sre`,Co=/^[^@]+@[^@]+$/;function wo(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!Co.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function To(){let e=globalThis[bo]?.opts;return e&&typeof e==`object`?e:{}}function Eo(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function Do(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=Eo(r);e&&t.set(n,e)}return t.size?t:void 0}function Oo(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function ko(e,t){let n=To(),r=Eo(e.assetRoot??n.assetRoot)??wo(t);return{root:r,speechPath:Eo(e.speechPath??n.speechPath)??(r?`${r}/${So}`:void 0),speechLocales:Oo(e.speechLocales??n.speechLocales),urls:Do(e.assetUrls??n.assetUrls)}}function Ao(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!xo.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function jo(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!xo.includes(e))}var Mo={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},No=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function Po(e){let t=globalThis;t[No]??=[];let n=t[No];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${Mo[e]}. Set window['${bo}'].opts.assetRoot to an npm root. See ${yo}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(`pie-mathjax-no-asset-root`,{detail:{effect:e,message:r,docsUrl:yo}}))}var Fo=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,Io=`pie-mathjax-version-conflict`,Lo=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function Ro(e,t){if(typeof window>`u`)return;let n=globalThis;n[Lo]??={logged:!1,conditions:[]};let r=n[Lo];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Fo}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(Io,{detail:{condition:e,message:i,docsUrl:Fo}}))}function zo(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function Bo(){return window.MathJax}function Vo(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${vo}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${vo}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function Ho(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(Vo(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(Po(`untypeset`),Promise.resolve(!1))}var Uo=globalThis,Wo=`PIE-MJX-CHTML-styles`,Go=[`MJX-CHTML-styles`,`MJX-SVG-styles`],Ko=zo,qo=`http://www.w3.org/1998/Math/MathML`,Jo=/^([a-z_][\w.-]*):math$/,Yo=/^[a-z][a-z0-9-]*$/;function Xo(e){for(let t of e.querySelectorAll(`*`)){let n=Jo.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(Zo(t,`${n}:`))}}function Zo(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!Yo.test(n))return e;let r=e.ownerDocument.createElementNS(qo,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?Zo(n,t):n)}return r}var Qo=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),$o={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},es={tight:`0em`,medium:`0.1em`,loose:`0.2em`},ts=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,ns=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,rs=/^(\d+(\.\d*)?|\.\d+)$/,is=new Set([`mn`,`mo`,`mi`,`mtext`]),as=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function Z(e,t,n=[],r={}){let i=e.createElementNS(qo,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function os(e,t){let n=Z(e.document,`mo`);return n.textContent=t,n}function ss(e){let t=Z(e.document,`mn`);return t.textContent=`0`,Z(e.document,`mphantom`,[t])}function cs(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function ls(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function us(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function ds(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function fs(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(us(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else is.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:ds(r.length,n.stackAlign,i??a),position:t}}function ps(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>Qo.has(e))}function ms(e,t){let n=[...e.children].filter(e=>!us(e));return n.length<=1?n[0]??null:Z(t.document,`mrow`,n)}function hs(e,t,n){let r=cs(e,`location`)??`n`,i=ps(e.getAttribute(`crossout`)),a=[...e.children].map(e=>us(e)?null:e.localName===`mscarry`?{content:ms(e,n),location:cs(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?ps(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:ds(a.length,n.stackAlign),position:t,scale:rs.test(o)?o:`0.6`}}function gs(e){let t=cs(e,`mslinethickness`)??`medium`,n=$o[t]??(ts.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${ns.test(r)?r:`currentColor`}`}function _s(e,t,n){let r=Math.max(0,ls(e,`length`));return{kind:`line`,length:r,anchor:ds(r,n.stackAlign),position:t,border:gs(e)}}function vs(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+ls(e,`position`);switch(e.localName){case`msgroup`:vs([...e.children],o,ls(e,`shift`),r,i);break;case`msline`:i.push(_s(e,o,r));break;case`mscarries`:i.push(hs(e,o,r));break;case`msrow`:case`mrow`:i.push(fs([...e.children],o,r));break;default:i.push(fs([e],o,r))}})}function ys(e){return-e.anchor-e.position}function bs(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function xs(e){return ys(e)+bs(e)-1}function Ss(e,t,n,r){let i=e=>Z(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>Z(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function Cs(e,t,n){let r=Z(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?Z(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function ws(e,t,n,r,i){let a=e&&t.crossout.length?Cs(e,t.crossout,i):e;if(!t.content)return a;let o=Z(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return Ss(a??ss(i),o,n,i)}function Ts(e,t){return e.carries[t-ys(e)]??null}function Es(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=Ts(s,t),l=n.slice(0,o).some(e=>Ts(e,t));if(!c&&!l)return;let u=c??{content:ss(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=ws(i,u,d,s.scale,r)}),e.content=i}function Ds(e,t){let n=e.filter(e=>bs(e)>0),r=Math.min(0,...n.map(ys)),i=Math.max(r,...n.map(xs))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+ys(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+ys(e)+r].content=t}),u.length&&n.forEach((e,n)=>{Es(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function Os(e,{rows:t},n){let r=Z(n.document,`mtable`,t.map(e=>Z(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return Z(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])as.has(t)||r.setAttribute(t,n);let i=cs(e,`charspacing`)??`medium`,a=cs(e,`charalign`);return r.setAttribute(`columnspacing`,es[i]??(ts.test(i)?i:es.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function ks(e){return{document:e.ownerDocument,stackAlign:cs(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function As(e){let t=ks(e),n=[];return vs([...e.children],0,0,t,n),Os(e,Ds(n,t),t)}function js(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function Ms(e,t){let n=os(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[Z(t.document,`mrow`,[e,Z(t.document,`mspace`,[],{width:`0.2em`})]),Z(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function Ns(e){let t=ks(e),[n,r,...i]=[...e.children],a=n&&!us(n)?n:null,o=r&&!us(r)?r:null,s=cs(e,`longdivstyle`)??`lefttop`,c=gs(e),l=[];vs(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...fs(n,0,t).cells)};switch(s){case`left/\\right`:f(a,os(t,`/`)),p(os(t,`\\`),o);break;case`left)(right`:f(a,os(t,`)`)),p(os(t,`(`),o);break;case`:right=right`:p(os(t,`:`),a,os(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&vs([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...Ms(a,t));break}let m=Ds(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+ys(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+xs(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,js(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,js(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:Ps(h,g,s,a,o,c,t);break;default:js(h,g,_(1),v,`top`,c)}return Os(e,m,t)}function Ps(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&Z(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function Fs(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?As(t):Ns(t))}var Is=`PIE-MJX-explorer-styles`,Ls=`var(--pie-text, black)`,Rs=`var(--pie-background, #ffffff)`,zs=`var(--pie-border-dark, #66686A)`,Bs=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,Vs=`color-mix(in srgb, ${Bs} 15%, transparent)`,Hs=`
1
+ this.SimpleClozeElement=(function(){typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var e={},t=Symbol(`uninitialized`),n=`http://www.w3.org/1999/xhtml`,r=`http://www.w3.org/2000/svg`,i=`http://www.w3.org/1998/Math/MathML`,a=Array.isArray,o=Array.prototype.indexOf,s=Array.prototype.includes,c=Array.from,l=Object.keys,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyDescriptors,p=Object.prototype,m=Array.prototype,h=Object.getPrototypeOf,g=Object.isExtensible,_=()=>{};function v(e){for(var t=0;t<e.length;t++)e[t]()}function y(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var b=1024,x=2048,ee=4096,te=8192,ne=16384,S=32768,C=1<<25,re=65536,ie=1<<19,ae=1<<20,oe=1<<21,se=1<<22,ce=1<<23,le=Symbol(`$state`),ue=Symbol(`component`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),w=Symbol(`text`),ge=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},_e=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ve(){console.warn(`https://svelte.dev/e/derived_inert`)}function ye(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function xe(e){T=e}var E;function D(t){if(t===null)throw ye(),e;return E=t}function O(){return D(Kt(E))}function Se(t){if(T){if(Kt(E)!==null)throw ye(),e;E=t}}function k(e=1){if(T){for(var t=e,n=E;t--;)n=Kt(n);E=n}}function Ce(e=!0){for(var t=0,n=E;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Kt(n);e&&n.remove(),n=i}}function we(t){if(!t||t.nodeType!==8)throw ye(),e;return t.data}function Te(e){return e===this.v}function Ee(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function De(e){return!Ee(e,this.v)}function Oe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function ke(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ae(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function je(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Me(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ne(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Pe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Fe(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ie(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Le(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Re(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var A=null;function ze(e){A=e}function Be(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:H,l:null}}function Ve(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)ln(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,He(e)}function He(e={}){return u(e,ue,{value:!0}),e}function Ue(){return!0}var We=[];function Ge(){var e=We;We=[],v(e)}function Ke(e){if(We.length===0&&!pt){var t=We;queueMicrotask(()=>{t===We&&Ge()})}We.push(e)}function qe(){for(;We.length>0;)Ge()}var Je=~(x|ee|b);function j(e,t){e.f=e.f&Je|t}function Ye(e){e.f&512||e.deps===null?j(e,b):j(e,ee)}function Xe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),j(e,b)}function Ze(e){var t=V,n=H;Nn(null),Pn(null);try{return e()}finally{Nn(t),Pn(n)}}function Qe(e,t,n,r){let i=Ue()?tt:it;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=H,c=$e(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){tn(e,s)}M()}}var d=et();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>rt(e))).then(u).catch(e=>tn(e,s)).finally(d)}l?l.then(()=>{c(),f(),M()}):f()}function $e(){var e=H,t=V,n=A,r=F;return function(i=!0){Pn(e),Nn(t),ze(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function M(e=!0){Pn(null),Nn(null),ze(null),e&&F?.deactivate()}function et(){var e=H,t=e.b,n=F,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function tt(e){var n=2|x;return H!==null&&(H.f|=ie),{ctx:A,deps:null,effects:null,equals:Te,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:H,ac:null}}var nt=Symbol(`obsolete`);function rt(e,n,r){let i=H;i===null&&Oe();var a=void 0,o=jt(t),s=!V,c=new Set;return pn(()=>{var t=H,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ge&&n.reject(e)}).finally(M)}catch(e){n.reject(e),M()}var r=F;if(s){if(t.f&32768)var l=et();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(nt);else for(let e of c.values())e.reject(nt);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==nt&&(r.activate(),t?(o.f|=ce,Ft(o,t)):(o.f&8388608&&(o.f^=ce),Ft(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),sn(()=>{for(let e of c)e.reject(nt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function N(e){let t=tt(e);return In(t),t}function it(e){let t=tt(e);return t.equals=De,t}function at(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)B(t[n])}}function ot(e){var n,r=H,i=e.parent;if(!An&&i!==null&&e.v!==t&&i.f&24576)return ve(),e.v;Pn(i);try{at(e),n=Jn(e)}finally{Pn(r)}return n}function st(e){var t=ot(e);if(!e.equals(t)&&(e.wv=Gn(),(!F?.is_fork||e.deps===null)&&(F===null?e.v=t:(F.capture(e,t,!0),ut?.capture(e,t,!0)),e.deps===null))){j(e,b);return}An||(dt===null?Ye(e):(on()||F?.is_fork)&&dt.set(e,t))}function ct(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Ze(()=>{t.ac.abort(ge),t.ac=null}),t.fn!==null&&(t.teardown=_),Zn(t,0),yn(t))}function lt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Qn(t)}var P=null,F=null,ut=null,dt=null,ft=null,pt=!1,mt=!1,ht=null,gt=null,_t=0,vt=1,yt=class e{id=vt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){P===null?P=this:(P.#n=this,this.#t=P),P=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)j(r,x),t(r);for(r of n.m)j(r,ee),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=b}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),j(e,x),this.schedule(e);for(let e of this.#d)j(e,ee),this.schedule(e);this.apply();for(var t=ht=[],n=[],r=gt=[];this.#c.length>0;){_t++>1e3&&(this.#S(),xt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw Dt(e),this.#h()||this.discard(),t}}if(F=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(ht=null,gt=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Et(e,t);r.length>0&&F.#_();return}let a=this.#y();if(a){this.#x(n),this.#x(t),a.#b(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),ut=this,St(n),St(t),ut=null,this.#s?.resolve();var o=F;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0)if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this;o!==null&&(kt.clear(),o.#_())}#v(e,t,n){e.f^=b;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=b:i&4?t.push(r):Kn(r)&&(i&16&&this.#d.add(r),Qn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),j(i,x),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),F=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)Xe(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),dt?.set(e,n)),this.is_fork||(e.v=n)}activate(){F=this}deactivate(){F=null,dt=null}flush(){try{mt=!0,F=this,this.#_()}finally{_t=0,ft=null,ht=null,gt=null,mt=!1,F=null,dt=null,kt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(nt);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Ke(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=y()).promise}static ensure(){if(F===null){let t=F=new e;!mt&&!pt&&Ke(()=>{t.#e||t.flush()})}return F}apply(){dt=null}schedule(e){if(ft=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?P=e:t.#t=e,this.linked=!1}}};function bt(e){var t=pt;pt=!0;try{var n;for(e&&(F!==null&&!F.is_fork&&F.flush(),n=e());;){if(qe(),F===null)return n;F.flush()}}finally{pt=t}}function xt(){try{Me()}catch(e){tn(e,ft)}}var I=null;function St(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Kn(r)&&(I=new Set,Qn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Sn(r),I?.size>0)){kt.clear();for(let e of I){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)I.has(n)&&(I.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Qn(n)}}I.clear()}}I=null}}function Ct(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Ct(i,t,n,r):e&4194320&&!(e&2048)&&wt(i,t,r)&&(j(i,x),Tt(i))}}function wt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(s.call(t,r))return!0;if(r.f&2&&wt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Tt(e){F.schedule(e)}function Et(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,b);for(var n=e.first;n!==null;)Et(n,t),n=n.next}}function Dt(e){j(e,b);for(var t=e.first;t!==null;)Dt(t),t=t.next}var Ot=new Set,kt=new Map,At=!1;function jt(e,t){return{f:0,v:e,reactions:null,equals:Te,rv:0,wv:0}}function L(e,t){let n=jt(e,t);return In(n),n}function Mt(e,t=!1,n=!0){let r=jt(e);return t||(r.equals=De),r}function R(e,t,n=!1){return V!==null&&(!Mn||V.f&131072)&&Ue()&&V.f&4325394&&(Fn===null||!Fn.has(e))&&Le(),Ft(e,n?zt(t):t,gt)}var Nt=null,Pt=0;function Ft(e,t,n=null){if(!e.equals(t)){An?kt.set(e,t):kt.has(e)||kt.set(e,e.v);var r=yt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&ot(t),dt===null&&Ye(t)}e.wv=Gn(),Nt=null,Pt=0,Rt(e,x,n),Nt=null,Ue()&&H!==null&&H.f&1024&&!(H.f&96)&&(zn===null?Bn([e]):zn.push(e)),!r.is_fork&&Ot.size>0&&!At&&It()}return t}function It(){At=!1;for(let e of Ot){e.f&1024&&j(e,ee);let t;try{t=Kn(e)}catch{t=!0}t&&Qn(e)}Ot.clear()}function Lt(e){R(e,e.v+1)}function Rt(e,t,n){var r=e.reactions;if(r!==null){var i=Ue(),a=r.length;if(Pt+=a,Pt>1e5&&Nt===null&&(Nt=new Set),Nt!==null){if(Nt.has(e))return;Nt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===H)){var l=(c&x)===0;if(l&&j(s,t),c&131072)Ot.add(s);else if(c&2){var u=s;dt?.delete(u),Rt(u,ee,n)}else if(l){var d=s;c&16&&I!==null&&I.add(d),n===null?Tt(d):n.push(d)}}}}}function zt(e){if(typeof e!=`object`||!e||le in e||ue in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=L(0),s=null,c=Un,l=e=>{if(Un===c)return e();var t=V,n=Un;Nn(null),Wn(c);var r=e();return Nn(t),Wn(n),r};return i&&r.set(`length`,L(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Fe();var i=r.get(t);return i===void 0?l(()=>{var e=L(n.value,s);return r.set(t,e),e}):R(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>L(t,s));r.set(n,e),Lt(o)}}else R(i,t),Lt(o);return!0},get(n,i,a){if(i===le)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>L(zt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=U(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){this.has?.(e,n);var i=Reflect.getOwnPropertyDescriptor(e,n),a=r.get(n);if(a!==void 0){var o=U(a);if(o===t)return;if(i&&`value`in i)i.value=o;else return{enumerable:!0,configurable:!0,value:o,writable:!0}}return i},has(e,n){if(n===le)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||H!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>L(a?zt(e[n]):t,s)),r.set(n,i)),U(i)===t)?!1:a},set(e,n,a,c){var u=r.get(n),f=n in e;if(i&&n===`length`)for(var p=a;p<u.v;p+=1){var m=r.get(p+``);m===void 0?p in e&&(m=l(()=>L(t,s)),r.set(p+``,m)):R(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>L(void 0,s)),R(u,zt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>zt(a));R(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(c,a),!f){if(i&&typeof n==`string`){var _=r.get(`length`),v=Number(n);Number.isInteger(v)&&v>=_.v&&R(_,v+1)}Lt(o)}return!0},ownKeys(e){U(o);var n=Reflect.ownKeys(e).filter(e=>{var n=r.get(e);return n===void 0||n.v!==t});for(var[i,a]of r)a.v!==t&&!(i in e)&&n.push(i);return n},setPrototypeOf(){Ie()}})}var Bt,Vt,Ht,Ut;function Wt(){if(Bt===void 0){Bt=window,Vt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ht=d(t,`firstChild`).get,Ut=d(t,`nextSibling`).get,g(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),g(n)&&(n[w]=void 0)}}function Gt(e=``){return document.createTextNode(e)}function z(e){return Ht.call(e)}function Kt(e){return Ut.call(e)}function qt(e,t){if(!T)return z(e);var n=z(E);if(n===null)n=E.appendChild(Gt());else if(t&&n.nodeType!==3){var r=Gt();return n?.before(r),D(r),r}return t&&$t(n),D(n),n}function Jt(e,t=!1){if(!T)return z(e);var n=qt(e,t);return Se(e),n}function Yt(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=Kt(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=Gt();return r===null?i?.after(a):r.before(a),D(a),a}$t(r)}return D(r),r}function Xt(e){e.textContent=``}function Zt(){return!1}function Qt(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function $t(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function en(e){var t=H;if(t===null)return V.f|=ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;tn(e,t)}function tn(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function nn(e){H===null&&(V===null&&je(e),Ae()),An&&ke(e)}function rn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function an(e,t){var n=H;n!==null&&n.f&8192&&(e|=te);var r={ctx:A,deps:null,nodes:null,f:e|x|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};F?.register_created_effect(r);var i=r;if(e&4)ht===null?yt.ensure().schedule(r):ht.push(r);else if(t!==null){try{Qn(r)}catch(e){throw B(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=re))}if(i!==null&&(i.parent=n,n!==null&&rn(i,n),V!==null&&V.f&2&&!(e&64))){var a=V;(a.effects??=[]).push(i)}return r}function on(){return V!==null&&!Mn}function sn(e){let t=an(8,null);return j(t,b),t.teardown=e,t}function cn(e){nn(`$effect`);var t=H.f;if(!V&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return ln(e)}function ln(e){return an(4|ae,e)}function un(e){yt.ensure();let t=an(64|ie,e);return()=>{B(t)}}function dn(e){yt.ensure();let t=an(64|ie,e);return(e={})=>new Promise(n=>{e.outro?Cn(t,()=>{B(t),n(void 0)}):(B(t),n(void 0))})}function fn(e){return an(4,e)}function pn(e){return an(se|ie,e)}function mn(e,t=0){return an(8|t,e)}function hn(e,t=[],n=[],r=[]){Qe(r,t,n,t=>{an(8,()=>{e(...t.map(U))})})}function gn(e,t=0){return an(16|t,e)}function _n(e){return an(32|ie,e)}function vn(e){var t=e.teardown;if(t!==null){let n=An,r=V;jn(!0),Nn(null);try{t.call(null)}catch(t){tn(t,e.parent)}finally{jn(n),Nn(r)}}}function yn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Ze(()=>{e.abort(ge)});var r=n.next;n.f&64?n.parent=null:B(n,t),n=r}}function bn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||B(t),t=n}}function B(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(xn(e.nodes.start,e.nodes.end),n=!0),e.f|=C,yn(e,t&&!n),Zn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();vn(e),e.f^=C,e.f|=ne;var i=e.parent;i!==null&&i.first!==null&&Sn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function xn(e,t){for(;e!==null;){var n=e===t?null:Kt(e);e.remove(),e=n}}function Sn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Cn(e,t,n=!0){var r=[];e.f|=256,wn(e,r,!0);var i=()=>{n&&B(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function wn(e,t,n){if(!(e.f&8192)){e.f^=te;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;wn(i,t,o?n:!1)}i=a}}}function Tn(e){e.f&=-257,En(e,!0)}function En(e,t){if(!(e.f&256)&&e.f&8192){e.f^=te,e.f&1024||(j(e,x),yt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;En(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Dn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Kt(n);t.append(n),n=i}}var On=null,kn=!1,An=!1;function jn(e){An=e}var V=null,Mn=!1;function Nn(e){V=e}var H=null;function Pn(e){H=e}var Fn=null;function In(e){V!==null&&(V.f&2097152||V.f&2)&&(Fn??=new Set).add(e)}var Ln=null,Rn=0,zn=null;function Bn(e){zn=e}var Vn=1,Hn=0,Un=Hn;function Wn(e){Un=e}function Gn(){return++Vn}function Kn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Kn(a)&&st(a),a.wv>e.wv)return!0}t&512&&dt===null&&j(e,b)}return!1}function qn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Fn!==null&&Fn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?qn(a,t,!1):t===a&&(n?j(a,x):a.f&1024&&j(a,ee),Tt(a))}}function Jn(e){var t=Ln,n=Rn,r=zn,i=V,a=Fn,o=A,s=Mn,c=Un,l=e.f;Ln=null,Rn=0,zn=null,V=l&96?null:e,Fn=null,ze(e.ctx),Mn=!1,Un=++Hn,e.ac!==null&&(Ze(()=>{e.ac.abort(ge)}),e.ac=null);try{e.f|=oe;var u=e.fn,d=u();e.f|=S;var f=Yn(e);if(Ue()&&zn!==null&&!Mn&&f!==null&&!(e.f&6146))for(var p=0;p<zn.length;p++)qn(zn[p],e);if(i!==null&&i!==e){if(Hn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Hn;if(t!==null)for(let e of t)e.rv=Hn;zn!==null&&(r===null?r=zn:r.push(...zn))}return e.f&8388608&&(e.f^=ce),d}catch(t){return Yn(e),en(t)}finally{e.f^=oe,Ln=t,Rn=n,zn=r,V=i,Fn=a,ze(o),Mn=s,Un=c}}function Yn(e){var t=e.deps,n=F?.is_fork;if(Ln!==null){var r;if(n||Zn(e,Rn),t!==null&&Rn>0)for(t.length=Rn+Ln.length,r=0;r<Ln.length;r++)t[Rn+r]=Ln[r];else e.deps=t=Ln;if(on()&&e.f&512)for(r=Rn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Rn<t.length&&(Zn(e,Rn),t.length=Rn);return t}function Xn(e,n){let r=n.reactions;if(r!==null){var i=o.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=n.reactions=null:(r[i]=r[a],r.pop())}}if(r===null&&n.f&2&&(Ln===null||!s.call(Ln,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&Ye(c),c.ac!==null&&Ze(()=>{c.ac.abort(ge),c.ac=null,j(c,x)}),ct(c),Zn(c,0)}}function Zn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Xn(e,n[r])}function Qn(e){var t=e.f;if(!(t&16384)){j(e,b);var n=H,r=kn;H=e,kn=(t&96)==0;try{t&16777232?bn(e):yn(e),vn(e);var i=Jn(e);e.teardown=typeof i==`function`?i:null,e.wv=Vn}finally{kn=r,H=n}}}function U(e){var t=(e.f&2)!=0;if(On?.add(e),V!==null&&!Mn&&!(H!==null&&H.f&16384)&&(Fn===null||!Fn.has(e))){var n=V.deps;if(V.f&2097152)e.rv<Hn&&(e.rv=Hn,Ln===null&&n!==null&&n[Rn]===e?Rn++:Ln===null?Ln=[e]:Ln.push(e));else{V.deps??=[],s.call(V.deps,e)||V.deps.push(e);var r=e.reactions;r===null?e.reactions=[V]:s.call(r,V)||r.push(V)}}if(An&&kt.has(e))return kt.get(e);if(t){var i=e;if(An){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||er(i))&&(a=ot(i)),kt.set(i,a),a}var o=(i.f&512)==0&&!Mn&&V!==null&&(kn||(V.f&512)!=0),c=(i.f&S)===0;Kn(i)&&(o&&(i.f|=512),st(i)),o&&!c&&(lt(i),$n(i))}if(dt?.has(e))return dt.get(e);if(e.f&8388608)throw e.v;return e.v}function $n(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(lt(t),$n(t))}function er(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(kt.has(t)||t.f&2&&er(t))return!0;return!1}function tr(e){var t=Mn;try{return Mn=!0,e()}finally{Mn=t}}var nr=Symbol(`events`),rr=new Set,ir=new Set;function ar(e,t,n){(t[nr]??={})[e]=n}function or(e){for(var t=0;t<e.length;t++)rr.add(e[t]);for(var n of ir)n(e)}var sr=null,cr=!1;function lr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;sr=e,cr||(cr=!0,setTimeout(()=>{cr=!1,sr=null}));var o=0,s=sr===e&&e[nr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[nr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){u(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=V,f=H;Nn(null),Pn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[nr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[nr]=t,delete e.currentTarget,Nn(d),Pn(f)}}}var ur=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function dr(e){return ur?.createHTML(e)??e}function fr(e){var t=Qt(`template`);return t.innerHTML=dr(e.replaceAll(`<!>`,`<!---->`)),t.content}function pr(e,t){var n=H;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function mr(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return pr(E,null),E;i===void 0&&(i=fr(a?e:`<!>`+e),n||(i=z(i)));var t=r||Vt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=z(t),s=t.lastChild;pr(o,s)}else pr(t,t);return t}}function hr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return pr(E,null),E;if(!o){var e=z(fr(a));if(i)for(o=document.createDocumentFragment();z(e);)o.appendChild(z(e));else o=z(e)}var t=o.cloneNode(!0);if(i){var n=z(t),r=t.lastChild;pr(n,r)}else pr(t,t);return t}}function gr(e,t){return hr(e,t,`svg`)}function _r(e,t){if(T){var n=H;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),O();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var vr=[`touchstart`,`touchmove`];function yr(e){return vr.includes(e)}function br(e){let t=0,n=jt(0),r;return()=>{on()&&(U(n),mn(()=>(t===0&&(r=tr(()=>e(()=>Lt(n)))),t+=1,()=>{Ke(()=>{--t,t===0&&(r?.(),r=void 0,Lt(n))})})))}}var xr=re|ie;function Sr(e,t,n,r){new Cr(e,t,n,r)}var Cr=class{parent;is_pending=!1;transform_error;#e;#t=T?E:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=br(()=>(this.#m=jt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=H;t.b=this,t.f|=128,n(e)},this.parent=H.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=gn(()=>{if(T){let e=this.#t;O();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},xr),T&&(this.#e=E)}#g(){try{this.#a=_n(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ke(r),t&&(this.#s=_n(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){be();return}t=!0,n&&Re(),this.#s!==null&&Cn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){tn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=_n(()=>e(this.#e)),Ke(()=>{var e=this.#c=document.createDocumentFragment(),t=Gt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return _n(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){tn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(F);return}this.#u===0&&(this.#e.before(e),this.#c=null,Cn(this.#o,()=>{this.#o=null}),this.#x(F))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=_n(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Dn(this.#a,e);let t=this.#n.pending;this.#o=_n(()=>t(this.#e))}else this.#x(F)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Xe(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=H,n=V,r=A;Pn(this.#i),Nn(this.#i),ze(this.#i.ctx);try{return yt.ensure(),e()}finally{Pn(t),Nn(n),ze(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Cn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ke(()=>{this.#d=!1,this.#m&&Ft(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),U(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;F?.is_fork?(this.#a&&F.skip_effect(this.#a),this.#o&&F.skip_effect(this.#o),this.#s&&F.skip_effect(this.#s),F.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(B(this.#a),null),this.#o&&=(B(this.#o),null),this.#s&&=(B(this.#s),null),T&&(D(this.#t),k(),D(Ce()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return _n(()=>{var r=H;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return tn(e,this.#i.parent),null}}))};Ke(()=>{var t;try{t=this.transform_error(e)}catch(e){tn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>tn(e,this.#i&&this.#i.parent)):n(t)})}};function wr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[w]??=e.nodeValue)&&(e[w]=n,e.nodeValue=`${n}`)}function Tr(e,t){return Or(e,t)}function Er(t,n){Wt(),n.intro=n.intro??!1;let r=n.target,i=T,a=E;try{for(var o=z(r);o&&(o.nodeType!==8||o.data!==`[`);)o=Kt(o);if(!o)throw e;xe(!0),D(o);let i=Or(t,{...n,anchor:o});return xe(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
2
+ `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==e&&console.warn(`Failed to hydrate: `,i),n.recover===!1&&Ne(),Wt(),Xt(r),xe(!1),Tr(t,n)}finally{xe(i),D(a)}}var Dr=new Map;function Or(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){Wt();var u=void 0,d=dn(()=>{var s=r??n.appendChild(Gt());Sr(s,{pending:()=>{}},n=>{Be({});var r=A;if(o&&(r.c=o),a&&(i.$$events=a),T&&pr(n,null),u=t(n,i)||He(),T&&(H.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw ye(),e;Ve()},l);var d=new Set,f=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!d.has(r)){d.add(r);var i=yr(r);for(let e of[n,document]){var a=Dr.get(e);a===void 0&&(a=new Map,Dr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,lr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(rr)),ir.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=Dr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,lr),t.delete(e),t.size===0&&Dr.delete(r)):t.set(e,i)}ir.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return kr.set(u,d),u}var kr=new WeakMap;function Ar(e,t){let n=kr.get(e);return n?(kr.delete(e),n(t)):Promise.resolve()}var jr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Tn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Tn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(B(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Dn(r,t),t.append(Gt()),this.#n.set(e,{effect:r,fragment:t})}else B(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Cn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(B(n.effect),this.#n.delete(e))};ensure(e,t){var n=F,r=Zt();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Gt();i.append(a),this.#n.set(e,{effect:_n(()=>t(a)),fragment:i})}else this.#t.set(e,_n(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else T&&(this.anchor=E),this.#a(n)}};function Mr(e,t,n=!1){var r;T&&(r=E,O());var i=new jr(e),a=n?re:0;function o(e,t){if(T){var n=we(r);if(e!==parseInt(n.substring(1))){var a=Ce();D(a),i.anchor=a,xe(!1),i.ensure(e,t),xe(!0);return}}i.ensure(e,t)}gn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Nr(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;T&&(l=D(z(d)))}hn(()=>{var t=H;if(u===(u=n()??``)){T&&O();return}if(a&&!T){t.nodes=null,d.innerHTML=u,u!==``&&pr(z(d),d.lastChild);return}if(t.nodes!==null&&(xn(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(T){for(var c=E.data,f=O(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=Kt(f);if(f===null)throw ye(),e;pr(E,p),l=D(f);return}var m=Qt(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(pr(z(h),h.lastChild),o||s)for(;z(h);)l.before(z(h));else l.before(h)}})}function Pr(e,t){fn(()=>{e=H?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Qt(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var Fr=[...`
3
+ \r\f\xA0\v`];function Ir(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Fr.includes(r[o-1]))&&(s===r.length||Fr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Lr(e,t,n,r,i,a){var o=e[me];if(T||o!==n||o===void 0){var s=Ir(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var Rr=Symbol(`is custom element`),zr=Symbol(`is html`),Br=_e?`link`:`LINK`;function Vr(e,t,n,r){var i=Hr(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Br)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Wr(e).has(t)?e[t]=n:e.setAttribute(t,n))}function Hr(e){return e[pe]??={[Rr]:e.nodeName.includes(`-`),[zr]:e.namespaceURI===n}}var Ur=new Map;function Wr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ur.get(t);if(n)return n;Ur.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=f(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=h(i)}return n}function Gr(e,t){return e===t||e?.[le]===t}function Kr(e=He(),t,n,r){var i=A.r,a=H;return fn(()=>{var o,s;return mn(()=>{o=s,s=r?.()||[],tr(()=>{Gr(n(...s),e)||(t(e,...s),o&&Gr(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Gr(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var qr=!1;function Jr(e){var t=qr;try{return qr=!1,[e(),qr]}finally{qr=t}}function Yr(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=tt(r),U(l)):(c&&(c=!1,s=o?tr(r):r),s);let f;if(a){var p=le in e||de in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=Jr(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Pe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?tt:it)(()=>(v=!1,g()));a&&U(y);var b=H;return(function(e,t){if(arguments.length>0){let n=t?U(y):i&&a?zt(e):e;return R(y,n),v=!0,s!==void 0&&(s=n),e}return An&&v||b.f&16384?y.v:U(y)})}function Xr(e){return new Zr(e)}var Zr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Mt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return U(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===de?!0:(U(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return R(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Er:Tr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),(!e?.props?.$$host||e.sync===!1)&&bt(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||u(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Ar(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Qr;typeof HTMLElement==`function`&&(Qr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=Qt(`slot`);e!=="default"&&(n.name=e),_r(t,n)}}let t={},n=ei(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=$r(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Xr({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=un(()=>{mn(()=>{this.$$r=!0;for(let e of l(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=$r(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=$r(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return l(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function $r(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function ei(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function ti(e,t,n,r,i,a){let o=class extends Qr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return l(t).map(e=>(t[e].attribute||e).toLowerCase())}};return l(t).forEach(e=>{u(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=$r(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(d(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{u(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}function ni(e,t){this.v=e,this.k=t}function ri(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ii(e){if(Array.isArray(e))return e}function ai(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function oi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function si(e,t){return ii(e)||ai(e,t)||ci(e,t)||oi()}function ci(e,t){if(e){if(typeof e==`string`)return ri(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ri(e,t):void 0}}function li(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof ni;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}li.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},li.prototype.next=function(e){return this._invoke(`next`,e)},li.prototype.throw=function(e){return this._invoke(`throw`,e)},li.prototype.return=function(e){return this._invoke(`return`,e)};var ui=Object.entries,di=Object.setPrototypeOf,fi=Object.isFrozen,pi=Object.getPrototypeOf,mi=Object.getOwnPropertyDescriptor,W=Object.freeze,G=Object.seal,hi=Object.create,gi=typeof Reflect<`u`&&Reflect,_i=gi.apply,vi=gi.construct;W||=function(e){return e},G||=function(e){return e},_i||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},vi||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var yi=q(Array.prototype.forEach);Array.prototype.indexOf;var bi=q(Array.prototype.lastIndexOf),xi=q(Array.prototype.pop),Si=q(Array.prototype.push);Array.prototype.slice;var Ci=q(Array.prototype.splice),wi=Array.isArray,Ti=q(String.prototype.toLowerCase),Ei=q(String.prototype.toString),Di=q(String.prototype.match),Oi=q(String.prototype.replace),ki=q(String.prototype.indexOf),Ai=q(String.prototype.trim),ji=q(Number.prototype.toString),Mi=q(Boolean.prototype.toString),Ni=typeof BigInt>`u`?null:q(BigInt.prototype.toString),Pi=typeof Symbol>`u`?null:q(Symbol.prototype.toString),Fi=q(Object.prototype.hasOwnProperty),Ii=q(Object.prototype.toString),K=q(RegExp.prototype.test),Li=Ri(TypeError);function q(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return _i(e,t,r)}}function Ri(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return vi(e,n)}}function J(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(di&&di(e,null),!wi(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(fi(t)||(t[r]=e),i=e)}e[i]=!0}return e}function zi(e){for(let t=0;t<e.length;t++)Fi(e,t)||(e[t]=null);return e}function Bi(e){let t=hi(null);for(let r of ui(e)){var n=si(r,2);let i=n[0],a=n[1];Fi(e,i)&&(wi(a)?t[i]=zi(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=Bi(a):t[i]=a)}return t}function Vi(e){switch(typeof e){case`string`:return e;case`number`:return ji(e);case`boolean`:return Mi(e);case`bigint`:return Ni?Ni(e):`0`;case`symbol`:return Pi?Pi(e):`Symbol()`;case`undefined`:return Ii(e);case`function`:case`object`:{if(e===null)return Ii(e);let t=e,n=Hi(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Ii(e)}return Ii(e)}default:return Ii(e)}}function Hi(e,t){for(;e!==null;){let n=mi(e,t);if(n){if(n.get)return q(n.get);if(typeof n.value==`function`)return q(n.value)}e=pi(e)}function n(){return null}return n}function Ui(e){try{return K(e,``),!0}catch{return!1}}var Wi=W(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Gi=W(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Ki=W([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),qi=W([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ji=W(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Yi=W([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Xi=W([`#text`]),Zi=W(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Qi=W(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),$i=W(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),ea=W([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ta=G(/{{[\w\W]*|^[\w\W]*}}/g),na=G(/<%[\w\W]*|^[\w\W]*%>/g),ra=G(/\${[\w\W]*/g),ia=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),aa=G(/^aria-[\-\w]+$/),oa=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sa=G(/^(?:\w+script|data):/i),ca=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),la=G(/^html$/i),ua=G(/^[a-z][.\w]*(-[.\w]+)+$/i),da=G(/<[/\w!]/g),fa=G(/<[/\w]/g),pa=G(/<\/no(script|embed|frames)/i),ma=G(/\/>/i),ha={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ga=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],_a=W(J({},ga)),va=function(){let e={};return yi(ga,t=>{e[t]=G(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),W(e)}(),ya=function(){return typeof window>`u`?null:window},ba=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},xa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Sa=function(e,t,n,r){return Fi(e,t)&&wi(e[t])?J(r.base?Bi(r.base):{},e[t],r.transform):n},Ca=function(e,t,n){let r=Fi(e,t)?e[t]:void 0;return r&&typeof r==`object`?Bi(r):n()};function wa(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ya(),t=e=>wa(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==ha.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Hi(d,`cloneNode`),p=Hi(d,`remove`),m=Hi(d,`removeAttributeNode`),h=Hi(d,`nextSibling`),g=Hi(d,`childNodes`),_=Hi(d,`parentNode`),v=Hi(d,`shadowRoot`),y=Hi(d,`attributes`),b=o&&o.prototype?Hi(o.prototype,`nodeType`):null,x=o&&o.prototype?Hi(o.prototype,`nodeName`):null,ee=o&&o.prototype?Hi(o.prototype,`ownerDocument`):null,te=function(e){return b?b(e):e.nodeType},ne=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let S,C=``,re,ie=!1,ae=0,oe=function(){if(ae>0)throw Li(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},se=function(e){oe(),ae++;try{return S.createHTML(e)}finally{ae--}},ce=function(e){oe(),ae++;try{return S.createScriptURL(e)}finally{ae--}},le=function(){return ie||=(re=ba(u,i),!0),re},ue=n,de=ue.implementation,fe=ue.createNodeIterator,pe=ue.createDocumentFragment,me=ue.getElementsByTagName,he=r.importNode,w=xa();t.isSupported=typeof ui==`function`&&typeof _==`function`&&de&&de.createHTMLDocument!==void 0;let ge=ta,_e=na,ve=ra,ye=ia,be=aa,T=sa,xe=ca,E=ua,D=oa,O=null,Se=J({},[...Wi,...Gi,...Ki,...Ji,...Xi]),k=null,Ce=J({},[...Zi,...Qi,...$i,...ea]),we=Object.seal(hi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Ee=null,De=Object.seal(hi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Oe=!0,ke=!0,Ae=!1,je=!0,Me=!1,Ne=!0,Pe=!1,Fe=!1,Ie=null,Le=null,Re=!1,A=!1,ze=!1,Be=!1,Ve=!0,He=!1,Ue=`user-content-`,We=!0,Ge=!1,Ke={},qe=null,Je=J({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),j=null,Ye=J({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Xe=null,Ze=J({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Qe=`http://www.w3.org/1998/Math/MathML`,$e=`http://www.w3.org/2000/svg`,M=`http://www.w3.org/1999/xhtml`,et=M,tt=!1,nt=null,rt=J({},[Qe,$e,M],Ei),N=W([`mi`,`mo`,`mn`,`ms`,`mtext`]),it=J({},N),at=W([`annotation-xml`]),ot=J({},at),st=J({},[`title`,`style`,`font`,`a`,`script`]),ct=null,lt=[`application/xhtml+xml`,`text/html`],P=null,F=null,ut=n.createElement(`form`),dt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(F&&F===e)return;(!e||typeof e!=`object`)&&(e={}),e=Bi(e),ct=lt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,P=ct===`application/xhtml+xml`?Ei:Ti,O=Sa(e,`ALLOWED_TAGS`,Se,{transform:P}),k=Sa(e,`ALLOWED_ATTR`,Ce,{transform:P}),nt=Sa(e,`ALLOWED_NAMESPACES`,rt,{transform:Ei}),Xe=Sa(e,`ADD_URI_SAFE_ATTR`,Ze,{transform:P,base:Ze}),j=Sa(e,`ADD_DATA_URI_TAGS`,Ye,{transform:P,base:Ye}),qe=Sa(e,`FORBID_CONTENTS`,Je,{transform:P}),Te=Sa(e,`FORBID_TAGS`,Bi({}),{transform:P}),Ee=Sa(e,`FORBID_ATTR`,Bi({}),{transform:P}),Ke=Fi(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Bi(e.USE_PROFILES):e.USE_PROFILES:!1,Oe=e.ALLOW_ARIA_ATTR!==!1,ke=e.ALLOW_DATA_ATTR!==!1,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Me=e.SAFE_FOR_TEMPLATES||!1,Ne=e.SAFE_FOR_XML!==!1,Pe=e.WHOLE_DOCUMENT||!1,A=e.RETURN_DOM||!1,ze=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Ve=e.SANITIZE_DOM!==!1,He=e.SANITIZE_NAMED_PROPS||!1,We=e.KEEP_CONTENT!==!1,Ge=e.IN_PLACE||!1,D=Ui(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:oa,et=typeof e.NAMESPACE==`string`?e.NAMESPACE:M,it=Ca(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>J({},N)),ot=Ca(e,`HTML_INTEGRATION_POINTS`,()=>J({},at));let t=Ca(e,`CUSTOM_ELEMENT_HANDLING`,()=>hi(null));if(we=hi(null),Fi(t,`tagNameCheck`)&&dt(t.tagNameCheck)&&(we.tagNameCheck=t.tagNameCheck),Fi(t,`attributeNameCheck`)&&dt(t.attributeNameCheck)&&(we.attributeNameCheck=t.attributeNameCheck),Fi(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(we.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),G(we),Me&&(ke=!1),ze&&(A=!0),Ke&&(O=J({},Xi),k=hi(null),Ke.html===!0&&(J(O,Wi),J(k,Zi)),Ke.svg===!0&&(J(O,Gi),J(k,Qi),J(k,ea)),Ke.svgFilters===!0&&(J(O,Ki),J(k,Qi),J(k,ea)),Ke.mathMl===!0&&(J(O,Ji),J(k,$i),J(k,ea))),De.tagCheck=null,De.attributeCheck=null,Fi(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?De.tagCheck=e.ADD_TAGS:wi(e.ADD_TAGS)&&(O===Se&&(O=Bi(O)),J(O,e.ADD_TAGS,P))),Fi(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?De.attributeCheck=e.ADD_ATTR:wi(e.ADD_ATTR)&&(k===Ce&&(k=Bi(k)),J(k,e.ADD_ATTR,P))),Fi(e,`ADD_FORBID_CONTENTS`)&&wi(e.ADD_FORBID_CONTENTS)&&(qe===Je&&(qe=Bi(qe)),J(qe,e.ADD_FORBID_CONTENTS,P)),We&&(O[`#text`]=!0),Pe&&J(O,[`html`,`head`,`body`]),O.table&&(J(O,[`tbody`]),delete Te.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Li(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Li(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=S;S=e.TRUSTED_TYPES_POLICY;try{C=se(``)}catch(e){throw S=t,e}}else e.TRUSTED_TYPES_POLICY===null?(S=void 0,C=``):(S===void 0&&(S=le()),S&&typeof C==`string`&&(C=se(``)));W&&W(e),F=e},pt=J({},[...Gi,...Ki,...qi]),mt=J({},[...Ji,...Yi]),ht=function(e,t,n){return t.namespaceURI===M?e===`svg`:t.namespaceURI===Qe?e===`svg`&&(n===`annotation-xml`||it[n]):!!pt[e]},gt=function(e,t,n){return t.namespaceURI===M?e===`math`:t.namespaceURI===$e?e===`math`&&ot[n]:!!mt[e]},_t=function(e,t,n){return t.namespaceURI===$e&&!ot[n]||t.namespaceURI===Qe&&!it[n]?!1:!mt[e]&&(st[e]||!pt[e])},vt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:et,tagName:`template`});let n=Ti(e.tagName),r=Ti(t.tagName);return nt[e.namespaceURI]?e.namespaceURI===$e?ht(n,t,r):e.namespaceURI===Qe?gt(n,t,r):e.namespaceURI===M?_t(n,t,r):!!(ct===`application/xhtml+xml`&&nt[e.namespaceURI]):!1},yt=function(e){Si(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw Li(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},bt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},xt=function(e){Ct(e);let t=g(e);if(t){let e=[];yi(t,t=>{Si(e,t)}),yi(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&bt(e,r,i)}},I=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Si(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(A||ze)try{yt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||k[P(i)]||bt(e,r,i)}},Ct=function(e){let t=[e];for(;t.length>0;){let e=t.pop();te(e)===ha.element&&St(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},wt=function(e,t){return Ne?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Tt=function(e){if(!Ne)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=te(e);if(n===ha.processingInstruction||n===ha.comment&&K(fa,e.data)){try{p(e)}catch{}continue}if(n===ha.element){let t=e,n=P(ne(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&wt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Et=function(e){let t=null,r=null;if(Re)e=`<remove></remove>`+e;else{let t=Di(e,/^[\r\n\t ]+/);r=t&&t[0]}ct===`application/xhtml+xml`&&et===M&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=S?se(e):e;if(et===M)try{t=new l().parseFromString(i,ct)}catch{}if(!t||!t.documentElement){t=de.createDocument(et,`template`,null);try{t.documentElement.innerHTML=tt?C:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),et===M?me.call(t,Pe?`html`:`body`)[0]:Pe?t.documentElement:a},Dt=function(e){let t=ee?ee(e):e.ownerDocument;return fe.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ot=function(e){return e=Oi(e,ge,` `),e=Oi(e,_e,` `),e=Oi(e,ve,` `),e},kt=function(e){e.normalize();let t=ee?ee(e):e.ownerDocument,n=fe.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ot(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&yi(i,e=>{jt(e.content)&&kt(e.content)})},At=function(e){let t=x?x(e):null;return typeof t!=`string`||P(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},jt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===ha.documentFragment}catch{return!1}},L=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Mt(e,n,r){e.length!==0&&yi(e,e=>{e.call(t,n,r,F)})}let R=function(e,t){return!!(Ne&&e.hasChildNodes()&&!L(e.firstElementChild)&&K(da,e.textContent)&&K(da,e.innerHTML)||Ne&&e.namespaceURI===M&&_a[t]&&(L(e.firstElementChild)||typeof e.textContent==`string`&&K(va[t],e.textContent))||e.nodeType===ha.processingInstruction||Ne&&e.nodeType===ha.comment&&K(fa,e.data))},Nt=function(e,t){if(e instanceof RegExp)return K(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},Pt=function(e,t,n){if(!Te[t]&&Bt(t)&&Nt(we.tagNameCheck,t))return!1;if(We&&!qe[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return yt(e),!0},Ft=function(e,t,n,r){return e.length===0?t:t===n||t===r?Bi(t):t},It=function(e,t){return e===t||_(e)!==null?!1:(Ge&&Ct(e),!0)},Lt=function(e,n){if(Mt(w.beforeSanitizeElements,e,null),It(e,n))return!0;if(At(e))return yt(e),!0;let r=P(ne(e));if(O=Ft(w.uponSanitizeElement,O,Se,Ie),Mt(w.uponSanitizeElement,e,{tagName:r,allowedTags:O}),It(e,n))return!0;if(R(e,r))return yt(e),!0;if(Te[r]||!(De.tagCheck instanceof Function&&De.tagCheck(r))&&!O[r]){let t=Pt(e,r,n);return t===!1&&(Mt(w.afterSanitizeElements,e,null),It(e,n))?!0:t}if(te(e)===ha.element&&!vt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&K(pa,e.innerHTML))return yt(e),!0;if(Me&&e.nodeType===ha.text){let n=Ot(e.textContent);e.textContent!==n&&(Si(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Mt(w.afterSanitizeElements,e,null),It(e,n)},Rt=function(e,t,r){if(Ee[t]||wt(t,e)||Ve&&(t===`id`||t===`name`)&&(r in n||r in ut))return!1;let i=k[t]||De.attributeCheck instanceof Function&&De.attributeCheck(t,e);return ke&&K(ye,t)||Oe&&K(be,t)?!0:i?Xe[t]||K(D,Oi(r,xe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ki(r,`data:`)===0&&j[e]||Ae&&!K(T,Oi(r,xe,``))?!0:!r:Bt(e)&&Nt(we.tagNameCheck,e)&&Nt(we.attributeNameCheck,t,e)||t===`is`&&we.allowCustomizedBuiltInElements&&Nt(we.tagNameCheck,r)},zt=J({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Bt=function(e){return!zt[Ti(e)]&&K(E,e)},Vt=function(e,t,n,r){if(S&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return se(r);case`TrustedScriptURL`:return ce(r)}return r},Ht=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),At(e)?(yt(e),!1):!0}catch{return I(t,e),!1}},Ut=function(e,n){if(Mt(w.beforeSanitizeAttributes,e,null),It(e,n))return;let r=e.attributes;if(!r||At(e))return;k=Ft(w.uponSanitizeAttribute,k,Ce,Le);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0},a=r.length,o=P(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=P(s),d=l,f=s===`value`?d:Ai(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Mt(w.uponSanitizeAttribute,e,i),f=i.attrValue,He&&(u===`id`||u===`name`)&&ki(f,Ue)!==0&&(I(s,e,n),f=Ue+f,p=!0),Ne&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){I(s,e,n);continue}if(u===`attributename`&&Di(f,`href`)){I(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){I(s,e,n);continue}if(!je&&K(ma,f)){I(s,e,n);continue}if(Me&&(f=Ot(f)),!Rt(o,u,f)){I(s,e,n);continue}f=Vt(o,u,c,f),f!==d&&Ht(e,s,c,f)&&p&&xi(t.removed)}}Mt(w.afterSanitizeAttributes,e,null),It(e,n)},Wt=function(e){let t=null,n=Dt(e);for(Mt(w.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Mt(w.uponSanitizeShadowNode,t,null),Lt(t,e),Ut(t,e),jt(t.content)&&Wt(t.content),te(t)===ha.element){let e=v(t);jt(e)&&(Gt(e),Wt(e))}Mt(w.afterSanitizeShadowDOM,e,null)},Gt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Wt(e.shadow);continue}let n=e.node,r=te(n)===ha.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&P(e)===`template`){let e=n.content;jt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);jt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(tt=!e,tt&&(e=`<!-->`),typeof e!=`string`&&!L(e)&&(e=Vi(e),typeof e!=`string`))throw Li(`dirty is not a string, aborting`);if(!t.isSupported)return e;Fe?(O=Ie,k=Le):ft(n),(w.uponSanitizeElement.length>0||w.uponSanitizeAttribute.length>0)&&(O=Bi(O)),w.uponSanitizeAttribute.length>0&&(k=Bi(k)),t.removed=[];let c=Ge&&typeof e!=`string`&&L(e);if(c){Tt(e);let t=ne(e);if(typeof t==`string`){let n=P(t);if(!O[n]||Te[n])throw xt(e),Li(`root node is forbidden and cannot be sanitized in-place`)}if(At(e))throw xt(e),Li(`root node is clobbered and cannot be sanitized in-place`);try{Gt(e)}catch(t){throw xt(e),t}}else if(L(e))i=Et(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===ha.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Gt(i);else{if(!A&&!Me&&!Pe&&e.indexOf(`<`)===-1)return S&&Be?se(e):e;if(i=Et(e),!i)return A?null:Be?C:``}i&&Re&&yt(i.firstChild);let l=c?e:i;try{let e=Dt(l);for(;o=e.nextNode();)Lt(o,l),Ut(o,l),jt(o.content)&&Wt(o.content)}catch(n){throw c&&(xt(e),yi(t.removed,e=>{e.element&&Ct(e.element)})),n}if(c){let n=!1;if(yi(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Ct(t.element))}),n)throw Li(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Me&&kt(e),e}if(A){if(Me&&kt(i),ze)for(s=pe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(k.shadowroot||k.shadowrootmode)&&(s=he.call(r,s,!0)),s}let u=Pe?i.outerHTML:i.innerHTML;return Pe&&O[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&K(la,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
5
+ `+u),Me&&(u=Ot(u)),S&&Be?se(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(e),Fe=!0,Ie=O,Le=k},t.clearConfig=function(){F=null,Fe=!1,Ie=null,Le=null,S=re,C=``},t.isValidAttribute=function(e,t,n){F||ft({});let r=P(e),i=P(t);return Rt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Fi(w,e)&&Si(w[e],t)},t.removeHook=function(e,t){if(Fi(w,e)){if(t!==void 0){let n=bi(w[e],t);return n===-1?void 0:Ci(w[e],n,1)[0]}return xi(w[e])}},t.removeHooks=function(e){Fi(w,e)&&(w[e]=[])},t.removeAllHooks=function(){w=xa()},t}var Ta=wa(),Ea=`data-pie-authored-ink`,Da=`data-pie-authored-fill`,Oa=`data-pie-authored-border`,ka=[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],Aa=new Set([`currentcolor`,`inherit`,`initial`,`unset`,`revert`,`revert-layer`,`transparent`]);function ja(e){let t=e?.trim().toLowerCase();return!t||Aa.has(t)||t.includes(`var(`)?!1:Fa(t)?.a!==0}function Ma(e){let t=Fa(e);if(!t)return`shade`;let n=e=>(e*t.a+255*(1-t.a))/255,[r,i,a]=[n(t.r),n(t.g),n(t.b)],o=.2126*eo(r)+.7152*eo(i)+.0722*eo(a),s=Math.max(r,i,a)-Math.min(r,i,a);return o>=.85&&s<=.08?`light`:`shade`}function Na(e){e.removeAttribute(Ea),e.removeAttribute(Da),e.removeAttribute(Oa);let t=e.hasAttribute(`style`)?e.style:void 0,n=e=>t?.getPropertyValue(e).trim()??``,r=[],i=n(`color`),a=e.localName===`font`?e.getAttribute(`color`):null;ja(i||a)&&(e.setAttribute(`data-pie-authored-ink`,``),i&&r.push(`color`));let o=n(`background-color`),s=o||Pa(e.getAttribute(`bgcolor`));ja(s)&&(e.setAttribute(`data-pie-authored-fill`,Ma(s)),o&&r.push(`background-color`));let c=ka.filter(e=>ja(n(e)));c.length&&(e.setAttribute(`data-pie-authored-border`,``),r.push(...c));for(let e of r)t?.getPropertyPriority(e)===`important`&&t.setProperty(e,t.getPropertyValue(e))}function Pa(e){let t=e?.trim()??``;return/^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t)?`#${t}`:t}function Fa(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};let n=La().get(t);if(n)return Ra(n);if(t.startsWith(`#`))return Ra(t.slice(1));let r=/^([a-z]+)\(([^()]*)\)$/.exec(t);if(!r)return null;let i=r[2].trim().split(/\s*[\s,/]\s*/);if(i.length!==3&&i.length!==4)return null;let[a,o,s,c]=i,l=Va(c),u;switch(r[1]){case`rgb`:case`rgba`:u=[a,o,s].map(e=>Y(e,255)/255);break;case`hsl`:case`hsla`:u=Ua(Ba(a),Y(o,100)/100,Y(s,100)/100);break;case`hwb`:u=Wa(Ba(a),Y(o,100)/100,Y(s,100)/100);break;case`lab`:u=Xa(Y(a,100),Y(o,125),Y(s,125));break;case`lch`:u=Xa(Y(a,100),...Ha(Y(o,150),Ba(s)));break;case`oklab`:u=Za(Y(a,1),Y(o,.4),Y(s,.4));break;case`oklch`:u=Za(Y(a,1),...Ha(Y(o,.4),Ba(s)));break;default:return null}if(Number.isNaN(l)||u.some(Number.isNaN))return null;let[d,f,p]=u.map(e=>to(e,0,1)*255);return{r:d,g:f,b:p,a:l}}var Ia;function La(){return Ia??=new Map(`aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32`.split(` `).map(e=>e.split(`:`))),Ia}function Ra(e){if(!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e))return null;let[t,n,r,i=255]=(e.length<=4?[...e].map(e=>e+e):e.match(/../g)??[]).map(e=>Number.parseInt(e,16));return{r:t,g:n,b:r,a:i/255}}var za=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;function Y(e,t){if(e===`none`)return 0;let n=za.exec(e);return!n||n[2]&&n[2]!==`%`?NaN:n[2]?Number(n[1])/100*t:Number(n[1])}function Ba(e){if(e===`none`)return 0;let t=za.exec(e);if(!t||t[2]===`%`)return NaN;let n=Number(t[1]);return((t[2]===`rad`?n*180/Math.PI:t[2]===`grad`?n*.9:t[2]===`turn`?n*360:n)%360+360)%360}function Va(e){return e===void 0?1:to(Y(e,1),0,1)}function Ha(e,t){let n=Math.max(0,e),r=t*Math.PI/180;return[n*Math.cos(r),n*Math.sin(r)]}function Ua(e,t,n){let r=to(t,0,1),i=to(n,0,1),a=t=>{let n=(t+e/30)%12,a=r*Math.min(i,1-i);return i-a*Math.max(-1,Math.min(n-3,9-n,1))};return[a(0),a(8),a(4)]}function Wa(e,t,n){let r=to(t,0,1),i=to(n,0,1);return r+i>=1?[,,,].fill(r/(r+i)):Ua(e,1,.5).map(e=>e*(1-r-i)+r)}var Ga=24389/27,Ka=216/24389,qa=[.3457/.3585,1,.2958/.3585],Ja=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],Ya=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]];function Xa(e,t,n){let r=to(e,0,100),i=(r+16)/116,a=t/500+i,o=i-n/200;return Qa(Ya,Qa(Ja,[a**3>Ka?a**3:(116*a-16)/Ga,r>Ga*Ka?i**3:r/Ga,o**3>Ka?o**3:(116*o-16)/Ga].map((e,t)=>e*qa[t]))).map($a)}function Za(e,t,n){let r=to(e,0,1);return Qa([[4.0767416621,-3.3077115913,.2309699292],[-1.2684380046,2.6097574011,-.3413193965],[-.0041960863,-.7034186147,1.707614701]],[r+.3963377774*t+.2158037573*n,r-.1055613458*t-.0638541728*n,r-.0894841775*t-1.291485548*n].map(e=>e**3)).map($a)}function Qa(e,t){return e.map(e=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2])}function $a(e){let t=to(e,0,1);return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function eo(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function to(e,t,n){return Math.min(n,Math.max(t,e))}var no=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],ro=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],io=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),ao=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,oo=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],so=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,co=`data-pie-play-audio`,lo={ADD_TAGS:e=>io.has(e)||ao.test(e),ADD_ATTR:oo,FORBID_TAGS:no,FORBID_ATTR:ro,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},uo=!1;function fo(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(co);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var po=null;function mo(){return po||(po=Ta(window),po.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=so.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(`data-pie-play-audio`,t),uo||=(document.addEventListener(`click`,fo),!0))}),po.addHook(`afterSanitizeAttributes`,Na),po)}var ho=1e6,go=new Map,_o=0;function vo(e){if(e==null||e===``||!Ta.isSupported)return``;let t=typeof e==`string`?e:String(e),n=go.get(t);if(n!==void 0)return n;let r=String(mo().sanitize(t,lo)),i=t.length+r.length;if(i>ho)return r;for(let[e,t]of go){if(_o+i<=ho)break;go.delete(e),_o-=e.length+t.length}return go.set(t,r),_o+=i,r}var yo=`4.1.3`,bo=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,xo=`@pie-lib/math-rendering@2`,So=[`nemeth`,`euro`],Co=`mathjax@${yo}/sre`,wo=/^[^@]+@[^@]+$/;function To(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!wo.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function Eo(){let e=globalThis[xo]?.opts;return e&&typeof e==`object`?e:{}}function Do(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function Oo(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=Do(r);e&&t.set(n,e)}return t.size?t:void 0}function ko(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function Ao(e,t){let n=Eo(),r=Do(e.assetRoot??n.assetRoot)??To(t);return{root:r,speechPath:Do(e.speechPath??n.speechPath)??(r?`${r}/${Co}`:void 0),speechLocales:ko(e.speechLocales??n.speechLocales),urls:Oo(e.assetUrls??n.assetUrls)}}function jo(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!So.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function Mo(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!So.includes(e))}var No={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},Po=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function Fo(e){let t=globalThis;t[Po]??=[];let n=t[Po];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${No[e]}. Set window['${xo}'].opts.assetRoot to an npm root. See ${bo}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(`pie-mathjax-no-asset-root`,{detail:{effect:e,message:r,docsUrl:bo}}))}var Io=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,Lo=`pie-mathjax-version-conflict`,Ro=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function zo(e,t){if(typeof window>`u`)return;let n=globalThis;n[Ro]??={logged:!1,conditions:[]};let r=n[Ro];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Io}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(Lo,{detail:{condition:e,message:i,docsUrl:Io}}))}function Bo(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function Vo(){return window.MathJax}function Ho(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${yo}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${yo}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function Uo(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(Ho(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(Fo(`untypeset`),Promise.resolve(!1))}var Wo=globalThis,Go=`PIE-MJX-CHTML-styles`,Ko=[`MJX-CHTML-styles`,`MJX-SVG-styles`],qo=Bo,Jo=`http://www.w3.org/1998/Math/MathML`,Yo=/^([a-z_][\w.-]*):math$/,Xo=/^[a-z][a-z0-9-]*$/;function Zo(e){for(let t of e.querySelectorAll(`*`)){let n=Yo.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(Qo(t,`${n}:`))}}function Qo(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!Xo.test(n))return e;let r=e.ownerDocument.createElementNS(Jo,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?Qo(n,t):n)}return r}var $o=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),es={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},ts={tight:`0em`,medium:`0.1em`,loose:`0.2em`},ns=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,rs=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,is=/^(\d+(\.\d*)?|\.\d+)$/,as=new Set([`mn`,`mo`,`mi`,`mtext`]),os=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function X(e,t,n=[],r={}){let i=e.createElementNS(Jo,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function ss(e,t){let n=X(e.document,`mo`);return n.textContent=t,n}function cs(e){let t=X(e.document,`mn`);return t.textContent=`0`,X(e.document,`mphantom`,[t])}function ls(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function us(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function ds(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function fs(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function ps(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(ds(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else as.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:fs(r.length,n.stackAlign,i??a),position:t}}function ms(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>$o.has(e))}function hs(e,t){let n=[...e.children].filter(e=>!ds(e));return n.length<=1?n[0]??null:X(t.document,`mrow`,n)}function gs(e,t,n){let r=ls(e,`location`)??`n`,i=ms(e.getAttribute(`crossout`)),a=[...e.children].map(e=>ds(e)?null:e.localName===`mscarry`?{content:hs(e,n),location:ls(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?ms(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:fs(a.length,n.stackAlign),position:t,scale:is.test(o)?o:`0.6`}}function _s(e){let t=ls(e,`mslinethickness`)??`medium`,n=es[t]??(ns.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${rs.test(r)?r:`currentColor`}`}function vs(e,t,n){let r=Math.max(0,us(e,`length`));return{kind:`line`,length:r,anchor:fs(r,n.stackAlign),position:t,border:_s(e)}}function ys(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+us(e,`position`);switch(e.localName){case`msgroup`:ys([...e.children],o,us(e,`shift`),r,i);break;case`msline`:i.push(vs(e,o,r));break;case`mscarries`:i.push(gs(e,o,r));break;case`msrow`:case`mrow`:i.push(ps([...e.children],o,r));break;default:i.push(ps([e],o,r))}})}function bs(e){return-e.anchor-e.position}function xs(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function Ss(e){return bs(e)+xs(e)-1}function Cs(e,t,n,r){let i=e=>X(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>X(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function ws(e,t,n){let r=X(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?X(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function Ts(e,t,n,r,i){let a=e&&t.crossout.length?ws(e,t.crossout,i):e;if(!t.content)return a;let o=X(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return Cs(a??cs(i),o,n,i)}function Es(e,t){return e.carries[t-bs(e)]??null}function Ds(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=Es(s,t),l=n.slice(0,o).some(e=>Es(e,t));if(!c&&!l)return;let u=c??{content:cs(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=Ts(i,u,d,s.scale,r)}),e.content=i}function Os(e,t){let n=e.filter(e=>xs(e)>0),r=Math.min(0,...n.map(bs)),i=Math.max(r,...n.map(Ss))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+bs(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+bs(e)+r].content=t}),u.length&&n.forEach((e,n)=>{Ds(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function ks(e,{rows:t},n){let r=X(n.document,`mtable`,t.map(e=>X(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return X(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])os.has(t)||r.setAttribute(t,n);let i=ls(e,`charspacing`)??`medium`,a=ls(e,`charalign`);return r.setAttribute(`columnspacing`,ts[i]??(ns.test(i)?i:ts.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function As(e){return{document:e.ownerDocument,stackAlign:ls(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function js(e){let t=As(e),n=[];return ys([...e.children],0,0,t,n),ks(e,Os(n,t),t)}function Ms(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function Ns(e,t){let n=ss(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[X(t.document,`mrow`,[e,X(t.document,`mspace`,[],{width:`0.2em`})]),X(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function Ps(e){let t=As(e),[n,r,...i]=[...e.children],a=n&&!ds(n)?n:null,o=r&&!ds(r)?r:null,s=ls(e,`longdivstyle`)??`lefttop`,c=_s(e),l=[];ys(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...ps(n,0,t).cells)};switch(s){case`left/\\right`:f(a,ss(t,`/`)),p(ss(t,`\\`),o);break;case`left)(right`:f(a,ss(t,`)`)),p(ss(t,`(`),o);break;case`:right=right`:p(ss(t,`:`),a,ss(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&ys([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...Ns(a,t));break}let m=Os(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+bs(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+Ss(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,Ms(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,Ms(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:Fs(h,g,s,a,o,c,t);break;default:Ms(h,g,_(1),v,`top`,c)}return ks(e,m,t)}function Fs(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&X(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function Is(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?js(t):Ps(t))}var Ls=`PIE-MJX-explorer-styles`,Rs=`var(--pie-text, black)`,zs=`var(--pie-background, #ffffff)`,Bs=`var(--pie-border-dark, #66686A)`,Vs=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,Hs=`color-mix(in srgb, ${Vs} 15%, transparent)`,Us=`
6
6
  :root mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect) {
7
- color: ${Ls} !important;
8
- fill: ${Ls} !important;
7
+ color: ${Rs} !important;
8
+ fill: ${Rs} !important;
9
9
  }
10
10
  :root mjx-container:not([data-mjx-clone-container]) [data-sre-highlight-1]:not([data-sre-enclosed], rect) {
11
- background-color: ${Vs} !important;
11
+ background-color: ${Hs} !important;
12
12
  }
13
13
  :root mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed]) {
14
- fill: ${Vs} !important;
14
+ fill: ${Hs} !important;
15
15
  }
16
16
  :root mjx-container .mjx-selected {
17
- outline: 2px solid ${Bs} !important;
17
+ outline: 2px solid ${Vs} !important;
18
18
  }
19
19
  :root mjx-container [data-sre-highlight-2] {
20
- color: ${Ls} !important;
20
+ color: ${Rs} !important;
21
21
  background-color: transparent !important;
22
- fill: ${Ls} !important;
23
- outline: 2px dashed ${Bs} !important;
22
+ fill: ${Rs} !important;
23
+ outline: 2px dashed ${Vs} !important;
24
24
  }
25
25
  :root mjx-container rect[data-sre-highlight-2] {
26
26
  fill: transparent !important;
27
- stroke: ${Bs} !important;
27
+ stroke: ${Vs} !important;
28
28
  stroke-width: 2px !important;
29
29
  vector-effect: non-scaling-stroke;
30
30
  }
31
31
  :root .MJX_LiveRegion, :root .MJX_HoverRegion, :root .MJX_ToolTip {
32
- color: ${Ls} !important;
33
- background-color: ${Rs} !important;
34
- border-color: ${zs} !important;
32
+ color: ${Rs} !important;
33
+ background-color: ${zs} !important;
34
+ border-color: ${Bs} !important;
35
35
  }
36
36
  :root .MJX_LiveRegion > div, :root .MJX_HoverRegion > div {
37
- color: ${Ls} !important;
38
- background-color: ${Vs} !important;
37
+ color: ${Rs} !important;
38
+ background-color: ${Hs} !important;
39
39
  }
40
- `;function Us(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=Is,t.textContent=Hs,e.head.appendChild(t)}var Ws=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function Gs(){let e=globalThis;e[Ws]||(e[Ws]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${yo}`))}function Ks(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),Gs()}function qs(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>Ks(e),{once:!0}),a})}`${So}`;var Js={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},Ys=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,Xs=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,Zs=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,Qs=/\\embed\{newLine\}\[\]/g,$s=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],ec=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),tc=`MJX-CHTML-styles`,nc=`PIE-MJX-SVG-styles`,rc=`PIE-MathJax-Menu-Settings`,ic={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},ac=200,oc=201;function sc(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function cc(e){for(let[t,n]of $s)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function lc(e){return cc(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var uc=`mathjax_ignore`,dc=`mathjax_process`;function fc(e,t){let n=e.closest(`.${uc}, .${dc}`);return n!==null&&t.contains(n)&&!n.classList.contains(dc)}function pc(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||fc(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${lc(n)}\\)`.replace(Qs,`\\newline `),t.dataset.mathHandled=`true`)}}function mc(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function hc(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?Zs:Xs).test(e.textContent??``)}function gc(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=ko(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=Bo();return _c(t)&&vc(t),e}}},startup:{typeset:!1,ready:()=>{let e=Bo(),r=e?.startup,i=_c(e);i&&(vc(e),yc(e,s.speechLocales),Ao(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(bc(r?.document),r?.document?.addStyles?.(ic),qs(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...Js}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(Ys),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=jo(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),Ho(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function _c(e){return!!e?.version?.startsWith(`4.`)}function vc(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=Wo);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=nc)}function yc(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=rc;try{let e=localStorage.getItem(rc);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(rc,JSON.stringify(i)):localStorage.removeItem(rc)}catch{}}}function bc(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(sc(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,oc,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&sc(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===tc&&(r.id=Wo),Cc()}function xc(e){return e instanceof HTMLStyleElement&&Go.includes(e.id)}function Sc(e){Ro(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function Cc(){let e=document.head,t=[...e.children].find(xc);if(t){Sc(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(xc);if(e){Sc(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function wc(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=ac&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function Tc(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=Bo()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function Ec(e){let t=Bo();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():Tc(t):gc(e)}function Dc(e){return Ec(e).then(()=>{let e=Bo();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function Oc(e){let t=Uo,n=t[ec];return n||(n=Dc(e),t[ec]=n),n}function kc(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=Ko();r&&Ro(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),pc(n),Xo(n),mc(n),Fs(n);let i=Oc(e);if(!hc(n,t)){i.catch(()=>{});return}await i;let a=Bo();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){Us(),wc(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}sc(n)}}}var Ac={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},jc={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},Mc={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`};({...Ac,...jc,...Mc});var Nc=`@pie-lib/math-rendering`,Pc=`@pie-lib/math-rendering@2`,Fc=`pie-print`,Ic=50,Lc=1e4,Rc=null;function zc(){return!!window[Pc]?.opts?.useSingleDollar}function Bc(){return Rc||=kc({useSingleDollar:zc()}),Rc}function Vc(){if(typeof window>`u`)return null;let e=window[Nc];return typeof e?.renderMath==`function`&&e.renderMath!==Gc?e:null}function Hc(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===Fc)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Uc(){let e=window.renderMath;return typeof e==`function`?e:null}async function Wc(e){let t=Hc(e);if(!t)return null;let n=Uc();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+Lc;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,Ic));let e=Uc();if(e)return e}return null}var Gc=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Vc(),i=r||t?null:await Wc(n);return r?await r.renderMath?.(n):i&&i!==Gc?await i(n):await Bc()(n),t?n.innerHTML:void 0},Kc={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},qc={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},Q=e=>typeof e==`string`,Jc=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Yc=e=>e==null?``:``+e,Xc=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Zc=/###/g,Qc=e=>e&&e.indexOf(`###`)>-1?e.replace(Zc,`.`):e,$c=e=>!e||Q(e),el=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if($c(e))return{};let t=Qc(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return $c(e)?{}:{obj:e,k:Qc(r[i])}},tl=(e,t,n)=>{let{obj:r,k:i}=el(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=el(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=el(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},nl=(e,t,n,r)=>{let{obj:i,k:a}=el(e,t,Object);i[a]=i[a]||[],i[a].push(n)},rl=(e,t)=>{let{obj:n,k:r}=el(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},il=(e,t,n)=>{let r=rl(e,n);return r===void 0?rl(t,n):r},al=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Q(e[r])||e[r]instanceof String||Q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):al(e[r],t[r],n):e[r]=t[r]);return e},ol=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),sl={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},cl=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>sl[e]):e,ll=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},ul=[` `,`,`,`?`,`!`,`;`],dl=new ll(20),fl=(e,t,n)=>{t||=``,n||=``;let r=ul.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=dl.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},pl=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},ml=e=>e?.replace(/_/g,`-`),hl={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},gl=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||hl,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(Q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},_l=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},vl=class extends _l{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Q(n)&&i?o.push(...n.split(i)):o.push(n)));let s=rl(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Q(n)?s:pl(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),tl(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Q(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=rl(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?al(s,n,i):s={...s,...n},tl(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},yl={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},bl=Symbol(`i18next/PATH_KEY`);function xl(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===bl?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Sl(e,t){let{[bl]:n}=e(xl()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Cl={},wl=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,Tl=class e extends _l{constructor(e,t={}){super(),Xc([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=gl.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=wl(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!fl(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Q(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Q(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Sl(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Sl(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Q(i.count),x=e.hasDefaultValue(i),ee=b?this.pluralResolver.getSuffix(d,i.count,i):``,te=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,ne=b&&!i.ordinal&&i.count===0,S=ne&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${ee}`]||i[`defaultValue${te}`]||i.defaultValue,C=m;y&&!m&&x&&(C=S);let re=wl(C),ie=Object.prototype.toString.apply(C);if(y&&C&&re&&_.indexOf(ie)<0&&!(Q(v)&&Array.isArray(C))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,C,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(C),t=e?[]:{},n=e?g:h;for(let e in C)if(Object.prototype.hasOwnProperty.call(C,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:wl(S)?S[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=C[e])}m=t}}else if(y&&Q(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=S),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&S!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?S:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.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.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);ne&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||S)})}):n(e,s,S))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Q(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Q(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=yl.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Q(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Sl(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Q(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Q(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Cl[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Cl[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" 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!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Q(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},El=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gl.create(`languageUtils`)}getScriptPartFromCode(e){if(e=ml(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=ml(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Q(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Q(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Q(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Q(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Dl={zero:0,one:1,two:2,few:3,many:4,other:5},Ol={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},kl=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=gl.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=ml(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Ol;if(!e.match(/-|_/))return Ol;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Dl[e]-Dl[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Al=(e,t,n,r=`.`,i=!0)=>{let a=il(e,t,n);return!a&&i&&Q(n)&&(a=pl(e,n,r),a===void 0&&(a=pl(t,n,r))),a},jl=e=>e.replace(/\$/g,`$$$$`),Ml=class{constructor(e={}){this.logger=gl.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?cl:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ol(i):a||`{{`,this.suffix=o?ol(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?ol(d):f||ol(`$t(`),this.nestingSuffix=p?ol(p):m||ol(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Al(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Al(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>jl(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?jl(this.escape(e)):jl(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Q(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!Q(a)&&!this.useRawValueToEscape&&(a=Yc(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${ol(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Q(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Q(i))return i;Q(i)||(i=Yc(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Nl=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Pl=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(ml(r),i),t[o]=s),s(n)}},Fl=e=>(t,n,r)=>e(ml(n),r)(t),Il=class{constructor(e={}){this.logger=gl.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Pl:Fl;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Pl(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Nl(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Ll=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Rl=class extends _l{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=gl.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{nl(n.loaded,[i],a),Ll(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Q(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},zl=()=>({debug:!1,initAsync:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Q(e[1])&&(t.defaultValue=e[1]),Q(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Bl=e=>(Q(e.ns)&&(e.ns=[e.ns]),Q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Vl=()=>{},Hl=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Ul=`__i18next_supportNoticeShown`,Wl=()=>!!(typeof globalThis<`u`&&globalThis[Ul]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),Gl=()=>{typeof globalThis<`u`&&(globalThis[Ul]=!0)},Kl=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),$=class e extends _l{constructor(e={},t){if(super(),this.options=Bl(e),this.services={},this.logger=gl,this.modules={external:[]},Hl(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=zl();this.options={...n,...this.options,...Bl(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Kl(this)&&!Wl()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),Gl());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?gl.init(r(this.modules.logger),this.options):gl.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Il;let t=new El(this.options);this.store=new vl(this.options.resources,this.options);let i=this.services;i.logger=gl,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new kl(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Ml(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Rl(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Tl(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Vl,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Jc(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Vl){let n=t,r=Q(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Jc();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Vl,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&yl.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Jc();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Q(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Q(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Sl(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Sl(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Sl(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Q(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Jc();return this.options.ns?(Q(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Jc();Q(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`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`.split(`.`),n=this.services?.languageUtils||new El(zl());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Vl){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new vl(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...zl().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Ml(n)}return a.translator=new Tl(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();$.createInstance,$.dir,$.init,$.loadResources,$.reloadResources,$.use,$.changeLanguage,$.getFixedT,$.t,$.exists,$.setDefaultNamespace,$.hasLoadedNamespace,$.loadNamespaces,$.loadLanguages,$.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Kc,es:qc}});var{translator:ql}={translator:{...$,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return $.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function Jl(e,t){return ql.t(`translation:simpleCloze:${e}`,{lng:t})}function Yl(e,t){return ql.t(`common:${e}`,{lng:t})}var Xl=mr(`<div class="teacher-instructions pie-teacher-instructions svelte-1jhejbv"><button type="button" class="teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv"> </button> <div class="teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv"></div></div>`),Zl={hash:`svelte-1jhejbv`,code:`.teacher-instructions.svelte-1jhejbv {margin-bottom:1rem;}.teacher-instructions-toggle.svelte-1jhejbv {padding:0;border:0;border-bottom:1px dotted currentColor;background:transparent;font:inherit;color:var(--pie-primary, #3f51b5);cursor:pointer;}.teacher-instructions-toggle.svelte-1jhejbv:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function Ql(e,t){Ve(t,!0),Pr(e,Zl);let n=Yr(t,`html`,7),r=Yr(t,`language`,7),i=I(!1),a=`simple-cloze-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),xt()},get language(){return r()},set language(e){r(e),xt()}},s=Xl(),c=Jt(s),l=Yt(c,!0),u=Xt(c,2);return Nr(u,()=>_o(n()),!0),Ce(u),Ce(s),gn(e=>{Vr(c,`aria-expanded`,U(i)),Vr(c,`aria-controls`,a),wr(l,e),Vr(u,`id`,a),Vr(u,`hidden`,!U(i))},[()=>Yl(U(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),ar(`click`,c,()=>L(i,!U(i))),_r(e,s),He(o)}or([`click`]),ti(Ql,{html:{},language:{}},[],[],{mode:`open`});var $l=mr(`<div class="simple-cloze-prompt svelte-1glps5n"></div>`),eu=gr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35" focusable="false" class="svelte-1glps5n"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-tertiary-light, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),tu=gr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" focusable="false" class="svelte-1glps5n"><path style="fill: var(--pie-border-light, #D0CAC5); stroke: var(--pie-border-light, #E6E3E0); stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: var(--pie-border-light, #B3ABA4); stroke: var(--pie-border-light, #CDC7C2); stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="var(--pie-background, white)"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="var(--pie-tertiary-light, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),nu=mr(`<button type="button" class="simple-cloze-toggle svelte-1glps5n"><span class="simple-cloze-toggle-icon svelte-1glps5n" aria-hidden="true"><!></span> <span class="simple-cloze-toggle-label svelte-1glps5n"> </span></button>`),ru=mr(`<span class="correctness-icon correctness-icon--correct svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"></path></svg></span>`),iu=mr(`<span class="correctness-icon correctness-icon--incorrect svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span>`),au=mr(`<div class="simple-cloze-root svelte-1glps5n"><!> <!> <!> <div class="simple-cloze-response svelte-1glps5n"><!> <input type="text" spellcheck="false"/> <span class="sr-only svelte-1glps5n" role="status"> </span></div></div>`),ou={hash:`svelte-1glps5n`,code:`
40
+ `;function Ws(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=Ls,t.textContent=Us,e.head.appendChild(t)}var Gs=/[⁡-⁤]/g,Ks={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},qs={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},Js={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},Ys={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},Xs={"+":`plus`,"-":`minus`,"−":`minus`,"±":`plus or minus`,"∓":`minus or plus`,"×":`times`,"⋅":`times`,"·":`times`,"*":`times`,"÷":`divided by`,"/":`divided by`,"=":`equals`,"≠":`does not equal`,"<":`is less than`,">":`is greater than`,"≤":`is less than or equal to`,"≥":`is greater than or equal to`,"≈":`is approximately equal to`,"≡":`is equivalent to`,"∝":`is proportional to`,"∈":`is an element of`,"∉":`is not an element of`,"⊂":`is a subset of`,"⊆":`is a subset of or equal to`,"∪":`union`,"∩":`intersection`,"→":`right arrow`,"←":`left arrow`,"⇒":`implies`,"⇔":`if and only if`,"∑":`sum`,"∏":`product`,"∫":`integral`,"∞":`infinity`,"∠":`angle`,"⊥":`is perpendicular to`,"∥":`is parallel to`,"∴":`therefore`,",":`comma`,";":`semicolon`,":":`colon`,"|":`vertical bar`,"‖":`double vertical bar`,...qs,...Js,...Ys},Zs=new Set([`|`,`‖`]),Qs=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),$s={α:`alpha`,β:`beta`,γ:`gamma`,δ:`delta`,ε:`epsilon`,θ:`theta`,λ:`lambda`,μ:`mu`,π:`pi`,ρ:`rho`,σ:`sigma`,τ:`tau`,φ:`phi`,ω:`omega`,Δ:`capital delta`,Σ:`capital sigma`,Ω:`capital omega`,"∞":`infinity`,sin:`sine`,cos:`cosine`,tan:`tangent`,sec:`secant`,csc:`cosecant`,cot:`cotangent`,ln:`natural log`,lim:`limit`},ec={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},tc=e=>(e.textContent??``).replace(Gs,``).replace(/\s+/g,` `).trim(),nc=e=>e.replace(/\s+/g,` `).trim(),rc=e=>[...e.children];function ic(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?ic(e.children[0]):!1}function ac(e){let t=e?tc(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function oc(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function sc(e){return $s[e]??e}function cc(e){return Xs[e]??e}function lc(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(Z(r)),n=!0;continue}let e=tc(r);e&&(!n&&Ks[e]?t.push(Ks[e]):e in Ys?t.push(Ys[e]):(t.push(cc(e)),n=e in Js||Zs.has(e)&&n))}return t.filter(Boolean).join(` `)}function uc(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(tc(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&tc(t)===tc(r)&&!a.some(i)){let e=nc(lc(a));return tc(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return lc(e)}function dc(e,t){let n=e?Z(e):``,r=t?Z(t):``;return ic(e)&&ic(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function fc(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function pc(e,t){let n=t?tc(t):``;if(t&&ic(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in Ys)return`${e} ${Ys[n]}`}let r=t?Z(t):``;return ic(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function mc(e,t){let n=t?Z(t):``;return ic(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function hc(e,t,n){let r=tc(e);if(r===`lim`)return`limit as ${t?Z(t):``} of`;if(!Qs.has(r))return;let i=t?`from ${Z(t)}`:``,a=n?`to ${Z(n)}`:``;return`${cc(r)} ${i} ${a} of`}function gc(e){let t=rc(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>rc(e).filter(e=>e.localName===`mtd`)),r=Math.max(0,...n.map(e=>e.length)),i=n.map((e,t)=>`row ${t+1}: ${e.map(e=>nc(lc(rc(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function _c(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=rc(e).map((e,t,n)=>t<n.length-1?`${Z(e)} ${cc(r[Math.min(t,r.length-1)]??`,`)}`:Z(e));return[cc(t),...i,cc(n)].filter(Boolean).join(` `)}function Z(e){let t=rc(e);switch(e.localName){case`mi`:return sc(tc(e));case`mn`:case`mtext`:case`ms`:return tc(e);case`mo`:return cc(tc(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?Z(t[0]):``;case`mfrac`:return dc(t[0],t[1]);case`msqrt`:return fc(nc(lc(t)),`square root`,t.length===1&&ic(t[0]));case`mroot`:{let e=ac(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${oc(e)} root`:`root with index ${t[1]?Z(t[1]):``}`;return fc(t[0]?Z(t[0]):``,n,ic(t[0]))}case`msup`:return pc(t[0]?Z(t[0]):``,t[1]);case`msub`:return mc(t[0]?Z(t[0]):``,t[1]);case`msubsup`:return(t[0]?hc(t[0],t[1],t[2]):void 0)||pc(mc(t[0]?Z(t[0]):``,t[1]),t[2]);case`munder`:case`mover`:case`munderover`:{let[n,r,i]=t,a=e.localName===`mover`?void 0:r,o=e.localName===`munder`?void 0:e.localName===`mover`?r:i,s=n?hc(n,a,o):void 0;if(s)return s;let c=n?Z(n):``,l=e.localName===`mover`&&r?ec[tc(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${Z(a)} below`:``,o?`with ${Z(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return _c(e);case`mtable`:return gc(e);case`mrow`:case`math`:return uc(t);default:return t.length?lc(t):tc(e)}}function vc(e){return nc(Z(e))}var yc=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function bc(e){if(e.hasAttribute(`aria-label`)||!e.closest(yc))return;let t=e.querySelector(`math`),n=t?vc(t):``;n&&e.setAttribute(`aria-label`,n)}function xc(e){for(let t of e.querySelectorAll(`mjx-container`))bc(t)}var Sc=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function Cc(){let e=globalThis;e[Sc]||(e[Sc]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${bo}`))}function wc(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),Cc()}function Tc(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>wc(e),{once:!0}),a})}`${Co}`;var Ec={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},Dc=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,Oc=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,kc=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,Ac=/\\embed\{newLine\}\[\]/g,jc=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],Mc=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),Nc=`MJX-CHTML-styles`,Pc=`PIE-MJX-SVG-styles`,Fc=`PIE-MathJax-Menu-Settings`,Ic={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},Lc=200,Rc=201,zc=202;function Bc(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function Vc(e){for(let[t,n]of jc)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function Hc(e){return Vc(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var Uc=`mathjax_ignore`,Wc=`mathjax_process`;function Gc(e,t){let n=e.closest(`.${Uc}, .${Wc}`);return n!==null&&t.contains(n)&&!n.classList.contains(Wc)}function Kc(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||Gc(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${Hc(n)}\\)`.replace(Ac,`\\newline `),t.dataset.mathHandled=`true`)}}function qc(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function Jc(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?kc:Oc).test(e.textContent??``)}function Yc(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=Ao(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=Vo();return Xc(t)&&Zc(t),e}}},startup:{typeset:!1,ready:()=>{let e=Vo(),r=e?.startup,i=Xc(e);i&&(Zc(e),Qc(e,s.speechLocales),jo(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&($c(r?.document),el(r?.document),r?.document?.addStyles?.(Ic),Tc(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...Ec}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(Dc),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=Mo(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),Uo(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function Xc(e){return!!e?.version?.startsWith(`4.`)}function Zc(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=Go);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=Pc)}function Qc(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=Fc;try{let e=localStorage.getItem(Fc);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(Fc,JSON.stringify(i)):localStorage.removeItem(Fc)}catch{}}}function $c(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(Bc(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,Rc,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&Bc(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===Nc&&(r.id=Go),rl()}function el(e){let t=e=>{e.typesetRoot&&bc(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,zc,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function tl(e){return e instanceof HTMLStyleElement&&Ko.includes(e.id)}function nl(e){zo(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function rl(){let e=document.head,t=[...e.children].find(tl);if(t){nl(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(tl);if(e){nl(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function il(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=Lc&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function al(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=Vo()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function ol(e){let t=Vo();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():al(t):Yc(e)}function sl(e){return ol(e).then(()=>{let e=Vo();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function cl(e){let t=Wo,n=t[Mc];return n||(n=sl(e),t[Mc]=n),n}function ll(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=qo();r&&zo(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),Kc(n),Zo(n),qc(n),Is(n);let i=cl(e);if(!Jc(n,t)){i.catch(()=>{});return}await i;let a=Vo();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){Ws(),il(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}Bc(n),xc(n)}}}var ul=`@pie-lib/math-rendering`,dl=`@pie-lib/math-rendering@2`,fl=`pie-print`,pl=50,ml=1e4,hl=null;function gl(){return!!window[dl]?.opts?.useSingleDollar}function _l(){return hl||=ll({useSingleDollar:gl()}),hl}function vl(){if(typeof window>`u`)return null;let e=window[ul];return typeof e?.renderMath==`function`&&e.renderMath!==Sl?e:null}function yl(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===fl)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function bl(){let e=window.renderMath;return typeof e==`function`?e:null}async function xl(e){let t=yl(e);if(!t)return null;let n=bl();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+ml;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,pl));let e=bl();if(e)return e}return null}var Sl=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=vl(),i=r||t?null:await xl(n);return r?(await r.renderMath?.(n),xc(n)):i&&i!==Sl?(await i(n),xc(n)):await _l()(n),t?n.innerHTML:void 0},Cl={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},wl={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},Q=e=>typeof e==`string`,Tl=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},El=e=>e==null?``:``+e,Dl=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Ol=/###/g,kl=e=>e&&e.indexOf(`###`)>-1?e.replace(Ol,`.`):e,Al=e=>!e||Q(e),jl=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Al(e))return{};let t=kl(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Al(e)?{}:{obj:e,k:kl(r[i])}},Ml=(e,t,n)=>{let{obj:r,k:i}=jl(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=jl(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=jl(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Nl=(e,t,n,r)=>{let{obj:i,k:a}=jl(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Pl=(e,t)=>{let{obj:n,k:r}=jl(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Fl=(e,t,n)=>{let r=Pl(e,n);return r===void 0?Pl(t,n):r},Il=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Q(e[r])||e[r]instanceof String||Q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Il(e[r],t[r],n):e[r]=t[r]);return e},Ll=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Rl={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},zl=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>Rl[e]):e,Bl=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Vl=[` `,`,`,`?`,`!`,`;`],Hl=new Bl(20),Ul=(e,t,n)=>{t||=``,n||=``;let r=Vl.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Hl.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Wl=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Gl=e=>e?.replace(/_/g,`-`),Kl={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},ql=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Kl,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(Q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Jl=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Yl=class extends Jl{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Q(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Pl(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Q(n)?s:Wl(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Ml(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Q(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Pl(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Il(s,n,i):s={...s,...n},Ml(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Xl={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Zl=Symbol(`i18next/PATH_KEY`);function Ql(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Zl?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function $l(e,t){let{[Zl]:n}=e(Ql()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var eu={},tu=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,nu=class e extends Jl{constructor(e,t={}){super(),Dl([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=ql.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=tu(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ul(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Q(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Q(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=$l(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?$l(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Q(i.count),x=e.hasDefaultValue(i),ee=b?this.pluralResolver.getSuffix(d,i.count,i):``,te=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,ne=b&&!i.ordinal&&i.count===0,S=ne&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${ee}`]||i[`defaultValue${te}`]||i.defaultValue,C=m;y&&!m&&x&&(C=S);let re=tu(C),ie=Object.prototype.toString.apply(C);if(y&&C&&re&&_.indexOf(ie)<0&&!(Q(v)&&Array.isArray(C))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,C,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(C),t=e?[]:{},n=e?g:h;for(let e in C)if(Object.prototype.hasOwnProperty.call(C,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:tu(S)?S[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=C[e])}m=t}}else if(y&&Q(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=S),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&S!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?S:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.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.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);ne&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||S)})}):n(e,s,S))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Q(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Q(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Xl.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Q(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?$l(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Q(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Q(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!eu[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(eu[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" 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!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Q(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},ru=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ql.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Gl(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Gl(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Q(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Q(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Q(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Q(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},iu={zero:0,one:1,two:2,few:3,many:4,other:5},au={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ou=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ql.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Gl(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),au;if(!e.match(/-|_/))return au;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>iu[e]-iu[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},su=(e,t,n,r=`.`,i=!0)=>{let a=Fl(e,t,n);return!a&&i&&Q(n)&&(a=Wl(e,n,r),a===void 0&&(a=Wl(t,n,r))),a},cu=e=>e.replace(/\$/g,`$$$$`),lu=class{constructor(e={}){this.logger=ql.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?zl:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Ll(i):a||`{{`,this.suffix=o?Ll(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Ll(d):f||Ll(`$t(`),this.nestingSuffix=p?Ll(p):m||Ll(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=su(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(su(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>cu(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?cu(this.escape(e)):cu(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Q(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!Q(a)&&!this.useRawValueToEscape&&(a=El(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${Ll(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Q(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Q(i))return i;Q(i)||(i=El(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},uu=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},du=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Gl(r),i),t[o]=s),s(n)}},fu=e=>(t,n,r)=>e(Gl(n),r)(t),pu=class{constructor(e={}){this.logger=ql.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?du:fu;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=du(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=uu(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},mu=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},hu=class extends Jl{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ql.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Nl(n.loaded,[i],a),mu(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Q(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},gu=()=>({debug:!1,initAsync:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Q(e[1])&&(t.defaultValue=e[1]),Q(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_u=e=>(Q(e.ns)&&(e.ns=[e.ns]),Q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),vu=()=>{},yu=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},bu=`__i18next_supportNoticeShown`,xu=()=>!!(typeof globalThis<`u`&&globalThis[bu]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),Su=()=>{typeof globalThis<`u`&&(globalThis[bu]=!0)},Cu=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),$=class e extends Jl{constructor(e={},t){if(super(),this.options=_u(e),this.services={},this.logger=ql,this.modules={external:[]},yu(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=gu();this.options={...n,...this.options,..._u(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Cu(this)&&!xu()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),Su());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?ql.init(r(this.modules.logger),this.options):ql.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:pu;let t=new ru(this.options);this.store=new Yl(this.options.resources,this.options);let i=this.services;i.logger=ql,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new ou(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new lu(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new hu(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new nu(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=vu,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Tl(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=vu){let n=t,r=Q(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Tl();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=vu,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Xl.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Tl();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Q(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Q(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=$l(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=$l(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=$l(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Q(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Tl();return this.options.ns?(Q(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Tl();Q(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`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`.split(`.`),n=this.services?.languageUtils||new ru(gu());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=vu){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Yl(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...gu().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new lu(n)}return a.translator=new nu(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();$.createInstance,$.dir,$.init,$.loadResources,$.reloadResources,$.use,$.changeLanguage,$.getFixedT,$.t,$.exists,$.setDefaultNamespace,$.hasLoadedNamespace,$.loadNamespaces,$.loadLanguages,$.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Cl,es:wl}});var{translator:wu}={translator:{...$,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return $.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function Tu(e,t){return wu.t(`translation:simpleCloze:${e}`,{lng:t})}function Eu(e,t){return wu.t(`common:${e}`,{lng:t})}var Du=mr(`<div class="teacher-instructions pie-teacher-instructions svelte-1jhejbv"><button type="button" class="teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv"> </button> <div class="teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv"></div></div>`),Ou={hash:`svelte-1jhejbv`,code:`.teacher-instructions.svelte-1jhejbv {margin-bottom:1rem;}.teacher-instructions-toggle.svelte-1jhejbv {padding:0;border:0;border-bottom:1px dotted currentColor;background:transparent;font:inherit;color:var(--pie-primary, #3f51b5);cursor:pointer;}.teacher-instructions-toggle.svelte-1jhejbv:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function ku(e,t){Be(t,!0),Pr(e,Ou);let n=Yr(t,`html`,7),r=Yr(t,`language`,7),i=L(!1),a=`simple-cloze-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),bt()},get language(){return r()},set language(e){r(e),bt()}},s=Du(),c=qt(s),l=Jt(c,!0),u=Yt(c,2);return Nr(u,()=>vo(n()),!0),Se(u),Se(s),hn(e=>{Vr(c,`aria-expanded`,U(i)),Vr(c,`aria-controls`,a),wr(l,e),Vr(u,`id`,a),Vr(u,`hidden`,!U(i))},[()=>Eu(U(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),ar(`click`,c,()=>R(i,!U(i))),_r(e,s),Ve(o)}or([`click`]),ti(ku,{html:{},language:{}},[],[],{mode:`open`});var Au=mr(`<div class="simple-cloze-prompt svelte-1glps5n"></div>`),ju=gr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35" focusable="false" class="svelte-1glps5n"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-tertiary-light, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),Mu=gr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" focusable="false" class="svelte-1glps5n"><path style="fill: var(--pie-border-light, #D0CAC5); stroke: var(--pie-border-light, #E6E3E0); stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: var(--pie-border-light, #B3ABA4); stroke: var(--pie-border-light, #CDC7C2); stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="var(--pie-background, white)"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="var(--pie-tertiary-light, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),Nu=mr(`<button type="button" class="simple-cloze-toggle svelte-1glps5n"><span class="simple-cloze-toggle-icon svelte-1glps5n" aria-hidden="true"><!></span> <span class="simple-cloze-toggle-label svelte-1glps5n"> </span></button>`),Pu=mr(`<span class="correctness-icon correctness-icon--correct svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"></path></svg></span>`),Fu=mr(`<span class="correctness-icon correctness-icon--incorrect svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span>`),Iu=mr(`<div class="simple-cloze-root svelte-1glps5n"><!> <!> <!> <div class="simple-cloze-response svelte-1glps5n"><!> <input type="text" spellcheck="false"/> <span class="sr-only svelte-1glps5n" role="status"> </span></div></div>`),Lu={hash:`svelte-1glps5n`,code:`
41
41
  /*
42
42
  * Self-contained: players ship no Tailwind, so nothing here relies on host
43
43
  * utility classes or a CSS reset. Colours are \`--pie-*\` theme variables with
44
44
  * the fallbacks \`@pie-lib/render-ui\`'s \`color\` module uses.
45
45
  */.simple-cloze-root.svelte-1glps5n {padding:1rem;color:var(--pie-text, black);}.simple-cloze-prompt.svelte-1glps5n {margin-bottom:1rem;}.simple-cloze-prompt.svelte-1glps5n p {margin:0.5em 0;}.simple-cloze-prompt.svelte-1glps5n strong {font-weight:600;}.simple-cloze-toggle.svelte-1glps5n {display:flex;align-items:center;gap:0.5rem;margin:0 0 0.75rem;padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;user-select:none;}.simple-cloze-toggle.svelte-1glps5n:hover .simple-cloze-toggle-label:where(.svelte-1glps5n) {text-decoration:underline;}.simple-cloze-toggle.svelte-1glps5n:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.simple-cloze-toggle-icon.svelte-1glps5n {display:inline-flex;}.simple-cloze-toggle-icon.svelte-1glps5n svg:where(.svelte-1glps5n) {width:25px;height:25px;}.simple-cloze-toggle-label.svelte-1glps5n {font-size:0.875rem;line-height:1.25rem;}.simple-cloze-response.svelte-1glps5n {position:relative;display:inline-block;}.simple-cloze-input.svelte-1glps5n {box-sizing:border-box;margin:0;padding:0.5rem 0.75rem;
46
- /* The text colour, as ECR's input border: a light grey fails 3:1 (WCAG 1.4.11). */border:1px solid var(--pie-text, black);border-radius:0.25rem;background-color:transparent;color:var(--pie-text, black);font:inherit;}.simple-cloze-input.svelte-1glps5n:disabled {opacity:1;color:var(--pie-text, black);-webkit-text-fill-color:currentColor;}.simple-cloze-input.svelte-1glps5n:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.simple-cloze-input--correct.svelte-1glps5n {border:2px solid var(--pie-correct-tertiary, #0ea449);}.simple-cloze-input--incorrect.svelte-1glps5n {border:2px solid var(--pie-incorrect-icon, #bf0d00);}.simple-cloze-input[readonly].svelte-1glps5n {font-weight:600;}.correctness-icon.svelte-1glps5n {position:absolute;top:-8px;left:-8px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:2px;color:var(--pie-background, #ffffff);}.correctness-icon.svelte-1glps5n svg:where(.svelte-1glps5n) {width:12px;height:12px;}.correctness-icon--correct.svelte-1glps5n {background-color:var(--pie-correct-tertiary, #0ea449);}.correctness-icon--incorrect.svelte-1glps5n {background-color:var(--pie-incorrect-icon, #bf0d00);}.sr-only.svelte-1glps5n {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function su(e,t){Ve(t,!0),Pr(e,ou);let n=Yr(t,`model`,7,null),r=Yr(t,`session`,7,null),i=Yr(t,`onSessionChange`,7),a=`simple-cloze-${Math.random().toString(36).slice(2,10)}`,o=`${a}-prompt`,s=`${a}-feedback`,c=I(null),l=I(null),u=I(!1),d=M(()=>n()?.mode===`evaluate`),f=M(()=>n()?.correctness),p=M(()=>U(f)===`correct`),m=M(()=>U(f)===`incorrect`),h=M(()=>U(f)===`unanswered`),g=M(()=>typeof n()?.prompt==`string`?n().prompt:``),_=M(()=>typeof n()?.correctAnswer==`string`?n().correctAnswer:``),v=M(()=>typeof r()?.value==`string`?r().value:``),y=M(()=>U(d)&&!U(p)&&!!U(_).trim()),b=M(()=>U(u)&&U(y)),x=M(()=>U(d)?U(b)?Jl(`correctAnswerShown`,n()?.language):U(p)?Jl(`correct`,n()?.language):U(m)?Jl(`incorrect`,n()?.language):U(h)?Jl(`unanswered`,n()?.language):``:``);ln(()=>{U(y)||L(u,!1)}),ln(()=>{if(!U(l))return;let e=U(b)?U(_):U(v);U(l).value!==e&&(U(l).value=e)}),ln(()=>{if(!U(c)||!U(g))return;let e=e=>console.warn(`simple-cloze: MathJax render failed`,e);try{Promise.resolve(Gc(U(c))).catch(e)}catch(t){e(t)}});function ee(e){let t=e.target.value;i()?.({...r(),value:t})}function te(){U(y)&&L(u,!U(u))}var ne={get model(){return n()},set model(e=null){n(e),xt()},get session(){return r()},set session(e=null){r(e),xt()},get onSessionChange(){return i()},set onSessionChange(e){i(e),xt()}},S=au(),C=Jt(S),re=e=>{{let t=M(()=>n()?.language);Ql(e,{get html(){return n().teacherInstructions},get language(){return U(t)}})}};Mr(C,e=>{n()?.teacherInstructions&&e(re)});var ie=Xt(C,2),ae=e=>{var t=$l();Nr(t,()=>_o(U(g)),!0),Ce(t),Kr(t,e=>L(c,e),()=>U(c)),gn(()=>Vr(t,`id`,o)),_r(e,t)};Mr(ie,e=>{U(g)&&e(ae)});var oe=Xt(ie,2),se=e=>{var t=nu(),r=Jt(t),i=Jt(r),a=e=>{_r(e,eu())},o=e=>{_r(e,tu())};Mr(i,e=>{U(b)?e(a):e(o,-1)}),Ce(r);var s=Yt(Xt(r,2),!0);Ce(t),gn(e=>{Vr(t,`aria-pressed`,U(b)),wr(s,e)},[()=>Yl(U(b)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),ar(`click`,t,te),_r(e,t)};Mr(oe,e=>{U(y)&&e(se)});var ce=Xt(oe,2),le=Jt(ce),ue=e=>{_r(e,ru())},de=e=>{_r(e,iu())};Mr(le,e=>{U(d)&&(U(p)||U(b))?e(ue):U(d)&&U(m)&&e(de,1)});var fe=Xt(le,2);let pe;Kr(fe,e=>L(l,e),()=>U(l));var me=Xt(fe,2),he=Yt(me,!0);return Ce(ce),Ce(S),gn((e,t)=>{pe=Lr(fe,1,`simple-cloze-input svelte-1glps5n`,null,pe,{"simple-cloze-input--correct":U(d)&&(U(p)||U(b)),"simple-cloze-input--incorrect":U(d)&&U(m)&&!U(b)}),Vr(fe,`placeholder`,e),Vr(fe,`aria-labelledby`,U(g)?o:void 0),Vr(fe,`aria-label`,t),Vr(fe,`aria-describedby`,U(x)?s:void 0),fe.disabled=n()?.disabled,fe.readOnly=U(b),Vr(me,`id`,s),wr(he,U(x))},[()=>Jl(`placeholder`,n()?.language),()=>U(g)?void 0:Jl(`answerInput`,n()?.language)]),ar(`input`,fe,ee),_r(e,S),He(ne)}or([`click`,`input`]),ti(su,{model:{type:`Object`},session:{type:`Object`},onSessionChange:{}},[],[]);function cu(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function lu(e,t){if(e===t)return e;if(!cu(e)||!cu(t)||Object.isFrozen(e)||!Object.isExtensible(e))return t;try{for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}catch{return t}return e}var uu=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},du=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}};function fu(e,t){let n=e.element;if(!n)throw TypeError("defineDeliveryElement: the component was not compiled with `customElement`");class r extends n{#e;#t;constructor(){super(),this.onSessionChange=e=>{this.writeSession(e),this.dispatchSessionChanged()}}set model(e){this.#e=e,super.model=e,queueMicrotask(()=>{this.dispatchEvent(new uu(this.tagName.toLowerCase(),this.isComplete(),this.#e!==void 0))})}get model(){return this.#e}set session(e){this.#t=e,super.session=e,this.dispatchSessionChanged()}get session(){return this.#t}isComplete(){return t.isComplete(this.#e,this.#t)}writeSession(e){this.#t=lu(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new du(this.tagName.toLowerCase(),this.isComplete()))}}return r}return fu(su,{isComplete:(e,t)=>typeof t?.value==`string`&&t.value.trim().length>0})})();
46
+ /* The text colour, as ECR's input border: a light grey fails 3:1 (WCAG 1.4.11). */border:1px solid var(--pie-text, black);border-radius:0.25rem;background-color:transparent;color:var(--pie-text, black);font:inherit;}.simple-cloze-input.svelte-1glps5n:disabled {opacity:1;color:var(--pie-text, black);-webkit-text-fill-color:currentColor;}.simple-cloze-input.svelte-1glps5n:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.simple-cloze-input--correct.svelte-1glps5n {border:2px solid var(--pie-correct-tertiary, #0ea449);}.simple-cloze-input--incorrect.svelte-1glps5n {border:2px solid var(--pie-incorrect-icon, #bf0d00);}.simple-cloze-input[readonly].svelte-1glps5n {font-weight:600;}.correctness-icon.svelte-1glps5n {position:absolute;top:-8px;left:-8px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:2px;color:var(--pie-background, #ffffff);}.correctness-icon.svelte-1glps5n svg:where(.svelte-1glps5n) {width:12px;height:12px;}.correctness-icon--correct.svelte-1glps5n {background-color:var(--pie-correct-tertiary, #0ea449);}.correctness-icon--incorrect.svelte-1glps5n {background-color:var(--pie-incorrect-icon, #bf0d00);}.sr-only.svelte-1glps5n {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Ru(e,t){Be(t,!0),Pr(e,Lu);let n=Yr(t,`model`,7,null),r=Yr(t,`session`,7,null),i=Yr(t,`onSessionChange`,7),a=`simple-cloze-${Math.random().toString(36).slice(2,10)}`,o=`${a}-prompt`,s=`${a}-feedback`,c=L(null),l=L(null),u=L(!1),d=N(()=>n()?.mode===`evaluate`),f=N(()=>n()?.correctness),p=N(()=>U(f)===`correct`),m=N(()=>U(f)===`incorrect`),h=N(()=>U(f)===`unanswered`),g=N(()=>typeof n()?.prompt==`string`?n().prompt:``),_=N(()=>typeof n()?.correctAnswer==`string`?n().correctAnswer:``),v=N(()=>typeof r()?.value==`string`?r().value:``),y=N(()=>U(d)&&!U(p)&&!!U(_).trim()),b=N(()=>U(u)&&U(y)),x=N(()=>U(d)?U(b)?Tu(`correctAnswerShown`,n()?.language):U(p)?Tu(`correct`,n()?.language):U(m)?Tu(`incorrect`,n()?.language):U(h)?Tu(`unanswered`,n()?.language):``:``);cn(()=>{U(y)||R(u,!1)}),cn(()=>{if(!U(l))return;let e=U(b)?U(_):U(v);U(l).value!==e&&(U(l).value=e)}),cn(()=>{if(!U(c)||!U(g))return;let e=e=>console.warn(`simple-cloze: MathJax render failed`,e);try{Promise.resolve(Sl(U(c))).catch(e)}catch(t){e(t)}});function ee(e){let t=e.target.value;i()?.({...r(),value:t})}function te(){U(y)&&R(u,!U(u))}var ne={get model(){return n()},set model(e=null){n(e),bt()},get session(){return r()},set session(e=null){r(e),bt()},get onSessionChange(){return i()},set onSessionChange(e){i(e),bt()}},S=Iu(),C=qt(S),re=e=>{{let t=N(()=>n()?.language);ku(e,{get html(){return n().teacherInstructions},get language(){return U(t)}})}};Mr(C,e=>{n()?.teacherInstructions&&e(re)});var ie=Yt(C,2),ae=e=>{var t=Au();Nr(t,()=>vo(U(g)),!0),Se(t),Kr(t,e=>R(c,e),()=>U(c)),hn(()=>Vr(t,`id`,o)),_r(e,t)};Mr(ie,e=>{U(g)&&e(ae)});var oe=Yt(ie,2),se=e=>{var t=Nu(),r=qt(t),i=qt(r),a=e=>{_r(e,ju())},o=e=>{_r(e,Mu())};Mr(i,e=>{U(b)?e(a):e(o,-1)}),Se(r);var s=Jt(Yt(r,2),!0);Se(t),hn(e=>{Vr(t,`aria-pressed`,U(b)),wr(s,e)},[()=>Eu(U(b)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),ar(`click`,t,te),_r(e,t)};Mr(oe,e=>{U(y)&&e(se)});var ce=Yt(oe,2),le=qt(ce),ue=e=>{_r(e,Pu())},de=e=>{_r(e,Fu())};Mr(le,e=>{U(d)&&(U(p)||U(b))?e(ue):U(d)&&U(m)&&e(de,1)});var fe=Yt(le,2);let pe;Kr(fe,e=>R(l,e),()=>U(l));var me=Yt(fe,2),he=Jt(me,!0);return Se(ce),Se(S),hn((e,t)=>{pe=Lr(fe,1,`simple-cloze-input svelte-1glps5n`,null,pe,{"simple-cloze-input--correct":U(d)&&(U(p)||U(b)),"simple-cloze-input--incorrect":U(d)&&U(m)&&!U(b)}),Vr(fe,`placeholder`,e),Vr(fe,`aria-labelledby`,U(g)?o:void 0),Vr(fe,`aria-label`,t),Vr(fe,`aria-describedby`,U(x)?s:void 0),fe.disabled=n()?.disabled,fe.readOnly=U(b),Vr(me,`id`,s),wr(he,U(x))},[()=>Tu(`placeholder`,n()?.language),()=>U(g)?void 0:Tu(`answerInput`,n()?.language)]),ar(`input`,fe,ee),_r(e,S),Ve(ne)}or([`click`,`input`]),ti(Ru,{model:{type:`Object`},session:{type:`Object`},onSessionChange:{}},[],[]);function zu(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Bu(e,t){if(e===t)return e;if(!zu(e)||!zu(t)||Object.isFrozen(e)||!Object.isExtensible(e))return t;try{for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}catch{return t}return e}var Vu=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},Hu=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}};function Uu(e,t){let n=e.element;if(!n)throw TypeError("defineDeliveryElement: the component was not compiled with `customElement`");class r extends n{#e;#t;constructor(){super(),this.onSessionChange=e=>{this.writeSession(e),this.dispatchSessionChanged()}}set model(e){this.#e=e,super.model=e,queueMicrotask(()=>{this.dispatchEvent(new Vu(this.tagName.toLowerCase(),this.isComplete(),this.#e!==void 0))})}get model(){return this.#e}set session(e){this.#t=e,super.session=e,this.dispatchSessionChanged()}get session(){return this.#t}isComplete(){return t.isComplete(this.#e,this.#t)}writeSession(e){this.#t=Bu(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new Hu(this.tagName.toLowerCase(),this.isComplete()))}}return r}return Uu(Ru,{isComplete:(e,t)=>typeof t?.value==`string`&&t.value.trim().length>0})})();