@pie-element/mc-populated-blank 0.3.0-next.20 → 0.3.0-next.21

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,12 +1,12 @@
1
- this.McPopulatedBlankElement=(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,S=4096,ee=8192,C=16384,w=32768,T=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,ae=65536,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`),ge=Symbol(`text`),_e=Symbol(`form reset`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(){console.warn(`https://svelte.dev/e/derived_inert`)}function xe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Se(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function Ce(e){E=e}var D;function O(t){if(t===null)throw xe(),e;return D=t}function we(){return O(tn(D))}function k(t){if(E){if(tn(D)!==null)throw xe(),e;D=t}}function Te(e=1){if(E){for(var t=e,n=D;t--;)n=tn(n);D=n}}function Ee(e=!0){for(var t=0,n=D;;){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=tn(n);e&&n.remove(),n=i}}function De(t){if(!t||t.nodeType!==8)throw xe(),e;return t.data}function Oe(e){return e===this.v}function ke(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ae(e){return!ke(e,this.v)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var A=null;function Ue(e){A=e}function We(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:U,l:null}}function Ge(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)_n(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,Ke(e)}function Ke(e={}){return u(e,ue,{value:!0}),e}function qe(){return!0}var Je=[];function Ye(){var e=Je;Je=[],v(e)}function Xe(e){if(Je.length===0&&!wt){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}var Qe=~(x|S|b);function j(e,t){e.f=e.f&Qe|t}function $e(e){e.f&512||e.deps===null?j(e,b):j(e,S)}function et(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ae,et(t.deps))}function tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),et(e.deps),j(e,b)}var nt=!1;function rt(e){var t=nt;try{return nt=!1,[e(),nt]}finally{nt=t}}var it=!1;function at(){it||(it=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function ot(e){var t=H,n=U;Bn(null),Vn(null);try{return e()}finally{Bn(t),Vn(n)}}function st(e,t,n,r){let i=qe()?dt:mt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=U,c=ct(),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){un(e,s)}lt()}}var d=ut();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>pt(e))).then(u).catch(e=>un(e,s)).finally(d)}l?l.then(()=>{c(),f(),lt()}):f()}function ct(){var e=U,t=H,n=A,r=N;return function(i=!0){Vn(e),Bn(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function lt(e=!0){Vn(null),Bn(null),Ue(null),e&&N?.deactivate()}function ut(){var e=U,t=e.b,n=N,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 dt(e){var n=2|x;return U!==null&&(U.f|=ne),{ctx:A,deps:null,effects:null,equals:Oe,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:U,ac:null}}var ft=Symbol(`obsolete`);function pt(e,n,r){let i=U;i===null&&je();var a=void 0,o=Ht(t),s=!H,c=new Set;return xn(()=>{var t=U,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(lt)}catch(e){n.reject(e),lt()}var r=N;if(s){if(t.f&32768)var l=ut();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(ft);else for(let e of c.values())e.reject(ft);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ft&&(r.activate(),t?(o.f|=ce,Wt(o,t)):(o.f&8388608&&(o.f^=ce),Wt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),hn(()=>{for(let e of c)e.reject(ft)}),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=dt(e);return Un(t),t}function mt(e){let t=dt(e);return t.equals=Ae,t}function ht(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function gt(e){var n,r=U,i=e.parent;if(!Ln&&i!==null&&e.v!==t&&i.f&24576)return be(),e.v;Vn(i);try{e.f&=~ae,ht(e),n=$n(e)}finally{Vn(r)}return n}function _t(e){var t=gt(e);if(!e.equals(t)&&(e.wv=Xn(),(!N?.is_fork||e.deps===null)&&(N===null?e.v=t:(N.capture(e,t,!0),xt?.capture(e,t,!0)),e.deps===null))){j(e,b);return}Ln||(St===null?$e(e):(mn()||N?.is_fork)&&St.set(e,t))}function vt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&ot(()=>{t.ac.abort(ve),t.ac=null}),t.fn!==null&&(t.teardown=_),nr(t,0),En(t))}function yt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&rr(t)}var bt=null,N=null,xt=null,St=null,Ct=null,wt=!1,Tt=!1,Et=null,Dt=null,Ot=0,kt=1,At=class e{id=kt++;#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(){bt===null?bt=this:(bt.#n=this,this.#t=bt),bt=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,S),t(r)}this.#p.add(e)}#g(){this.#e=!0,Ot++>1e3&&(this.#x(),jt());for(let e of this.#u)this.#d.delete(e),j(e,x),this.schedule(e);for(let e of this.#d)j(e,S),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Et=[],r=[],i=Dt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Rt(e),this.#h()||this.discard(),t}if(N=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Et=null,Dt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Lt(e,t);i.length>0&&N.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),xt=this,Nt(r),Nt(n),xt=null,this.#s?.resolve();var s=N;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&(Bt.clear(),s.#g())}#_(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):Zn(r)&&(i&16&&this.#d.add(r),rr(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}}}#v(){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}#y(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.#x(),N=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)tt(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]),St?.set(e,n)),this.is_fork||(e.v=n)}activate(){N=this}deactivate(){N=null,St=null}flush(){try{Tt=!0,N=this,this.#g()}finally{Ot=0,Ct=null,Et=null,Dt=null,Tt=!1,N=null,St=null,Bt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ft);this.#x(),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,Xe(()=>{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(N===null){let t=N=new e;!Tt&&!wt&&Xe(()=>{t.#e||t.flush()})}return N}apply(){St=null}schedule(e){if(Ct=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Et!==null&&t===U&&(H===null||!(H.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=b}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?bt=e:t.#t=e,this.linked=!1}}};function P(e){var t=wt;wt=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(Ze(),N===null)return n;N.flush()}}finally{wt=t}}function jt(){try{Ie()}catch(e){un(e,Ct)}}var Mt=null;function Nt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Zn(r)&&(Mt=new Set,rr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&kn(r),Mt?.size>0)){Bt.clear();for(let e of Mt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Mt.has(n)&&(Mt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||rr(n)}}Mt.clear()}}Mt=null}}function Pt(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?Pt(i,t,n,r):e&4194320&&!(e&2048)&&Ft(i,t,r)&&(j(i,x),It(i))}}function Ft(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&&Ft(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function It(e){N.schedule(e)}function Lt(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;)Lt(n,t),n=n.next}}function Rt(e){j(e,b);for(var t=e.first;t!==null;)Rt(t),t=t.next}var zt=new Set,Bt=new Map,Vt=!1;function Ht(e,t){return{f:0,v:e,reactions:null,equals:Oe,rv:0,wv:0}}function F(e,t){let n=Ht(e,t);return Un(n),n}function Ut(e,t=!1,n=!0){let r=Ht(e);return t||(r.equals=Ae),r}function I(e,t,n=!1){return H!==null&&(!zn||H.f&131072)&&qe()&&H.f&4325394&&(Hn===null||!Hn.has(e))&&Ve(),Wt(e,n?Jt(t):t,Dt)}function Wt(e,t,n=null){if(!e.equals(t)){Ln?Bt.set(e,t):Bt.has(e)||Bt.set(e,e.v);var r=At.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&gt(t),St===null&&$e(t)}e.wv=Xn(),qt(e,x,n),qe()&&U!==null&&U.f&1024&&!(U.f&96)&&(Wn===null?Gn([e]):Wn.push(e)),!r.is_fork&&zt.size>0&&!Vt&&Gt()}return t}function Gt(){Vt=!1;for(let e of zt){e.f&1024&&j(e,S);let t;try{t=Zn(e)}catch{t=!0}t&&rr(e)}zt.clear()}function Kt(e){I(e,e.v+1)}function qt(e,t,n){var r=e.reactions;if(r!==null)for(var i=qe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===U)){var l=(c&x)===0;if(l&&j(s,t),c&131072)zt.add(s);else if(c&2){var u=s;St?.delete(u),c&65536||(c&512&&(U===null||!(U.f&2097152))&&(s.f|=ae),qt(u,S,n))}else if(l){var d=s;c&16&&Mt!==null&&Mt.add(d),n===null?It(d):n.push(d)}}}}function Jt(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=F(0),s=null,c=Jn,l=e=>{if(Jn===c)return e();var t=H,n=Jn;Bn(null),Yn(c);var r=e();return Bn(t),Yn(n),r};return i&&r.set(`length`,F(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ze();var i=r.get(t);return i===void 0?l(()=>{var e=F(n.value,s);return r.set(t,e),e}):I(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>F(t,s));r.set(n,e),Kt(o)}}else I(i,t),Kt(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(()=>F(Jt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=K(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){var i=Reflect.getOwnPropertyDescriptor(e,n);if(i&&`value`in i){var a=r.get(n);a&&(i.value=K(a))}else if(i===void 0){var o=r.get(n),s=o?.v;if(o!==void 0&&s!==t)return{enumerable:!0,configurable:!0,value:s,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||U!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>F(a?Jt(e[n]):t,s)),r.set(n,i)),K(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(()=>F(t,s)),r.set(p+``,m)):I(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>F(void 0,s)),I(u,Jt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Jt(a));I(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&&I(_,v+1)}Kt(o)}return!0},ownKeys(e){K(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(){Be()}})}var Yt,Xt,Zt,Qt;function $t(){if(Yt===void 0){Yt=window,Xt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Zt=d(t,`firstChild`).get,Qt=d(t,`nextSibling`).get,g(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),g(n)&&(n[ge]=void 0)}}function en(e=``){return document.createTextNode(e)}function L(e){return Zt.call(e)}function tn(e){return Qt.call(e)}function R(e,t){if(!E)return L(e);var n=L(D);if(n===null)n=D.appendChild(en());else if(t&&n.nodeType!==3){var r=en();return n?.before(r),O(r),r}return t&&cn(n),O(n),n}function nn(e,t=!1){if(!E){var n=L(e);return n instanceof Comment&&n.data===``?tn(n):n}if(t){if(D?.nodeType!==3){var r=en();return D?.before(r),O(r),r}cn(D)}return D}function rn(e,t=!1){if(!E)return L(e);var n=R(e,t);return k(e),n}function z(e,t=1,n=!1){let r=E?D:e;for(var i;t--;)i=r,r=tn(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=en();return r===null?i?.after(a):r.before(a),O(a),a}cn(r)}return O(r),r}function an(e){e.textContent=``}function on(){return!1}function sn(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 cn(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 ln(e){var t=U;if(t===null)return H.f|=ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;un(e,t)}function un(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 dn(e){U===null&&(H===null&&Fe(e),Pe()),Ln&&Ne(e)}function fn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function pn(e,t){var n=U;n!==null&&n.f&8192&&(e|=ee);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};N?.register_created_effect(r);var i=r;if(e&4)Et===null?At.ensure().schedule(r):Et.push(r);else if(t!==null){try{rr(r)}catch(e){throw V(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|=te))}if(i!==null&&(i.parent=n,n!==null&&fn(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function mn(){return H!==null&&!zn}function hn(e){let t=pn(8,null);return j(t,b),t.teardown=e,t}function gn(e){dn(`$effect`);var t=U.f;if(!H&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return _n(e)}function _n(e){return pn(4|re,e)}function vn(e){At.ensure();let t=pn(64|ne,e);return()=>{V(t)}}function yn(e){At.ensure();let t=pn(64|ne,e);return(e={})=>new Promise(n=>{e.outro?An(t,()=>{V(t),n(void 0)}):(V(t),n(void 0))})}function bn(e){return pn(4,e)}function xn(e){return pn(se|ne,e)}function Sn(e,t=0){return pn(8|t,e)}function B(e,t=[],n=[],r=[]){st(r,t,n,t=>{pn(8,()=>{e(...t.map(K))})})}function Cn(e,t=0){return pn(16|t,e)}function wn(e){return pn(32|ne,e)}function Tn(e){var t=e.teardown;if(t!==null){let n=Ln,r=H;Rn(!0),Bn(null);try{t.call(null)}catch(t){un(t,e.parent)}finally{Rn(n),Bn(r)}}}function En(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&ot(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:V(n,t),n=r}}function Dn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||V(t),t=n}}function V(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(On(e.nodes.start,e.nodes.end),n=!0),e.f|=T,En(e,t&&!n),nr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Tn(e),e.f^=T,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&kn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function On(e,t){for(;e!==null;){var n=e===t?null:tn(e);e.remove(),e=n}}function kn(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 An(e,t,n=!0){var r=[];e.f|=256,jn(e,r,!0);var i=()=>{n&&V(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function jn(e,t,n){if(!(e.f&8192)){e.f^=ee;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;jn(i,t,o?n:!1)}i=a}}}function Mn(e){e.f&=-257,Nn(e,!0)}function Nn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ee,e.f&1024||(j(e,x),At.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Nn(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 Pn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:tn(n);t.append(n),n=i}}var Fn=null,In=!1,Ln=!1;function Rn(e){Ln=e}var H=null,zn=!1;function Bn(e){H=e}var U=null;function Vn(e){U=e}var Hn=null;function Un(e){H!==null&&(Hn??=new Set).add(e)}var W=null,G=0,Wn=null;function Gn(e){Wn=e}var Kn=1,qn=0,Jn=qn;function Yn(e){Jn=e}function Xn(){return++Kn}function Zn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ae),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Zn(a)&&_t(a),a.wv>e.wv)return!0}t&512&&St===null&&j(e,b)}return!1}function Qn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Hn!==null&&Hn.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,S),It(a))}}function $n(e){var t=W,n=G,r=Wn,i=H,a=Hn,o=A,s=zn,c=Jn,l=e.f;W=null,G=0,Wn=null,H=l&96?null:e,Hn=null,Ue(e.ctx),zn=!1,Jn=++qn,e.ac!==null&&(ot(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=oe;var u=e.fn,d=u();e.f|=w;var f=er(e);if(qe()&&Wn!==null&&!zn&&f!==null&&!(e.f&6146))for(var p=0;p<Wn.length;p++)Qn(Wn[p],e);if(i!==null&&i!==e){if(qn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=qn;if(t!==null)for(let e of t)e.rv=qn;Wn!==null&&(r===null?r=Wn:r.push(...Wn))}return e.f&8388608&&(e.f^=ce),d}catch(t){return er(e),ln(t)}finally{e.f^=oe,W=t,G=n,Wn=r,H=i,Hn=a,Ue(o),zn=s,Jn=c}}function er(e){var t=e.deps,n=N?.is_fork;if(W!==null){var r;if(n||nr(e,G),t!==null&&G>0)for(t.length=G+W.length,r=0;r<W.length;r++)t[G+r]=W[r];else e.deps=t=W;if(mn()&&e.f&512)for(r=G;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&G<t.length&&(nr(e,G),t.length=G);return t}function tr(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&&(W===null||!s.call(W,n))){var c=n;c.f&512&&(c.f^=512,c.f&=~ae),c.v!==t&&$e(c),c.ac!==null&&ot(()=>{c.ac.abort(ve),c.ac=null,j(c,x)}),vt(c),nr(c,0)}}function nr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)tr(e,n[r])}function rr(e){var t=e.f;if(!(t&16384)){j(e,b);var n=U,r=In;U=e,In=(t&96)==0;try{t&16777232?Dn(e):En(e),Tn(e);var i=$n(e);e.teardown=typeof i==`function`?i:null,e.wv=Kn}finally{In=r,U=n}}}function K(e){var t=(e.f&2)!=0;if(Fn?.add(e),H!==null&&!zn&&!(U!==null&&U.f&16384)&&(Hn===null||!Hn.has(e))){var n=H.deps;if(H.f&2097152)e.rv<qn&&(e.rv=qn,W===null&&n!==null&&n[G]===e?G++:W===null?W=[e]:W.push(e));else{H.deps??=[],s.call(H.deps,e)||H.deps.push(e);var r=e.reactions;r===null?e.reactions=[H]:s.call(r,H)||r.push(H)}}if(Ln&&Bt.has(e))return Bt.get(e);if(t){var i=e;if(Ln){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||ar(i))&&(a=gt(i)),Bt.set(i,a),a}var o=(i.f&512)==0&&!zn&&H!==null&&(In||(H.f&512)!=0),c=(i.f&w)===0;Zn(i)&&(o&&(i.f|=512),_t(i)),o&&!c&&(yt(i),ir(i))}if(St?.has(e))return St.get(e);if(e.f&8388608)throw e.v;return e.v}function ir(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(yt(t),ir(t))}function ar(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Bt.has(t)||t.f&2&&ar(t))return!0;return!1}function or(e){var t=zn;try{return zn=!0,e()}finally{zn=t}}var sr=Symbol(`events`),cr=new Set,lr=new Set;function ur(e,t,n){(t[sr]??={})[e]=n}function dr(e){for(var t=0;t<e.length;t++)cr.add(e[t]);for(var n of lr)n(e)}var fr=null,pr=!1;function mr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;fr=e,pr||(pr=!0,setTimeout(()=>{pr=!1,fr=null}));var o=0,s=fr===e&&e[sr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[sr]=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=H,f=U;Bn(null),Vn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[sr]?.[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[sr]=t,delete e.currentTarget,Bn(d),Vn(f)}}}var hr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function gr(e){return hr?.createHTML(e)??e}function _r(e){var t=sn(`template`);return t.innerHTML=gr(e.replaceAll(`<!>`,`<!---->`)),t.content}function vr(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return vr(D,null),D;i===void 0&&(i=_r(a?e:`<!>`+e),n||(i=L(i)));var t=r||Xt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;vr(o,s)}else vr(t,t);return t}}function yr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return vr(D,null),D;if(!o){var e=L(_r(a));if(i)for(o=document.createDocumentFragment();L(e);)o.appendChild(L(e));else o=L(e)}var t=o.cloneNode(!0);if(i){var n=L(t),r=t.lastChild;vr(n,r)}else vr(t,t);return t}}function br(e,t){return yr(e,t,`svg`)}function xr(){if(E)return vr(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=en();return e.append(t,n),vr(t,n),e}function J(e,t){if(E){var n=U;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=D),we();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 Sr=[`touchstart`,`touchmove`];function Cr(e){return Sr.includes(e)}function wr(e){let t=0,n=Ht(0),r;return()=>{mn()&&(K(n),Sn(()=>(t===0&&(r=or(()=>e(()=>Kt(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,Kt(n))})})))}}var Tr=te|ne;function Er(e,t,n,r){new Dr(e,t,n,r)}var Dr=class{parent;is_pending=!1;transform_error;#e;#t=E?D: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=wr(()=>(this.#m=Ht(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=U;t.b=this,t.f|=128,n(e)},this.parent=U.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Cn(()=>{if(E){let e=this.#t;we();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()},Tr),E&&(this.#e=D)}#g(){try{this.#a=wn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Xe(r),t&&(this.#s=wn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Se();return}t=!0,n&&He(),this.#s!==null&&An(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){un(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=wn(()=>e(this.#e)),Xe(()=>{var e=this.#c=document.createDocumentFragment(),t=en(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return wn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){un(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(N);return}this.#u===0&&(this.#e.before(e),this.#c=null,An(this.#o,()=>{this.#o=null}),this.#x(N))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=wn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Pn(this.#a,e);let t=this.#n.pending;this.#o=wn(()=>t(this.#e))}else this.#x(N)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){tt(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=U,n=H,r=A;Vn(this.#i),Bn(this.#i),Ue(this.#i.ctx);try{return At.ensure(),e()}finally{Vn(t),Bn(n),Ue(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&&An(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,Xe(()=>{this.#d=!1,this.#m&&Wt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),K(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;N?.is_fork?(this.#a&&N.skip_effect(this.#a),this.#o&&N.skip_effect(this.#o),this.#s&&N.skip_effect(this.#s),N.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(V(this.#a),null),this.#o&&=(V(this.#o),null),this.#s&&=(V(this.#s),null),E&&(O(this.#t),Te(),O(Ee()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return wn(()=>{var r=U;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return un(e,this.#i.parent),null}}))};Xe(()=>{var t;try{t=this.transform_error(e)}catch(e){un(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>un(e,this.#i&&this.#i.parent)):n(t)})}};function Or(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function kr(e,t){return Mr(e,t)}function Ar(t,n){$t(),n.intro=n.intro??!1;let r=n.target,i=E,a=D;try{for(var o=L(r);o&&(o.nodeType!==8||o.data!==`[`);)o=tn(o);if(!o)throw e;Ce(!0),O(o);let i=Mr(t,{...n,anchor:o});return Ce(!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&&Le(),$t(),an(r),Ce(!1),kr(t,n)}finally{Ce(i),O(a)}}var jr=new Map;function Mr(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){$t();var u=void 0,d=yn(()=>{var s=r??n.appendChild(en());Er(s,{pending:()=>{}},n=>{We({});var r=A;if(o&&(r.c=o),a&&(i.$$events=a),E&&vr(n,null),u=t(n,i)||Ke(),E&&(U.nodes.end=D,D===null||D.nodeType!==8||D.data!==`]`))throw xe(),e;Ge()},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=Cr(r);for(let e of[n,document]){var a=jr.get(e);a===void 0&&(a=new Map,jr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,mr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(cr)),lr.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=jr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,mr),t.delete(e),t.size===0&&jr.delete(r)):t.set(e,i)}lr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return Nr.set(u,d),u}var Nr=new WeakMap;function Pr(e,t){let n=Nr.get(e);return n?(Nr.delete(e),n(t)):Promise.resolve()}var Fr=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)Mn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Mn(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&&(V(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();Pn(r,t),t.append(en()),this.#n.set(e,{effect:r,fragment:t})}else V(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),An(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)||(V(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=on();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=en();i.append(a),this.#n.set(e,{effect:wn(()=>t(a)),fragment:i})}else this.#t.set(e,wn(()=>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 E&&(this.anchor=D),this.#a(n)}};function Y(e,t,n=!1){var r;E&&(r=D,we());var i=new Fr(e),a=n?te:0;function o(e,t){if(E){var n=De(r);if(e!==parseInt(n.substring(1))){var a=Ee();O(a),i.anchor=a,Ce(!1),i.ensure(e,t),Ce(!0);return}}i.ensure(e,t)}Cn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Ir(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];An(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Lr(e,c(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var l=r.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;an(d),d.append(u),e.items.clear()}Lr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Lr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ie,Pn(a,document.createDocumentFragment())):V(t[i],n)}}var Rr;function zr(e,t,n,r,i,o=null){var s=e,l=new Map;if(t&4){var u=e;s=E?O(L(u)):u.appendChild(en())}E&&we();var d=null,f=mt(()=>{var e=n();return a(e)?e:e==null?[]:c(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Vr(v,p,s,t,r),d!==null&&(p.length===0?d.f&33554432?(d.f^=ie,Ur(d,null,s)):Mn(d):An(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Cn(()=>{p=K(f);var e=p.length;let a=!1;E&&De(s)===`[!`!=(e===0)&&(s=Ee(),O(s),Ce(!1),a=!0);for(var c=new Set,u=N,v=on(),y=0;y<e;y+=1){E&&D.nodeType===8&&D.data===`]`&&(s=D,a=!0,Ce(!1));var b=p[y],x=r(b,y),S=h?null:l.get(x);S?(S.v&&Wt(S.v,b),S.i&&Wt(S.i,y),v&&u.unskip_effect(S.e)):(S=Hr(l,h?s:Rr??=en(),b,x,y,i,t,n),h||(S.e.f|=ie),l.set(x,S)),c.add(x)}if(e===0&&o&&!d&&(h?d=wn(()=>o(s)):(d=wn(()=>o(Rr??=en())),d.f|=ie)),e>c.size&&Me(``,``,``),E&&e>0&&O(Ee()),!h)if(m.set(u,c),v){for(let[e,t]of l)c.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);a&&Ce(!0),K(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,E&&(s=D)}function Br(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Vr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,l=Br(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Mn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ie,_===l)Ur(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Wr(e,d,_),Wr(e,_,y),Ur(_,y,n),d=_,p=[],m=[],l=Br(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Ur(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Wr(e,S.prev,ee.next),Wr(e,d,S),Wr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Ur(_,l,n),Wr(e,_.prev,_.next),Wr(e,_,d===null?e.effect.first:d.next),Wr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Br(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Br(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Lr(e,c(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var C=[];if(u!==void 0)for(_ of u)_.f&8192||C.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&C.push(l),l=Br(l.next);var w=C.length;if(w>0){var T=r&4&&o===0?n:null;if(a){for(v=0;v<w;v+=1)C[v].nodes?.a?.measure();for(v=0;v<w;v+=1)C[v].nodes?.a?.fix()}Ir(e,C,T)}}a&&Xe(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Hr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Ht(n):Ut(n,!1,!1):null,l=o&2?Ht(i):null;return{v:c,i:l,e:wn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ur(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=tn(r);if(a.before(r),r===i)return;r=o}}function Wr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Gr(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;E&&(l=O(L(d)))}B(()=>{var t=U;if(u===(u=n()??``)){E&&we();return}if(a&&!E){t.nodes=null,d.innerHTML=u,u!==``&&vr(L(d),d.lastChild);return}if(t.nodes!==null&&(On(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(E){for(var c=D.data,f=we(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=tn(f);if(f===null)throw xe(),e;vr(D,p),l=O(f);return}var m=sn(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(vr(L(h),h.lastChild),o||s)for(;L(h);)l.before(L(h));else l.before(h)}})}function Kr(e,t){bn(()=>{e=U?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=sn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var qr=[...`
3
- \r\f\xA0\v`];function Jr(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||qr.includes(r[o-1]))&&(s===r.length||qr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Yr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Xr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Zr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Xr)),i&&c.push(...Object.keys(i).map(Xr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Xr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Yr(r)),i&&(n+=Yr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Qr(e,t,n,r,i,a){var o=e[me];if(E||o!==n||o===void 0){var s=Jr(n,r,a);(!E||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}function $r(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ei(e,t,n,r){var i=e[he];if(E||i!==t){var a=Zr(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?($r(e,n?.[0],r[0]),$r(e,n?.[1],r[1],`important`)):$r(e,n,r));return r}var ti=Symbol(`is custom element`),ni=Symbol(`is html`),ri=ye?`link`:`LINK`,ii=ye?`progress`:`PROGRESS`;function ai(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;X(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;X(e,`checked`,null),e.checked=r}}};e[_e]=n,Xe(n),at()}}function oi(e,t){var n=ci(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ii)||(e.value=t??``)}function si(e,t){var n=ci(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function X(e,t,n,r){var i=ci(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ri)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ui(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ci(e){return e[pe]??={[ti]:e.nodeName.includes(`-`),[ni]:e.namespaceURI===n}}var li=new Map;function ui(e){var t=e.getAttribute(`is`)||e.nodeName,n=li.get(t);if(n)return n;li.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 di(e,t){return e===t||e?.[le]===t}function fi(e=Ke(),t,n,r){var i=A.r,a=U;return bn(()=>{var o,s;return Sn(()=>{o=s,s=r?.()||[],or(()=>{di(n(...s),e)||(t(e,...s),o&&di(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&&di(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Z(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??=dt(r),K(l)):(c&&(c=!1,s=o?or(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]=rt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Re(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?dt:mt)(()=>(v=!1,g()));a&&K(y);var b=U;return(function(e,t){if(arguments.length>0){let n=t?K(y):i&&a?Jt(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return Ln&&v||b.f&16384?y.v:K(y)})}function pi(e){return new mi(e)}var mi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Ut(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return K(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===de?!0:(K(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Ar:kr)(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)&&P(),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=()=>{Pr(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()}},hi;typeof HTMLElement==`function`&&(hi=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=sn(`slot`);e!=="default"&&(n.name=e),J(t,n)}}let t={},n=_i(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]=gi(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=pi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=vn(()=>{Sn(()=>{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=gi(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]=gi(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 gi(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 _i(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function vi(e,t,n,r,i,a){let o=class extends hi{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=gi(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 yi(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var bi={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].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},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.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{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`,redo:`Redo`,reset:`Reset`},mathInline:{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.`},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}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},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`,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`}},xi={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`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{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`},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`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,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`}},graphing:{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`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{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.`},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}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},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`,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`}},Q=e=>typeof e==`string`,Si=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ci=e=>e==null?``:``+e,wi=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Ti=/###/g,Ei=e=>e&&e.indexOf(`###`)>-1?e.replace(Ti,`.`):e,Di=e=>!e||Q(e),Oi=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Di(e))return{};let t=Ei(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Di(e)?{}:{obj:e,k:Ei(r[i])}},ki=(e,t,n)=>{let{obj:r,k:i}=Oi(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=Oi(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Oi(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Ai=(e,t,n,r)=>{let{obj:i,k:a}=Oi(e,t,Object);i[a]=i[a]||[],i[a].push(n)},ji=(e,t)=>{let{obj:n,k:r}=Oi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Mi=(e,t,n)=>{let r=ji(e,n);return r===void 0?ji(t,n):r},Ni=(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]):Ni(e[r],t[r],n):e[r]=t[r]);return e},Pi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Fi={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Ii=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>Fi[e]):e,Li=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}},Ri=[` `,`,`,`?`,`!`,`;`],zi=new Li(20),Bi=(e,t,n)=>{t||=``,n||=``;let r=Ri.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=zi.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},Vi=(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},Hi=e=>e?.replace(/_/g,`-`),Ui={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)}},Wi=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ui,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)}},Gi=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])})}},Ki=class extends Gi{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=ji(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:Vi(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),ki(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=ji(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ni(s,n,i):s={...s,...n},ki(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}},qi={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}},Ji=Symbol(`i18next/PATH_KEY`);function Yi(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ji?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Xi(e,t){let{[Ji]:n}=e(Yi()),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 Zi={},Qi=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,$i=class e extends Gi{constructor(e,t={}){super(),wi([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Wi.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=Qi(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&&!Bi(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=Xi(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Xi(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),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,ee=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,C=b&&!i.ordinal&&i.count===0,w=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${ee}`]||i.defaultValue,T=m;y&&!m&&x&&(T=w);let te=Qi(T),ne=Object.prototype.toString.apply(T);if(y&&T&&te&&_.indexOf(ne)<0&&!(Q(v)&&Array.isArray(T))){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,T,{...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(T),t=e?[]:{},n=e?g:h;for(let e in T)if(Object.prototype.hasOwnProperty.call(T,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Qi(w)?w[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=T[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=w),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&w!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?w: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);C&&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}`]||w)})}):n(e,s,w))}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=qi.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`?Xi(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,!Zi[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Zi[`${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}},ea=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wi.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Hi(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=Hi(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}},ta={zero:0,one:1,two:2,few:3,many:4,other:5},na={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ra=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Wi.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Hi(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!`),na;if(!e.match(/-|_/))return na;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)=>ta[e]-ta[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))}},ia=(e,t,n,r=`.`,i=!0)=>{let a=Mi(e,t,n);return!a&&i&&Q(n)&&(a=Vi(e,n,r),a===void 0&&(a=Vi(t,n,r))),a},aa=e=>e.replace(/\$/g,`$$$$`),oa=class{constructor(e={}){this.logger=Wi.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?Ii:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Pi(i):a||`{{`,this.suffix=o?Pi(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Pi(d):f||Pi(`$t(`),this.nestingSuffix=p?Pi(p):m||Pi(`)`),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=ia(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(ia(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=>aa(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?aa(this.escape(e)):aa(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=Ci(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(`${Pi(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=Ci(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}},sa=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}},ca=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(Hi(r),i),t[o]=s),s(n)}},la=e=>(t,n,r)=>e(Hi(n),r)(t),ua=class{constructor(e={}){this.logger=Wi.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ca:la;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()]=ca(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}=sa(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)}},da=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},fa=class extends Gi{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Wi.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=>{Ai(n.loaded,[i],a),da(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)}}},pa=()=>({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}),ma=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),ha=()=>{},ga=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},_a=`__i18next_supportNoticeShown`,va=()=>!!(typeof globalThis<`u`&&globalThis[_a]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),ya=()=>{typeof globalThis<`u`&&(globalThis[_a]=!0)},ba=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 Gi{constructor(e={},t){if(super(),this.options=ma(e),this.services={},this.logger=Wi,this.modules={external:[]},ga(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=pa();this.options={...n,...this.options,...ma(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&&!ba(this)&&!va()&&(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 💙`),ya());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Wi.init(r(this.modules.logger),this.options):Wi.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ua;let t=new ea(this.options);this.store=new Ki(this.options.resources,this.options);let i=this.services;i.logger=Wi,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new ra(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 oa(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new fa(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 $i(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||=ha,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=Si(),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=ha){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=Si();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||=ha,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`&&qi.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=Si();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=Xi(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Xi(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Xi(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=Si();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=Si();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 ea(pa());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=ha){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 Ki(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={...pa().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new oa(n)}return a.translator=new $i(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:bi,es:xi}});var{translator:xa}={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 Sa(e,t,n={}){return xa.t(`translation:mcPopulatedBlank:${e}`,{lng:t,...n,interpolation:{escapeValue:!1}})}function Ca(e,t){return xa.t(`common:${e}`,{lng:t})}var wa=q(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),Ta=q(`<button class="autoplay-enable pie-audio-autoplay-enable svelte-ypdwb3" type="button"> </button>`),Ea=q(`<audio controls="" class="audio-controls pie-audio-player svelte-ypdwb3" preload="metadata"><track kind="captions"/></audio> <!>`,1),Da=q(`<p class="audio-error pie-audio-error svelte-ypdwb3" role="alert"> </p>`),Oa=q(`<div class="audio-container pie-audio-container svelte-ypdwb3"><!></div>`),ka={hash:`svelte-ypdwb3`,code:`.audio-container.svelte-ypdwb3 {margin-bottom:1rem;}.audio-controls.svelte-ypdwb3 {display:block;width:100%;max-width:28rem;}.autoplay-enable.svelte-ypdwb3 {margin-top:0.5rem;padding:0;border:0;background:transparent;font:inherit;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:inherit;text-decoration-line:underline;}.audio-error.svelte-ypdwb3 {margin:0;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:var(--pie-incorrect-icon, #c10007);}.listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Aa(e,t){We(t,!0),Kr(e,ka);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=Z(t,`hasAudio`,7,!1),i=Z(t,`audioUrl`,7),a=Z(t,`useFeatureButtonAudio`,7,!1),o=Z(t,`autoplayEnabled`,7,!1),s=Z(t,`featureAudioSkin`,7),c=Z(t,`language`,7),l=Z(t,`onaudiostarted`,7),u=Z(t,`onaudioended`,7),d=F(null),f=F(null),p=F(null),m=F(Jt(n.IDLE)),h=M(()=>yi({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),g=M(()=>K(m)===n.PLAYING),_=M(()=>K(m)===n.BLOCKED),v=M(()=>K(h)===`error`?Sa(`audioResourceUnavailable`,c()):``);gn(()=>{i(),I(m,n.IDLE,!0)});function y(){K(h)!==`none`&&K(h)!==`error`&&K(d)&&K(d).play().catch(()=>{})}function b(){K(h)!==`none`&&K(h)!==`error`&&K(d)&&K(d).play().finally(()=>{K(m)===n.BLOCKED&&I(m,n.PAUSED,!0)})}function x(e,t,n){gn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>K(d),`playing`,()=>{I(m,n.PLAYING,!0),l()?.()}),x(()=>K(d),`ended`,()=>{I(m,n.PAUSED,!0),u()?.()}),x(()=>K(f),`click`,()=>y()),x(()=>K(p),`click`,()=>b()),gn(()=>{!o()||K(h)===`none`||K(h)===`error`||K(m)===n.IDLE&&K(d)&&i()&&(I(m,n.PAUSED,!0),K(d).play().catch(()=>{I(m,n.BLOCKED,!0)}))});var S={get hasAudio(){return r()},set hasAudio(e=!1){r(e),P()},get audioUrl(){return i()},set audioUrl(e){i(e),P()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),P()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),P()},get featureAudioSkin(){return s()},set featureAudioSkin(e){s(e),P()},get language(){return c()},set language(e){c(e),P()},get onaudiostarted(){return l()},set onaudiostarted(e){l(e),P()},get onaudioended(){return u()},set onaudioended(e){u(e),P()}},ee=xr(),C=nn(ee),w=e=>{var t=Oa(),n=R(t),r=e=>{var t=wa(),n=nn(t);fi(n,e=>I(d,e),()=>K(d));var r=z(n,2),a=R(r),o=z(a,2);k(r),fi(r,e=>I(f,e),()=>K(f)),B((e,t,c)=>{X(n,`src`,i()),X(r,`aria-label`,e),Qr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(g)?``:`listen-active`}`,`svelte-ypdwb3`),X(a,`src`,s().silentUrl),X(a,`alt`,t),Qr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(g)?`listen-active`:``}`,`svelte-ypdwb3`),X(o,`src`,s().playingUrl),X(o,`alt`,c)},[()=>Sa(`listen`,c()),()=>Sa(`listenSilentAlt`,c()),()=>Sa(`listenPlayingAlt`,c())]),J(e,t)},a=e=>{var t=Ea(),n=nn(t);fi(n,e=>I(d,e),()=>K(d));var r=z(n,2),a=e=>{var t=Ta(),n=rn(t,!0);fi(t,e=>I(p,e),()=>K(p)),B(e=>Or(n,e),[()=>Sa(`clickToEnableAutoplay`,c())]),J(e,t)};Y(r,e=>{K(_)&&e(a)}),B(()=>X(n,`src`,i())),J(e,t)},o=e=>{var t=Da(),n=rn(t,!0);B(()=>Or(n,K(v))),J(e,t)};Y(n,e=>{K(h)===`feature-button`?e(r):K(h)===`controls`?e(a,1):K(h)===`error`&&e(o,2)}),k(t),J(e,t)};return Y(C,e=>{K(h)!==`none`&&e(w)}),J(e,ee),Ge(S)}vi(Aa,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},language:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var ja=q(`<img class="cloze-marker-image pie-blank-image svelte-d9l5tb" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Ma=q(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Na=q(`<span class="cloze-marker-empty svelte-d9l5tb"><span aria-hidden="true">&nbsp;</span> <span class="sr-only svelte-d9l5tb"> </span></span>`),Pa=q(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Fa={hash:`svelte-d9l5tb`,code:`
1
+ this.McPopulatedBlankElement=(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,S=4096,ee=8192,te=16384,C=32768,w=1<<25,ne=65536,re=1<<19,ie=1<<20,ae=1<<25,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`),ge=Symbol(`text`),_e=Symbol(`form reset`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(){console.warn(`https://svelte.dev/e/derived_inert`)}function xe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Se(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function Ce(e){T=e}var E;function D(t){if(t===null)throw xe(),e;return E=t}function we(){return D($t(E))}function O(t){if(T){if($t(E)!==null)throw xe(),e;E=t}}function Te(e=1){if(T){for(var t=e,n=E;t--;)n=$t(n);E=n}}function Ee(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=$t(n);e&&n.remove(),n=i}}function De(t){if(!t||t.nodeType!==8)throw xe(),e;return t.data}function Oe(e){return e===this.v}function ke(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ae(e){return!ke(e,this.v)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var k=null;function Ue(e){k=e}function We(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:U,l:null}}function Ge(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)hn(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,Ke(e)}function Ke(e={}){return u(e,ue,{value:!0}),e}function qe(){return!0}var A=[];function Je(){var e=A;A=[],v(e)}function Ye(e){if(A.length===0&&!bt){var t=A;queueMicrotask(()=>{t===A&&Je()})}A.push(e)}function Xe(){for(;A.length>0;)Je()}var Ze=~(x|S|b);function j(e,t){e.f=e.f&Ze|t}function Qe(e){e.f&512||e.deps===null?j(e,b):j(e,S)}function $e(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),j(e,b)}var et=!1;function tt(){et||(et=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function nt(e){var t=H,n=U;Rn(null),zn(null);try{return e()}finally{Rn(t),zn(n)}}function rt(e,t,n,r){let i=qe()?st:ut;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=U,c=it(),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){cn(e,s)}at()}}var d=ot();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>lt(e))).then(u).catch(e=>cn(e,s)).finally(d)}l?l.then(()=>{c(),f(),at()}):f()}function it(){var e=U,t=H,n=k,r=N;return function(i=!0){zn(e),Rn(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function at(e=!0){zn(null),Rn(null),Ue(null),e&&N?.deactivate()}function ot(){var e=U,t=e.b,n=N,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 st(e){var n=2|x;return U!==null&&(U.f|=re),{ctx:k,deps:null,effects:null,equals:Oe,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:U,ac:null}}var ct=Symbol(`obsolete`);function lt(e,n,r){let i=U;i===null&&je();var a=void 0,o=Rt(t),s=!H,c=new Set;return yn(()=>{var t=U,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(at)}catch(e){n.reject(e),at()}var r=N;if(s){if(t.f&32768)var l=ot();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(ct);else for(let e of c.values())e.reject(ct);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ct&&(r.activate(),t?(o.f|=ce,Ht(o,t)):(o.f&8388608&&(o.f^=ce),Ht(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),pn(()=>{for(let e of c)e.reject(ct)}),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=st(e);return Vn(t),t}function ut(e){let t=st(e);return t.equals=Ae,t}function dt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function ft(e){var n,r=U,i=e.parent;if(!Fn&&i!==null&&e.v!==t&&i.f&24576)return be(),e.v;zn(i);try{dt(e),n=Zn(e)}finally{zn(r)}return n}function pt(e){var t=ft(e);if(!e.equals(t)&&(e.wv=Jn(),(!N?.is_fork||e.deps===null)&&(N===null?e.v=t:(N.capture(e,t,!0),_t?.capture(e,t,!0)),e.deps===null))){j(e,b);return}Fn||(vt===null?Qe(e):(fn()||N?.is_fork)&&vt.set(e,t))}function mt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&nt(()=>{t.ac.abort(ve),t.ac=null}),t.fn!==null&&(t.teardown=_),er(t,0),wn(t))}function ht(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&tr(t)}var gt=null,N=null,_t=null,vt=null,yt=null,bt=!1,xt=!1,St=null,Ct=null,wt=0,Tt=1,Et=class e{id=Tt++;#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(){gt===null?gt=this:(gt.#n=this,this.#t=gt),gt=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,S),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,S),this.schedule(e);this.apply();for(var t=St=[],n=[],r=Ct=[];this.#c.length>0;){wt++>1e3&&(this.#S(),Dt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw Pt(e),this.#h()||this.discard(),t}}if(N=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(St=null,Ct=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Nt(e,t);r.length>0&&N.#_();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(),_t=this,kt(n),kt(t),_t=null,this.#s?.resolve();var o=N;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&&(It.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):Yn(r)&&(i&16&&this.#d.add(r),tr(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(),N=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)$e(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]),vt?.set(e,n)),this.is_fork||(e.v=n)}activate(){N=this}deactivate(){N=null,vt=null}flush(){try{xt=!0,N=this,this.#_()}finally{wt=0,yt=null,St=null,Ct=null,xt=!1,N=null,vt=null,It.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ct);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,Ye(()=>{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(N===null){let t=N=new e;!xt&&!bt&&Ye(()=>{t.#e||t.flush()})}return N}apply(){vt=null}schedule(e){if(yt=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?gt=e:t.#t=e,this.linked=!1}}};function P(e){var t=bt;bt=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(Xe(),N===null)return n;N.flush()}}finally{bt=t}}function Dt(){try{Ie()}catch(e){cn(e,yt)}}var Ot=null;function kt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Yn(r)&&(Ot=new Set,tr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Dn(r),Ot?.size>0)){It.clear();for(let e of Ot){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ot.has(n)&&(Ot.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||tr(n)}}Ot.clear()}}Ot=null}}function At(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?At(i,t,n,r):e&4194320&&!(e&2048)&&jt(i,t,r)&&(j(i,x),Mt(i))}}function jt(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&&jt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Mt(e){N.schedule(e)}function Nt(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;)Nt(n,t),n=n.next}}function Pt(e){j(e,b);for(var t=e.first;t!==null;)Pt(t),t=t.next}var Ft=new Set,It=new Map,Lt=!1;function Rt(e,t){return{f:0,v:e,reactions:null,equals:Oe,rv:0,wv:0}}function F(e,t){let n=Rt(e,t);return Vn(n),n}function zt(e,t=!1,n=!0){let r=Rt(e);return t||(r.equals=Ae),r}function I(e,t,n=!1){return H!==null&&(!Ln||H.f&131072)&&qe()&&H.f&4325394&&(Bn===null||!Bn.has(e))&&Ve(),Ht(e,n?Kt(t):t,Ct)}var Bt=null,Vt=0;function Ht(e,t,n=null){if(!e.equals(t)){Fn?It.set(e,t):It.has(e)||It.set(e,e.v);var r=Et.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&ft(t),vt===null&&Qe(t)}e.wv=Jn(),Bt=null,Vt=0,Gt(e,x,n),Bt=null,qe()&&U!==null&&U.f&1024&&!(U.f&96)&&(Hn===null?Un([e]):Hn.push(e)),!r.is_fork&&Ft.size>0&&!Lt&&Ut()}return t}function Ut(){Lt=!1;for(let e of Ft){e.f&1024&&j(e,S);let t;try{t=Yn(e)}catch{t=!0}t&&tr(e)}Ft.clear()}function Wt(e){I(e,e.v+1)}function Gt(e,t,n){var r=e.reactions;if(r!==null){var i=qe(),a=r.length;if(Vt+=a,Vt>1e5&&Bt===null&&(Bt=new Set),Bt!==null){if(Bt.has(e))return;Bt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===U)){var l=(c&x)===0;if(l&&j(s,t),c&131072)Ft.add(s);else if(c&2){var u=s;vt?.delete(u),Gt(u,S,n)}else if(l){var d=s;c&16&&Ot!==null&&Ot.add(d),n===null?Mt(d):n.push(d)}}}}}function Kt(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=F(0),s=null,c=Kn,l=e=>{if(Kn===c)return e();var t=H,n=Kn;Rn(null),qn(c);var r=e();return Rn(t),qn(n),r};return i&&r.set(`length`,F(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ze();var i=r.get(t);return i===void 0?l(()=>{var e=F(n.value,s);return r.set(t,e),e}):I(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>F(t,s));r.set(n,e),Wt(o)}}else I(i,t),Wt(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(()=>F(Kt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=K(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=K(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||U!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>F(a?Kt(e[n]):t,s)),r.set(n,i)),K(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(()=>F(t,s)),r.set(p+``,m)):I(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>F(void 0,s)),I(u,Kt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Kt(a));I(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&&I(_,v+1)}Wt(o)}return!0},ownKeys(e){K(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(){Be()}})}var qt,Jt,Yt,Xt;function Zt(){if(qt===void 0){qt=window,Jt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Yt=d(t,`firstChild`).get,Xt=d(t,`nextSibling`).get,g(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),g(n)&&(n[ge]=void 0)}}function Qt(e=``){return document.createTextNode(e)}function L(e){return Yt.call(e)}function $t(e){return Xt.call(e)}function R(e,t){if(!T)return L(e);var n=L(E);if(n===null)n=E.appendChild(Qt());else if(t&&n.nodeType!==3){var r=Qt();return n?.before(r),D(r),r}return t&&on(n),D(n),n}function en(e,t=!1){if(!T){var n=L(e);return n instanceof Comment&&n.data===``?$t(n):n}if(t){if(E?.nodeType!==3){var r=Qt();return E?.before(r),D(r),r}on(E)}return E}function tn(e,t=!1){if(!T)return L(e);var n=R(e,t);return O(e),n}function z(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=$t(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=Qt();return r===null?i?.after(a):r.before(a),D(a),a}on(r)}return D(r),r}function nn(e){e.textContent=``}function rn(){return!1}function an(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 on(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 sn(e){var t=U;if(t===null)return H.f|=ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;cn(e,t)}function cn(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 ln(e){U===null&&(H===null&&Fe(e),Pe()),Fn&&Ne(e)}function un(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function dn(e,t){var n=U;n!==null&&n.f&8192&&(e|=ee);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};N?.register_created_effect(r);var i=r;if(e&4)St===null?Et.ensure().schedule(r):St.push(r);else if(t!==null){try{tr(r)}catch(e){throw V(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|=ne))}if(i!==null&&(i.parent=n,n!==null&&un(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function fn(){return H!==null&&!Ln}function pn(e){let t=dn(8,null);return j(t,b),t.teardown=e,t}function mn(e){ln(`$effect`);var t=U.f;if(!H&&t&32&&k!==null&&!k.i){var n=k;(n.e??=[]).push(e)}else return hn(e)}function hn(e){return dn(4|ie,e)}function gn(e){Et.ensure();let t=dn(64|re,e);return()=>{V(t)}}function _n(e){Et.ensure();let t=dn(64|re,e);return(e={})=>new Promise(n=>{e.outro?On(t,()=>{V(t),n(void 0)}):(V(t),n(void 0))})}function vn(e){return dn(4,e)}function yn(e){return dn(se|re,e)}function bn(e,t=0){return dn(8|t,e)}function B(e,t=[],n=[],r=[]){rt(r,t,n,t=>{dn(8,()=>{e(...t.map(K))})})}function xn(e,t=0){return dn(16|t,e)}function Sn(e){return dn(32|re,e)}function Cn(e){var t=e.teardown;if(t!==null){let n=Fn,r=H;In(!0),Rn(null);try{t.call(null)}catch(t){cn(t,e.parent)}finally{In(n),Rn(r)}}}function wn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&nt(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:V(n,t),n=r}}function Tn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||V(t),t=n}}function V(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(En(e.nodes.start,e.nodes.end),n=!0),e.f|=w,wn(e,t&&!n),er(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Cn(e),e.f^=w,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&Dn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function En(e,t){for(;e!==null;){var n=e===t?null:$t(e);e.remove(),e=n}}function Dn(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 On(e,t,n=!0){var r=[];e.f|=256,kn(e,r,!0);var i=()=>{n&&V(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function kn(e,t,n){if(!(e.f&8192)){e.f^=ee;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;kn(i,t,o?n:!1)}i=a}}}function An(e){e.f&=-257,jn(e,!0)}function jn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ee,e.f&1024||(j(e,x),Et.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;jn(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 Mn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:$t(n);t.append(n),n=i}}var Nn=null,Pn=!1,Fn=!1;function In(e){Fn=e}var H=null,Ln=!1;function Rn(e){H=e}var U=null;function zn(e){U=e}var Bn=null;function Vn(e){H!==null&&(H.f&2097152||H.f&2)&&(Bn??=new Set).add(e)}var W=null,G=0,Hn=null;function Un(e){Hn=e}var Wn=1,Gn=0,Kn=Gn;function qn(e){Kn=e}function Jn(){return++Wn}function Yn(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(Yn(a)&&pt(a),a.wv>e.wv)return!0}t&512&&vt===null&&j(e,b)}return!1}function Xn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Bn!==null&&Bn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Xn(a,t,!1):t===a&&(n?j(a,x):a.f&1024&&j(a,S),Mt(a))}}function Zn(e){var t=W,n=G,r=Hn,i=H,a=Bn,o=k,s=Ln,c=Kn,l=e.f;W=null,G=0,Hn=null,H=l&96?null:e,Bn=null,Ue(e.ctx),Ln=!1,Kn=++Gn,e.ac!==null&&(nt(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=oe;var u=e.fn,d=u();e.f|=C;var f=Qn(e);if(qe()&&Hn!==null&&!Ln&&f!==null&&!(e.f&6146))for(var p=0;p<Hn.length;p++)Xn(Hn[p],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Gn;if(t!==null)for(let e of t)e.rv=Gn;Hn!==null&&(r===null?r=Hn:r.push(...Hn))}return e.f&8388608&&(e.f^=ce),d}catch(t){return Qn(e),sn(t)}finally{e.f^=oe,W=t,G=n,Hn=r,H=i,Bn=a,Ue(o),Ln=s,Kn=c}}function Qn(e){var t=e.deps,n=N?.is_fork;if(W!==null){var r;if(n||er(e,G),t!==null&&G>0)for(t.length=G+W.length,r=0;r<W.length;r++)t[G+r]=W[r];else e.deps=t=W;if(fn()&&e.f&512)for(r=G;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&G<t.length&&(er(e,G),t.length=G);return t}function $n(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&&(W===null||!s.call(W,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&Qe(c),c.ac!==null&&nt(()=>{c.ac.abort(ve),c.ac=null,j(c,x)}),mt(c),er(c,0)}}function er(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$n(e,n[r])}function tr(e){var t=e.f;if(!(t&16384)){j(e,b);var n=U,r=Pn;U=e,Pn=(t&96)==0;try{t&16777232?Tn(e):wn(e),Cn(e);var i=Zn(e);e.teardown=typeof i==`function`?i:null,e.wv=Wn}finally{Pn=r,U=n}}}function K(e){var t=(e.f&2)!=0;if(Nn?.add(e),H!==null&&!Ln&&!(U!==null&&U.f&16384)&&(Bn===null||!Bn.has(e))){var n=H.deps;if(H.f&2097152)e.rv<Gn&&(e.rv=Gn,W===null&&n!==null&&n[G]===e?G++:W===null?W=[e]:W.push(e));else{H.deps??=[],s.call(H.deps,e)||H.deps.push(e);var r=e.reactions;r===null?e.reactions=[H]:s.call(r,H)||r.push(H)}}if(Fn&&It.has(e))return It.get(e);if(t){var i=e;if(Fn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||rr(i))&&(a=ft(i)),It.set(i,a),a}var o=(i.f&512)==0&&!Ln&&H!==null&&(Pn||(H.f&512)!=0),c=(i.f&C)===0;Yn(i)&&(o&&(i.f|=512),pt(i)),o&&!c&&(ht(i),nr(i))}if(vt?.has(e))return vt.get(e);if(e.f&8388608)throw e.v;return e.v}function nr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(ht(t),nr(t))}function rr(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(It.has(t)||t.f&2&&rr(t))return!0;return!1}function ir(e){var t=Ln;try{return Ln=!0,e()}finally{Ln=t}}var ar=Symbol(`events`),or=new Set,sr=new Set;function cr(e,t,n){(t[ar]??={})[e]=n}function lr(e){for(var t=0;t<e.length;t++)or.add(e[t]);for(var n of sr)n(e)}var ur=null,dr=!1;function fr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ur=e,dr||(dr=!0,setTimeout(()=>{dr=!1,ur=null}));var o=0,s=ur===e&&e[ar];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ar]=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=H,f=U;Rn(null),zn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[ar]?.[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[ar]=t,delete e.currentTarget,Rn(d),zn(f)}}}var pr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function mr(e){return pr?.createHTML(e)??e}function hr(e){var t=an(`template`);return t.innerHTML=mr(e.replaceAll(`<!>`,`<!---->`)),t.content}function gr(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return gr(E,null),E;i===void 0&&(i=hr(a?e:`<!>`+e),n||(i=L(i)));var t=r||Jt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;gr(o,s)}else gr(t,t);return t}}function _r(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return gr(E,null),E;if(!o){var e=L(hr(a));if(i)for(o=document.createDocumentFragment();L(e);)o.appendChild(L(e));else o=L(e)}var t=o.cloneNode(!0);if(i){var n=L(t),r=t.lastChild;gr(n,r)}else gr(t,t);return t}}function vr(e,t){return _r(e,t,`svg`)}function yr(){if(T)return gr(E,null),E;var e=document.createDocumentFragment(),t=document.createComment(``),n=Qt();return e.append(t,n),gr(t,n),e}function J(e,t){if(T){var n=U;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),we();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 br=[`touchstart`,`touchmove`];function xr(e){return br.includes(e)}function Sr(e){let t=0,n=Rt(0),r;return()=>{fn()&&(K(n),bn(()=>(t===0&&(r=ir(()=>e(()=>Wt(n)))),t+=1,()=>{Ye(()=>{--t,t===0&&(r?.(),r=void 0,Wt(n))})})))}}var Cr=ne|re;function wr(e,t,n,r){new Tr(e,t,n,r)}var Tr=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=Sr(()=>(this.#m=Rt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=U;t.b=this,t.f|=128,n(e)},this.parent=U.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=xn(()=>{if(T){let e=this.#t;we();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()},Cr),T&&(this.#e=E)}#g(){try{this.#a=Sn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ye(r),t&&(this.#s=Sn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Se();return}t=!0,n&&He(),this.#s!==null&&On(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){cn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Sn(()=>e(this.#e)),Ye(()=>{var e=this.#c=document.createDocumentFragment(),t=Qt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return Sn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){cn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(N);return}this.#u===0&&(this.#e.before(e),this.#c=null,On(this.#o,()=>{this.#o=null}),this.#x(N))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Sn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Mn(this.#a,e);let t=this.#n.pending;this.#o=Sn(()=>t(this.#e))}else this.#x(N)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){$e(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=U,n=H,r=k;zn(this.#i),Rn(this.#i),Ue(this.#i.ctx);try{return Et.ensure(),e()}finally{zn(t),Rn(n),Ue(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&&On(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,Ye(()=>{this.#d=!1,this.#m&&Ht(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),K(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;N?.is_fork?(this.#a&&N.skip_effect(this.#a),this.#o&&N.skip_effect(this.#o),this.#s&&N.skip_effect(this.#s),N.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(V(this.#a),null),this.#o&&=(V(this.#o),null),this.#s&&=(V(this.#s),null),T&&(D(this.#t),Te(),D(Ee()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return Sn(()=>{var r=U;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return cn(e,this.#i.parent),null}}))};Ye(()=>{var t;try{t=this.transform_error(e)}catch(e){cn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>cn(e,this.#i&&this.#i.parent)):n(t)})}};function Er(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function Dr(e,t){return Ar(e,t)}function Or(t,n){Zt(),n.intro=n.intro??!1;let r=n.target,i=T,a=E;try{for(var o=L(r);o&&(o.nodeType!==8||o.data!==`[`);)o=$t(o);if(!o)throw e;Ce(!0),D(o);let i=Ar(t,{...n,anchor:o});return Ce(!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&&Le(),Zt(),nn(r),Ce(!1),Dr(t,n)}finally{Ce(i),D(a)}}var kr=new Map;function Ar(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){Zt();var u=void 0,d=_n(()=>{var s=r??n.appendChild(Qt());wr(s,{pending:()=>{}},n=>{We({});var r=k;if(o&&(r.c=o),a&&(i.$$events=a),T&&gr(n,null),u=t(n,i)||Ke(),T&&(U.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw xe(),e;Ge()},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=xr(r);for(let e of[n,document]){var a=kr.get(e);a===void 0&&(a=new Map,kr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,fr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(or)),sr.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=kr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,fr),t.delete(e),t.size===0&&kr.delete(r)):t.set(e,i)}sr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return jr.set(u,d),u}var jr=new WeakMap;function Mr(e,t){let n=jr.get(e);return n?(jr.delete(e),n(t)):Promise.resolve()}var Nr=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)An(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(An(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&&(V(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();Mn(r,t),t.append(Qt()),this.#n.set(e,{effect:r,fragment:t})}else V(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),On(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)||(V(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=rn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Qt();i.append(a),this.#n.set(e,{effect:Sn(()=>t(a)),fragment:i})}else this.#t.set(e,Sn(()=>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 Y(e,t,n=!1){var r;T&&(r=E,we());var i=new Nr(e),a=n?ne:0;function o(e,t){if(T){var n=De(r);if(e!==parseInt(n.substring(1))){var a=Ee();D(a),i.anchor=a,Ce(!1),i.ensure(e,t),Ce(!0);return}}i.ensure(e,t)}xn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Pr(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];On(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Fr(e,c(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var l=r.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;nn(d),d.append(u),e.items.clear()}Fr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Fr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ae,Mn(a,document.createDocumentFragment())):V(t[i],n)}}var Ir;function Lr(e,t,n,r,i,o=null){var s=e,l=new Map;if(t&4){var u=e;s=T?D(L(u)):u.appendChild(Qt())}T&&we();var d=null,f=ut(()=>{var e=n();return a(e)?e:e==null?[]:c(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,zr(v,p,s,t,r),d!==null&&(p.length===0?d.f&33554432?(d.f^=ae,Vr(d,null,s)):An(d):On(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:xn(()=>{p=K(f);var e=p.length;let a=!1;T&&De(s)===`[!`!=(e===0)&&(s=Ee(),D(s),Ce(!1),a=!0);for(var c=new Set,u=N,v=rn(),y=0;y<e;y+=1){T&&E.nodeType===8&&E.data===`]`&&(s=E,a=!0,Ce(!1));var b=p[y],x=r(b,y),S=h?null:l.get(x);S?(S.v&&Ht(S.v,b),S.i&&Ht(S.i,y),v&&u.unskip_effect(S.e)):(S=Br(l,h?s:Ir??=Qt(),b,x,y,i,t,n),h||(S.e.f|=ae),l.set(x,S)),c.add(x)}if(e===0&&o&&!d&&(h?d=Sn(()=>o(s)):(d=Sn(()=>o(Ir??=Qt())),d.f|=ae)),e>c.size&&Me(``,``,``),T&&e>0&&D(Ee()),!h)if(m.set(u,c),v){for(let[e,t]of l)c.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);a&&Ce(!0),K(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,T&&(s=E)}function Rr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function zr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,l=Rr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(An(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ae,_===l)Vr(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Hr(e,d,_),Hr(e,_,y),Vr(_,y,n),d=_,p=[],m=[],l=Rr(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Vr(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Hr(e,S.prev,ee.next),Hr(e,d,S),Hr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Vr(_,l,n),Hr(e,_.prev,_.next),Hr(e,_,d===null?e.effect.first:d.next),Hr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Rr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Rr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Fr(e,c(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var te=[];if(u!==void 0)for(_ of u)_.f&8192||te.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&te.push(l),l=Rr(l.next);var C=te.length;if(C>0){var w=r&4&&o===0?n:null;if(a){for(v=0;v<C;v+=1)te[v].nodes?.a?.measure();for(v=0;v<C;v+=1)te[v].nodes?.a?.fix()}Pr(e,te,w)}}a&&Ye(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Br(e,t,n,r,i,a,o,s){var c=o&1?o&16?Rt(n):zt(n,!1,!1):null,l=o&2?Rt(i):null;return{v:c,i:l,e:Sn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Vr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=$t(r);if(a.before(r),r===i)return;r=o}}function Hr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ur(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;T&&(l=D(L(d)))}B(()=>{var t=U;if(u===(u=n()??``)){T&&we();return}if(a&&!T){t.nodes=null,d.innerHTML=u,u!==``&&gr(L(d),d.lastChild);return}if(t.nodes!==null&&(En(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(T){for(var c=E.data,f=we(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=$t(f);if(f===null)throw xe(),e;gr(E,p),l=D(f);return}var m=an(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(gr(L(h),h.lastChild),o||s)for(;L(h);)l.before(L(h));else l.before(h)}})}function Wr(e,t){vn(()=>{e=U?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=an(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var Gr=[...`
3
+ \r\f\xA0\v`];function Kr(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||Gr.includes(r[o-1]))&&(s===r.length||Gr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function qr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Jr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Yr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Jr)),i&&c.push(...Object.keys(i).map(Jr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Jr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=qr(r)),i&&(n+=qr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Xr(e,t,n,r,i,a){var o=e[me];if(T||o!==n||o===void 0){var s=Kr(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}function Zr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Qr(e,t,n,r){var i=e[he];if(T||i!==t){var a=Yr(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?(Zr(e,n?.[0],r[0]),Zr(e,n?.[1],r[1],`important`)):Zr(e,n,r));return r}var $r=Symbol(`is custom element`),ei=Symbol(`is html`),ti=ye?`link`:`LINK`,ni=ye?`progress`:`PROGRESS`;function ri(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;X(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;X(e,`checked`,null),e.checked=r}}};e[_e]=n,Ye(n),tt()}}function ii(e,t){var n=oi(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ni)||(e.value=t??``)}function ai(e,t){var n=oi(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function X(e,t,n,r){var i=oi(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ti)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ci(e).has(t)?e[t]=n:e.setAttribute(t,n))}function oi(e){return e[pe]??={[$r]:e.nodeName.includes(`-`),[ei]:e.namespaceURI===n}}var si=new Map;function ci(e){var t=e.getAttribute(`is`)||e.nodeName,n=si.get(t);if(n)return n;si.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 li(e,t){return e===t||e?.[le]===t}function ui(e=Ke(),t,n,r){var i=k.r,a=U;return vn(()=>{var o,s;return bn(()=>{o=s,s=r?.()||[],ir(()=>{li(n(...s),e)||(t(e,...s),o&&li(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&&li(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var di=!1;function fi(e){var t=di;try{return di=!1,[e(),di]}finally{di=t}}function Z(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??=st(r),K(l)):(c&&(c=!1,s=o?ir(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]=fi(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Re(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?st:ut)(()=>(v=!1,g()));a&&K(y);var b=U;return(function(e,t){if(arguments.length>0){let n=t?K(y):i&&a?Kt(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return Fn&&v||b.f&16384?y.v:K(y)})}function pi(e){return new mi(e)}var mi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=zt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return K(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===de?!0:(K(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Or:Dr)(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)&&P(),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=()=>{Mr(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()}},hi;typeof HTMLElement==`function`&&(hi=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=an(`slot`);e!=="default"&&(n.name=e),J(t,n)}}let t={},n=_i(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]=gi(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=pi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=gn(()=>{bn(()=>{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=gi(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]=gi(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 gi(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 _i(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function vi(e,t,n,r,i,a){let o=class extends hi{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=gi(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 yi(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var bi={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].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},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.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{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`,redo:`Redo`,reset:`Reset`},mathInline:{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.`},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}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},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`,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`}},xi={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`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{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`},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`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,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`}},graphing:{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`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{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.`},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}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},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`,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`}},Q=e=>typeof e==`string`,Si=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ci=e=>e==null?``:``+e,wi=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Ti=/###/g,Ei=e=>e&&e.indexOf(`###`)>-1?e.replace(Ti,`.`):e,Di=e=>!e||Q(e),Oi=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Di(e))return{};let t=Ei(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Di(e)?{}:{obj:e,k:Ei(r[i])}},ki=(e,t,n)=>{let{obj:r,k:i}=Oi(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=Oi(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Oi(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Ai=(e,t,n,r)=>{let{obj:i,k:a}=Oi(e,t,Object);i[a]=i[a]||[],i[a].push(n)},ji=(e,t)=>{let{obj:n,k:r}=Oi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Mi=(e,t,n)=>{let r=ji(e,n);return r===void 0?ji(t,n):r},Ni=(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]):Ni(e[r],t[r],n):e[r]=t[r]);return e},Pi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Fi={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Ii=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>Fi[e]):e,Li=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}},Ri=[` `,`,`,`?`,`!`,`;`],zi=new Li(20),Bi=(e,t,n)=>{t||=``,n||=``;let r=Ri.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=zi.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},Vi=(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},Hi=e=>e?.replace(/_/g,`-`),Ui={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)}},Wi=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ui,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)}},Gi=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])})}},Ki=class extends Gi{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=ji(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:Vi(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),ki(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=ji(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ni(s,n,i):s={...s,...n},ki(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}},qi={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}},Ji=Symbol(`i18next/PATH_KEY`);function Yi(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ji?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Xi(e,t){let{[Ji]:n}=e(Yi()),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 Zi={},Qi=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,$i=class e extends Gi{constructor(e,t={}){super(),wi([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Wi.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=Qi(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&&!Bi(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=Xi(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Xi(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),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,ee=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,te=b&&!i.ordinal&&i.count===0,C=te&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${ee}`]||i.defaultValue,w=m;y&&!m&&x&&(w=C);let ne=Qi(w),re=Object.prototype.toString.apply(w);if(y&&w&&ne&&_.indexOf(re)<0&&!(Q(v)&&Array.isArray(w))){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,w,{...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(w),t=e?[]:{},n=e?g:h;for(let e in w)if(Object.prototype.hasOwnProperty.call(w,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Qi(C)?C[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=w[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=C),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&C!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?C: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);te&&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}`]||C)})}):n(e,s,C))}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=qi.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`?Xi(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,!Zi[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Zi[`${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}},ea=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wi.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Hi(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=Hi(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}},ta={zero:0,one:1,two:2,few:3,many:4,other:5},na={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ra=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Wi.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Hi(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!`),na;if(!e.match(/-|_/))return na;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)=>ta[e]-ta[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))}},ia=(e,t,n,r=`.`,i=!0)=>{let a=Mi(e,t,n);return!a&&i&&Q(n)&&(a=Vi(e,n,r),a===void 0&&(a=Vi(t,n,r))),a},aa=e=>e.replace(/\$/g,`$$$$`),oa=class{constructor(e={}){this.logger=Wi.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?Ii:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Pi(i):a||`{{`,this.suffix=o?Pi(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Pi(d):f||Pi(`$t(`),this.nestingSuffix=p?Pi(p):m||Pi(`)`),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=ia(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(ia(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=>aa(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?aa(this.escape(e)):aa(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=Ci(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(`${Pi(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=Ci(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}},sa=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}},ca=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(Hi(r),i),t[o]=s),s(n)}},la=e=>(t,n,r)=>e(Hi(n),r)(t),ua=class{constructor(e={}){this.logger=Wi.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ca:la;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()]=ca(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}=sa(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)}},da=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},fa=class extends Gi{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Wi.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=>{Ai(n.loaded,[i],a),da(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)}}},pa=()=>({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}),ma=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),ha=()=>{},ga=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},_a=`__i18next_supportNoticeShown`,va=()=>!!(typeof globalThis<`u`&&globalThis[_a]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),ya=()=>{typeof globalThis<`u`&&(globalThis[_a]=!0)},ba=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 Gi{constructor(e={},t){if(super(),this.options=ma(e),this.services={},this.logger=Wi,this.modules={external:[]},ga(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=pa();this.options={...n,...this.options,...ma(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&&!ba(this)&&!va()&&(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 💙`),ya());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Wi.init(r(this.modules.logger),this.options):Wi.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ua;let t=new ea(this.options);this.store=new Ki(this.options.resources,this.options);let i=this.services;i.logger=Wi,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new ra(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 oa(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new fa(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 $i(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||=ha,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=Si(),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=ha){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=Si();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||=ha,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`&&qi.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=Si();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=Xi(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Xi(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Xi(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=Si();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=Si();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 ea(pa());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=ha){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 Ki(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={...pa().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new oa(n)}return a.translator=new $i(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:bi,es:xi}});var{translator:xa}={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 Sa(e,t,n={}){return xa.t(`translation:mcPopulatedBlank:${e}`,{lng:t,...n,interpolation:{escapeValue:!1}})}function Ca(e,t){return xa.t(`common:${e}`,{lng:t})}var wa=q(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),Ta=q(`<button class="autoplay-enable pie-audio-autoplay-enable svelte-ypdwb3" type="button"> </button>`),Ea=q(`<audio controls="" class="audio-controls pie-audio-player svelte-ypdwb3" preload="metadata"><track kind="captions"/></audio> <!>`,1),Da=q(`<p class="audio-error pie-audio-error svelte-ypdwb3" role="alert"> </p>`),Oa=q(`<div class="audio-container pie-audio-container svelte-ypdwb3"><!></div>`),ka={hash:`svelte-ypdwb3`,code:`.audio-container.svelte-ypdwb3 {margin-bottom:1rem;}.audio-controls.svelte-ypdwb3 {display:block;width:100%;max-width:28rem;}.autoplay-enable.svelte-ypdwb3 {margin-top:0.5rem;padding:0;border:0;background:transparent;font:inherit;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:inherit;text-decoration-line:underline;}.audio-error.svelte-ypdwb3 {margin:0;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:var(--pie-incorrect-icon, #c10007);}.listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Aa(e,t){We(t,!0),Wr(e,ka);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=Z(t,`hasAudio`,7,!1),i=Z(t,`audioUrl`,7),a=Z(t,`useFeatureButtonAudio`,7,!1),o=Z(t,`autoplayEnabled`,7,!1),s=Z(t,`featureAudioSkin`,7),c=Z(t,`language`,7),l=Z(t,`onaudiostarted`,7),u=Z(t,`onaudioended`,7),d=F(null),f=F(null),p=F(null),m=F(Kt(n.IDLE)),h=M(()=>yi({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),g=M(()=>K(m)===n.PLAYING),_=M(()=>K(m)===n.BLOCKED),v=M(()=>K(h)===`error`?Sa(`audioResourceUnavailable`,c()):``);mn(()=>{i(),I(m,n.IDLE,!0)});function y(){K(h)!==`none`&&K(h)!==`error`&&K(d)&&K(d).play().catch(()=>{})}function b(){K(h)!==`none`&&K(h)!==`error`&&K(d)&&K(d).play().finally(()=>{K(m)===n.BLOCKED&&I(m,n.PAUSED,!0)})}function x(e,t,n){mn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>K(d),`playing`,()=>{I(m,n.PLAYING,!0),l()?.()}),x(()=>K(d),`ended`,()=>{I(m,n.PAUSED,!0),u()?.()}),x(()=>K(f),`click`,()=>y()),x(()=>K(p),`click`,()=>b()),mn(()=>{!o()||K(h)===`none`||K(h)===`error`||K(m)===n.IDLE&&K(d)&&i()&&(I(m,n.PAUSED,!0),K(d).play().catch(()=>{I(m,n.BLOCKED,!0)}))});var S={get hasAudio(){return r()},set hasAudio(e=!1){r(e),P()},get audioUrl(){return i()},set audioUrl(e){i(e),P()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),P()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),P()},get featureAudioSkin(){return s()},set featureAudioSkin(e){s(e),P()},get language(){return c()},set language(e){c(e),P()},get onaudiostarted(){return l()},set onaudiostarted(e){l(e),P()},get onaudioended(){return u()},set onaudioended(e){u(e),P()}},ee=yr(),te=en(ee),C=e=>{var t=Oa(),n=R(t),r=e=>{var t=wa(),n=en(t);ui(n,e=>I(d,e),()=>K(d));var r=z(n,2),a=R(r),o=z(a,2);O(r),ui(r,e=>I(f,e),()=>K(f)),B((e,t,c)=>{X(n,`src`,i()),X(r,`aria-label`,e),Xr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(g)?``:`listen-active`}`,`svelte-ypdwb3`),X(a,`src`,s().silentUrl),X(a,`alt`,t),Xr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(g)?`listen-active`:``}`,`svelte-ypdwb3`),X(o,`src`,s().playingUrl),X(o,`alt`,c)},[()=>Sa(`listen`,c()),()=>Sa(`listenSilentAlt`,c()),()=>Sa(`listenPlayingAlt`,c())]),J(e,t)},a=e=>{var t=Ea(),n=en(t);ui(n,e=>I(d,e),()=>K(d));var r=z(n,2),a=e=>{var t=Ta(),n=tn(t,!0);ui(t,e=>I(p,e),()=>K(p)),B(e=>Er(n,e),[()=>Sa(`clickToEnableAutoplay`,c())]),J(e,t)};Y(r,e=>{K(_)&&e(a)}),B(()=>X(n,`src`,i())),J(e,t)},o=e=>{var t=Da(),n=tn(t,!0);B(()=>Er(n,K(v))),J(e,t)};Y(n,e=>{K(h)===`feature-button`?e(r):K(h)===`controls`?e(a,1):K(h)===`error`&&e(o,2)}),O(t),J(e,t)};return Y(te,e=>{K(h)!==`none`&&e(C)}),J(e,ee),Ge(S)}vi(Aa,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},language:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var ja=q(`<img class="cloze-marker-image pie-blank-image svelte-d9l5tb" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Ma=q(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Na=q(`<span class="cloze-marker-empty svelte-d9l5tb"><span aria-hidden="true">&nbsp;</span> <span class="sr-only svelte-d9l5tb"> </span></span>`),Pa=q(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Fa={hash:`svelte-d9l5tb`,code:`
4
4
  /* The underline width comes from the inline style (layoutLimits); the colour
5
5
  follows the text. */.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;padding-inline:0.5rem;border-bottom:2px solid currentColor;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--mpb-focus-ring, #1565c0);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-image.svelte-d9l5tb {object-fit:contain;}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}
6
6
 
7
7
  /* Same 150x150 content-element constraint as ChoiceRow.svelte's .choice-html
8
8
  img — the selected choice's raw labelHtml can carry an embedded <img> here
9
- too, regardless of customType. See CONTOOL-3159. */.cloze-marker-value.svelte-d9l5tb img {width:150px;height:150px;}.sr-only.svelte-d9l5tb {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Ia(e,t){We(t,!0),Kr(e,Fa);let n=Z(t,`choiceMode`,7,`text`),r=Z(t,`displayChoice`,7,void 0),i=Z(t,`displayChoiceLabelHtml`,7,``),a=Z(t,`isStandalone`,7,!1),o=Z(t,`blankWidth`,7),s=Z(t,`blankBorderWidth`,7),c=Z(t,`ariaLabel`,7),l=Z(t,`language`,7);var u={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),P()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),P()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),P()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),P()},get blankWidth(){return o()},set blankWidth(e){o(e),P()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),P()},get ariaLabel(){return c()},set ariaLabel(e){c(e),P()},get language(){return l()},set language(e){l(e),P()}},d=Pa(),f=R(d),p=e=>{var t=ja();B(e=>{X(t,`src`,r().imageUrl),X(t,`alt`,e)},[()=>r().imageAlt||Sa(`selectedAnswerImage`,l())]),J(e,t)},m=e=>{var t=Ma();Gr(t,i,!0),k(t),J(e,t)},h=e=>{var t=Na(),n=rn(z(R(t),2),!0);k(t),B(e=>Or(n,e),[()=>Sa(`emptyBlank`,l())]),J(e,t)};return Y(f,e=>{n()===`image`&&r()?.imageUrl?e(p):i()?e(m,1):e(h,-1)}),k(d),B(()=>{Qr(d,1,`cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),ei(d,`width:${o()};border-bottom-width:${s()};`),X(d,`aria-label`,c())}),J(e,d),Ge(u)}vi(Ia,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{},language:{}},[],[],{mode:`open`});var La=q(`<img class="choice-image pie-choice-image svelte-8xu1pt" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Ra=q(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),za=q(`<label class="choice-tile pie-choice-tile svelte-8xu1pt"><span class="choice-tile-content pie-choice-tile-content svelte-8xu1pt"><!></span> <input type="radio" class="choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt"/></label>`),Ba=q(`<img class="choice-image pie-choice-image svelte-8xu1pt" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Va=q(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="choice-label-wrap pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Ha=q(`<span aria-hidden="true"> </span>`),Ua=q(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Wa={hash:`svelte-8xu1pt`,code:`.choice-row.svelte-8xu1pt {display:flex;align-items:flex-start;}.choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;cursor:pointer;text-align:center;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-image.svelte-8xu1pt {display:block;object-fit:contain;}.choice-label-wrap.svelte-8xu1pt {flex:1 1 0%;cursor:pointer;}
9
+ too, regardless of customType. See CONTOOL-3159. */.cloze-marker-value.svelte-d9l5tb img {width:150px;height:150px;}.sr-only.svelte-d9l5tb {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Ia(e,t){We(t,!0),Wr(e,Fa);let n=Z(t,`choiceMode`,7,`text`),r=Z(t,`displayChoice`,7,void 0),i=Z(t,`displayChoiceLabelHtml`,7,``),a=Z(t,`isStandalone`,7,!1),o=Z(t,`blankWidth`,7),s=Z(t,`blankBorderWidth`,7),c=Z(t,`ariaLabel`,7),l=Z(t,`language`,7);var u={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),P()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),P()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),P()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),P()},get blankWidth(){return o()},set blankWidth(e){o(e),P()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),P()},get ariaLabel(){return c()},set ariaLabel(e){c(e),P()},get language(){return l()},set language(e){l(e),P()}},d=Pa(),f=R(d),p=e=>{var t=ja();B(e=>{X(t,`src`,r().imageUrl),X(t,`alt`,e)},[()=>r().imageAlt||Sa(`selectedAnswerImage`,l())]),J(e,t)},m=e=>{var t=Ma();Ur(t,i,!0),O(t),J(e,t)},h=e=>{var t=Na(),n=tn(z(R(t),2),!0);O(t),B(e=>Er(n,e),[()=>Sa(`emptyBlank`,l())]),J(e,t)};return Y(f,e=>{n()===`image`&&r()?.imageUrl?e(p):i()?e(m,1):e(h,-1)}),O(d),B(()=>{Xr(d,1,`cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),Qr(d,`width:${o()};border-bottom-width:${s()};`),X(d,`aria-label`,c())}),J(e,d),Ge(u)}vi(Ia,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{},language:{}},[],[],{mode:`open`});var La=q(`<img class="choice-image pie-choice-image svelte-8xu1pt" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Ra=q(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),za=q(`<label class="choice-tile pie-choice-tile svelte-8xu1pt"><span class="choice-tile-content pie-choice-tile-content svelte-8xu1pt"><!></span> <input type="radio" class="choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt"/></label>`),Ba=q(`<img class="choice-image pie-choice-image svelte-8xu1pt" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Va=q(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="choice-label-wrap pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Ha=q(`<span aria-hidden="true"> </span>`),Ua=q(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Wa={hash:`svelte-8xu1pt`,code:`.choice-row.svelte-8xu1pt {display:flex;align-items:flex-start;}.choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;cursor:pointer;text-align:center;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-image.svelte-8xu1pt {display:block;object-fit:contain;}.choice-label-wrap.svelte-8xu1pt {flex:1 1 0%;cursor:pointer;}
10
10
 
11
11
  /* Every background painted here carries its own text colour: a variant that
12
12
  pins a light surface (the CQT sheets' #fcfcd3) would otherwise sit under
@@ -21,7 +21,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
21
21
  customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */.choice-html.svelte-8xu1pt img {width:150px;height:150px;}
22
22
 
23
23
  /* Only the top margin is spaced; the browser's own radio side margins would
24
- otherwise offset the control from its label (the demo app's preflight zeroed them). */.choice-radio-bottom.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;}`};function Ga(e,t){We(t,!0),Kr(e,Wa);let n=Z(t,`choice`,7),r=Z(t,`choiceMode`,7,`text`),i=Z(t,`isHorizontal`,7,!1),a=Z(t,`isSelected`,7,!1),o=Z(t,`isDisabled`,7,!1),s=Z(t,`correctness`,7,void 0),c=Z(t,`isEvaluateMode`,7,!1),l=Z(t,`instanceId`,7),u=Z(t,`radioGroupName`,7),d=Z(t,`language`,7);var f={get choice(){return n()},set choice(e){n(e),P()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),P()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),P()},get isSelected(){return a()},set isSelected(e=!1){a(e),P()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),P()},get correctness(){return s()},set correctness(e=void 0){s(e),P()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),P()},get instanceId(){return l()},set instanceId(e){l(e),P()},get radioGroupName(){return u()},set radioGroupName(e){u(e),P()},get language(){return d()},set language(e){d(e),P()}},p=Ua(),m=R(p),h=e=>{var t=za(),i=R(t),s=R(i),c=e=>{var t=La();B(e=>{X(t,`src`,n().imageUrl),X(t,`alt`,e)},[()=>n().imageAlt||Sa(`choiceImage`,d(),{id:n().id})]),J(e,t)},f=e=>{var t=Ra();Gr(t,()=>n().labelHtml||``,!0),k(t),J(e,t)};Y(s,e=>{r()===`image`&&n().imageUrl?e(c):e(f,-1)}),k(i);var p=z(i,2);ai(p),k(t),B(()=>{X(t,`for`,`${l()}-opt-${n().id}`),X(p,`name`,u()),X(p,`id`,`${l()}-opt-${n().id}`),oi(p,n().id),si(p,a()),p.disabled=o()}),J(e,t)},g=e=>{var t=Va(),i=nn(t);ai(i);var s=z(i,2),c=R(s),f=e=>{var t=Ba();B(e=>{X(t,`src`,n().imageUrl),X(t,`alt`,e)},[()=>n().imageAlt||Sa(`choiceImage`,d(),{id:n().id})]),J(e,t)},p=e=>{var t=Ra();Gr(t,()=>n().labelHtml||``,!0),k(t),J(e,t)};Y(c,e=>{r()===`image`&&n().imageUrl?e(f):e(p,-1)}),k(s),B(()=>{X(i,`name`,u()),X(i,`id`,`${l()}-opt-${n().id}`),oi(i,n().id),si(i,a()),i.disabled=o(),X(s,`for`,`${l()}-opt-${n().id}`)}),J(e,t)};Y(m,e=>{i()?e(h):e(g,-1)});var _=z(m,2),v=e=>{var t=Ha(),n=rn(t,!0);B(()=>{Qr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Or(n,s()===`correct`?`✓`:`✕`)}),J(e,t)};return Y(_,e=>{c()&&s()&&e(v)}),k(p),B(()=>Qr(p,1,`choice-row pie-choice ${i()?`choice-row-horizontal pie-choice-horizontal`:``} ${a()?`is-selected pie-choice-selected`:``} ${s()?`choice-${s()} pie-choice-${s()}`:``}`,`svelte-8xu1pt`)),J(e,p),Ge(f)}vi(Ga,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{},language:{}},[],[],{mode:`open`});var Ka=q(`<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>`),qa={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(--mpb-focus-ring, var(--pie-focus-outline, #1565c0));outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function Ja(e,t){We(t,!0),Kr(e,qa);let n=Z(t,`html`,7),r=Z(t,`language`,7),i=F(!1),a=`mpb-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),P()},get language(){return r()},set language(e){r(e),P()}},s=Ka(),c=R(s),l=rn(c,!0),u=z(c,2);return Gr(u,n,!0),k(u),k(s),B(e=>{X(c,`aria-expanded`,K(i)),X(c,`aria-controls`,a),Or(l,e),X(u,`id`,a),X(u,`hidden`,!K(i))},[()=>Ca(K(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),ur(`click`,c,()=>I(i,!K(i))),J(e,s),Ge(o)}dr([`click`]),vi(Ja,{html:{},language:{}},[],[],{mode:`open`});function Ya(e){let t=new Map,{isEvaluateMode:n,correctChoiceId:r,selectedId:i,showCorrectAnswer:a}=e;return!n||!r?t:a?(t.set(r,`correct`),t):i?i===r?(t.set(r,`correct`),t):(t.set(i,`incorrect`),t.set(r,`incorrect`),t):(t.set(r,`incorrect`),t)}var Xa=`{{blank}}`,Za=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Qa(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/&nbsp;/g,` `).trim()===Xa:!1,l=r===`horizontal`||r===`vertical`?r:s||c?`horizontal`:`vertical`;return{isAudioOnlyMode:s,isBlankOnlyTemplate:c,choiceLayout:l,isHorizontalChoices:l===`horizontal`,hasInlineSentenceAudioLayout:i===`inline_sentence`&&a,useFeatureButtonAudio:typeof o==`boolean`?o:a&&Za.has(i)}}var $a={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,choiceImageMaxHeightRem:9.375,choiceImageMaxWidthRem:9.375,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,stimulusGridColumnGapRem:2,stimulusGridRowGapRem:.7,stimulusSentenceMarginTopRem:.2,stimulusChoicesMarginTopRem:.9,tokenGridColumnGapRem:1.5,tokenGridRowGapRem:.8,tokenTemplateMarginTopRem:.6,tokenInlineTokenGapRem:.35,tokenChoicesMarginTopRem:.2,inlineGridColumnGapRem:1.5,inlineGridRowGapRem:.65,inlineTemplateMarginTopRem:.45,inlineChoicesMarginTopRem:.25},eo={blankStandaloneWidthRem:{varName:`--mpb-blank-standalone-width`,unit:`rem`},blankWideWidthRem:{varName:`--mpb-blank-wide-width`,unit:`rem`},blankUnderlineWidthPx:{varName:`--mpb-blank-underline-width`,unit:`px`},blankUnderlineWideWidthPx:{varName:`--mpb-blank-underline-wide-width`,unit:`px`},horizontalChoiceWidthPx:{varName:`--mpb-choice-width-px`,unit:`px`},horizontalChoiceWidthVw:{varName:`--mpb-choice-width-vw`,unit:`vw`},horizontalChoiceTileMinHeightRem:{varName:`--mpb-choice-tile-min-height`,unit:`rem`},horizontalChoiceContentMinHeightRem:{varName:`--mpb-choice-content-min-height`,unit:`rem`},choiceImageMaxHeightRem:{varName:`--mpb-choice-image-max-height`,unit:`rem`},choiceImageMaxWidthRem:{varName:`--mpb-choice-image-max-width`,unit:`rem`},choiceGroupGapRem:{varName:`--mpb-choice-group-gap`,unit:`rem`},choiceRowGapRem:{varName:`--mpb-choice-row-gap`,unit:`rem`},horizontalChoiceRadioTopMarginRem:{varName:`--mpb-horizontal-choice-radio-top-margin`,unit:`rem`},toggleButtonGapRem:{varName:`--mpb-toggle-button-gap`,unit:`rem`},listenButtonSizePx:{varName:`--mpb-listen-button-size`,unit:`px`},audioBlankTemplateMarginTopRem:{varName:`--mpb-audio-blank-template-margin-top`,unit:`rem`},audioBlankTemplateMarginBottomRem:{varName:`--mpb-audio-blank-template-margin-bottom`,unit:`rem`},audioInstructionsMaxWidthPx:{varName:`--mpb-audio-instructions-max-width`,unit:`px`},stimulusMinColumnPx:{varName:`--mpb-stimulus-min-column`,unit:`px`},textMinColumnPx:{varName:`--mpb-text-min-column`,unit:`px`},stimulusGridColumnGapRem:{varName:`--mpb-stimulus-grid-column-gap`,unit:`rem`},stimulusGridRowGapRem:{varName:`--mpb-stimulus-grid-row-gap`,unit:`rem`},stimulusSentenceMarginTopRem:{varName:`--mpb-stimulus-sentence-margin-top`,unit:`rem`},stimulusChoicesMarginTopRem:{varName:`--mpb-stimulus-choices-margin-top`,unit:`rem`},tokenGridColumnGapRem:{varName:`--mpb-token-grid-column-gap`,unit:`rem`},tokenGridRowGapRem:{varName:`--mpb-token-grid-row-gap`,unit:`rem`},tokenTemplateMarginTopRem:{varName:`--mpb-token-template-margin-top`,unit:`rem`},tokenInlineTokenGapRem:{varName:`--mpb-token-inline-token-gap`,unit:`rem`},tokenChoicesMarginTopRem:{varName:`--mpb-token-choices-margin-top`,unit:`rem`},inlineGridColumnGapRem:{varName:`--mpb-inline-grid-column-gap`,unit:`rem`},inlineGridRowGapRem:{varName:`--mpb-inline-grid-row-gap`,unit:`rem`},inlineTemplateMarginTopRem:{varName:`--mpb-inline-template-margin-top`,unit:`rem`},inlineChoicesMarginTopRem:{varName:`--mpb-inline-choices-margin-top`,unit:`rem`}},to={audio_blank_only:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6,horizontalChoiceTileMinHeightRem:11.25,horizontalChoiceContentMinHeightRem:9.375,choiceGroupGapRem:1,audioBlankTemplateMarginBottomRem:1.875},stimulus_image_blank:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6},token_sequence:{blankStandaloneWidthRem:7,blankUnderlineWideWidthPx:6}};function no(e){let{layoutProfile:t,isBlankOnlyTemplate:n}=e,r=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},i=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},a=i[t]&&typeof i[t]==`object`?i[t]:{},o={...to[t]??{},...a},s={...$a,...r,...o},c=[`audio_blank_only`,`stimulus_image_blank`],l=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],u=c.includes(t)?`${s.blankWideWidthRem}rem`:n?`${s.blankStandaloneWidthRem}rem`:`auto`,d=l.includes(t)?`${s.blankUnderlineWideWidthPx}px`:`${s.blankUnderlineWidthPx}px`;return{rootStyle:Object.keys(eo).map(e=>`${eo[e].varName}:${s[e]}${eo[e].unit}`).join(`;`),blankWidth:u,blankBorderWidth:d,legendMaxChars:s.legendMaxChars}}var ro={default:{silentUrl:`https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg`},es:{silentUrl:`https://assets.learnosity.com/organisations/844/27a9d5b5-d873-4bd5-b9ba-22748782d8ba.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg`}};function io(e){let t=String(e.locale||``).toLowerCase(),n=t.slice(0,2),r=e.audioButtonSkinsByLocale&&typeof e.audioButtonSkinsByLocale==`object`?e.audioButtonSkinsByLocale:{},i=e.audioButtonSkin&&typeof e.audioButtonSkin==`object`?e.audioButtonSkin:null,a=t.startsWith(`es`)?ro.es:ro.default;return r[t]||r[n]||r.default||i||a}function ao(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,correctChoiceId:i}=e;return n&&r&&i?i:t}function oo(e){let{isEvaluateMode:t,showCorrectAnswer:n,isCorrect:r,isIncorrect:i,selectedId:a}=e;return!t||n?``:r?`correct`:i&&a?`incorrect`:``}function so(e){let{prompt:t,legendMaxChars:n,answerChoicesLabel:r}=e,i=t.replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim(),a=Math.max(8,n);return i?i.length>a?`${i.slice(0,Math.max(1,a-1))}…`:i:r}var co=`/* Shared base styles for all sel_r1-*_plusggg variants.
24
+ otherwise offset the control from its label (the demo app's preflight zeroed them). */.choice-radio-bottom.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;}`};function Ga(e,t){We(t,!0),Wr(e,Wa);let n=Z(t,`choice`,7),r=Z(t,`choiceMode`,7,`text`),i=Z(t,`isHorizontal`,7,!1),a=Z(t,`isSelected`,7,!1),o=Z(t,`isDisabled`,7,!1),s=Z(t,`correctness`,7,void 0),c=Z(t,`isEvaluateMode`,7,!1),l=Z(t,`instanceId`,7),u=Z(t,`radioGroupName`,7),d=Z(t,`language`,7);var f={get choice(){return n()},set choice(e){n(e),P()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),P()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),P()},get isSelected(){return a()},set isSelected(e=!1){a(e),P()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),P()},get correctness(){return s()},set correctness(e=void 0){s(e),P()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),P()},get instanceId(){return l()},set instanceId(e){l(e),P()},get radioGroupName(){return u()},set radioGroupName(e){u(e),P()},get language(){return d()},set language(e){d(e),P()}},p=Ua(),m=R(p),h=e=>{var t=za(),i=R(t),s=R(i),c=e=>{var t=La();B(e=>{X(t,`src`,n().imageUrl),X(t,`alt`,e)},[()=>n().imageAlt||Sa(`choiceImage`,d(),{id:n().id})]),J(e,t)},f=e=>{var t=Ra();Ur(t,()=>n().labelHtml||``,!0),O(t),J(e,t)};Y(s,e=>{r()===`image`&&n().imageUrl?e(c):e(f,-1)}),O(i);var p=z(i,2);ri(p),O(t),B(()=>{X(t,`for`,`${l()}-opt-${n().id}`),X(p,`name`,u()),X(p,`id`,`${l()}-opt-${n().id}`),ii(p,n().id),ai(p,a()),p.disabled=o()}),J(e,t)},g=e=>{var t=Va(),i=en(t);ri(i);var s=z(i,2),c=R(s),f=e=>{var t=Ba();B(e=>{X(t,`src`,n().imageUrl),X(t,`alt`,e)},[()=>n().imageAlt||Sa(`choiceImage`,d(),{id:n().id})]),J(e,t)},p=e=>{var t=Ra();Ur(t,()=>n().labelHtml||``,!0),O(t),J(e,t)};Y(c,e=>{r()===`image`&&n().imageUrl?e(f):e(p,-1)}),O(s),B(()=>{X(i,`name`,u()),X(i,`id`,`${l()}-opt-${n().id}`),ii(i,n().id),ai(i,a()),i.disabled=o(),X(s,`for`,`${l()}-opt-${n().id}`)}),J(e,t)};Y(m,e=>{i()?e(h):e(g,-1)});var _=z(m,2),v=e=>{var t=Ha(),n=tn(t,!0);B(()=>{Xr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Er(n,s()===`correct`?`✓`:`✕`)}),J(e,t)};return Y(_,e=>{c()&&s()&&e(v)}),O(p),B(()=>Xr(p,1,`choice-row pie-choice ${i()?`choice-row-horizontal pie-choice-horizontal`:``} ${a()?`is-selected pie-choice-selected`:``} ${s()?`choice-${s()} pie-choice-${s()}`:``}`,`svelte-8xu1pt`)),J(e,p),Ge(f)}vi(Ga,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{},language:{}},[],[],{mode:`open`});var Ka=q(`<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>`),qa={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(--mpb-focus-ring, var(--pie-focus-outline, #1565c0));outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function Ja(e,t){We(t,!0),Wr(e,qa);let n=Z(t,`html`,7),r=Z(t,`language`,7),i=F(!1),a=`mpb-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),P()},get language(){return r()},set language(e){r(e),P()}},s=Ka(),c=R(s),l=tn(c,!0),u=z(c,2);return Ur(u,n,!0),O(u),O(s),B(e=>{X(c,`aria-expanded`,K(i)),X(c,`aria-controls`,a),Er(l,e),X(u,`id`,a),X(u,`hidden`,!K(i))},[()=>Ca(K(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),cr(`click`,c,()=>I(i,!K(i))),J(e,s),Ge(o)}lr([`click`]),vi(Ja,{html:{},language:{}},[],[],{mode:`open`});function Ya(e){let t=new Map,{isEvaluateMode:n,correctChoiceId:r,selectedId:i,showCorrectAnswer:a}=e;return!n||!r?t:a?(t.set(r,`correct`),t):i?i===r?(t.set(r,`correct`),t):(t.set(i,`incorrect`),t.set(r,`incorrect`),t):(t.set(r,`incorrect`),t)}var Xa=`{{blank}}`,Za=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Qa(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/&nbsp;/g,` `).trim()===Xa:!1,l=r===`horizontal`||r===`vertical`?r:s||c?`horizontal`:`vertical`;return{isAudioOnlyMode:s,isBlankOnlyTemplate:c,choiceLayout:l,isHorizontalChoices:l===`horizontal`,hasInlineSentenceAudioLayout:i===`inline_sentence`&&a,useFeatureButtonAudio:typeof o==`boolean`?o:a&&Za.has(i)}}var $a={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,choiceImageMaxHeightRem:9.375,choiceImageMaxWidthRem:9.375,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,stimulusGridColumnGapRem:2,stimulusGridRowGapRem:.7,stimulusSentenceMarginTopRem:.2,stimulusChoicesMarginTopRem:.9,tokenGridColumnGapRem:1.5,tokenGridRowGapRem:.8,tokenTemplateMarginTopRem:.6,tokenInlineTokenGapRem:.35,tokenChoicesMarginTopRem:.2,inlineGridColumnGapRem:1.5,inlineGridRowGapRem:.65,inlineTemplateMarginTopRem:.45,inlineChoicesMarginTopRem:.25},eo={blankStandaloneWidthRem:{varName:`--mpb-blank-standalone-width`,unit:`rem`},blankWideWidthRem:{varName:`--mpb-blank-wide-width`,unit:`rem`},blankUnderlineWidthPx:{varName:`--mpb-blank-underline-width`,unit:`px`},blankUnderlineWideWidthPx:{varName:`--mpb-blank-underline-wide-width`,unit:`px`},horizontalChoiceWidthPx:{varName:`--mpb-choice-width-px`,unit:`px`},horizontalChoiceWidthVw:{varName:`--mpb-choice-width-vw`,unit:`vw`},horizontalChoiceTileMinHeightRem:{varName:`--mpb-choice-tile-min-height`,unit:`rem`},horizontalChoiceContentMinHeightRem:{varName:`--mpb-choice-content-min-height`,unit:`rem`},choiceImageMaxHeightRem:{varName:`--mpb-choice-image-max-height`,unit:`rem`},choiceImageMaxWidthRem:{varName:`--mpb-choice-image-max-width`,unit:`rem`},choiceGroupGapRem:{varName:`--mpb-choice-group-gap`,unit:`rem`},choiceRowGapRem:{varName:`--mpb-choice-row-gap`,unit:`rem`},horizontalChoiceRadioTopMarginRem:{varName:`--mpb-horizontal-choice-radio-top-margin`,unit:`rem`},toggleButtonGapRem:{varName:`--mpb-toggle-button-gap`,unit:`rem`},listenButtonSizePx:{varName:`--mpb-listen-button-size`,unit:`px`},audioBlankTemplateMarginTopRem:{varName:`--mpb-audio-blank-template-margin-top`,unit:`rem`},audioBlankTemplateMarginBottomRem:{varName:`--mpb-audio-blank-template-margin-bottom`,unit:`rem`},audioInstructionsMaxWidthPx:{varName:`--mpb-audio-instructions-max-width`,unit:`px`},stimulusMinColumnPx:{varName:`--mpb-stimulus-min-column`,unit:`px`},textMinColumnPx:{varName:`--mpb-text-min-column`,unit:`px`},stimulusGridColumnGapRem:{varName:`--mpb-stimulus-grid-column-gap`,unit:`rem`},stimulusGridRowGapRem:{varName:`--mpb-stimulus-grid-row-gap`,unit:`rem`},stimulusSentenceMarginTopRem:{varName:`--mpb-stimulus-sentence-margin-top`,unit:`rem`},stimulusChoicesMarginTopRem:{varName:`--mpb-stimulus-choices-margin-top`,unit:`rem`},tokenGridColumnGapRem:{varName:`--mpb-token-grid-column-gap`,unit:`rem`},tokenGridRowGapRem:{varName:`--mpb-token-grid-row-gap`,unit:`rem`},tokenTemplateMarginTopRem:{varName:`--mpb-token-template-margin-top`,unit:`rem`},tokenInlineTokenGapRem:{varName:`--mpb-token-inline-token-gap`,unit:`rem`},tokenChoicesMarginTopRem:{varName:`--mpb-token-choices-margin-top`,unit:`rem`},inlineGridColumnGapRem:{varName:`--mpb-inline-grid-column-gap`,unit:`rem`},inlineGridRowGapRem:{varName:`--mpb-inline-grid-row-gap`,unit:`rem`},inlineTemplateMarginTopRem:{varName:`--mpb-inline-template-margin-top`,unit:`rem`},inlineChoicesMarginTopRem:{varName:`--mpb-inline-choices-margin-top`,unit:`rem`}},to={audio_blank_only:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6,horizontalChoiceTileMinHeightRem:11.25,horizontalChoiceContentMinHeightRem:9.375,choiceGroupGapRem:1,audioBlankTemplateMarginBottomRem:1.875},stimulus_image_blank:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6},token_sequence:{blankStandaloneWidthRem:7,blankUnderlineWideWidthPx:6}};function no(e){let{layoutProfile:t,isBlankOnlyTemplate:n}=e,r=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},i=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},a=i[t]&&typeof i[t]==`object`?i[t]:{},o={...to[t]??{},...a},s={...$a,...r,...o},c=[`audio_blank_only`,`stimulus_image_blank`],l=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],u=c.includes(t)?`${s.blankWideWidthRem}rem`:n?`${s.blankStandaloneWidthRem}rem`:`auto`,d=l.includes(t)?`${s.blankUnderlineWideWidthPx}px`:`${s.blankUnderlineWidthPx}px`;return{rootStyle:Object.keys(eo).map(e=>`${eo[e].varName}:${s[e]}${eo[e].unit}`).join(`;`),blankWidth:u,blankBorderWidth:d,legendMaxChars:s.legendMaxChars}}var ro={default:{silentUrl:`https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg`},es:{silentUrl:`https://assets.learnosity.com/organisations/844/27a9d5b5-d873-4bd5-b9ba-22748782d8ba.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg`}};function io(e){let t=String(e.locale||``).toLowerCase(),n=t.slice(0,2),r=e.audioButtonSkinsByLocale&&typeof e.audioButtonSkinsByLocale==`object`?e.audioButtonSkinsByLocale:{},i=e.audioButtonSkin&&typeof e.audioButtonSkin==`object`?e.audioButtonSkin:null,a=t.startsWith(`es`)?ro.es:ro.default;return r[t]||r[n]||r.default||i||a}function ao(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,correctChoiceId:i}=e;return n&&r&&i?i:t}function oo(e){let{isEvaluateMode:t,showCorrectAnswer:n,isCorrect:r,isIncorrect:i,selectedId:a}=e;return!t||n?``:r?`correct`:i&&a?`incorrect`:``}function so(e){let{prompt:t,legendMaxChars:n,answerChoicesLabel:r}=e,i=t.replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim(),a=Math.max(8,n);return i?i.length>a?`${i.slice(0,Math.max(1,a-1))}…`:i:r}var co=`/* Shared base styles for all sel_r1-*_plusggg variants.
25
25
  Applied via the data-mpb-variant="sel-r1-base" style element.
26
26
  Every selector starts at .mc-populated-blank-root carrying any r1 variant class,
27
27
  so it cannot match outside this element. :where() keeps the attribute match out
@@ -615,7 +615,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
615
615
  transform: scale(0.85);
616
616
  }
617
617
  `}},uo=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),fo=e=>lo[uo(e)],po=e=>fo(e)?.variantClass||``,mo=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),ho=/\.mc-populated-blank-root(?![\w-])/g,go=(e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)})([co,...Object.values(lo).map(e=>e.cssText)].join(`
618
- `)),_o=e=>e.replace(ho,`.mc-populated-blank-root:where([data-mpb-css="${go}"])`),vo=(e,t,n)=>{let r=`mc-populated-blank-css-${t}-${go}`;if(e.getElementById(r))return;let i=document.createElement(`style`);i.id=r,i.setAttribute(`data-mpb-variant`,t),i.textContent=_o(n),(e instanceof ShadowRoot?e:e.head).appendChild(i)},yo=(e,t)=>{if(!e?.cssText||typeof document>`u`)return;let n=t.getRootNode(),r=n instanceof ShadowRoot?n:document;mo.has(e.variantId)&&vo(r,`sel-r1-base`,co),vo(r,e.variantId,e.cssText)},bo=q(`<div class="pie-prompt svelte-6wlbb4"></div>`),xo=br(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #d0e2f0)"></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, #d0e2f0)"></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, #146eb3)"></polygon></svg>`),So=br(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35"><path 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" fill="#D0CAC5" stroke="#E6E3E0" stroke-width="0.75"></path><path 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" fill="#B3ABA4" stroke="#CDC7C2" stroke-width="0.5"></path><circle cx="-114.2" cy="143.5" r="14" fill="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-background-dark, #ecedf1)"></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, #146eb3)"></polygon></svg>`),Co=q(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="pie-toggle-correct-answer svelte-6wlbb4" style="gap:var(--mpb-toggle-button-gap, 0.5rem);" data-testid="show-correct-answer"><span class="pie-correct-answer-toggle-content svelte-6wlbb4"><span class="pie-correct-answer-toggle-icon-holder svelte-6wlbb4" aria-hidden="true"><!></span> <span class="pie-correct-answer-toggle-label svelte-6wlbb4"> </span></span></button></div>`),wo=q(`<div class="sentence-line pie-sentence-line svelte-6wlbb4"></div>`),To=q(`<div class="template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),Eo=q(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),Do=q(`<div><!> <!> <!> <!> <!> <!> <!> <p class="sr-only pie-blank-hint svelte-6wlbb4"> </p> <fieldset class="pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`),Oo={hash:`svelte-6wlbb4`,code:`.sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
618
+ `)),_o=e=>e.replace(ho,`.mc-populated-blank-root:where([data-mpb-css="${go}"])`),vo=(e,t,n)=>{let r=`mc-populated-blank-css-${t}-${go}`;if(e.getElementById(r))return;let i=document.createElement(`style`);i.id=r,i.setAttribute(`data-mpb-variant`,t),i.textContent=_o(n),(e instanceof ShadowRoot?e:e.head).appendChild(i)},yo=(e,t)=>{if(!e?.cssText||typeof document>`u`)return;let n=t.getRootNode(),r=n instanceof ShadowRoot?n:document;mo.has(e.variantId)&&vo(r,`sel-r1-base`,co),vo(r,e.variantId,e.cssText)},bo=q(`<div class="pie-prompt svelte-6wlbb4"></div>`),xo=vr(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #d0e2f0)"></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, #d0e2f0)"></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, #146eb3)"></polygon></svg>`),So=vr(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35"><path 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" fill="#D0CAC5" stroke="#E6E3E0" stroke-width="0.75"></path><path 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" fill="#B3ABA4" stroke="#CDC7C2" stroke-width="0.5"></path><circle cx="-114.2" cy="143.5" r="14" fill="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-background-dark, #ecedf1)"></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, #146eb3)"></polygon></svg>`),Co=q(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="pie-toggle-correct-answer svelte-6wlbb4" style="gap:var(--mpb-toggle-button-gap, 0.5rem);" data-testid="show-correct-answer"><span class="pie-correct-answer-toggle-content svelte-6wlbb4"><span class="pie-correct-answer-toggle-icon-holder svelte-6wlbb4" aria-hidden="true"><!></span> <span class="pie-correct-answer-toggle-label svelte-6wlbb4"> </span></span></button></div>`),wo=q(`<div class="sentence-line pie-sentence-line svelte-6wlbb4"></div>`),To=q(`<div class="template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),Eo=q(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),Do=q(`<div><!> <!> <!> <!> <!> <!> <!> <p class="sr-only pie-blank-hint svelte-6wlbb4"> </p> <fieldset class="pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`),Oo={hash:`svelte-6wlbb4`,code:`.sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
619
619
 
620
620
  /* Layout is self-contained: PIE players ship no Tailwind, so no utility class or
621
621
  preflight reset can be assumed. The blank slot, choice tiles and variant
@@ -652,4 +652,4 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
652
652
  .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),
653
653
  .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),
654
654
  .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}
655
- }`};function ko(e,t){We(t,!0),Kr(e,Oo);let n=Z(t,`model`,7),r=Z(t,`session`,7),i=Z(t,`onSessionChange`,7),a=Z(t,`onAudioStarted`,7),o=Z(t,`onAudioEnded`,7),s=e=>Sa(e,n()?.language),c=F(``),l=F(null),u=F(null),d=F(null),f=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,p=M(()=>(n()?.mode||n()?.env?.mode||``).toString()),m=M(()=>K(p)===`evaluate`),h=M(()=>n()?.correctness),g=M(()=>typeof n()?.responseCorrect==`boolean`?n().responseCorrect:K(h)===`correct`),_=M(()=>K(h)===`correct`),v=M(()=>K(h)===`incorrect`),y=F(!1),b=M(()=>K(m)&&!K(g)&&!!n()?.correctChoiceId),x=M(()=>n()?.layoutProfile||``),S=M(()=>Qa({interactionMode:n()?.interactionMode,template:n()?.template,choiceLayout:n()?.choiceLayout,layoutProfile:K(x),hasAudio:n()?.hasAudio,useFeatureButtonAudio:n()?.useFeatureButtonAudio})),ee=M(()=>K(S).isAudioOnlyMode),C=M(()=>K(S).isBlankOnlyTemplate),w=M(()=>K(S).isHorizontalChoices),T=M(()=>K(S).hasInlineSentenceAudioLayout),te=M(()=>K(S).useFeatureButtonAudio),ne=M(()=>no({layoutProfile:K(x),isBlankOnlyTemplate:K(C),configuredLimits:n()?.layoutLimits,customProfilePresets:n()?.layoutProfilePresets})),re=M(()=>Array.isArray(n()?.choices)?n().choices:[]),ie=M(()=>n()?.choiceMode||`text`),ae=M(()=>r()?.choiceId||K(c)||``),oe=M(()=>`${f}-choice-group-${n()?.id||`1`}`),se=M(()=>ao({selectedId:K(ae),isEvaluateMode:K(m),showCorrectAnswer:K(y),correctChoiceId:String(n()?.correctChoiceId||``)})),ce=M(()=>K(re).find(e=>e.id===K(se))),le=M(()=>String(K(ce)?.labelHtml||``)),ue=M(()=>oo({isEvaluateMode:K(m),showCorrectAnswer:K(y),isCorrect:K(_),isIncorrect:K(v),selectedId:K(ae)})),de=M(()=>K(ue)===`correct`?s(`correctAnswerSelected`):K(ue)===`incorrect`?s(`incorrectAnswerSelected`):``),fe=M(()=>Ya({isEvaluateMode:K(m),correctChoiceId:String(n()?.correctChoiceId||``),selectedId:String(K(ae)||``),showCorrectAnswer:K(y)})),pe=M(()=>`${f}-prompt`),me=M(()=>`${f}-choices-legend`),he=M(()=>`${f}-result`),ge=M(()=>`${f}-blank-hint`),_e=M(()=>so({prompt:n()?.prompt||``,legendMaxChars:K(ne).legendMaxChars,answerChoicesLabel:s(`answerChoices`)})),ve=M(()=>n()?.prompt?K(pe):void 0),ye=M(()=>n()?.prompt?void 0:String(n()?.choiceGroupLabel||``).trim()||K(_e)),be=M(()=>n()?.prompt?K(pe):void 0),xe=M(()=>{let e=String(n()?.language||n()?.locale||``).trim();return e?e.replace(/_/g,`-`):void 0}),Se=M(()=>fo(n()?.customType)),E=M(()=>po(n()?.customType)),Ce=M(()=>{let e=n()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let r=e.slice(0,t),i=e.slice(t+9);return K(x)===`inline_sentence`&&(r=`${r.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:r,after:i}});function D(e){let t=e.target;if(!t.checked)return;let n=t.value;I(c,n,!0),i()?.({...r(),choiceId:n})}function O(){K(b)&&I(y,!K(y))}gn(()=>{(!K(m)||K(g))&&I(y,!1)});function we(e){if(n()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let r=e.currentTarget,i=Array.from(r.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let Te=M(()=>io({locale:n()?.locale,audioButtonSkin:n()?.audioButtonSkin,audioButtonSkinsByLocale:n()?.audioButtonSkinsByLocale}));gn(()=>{I(c,r()?.choiceId||``,!0)}),gn(()=>{let e=K(l);if(e)return e.addEventListener(`click`,O),()=>e.removeEventListener(`click`,O)}),gn(()=>{let e=K(u);if(!e)return;let t=e=>{e.target?.type===`radio`&&D(e)},n=e=>we(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),gn(()=>{K(d)&&yo(K(Se),K(d))});var Ee={get model(){return n()},set model(e){n(e),P()},get session(){return r()},set session(e){r(e),P()},get onSessionChange(){return i()},set onSessionChange(e){i(e),P()},get onAudioStarted(){return a()},set onAudioStarted(e){a(e),P()},get onAudioEnded(){return o()},set onAudioEnded(e){o(e),P()}},De=Do(),Oe=R(De),ke=e=>{{let t=M(()=>n()?.language);Ja(e,{get html(){return n().teacherInstructions},get language(){return K(t)}})}};Y(Oe,e=>{n()?.teacherInstructions&&e(ke)});var Ae=z(Oe,2),je=e=>{var t=bo();Gr(t,()=>n().prompt,!0),k(t),B(()=>X(t,`id`,K(pe))),J(e,t)};Y(Ae,e=>{n()?.prompt&&e(je)});var Me=z(Ae,2),Ne=e=>{var t=Co(),r=R(t),i=R(r),a=R(i),o=R(a),s=e=>{J(e,xo())},c=e=>{J(e,So())};Y(o,e=>{K(y)?e(s):e(c,-1)}),k(a);var u=rn(z(a,2),!0);k(i),k(r),fi(r,e=>I(l,e),()=>K(l)),k(t),B(e=>{X(r,`aria-pressed`,K(y)),Or(u,e)},[()=>Ca(K(y)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),J(e,t)};Y(Me,e=>{K(b)&&e(Ne)});var Pe=z(Me,2);{let e=M(()=>!!n()?.hasAudio),t=M(()=>n()?.audioUrl),r=M(()=>!!n()?.autoplayAudioEnabled),i=M(()=>n()?.language);Aa(Pe,{get hasAudio(){return K(e)},get audioUrl(){return K(t)},get useFeatureButtonAudio(){return K(te)},get autoplayEnabled(){return K(r)},get featureAudioSkin(){return K(Te)},get language(){return K(i)},get onaudiostarted(){return a()},get onaudioended(){return o()}})}var Fe=z(Pe,2),Ie=e=>{var t=wo();Gr(t,()=>n().sentenceHtml,!0),k(t),B(()=>X(t,`aria-describedby`,K(be))),J(e,t)};Y(Fe,e=>{n()?.sentenceHtml&&e(Ie)});var Le=z(Fe,2),Re=e=>{var t=To(),r=R(t);Gr(r,()=>K(Ce).before);var i=z(r);{let e=M(()=>s(`blankLabel`)),t=M(()=>n()?.language);Ia(i,{get choiceMode(){return K(ie)},get displayChoice(){return K(ce)},get displayChoiceLabelHtml(){return K(le)},get isStandalone(){return K(C)},get blankWidth(){return K(ne).blankWidth},get blankBorderWidth(){return K(ne).blankBorderWidth},get ariaLabel(){return K(e)},get language(){return K(t)}})}Gr(z(i),()=>K(Ce).after),k(t),B(()=>X(t,`aria-describedby`,K(be))),J(e,t)};Y(Le,e=>{K(ee)||e(Re)});var ze=z(Le,2),Be=e=>{var t=Eo(),n=rn(t,!0);B(()=>{X(t,`id`,K(he)),Or(n,K(de))}),J(e,t)};Y(ze,e=>{K(de)&&e(Be)});var Ve=z(ze,2),He=rn(Ve,!0),A=z(Ve,2),Ue=R(A),Ke=rn(Ue,!0),qe=z(Ue,2);return zr(qe,21,()=>K(re),e=>e.id,(e,t)=>{{let r=M(()=>K(se)===K(t).id),i=M(()=>!!n()?.disabled),a=M(()=>K(fe).get(K(t).id)),o=M(()=>n()?.language);Ga(e,{get choice(){return K(t)},get choiceMode(){return K(ie)},get isHorizontal(){return K(w)},get isSelected(){return K(r)},get isDisabled(){return K(i)},get correctness(){return K(a)},get isEvaluateMode(){return K(m)},get instanceId(){return f},get radioGroupName(){return K(oe)},get language(){return K(o)}})}}),k(qe),fi(qe,e=>I(u,e),()=>K(u)),k(A),k(De),fi(De,e=>I(d,e),()=>K(d)),B((e,t)=>{Qr(De,1,`mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${K(x)} choice-mode-${K(ie)} ${K(E)} ${K(T)?`has-inline-audio`:``}`,`svelte-6wlbb4`),X(De,`lang`,K(xe)),ei(De,K(ne).rootStyle),X(De,`data-mpb-css`,go),X(Ve,`id`,K(ge)),Or(He,e),A.disabled=n()?.disabled,X(Ue,`id`,K(me)),Or(Ke,K(_e)),Qr(qe,1,`pie-choices ${K(w)?`choices-horizontal`:`choices-vertical`}`,`svelte-6wlbb4`),X(qe,`aria-labelledby`,K(ve)),X(qe,`aria-label`,K(ye)),X(qe,`aria-describedby`,t)},[()=>s(`blankPreSelectionHint`),()=>[K(ge),K(de)?K(he):void 0].filter(Boolean).join(` `)]),J(e,De),Ge(Ee)}vi(ko,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`},onSessionChange:{},onAudioStarted:{},onAudioEnded:{}},[],[]);function Ao(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function jo(e,t){if(e===t)return e;if(!Ao(e)||!Ao(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 Mo=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}},No=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 Po(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 Mo(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=jo(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new No(this.tagName.toLowerCase(),this.isComplete()))}}return r}var Fo=Po(ko,{isComplete:(e,t)=>!!t?.choiceId});function Io(e){return!!e?.completeAudioEnabled&&!!e?.hasAudio}return class extends Fo{audioComplete=!1;constructor(){super(),this.onAudioStarted=()=>{this.#e({audioStartTime:Date.now()})},this.onAudioEnded=()=>{this.audioComplete=!0,this.#e({audioEndTime:Date.now()}),this.dispatchSessionChanged()}}set model(e){e?.audioUrl!==this.model?.audioUrl&&(this.audioComplete=!1),super.model=e}get model(){return super.model}isComplete(){return super.isComplete()&&(this.audioComplete||!Io(this.model))}#e(e){let t=this.session||{},n=t.audioStartTime||e.audioStartTime,r=t.audioEndTime||e.audioEndTime,i={...t,...n?{audioStartTime:n}:{},...r?{audioEndTime:r}:{}};!i.waitTime&&n&&r&&(i.waitTime=r-n),this.writeSession(i)}}})();
655
+ }`};function ko(e,t){We(t,!0),Wr(e,Oo);let n=Z(t,`model`,7),r=Z(t,`session`,7),i=Z(t,`onSessionChange`,7),a=Z(t,`onAudioStarted`,7),o=Z(t,`onAudioEnded`,7),s=e=>Sa(e,n()?.language),c=F(``),l=F(null),u=F(null),d=F(null),f=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,p=M(()=>(n()?.mode||n()?.env?.mode||``).toString()),m=M(()=>K(p)===`evaluate`),h=M(()=>n()?.correctness),g=M(()=>typeof n()?.responseCorrect==`boolean`?n().responseCorrect:K(h)===`correct`),_=M(()=>K(h)===`correct`),v=M(()=>K(h)===`incorrect`),y=F(!1),b=M(()=>K(m)&&!K(g)&&!!n()?.correctChoiceId),x=M(()=>n()?.layoutProfile||``),S=M(()=>Qa({interactionMode:n()?.interactionMode,template:n()?.template,choiceLayout:n()?.choiceLayout,layoutProfile:K(x),hasAudio:n()?.hasAudio,useFeatureButtonAudio:n()?.useFeatureButtonAudio})),ee=M(()=>K(S).isAudioOnlyMode),te=M(()=>K(S).isBlankOnlyTemplate),C=M(()=>K(S).isHorizontalChoices),w=M(()=>K(S).hasInlineSentenceAudioLayout),ne=M(()=>K(S).useFeatureButtonAudio),re=M(()=>no({layoutProfile:K(x),isBlankOnlyTemplate:K(te),configuredLimits:n()?.layoutLimits,customProfilePresets:n()?.layoutProfilePresets})),ie=M(()=>Array.isArray(n()?.choices)?n().choices:[]),ae=M(()=>n()?.choiceMode||`text`),oe=M(()=>r()?.choiceId||K(c)||``),se=M(()=>`${f}-choice-group-${n()?.id||`1`}`),ce=M(()=>ao({selectedId:K(oe),isEvaluateMode:K(m),showCorrectAnswer:K(y),correctChoiceId:String(n()?.correctChoiceId||``)})),le=M(()=>K(ie).find(e=>e.id===K(ce))),ue=M(()=>String(K(le)?.labelHtml||``)),de=M(()=>oo({isEvaluateMode:K(m),showCorrectAnswer:K(y),isCorrect:K(_),isIncorrect:K(v),selectedId:K(oe)})),fe=M(()=>K(de)===`correct`?s(`correctAnswerSelected`):K(de)===`incorrect`?s(`incorrectAnswerSelected`):``),pe=M(()=>Ya({isEvaluateMode:K(m),correctChoiceId:String(n()?.correctChoiceId||``),selectedId:String(K(oe)||``),showCorrectAnswer:K(y)})),me=M(()=>`${f}-prompt`),he=M(()=>`${f}-choices-legend`),ge=M(()=>`${f}-result`),_e=M(()=>`${f}-blank-hint`),ve=M(()=>so({prompt:n()?.prompt||``,legendMaxChars:K(re).legendMaxChars,answerChoicesLabel:s(`answerChoices`)})),ye=M(()=>n()?.prompt?K(me):void 0),be=M(()=>n()?.prompt?void 0:String(n()?.choiceGroupLabel||``).trim()||K(ve)),xe=M(()=>n()?.prompt?K(me):void 0),Se=M(()=>{let e=String(n()?.language||n()?.locale||``).trim();return e?e.replace(/_/g,`-`):void 0}),T=M(()=>fo(n()?.customType)),Ce=M(()=>po(n()?.customType)),E=M(()=>{let e=n()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let r=e.slice(0,t),i=e.slice(t+9);return K(x)===`inline_sentence`&&(r=`${r.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:r,after:i}});function D(e){let t=e.target;if(!t.checked)return;let n=t.value;I(c,n,!0),i()?.({...r(),choiceId:n})}function we(){K(b)&&I(y,!K(y))}mn(()=>{(!K(m)||K(g))&&I(y,!1)});function Te(e){if(n()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let r=e.currentTarget,i=Array.from(r.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let Ee=M(()=>io({locale:n()?.locale,audioButtonSkin:n()?.audioButtonSkin,audioButtonSkinsByLocale:n()?.audioButtonSkinsByLocale}));mn(()=>{I(c,r()?.choiceId||``,!0)}),mn(()=>{let e=K(l);if(e)return e.addEventListener(`click`,we),()=>e.removeEventListener(`click`,we)}),mn(()=>{let e=K(u);if(!e)return;let t=e=>{e.target?.type===`radio`&&D(e)},n=e=>Te(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),mn(()=>{K(d)&&yo(K(T),K(d))});var De={get model(){return n()},set model(e){n(e),P()},get session(){return r()},set session(e){r(e),P()},get onSessionChange(){return i()},set onSessionChange(e){i(e),P()},get onAudioStarted(){return a()},set onAudioStarted(e){a(e),P()},get onAudioEnded(){return o()},set onAudioEnded(e){o(e),P()}},Oe=Do(),ke=R(Oe),Ae=e=>{{let t=M(()=>n()?.language);Ja(e,{get html(){return n().teacherInstructions},get language(){return K(t)}})}};Y(ke,e=>{n()?.teacherInstructions&&e(Ae)});var je=z(ke,2),Me=e=>{var t=bo();Ur(t,()=>n().prompt,!0),O(t),B(()=>X(t,`id`,K(me))),J(e,t)};Y(je,e=>{n()?.prompt&&e(Me)});var Ne=z(je,2),Pe=e=>{var t=Co(),r=R(t),i=R(r),a=R(i),o=R(a),s=e=>{J(e,xo())},c=e=>{J(e,So())};Y(o,e=>{K(y)?e(s):e(c,-1)}),O(a);var u=tn(z(a,2),!0);O(i),O(r),ui(r,e=>I(l,e),()=>K(l)),O(t),B(e=>{X(r,`aria-pressed`,K(y)),Er(u,e)},[()=>Ca(K(y)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),J(e,t)};Y(Ne,e=>{K(b)&&e(Pe)});var Fe=z(Ne,2);{let e=M(()=>!!n()?.hasAudio),t=M(()=>n()?.audioUrl),r=M(()=>!!n()?.autoplayAudioEnabled),i=M(()=>n()?.language);Aa(Fe,{get hasAudio(){return K(e)},get audioUrl(){return K(t)},get useFeatureButtonAudio(){return K(ne)},get autoplayEnabled(){return K(r)},get featureAudioSkin(){return K(Ee)},get language(){return K(i)},get onaudiostarted(){return a()},get onaudioended(){return o()}})}var Ie=z(Fe,2),Le=e=>{var t=wo();Ur(t,()=>n().sentenceHtml,!0),O(t),B(()=>X(t,`aria-describedby`,K(xe))),J(e,t)};Y(Ie,e=>{n()?.sentenceHtml&&e(Le)});var Re=z(Ie,2),ze=e=>{var t=To(),r=R(t);Ur(r,()=>K(E).before);var i=z(r);{let e=M(()=>s(`blankLabel`)),t=M(()=>n()?.language);Ia(i,{get choiceMode(){return K(ae)},get displayChoice(){return K(le)},get displayChoiceLabelHtml(){return K(ue)},get isStandalone(){return K(te)},get blankWidth(){return K(re).blankWidth},get blankBorderWidth(){return K(re).blankBorderWidth},get ariaLabel(){return K(e)},get language(){return K(t)}})}Ur(z(i),()=>K(E).after),O(t),B(()=>X(t,`aria-describedby`,K(xe))),J(e,t)};Y(Re,e=>{K(ee)||e(ze)});var Be=z(Re,2),Ve=e=>{var t=Eo(),n=tn(t,!0);B(()=>{X(t,`id`,K(ge)),Er(n,K(fe))}),J(e,t)};Y(Be,e=>{K(fe)&&e(Ve)});var He=z(Be,2),k=tn(He,!0),Ue=z(He,2),Ke=R(Ue),qe=tn(Ke,!0),A=z(Ke,2);return Lr(A,21,()=>K(ie),e=>e.id,(e,t)=>{{let r=M(()=>K(ce)===K(t).id),i=M(()=>!!n()?.disabled),a=M(()=>K(pe).get(K(t).id)),o=M(()=>n()?.language);Ga(e,{get choice(){return K(t)},get choiceMode(){return K(ae)},get isHorizontal(){return K(C)},get isSelected(){return K(r)},get isDisabled(){return K(i)},get correctness(){return K(a)},get isEvaluateMode(){return K(m)},get instanceId(){return f},get radioGroupName(){return K(se)},get language(){return K(o)}})}}),O(A),ui(A,e=>I(u,e),()=>K(u)),O(Ue),O(Oe),ui(Oe,e=>I(d,e),()=>K(d)),B((e,t)=>{Xr(Oe,1,`mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${K(x)} choice-mode-${K(ae)} ${K(Ce)} ${K(w)?`has-inline-audio`:``}`,`svelte-6wlbb4`),X(Oe,`lang`,K(Se)),Qr(Oe,K(re).rootStyle),X(Oe,`data-mpb-css`,go),X(He,`id`,K(_e)),Er(k,e),Ue.disabled=n()?.disabled,X(Ke,`id`,K(he)),Er(qe,K(ve)),Xr(A,1,`pie-choices ${K(C)?`choices-horizontal`:`choices-vertical`}`,`svelte-6wlbb4`),X(A,`aria-labelledby`,K(ye)),X(A,`aria-label`,K(be)),X(A,`aria-describedby`,t)},[()=>s(`blankPreSelectionHint`),()=>[K(_e),K(fe)?K(ge):void 0].filter(Boolean).join(` `)]),J(e,Oe),Ge(De)}vi(ko,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`},onSessionChange:{},onAudioStarted:{},onAudioEnded:{}},[],[]);function Ao(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function jo(e,t){if(e===t)return e;if(!Ao(e)||!Ao(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 Mo=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}},No=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 Po(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 Mo(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=jo(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new No(this.tagName.toLowerCase(),this.isComplete()))}}return r}var Fo=Po(ko,{isComplete:(e,t)=>!!t?.choiceId});function Io(e){return!!e?.completeAudioEnabled&&!!e?.hasAudio}return class extends Fo{audioComplete=!1;constructor(){super(),this.onAudioStarted=()=>{this.#e({audioStartTime:Date.now()})},this.onAudioEnded=()=>{this.audioComplete=!0,this.#e({audioEndTime:Date.now()}),this.dispatchSessionChanged()}}set model(e){e?.audioUrl!==this.model?.audioUrl&&(this.audioComplete=!1),super.model=e}get model(){return super.model}isComplete(){return super.isComplete()&&(this.audioComplete||!Io(this.model))}#e(e){let t=this.session||{},n=t.audioStartTime||e.audioStartTime,r=t.audioEndTime||e.audioEndTime,i={...t,...n?{audioStartTime:n}:{},...r?{audioEndTime:r}:{}};!i.waitTime&&n&&r&&(i.waitTime=r-n),this.writeSession(i)}}})();