@pie-element/mc-populated-blank 0.3.0-next.4 → 0.3.0-next.5
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.
- package/dist/author/index.js +2260 -2213
- package/dist/author/index.js.map +1 -1
- package/dist/browser/author/index.js +7 -7
- package/dist/browser/{client-BAfWqkS6.js → client-BmZWrsT3.js} +866 -836
- package/dist/browser/client-BmZWrsT3.js.map +1 -0
- package/dist/browser/controller/index.js +1 -0
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +387 -388
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/print/index.js +78 -80
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +1 -0
- package/dist/controller/index.js +1 -0
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/index.js +1751 -1688
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +6 -6
- package/dist/index.js +1751 -1688
- package/dist/index.js.map +1 -1
- package/dist/print/index.js +1405 -1342
- package/dist/print/index.js.map +1 -1
- package/dist/shared/types.d.ts +1 -0
- package/module/print.js +897 -869
- package/module/print.js.map +1 -1
- package/package.json +2 -2
- package/dist/browser/client-BAfWqkS6.js.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var r={},i=Symbol(`uninitialized`),a=`http://www.w3.org/1999/xhtml`,o=`http://www.w3.org/2000/svg`,s=`http://www.w3.org/1998/Math/MathML`,c=Array.isArray,l=Array.prototype.indexOf,u=Array.prototype.includes,d=Array.from,f=Object.keys,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,g=Object.prototype,_=Array.prototype,v=Object.getPrototypeOf,y=Object.isExtensible,ee=()=>{};function b(e){for(var t=0;t<e.length;t++)e[t]()}function x(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var S=1024,C=2048,w=4096,te=8192,ne=16384,re=32768,ie=1<<25,ae=65536,oe=1<<19,se=1<<20,ce=1<<25,le=65536,ue=1<<21,de=1<<22,fe=1<<23,pe=Symbol(`$state`),me=Symbol(`legacy props`),he=Symbol(``),ge=Symbol(`attributes`),_e=Symbol(`class`),ve=Symbol(`style`),ye=Symbol(`text`),be=Symbol(`form reset`),xe=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Se=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function Ce(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function we(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Te(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ee(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function De(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Oe(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function ke(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Ae(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function je(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Me(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ne(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Pe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Fe(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ie(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Le(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function Re(e){T=e}var E;function D(e){if(e===null)throw Ie(),r;return E=e}function ze(){return D(un(E))}function O(e){if(T){if(un(E)!==null)throw Ie(),r;E=e}}function Be(e=1){if(T){for(var t=e,n=E;t--;)n=un(n);E=n}}function Ve(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=un(n);e&&n.remove(),n=i}}function He(e){if(!e||e.nodeType!==8)throw Ie(),r;return e.data}function Ue(e){return e===this.v}function We(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ge(e){return!We(e,this.v)}var k=null;function Ke(e){k=e}function qe(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:W,l:null}}function Je(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)Sn(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,e??{}}function Ye(){return!0}var Xe=[];function Ze(){var e=Xe;Xe=[],b(e)}function Qe(e){if(Xe.length===0&&!Mt){var t=Xe;queueMicrotask(()=>{t===Xe&&Ze()})}Xe.push(e)}function $e(){for(;Xe.length>0;)Ze()}function et(e){var t=W;if(t===null)return H.f|=fe,e;if(!(t.f&32768)&&!(t.f&4))throw e;tt(e,t)}function tt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var nt=~(C|w|S);function A(e,t){e.f=e.f&nt|t}function rt(e){e.f&512||e.deps===null?A(e,S):A(e,w)}function it(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=le,it(t.deps))}function at(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),it(e.deps),A(e,S)}var ot=!1;function st(e){var t=ot;try{return ot=!1,[e(),ot]}finally{ot=t}}var ct=!1;function lt(){ct||(ct=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[be]?.()})},{capture:!0}))}function ut(e){var t=H,n=W;U(null),Wn(null);try{return e()}finally{U(t),Wn(n)}}function dt(e){let t=0,n=Xt(0),r;return()=>{yn()&&(J(n),Dn(()=>(t===0&&(r=sr(()=>e(()=>en(n)))),t+=1,()=>{Qe(()=>{--t,t===0&&(r?.(),r=void 0,en(n))})})))}}var ft=ae|oe;function pt(e,t,n,r){new mt(e,t,n,r)}var mt=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=dt(()=>(this.#m=Xt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=W;t.b=this,t.f|=128,n(e)},this.parent=W.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=On(()=>{if(T){let e=this.#t;ze();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()},ft),T&&(this.#e=E)}#g(){try{this.#a=B(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Qe(r),t&&(this.#s=B(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Le();return}t=!0,n&&Pe(),this.#s!==null&&Pn(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){tt(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=B(()=>e(this.#e)),Qe(()=>{var e=this.#c=document.createDocumentFragment(),t=ln();e.append(t),this.#a=this.#S(()=>B(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Pn(this.#o,()=>{this.#o=null}),this.#x(M))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=B(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Rn(this.#a,e);let t=this.#n.pending;this.#o=B(()=>t(this.#e))}else this.#x(M)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){at(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=W,n=H,r=k;Wn(this.#i),U(this.#i),Ke(this.#i.ctx);try{return Rt.ensure(),e()}catch(e){return et(e),null}finally{Wn(t),U(n),Ke(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&&Pn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Qe(()=>{this.#d=!1,this.#m&&Qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),J(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.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),Be(),D(Ve()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return B(()=>{var r=W;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return tt(e,this.#i.parent),null}}))};Qe(()=>{var t;try{t=this.transform_error(e)}catch(e){tt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>tt(e,this.#i&&this.#i.parent)):n(t)})}};function ht(e,t,n,r){let i=Ye()?yt:St;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=W,c=gt(),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){tt(e,s)}_t()}}var d=vt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>xt(e))).then(u).catch(e=>tt(e,s)).finally(d)}l?l.then(()=>{c(),f(),_t()}):f()}function gt(){var e=W,t=H,n=k,r=M;return function(i=!0){Wn(e),U(t),Ke(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function _t(e=!0){Wn(null),U(null),Ke(null),e&&M?.deactivate()}function vt(){var e=W,t=e.b,n=M,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 yt(e){var t=2|C;return W!==null&&(W.f|=oe),{ctx:k,deps:null,effects:null,equals:Ue,f:t,fn:e,reactions:null,rv:0,v:i,wv:0,parent:W,ac:null}}var bt=Symbol(`obsolete`);function xt(e,t,n){let r=W;r===null&&Ce();var a=void 0,o=Xt(i),s=!H,c=new Set;return En(()=>{var t=W,n=x();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==xe&&n.reject(e)}).finally(_t)}catch(e){n.reject(e),_t()}var i=M;if(s){if(t.f&32768)var l=vt();if(r.b?.is_rendered())i.async_deriveds.get(t)?.reject(bt);else for(let e of c.values())e.reject(bt);c.add(n),i.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==bt&&(i.activate(),t?(o.f|=fe,Qt(o,t)):(o.f&8388608&&(o.f^=fe),Qt(o,e)),i.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),bn(()=>{for(let e of c)e.reject(bt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function j(e){let t=yt(e);return Kn(t),t}function St(e){let t=yt(e);return t.equals=Ge,t}function Ct(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function wt(e){var t,n=W,r=e.parent;if(!Vn&&r!==null&&e.v!==i&&r.f&24576)return Fe(),e.v;Wn(r);try{e.f&=~le,Ct(e),t=tr(e)}finally{Wn(n)}return t}function Tt(e){var t=wt(e);if(!e.equals(t)&&(e.wv=Qn(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),kt?.capture(e,t,!0)),e.deps===null))){A(e,S);return}Vn||(At===null?rt(e):(yn()||M?.is_fork)&&At.set(e,t))}function Et(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&ut(()=>{t.ac.abort(xe),t.ac=null}),t.fn!==null&&(t.teardown=ee),rr(t,0),An(t))}function Dt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ir(t)}var Ot=null,M=null,kt=null,At=null,jt=null,Mt=!1,Nt=!1,Pt=null,Ft=null,It=0,Lt=1,Rt=class e{id=Lt++;#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(){Ot===null?Ot=this:(Ot.#n=this,this.#t=Ot),Ot=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)A(r,C),t(r);for(r of n.m)A(r,w),t(r)}this.#p.add(e)}#g(){this.#e=!0,It++>1e3&&(this.#x(),zt());for(let e of this.#u)this.#d.delete(e),A(e,C),this.schedule(e);for(let e of this.#d)A(e,w),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Pt=[],r=[],i=Ft=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Kt(e),this.#h()||this.discard(),t}if(M=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Pt=null,Ft=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Gt(e,t);i.length>0&&M.#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(),kt=this,Vt(r),Vt(n),kt=null,this.#s?.resolve();var s=M;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&&s.#g()}#_(e,t,n){e.f^=S;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^=S:i&4?t.push(r):$n(r)&&(i&16&&this.#d.add(r),ir(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),A(i,C),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),M=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)at(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==i&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),At?.set(e,t)),this.is_fork||(e.v=t)}activate(){M=this}deactivate(){M=null,At=null}flush(){try{Nt=!0,M=this,this.#g()}finally{It=0,jt=null,Pt=null,Ft=null,Nt=!1,M=null,At=null,Jt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(bt);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,Qe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=x()).promise}static ensure(){if(M===null){let t=M=new e;!Nt&&!Mt&&Qe(()=>{t.#e||t.flush()})}return M}apply(){At=null}schedule(e){if(jt=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(Pt!==null&&t===W&&(H===null||!(H.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=S}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?Ot=e:t.#t=e,this.linked=!1}}};function N(e){var t=Mt;Mt=!0;try{var n;for(e&&(M!==null&&!M.is_fork&&M.flush(),n=e());;){if($e(),M===null)return n;M.flush()}}finally{Mt=t}}function zt(){try{Oe()}catch(e){tt(e,jt)}}var Bt=null;function Vt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&$n(r)&&(Bt=new Set,ir(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Nn(r),Bt?.size>0)){Jt.clear();for(let e of Bt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Bt.has(n)&&(Bt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||ir(n)}}Bt.clear()}}Bt=null}}function Ht(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?Ht(i,t,n,r):e&4194320&&!(e&2048)&&Ut(i,t,r)&&(A(i,C),Wt(i))}}function Ut(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(u.call(t,r))return!0;if(r.f&2&&Ut(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Wt(e){M.schedule(e)}function Gt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),A(e,S);for(var n=e.first;n!==null;)Gt(n,t),n=n.next}}function Kt(e){A(e,S);for(var t=e.first;t!==null;)Kt(t),t=t.next}var qt=new Set,Jt=new Map,Yt=!1;function Xt(e,t){return{f:0,v:e,reactions:null,equals:Ue,rv:0,wv:0}}function P(e,t){let n=Xt(e,t);return Kn(n),n}function Zt(e,t=!1,n=!0){let r=Xt(e);return t||(r.equals=Ge),r}function F(e,t,n=!1){return H!==null&&(!Un||H.f&131072)&&Ye()&&H.f&4325394&&(Gn===null||!Gn.has(e))&&Ne(),Qt(e,n?nn(t):t,Ft)}function Qt(e,t,n=null){if(!e.equals(t)){Jt.set(e,Vn?t:e.v);var r=Rt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&wt(t),At===null&&rt(t)}e.wv=Qn(),tn(e,C,n),Ye()&&W!==null&&W.f&1024&&!(W.f&96)&&(q===null?qn([e]):q.push(e)),!r.is_fork&&qt.size>0&&!Yt&&$t()}return t}function $t(){Yt=!1;for(let e of qt){e.f&1024&&A(e,w);let t;try{t=$n(e)}catch{t=!0}t&&ir(e)}qt.clear()}function en(e){F(e,e.v+1)}function tn(e,t,n){var r=e.reactions;if(r!==null)for(var i=Ye(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===W)){var l=(c&C)===0;if(l&&A(s,t),c&131072)qt.add(s);else if(c&2){var u=s;At?.delete(u),c&65536||(c&512&&(W===null||!(W.f&2097152))&&(s.f|=le),tn(u,w,n))}else if(l){var d=s;c&16&&Bt!==null&&Bt.add(d),n===null?Wt(d):n.push(d)}}}}function nn(e){if(typeof e!=`object`||!e||pe in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=c(e),a=P(0),o=null,s=Xn,l=e=>{if(Xn===s)return e();var t=H,n=Xn;U(null),Zn(s);var r=e();return U(t),Zn(n),r};return r&&n.set(`length`,P(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&je();var i=n.get(t);return i===void 0?l(()=>{var e=P(r.value,o);return n.set(t,e),e}):F(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>P(i,o));n.set(t,e),en(a)}}else F(r,i),en(a);return!0},get(t,r,a){if(r===pe)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||m(t,r)?.writable)&&(s=l(()=>P(nn(c?t[r]:i),o)),n.set(r,s)),s!==void 0){var u=J(s);return u===i?void 0:u}return Reflect.get(t,r,a)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var a=n.get(t);a&&(r.value=J(a))}else if(r===void 0){var o=n.get(t),s=o?.v;if(o!==void 0&&s!==i)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(e,t){if(t===pe)return!0;var r=n.get(t),a=r!==void 0&&r.v!==i||Reflect.has(e,t);return(r!==void 0||W!==null&&(!a||m(e,t)?.writable))&&(r===void 0&&(r=l(()=>P(a?nn(e[t]):i,o)),n.set(t,r)),J(r)===i)?!1:a},set(e,t,s,c){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=s;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=l(()=>P(i,o)),n.set(f+``,p)):F(p,i)}if(u===void 0)(!d||m(e,t)?.writable)&&(u=l(()=>P(void 0,o)),F(u,nn(s)),n.set(t,u));else{d=u.v!==i;var h=l(()=>nn(s));F(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,t);if(g?.set&&g.set.call(c,s),!d){if(r&&typeof t==`string`){var _=n.get(`length`),v=Number(t);Number.isInteger(v)&&v>=_.v&&F(_,v+1)}en(a)}return!0},ownKeys(e){J(a);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==i});for(var[r,o]of n)o.v!==i&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Me()}})}var rn,an,on,sn;function cn(){if(rn===void 0){rn=window,an=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;on=m(t,`firstChild`).get,sn=m(t,`nextSibling`).get,y(e)&&(e[_e]=void 0,e[ge]=null,e[ve]=void 0,e.__e=void 0),y(n)&&(n[ye]=void 0)}}function ln(e=``){return document.createTextNode(e)}function I(e){return on.call(e)}function un(e){return sn.call(e)}function L(e,t){if(!T)return I(e);var n=I(E);if(n===null)n=E.appendChild(ln());else if(t&&n.nodeType!==3){var r=ln();return n?.before(r),D(r),r}return t&&hn(n),D(n),n}function dn(e,t=!1){if(!T){var n=I(e);return n instanceof Comment&&n.data===``?un(n):n}if(t){if(E?.nodeType!==3){var r=ln();return E?.before(r),D(r),r}hn(E)}return E}function R(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=un(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=ln();return r===null?i?.after(a):r.before(a),D(a),a}hn(r)}return D(r),r}function fn(e){e.textContent=``}function pn(){return!1}function mn(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 hn(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 gn(e){W===null&&(H===null&&De(e),Ee()),Vn&&Te(e)}function _n(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function vn(e,t){var n=W;n!==null&&n.f&8192&&(e|=te);var r={ctx:k,deps:null,nodes:null,f:e|C|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)Pt===null?Rt.ensure().schedule(r):Pt.push(r);else if(t!==null){try{ir(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|=ae))}if(i!==null&&(i.parent=n,n!==null&&_n(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function yn(){return H!==null&&!Un}function bn(e){let t=vn(8,null);return A(t,S),t.teardown=e,t}function xn(e){gn(`$effect`);var t=W.f;if(!H&&t&32&&k!==null&&!k.i){var n=k;(n.e??=[]).push(e)}else return Sn(e)}function Sn(e){return vn(4|se,e)}function Cn(e){Rt.ensure();let t=vn(64|oe,e);return()=>{V(t)}}function wn(e){Rt.ensure();let t=vn(64|oe,e);return(e={})=>new Promise(n=>{e.outro?Pn(t,()=>{V(t),n(void 0)}):(V(t),n(void 0))})}function Tn(e){return vn(4,e)}function En(e){return vn(de|oe,e)}function Dn(e,t=0){return vn(8|t,e)}function z(e,t=[],n=[],r=[]){ht(r,t,n,t=>{vn(8,()=>{e(...t.map(J))})})}function On(e,t=0){return vn(16|t,e)}function B(e){return vn(32|oe,e)}function kn(e){var t=e.teardown;if(t!==null){let e=Vn,n=H;Hn(!0),U(null);try{t.call(null)}finally{Hn(e),U(n)}}}function An(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&ut(()=>{e.abort(xe)});var r=n.next;n.f&64?n.parent=null:V(n,t),n=r}}function jn(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&&(Mn(e.nodes.start,e.nodes.end),n=!0),e.f|=ie,An(e,t&&!n),rr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();kn(e),e.f^=ie,e.f|=ne;var i=e.parent;i!==null&&i.first!==null&&Nn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mn(e,t){for(;e!==null;){var n=e===t?null:un(e);e.remove(),e=n}}function Nn(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 Pn(e,t,n=!0){var r=[];Fn(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 Fn(e,t,n){if(!(e.f&8192)){e.f^=te;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Fn(i,t,o?n:!1)}i=a}}}function In(e){Ln(e,!0)}function Ln(e,t){if(e.f&8192){e.f^=te,e.f&1024||(A(e,C),Rt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Ln(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 Rn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:un(n);t.append(n),n=i}}var zn=null,Bn=!1,Vn=!1;function Hn(e){Vn=e}var H=null,Un=!1;function U(e){H=e}var W=null;function Wn(e){W=e}var Gn=null;function Kn(e){H!==null&&(Gn??=new Set).add(e)}var G=null,K=0,q=null;function qn(e){q=e}var Jn=1,Yn=0,Xn=Yn;function Zn(e){Xn=e}function Qn(){return++Jn}function $n(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~le),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if($n(a)&&Tt(a),a.wv>e.wv)return!0}t&512&&At===null&&A(e,S)}return!1}function er(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Gn!==null&&Gn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?er(a,t,!1):t===a&&(n?A(a,C):a.f&1024&&A(a,w),Wt(a))}}function tr(e){var t=G,n=K,r=q,i=H,a=Gn,o=k,s=Un,c=Xn,l=e.f;G=null,K=0,q=null,H=l&96?null:e,Gn=null,Ke(e.ctx),Un=!1,Xn=++Yn,e.ac!==null&&(ut(()=>{e.ac.abort(xe)}),e.ac=null);try{e.f|=ue;var u=e.fn,d=u();e.f|=re;var f=e.deps,p=M?.is_fork;if(G!==null){var m;if(p||rr(e,K),f!==null&&K>0)for(f.length=K+G.length,m=0;m<G.length;m++)f[K+m]=G[m];else e.deps=f=G;if(yn()&&e.f&512)for(m=K;m<f.length;m++)(f[m].reactions??=[]).push(e)}else!p&&f!==null&&K<f.length&&(rr(e,K),f.length=K);if(Ye()&&q!==null&&!Un&&f!==null&&!(e.f&6146))for(m=0;m<q.length;m++)er(q[m],e);if(i!==null&&i!==e){if(Yn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Yn;if(t!==null)for(let e of t)e.rv=Yn;q!==null&&(r===null?r=q:r.push(...q))}return e.f&8388608&&(e.f^=fe),d}catch(e){return et(e)}finally{e.f^=ue,G=t,K=n,q=r,H=i,Gn=a,Ke(o),Un=s,Xn=c}}function nr(e,t){let n=t.reactions;if(n!==null){var r=l.call(n,e);if(r!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[r]=n[a],n.pop())}}if(n===null&&t.f&2&&(G===null||!u.call(G,t))){var o=t;o.f&512&&(o.f^=512,o.f&=~le),o.v!==i&&rt(o),o.ac!==null&&ut(()=>{o.ac.abort(xe),o.ac=null,A(o,C)}),Et(o),rr(o,0)}}function rr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)nr(e,n[r])}function ir(e){var t=e.f;if(!(t&16384)){A(e,S);var n=W,r=Bn;W=e,Bn=(t&96)==0;try{t&16777232?jn(e):An(e),kn(e);var i=tr(e);e.teardown=typeof i==`function`?i:null,e.wv=Jn}finally{Bn=r,W=n}}}function J(e){var t=(e.f&2)!=0;if(zn?.add(e),H!==null&&!Un&&!(W!==null&&W.f&16384)&&(Gn===null||!Gn.has(e))){var n=H.deps;if(H.f&2097152)e.rv<Yn&&(e.rv=Yn,G===null&&n!==null&&n[K]===e?K++:G===null?G=[e]:G.push(e));else{H.deps??=[],u.call(H.deps,e)||H.deps.push(e);var r=e.reactions;r===null?e.reactions=[H]:u.call(r,H)||r.push(H)}}if(Vn&&Jt.has(e))return Jt.get(e);if(t){var i=e;if(Vn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||or(i))&&(a=wt(i)),Jt.set(i,a),a}var o=(i.f&512)==0&&!Un&&H!==null&&(Bn||(H.f&512)!=0),s=(i.f&re)===0;$n(i)&&(o&&(i.f|=512),Tt(i)),o&&!s&&(Dt(i),ar(i))}if(At?.has(e))return At.get(e);if(e.f&8388608)throw e.v;return e.v}function ar(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Dt(t),ar(t))}function or(e){if(e.v===i)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Jt.has(t)||t.f&2&&or(t))return!0;return!1}function sr(e){var t=Un;try{return Un=!0,e()}finally{Un=t}}var cr=Symbol(`events`),lr=new Set,ur=new Set,dr=null;function fr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;dr=e;var o=0,s=dr===e&&e[cr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[cr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){p(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=H,d=W;U(null),Wn(null);try{for(var f,m=[];a!==null&&a!==t;){try{var h=a[cr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?m.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of m)queueMicrotask(()=>{throw e});throw f}}finally{e[cr]=t,delete e.currentTarget,U(u),Wn(d)}}}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=mn(`template`);return t.innerHTML=mr(e.replaceAll(`<!>`,`<!---->`)),t.content}function gr(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Y(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=I(i)));var t=r||an?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=I(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=I(hr(a));if(i)for(o=document.createDocumentFragment();I(e);)o.appendChild(I(e));else o=I(e)}var t=o.cloneNode(!0);if(i){var n=I(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=ln();return e.append(t,n),gr(t,n),e}function X(e,t){if(T){var n=W;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),ze();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,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ye]??=e.nodeValue)&&(e[ye]=n,e.nodeValue=`${n}`)}function Cr(e,t){return Er(e,t)}function wr(e,t){cn(),t.intro=t.intro??!1;let n=t.target,i=T,a=E;try{for(var o=I(n);o&&(o.nodeType!==8||o.data!==`[`);)o=un(o);if(!o)throw r;Re(!0),D(o);let i=Er(e,{...t,anchor:o});return Re(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
|
-
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==r&&console.warn(`Failed to hydrate: `,i),t.recover===!1&&
|
|
3
|
-
\r\f\xA0\v`];function Hr(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||Vr.includes(r[o-1]))&&(s===r.length||Vr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ur(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 Wr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Gr(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(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Wr)),i&&c.push(...Object.keys(i).map(Wr));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=Wr(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+=Ur(r)),i&&(n+=Ur(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Kr(e,t,n,r,i,a){var o=e[_e];if(T||o!==n||o===void 0){var s=Hr(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[_e]=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 qr(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 Jr(e,t,n,r){var i=e[ve];if(T||i!==t){var a=Gr(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ve]=t}else r&&(Array.isArray(r)?(qr(e,n?.[0],r[0]),qr(e,n?.[1],r[1],`important`)):qr(e,n,r));return r}var Yr=Symbol(`is custom element`),Xr=Symbol(`is html`),Zr=Se?`link`:`LINK`,Qr=Se?`progress`:`PROGRESS`;function $r(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Q(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Q(e,`checked`,null),e.checked=r}}};e[be]=n,Qe(n),lt()}}function ei(e,t){var n=ni(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Qr)||(e.value=t??``)}function ti(e,t){var n=ni(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Q(e,t,n,r){var i=ni(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Zr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[he]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ii(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ni(e){return e[ge]??={[Yr]:e.nodeName.includes(`-`),[Xr]:e.namespaceURI===a}}var ri=new Map;function ii(e){var t=e.getAttribute(`is`)||e.nodeName,n=ri.get(t);if(n)return n;ri.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=v(i)}return n}function ai(e,t){return e===t||e?.[pe]===t}function oi(e={},t,n,r){var i=k.r,a=W;return Tn(()=>{var o,s;return Dn(()=>{o=s,s=r?.()||[],sr(()=>{ai(n(...s),e)||(t(e,...s),o&&ai(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&&ai(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function $(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??=yt(r),J(l)):(c&&(c=!1,s=o?sr(r):r),s);let d;if(a){var f=pe in e||me in e;d=m(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,h=!1;a?[p,h]=st(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Ae(t),d(p)));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(d){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&d(t?g():e),e):g()})}var v=!1,y=(n&1?yt:St)(()=>(v=!1,g()));a&&J(y);var ee=W;return(function(e,t){if(arguments.length>0){let n=t?J(y):i&&a?nn(e):e;return F(y,n),v=!0,s!==void 0&&(s=n),e}return Vn&&v||ee.f&16384?y.v:J(y)})}function si(e){return new ci(e)}var ci=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 J(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===me?!0:(J(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return F(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?wr:Cr)(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)&&N(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||p(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=()=>{Or(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()}},li;typeof HTMLElement==`function`&&(li=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=mn(`slot`);e!=="default"&&(n.name=e),X(t,n)}}let t={},n=di(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]=ui(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=si({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Cn(()=>{Dn(()=>{this.$$r=!0;for(let e of f(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=ui(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]=ui(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 f(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ui(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 di(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function fi(e,t,n,r,i,a){let o=class extends li{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return f(t).map(e=>(t[e].attribute||e).toLowerCase())}};return f(t).forEach(e=>{p(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=ui(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(m(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{p(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var pi=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}},mi=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}},hi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function gi(e,t={}){let n=t.hostPredicate??hi,r=e;for(;r;){if(n(r))return r;r=r.parentElement}if(typeof document<`u`&&t.fallbackSelector){let e=document.querySelector(t.fallbackSelector);if(n(e))return e}return null}function _i({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=gi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new mi(n,r)),a):null}function vi(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var yi=Y(`<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),bi=Y(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),xi=Y(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),Si=Y(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Ci=Y(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),wi={hash:`svelte-ypdwb3`,code:`.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 Ti(e,t){qe(t,!0),Br(e,wi);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=$(t,`hasAudio`,7,!1),i=$(t,`audioUrl`,7),a=$(t,`useFeatureButtonAudio`,7,!1),o=$(t,`autoplayEnabled`,7,!1),s=$(t,`featureAudioSkin`,7),c=$(t,`uiText`,7),l=$(t,`locale`,7,``),u=$(t,`onaudiostarted`,7),d=$(t,`onaudioended`,7),f=P(null),p=P(null),m=P(null),h=P(nn(n.IDLE)),g=j(()=>vi({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),_=j(()=>J(h)===n.PLAYING),v=j(()=>J(h)===n.BLOCKED),y=j(()=>J(g)===`error`?c().audioResourceUnavailable:``);xn(()=>{i(),F(h,n.IDLE,!0)});function ee(){J(g)!==`none`&&J(g)!==`error`&&J(f)&&J(f).play().catch(()=>{})}function b(){J(g)!==`none`&&J(g)!==`error`&&J(f)&&J(f).play().finally(()=>{J(h)===n.BLOCKED&&F(h,n.PAUSED,!0)})}function x(e,t,n){xn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>J(f),`playing`,()=>{F(h,n.PLAYING,!0),u()?.()}),x(()=>J(f),`ended`,()=>{F(h,n.PAUSED,!0),d()?.()}),x(()=>J(p),`click`,()=>ee()),x(()=>J(m),`click`,()=>b()),xn(()=>{!o()||J(g)===`none`||J(g)===`error`||J(h)===n.IDLE&&J(f)&&i()&&(F(h,n.PAUSED,!0),J(f).play().catch(()=>{F(h,n.BLOCKED,!0)}))});function S(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function C(e=``){return e.toLowerCase().startsWith(`es`)?c().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:c().listenSilentAlt??`Repeat instructions`}function w(e=``){return e.toLowerCase().startsWith(`es`)?c().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:c().listenPlayingAlt??`Instructions are playing`}var te={get hasAudio(){return r()},set hasAudio(e=!1){r(e),N()},get audioUrl(){return i()},set audioUrl(e){i(e),N()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),N()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),N()},get featureAudioSkin(){return s()},set featureAudioSkin(e){s(e),N()},get uiText(){return c()},set uiText(e){c(e),N()},get locale(){return l()},set locale(e=``){l(e),N()},get onaudiostarted(){return u()},set onaudiostarted(e){u(e),N()},get onaudioended(){return d()},set onaudioended(e){d(e),N()}},ne=yr(),re=dn(ne),ie=e=>{var t=Ci(),n=L(t),r=e=>{var t=yi(),n=dn(t);oi(n,e=>F(f,e),()=>J(f));var r=R(n,2),a=L(r),o=R(a,2);O(r),oi(r,e=>F(p,e),()=>J(p)),z((e,t,c)=>{Q(n,`src`,i()),Q(r,`aria-label`,e),Kr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${J(_)?``:`listen-active`}`,`svelte-ypdwb3`),Q(a,`src`,s().silentUrl),Q(a,`alt`,t),Kr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${J(_)?`listen-active`:``}`,`svelte-ypdwb3`),Q(o,`src`,s().playingUrl),Q(o,`alt`,c)},[()=>S(l()),()=>C(l()),()=>w(l())]),X(e,t)},a=e=>{var t=xi(),n=dn(t);oi(n,e=>F(f,e),()=>J(f));var r=R(n,2),a=e=>{var t=bi(),n=L(t,!0);O(t),oi(t,e=>F(m,e),()=>J(m)),z(()=>Sr(n,c().clickToEnableAutoplay)),X(e,t)};Z(r,e=>{J(v)&&e(a)}),z(()=>Q(n,`src`,i())),X(e,t)},o=e=>{var t=Si(),n=L(t,!0);O(t),z(()=>Sr(n,J(y))),X(e,t)};Z(n,e=>{J(g)===`feature-button`?e(r):J(g)===`controls`?e(a,1):J(g)===`error`&&e(o,2)}),O(t),X(e,t)};return Z(re,e=>{J(g)!==`none`&&e(ie)}),X(e,ne),Je(te)}fi(Ti,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var Ei=Y(`<img class="w-auto object-contain pie-blank-image" style="max-height:var(--mpb-selected-image-max-height, 4rem);"/>`),Di=Y(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Oi=Y(`<span class="cloze-marker-empty svelte-d9l5tb" aria-hidden="true"> </span>`),ki=Y(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Ai={hash:`svelte-d9l5tb`,code:`.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.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-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;}`};function ji(e,t){qe(t,!0),Br(e,Ai);let n=$(t,`choiceMode`,7,`text`),r=$(t,`displayChoice`,7,void 0),i=$(t,`displayChoiceLabelHtml`,7,``),a=$(t,`isStandalone`,7,!1),o=$(t,`blankWidth`,7),s=$(t,`blankBorderWidth`,7),c=$(t,`ariaLabel`,7);var l={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),N()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),N()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),N()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),N()},get blankWidth(){return o()},set blankWidth(e){o(e),N()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),N()},get ariaLabel(){return c()},set ariaLabel(e){c(e),N()}},u=ki(),d=L(u),f=e=>{var t=Ei();z(()=>{Q(t,`src`,r().imageUrl),Q(t,`alt`,r().imageAlt||`Selected answer image`)}),X(e,t)},p=e=>{var t=Di();zr(t,i,!0),O(t),X(e,t)},m=e=>{X(e,Oi())};return Z(d,e=>{n()===`image`&&r()?.imageUrl?e(f):i()?e(p,1):e(m,-1)}),O(u),z(()=>{Kr(u,1,`inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),Jr(u,`width:${o()};border-bottom-width:${s()};`),Q(u,`aria-label`,c())}),X(e,u),Je(l)}fi(ji,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{}},[],[],{mode:`open`});var Mi=Y(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Ni=Y(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Pi=Y(`<label class="cursor-pointer choice-tile text-center 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>`),Fi=Y(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Ii=Y(`<span aria-hidden="true"> </span>`),Li=Y(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Ri={hash:`svelte-8xu1pt`,code:`.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;}.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-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-background-dark, #ecedf1);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-tertiary, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-incorrect-icon, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-secondary, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-incorrect-secondary, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-white, #ffffff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-icon, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-incorrect-icon, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}`};function zi(e,t){qe(t,!0),Br(e,Ri);let n=$(t,`choice`,7),r=$(t,`choiceMode`,7,`text`),i=$(t,`isHorizontal`,7,!1),a=$(t,`isSelected`,7,!1),o=$(t,`isDisabled`,7,!1),s=$(t,`correctness`,7,void 0),c=$(t,`isEvaluateMode`,7,!1),l=$(t,`instanceId`,7),u=$(t,`radioGroupName`,7);var d={get choice(){return n()},set choice(e){n(e),N()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),N()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),N()},get isSelected(){return a()},set isSelected(e=!1){a(e),N()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),N()},get correctness(){return s()},set correctness(e=void 0){s(e),N()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),N()},get instanceId(){return l()},set instanceId(e){l(e),N()},get radioGroupName(){return u()},set radioGroupName(e){u(e),N()}},f=Li(),p=L(f),m=e=>{var t=Pi(),i=L(t),s=L(i),c=e=>{var t=Mi();z(()=>{Q(t,`src`,n().imageUrl),Q(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),X(e,t)},d=e=>{var t=Ni();zr(t,()=>n().labelHtml||``,!0),O(t),X(e,t)};Z(s,e=>{r()===`image`&&n().imageUrl?e(c):e(d,-1)}),O(i);var f=R(i,2);$r(f),O(t),z(()=>{Q(t,`for`,`${l()}-opt-${n().id}`),Q(f,`name`,u()),Q(f,`id`,`${l()}-opt-${n().id}`),ei(f,n().id),ti(f,a()),f.disabled=o()}),X(e,t)},h=e=>{var t=Fi(),i=dn(t);$r(i);var s=R(i,2),c=L(s),d=e=>{var t=Mi();z(()=>{Q(t,`src`,n().imageUrl),Q(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),X(e,t)},f=e=>{var t=Ni();zr(t,()=>n().labelHtml||``,!0),O(t),X(e,t)};Z(c,e=>{r()===`image`&&n().imageUrl?e(d):e(f,-1)}),O(s),z(()=>{Q(i,`name`,u()),Q(i,`id`,`${l()}-opt-${n().id}`),ei(i,n().id),ti(i,a()),i.disabled=o(),Q(s,`for`,`${l()}-opt-${n().id}`)}),X(e,t)};Z(p,e=>{i()?e(m):e(h,-1)});var g=R(p,2),_=e=>{var t=Ii(),n=L(t,!0);O(t),z(()=>{Kr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Sr(n,s()===`correct`?`✓`:`✕`)}),X(e,t)};return Z(g,e=>{c()&&s()&&e(_)}),O(f),z(()=>Kr(f,1,`flex items-start 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`)),X(e,f),Je(d)}fi(zi,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{}},[],[],{mode:`open`});function Bi(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 Vi=`{{blank}}`,Hi=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Ui(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(/ /g,` `).trim()===Vi:!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&&Hi.has(i)}}var Wi={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,selectedImageMaxHeightRem:4,choiceImageMaxHeightRem:5,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,narrowHorizontalChoiceMaxWidthPx:230,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},Gi={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`},selectedImageMaxHeightRem:{varName:`--mpb-selected-image-max-height`,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`},narrowHorizontalChoiceMaxWidthPx:{varName:`--mpb-narrow-choice-max-width`,unit:`px`},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`}},Ki={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 qi(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={...Ki[t]??{},...a},s={...Wi,...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(Gi).map(e=>`${Gi[e].varName}:${s[e]}${Gi[e].unit}`).join(`;`),blankWidth:u,blankBorderWidth:d,legendMaxChars:s.legendMaxChars}}var Ji={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 Yi(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`)?Ji.es:Ji.default;return r[t]||r[n]||r.default||i||a}function Xi(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,alwaysShowCorrect:i,correctChoiceId:a}=e;return i&&a||n&&r&&a?a:t}function Zi(e){let{isEvaluateMode:t,showCorrectAnswer:n,isCorrect:r,isIncorrect:i,selectedId:a}=e;return!t||n?``:r?`Correct answer selected`:i&&a?`Incorrect answer selected`:``}function Qi(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 $i=`/* Shared base styles for all sel_r1-*_plusggg variants.
|
|
1
|
+
(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var r={},i=Symbol(`uninitialized`),a=`http://www.w3.org/1999/xhtml`,o=`http://www.w3.org/2000/svg`,s=`http://www.w3.org/1998/Math/MathML`,c=Array.isArray,l=Array.prototype.indexOf,u=Array.prototype.includes,d=Array.from,f=Object.keys,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,g=Object.prototype,_=Array.prototype,v=Object.getPrototypeOf,y=Object.isExtensible,ee=()=>{};function b(e){for(var t=0;t<e.length;t++)e[t]()}function x(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var S=1024,C=2048,w=4096,te=8192,ne=16384,re=32768,ie=1<<25,ae=65536,oe=1<<19,se=1<<20,ce=1<<25,le=65536,ue=1<<21,de=1<<22,fe=1<<23,pe=Symbol(`$state`),me=Symbol(`component`),he=Symbol(`legacy props`),ge=Symbol(``),_e=Symbol(`attributes`),ve=Symbol(`class`),ye=Symbol(`style`),be=Symbol(`text`),xe=Symbol(`form reset`),Se=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ce=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function we(){console.warn(`https://svelte.dev/e/derived_inert`)}function Te(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ee(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function De(e){T=e}var E;function D(e){if(e===null)throw Te(),r;return E=e}function O(){return D(an(E))}function k(e){if(T){if(an(E)!==null)throw Te(),r;E=e}}function Oe(e=1){if(T){for(var t=e,n=E;t--;)n=an(n);E=n}}function ke(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=an(n);e&&n.remove(),n=i}}function Ae(e){if(!e||e.nodeType!==8)throw Te(),r;return e.data}function je(e){return e===this.v}function Me(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ne(e){return!Me(e,this.v)}function Pe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Fe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Le(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Re(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function ze(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Be(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function He(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ue(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ge(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var A=null;function Ke(e){A=e}function qe(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:W,l:null}}function Je(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)bn(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,Ye(e)}function Ye(e={}){return p(e,me,{value:!0}),e}function Xe(){return!0}var Ze=[];function Qe(){var e=Ze;Ze=[],b(e)}function $e(e){if(Ze.length===0&&!Dt){var t=Ze;queueMicrotask(()=>{t===Ze&&Qe()})}Ze.push(e)}function et(){for(;Ze.length>0;)Qe()}var tt=~(C|w|S);function j(e,t){e.f=e.f&tt|t}function nt(e){e.f&512||e.deps===null?j(e,S):j(e,w)}function rt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=le,rt(t.deps))}function it(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),rt(e.deps),j(e,S)}var at=!1;function ot(e){var t=at;try{return at=!1,[e(),at]}finally{at=t}}var st=!1;function ct(){st||(st=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[xe]?.()})},{capture:!0}))}function lt(e){var t=U,n=W;Hn(null),Un(null);try{return e()}finally{Hn(t),Un(n)}}function ut(e,t,n,r){let i=Xe()?mt:_t;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=W,c=dt(),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){pn(e,s)}ft()}}var d=pt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>gt(e))).then(u).catch(e=>pn(e,s)).finally(d)}l?l.then(()=>{c(),f(),ft()}):f()}function dt(){var e=W,t=U,n=A,r=N;return function(i=!0){Un(e),Hn(t),Ke(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function ft(e=!0){Un(null),Hn(null),Ke(null),e&&N?.deactivate()}function pt(){var e=W,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 mt(e){var t=2|C;return W!==null&&(W.f|=oe),{ctx:A,deps:null,effects:null,equals:je,f:t,fn:e,reactions:null,rv:0,v:i,wv:0,parent:W,ac:null}}var ht=Symbol(`obsolete`);function gt(e,t,n){let r=W;r===null&&Pe();var a=void 0,o=Gt(i),s=!U,c=new Set;return wn(()=>{var t=W,n=x();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==Se&&n.reject(e)}).finally(ft)}catch(e){n.reject(e),ft()}var i=N;if(s){if(t.f&32768)var l=pt();if(r.b?.is_rendered())i.async_deriveds.get(t)?.reject(ht);else for(let e of c.values())e.reject(ht);c.add(n),i.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ht&&(i.activate(),t?(o.f|=fe,qt(o,t)):(o.f&8388608&&(o.f^=fe),qt(o,e)),i.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),vn(()=>{for(let e of c)e.reject(ht)}),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=mt(e);return Gn(t),t}function _t(e){let t=mt(e);return t.equals=Ne,t}function vt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)H(t[n])}}function yt(e){var t,n=W,r=e.parent;if(!zn&&r!==null&&e.v!==i&&r.f&24576)return we(),e.v;Un(r);try{e.f&=~le,vt(e),t=tr(e)}finally{Un(n)}return t}function bt(e){var t=yt(e);if(!e.equals(t)&&(e.wv=Qn(),(!N?.is_fork||e.deps===null)&&(N===null?e.v=t:(N.capture(e,t,!0),wt?.capture(e,t,!0)),e.deps===null))){j(e,S);return}zn||(Tt===null?nt(e):(_n()||N?.is_fork)&&Tt.set(e,t))}function xt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&<(()=>{t.ac.abort(Se),t.ac=null}),t.fn!==null&&(t.teardown=ee),ir(t,0),On(t))}function St(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ar(t)}var Ct=null,N=null,wt=null,Tt=null,Et=null,Dt=!1,Ot=!1,kt=null,At=null,jt=0,Mt=1,Nt=class e{id=Mt++;#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(){Ct===null?Ct=this:(Ct.#n=this,this.#t=Ct),Ct=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,C),t(r);for(r of n.m)j(r,w),t(r)}this.#p.add(e)}#g(){this.#e=!0,jt++>1e3&&(this.#x(),Pt());for(let e of this.#u)this.#d.delete(e),j(e,C),this.schedule(e);for(let e of this.#d)j(e,w),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=kt=[],r=[],i=At=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Vt(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(kt=null,At=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Bt(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(),wt=this,It(r),It(n),wt=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&&(Ut.clear(),s.#g())}#_(e,t,n){e.f^=S;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^=S:i&4?t.push(r):$n(r)&&(i&16&&this.#d.add(r),ar(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,C),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)it(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==i&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Tt?.set(e,t)),this.is_fork||(e.v=t)}activate(){N=this}deactivate(){N=null,Tt=null}flush(){try{Ot=!0,N=this,this.#g()}finally{jt=0,Et=null,kt=null,At=null,Ot=!1,N=null,Tt=null,Ut.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ht);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,$e(()=>{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??=x()).promise}static ensure(){if(N===null){let t=N=new e;!Ot&&!Dt&&$e(()=>{t.#e||t.flush()})}return N}apply(){Tt=null}schedule(e){if(Et=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(kt!==null&&t===W&&(U===null||!(U.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=S}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?Ct=e:t.#t=e,this.linked=!1}}};function P(e){var t=Dt;Dt=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(et(),N===null)return n;N.flush()}}finally{Dt=t}}function Pt(){try{ze()}catch(e){pn(e,Et)}}var Ft=null;function It(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&$n(r)&&(Ft=new Set,ar(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jn(r),Ft?.size>0)){Ut.clear();for(let e of Ft){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ft.has(n)&&(Ft.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||ar(n)}}Ft.clear()}}Ft=null}}function Lt(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?Lt(i,t,n,r):e&4194320&&!(e&2048)&&Rt(i,t,r)&&(j(i,C),zt(i))}}function Rt(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(u.call(t,r))return!0;if(r.f&2&&Rt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function zt(e){N.schedule(e)}function Bt(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,S);for(var n=e.first;n!==null;)Bt(n,t),n=n.next}}function Vt(e){j(e,S);for(var t=e.first;t!==null;)Vt(t),t=t.next}var Ht=new Set,Ut=new Map,Wt=!1;function Gt(e,t){return{f:0,v:e,reactions:null,equals:je,rv:0,wv:0}}function F(e,t){let n=Gt(e,t);return Gn(n),n}function Kt(e,t=!1,n=!0){let r=Gt(e);return t||(r.equals=Ne),r}function I(e,t,n=!1){return U!==null&&(!Vn||U.f&131072)&&Xe()&&U.f&4325394&&(Wn===null||!Wn.has(e))&&We(),qt(e,n?Zt(t):t,At)}function qt(e,t,n=null){if(!e.equals(t)){zn?Ut.set(e,t):Ut.has(e)||Ut.set(e,e.v);var r=Nt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&yt(t),Tt===null&&nt(t)}e.wv=Qn(),Xt(e,C,n),Xe()&&W!==null&&W.f&1024&&!(W.f&96)&&(Kn===null?qn([e]):Kn.push(e)),!r.is_fork&&Ht.size>0&&!Wt&&Jt()}return t}function Jt(){Wt=!1;for(let e of Ht){e.f&1024&&j(e,w);let t;try{t=$n(e)}catch{t=!0}t&&ar(e)}Ht.clear()}function Yt(e){I(e,e.v+1)}function Xt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Xe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===W)){var l=(c&C)===0;if(l&&j(s,t),c&131072)Ht.add(s);else if(c&2){var u=s;Tt?.delete(u),c&65536||(c&512&&(W===null||!(W.f&2097152))&&(s.f|=le),Xt(u,w,n))}else if(l){var d=s;c&16&&Ft!==null&&Ft.add(d),n===null?zt(d):n.push(d)}}}}function Zt(e){if(typeof e!=`object`||!e||pe in e||me in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=c(e),a=F(0),o=null,s=Xn,l=e=>{if(Xn===s)return e();var t=U,n=Xn;Hn(null),Zn(s);var r=e();return Hn(t),Zn(n),r};return r&&n.set(`length`,F(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&He();var i=n.get(t);return i===void 0?l(()=>{var e=F(r.value,o);return n.set(t,e),e}):I(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>F(i,o));n.set(t,e),Yt(a)}}else I(r,i),Yt(a);return!0},get(t,r,a){if(r===pe)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||m(t,r)?.writable)&&(s=l(()=>F(Zt(c?t[r]:i),o)),n.set(r,s)),s!==void 0){var u=q(s);return u===i?void 0:u}return Reflect.get(t,r,a)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var a=n.get(t);a&&(r.value=q(a))}else if(r===void 0){var o=n.get(t),s=o?.v;if(o!==void 0&&s!==i)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(e,t){if(t===pe)return!0;var r=n.get(t),a=r!==void 0&&r.v!==i||Reflect.has(e,t);return(r!==void 0||W!==null&&(!a||m(e,t)?.writable))&&(r===void 0&&(r=l(()=>F(a?Zt(e[t]):i,o)),n.set(t,r)),q(r)===i)?!1:a},set(e,t,s,c){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=s;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=l(()=>F(i,o)),n.set(f+``,p)):I(p,i)}if(u===void 0)(!d||m(e,t)?.writable)&&(u=l(()=>F(void 0,o)),I(u,Zt(s)),n.set(t,u));else{d=u.v!==i;var h=l(()=>Zt(s));I(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,t);if(g?.set&&g.set.call(c,s),!d){if(r&&typeof t==`string`){var _=n.get(`length`),v=Number(t);Number.isInteger(v)&&v>=_.v&&I(_,v+1)}Yt(a)}return!0},ownKeys(e){q(a);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==i});for(var[r,o]of n)o.v!==i&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ue()}})}var Qt,$t,en,tn;function nn(){if(Qt===void 0){Qt=window,$t=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;en=m(t,`firstChild`).get,tn=m(t,`nextSibling`).get,y(e)&&(e[ve]=void 0,e[_e]=null,e[ye]=void 0,e.__e=void 0),y(n)&&(n[be]=void 0)}}function rn(e=``){return document.createTextNode(e)}function L(e){return en.call(e)}function an(e){return tn.call(e)}function R(e,t){if(!T)return L(e);var n=L(E);if(n===null)n=E.appendChild(rn());else if(t&&n.nodeType!==3){var r=rn();return n?.before(r),D(r),r}return t&&dn(n),D(n),n}function on(e,t=!1){if(!T){var n=L(e);return n instanceof Comment&&n.data===``?an(n):n}if(t){if(E?.nodeType!==3){var r=rn();return E?.before(r),D(r),r}dn(E)}return E}function sn(e,t=!1){if(!T)return L(e);var n=R(e,t);return k(e),n}function z(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=an(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=rn();return r===null?i?.after(a):r.before(a),D(a),a}dn(r)}return D(r),r}function cn(e){e.textContent=``}function ln(){return!1}function un(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 dn(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 fn(e){var t=W;if(t===null)return U.f|=fe,e;if(!(t.f&32768)&&!(t.f&4))throw e;pn(e,t)}function pn(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 mn(e){W===null&&(U===null&&Re(e),Le()),zn&&Ie(e)}function hn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function gn(e,t){var n=W;n!==null&&n.f&8192&&(e|=te);var r={ctx:A,deps:null,nodes:null,f:e|C|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)kt===null?Nt.ensure().schedule(r):kt.push(r);else if(t!==null){try{ar(r)}catch(e){throw H(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|=ae))}if(i!==null&&(i.parent=n,n!==null&&hn(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function _n(){return U!==null&&!Vn}function vn(e){let t=gn(8,null);return j(t,S),t.teardown=e,t}function yn(e){mn(`$effect`);var t=W.f;if(!U&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return bn(e)}function bn(e){return gn(4|se,e)}function xn(e){Nt.ensure();let t=gn(64|oe,e);return()=>{H(t)}}function Sn(e){Nt.ensure();let t=gn(64|oe,e);return(e={})=>new Promise(n=>{e.outro?Mn(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function Cn(e){return gn(4,e)}function wn(e){return gn(de|oe,e)}function Tn(e,t=0){return gn(8|t,e)}function B(e,t=[],n=[],r=[]){ut(r,t,n,t=>{gn(8,()=>{e(...t.map(q))})})}function En(e,t=0){return gn(16|t,e)}function V(e){return gn(32|oe,e)}function Dn(e){var t=e.teardown;if(t!==null){let n=zn,r=U;Bn(!0),Hn(null);try{t.call(null)}catch(t){pn(t,e.parent)}finally{Bn(n),Hn(r)}}}function On(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&<(()=>{e.abort(Se)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function kn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||H(t),t=n}}function H(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(An(e.nodes.start,e.nodes.end),n=!0),e.f|=ie,On(e,t&&!n),ir(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Dn(e),e.f^=ie,e.f|=ne;var i=e.parent;i!==null&&i.first!==null&&jn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function An(e,t){for(;e!==null;){var n=e===t?null:an(e);e.remove(),e=n}}function jn(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 Mn(e,t,n=!0){var r=[];e.f|=256,Nn(e,r,!0);var i=()=>{n&&H(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Nn(e,t,n){if(!(e.f&8192)){e.f^=te;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Nn(i,t,o?n:!1)}i=a}}}function Pn(e){e.f&=-257,Fn(e,!0)}function Fn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=te,e.f&1024||(j(e,C),Nt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Fn(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 In(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:an(n);t.append(n),n=i}}var Ln=null,Rn=!1,zn=!1;function Bn(e){zn=e}var U=null,Vn=!1;function Hn(e){U=e}var W=null;function Un(e){W=e}var Wn=null;function Gn(e){U!==null&&(Wn??=new Set).add(e)}var G=null,K=0,Kn=null;function qn(e){Kn=e}var Jn=1,Yn=0,Xn=Yn;function Zn(e){Xn=e}function Qn(){return++Jn}function $n(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~le),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if($n(a)&&bt(a),a.wv>e.wv)return!0}t&512&&Tt===null&&j(e,S)}return!1}function er(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Wn!==null&&Wn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?er(a,t,!1):t===a&&(n?j(a,C):a.f&1024&&j(a,w),zt(a))}}function tr(e){var t=G,n=K,r=Kn,i=U,a=Wn,o=A,s=Vn,c=Xn,l=e.f;G=null,K=0,Kn=null,U=l&96?null:e,Wn=null,Ke(e.ctx),Vn=!1,Xn=++Yn,e.ac!==null&&(lt(()=>{e.ac.abort(Se)}),e.ac=null);try{e.f|=ue;var u=e.fn,d=u();e.f|=re;var f=nr(e);if(Xe()&&Kn!==null&&!Vn&&f!==null&&!(e.f&6146))for(var p=0;p<Kn.length;p++)er(Kn[p],e);if(i!==null&&i!==e){if(Yn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Yn;if(t!==null)for(let e of t)e.rv=Yn;Kn!==null&&(r===null?r=Kn:r.push(...Kn))}return e.f&8388608&&(e.f^=fe),d}catch(t){return nr(e),fn(t)}finally{e.f^=ue,G=t,K=n,Kn=r,U=i,Wn=a,Ke(o),Vn=s,Xn=c}}function nr(e){var t=e.deps,n=N?.is_fork;if(G!==null){var r;if(n||ir(e,K),t!==null&&K>0)for(t.length=K+G.length,r=0;r<G.length;r++)t[K+r]=G[r];else e.deps=t=G;if(_n()&&e.f&512)for(r=K;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&K<t.length&&(ir(e,K),t.length=K);return t}function rr(e,t){let n=t.reactions;if(n!==null){var r=l.call(n,e);if(r!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[r]=n[a],n.pop())}}if(n===null&&t.f&2&&(G===null||!u.call(G,t))){var o=t;o.f&512&&(o.f^=512,o.f&=~le),o.v!==i&&nt(o),o.ac!==null&<(()=>{o.ac.abort(Se),o.ac=null,j(o,C)}),xt(o),ir(o,0)}}function ir(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)rr(e,n[r])}function ar(e){var t=e.f;if(!(t&16384)){j(e,S);var n=W,r=Rn;W=e,Rn=(t&96)==0;try{t&16777232?kn(e):On(e),Dn(e);var i=tr(e);e.teardown=typeof i==`function`?i:null,e.wv=Jn}finally{Rn=r,W=n}}}function q(e){var t=(e.f&2)!=0;if(Ln?.add(e),U!==null&&!Vn&&!(W!==null&&W.f&16384)&&(Wn===null||!Wn.has(e))){var n=U.deps;if(U.f&2097152)e.rv<Yn&&(e.rv=Yn,G===null&&n!==null&&n[K]===e?K++:G===null?G=[e]:G.push(e));else{U.deps??=[],u.call(U.deps,e)||U.deps.push(e);var r=e.reactions;r===null?e.reactions=[U]:u.call(r,U)||r.push(U)}}if(zn&&Ut.has(e))return Ut.get(e);if(t){var i=e;if(zn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||sr(i))&&(a=yt(i)),Ut.set(i,a),a}var o=(i.f&512)==0&&!Vn&&U!==null&&(Rn||(U.f&512)!=0),s=(i.f&re)===0;$n(i)&&(o&&(i.f|=512),bt(i)),o&&!s&&(St(i),or(i))}if(Tt?.has(e))return Tt.get(e);if(e.f&8388608)throw e.v;return e.v}function or(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(St(t),or(t))}function sr(e){if(e.v===i)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ut.has(t)||t.f&2&&sr(t))return!0;return!1}function cr(e){var t=Vn;try{return Vn=!0,e()}finally{Vn=t}}var lr=Symbol(`events`),ur=new Set,dr=new Set,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[lr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[lr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){p(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=U,d=W;Hn(null),Un(null);try{for(var f,m=[];a!==null&&a!==t;){try{var h=a[lr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?m.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of m)queueMicrotask(()=>{throw e});throw f}}finally{e[lr]=t,delete e.currentTarget,Hn(u),Un(d)}}}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=un(`template`);return t.innerHTML=gr(e.replaceAll(`<!>`,`<!---->`)),t.content}function J(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Y(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return J(E,null),E;i===void 0&&(i=_r(a?e:`<!>`+e),n||(i=L(i)));var t=r||$t?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;J(o,s)}else J(t,t);return t}}function vr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return J(E,null),E;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;J(n,r)}else J(t,t);return t}}function yr(e,t){return vr(e,t,`svg`)}function br(){if(T)return J(E,null),E;var e=document.createDocumentFragment(),t=document.createComment(``),n=rn();return e.append(t,n),J(t,n),e}function X(e,t){if(T){var n=W;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),O();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var xr=[`touchstart`,`touchmove`];function Sr(e){return xr.includes(e)}function Cr(e){let t=0,n=Gt(0),r;return()=>{_n()&&(q(n),Tn(()=>(t===0&&(r=cr(()=>e(()=>Yt(n)))),t+=1,()=>{$e(()=>{--t,t===0&&(r?.(),r=void 0,Yt(n))})})))}}var wr=ae|oe;function Tr(e,t,n,r){new Er(e,t,n,r)}var Er=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=Cr(()=>(this.#m=Gt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=W;t.b=this,t.f|=128,n(e)},this.parent=W.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=En(()=>{if(T){let e=this.#t;O();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},wr),T&&(this.#e=E)}#g(){try{this.#a=V(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);$e(r),t&&(this.#s=V(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Ee();return}t=!0,n&&Ge(),this.#s!==null&&Mn(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){pn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=V(()=>e(this.#e)),$e(()=>{var e=this.#c=document.createDocumentFragment(),t=rn(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return V(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){pn(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,Mn(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=V(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();In(this.#a,e);let t=this.#n.pending;this.#o=V(()=>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){it(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=W,n=U,r=A;Un(this.#i),Hn(this.#i),Ke(this.#i.ctx);try{return Nt.ensure(),e()}finally{Un(t),Hn(n),Ke(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&&Mn(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,$e(()=>{this.#d=!1,this.#m&&qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),q(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&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),T&&(D(this.#t),Oe(),D(ke()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return V(()=>{var r=W;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return pn(e,this.#i.parent),null}}))};$e(()=>{var t;try{t=this.transform_error(e)}catch(e){pn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>pn(e,this.#i&&this.#i.parent)):n(t)})}};function Dr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[be]??=e.nodeValue)&&(e[be]=n,e.nodeValue=`${n}`)}function Or(e,t){return jr(e,t)}function kr(e,t){nn(),t.intro=t.intro??!1;let n=t.target,i=T,a=E;try{for(var o=L(n);o&&(o.nodeType!==8||o.data!==`[`);)o=an(o);if(!o)throw r;De(!0),D(o);let i=jr(e,{...t,anchor:o});return De(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
|
+
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==r&&console.warn(`Failed to hydrate: `,i),t.recover===!1&&Be(),nn(),cn(n),De(!1),Or(e,t)}finally{De(i),D(a)}}var Ar=new Map;function jr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){nn();var l=void 0,u=Sn(()=>{var s=n??t.appendChild(rn());Tr(s,{pending:()=>{}},t=>{qe({});var n=A;if(o&&(n.c=o),a&&(i.$$events=a),T&&J(t,null),l=e(t,i)||Ye(),T&&(W.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw Te(),r;Je()},c);var u=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Sr(r);for(let e of[t,document]){var a=Ar.get(e);a===void 0&&(a=new Map,Ar.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(d(ur)),dr.add(f),()=>{for(var e of u)for(let n of[t,document]){var r=Ar.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,mr),r.delete(e),r.size===0&&Ar.delete(n)):r.set(e,i)}dr.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return Mr.set(l,u),l}var Mr=new WeakMap;function Nr(e,t){let n=Mr.get(e);return n?(Mr.delete(e),n(t)):Promise.resolve()}var Pr=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)Pn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Pn(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&&(H(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();In(r,t),t.append(rn()),this.#n.set(e,{effect:r,fragment:t})}else H(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Mn(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)||(H(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=ln();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=rn();i.append(a),this.#n.set(e,{effect:V(()=>t(a)),fragment:i})}else this.#t.set(e,V(()=>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 Z(e,t,n=!1){var r;T&&(r=E,O());var i=new Pr(e),a=n?ae:0;function o(e,t){if(T){var n=Ae(r);if(e!==parseInt(n.substring(1))){var a=ke();D(a),i.anchor=a,De(!1),i.ensure(e,t),De(!0);return}}i.ensure(e,t)}En(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Fr(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Mn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Ir(e,d(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var c=r.length===0&&n!==null&&e.pending.size===0;if(c){var l=n,u=l.parentNode;cn(u),u.append(l),e.items.clear()}Ir(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Ir(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|=ce,In(a,document.createDocumentFragment())):H(t[i],n)}}var Lr;function Rr(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var l=e;o=T?D(L(l)):l.appendChild(rn())}T&&O();var u=null,f=_t(()=>{var e=n();return c(e)?e:e==null?[]:d(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=u,Br(v,p,o,t,r),u!==null&&(p.length===0?u.f&33554432?(u.f^=ce,Hr(u,null,o)):Pn(u):Mn(u,()=>{u=null})))}function _(e){v.pending.delete(e)}var v={effect:En(()=>{p=q(f);var e=p.length;let c=!1;T&&Ae(o)===`[!`!=(e===0)&&(o=ke(),D(o),De(!1),c=!0);for(var l=new Set,d=N,v=ln(),y=0;y<e;y+=1){T&&E.nodeType===8&&E.data===`]`&&(o=E,c=!0,De(!1));var ee=p[y],b=r(ee,y),x=h?null:s.get(b);x?(x.v&&qt(x.v,ee),x.i&&qt(x.i,y),v&&d.unskip_effect(x.e)):(x=Vr(s,h?o:Lr??=rn(),ee,b,y,i,t,n),h||(x.e.f|=ce),s.set(b,x)),l.add(b)}if(e===0&&a&&!u&&(h?u=V(()=>a(o)):(u=V(()=>a(Lr??=rn())),u.f|=ce)),e>l.size&&Fe(``,``,``),T&&e>0&&D(ke()),!h)if(m.set(d,l),v){for(let[e,t]of s)l.has(e)||d.skip_effect(t.e);d.oncommit(g),d.ondiscard(_)}else g(d);c&&De(!0),q(f)}),flags:t,items:s,pending:m,outrogroups:null,fallback:u};h=!1,T&&(o=E)}function zr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Br(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=zr(e.effect.first),l,u=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&&(Pn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ce,_===c)Hr(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ur(e,u,_),Ur(e,_,y),Hr(_,y,n),u=_,p=[],m=[],c=zr(u.next);continue}if(_!==c){if(l!==void 0&&l.has(_)){if(p.length<m.length){var ee=m[0],b;u=ee.prev;var x=p[0],S=p[p.length-1];for(b=0;b<p.length;b+=1)Hr(p[b],ee,n);for(b=0;b<m.length;b+=1)l.delete(m[b]);Ur(e,x.prev,S.next),Ur(e,u,x),Ur(e,S,ee),c=ee,u=S,--v,p=[],m=[]}else l.delete(_),Hr(_,c,n),Ur(e,_.prev,_.next),Ur(e,_,u===null?e.effect.first:u.next),Ur(e,u,_),u=_;continue}for(p=[],m=[];c!==null&&c!==_;)(l??=new Set).add(c),m.push(c),c=zr(c.next);if(c===null)continue}_.f&33554432||p.push(_),u=_,c=zr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Ir(e,d(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var C=[];if(l!==void 0)for(_ of l)_.f&8192||C.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&C.push(c),c=zr(c.next);var w=C.length;if(w>0){var te=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()}Fr(e,C,te)}}a&&$e(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Vr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Gt(n):Kt(n,!1,!1):null,l=o&2?Gt(i):null;return{v:c,i:l,e:V(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Hr(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=an(r);if(a.before(r),r===i)return;r=o}}function Ur(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Wr(e,t,n=!1,i=!1,a=!1,c=!1){var l=e,u=``;if(n){var d=e;T&&(l=D(L(d)))}B(()=>{var e=W;if(u===(u=t()??``)){T&&O();return}if(n&&!T){e.nodes=null,d.innerHTML=u,u!==``&&J(L(d),d.lastChild);return}if(e.nodes!==null&&(An(e.nodes.start,e.nodes.end),e.nodes=null),u!==``){if(T){for(var c=E.data,f=O(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=an(f);if(f===null)throw Te(),r;J(E,p),l=D(f);return}var m=un(i?`svg`:a?`math`:`template`,i?o:a?s:void 0);m.innerHTML=u;var h=i||a?m:m.content;if(J(L(h),h.lastChild),i||a)for(;L(h);)l.before(L(h));else l.before(h)}})}function Gr(e,t){Cn(()=>{e=W?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=un(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var Kr=[...`
|
|
3
|
+
\r\f\xA0\v`];function qr(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||Kr.includes(r[o-1]))&&(s===r.length||Kr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Jr(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 Yr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Xr(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(Yr)),i&&c.push(...Object.keys(i).map(Yr));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=Yr(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+=Jr(r)),i&&(n+=Jr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Zr(e,t,n,r,i,a){var o=e[ve];if(T||o!==n||o===void 0){var s=qr(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[ve]=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 Qr(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 $r(e,t,n,r){var i=e[ye];if(T||i!==t){var a=Xr(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ye]=t}else r&&(Array.isArray(r)?(Qr(e,n?.[0],r[0]),Qr(e,n?.[1],r[1],`important`)):Qr(e,n,r));return r}var ei=Symbol(`is custom element`),ti=Symbol(`is html`),ni=Ce?`link`:`LINK`,ri=Ce?`progress`:`PROGRESS`;function ii(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Q(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Q(e,`checked`,null),e.checked=r}}};e[xe]=n,$e(n),ct()}}function ai(e,t){var n=si(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ri)||(e.value=t??``)}function oi(e,t){var n=si(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Q(e,t,n,r){var i=si(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ni)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ge]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&li(e).has(t)?e[t]=n:e.setAttribute(t,n))}function si(e){return e[_e]??={[ei]:e.nodeName.includes(`-`),[ti]:e.namespaceURI===a}}var ci=new Map;function li(e){var t=e.getAttribute(`is`)||e.nodeName,n=ci.get(t);if(n)return n;ci.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=v(i)}return n}function ui(e,t){return e===t||e?.[pe]===t}function di(e=Ye(),t,n,r){var i=A.r,a=W;return Cn(()=>{var o,s;return Tn(()=>{o=s,s=r?.()||[],cr(()=>{ui(n(...s),e)||(t(e,...s),o&&ui(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&&ui(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function $(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??=mt(r),q(l)):(c&&(c=!1,s=o?cr(r):r),s);let d;if(a){var f=pe in e||he in e;d=m(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,h=!1;a?[p,h]=ot(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Ve(t),d(p)));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(d){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&d(t?g():e),e):g()})}var v=!1,y=(n&1?mt:_t)(()=>(v=!1,g()));a&&q(y);var ee=W;return(function(e,t){if(arguments.length>0){let n=t?q(y):i&&a?Zt(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return zn&&v||ee.f&16384?y.v:q(y)})}function fi(e){return new pi(e)}var pi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Kt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===he?!0:(q(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?kr:Or)(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`||p(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=()=>{Nr(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()}},mi;typeof HTMLElement==`function`&&(mi=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=un(`slot`);e!=="default"&&(n.name=e),X(t,n)}}let t={},n=gi(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]=hi(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=fi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=xn(()=>{Tn(()=>{this.$$r=!0;for(let e of f(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=hi(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]=hi(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 f(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function hi(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 gi(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function _i(e,t,n,r,i,a){let o=class extends mi{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return f(t).map(e=>(t[e].attribute||e).toLowerCase())}};return f(t).forEach(e=>{p(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=hi(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(m(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{p(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var vi=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}},yi=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}},bi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function xi(e,t={}){let n=t.hostPredicate??bi,r=e;for(;r;){if(n(r))return r;r=r.parentElement}if(typeof document<`u`&&t.fallbackSelector){let e=document.querySelector(t.fallbackSelector);if(n(e))return e}return null}function Si({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=xi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new yi(n,r)),a):null}function Ci(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var wi=Y(`<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),Ti=Y(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),Ei=Y(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),Di=Y(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Oi=Y(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),ki={hash:`svelte-ypdwb3`,code:`.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 Ai(e,t){qe(t,!0),Gr(e,ki);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=$(t,`hasAudio`,7,!1),i=$(t,`audioUrl`,7),a=$(t,`useFeatureButtonAudio`,7,!1),o=$(t,`autoplayEnabled`,7,!1),s=$(t,`featureAudioSkin`,7),c=$(t,`uiText`,7),l=$(t,`locale`,7,``),u=$(t,`onaudiostarted`,7),d=$(t,`onaudioended`,7),f=F(null),p=F(null),m=F(null),h=F(Zt(n.IDLE)),g=M(()=>Ci({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),_=M(()=>q(h)===n.PLAYING),v=M(()=>q(h)===n.BLOCKED),y=M(()=>q(g)===`error`?c().audioResourceUnavailable:``);yn(()=>{i(),I(h,n.IDLE,!0)});function ee(){q(g)!==`none`&&q(g)!==`error`&&q(f)&&q(f).play().catch(()=>{})}function b(){q(g)!==`none`&&q(g)!==`error`&&q(f)&&q(f).play().finally(()=>{q(h)===n.BLOCKED&&I(h,n.PAUSED,!0)})}function x(e,t,n){yn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>q(f),`playing`,()=>{I(h,n.PLAYING,!0),u()?.()}),x(()=>q(f),`ended`,()=>{I(h,n.PAUSED,!0),d()?.()}),x(()=>q(p),`click`,()=>ee()),x(()=>q(m),`click`,()=>b()),yn(()=>{!o()||q(g)===`none`||q(g)===`error`||q(h)===n.IDLE&&q(f)&&i()&&(I(h,n.PAUSED,!0),q(f).play().catch(()=>{I(h,n.BLOCKED,!0)}))});function S(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function C(e=``){return e.toLowerCase().startsWith(`es`)?c().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:c().listenSilentAlt??`Repeat instructions`}function w(e=``){return e.toLowerCase().startsWith(`es`)?c().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:c().listenPlayingAlt??`Instructions are playing`}var te={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 uiText(){return c()},set uiText(e){c(e),P()},get locale(){return l()},set locale(e=``){l(e),P()},get onaudiostarted(){return u()},set onaudiostarted(e){u(e),P()},get onaudioended(){return d()},set onaudioended(e){d(e),P()}},ne=br(),re=on(ne),ie=e=>{var t=Oi(),n=R(t),r=e=>{var t=wi(),n=on(t);di(n,e=>I(f,e),()=>q(f));var r=z(n,2),a=R(r),o=z(a,2);k(r),di(r,e=>I(p,e),()=>q(p)),B((e,t,c)=>{Q(n,`src`,i()),Q(r,`aria-label`,e),Zr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(_)?``:`listen-active`}`,`svelte-ypdwb3`),Q(a,`src`,s().silentUrl),Q(a,`alt`,t),Zr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(_)?`listen-active`:``}`,`svelte-ypdwb3`),Q(o,`src`,s().playingUrl),Q(o,`alt`,c)},[()=>S(l()),()=>C(l()),()=>w(l())]),X(e,t)},a=e=>{var t=Ei(),n=on(t);di(n,e=>I(f,e),()=>q(f));var r=z(n,2),a=e=>{var t=Ti(),n=sn(t,!0);di(t,e=>I(m,e),()=>q(m)),B(()=>Dr(n,c().clickToEnableAutoplay)),X(e,t)};Z(r,e=>{q(v)&&e(a)}),B(()=>Q(n,`src`,i())),X(e,t)},o=e=>{var t=Di(),n=sn(t,!0);B(()=>Dr(n,q(y))),X(e,t)};Z(n,e=>{q(g)===`feature-button`?e(r):q(g)===`controls`?e(a,1):q(g)===`error`&&e(o,2)}),k(t),X(e,t)};return Z(re,e=>{q(g)!==`none`&&e(ie)}),X(e,ne),Je(te)}_i(Ai,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var ji=Y(`<img class="w-auto object-contain pie-blank-image" style="max-height:var(--mpb-selected-image-max-height, 4rem);"/>`),Mi=Y(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Ni=Y(`<span class="cloze-marker-empty svelte-d9l5tb"><span aria-hidden="true"> </span> <span class="sr-only svelte-d9l5tb">(blank)</span></span>`),Pi=Y(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Fi={hash:`svelte-d9l5tb`,code:`.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.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-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;}.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 Ii(e,t){qe(t,!0),Gr(e,Fi);let n=$(t,`choiceMode`,7,`text`),r=$(t,`displayChoice`,7,void 0),i=$(t,`displayChoiceLabelHtml`,7,``),a=$(t,`isStandalone`,7,!1),o=$(t,`blankWidth`,7),s=$(t,`blankBorderWidth`,7),c=$(t,`ariaLabel`,7);var l={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()}},u=Pi(),d=R(u),f=e=>{var t=ji();B(()=>{Q(t,`src`,r().imageUrl),Q(t,`alt`,r().imageAlt||`Selected answer image`)}),X(e,t)},p=e=>{var t=Mi();Wr(t,i,!0),k(t),X(e,t)},m=e=>{X(e,Ni())};return Z(d,e=>{n()===`image`&&r()?.imageUrl?e(f):i()?e(p,1):e(m,-1)}),k(u),B(()=>{Zr(u,1,`inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),$r(u,`width:${o()};border-bottom-width:${s()};`),Q(u,`aria-label`,c())}),X(e,u),Je(l)}_i(Ii,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{}},[],[],{mode:`open`});var Li=Y(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Ri=Y(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),zi=Y(`<label class="cursor-pointer choice-tile text-center 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>`),Bi=Y(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Vi=Y(`<span aria-hidden="true"> </span>`),Hi=Y(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Ui={hash:`svelte-8xu1pt`,code:`.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;}.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-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-background-dark, #ecedf1);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-tertiary, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-incorrect-icon, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-secondary, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-incorrect-secondary, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-white, #ffffff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-icon, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-incorrect-icon, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}`};function Wi(e,t){qe(t,!0),Gr(e,Ui);let n=$(t,`choice`,7),r=$(t,`choiceMode`,7,`text`),i=$(t,`isHorizontal`,7,!1),a=$(t,`isSelected`,7,!1),o=$(t,`isDisabled`,7,!1),s=$(t,`correctness`,7,void 0),c=$(t,`isEvaluateMode`,7,!1),l=$(t,`instanceId`,7),u=$(t,`radioGroupName`,7);var d={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()}},f=Hi(),p=R(f),m=e=>{var t=zi(),i=R(t),s=R(i),c=e=>{var t=Li();B(()=>{Q(t,`src`,n().imageUrl),Q(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),X(e,t)},d=e=>{var t=Ri();Wr(t,()=>n().labelHtml||``,!0),k(t),X(e,t)};Z(s,e=>{r()===`image`&&n().imageUrl?e(c):e(d,-1)}),k(i);var f=z(i,2);ii(f),k(t),B(()=>{Q(t,`for`,`${l()}-opt-${n().id}`),Q(f,`name`,u()),Q(f,`id`,`${l()}-opt-${n().id}`),ai(f,n().id),oi(f,a()),f.disabled=o()}),X(e,t)},h=e=>{var t=Bi(),i=on(t);ii(i);var s=z(i,2),c=R(s),d=e=>{var t=Li();B(()=>{Q(t,`src`,n().imageUrl),Q(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),X(e,t)},f=e=>{var t=Ri();Wr(t,()=>n().labelHtml||``,!0),k(t),X(e,t)};Z(c,e=>{r()===`image`&&n().imageUrl?e(d):e(f,-1)}),k(s),B(()=>{Q(i,`name`,u()),Q(i,`id`,`${l()}-opt-${n().id}`),ai(i,n().id),oi(i,a()),i.disabled=o(),Q(s,`for`,`${l()}-opt-${n().id}`)}),X(e,t)};Z(p,e=>{i()?e(m):e(h,-1)});var g=z(p,2),_=e=>{var t=Vi(),n=sn(t,!0);B(()=>{Zr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Dr(n,s()===`correct`?`✓`:`✕`)}),X(e,t)};return Z(g,e=>{c()&&s()&&e(_)}),k(f),B(()=>Zr(f,1,`flex items-start 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`)),X(e,f),Je(d)}_i(Wi,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{}},[],[],{mode:`open`});function Gi(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 Ki=`{{blank}}`,qi=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Ji(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(/ /g,` `).trim()===Ki:!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&&qi.has(i)}}var Yi={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,selectedImageMaxHeightRem:4,choiceImageMaxHeightRem:5,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,narrowHorizontalChoiceMaxWidthPx:230,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},Xi={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`},selectedImageMaxHeightRem:{varName:`--mpb-selected-image-max-height`,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`},narrowHorizontalChoiceMaxWidthPx:{varName:`--mpb-narrow-choice-max-width`,unit:`px`},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`}},Zi={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 Qi(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={...Zi[t]??{},...a},s={...Yi,...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(Xi).map(e=>`${Xi[e].varName}:${s[e]}${Xi[e].unit}`).join(`;`),blankWidth:u,blankBorderWidth:d,legendMaxChars:s.legendMaxChars}}var $i={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 ea(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`)?$i.es:$i.default;return r[t]||r[n]||r.default||i||a}function ta(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,alwaysShowCorrect:i,correctChoiceId:a}=e;return i&&a||n&&r&&a?a:t}function na(e){let{isEvaluateMode:t,showCorrectAnswer:n,isCorrect:r,isIncorrect:i,selectedId:a}=e;return!t||n?``:r?`Correct answer selected`:i&&a?`Incorrect answer selected`:``}function ra(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 ia=`/* Shared base styles for all sel_r1-*_plusggg variants.
|
|
4
4
|
Applied via the data-mpb-variant="sel-r1-base" style element.
|
|
5
5
|
Uses [class*="variant-sel-r1-"] so it covers every r1 variant class.
|
|
6
6
|
Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
width: 150px;
|
|
107
107
|
height: 150px;
|
|
108
108
|
}
|
|
109
|
-
`,
|
|
109
|
+
`,aa={"sel_r1-_plusggg":{variantId:`sel-r1-plusggg`,variantClass:`variant-sel-r1-plusggg`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css */
|
|
110
110
|
/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
|
|
111
111
|
.mc-populated-blank-root.variant-sel-r1-plusggg {
|
|
112
112
|
max-width: 875px;
|
|
@@ -465,7 +465,7 @@
|
|
|
465
465
|
.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {
|
|
466
466
|
transform: scale(0.85);
|
|
467
467
|
}
|
|
468
|
-
`}},
|
|
468
|
+
`}},oa=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),sa=e=>aa[oa(e)],ca=e=>sa(e)?.variantClass||``,la=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),ua=(e,t,n)=>{let r=document.getElementById(e);if(r){r.textContent!==n&&(r.textContent=n);return}let i=document.createElement(`style`);i.id=e,i.setAttribute(`data-mpb-variant`,t),i.textContent=n,document.head.appendChild(i)},da=e=>{!e?.cssText||typeof document>`u`||(la.has(e.variantId)&&ua(`mc-populated-blank-css-sel-r1-base`,`sel-r1-base`,ia),ua(`mc-populated-blank-css-${e.variantId}`,e.variantId,e.cssText))},fa=Y(`<div class="mb-4 prose pie-prompt"></div>`),pa=yr(`<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>`),ma=yr(`<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>`),ha=Y(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="mb-3 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>`),ga=Y(`<div class="mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4"></div>`),_a=Y(`<div class="mb-4 template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),va=Y(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),ya=Y(`<div><!> <!> <!> <!> <!> <!> <p class="sr-only pie-blank-hint svelte-6wlbb4"> </p> <fieldset class="border-0 p-0 m-0 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>`),ba={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;}.mc-populated-blank-root.svelte-6wlbb4 {--mpb-focus-ring: var(
|
|
469
469
|
--pie-focus-outline,
|
|
470
470
|
var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))
|
|
471
471
|
);}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-text, black);}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),
|
|
@@ -492,4 +492,4 @@
|
|
|
492
492
|
.layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
|
|
493
493
|
.layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
|
|
494
494
|
.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}
|
|
495
|
-
}`};function ga(e,t){qe(t,!0),Br(e,ha);let n={answerChoices:`Answer choices`,selectedAnswerInSentence:`Selected answer in sentence`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`},r=$(t,`model`,7),i=$(t,`session`,7),a=P(``),o=P(null),s=P(null),c=P(null),l=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,u=j(()=>(r()?.mode||r()?.env?.mode||``).toString()),d=j(()=>J(u)===`evaluate`),f=j(()=>r()?.correctness),p=j(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:J(f)===`correct`),m=j(()=>J(f)===`correct`),h=j(()=>J(f)===`incorrect`),g=P(!1),_=j(()=>J(d)&&!J(p)&&!!r()?.correctChoiceId),v=j(()=>r()?.layoutProfile||``),y=j(()=>Ui({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:J(v),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),ee=j(()=>J(y).isAudioOnlyMode),b=j(()=>J(y).isBlankOnlyTemplate),x=j(()=>J(y).isHorizontalChoices),S=j(()=>J(y).hasInlineSentenceAudioLayout),C=j(()=>J(y).useFeatureButtonAudio),w=j(()=>qi({layoutProfile:J(v),isBlankOnlyTemplate:J(b),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets})),te=j(()=>Array.isArray(r()?.choices)?r().choices:[]),ne=j(()=>r()?.choiceMode||`text`),re=j(()=>i()?.choiceId||J(a)||``),ie=j(()=>`${l}-choice-group-${r()?.id||`1`}`),ae=j(()=>Xi({selectedId:J(re),isEvaluateMode:J(d),showCorrectAnswer:J(g),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),oe=j(()=>J(te).find(e=>e.id===J(ae))),se=j(()=>String(J(oe)?.labelHtml||``)),ce=j(()=>Zi({isEvaluateMode:J(d),showCorrectAnswer:J(g),isCorrect:J(m),isIncorrect:J(h),selectedId:J(re)})),le=j(()=>Bi({isEvaluateMode:J(d),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(J(re)||``),showCorrectAnswer:J(g)})),ue=j(()=>({...n,...r()?.uiText||{}})),de=j(()=>`${l}-prompt`),fe=j(()=>`${l}-choices-legend`),pe=j(()=>`${l}-result`),me=j(()=>Qi({prompt:r()?.prompt||``,legendMaxChars:J(w).legendMaxChars,answerChoicesLabel:J(ue).answerChoices})),he=j(()=>r()?.prompt?J(de):void 0),ge=j(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||J(me)),_e=j(()=>r()?.prompt?J(de):void 0),ve=j(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),ye=j(()=>na(r()?.customType)),be=j(()=>ra(r()?.customType)),xe=j(()=>{let e=r()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let n=e.slice(0,t),i=e.slice(t+9);return J(v)===`inline_sentence`&&(n=`${n.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:n,after:i}});function Se(e,t){_i({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function Ce(e){let t=e.target;if(!t.checked)return;let n=t.value;F(a,n,!0),Se({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function we(){J(_)&&F(g,!J(g))}xn(()=>{(!J(d)||J(p))&&F(g,!1)});function Te(e){if(r()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let n=e.currentTarget,i=Array.from(n.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=j(()=>Yi({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function De(){gi(J(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function Oe(){gi(J(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}xn(()=>{i()?.choiceId&&F(a,i().choiceId,!0)}),xn(()=>{let e=J(o);if(e)return e.addEventListener(`click`,we),()=>e.removeEventListener(`click`,we)}),xn(()=>{let e=J(s);if(!e)return;let t=e=>{e.target?.type===`radio`&&Ce(e)},n=e=>Te(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),xn(()=>{oa(J(ye))});var ke={get model(){return r()},set model(e){r(e),N()},get session(){return i()},set session(e){i(e),N()}},Ae=ma(),je=L(Ae),Me=e=>{var t=sa();zr(t,()=>r().prompt,!0),O(t),z(()=>Q(t,`id`,J(de))),X(e,t)};Z(je,e=>{r()?.prompt&&e(Me)});var Ne=R(je,2),Pe=e=>{var t=ua(),n=L(t),r=L(n),i=L(r),a=L(i),s=e=>{X(e,ca())},c=e=>{X(e,la())};Z(a,e=>{J(g)?e(s):e(c,-1)}),O(i);var l=R(i,2),u=L(l,!0);O(l),O(r),O(n),oi(n,e=>F(o,e),()=>J(o)),O(t),z(()=>{Q(n,`aria-pressed`,J(g)),Sr(u,J(g)?J(ue).hideCorrectAnswer:J(ue).showCorrectAnswer)}),X(e,t)};Z(Ne,e=>{J(_)&&e(Pe)});var Fe=R(Ne,2);{let e=j(()=>!!r()?.hasAudio),t=j(()=>r()?.audioUrl),n=j(()=>!!r()?.autoplayAudioEnabled),i=j(()=>r()?.locale);Ti(Fe,{get hasAudio(){return J(e)},get audioUrl(){return J(t)},get useFeatureButtonAudio(){return J(C)},get autoplayEnabled(){return J(n)},get featureAudioSkin(){return J(Ee)},get uiText(){return J(ue)},get locale(){return J(i)},onaudiostarted:De,onaudioended:Oe})}var Ie=R(Fe,2),Le=e=>{var t=da();zr(t,()=>r().sentenceHtml,!0),O(t),z(()=>Q(t,`aria-describedby`,J(_e))),X(e,t)};Z(Ie,e=>{r()?.sentenceHtml&&e(Le)});var T=R(Ie,2),Re=e=>{var t=fa(),n=L(t);zr(n,()=>J(xe).before);var r=R(n);ji(r,{get choiceMode(){return J(ne)},get displayChoice(){return J(oe)},get displayChoiceLabelHtml(){return J(se)},get isStandalone(){return J(b)},get blankWidth(){return J(w).blankWidth},get blankBorderWidth(){return J(w).blankBorderWidth},get ariaLabel(){return J(ue).selectedAnswerInSentence}}),zr(R(r),()=>J(xe).after),O(t),z(()=>Q(t,`aria-describedby`,J(_e))),X(e,t)};Z(T,e=>{J(ee)||e(Re)});var E=R(T,2),D=e=>{var t=pa(),n=L(t,!0);O(t),z(()=>{Q(t,`id`,J(pe)),Sr(n,J(ce))}),X(e,t)};Z(E,e=>{J(ce)&&e(D)});var ze=R(E,2),Be=L(ze),Ve=L(Be,!0);O(Be);var He=R(Be,2);return Nr(He,21,()=>J(te),e=>e.id,(e,t)=>{{let n=j(()=>J(ae)===J(t).id),i=j(()=>!!r()?.disabled),a=j(()=>J(le).get(J(t).id));zi(e,{get choice(){return J(t)},get choiceMode(){return J(ne)},get isHorizontal(){return J(x)},get isSelected(){return J(n)},get isDisabled(){return J(i)},get correctness(){return J(a)},get isEvaluateMode(){return J(d)},get instanceId(){return l},get radioGroupName(){return J(ie)}})}}),O(He),oi(He,e=>F(s,e),()=>J(s)),O(ze),O(Ae),oi(Ae,e=>F(c,e),()=>J(c)),z(()=>{Kr(Ae,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${J(v)} ${J(be)} ${J(S)?`has-inline-audio`:``}`,`svelte-6wlbb4`),Q(Ae,`lang`,J(ve)),Jr(Ae,J(w).rootStyle),ze.disabled=r()?.disabled,Q(Be,`id`,J(fe)),Sr(Ve,J(me)),Kr(He,1,`pie-choices ${J(x)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),Q(He,`aria-labelledby`,J(he)),Q(He,`aria-label`,J(ge)),Q(He,`aria-describedby`,J(ce)?J(pe):void 0)}),X(e,Ae),Je(ke)}fi(ga,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function _a(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var va=ga.element,ya=class extends va{_internalSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new pi(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new mi(this.tagName.toLowerCase(),this._isComplete()))};set model(e){this._model=e,this.audioComplete=!1,super.model=e,this._dispatchModelSet()}get model(){return this._model}set session(e){this._internalSession=e,super.session=e,this._dispatchSessionChanged()}get session(){return this._internalSession}set options(e){this._options=e,super.options=e}get options(){return this._options}onSessionChange=e=>{this._internalSession=e,super.session=e,this._dispatchSessionChanged()};onAudioStarted=()=>{this._internalSession={...this._internalSession||{},audioStartTime:Date.now()}};onAudioEnded=()=>{this.audioComplete=!0,this._internalSession={...this._internalSession||{},audioEndTime:Date.now()},this._dispatchSessionChanged()};_isComplete=()=>_a(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},ba=`{{blank}}`,xa={model:{id:`1`,element:`mc-populated-blank`,prompt:`<p><strong>Demo prompt</strong></p>`,promptEnabled:!0,interactionMode:`populate_blank`,layoutProfile:``,choiceLayout:``,layoutProfilePresets:{},layoutLimits:{...Wi},audioButtonSkin:null,audioButtonSkinsByLocale:{},uiText:{answerChoices:`Answer choices`,selectedAnswerInSentence:`blank`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,transcriptLabel:`Transcript`,listenLabelEn:`Listen`,listenLabelEs:`Escuchar`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,listenSilentAltEs:`Escuchar. Repetir las instrucciones.`,listenPlayingAltEs:`Escuchar. Estas son las instrucciones.`},sentenceHtml:``,template:`<p>The answer is ${ba}.</p>`,choiceMode:`text`,choices:[{id:`c1`,labelHtml:`<p>Option A</p>`},{id:`c2`,labelHtml:`<p>Option B</p>`},{id:`c3`,labelHtml:`<p>Option C</p>`}],correctChoiceId:`c2`,hasAudio:!1,autoplayAudioEnabled:!1,completeAudioEnabled:!1,audioUrl:``,audioTranscript:``,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},Sa=n({countBlankTokens:()=>wa,createCorrectResponseSession:()=>Ra,createDefaultModel:()=>Oa,getCorrectness:()=>Ta,getPartialScore:()=>Ea,model:()=>La,normalize:()=>ka,normalizeSession:()=>Aa,outcome:()=>Da,validate:()=>za}),Ca=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function wa(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var Ta=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},Ea=(e,t)=>!t||Ca(t)||!t.choiceId?0:1,Da=(e,t,n)=>new Promise(r=>{if(!t||Ca(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=Aa(t);let i=Ta(e,t);if(i===`unanswered`){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}let a=+(i===`correct`);r({score:a,empty:!1,traceLog:[`Mode: ${n?.mode||`unknown`}.`,`Student selected choice: ${t.choiceId}.`,`Correct choice: ${e?.correctChoiceId||`none`}.`,`Final score: ${a}.`]})}),Oa=(e={})=>({...xa.model,...e,layoutLimits:{...Wi,...e?.layoutLimits||{}}}),ka=(e={})=>Oa(e),Aa=e=>({...e}),ja=e=>!!e?.shuffle,Ma=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function Na(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var Pa=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Fa=(e,t,n)=>{let r=t.map(t=>e.find(e=>e?.[n]===t)).filter(e=>!!e);if(r.length===e.length)return r;let i=new Set(r.map(e=>e[n])),a=e.filter(e=>!i.has(e?.[n]));return[...r,...a]},Ia=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!ja(e)||Ma(e,n||{}))return i;let a=Pa(t);if(a.length)return Fa(i,a,`id`);let o=Na(i);if(r&&typeof r==`function`&&t?.id&&t?.element){let e=o.map(e=>e?.id).filter(Boolean);e.length&&await r(t.id,t.element,{shuffledValues:e})}return o},La=async(e,t,n,r)=>{let i=t||{},a=n||{},o=ka(e),s=await Ia(o,i,a,r),c={prompt:o.promptEnabled?o.prompt:null,interactionMode:o.interactionMode||`populate_blank`,layoutProfile:o.layoutProfile||``,choiceLayout:o.choiceLayout||``,layoutProfilePresets:o.layoutProfilePresets&&typeof o.layoutProfilePresets==`object`?o.layoutProfilePresets:{},layoutLimits:o.layoutLimits||{...Wi},audioButtonSkin:o.audioButtonSkin&&typeof o.audioButtonSkin==`object`?o.audioButtonSkin:null,audioButtonSkinsByLocale:o.audioButtonSkinsByLocale&&typeof o.audioButtonSkinsByLocale==`object`?o.audioButtonSkinsByLocale:{},uiText:o.uiText&&typeof o.uiText==`object`?o.uiText:{},sentenceHtml:o.sentenceHtml||null,template:o.template,choiceMode:o.choiceMode,choices:s,hasAudio:o.hasAudio,autoplayAudioEnabled:!!o.autoplayAudioEnabled,completeAudioEnabled:!!o.completeAudioEnabled,audioUrl:o.hasAudio?o.audioUrl:null,audioTranscript:o.hasAudio?o.audioTranscript:null,customType:o.customType||``,useFeatureButtonAudio:typeof o.useFeatureButtonAudio==`boolean`?o.useFeatureButtonAudio:void 0,locale:o.locale||``,disabled:a.mode!==`gather`,mode:a.mode};if(a.mode===`evaluate`){let e=Ta(o,i);c.correctness=e,c.responseCorrect=e===`correct`,c.correctChoiceId=o.correctChoiceId}return a.role===`instructor`&&(a.mode===`view`||a.mode===`evaluate`)?c.teacherInstructions=o.teacherInstructionsEnabled?o.teacherInstructions:null:c.teacherInstructions=null,c},Ra=(e,t)=>new Promise(n=>{t.mode!==`evaluate`&&t.role===`instructor`?n({id:`1`,element:`mc-populated-blank`,choiceId:e?.correctChoiceId||``}):n(null)}),za=(e={},t={})=>{let n={};if(e.promptEnabled){let t=e.prompt?.trim()||``;(!t||t===`<p></p>`)&&(n.prompt=`Prompt is required when prompt is enabled`)}let r=e.interactionMode||`populate_blank`,i=wa(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${ba} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${ba} placeholder`:i>1&&(n.template=`Template must contain only one ${ba} placeholder`):n.interactionMode=`Unknown interaction mode`;let a=Array.isArray(e.choices)?e.choices:[];a.length<2&&(n.choices=`At least two choices are required`);let o=e.choiceMode||`text`;for(let e=0;e<a.length;e++){let t=a[e];if(!t?.id){n.choices=`Choice ${e+1} is missing an id`;break}if(o===`text`){let r=(t.labelHtml||``).trim();if(!r||r===`<p></p>`){n.choices=`Choice ${e+1} needs label text`;break}}else{if(!t.imageUrl?.trim()){n.choices=`Choice ${e+1} needs an image URL`;break}if(!t.imageAlt?.trim()){n.choices=`Choice ${e+1} needs image alt text`;break}}}let s=e.correctChoiceId;(!s||!a.some(e=>e.id===s))&&(n.correctChoiceId=`Correct choice must match one of the choice ids`),e.hasAudio&&(e.audioUrl?.trim()||(n.audioUrl=`A playable audio URL is required when audio is enabled`));let c=e?.layoutLimits;if(c&&typeof c==`object`)for(let e of`blankStandaloneWidthRem.blankWideWidthRem.blankUnderlineWidthPx.blankUnderlineWideWidthPx.horizontalChoiceWidthPx.horizontalChoiceWidthVw.horizontalChoiceTileMinHeightRem.horizontalChoiceContentMinHeightRem.selectedImageMaxHeightRem.choiceImageMaxHeightRem.listenButtonSizePx.stimulusMinColumnPx.textMinColumnPx.legendMaxChars.choiceGroupGapRem.choiceRowGapRem.toggleButtonGapRem.horizontalChoiceRadioTopMarginRem.audioBlankTemplateMarginTopRem.audioBlankTemplateMarginBottomRem.audioInstructionsMaxWidthPx.narrowHorizontalChoiceMaxWidthPx.stimulusGridColumnGapRem.stimulusGridRowGapRem.stimulusSentenceMarginTopRem.stimulusChoicesMarginTopRem.tokenGridColumnGapRem.tokenGridRowGapRem.tokenTemplateMarginTopRem.tokenInlineTokenGapRem.tokenChoicesMarginTopRem.inlineGridColumnGapRem.inlineGridRowGapRem.inlineTemplateMarginTopRem.inlineChoicesMarginTopRem`.split(`.`)){if(c[e]===void 0||c[e]===null)continue;let t=Number(c[e]);if(!Number.isFinite(t)||t<=0){n.layoutLimits=`${e} must be a positive number when provided`;break}}return n},Ba={...Sa},Va=ya;e.controller=Ba,e.default=Va})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});
|
|
495
|
+
}`};function xa(e,t){qe(t,!0),Gr(e,ba);let n={answerChoices:`Answer choices`,selectedAnswerInSentence:`Selected answer in sentence`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`},r=$(t,`model`,7),i=$(t,`session`,7),a=F(``),o=F(null),s=F(null),c=F(null),l=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,u=M(()=>(r()?.mode||r()?.env?.mode||``).toString()),d=M(()=>q(u)===`evaluate`),f=M(()=>r()?.correctness),p=M(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:q(f)===`correct`),m=M(()=>q(f)===`correct`),h=M(()=>q(f)===`incorrect`),g=F(!1),_=M(()=>q(d)&&!q(p)&&!!r()?.correctChoiceId),v=M(()=>r()?.layoutProfile||``),y=M(()=>Ji({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:q(v),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),ee=M(()=>q(y).isAudioOnlyMode),b=M(()=>q(y).isBlankOnlyTemplate),x=M(()=>q(y).isHorizontalChoices),S=M(()=>q(y).hasInlineSentenceAudioLayout),C=M(()=>q(y).useFeatureButtonAudio),w=M(()=>Qi({layoutProfile:q(v),isBlankOnlyTemplate:q(b),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets})),te=M(()=>Array.isArray(r()?.choices)?r().choices:[]),ne=M(()=>r()?.choiceMode||`text`),re=M(()=>i()?.choiceId||q(a)||``),ie=M(()=>`${l}-choice-group-${r()?.id||`1`}`),ae=M(()=>ta({selectedId:q(re),isEvaluateMode:q(d),showCorrectAnswer:q(g),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),oe=M(()=>q(te).find(e=>e.id===q(ae))),se=M(()=>String(q(oe)?.labelHtml||``)),ce=M(()=>na({isEvaluateMode:q(d),showCorrectAnswer:q(g),isCorrect:q(m),isIncorrect:q(h),selectedId:q(re)})),le=M(()=>Gi({isEvaluateMode:q(d),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(q(re)||``),showCorrectAnswer:q(g)})),ue=M(()=>({...n,...r()?.uiText||{}})),de=M(()=>`${l}-prompt`),fe=M(()=>`${l}-choices-legend`),pe=M(()=>`${l}-result`),me=M(()=>`${l}-blank-hint`),he=M(()=>ra({prompt:r()?.prompt||``,legendMaxChars:q(w).legendMaxChars,answerChoicesLabel:q(ue).answerChoices})),ge=M(()=>r()?.prompt?q(de):void 0),_e=M(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||q(he)),ve=M(()=>r()?.prompt?q(de):void 0),ye=M(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),be=M(()=>sa(r()?.customType)),xe=M(()=>ca(r()?.customType)),Se=M(()=>{let e=r()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let n=e.slice(0,t),i=e.slice(t+9);return q(v)===`inline_sentence`&&(n=`${n.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:n,after:i}});function Ce(e,t){Si({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function we(e){let t=e.target;if(!t.checked)return;let n=t.value;I(a,n,!0),Ce({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function Te(){q(_)&&I(g,!q(g))}yn(()=>{(!q(d)||q(p))&&I(g,!1)});function Ee(e){if(r()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let n=e.currentTarget,i=Array.from(n.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 T=M(()=>ea({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function De(){xi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function E(){xi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}yn(()=>{i()?.choiceId&&I(a,i().choiceId,!0)}),yn(()=>{let e=q(o);if(e)return e.addEventListener(`click`,Te),()=>e.removeEventListener(`click`,Te)}),yn(()=>{let e=q(s);if(!e)return;let t=e=>{e.target?.type===`radio`&&we(e)},n=e=>Ee(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),yn(()=>{da(q(be))});var D={get model(){return r()},set model(e){r(e),P()},get session(){return i()},set session(e){i(e),P()}},O=ya(),Oe=R(O),ke=e=>{var t=fa();Wr(t,()=>r().prompt,!0),k(t),B(()=>Q(t,`id`,q(de))),X(e,t)};Z(Oe,e=>{r()?.prompt&&e(ke)});var Ae=z(Oe,2),je=e=>{var t=ha(),n=R(t),r=R(n),i=R(r),a=R(i),s=e=>{X(e,pa())},c=e=>{X(e,ma())};Z(a,e=>{q(g)?e(s):e(c,-1)}),k(i);var l=sn(z(i,2),!0);k(r),k(n),di(n,e=>I(o,e),()=>q(o)),k(t),B(()=>{Q(n,`aria-pressed`,q(g)),Dr(l,q(g)?q(ue).hideCorrectAnswer:q(ue).showCorrectAnswer)}),X(e,t)};Z(Ae,e=>{q(_)&&e(je)});var Me=z(Ae,2);{let e=M(()=>!!r()?.hasAudio),t=M(()=>r()?.audioUrl),n=M(()=>!!r()?.autoplayAudioEnabled),i=M(()=>r()?.locale);Ai(Me,{get hasAudio(){return q(e)},get audioUrl(){return q(t)},get useFeatureButtonAudio(){return q(C)},get autoplayEnabled(){return q(n)},get featureAudioSkin(){return q(T)},get uiText(){return q(ue)},get locale(){return q(i)},onaudiostarted:De,onaudioended:E})}var Ne=z(Me,2),Pe=e=>{var t=ga();Wr(t,()=>r().sentenceHtml,!0),k(t),B(()=>Q(t,`aria-describedby`,q(ve))),X(e,t)};Z(Ne,e=>{r()?.sentenceHtml&&e(Pe)});var Fe=z(Ne,2),Ie=e=>{var t=_a(),n=R(t);Wr(n,()=>q(Se).before);var r=z(n);Ii(r,{get choiceMode(){return q(ne)},get displayChoice(){return q(oe)},get displayChoiceLabelHtml(){return q(se)},get isStandalone(){return q(b)},get blankWidth(){return q(w).blankWidth},get blankBorderWidth(){return q(w).blankBorderWidth},get ariaLabel(){return q(ue).selectedAnswerInSentence}}),Wr(z(r),()=>q(Se).after),k(t),B(()=>Q(t,`aria-describedby`,q(ve))),X(e,t)};Z(Fe,e=>{q(ee)||e(Ie)});var Le=z(Fe,2),Re=e=>{var t=va(),n=sn(t,!0);B(()=>{Q(t,`id`,q(pe)),Dr(n,q(ce))}),X(e,t)};Z(Le,e=>{q(ce)&&e(Re)});var ze=z(Le,2),Be=sn(ze,!0),Ve=z(ze,2),He=R(Ve),Ue=sn(He,!0),We=z(He,2);return Rr(We,21,()=>q(te),e=>e.id,(e,t)=>{{let n=M(()=>q(ae)===q(t).id),i=M(()=>!!r()?.disabled),a=M(()=>q(le).get(q(t).id));Wi(e,{get choice(){return q(t)},get choiceMode(){return q(ne)},get isHorizontal(){return q(x)},get isSelected(){return q(n)},get isDisabled(){return q(i)},get correctness(){return q(a)},get isEvaluateMode(){return q(d)},get instanceId(){return l},get radioGroupName(){return q(ie)}})}}),k(We),di(We,e=>I(s,e),()=>q(s)),k(Ve),k(O),di(O,e=>I(c,e),()=>q(c)),B(e=>{Zr(O,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${q(v)} ${q(xe)} ${q(S)?`has-inline-audio`:``}`,`svelte-6wlbb4`),Q(O,`lang`,q(ye)),$r(O,q(w).rootStyle),Q(ze,`id`,q(me)),Dr(Be,q(ue).blankPreSelectionHint),Ve.disabled=r()?.disabled,Q(He,`id`,q(fe)),Dr(Ue,q(he)),Zr(We,1,`pie-choices ${q(x)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),Q(We,`aria-labelledby`,q(ge)),Q(We,`aria-label`,q(_e)),Q(We,`aria-describedby`,e)},[()=>[q(me),q(ce)?q(pe):void 0].filter(Boolean).join(` `)]),X(e,O),Je(D)}_i(xa,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function Sa(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var Ca=xa.element,wa=class extends Ca{_internalSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new vi(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new yi(this.tagName.toLowerCase(),this._isComplete()))};set model(e){this._model=e,this.audioComplete=!1,super.model=e,this._dispatchModelSet()}get model(){return this._model}set session(e){this._internalSession=e,super.session=e,this._dispatchSessionChanged()}get session(){return this._internalSession}set options(e){this._options=e,super.options=e}get options(){return this._options}onSessionChange=e=>{this._internalSession=e,super.session=e,this._dispatchSessionChanged()};onAudioStarted=()=>{this._internalSession={...this._internalSession||{},audioStartTime:Date.now()}};onAudioEnded=()=>{this.audioComplete=!0,this._internalSession={...this._internalSession||{},audioEndTime:Date.now()},this._dispatchSessionChanged()};_isComplete=()=>Sa(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},Ta=`{{blank}}`,Ea={model:{id:`1`,element:`mc-populated-blank`,prompt:`<p><strong>Demo prompt</strong></p>`,promptEnabled:!0,interactionMode:`populate_blank`,layoutProfile:``,choiceLayout:``,layoutProfilePresets:{},layoutLimits:{...Yi},audioButtonSkin:null,audioButtonSkinsByLocale:{},uiText:{answerChoices:`Answer choices`,selectedAnswerInSentence:`blank`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,transcriptLabel:`Transcript`,listenLabelEn:`Listen`,listenLabelEs:`Escuchar`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,listenSilentAltEs:`Escuchar. Repetir las instrucciones.`,listenPlayingAltEs:`Escuchar. Estas son las instrucciones.`},sentenceHtml:``,template:`<p>The answer is ${Ta}.</p>`,choiceMode:`text`,choices:[{id:`c1`,labelHtml:`<p>Option A</p>`},{id:`c2`,labelHtml:`<p>Option B</p>`},{id:`c3`,labelHtml:`<p>Option C</p>`}],correctChoiceId:`c2`,hasAudio:!1,autoplayAudioEnabled:!1,completeAudioEnabled:!1,audioUrl:``,audioTranscript:``,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},Da=n({countBlankTokens:()=>ka,createCorrectResponseSession:()=>Ua,createDefaultModel:()=>Na,getCorrectness:()=>Aa,getPartialScore:()=>ja,model:()=>Ha,normalize:()=>Pa,normalizeSession:()=>Fa,outcome:()=>Ma,validate:()=>Wa}),Oa=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function ka(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var Aa=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},ja=(e,t)=>!t||Oa(t)||!t.choiceId?0:1,Ma=(e,t,n)=>new Promise(r=>{if(!t||Oa(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=Fa(t);let i=Aa(e,t);if(i===`unanswered`){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}let a=+(i===`correct`);r({score:a,empty:!1,traceLog:[`Mode: ${n?.mode||`unknown`}.`,`Student selected choice: ${t.choiceId}.`,`Correct choice: ${e?.correctChoiceId||`none`}.`,`Final score: ${a}.`]})}),Na=(e={})=>({...Ea.model,...e,layoutLimits:{...Yi,...e?.layoutLimits||{}}}),Pa=(e={})=>Na(e),Fa=e=>({...e}),Ia=e=>!!e?.shuffle,La=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function Ra(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var za=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Ba=(e,t,n)=>{let r=t.map(t=>e.find(e=>e?.[n]===t)).filter(e=>!!e);if(r.length===e.length)return r;let i=new Set(r.map(e=>e[n])),a=e.filter(e=>!i.has(e?.[n]));return[...r,...a]},Va=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!Ia(e)||La(e,n||{}))return i;let a=za(t);if(a.length)return Ba(i,a,`id`);let o=Ra(i);if(r&&typeof r==`function`&&t?.id&&t?.element){let e=o.map(e=>e?.id).filter(Boolean);e.length&&await r(t.id,t.element,{shuffledValues:e})}return o},Ha=async(e,t,n,r)=>{let i=t||{},a=n||{},o=Pa(e),s=await Va(o,i,a,r),c={prompt:o.promptEnabled?o.prompt:null,interactionMode:o.interactionMode||`populate_blank`,layoutProfile:o.layoutProfile||``,choiceLayout:o.choiceLayout||``,layoutProfilePresets:o.layoutProfilePresets&&typeof o.layoutProfilePresets==`object`?o.layoutProfilePresets:{},layoutLimits:o.layoutLimits||{...Yi},audioButtonSkin:o.audioButtonSkin&&typeof o.audioButtonSkin==`object`?o.audioButtonSkin:null,audioButtonSkinsByLocale:o.audioButtonSkinsByLocale&&typeof o.audioButtonSkinsByLocale==`object`?o.audioButtonSkinsByLocale:{},uiText:o.uiText&&typeof o.uiText==`object`?o.uiText:{},sentenceHtml:o.sentenceHtml||null,template:o.template,choiceMode:o.choiceMode,choices:s,hasAudio:o.hasAudio,autoplayAudioEnabled:!!o.autoplayAudioEnabled,completeAudioEnabled:!!o.completeAudioEnabled,audioUrl:o.hasAudio?o.audioUrl:null,audioTranscript:o.hasAudio?o.audioTranscript:null,customType:o.customType||``,useFeatureButtonAudio:typeof o.useFeatureButtonAudio==`boolean`?o.useFeatureButtonAudio:void 0,locale:o.locale||``,disabled:a.mode!==`gather`,mode:a.mode};if(a.mode===`evaluate`){let e=Aa(o,i);c.correctness=e,c.responseCorrect=e===`correct`,c.correctChoiceId=o.correctChoiceId}return a.role===`instructor`&&(a.mode===`view`||a.mode===`evaluate`)?c.teacherInstructions=o.teacherInstructionsEnabled?o.teacherInstructions:null:c.teacherInstructions=null,c},Ua=(e,t)=>new Promise(n=>{t.mode!==`evaluate`&&t.role===`instructor`?n({id:`1`,element:`mc-populated-blank`,choiceId:e?.correctChoiceId||``}):n(null)}),Wa=(e={},t={})=>{let n={};if(e.promptEnabled){let t=e.prompt?.trim()||``;(!t||t===`<p></p>`)&&(n.prompt=`Prompt is required when prompt is enabled`)}let r=e.interactionMode||`populate_blank`,i=ka(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${Ta} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${Ta} placeholder`:i>1&&(n.template=`Template must contain only one ${Ta} placeholder`):n.interactionMode=`Unknown interaction mode`;let a=Array.isArray(e.choices)?e.choices:[];a.length<2&&(n.choices=`At least two choices are required`);let o=e.choiceMode||`text`;for(let e=0;e<a.length;e++){let t=a[e];if(!t?.id){n.choices=`Choice ${e+1} is missing an id`;break}if(o===`text`){let r=(t.labelHtml||``).trim();if(!r||r===`<p></p>`){n.choices=`Choice ${e+1} needs label text`;break}}else{if(!t.imageUrl?.trim()){n.choices=`Choice ${e+1} needs an image URL`;break}if(!t.imageAlt?.trim()){n.choices=`Choice ${e+1} needs image alt text`;break}}}let s=e.correctChoiceId;(!s||!a.some(e=>e.id===s))&&(n.correctChoiceId=`Correct choice must match one of the choice ids`),e.hasAudio&&(e.audioUrl?.trim()||(n.audioUrl=`A playable audio URL is required when audio is enabled`));let c=e?.layoutLimits;if(c&&typeof c==`object`)for(let e of`blankStandaloneWidthRem.blankWideWidthRem.blankUnderlineWidthPx.blankUnderlineWideWidthPx.horizontalChoiceWidthPx.horizontalChoiceWidthVw.horizontalChoiceTileMinHeightRem.horizontalChoiceContentMinHeightRem.selectedImageMaxHeightRem.choiceImageMaxHeightRem.listenButtonSizePx.stimulusMinColumnPx.textMinColumnPx.legendMaxChars.choiceGroupGapRem.choiceRowGapRem.toggleButtonGapRem.horizontalChoiceRadioTopMarginRem.audioBlankTemplateMarginTopRem.audioBlankTemplateMarginBottomRem.audioInstructionsMaxWidthPx.narrowHorizontalChoiceMaxWidthPx.stimulusGridColumnGapRem.stimulusGridRowGapRem.stimulusSentenceMarginTopRem.stimulusChoicesMarginTopRem.tokenGridColumnGapRem.tokenGridRowGapRem.tokenTemplateMarginTopRem.tokenInlineTokenGapRem.tokenChoicesMarginTopRem.inlineGridColumnGapRem.inlineGridRowGapRem.inlineTemplateMarginTopRem.inlineChoicesMarginTopRem`.split(`.`)){if(c[e]===void 0||c[e]===null)continue;let t=Number(c[e]);if(!Number.isFinite(t)||t<=0){n.layoutLimits=`${e} must be a positive number when provided`;break}}return n},Ga={...Da},Ka=wa;e.controller=Ga,e.default=Ka})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});
|