@pie-element/mc-populated-blank 0.2.13-next.3 → 0.2.13

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.
Files changed (57) hide show
  1. package/dist/author/index.d.ts +1 -0
  2. package/dist/author/index.d.ts.map +1 -0
  3. package/dist/author/index.js +171 -292
  4. package/dist/author/index.js.map +1 -1
  5. package/dist/controller/defaults.d.ts +1 -0
  6. package/dist/controller/defaults.d.ts.map +1 -0
  7. package/dist/controller/index.d.ts +1 -0
  8. package/dist/controller/index.d.ts.map +1 -0
  9. package/dist/controller/index.js.map +1 -1
  10. package/dist/delivery/computeAudioMode.d.ts +1 -0
  11. package/dist/delivery/computeAudioMode.d.ts.map +1 -0
  12. package/dist/delivery/computeChoiceCorrectness.d.ts +1 -0
  13. package/dist/delivery/computeChoiceCorrectness.d.ts.map +1 -0
  14. package/dist/delivery/computeDisplayState.d.ts +1 -0
  15. package/dist/delivery/computeDisplayState.d.ts.map +1 -0
  16. package/dist/delivery/computeLayoutProfile.d.ts +1 -0
  17. package/dist/delivery/computeLayoutProfile.d.ts.map +1 -0
  18. package/dist/delivery/computeLayoutStyle.d.ts +1 -0
  19. package/dist/delivery/computeLayoutStyle.d.ts.map +1 -0
  20. package/dist/delivery/index.d.ts +1 -0
  21. package/dist/delivery/index.d.ts.map +1 -0
  22. package/dist/delivery/index.js +299 -418
  23. package/dist/delivery/index.js.map +1 -1
  24. package/dist/delivery/variant-css-map.d.ts +1 -0
  25. package/dist/delivery/variant-css-map.d.ts.map +1 -0
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.iife.d.ts +1 -0
  29. package/dist/index.iife.d.ts.map +1 -0
  30. package/dist/index.iife.js +97 -21
  31. package/dist/index.js +299 -418
  32. package/dist/index.js.map +1 -1
  33. package/dist/print/index.d.ts +1 -0
  34. package/dist/print/index.d.ts.map +1 -0
  35. package/dist/print/index.js +238 -363
  36. package/dist/print/index.js.map +1 -1
  37. package/dist/shared/layoutLimits.d.ts +1 -0
  38. package/dist/shared/layoutLimits.d.ts.map +1 -0
  39. package/dist/shared/types.d.ts +1 -0
  40. package/dist/shared/types.d.ts.map +1 -0
  41. package/package.json +5 -31
  42. package/configure.js +0 -2
  43. package/dist/browser/author/index.js +0 -50
  44. package/dist/browser/author/index.js.map +0 -1
  45. package/dist/browser/client-B0miu8E8.js +0 -2414
  46. package/dist/browser/client-B0miu8E8.js.map +0 -1
  47. package/dist/browser/controller/index.js +0 -221
  48. package/dist/browser/controller/index.js.map +0 -1
  49. package/dist/browser/delivery/index.js +0 -1234
  50. package/dist/browser/delivery/index.js.map +0 -1
  51. package/dist/browser/layoutLimits-ATKOwLHb.js +0 -42
  52. package/dist/browser/layoutLimits-ATKOwLHb.js.map +0 -1
  53. package/dist/browser/print/index.js +0 -125
  54. package/dist/browser/print/index.js.map +0 -1
  55. package/dist/runtime-support.d.ts +0 -12
  56. package/dist/runtime-support.js +0 -14
  57. package/dist/runtime-support.js.map +0 -1
@@ -1,13 +1,19 @@
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,b=()=>{};function x(e){for(var t=0;t<e.length;t++)e[t]()}function S(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,ue=1<<22,de=1<<23,fe=Symbol(`$state`),pe=Symbol(`legacy props`),me=Symbol(``),he=Symbol(`attributes`),ge=Symbol(`class`),_e=Symbol(`style`),ve=Symbol(`text`),ye=Symbol(`form reset`),be=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},xe=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ce(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function we(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Te(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ee(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function De(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Oe(){throw Error(`https://svelte.dev/e/hydration_failed`)}function ke(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ae(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Me(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ne(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Pe(){console.warn(`https://svelte.dev/e/derived_inert`)}function Fe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ie(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function Le(e){E=e}var D;function O(e){if(e===null)throw Fe(),r;return D=e}function Re(){return O(ln(D))}function k(e){if(E){if(ln(D)!==null)throw Fe(),r;D=e}}function ze(e=1){if(E){for(var t=e,n=D;t--;)n=ln(n);D=n}}function Be(e=!0){for(var t=0,n=D;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ln(n);e&&n.remove(),n=i}}function Ve(e){if(!e||e.nodeType!==8)throw Fe(),r;return e.data}function He(e){return e===this.v}function Ue(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function We(e){return!Ue(e,this.v)}var Ge=!1,Ke=!1,A=null;function qe(e){A=e}function Je(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:W,l:Ke&&!t?{s:null,u:null,$:[]}:null}}function Ye(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)wn(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,e??{}}function Xe(){return!Ke||A!==null&&A.l===null}var Ze=[];function Qe(){var e=Ze;Ze=[],x(e)}function $e(e){if(Ze.length===0&&!mt){var t=Ze;queueMicrotask(()=>{t===Ze&&Qe()})}Ze.push(e)}function et(){for(;Ze.length>0;)Qe()}function tt(e){var t=W;if(t===null)return U.f|=de,e;if(!(t.f&32768)&&!(t.f&4))throw e;nt(e,t)}function nt(e,t){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 rt=~(w|T|C);function j(e,t){e.f=e.f&rt|t}function it(e){e.f&512||e.deps===null?j(e,C):j(e,T)}function at(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,at(t.deps))}function ot(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),at(e.deps),j(e,C)}var st=!1,ct=!1;function lt(e){var t=ct;try{return ct=!1,[e(),ct]}finally{ct=t}}var ut=null,dt=null,M=null,ft=null,N=null,pt=null,mt=!1,ht=!1,gt=null,_t=null,vt=0,yt=1,bt=class e{id=yt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){dt===null?ut=dt=this:(dt.#n=this,this.#t=dt),dt=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,w),t(r);for(r of n.m)j(r,T),t(r)}this.#p.add(e)}#g(){this.#e=!0,vt++>1e3&&(this.#S(),xt());for(let e of this.#u)this.#d.delete(e),j(e,w),this.schedule(e);for(let e of this.#d)j(e,T),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=gt=[],r=[],i=_t=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Ot(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(gt=null,_t=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Dt(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(),ft=this,Ct(r),Ct(n),ft=null,this.#s?.resolve();var s=M;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),Ge&&(this.#x(),M=s)),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^=C;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^=C:i&4?t.push(r):Ge&&i&16777224?n.push(r):ar(r)&&(i&16&&this.#d.add(r),ur(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)}this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)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,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)ot(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]),N?.set(e,t)),this.is_fork||(e.v=t)}activate(){M=this}deactivate(){M=null,N=null}flush(){try{ht=!0,M=this,this.#g()}finally{vt=0,pt=null,gt=null,_t=null,ht=!1,M=null,N=null,qt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear(),this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let l=ut;l!==null;l=l.#n){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=l.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}if(l.#e){var r=[...l.current.keys()].filter(e=>!l.current.get(e)[1]&&!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#p)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#b([e])});l.activate();var i=new Set,a=new Map;for(var o of t)wt(o,r,i,a);a=new Map;var s=[...l.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(s.length>0)for(let e of this.#l)!(e.f&155648)&&Tt(e,s,a)&&(e.f&4194320?(j(e,w),l.schedule(e)):l.#u.add(e));if(l.#c.length>0&&!l.#m){l.apply();for(var c of l.#c)l.#_(c,[],[]);l.#c=[]}l.deactivate()}}}}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??=S()).promise}static ensure(){if(M===null){let t=M=new e;!ht&&!mt&&$e(()=>{t.#e||t.flush()})}return M}apply(){if(!Ge||!this.is_fork&&this.#t===null&&this.#n===null){N=null;return}N=new Map;for(let[e,[t]]of this.current)N.set(e,t);for(let t=ut;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)N.has(e)||N.set(e,n)}}schedule(e){if(pt=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(gt!==null&&t===W&&(Ge||(U===null||!(U.f&2))&&!st))return;if(n&96){if(!(n&1024))return;t.f^=C}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?ut=t:e.#n=t,t===null?dt=e:t.#t=e,this.linked=!1}}};function P(e){var t=mt;mt=!0;try{var n;for(e&&(M!==null&&!M.is_fork&&M.flush(),n=e());;){if(et(),M===null)return n;M.flush()}}finally{mt=t}}function xt(){try{De()}catch(e){nt(e,pt)}}var St=null;function Ct(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&ar(r)&&(St=new Set,ur(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&In(r),St?.size>0)){qt.clear();for(let e of St){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)St.has(n)&&(St.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||ur(n)}}St.clear()}}St=null}}function wt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?wt(i,t,n,r):e&4194320&&!(e&2048)&&Tt(i,t,r)&&(j(i,w),Et(i))}}function Tt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(u.call(t,r))return!0;if(r.f&2&&Tt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Et(e){M.schedule(e)}function Dt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,C);for(var n=e.first;n!==null;)Dt(n,t),n=n.next}}function Ot(e){j(e,C);for(var t=e.first;t!==null;)Ot(t),t=t.next}function kt(e){let t=0,n=Yt(0),r;return()=>{xn()&&(K(n),kn(()=>(t===0&&(r=pr(()=>e(()=>$t(n)))),t+=1,()=>{$e(()=>{--t,t===0&&(r?.(),r=void 0,$t(n))})})))}}var At=ie|ae;function jt(e,t,n,r){new Mt(e,t,n,r)}var Mt=class{parent;is_pending=!1;transform_error;#e;#t=E?D:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=kt(()=>(this.#m=Yt(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=An(()=>{if(E){let e=this.#t;Re();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},At),E&&(this.#e=D)}#g(){try{this.#a=jn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=jn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=jn(()=>e(this.#e)),$e(()=>{var e=this.#c=document.createDocumentFragment(),t=cn();e.append(t),this.#a=this.#x(()=>jn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Ln(this.#o,()=>{this.#o=null}),this.#b(M))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=jn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Vn(this.#a,e);let t=this.#n.pending;this.#o=jn(()=>t(this.#e))}else this.#b(M)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){ot(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=W,n=U,r=A;Jn(this.#i),qn(this.#i),qe(this.#i.ctx);try{return bt.ensure(),e()}catch(e){return tt(e),null}finally{Jn(t),qn(n),qe(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Ln(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,$e(()=>{this.#d=!1,this.#m&&Zt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),K(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.#C(e)})):this.#C(e)}#C(e){this.#a&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),E&&(O(this.#t),ze(),O(Be()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Ie();return}r=!0,i&&Ne(),this.#s!==null&&Ln(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){nt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return jn(()=>{var t=W;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return nt(e,this.#i.parent),null}}))};$e(()=>{var t;try{t=this.transform_error(e)}catch(e){nt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>nt(e,this.#i&&this.#i.parent)):o(t)})}};function Nt(e,t,n,r){let i=Xe()?Lt:Bt;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=Pt(),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){nt(e,s)}Ft()}}var d=It();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>zt(e))).then(u).catch(e=>nt(e,s)).finally(d)}l?l.then(()=>{c(),f(),Ft()}):f()}function Pt(){var e=W,t=U,n=A,r=M;return function(i=!0){Jn(e),qn(t),qe(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Ft(e=!0){Jn(null),qn(null),qe(null),e&&M?.deactivate()}function It(){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 Lt(e){var t=2|w;return W!==null&&(W.f|=ae),{ctx:A,deps:null,effects:null,equals:He,f:t,fn:e,reactions:null,rv:0,v:i,wv:0,parent:W,ac:null}}var Rt=Symbol(`obsolete`);function zt(e,t,n){let r=W;r===null&&Se();var a=void 0,o=Yt(i),s=!U,c=new Set;return On(()=>{var t=W,n=S();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==be&&n.reject(e)}).finally(Ft)}catch(e){n.reject(e),Ft()}var i=M;if(s){if(t.f&32768)var l=It();if(r.b?.is_rendered())i.async_deriveds.get(t)?.reject(Rt);else for(let e of c.values())e.reject(Rt);c.add(n),i.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==Rt&&(i.activate(),t?(o.f|=de,Zt(o,t)):(o.f&8388608&&(o.f^=de),Zt(o,e)),i.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Sn(()=>{for(let e of c)e.reject(Rt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function F(e){let t=Lt(e);return Ge||Xn(t),t}function Bt(e){let t=Lt(e);return t.equals=We,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 Ht(e){var t,n=W,r=e.parent;if(!Wn&&r!==null&&e.v!==i&&r.f&24576)return Pe(),e.v;Jn(r);try{e.f&=~ce,Vt(e),t=sr(e)}finally{Jn(n)}return t}function Ut(e){var t=Ht(e);if(!e.equals(t)&&(e.wv=ir(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),ft?.capture(e,t,!0)),e.deps===null))){j(e,C);return}Wn||(N===null?it(e):(xn()||M?.is_fork)&&N.set(e,t))}function Wt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(be),t.fn!==null&&(t.teardown=b),t.ac=null,lr(t,0),Nn(t))}function Gt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ur(t)}var Kt=new Set,qt=new Map,Jt=!1;function Yt(e,t){return{f:0,v:e,reactions:null,equals:He,rv:0,wv:0}}function I(e,t){let n=Yt(e,t);return Xn(n),n}function Xt(e,t=!1,n=!0){let r=Yt(e);return t||(r.equals=We),Ke&&n&&A!==null&&A.l!==null&&(A.l.s??=[]).push(r),r}function L(e,t,n=!1){return U!==null&&(!Kn||U.f&131072)&&Xe()&&U.f&4325394&&(Yn===null||!Yn.has(e))&&Me(),Zt(e,n?tn(t):t,_t)}function Zt(e,t,n=null){if(!e.equals(t)){qt.set(e,Wn?t:e.v);var r=bt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Ht(t),N===null&&it(t)}e.wv=ir(),en(e,w,n),Xe()&&W!==null&&W.f&1024&&!(W.f&96)&&(Qn===null?$n([e]):Qn.push(e)),!r.is_fork&&Kt.size>0&&!Jt&&Qt()}return t}function Qt(){Jt=!1;for(let e of Kt){e.f&1024&&j(e,T);let t;try{t=ar(e)}catch{t=!0}t&&ur(e)}Kt.clear()}function $t(e){L(e,e.v+1)}function en(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&w)===0;if(l&&j(s,t),c&131072)Kt.add(s);else if(c&2){var u=s;N?.delete(u),c&65536||(c&512&&(W===null||!(W.f&2097152))&&(s.f|=ce),en(u,T,n))}else if(l){var d=s;c&16&&St!==null&&St.add(d),n===null?Et(d):n.push(d)}}}}function tn(e){if(typeof e!=`object`||!e||fe in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=c(e),a=I(0),o=null,s=nr,l=e=>{if(nr===s)return e();var t=U,n=nr;qn(null),rr(s);var r=e();return qn(t),rr(n),r};return r&&n.set(`length`,I(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Ae();var i=n.get(t);return i===void 0?l(()=>{var e=I(r.value,o);return n.set(t,e),e}):L(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>I(i,o));n.set(t,e),$t(a)}}else L(r,i),$t(a);return!0},get(t,r,a){if(r===fe)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||m(t,r)?.writable)&&(s=l(()=>I(tn(c?t[r]:i),o)),n.set(r,s)),s!==void 0){var u=K(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=K(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===fe)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(()=>I(a?tn(e[t]):i,o)),n.set(t,r)),K(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(()=>I(i,o)),n.set(f+``,p)):L(p,i)}if(u===void 0)(!d||m(e,t)?.writable)&&(u=l(()=>I(void 0,o)),L(u,tn(s)),n.set(t,u));else{d=u.v!==i;var h=l(()=>tn(s));L(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&&L(_,v+1)}$t(a)}return!0},ownKeys(e){K(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(){je()}})}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var nn,rn,an,on;function sn(){if(nn===void 0){nn=window,rn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;an=m(t,`firstChild`).get,on=m(t,`nextSibling`).get,y(e)&&(e[ge]=void 0,e[he]=null,e[_e]=void 0,e.__e=void 0),y(n)&&(n[ve]=void 0)}}function cn(e=``){return document.createTextNode(e)}function R(e){return an.call(e)}function ln(e){return on.call(e)}function z(e,t){if(!E)return R(e);var n=R(D);if(n===null)n=D.appendChild(cn());else if(t&&n.nodeType!==3){var r=cn();return n?.before(r),O(r),r}return t&&mn(n),O(n),n}function un(e,t=!1){if(!E){var n=R(e);return n instanceof Comment&&n.data===``?ln(n):n}if(t){if(D?.nodeType!==3){var r=cn();return D?.before(r),O(r),r}mn(D)}return D}function B(e,t=1,n=!1){let r=E?D:e;for(var i;t--;)i=r,r=ln(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=cn();return r===null?i?.after(a):r.before(a),O(a),a}mn(r)}return O(r),r}function dn(e){e.textContent=``}function fn(){return!Ge||St!==null?!1:(W.f&ne)!==0}function pn(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 mn(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}var hn=!1;function gn(){hn||(hn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ye]?.()})},{capture:!0}))}function _n(e){var t=U,n=W;qn(null),Jn(null);try{return e()}finally{qn(t),Jn(n)}}function vn(e){W===null&&(U===null&&Ee(e),Te()),Wn&&we(e)}function yn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function bn(e,t){var n=W;n!==null&&n.f&8192&&(e|=ee);var r={ctx:A,deps:null,nodes:null,f:e|w|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)gt===null?bt.ensure().schedule(r):gt.push(r);else if(t!==null){try{ur(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|=ie))}if(i!==null&&(i.parent=n,n!==null&&yn(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function xn(){return U!==null&&!Kn}function Sn(e){let t=bn(8,null);return j(t,C),t.teardown=e,t}function Cn(e){vn(`$effect`);var t=W.f;if(!U&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return wn(e)}function wn(e){return bn(4|oe,e)}function Tn(e){bt.ensure();let t=bn(64|ae,e);return()=>{H(t)}}function En(e){bt.ensure();let t=bn(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Ln(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function Dn(e){return bn(4,e)}function On(e){return bn(ue|ae,e)}function kn(e,t=0){return bn(8|t,e)}function V(e,t=[],n=[],r=[]){Nt(r,t,n,t=>{bn(8,()=>{e(...t.map(K))})})}function An(e,t=0){return bn(16|t,e)}function jn(e){return bn(32|ae,e)}function Mn(e){var t=e.teardown;if(t!==null){let e=Wn,n=U;Gn(!0),qn(null);try{t.call(null)}finally{Gn(e),qn(n)}}}function Nn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&_n(()=>{e.abort(be)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function Pn(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&&(Fn(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Nn(e,t&&!n),lr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Mn(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&In(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Fn(e,t){for(;e!==null;){var n=e===t?null:ln(e);e.remove(),e=n}}function In(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 Ln(e,t,n=!0){var r=[];Rn(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 Rn(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Rn(i,t,o?n:!1)}i=a}}}function zn(e){Bn(e,!0)}function Bn(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(j(e,w),bt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Bn(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 Vn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ln(n);t.append(n),n=i}}var Hn=null,Un=!1,Wn=!1;function Gn(e){Wn=e}var U=null,Kn=!1;function qn(e){U=e}var W=null;function Jn(e){W=e}var Yn=null;function Xn(e){U!==null&&(!Ge||U.f&2)&&(Yn??=new Set).add(e)}var G=null,Zn=0,Qn=null;function $n(e){Qn=e}var er=1,tr=0,nr=tr;function rr(e){nr=e}function ir(){return++er}function ar(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(ar(a)&&Ut(a),a.wv>e.wv)return!0}t&512&&N===null&&j(e,C)}return!1}function or(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Ge&&Yn!==null&&Yn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?or(a,t,!1):t===a&&(n?j(a,w):a.f&1024&&j(a,T),Et(a))}}function sr(e){var t=G,n=Zn,r=Qn,i=U,a=Yn,o=A,s=Kn,c=nr,l=e.f;G=null,Zn=0,Qn=null,U=l&96?null:e,Yn=null,qe(e.ctx),Kn=!1,nr=++tr,e.ac!==null&&(_n(()=>{e.ac.abort(be)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=M?.is_fork;if(G!==null){var m;if(p||lr(e,Zn),f!==null&&Zn>0)for(f.length=Zn+G.length,m=0;m<G.length;m++)f[Zn+m]=G[m];else e.deps=f=G;if(xn()&&e.f&512)for(m=Zn;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Zn<f.length&&(lr(e,Zn),f.length=Zn);if(Xe()&&Qn!==null&&!Kn&&f!==null&&!(e.f&6146))for(m=0;m<Qn.length;m++)or(Qn[m],e);if(i!==null&&i!==e){if(tr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=tr;if(t!==null)for(let e of t)e.rv=tr;Qn!==null&&(r===null?r=Qn:r.push(...Qn))}return e.f&8388608&&(e.f^=de),d}catch(e){return tt(e)}finally{e.f^=le,G=t,Zn=n,Qn=r,U=i,Yn=a,qe(o),Kn=s,nr=c}}function cr(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&=~ce),o.v!==i&&it(o),Wt(o),lr(o,0)}}function lr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)cr(e,n[r])}function ur(e){var t=e.f;if(!(t&16384)){j(e,C);var n=W,r=Un;W=e,Un=!0;try{t&16777232?Pn(e):Nn(e),Mn(e);var i=sr(e);e.teardown=typeof i==`function`?i:null,e.wv=er}finally{Un=r,W=n}}}function K(e){var t=(e.f&2)!=0;if(Hn?.add(e),U!==null&&!Kn&&!(W!==null&&W.f&16384)&&(Yn===null||!Yn.has(e))){var n=U.deps;if(U.f&2097152)e.rv<tr&&(e.rv=tr,G===null&&n!==null&&n[Zn]===e?Zn++: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(Wn&&qt.has(e))return qt.get(e);if(t){var i=e;if(Wn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||fr(i))&&(a=Ht(i)),qt.set(i,a),a}var o=(i.f&512)==0&&!Kn&&U!==null&&(Un||(U.f&512)!=0),s=(i.f&ne)===0;ar(i)&&(o&&(i.f|=512),Ut(i)),o&&!s&&(Gt(i),dr(i))}if(N?.has(e))return N.get(e);if(e.f&8388608)throw e.v;return e.v}function dr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Gt(t),dr(t))}function fr(e){if(e.v===i)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(qt.has(t)||t.f&2&&fr(t))return!0;return!1}function pr(e){var t=Kn;try{return Kn=!0,e()}finally{Kn=t}}var mr=Symbol(`events`),hr=new Set,gr=new Set,_r=null;function vr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;_r=e;var o=0,s=_r===e&&e[mr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[mr]=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;qn(null),Jn(null);try{for(var f,m=[];a!==null&&a!==t;){try{var h=a[mr]?.[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[mr]=t,delete e.currentTarget,qn(u),Jn(d)}}}var yr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function br(e){return yr?.createHTML(e)??e}function xr(e){var t=pn(`template`);return t.innerHTML=br(e.replaceAll(`<!>`,`<!---->`)),t.content}function Sr(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return Sr(D,null),D;i===void 0&&(i=xr(a?e:`<!>`+e),n||(i=R(i)));var t=r||rn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=R(t),s=t.lastChild;Sr(o,s)}else Sr(t,t);return t}}function Cr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return Sr(D,null),D;if(!o){var e=R(xr(a));if(i)for(o=document.createDocumentFragment();R(e);)o.appendChild(R(e));else o=R(e)}var t=o.cloneNode(!0);if(i){var n=R(t),r=t.lastChild;Sr(n,r)}else Sr(t,t);return t}}function wr(e,t){return Cr(e,t,`svg`)}function Tr(){if(E)return Sr(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=cn();return e.append(t,n),Sr(t,n),e}function J(e,t){if(E){var n=W;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=D),Re();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 Er=[`touchstart`,`touchmove`];function Dr(e){return Er.includes(e)}function Or(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ve]??=e.nodeValue)&&(e[ve]=n,e.nodeValue=`${n}`)}function kr(e,t){return Mr(e,t)}function Ar(e,t){sn(),t.intro=t.intro??!1;let n=t.target,i=E,a=D;try{for(var o=R(n);o&&(o.nodeType!==8||o.data!==`[`);)o=ln(o);if(!o)throw r;Le(!0),O(o);let i=Mr(e,{...t,anchor:o});return Le(!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&&Oe(),sn(),dn(n),Le(!1),kr(e,t)}finally{Le(i),O(a)}}var jr=new Map;function Mr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){sn();var l=void 0,u=En(()=>{var s=n??t.appendChild(cn());jt(s,{pending:()=>{}},t=>{Je({});var n=A;if(o&&(n.c=o),a&&(i.$$events=a),E&&Sr(t,null),l=e(t,i)||{},E&&(W.nodes.end=D,D===null||D.nodeType!==8||D.data!==`]`))throw Fe(),r;Ye()},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=Dr(r);for(let e of[t,document]){var a=jr.get(e);a===void 0&&(a=new Map,jr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,vr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(d(hr)),gr.add(f),()=>{for(var e of u)for(let n of[t,document]){var r=jr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,vr),r.delete(e),r.size===0&&jr.delete(n)):r.set(e,i)}gr.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return Nr.set(l,u),l}var Nr=new WeakMap;function Pr(e,t){let n=Nr.get(e);return n?(Nr.delete(e),n(t)):Promise.resolve()}var Fr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)zn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(zn(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();Vn(r,t),t.append(cn()),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),Ln(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=M,r=fn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=cn();i.append(a),this.#n.set(e,{effect:jn(()=>t(a)),fragment:i})}else this.#t.set(e,jn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else E&&(this.anchor=D),this.#a(n)}};function Y(e,t,n=!1){var r;E&&(r=D,Re());var i=new Fr(e),a=n?ie:0;function o(e,t){if(E){var n=Ve(r);if(e!==parseInt(n.substring(1))){var a=Be();O(a),i.anchor=a,Le(!1),i.ensure(e,t),Le(!0);return}}i.ensure(e,t)}An(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Ir(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Ln(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Lr(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;if(c){var l=n,u=l.parentNode;dn(u),u.append(l),e.items.clear()}Lr(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Lr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,Vn(a,document.createDocumentFragment())):H(t[i],n)}}var Rr;function zr(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var l=e;o=E?O(R(l)):l.appendChild(cn())}E&&Re();var u=null,f=Bt(()=>{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,Vr(v,p,o,t,r),u!==null&&(p.length===0?u.f&33554432?(u.f^=se,Ur(u,null,o)):zn(u):Ln(u,()=>{u=null})))}function _(e){v.pending.delete(e)}var v={effect:An(()=>{p=K(f);var e=p.length;let c=!1;E&&Ve(o)===`[!`!=(e===0)&&(o=Be(),O(o),Le(!1),c=!0);for(var l=new Set,d=M,v=fn(),y=0;y<e;y+=1){E&&D.nodeType===8&&D.data===`]`&&(o=D,c=!0,Le(!1));var b=p[y],x=r(b,y),S=h?null:s.get(x);S?(S.v&&Zt(S.v,b),S.i&&Zt(S.i,y),v&&d.unskip_effect(S.e)):(S=Hr(s,h?o:Rr??=cn(),b,x,y,i,t,n),h||(S.e.f|=se),s.set(x,S)),l.add(x)}if(e===0&&a&&!u&&(h?u=jn(()=>a(o)):(u=jn(()=>a(Rr??=cn())),u.f|=se)),e>l.size&&Ce(``,``,``),E&&e>0&&O(Be()),!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&&Le(!0),K(f)}),flags:t,items:s,pending:m,outrogroups:null,fallback:u};h=!1,E&&(o=D)}function Br(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Vr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Br(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&&(zn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=se,_===c)Ur(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Wr(e,u,_),Wr(e,_,y),Ur(_,y,n),u=_,p=[],m=[],c=Br(u.next);continue}if(_!==c){if(l!==void 0&&l.has(_)){if(p.length<m.length){var b=m[0],x;u=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Ur(p[x],b,n);for(x=0;x<m.length;x+=1)l.delete(m[x]);Wr(e,S.prev,C.next),Wr(e,u,S),Wr(e,C,b),c=b,u=C,--v,p=[],m=[]}else l.delete(_),Ur(_,c,n),Wr(e,_.prev,_.next),Wr(e,_,u===null?e.effect.first:u.next),Wr(e,u,_),u=_;continue}for(p=[],m=[];c!==null&&c!==_;)(l??=new Set).add(c),m.push(c),c=Br(c.next);if(c===null)continue}_.f&33554432||p.push(_),u=_,c=Br(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Lr(e,d(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var w=[];if(l!==void 0)for(_ of l)_.f&8192||w.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&w.push(c),c=Br(c.next);var T=w.length;if(T>0){var ee=r&4&&o===0?n:null;if(a){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}Ir(e,w,ee)}}a&&$e(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Hr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Yt(n):Xt(n,!1,!1):null,l=o&2?Yt(i):null;return{v:c,i:l,e:jn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ur(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=ln(r);if(a.before(r),r===i)return;r=o}}function Wr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Gr(e,t,n=!1,i=!1,a=!1,c=!1){var l=e,u=``;if(n){var d=e;E&&(l=O(R(d)))}V(()=>{var e=W;if(u===(u=t()??``)){E&&Re();return}if(n&&!E){e.nodes=null,d.innerHTML=u,u!==``&&Sr(R(d),d.lastChild);return}if(e.nodes!==null&&(Fn(e.nodes.start,e.nodes.end),e.nodes=null),u!==``){if(E){for(var c=D.data,f=Re(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=ln(f);if(f===null)throw Fe(),r;Sr(D,p),l=O(f);return}var m=pn(i?`svg`:a?`math`:`template`,i?o:a?s:void 0);m.innerHTML=u;var h=i||a?m:m.content;if(Sr(R(h),h.lastChild),i||a)for(;R(h);)l.before(R(h));else l.before(h)}})}function Kr(e,t){Dn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=pn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var qr=[...`
3
- \r\f\xA0\v`];function Jr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||qr.includes(r[o-1]))&&(s===r.length||qr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Yr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Xr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Zr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Xr)),i&&c.push(...Object.keys(i).map(Xr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Xr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Yr(r)),i&&(n+=Yr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Qr(e,t,n,r,i,a){var o=e[ge];if(E||o!==n||o===void 0){var s=Jr(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[ge]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function $r(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ei(e,t,n,r){var i=e[_e];if(E||i!==t){var a=Zr(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[_e]=t}else r&&(Array.isArray(r)?($r(e,n?.[0],r[0]),$r(e,n?.[1],r[1],`important`)):$r(e,n,r));return r}var ti=Symbol(`is custom element`),ni=Symbol(`is html`),ri=xe?`link`:`LINK`,ii=xe?`progress`:`PROGRESS`;function ai(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;X(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;X(e,`checked`,null),e.checked=r}}};e[ye]=n,$e(n),gn()}}function oi(e,t){var n=ci(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ii)||(e.value=t??``)}function si(e,t){var n=ci(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function X(e,t,n,r){var i=ci(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ri)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[me]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ui(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ci(e){return e[he]??={[ti]:e.nodeName.includes(`-`),[ni]:e.namespaceURI===a}}var li=new Map;function ui(e){var t=e.getAttribute(`is`)||e.nodeName,n=li.get(t);if(n)return n;li.set(t,n=[]);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 di(e,t){return e===t||e?.[fe]===t}function fi(e={},t,n,r){var i=A.r,a=W;return Dn(()=>{var o,s;return kn(()=>{o=s,s=r?.()||[],pr(()=>{di(n(...s),e)||(t(e,...s),o&&di(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&di(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Z(e,t,n,r){var i=!Ke||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Lt(r),K(l)):(c&&(c=!1,s=o?pr(r):r),s);let d;if(a){var f=fe in e||pe in e;d=m(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,h=!1;a?[p,h]=lt(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&ke(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?Lt:Bt)(()=>(v=!1,g()));a&&K(y);var b=W;return(function(e,t){if(arguments.length>0){let n=t?K(y):i&&a?tn(e):e;return L(y,n),v=!0,s!==void 0&&(s=n),e}return Wn&&v||b.f&16384?y.v:K(y)})}function pi(e){return new mi(e)}var mi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Xt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return K(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===pe?!0:(K(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return L(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Ar:kr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Ge&&(!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=()=>{Pr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},hi;typeof HTMLElement==`function`&&(hi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=pn(`slot`);e!=="default"&&(n.name=e),J(t,n)}}let t={},n=_i(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=gi(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=pi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Tn(()=>{kn(()=>{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=gi(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=gi(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return f(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function gi(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function _i(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function vi(e,t,n,r,i,a){let o=class extends hi{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return 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=gi(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 yi={50:`#e8f5e9`,500:`#4caf50`},bi={200:`#9fa8da`,500:`#3f51b5`,800:`#283593`},xi={500:`#ff9800`},Si={200:`#f48fb1`,900:`#880e4f`,A400:`#f50057`},Ci={50:`#ffebee`,700:`#d32f2f`},Q={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:yi[500],CORRECT_SECONDARY:yi[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:xi[500],INCORRECT_SECONDARY:Ci[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:Ci[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:bi[500],PRIMARY_LIGHT:bi[200],PRIMARY_DARK:bi[800],SECONDARY:Si.A400,SECONDARY_LIGHT:Si[200],SECONDARY_DARK:Si[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`};Object.freeze(Q);var $=(e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)})(`pie`),wi={text:()=>$(`text`,Q.TEXT),disabled:()=>$(`disabled`,Q.DISABLED),disabledSecondary:()=>$(`disabled-secondary`,Q.DISABLED_SECONDARY),correct:()=>$(`correct`,Q.CORRECT),correctSecondary:()=>$(`correct-secondary`,Q.CORRECT_SECONDARY),correctTertiary:()=>$(`correct-tertiary`,Q.CORRECT_TERTIARY),correctWithIcon:()=>$(`correct-icon`,Q.CORRECT_WITH_ICON),incorrect:()=>$(`incorrect`,Q.INCORRECT),incorrectWithIcon:()=>$(`incorrect-icon`,Q.INCORRECT_WITH_ICON),incorrectSecondary:()=>$(`incorrect-secondary`,Q.INCORRECT_SECONDARY),missing:()=>$(`missing`,Q.MISSING),missingWithIcon:()=>$(`missing-icon`,Q.MISSING_WITH_ICON),primary:()=>$(`primary`,Q.PRIMARY),primaryLight:()=>$(`primary-light`,Q.PRIMARY_LIGHT),primaryDark:()=>$(`primary-dark`,Q.PRIMARY_DARK),primaryText:()=>$(`primary-text`,`text`,Q.TEXT),fadedPrimary:()=>$(`faded-primary`,Q.FADED_PRIMARY),secondary:()=>$(`secondary`,Q.SECONDARY),secondaryLight:()=>$(`secondary-light`,Q.SECONDARY_LIGHT),secondaryDark:()=>$(`secondary-dark`,Q.SECONDARY_DARK),secondaryText:()=>$(`secondary-text`,`text`,Q.TEXT),background:()=>$(`background`,Q.BACKGROUND),backgroundDark:()=>$(`background-dark`,Q.BACKGROUND_DARK),secondaryBackground:()=>$(`secondary-background`,Q.SECONDARY_BACKGROUND),dropdownBackground:()=>$(`dropdown-background`,Q.DROPDOWN_BACKGROUND),tertiary:()=>$(`tertiary`,Q.TERTIARY),tertiaryLight:()=>$(`tertiary-light`,Q.TERTIARY_LIGHT),border:()=>$(`border`,Q.BORDER),borderLight:()=>$(`border-light`,Q.BORDER_LIGHT),borderDark:()=>$(`border-dark`,Q.BORDER_DARK),borderGray:()=>$(`border-gray`,Q.BORDER_GRAY),black:()=>$(`black`,Q.BLACK),white:()=>$(`white`,Q.WHITE),transparent:()=>Q.TRANSPARENT,focusChecked:()=>$(`focus-checked`,Q.FOCUS_CHECKED),focusCheckedBorder:()=>$(`focus-checked-border`,Q.FOCUS_CHECKED_BORDER),focusUnchecked:()=>$(`focus-unchecked`,Q.FOCUS_UNCHECKED),focusUncheckedBorder:()=>$(`focus-unchecked-border`,Q.FOCUS_UNCHECKED_BORDER),blueGrey100:()=>$(`blue-grey-100`,Q.BLUE_GREY100),blueGrey300:()=>$(`blue-grey-300`,Q.BLUE_GREY300),blueGrey600:()=>$(`blue-grey-600`,Q.BLUE_GREY600),blueGrey900:()=>$(`blue-grey-900`,Q.BLUE_GREY900)},Ti=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}},Ei=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}},Di=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function Oi(e,t={}){let n=t.hostPredicate??Di,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 ki({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=Oi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new Ei(n,r)),a):null}function Ai(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var ji=q(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),Mi=q(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),Ni=q(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),Pi=q(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Fi=q(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),Ii={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 Li(e,t){Je(t,!0),Kr(e,Ii);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=Z(t,`hasAudio`,7,!1),i=Z(t,`audioUrl`,7),a=Z(t,`useFeatureButtonAudio`,7,!1),o=Z(t,`autoplayEnabled`,7,!1),s=Z(t,`audioTranscript`,7),c=Z(t,`showVisibleTranscript`,7),l=Z(t,`transcriptId`,7),u=Z(t,`featureAudioSkin`,7),d=Z(t,`uiText`,7),f=Z(t,`locale`,7,``),p=Z(t,`onaudiostarted`,7),m=Z(t,`onaudioended`,7),h=I(null),g=I(null),_=I(null),v=I(tn(n.IDLE)),y=F(()=>Ai({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),b=F(()=>K(v)===n.PLAYING),x=F(()=>K(v)===n.BLOCKED),S=F(()=>K(y)===`error`?d().audioResourceUnavailable:``);Cn(()=>{i(),L(v,n.IDLE,!0)});function C(){K(y)!==`none`&&K(y)!==`error`&&K(h)&&K(h).play().catch(()=>{})}function w(){K(y)!==`none`&&K(y)!==`error`&&K(h)&&K(h).play().finally(()=>{K(v)===n.BLOCKED&&L(v,n.PAUSED,!0)})}function T(e,t,n){Cn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}T(()=>K(h),`playing`,()=>{L(v,n.PLAYING,!0),p()?.()}),T(()=>K(h),`ended`,()=>{L(v,n.PAUSED,!0),m()?.()}),T(()=>K(g),`click`,()=>C()),T(()=>K(_),`click`,()=>w()),Cn(()=>{!o()||K(y)===`none`||K(y)===`error`||K(v)===n.IDLE&&K(h)&&i()&&(L(v,n.PAUSED,!0),K(h).play().catch(()=>{L(v,n.BLOCKED,!0)}))});function ee(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function te(e=``){return e.toLowerCase().startsWith(`es`)?d().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:d().listenSilentAlt??`Repeat instructions`}function ne(e=``){return e.toLowerCase().startsWith(`es`)?d().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:d().listenPlayingAlt??`Instructions are playing`}var re={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 audioTranscript(){return s()},set audioTranscript(e){s(e),P()},get showVisibleTranscript(){return c()},set showVisibleTranscript(e){c(e),P()},get transcriptId(){return l()},set transcriptId(e){l(e),P()},get featureAudioSkin(){return u()},set featureAudioSkin(e){u(e),P()},get uiText(){return d()},set uiText(e){d(e),P()},get locale(){return f()},set locale(e=``){f(e),P()},get onaudiostarted(){return p()},set onaudiostarted(e){p(e),P()},get onaudioended(){return m()},set onaudioended(e){m(e),P()}},ie=Tr(),ae=un(ie),oe=e=>{var t=Fi(),n=z(t),r=e=>{var t=ji(),n=un(t);fi(n,e=>L(h,e),()=>K(h));var r=B(n,2),a=z(r),o=B(a,2);k(r),fi(r,e=>L(g,e),()=>K(g)),V((e,t,s)=>{X(n,`src`,i()),X(r,`aria-label`,e),Qr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(b)?``:`listen-active`}`,`svelte-ypdwb3`),X(a,`src`,u().silentUrl),X(a,`alt`,t),Qr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(b)?`listen-active`:``}`,`svelte-ypdwb3`),X(o,`src`,u().playingUrl),X(o,`alt`,s)},[()=>ee(f()),()=>te(f()),()=>ne(f())]),J(e,t)},a=e=>{var t=Ni(),n=un(t);fi(n,e=>L(h,e),()=>K(h));var r=B(n,2),a=e=>{var t=Mi(),n=z(t,!0);k(t),fi(t,e=>L(_,e),()=>K(_)),V(()=>Or(n,d().clickToEnableAutoplay)),J(e,t)};Y(r,e=>{K(x)&&e(a)}),V(()=>{X(n,`src`,i()),X(n,`aria-describedby`,s()?l():void 0)}),J(e,t)},o=e=>{var t=Pi(),n=z(t,!0);k(t),V(()=>Or(n,K(S))),J(e,t)};Y(n,e=>{K(y)===`feature-button`?e(r):K(y)===`controls`?e(a,1):K(y)===`error`&&e(o,2)}),k(t),J(e,t)};return Y(ae,e=>{K(y)!==`none`&&e(oe)}),J(e,ie),Ye(re)}vi(Li,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},audioTranscript:{},showVisibleTranscript:{},transcriptId:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var Ri=q(`<img class="w-auto object-contain pie-blank-image" style="max-height:var(--mpb-selected-image-max-height, 4rem);"/>`),zi=q(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Bi=q(`<span class="cloze-marker-empty svelte-d9l5tb" aria-hidden="true">&nbsp;</span>`),Vi=q(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Hi={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(--pie-focus, #2563eb);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 Ui(e,t){Je(t,!0),Kr(e,Hi);let n=Z(t,`choiceMode`,7,`text`),r=Z(t,`displayChoice`,7,void 0),i=Z(t,`displayChoiceLabelHtml`,7,``),a=Z(t,`isStandalone`,7,!1),o=Z(t,`blankWidth`,7),s=Z(t,`blankBorderWidth`,7),c=Z(t,`ariaLabel`,7);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=Vi(),d=z(u),f=e=>{var t=Ri();V(()=>{X(t,`src`,r().imageUrl),X(t,`alt`,r().imageAlt||`Selected answer image`)}),J(e,t)},p=e=>{var t=zi();Gr(t,i,!0),k(t),J(e,t)},m=e=>{J(e,Bi())};return Y(d,e=>{n()===`image`&&r()?.imageUrl?e(f):i()?e(p,1):e(m,-1)}),k(u),V(()=>{Qr(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`),ei(u,`width:${o()};border-bottom-width:${s()};`),X(u,`aria-label`,c())}),J(e,u),Ye(l)}vi(Ui,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{}},[],[],{mode:`open`});var Wi=q(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Gi=q(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Ki=q(`<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>`),qi=q(`<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),Ji=q(`<span aria-hidden="true"> </span>`),Yi=q(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Xi={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-correct-answer-choice-hover-bg, #f2f2f2));}.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-correct-answer-choice-selected-bg, #fcfcd3));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-correct-answer-choice-selected-bg, #fcfcd3));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-hover-bg, #ececec);}.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-correct-answer-choice-selected-bg, #f1f1f1);border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-correct-border, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-incorrect-border, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-correct-bg, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-incorrect-bg, #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-correct-answer-feedback-glyph-color, #fff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-correct-bg, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-incorrect-bg, #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){Je(t,!0),Kr(e,Xi);let n=Z(t,`choice`,7),r=Z(t,`choiceMode`,7,`text`),i=Z(t,`isHorizontal`,7,!1),a=Z(t,`isSelected`,7,!1),o=Z(t,`isDisabled`,7,!1),s=Z(t,`correctness`,7,void 0),c=Z(t,`isEvaluateMode`,7,!1),l=Z(t,`instanceId`,7),u=Z(t,`radioGroupName`,7);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=Yi(),p=z(f),m=e=>{var t=Ki(),i=z(t),s=z(i),c=e=>{var t=Wi();V(()=>{X(t,`src`,n().imageUrl),X(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),J(e,t)},d=e=>{var t=Gi();Gr(t,()=>n().labelHtml||``,!0),k(t),J(e,t)};Y(s,e=>{r()===`image`&&n().imageUrl?e(c):e(d,-1)}),k(i);var f=B(i,2);ai(f),k(t),V(()=>{X(t,`for`,`${l()}-opt-${n().id}`),X(f,`name`,u()),X(f,`id`,`${l()}-opt-${n().id}`),oi(f,n().id),si(f,a()),f.disabled=o()}),J(e,t)},h=e=>{var t=qi(),i=un(t);ai(i);var s=B(i,2),c=z(s),d=e=>{var t=Wi();V(()=>{X(t,`src`,n().imageUrl),X(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),J(e,t)},f=e=>{var t=Gi();Gr(t,()=>n().labelHtml||``,!0),k(t),J(e,t)};Y(c,e=>{r()===`image`&&n().imageUrl?e(d):e(f,-1)}),k(s),V(()=>{X(i,`name`,u()),X(i,`id`,`${l()}-opt-${n().id}`),oi(i,n().id),si(i,a()),i.disabled=o(),X(s,`for`,`${l()}-opt-${n().id}`)}),J(e,t)};Y(p,e=>{i()?e(m):e(h,-1)});var g=B(p,2),_=e=>{var t=Ji(),n=z(t,!0);k(t),V(()=>{Qr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Or(n,s()===`correct`?`✓`:`✕`)}),J(e,t)};return Y(g,e=>{c()&&s()&&e(_)}),k(f),V(()=>Qr(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`)),J(e,f),Ye(d)}vi(Zi,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{}},[],[],{mode:`open`});function Qi(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 $i=`{{blank}}`,ea=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function ta(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/&nbsp;/g,` `).trim()===$i:!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&&ea.has(i)}}var na={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},ra={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`}},ia={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 aa(e){let{layoutProfile:t,isBlankOnlyTemplate:n,correctAnswerStyleVars:r}=e,i=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},a=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},o=a[t]&&typeof a[t]==`object`?a[t]:{},s={...ia[t]??{},...o},c={...na,...i,...s},l=[`audio_blank_only`,`stimulus_image_blank`],u=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],d=l.includes(t)?`${c.blankWideWidthRem}rem`:n?`${c.blankStandaloneWidthRem}rem`:`auto`,f=u.includes(t)?`${c.blankUnderlineWideWidthPx}px`:`${c.blankUnderlineWidthPx}px`;return{rootStyle:[...Object.keys(ra).map(e=>`${ra[e].varName}:${c[e]}${ra[e].unit}`),r].join(`;`),blankWidth:d,blankBorderWidth:f,legendMaxChars:c.legendMaxChars}}var oa={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 sa(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`)?oa.es:oa.default;return r[t]||r[n]||r.default||i||a}function ca(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,alwaysShowCorrect:i,correctChoiceId:a}=e;return i&&a||n&&r&&a?a:t}function la(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 ua(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 da=`/* 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(),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,b=()=>{};function x(e){for(var t=0;t<e.length;t++)e[t]()}function S(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,ue=1<<22,de=1<<23,fe=Symbol(`$state`),pe=Symbol(`legacy props`),me=Symbol(``),he=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ge=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function _e(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function ve(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function ye(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function be(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function xe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Se(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ce(){throw Error(`https://svelte.dev/e/hydration_failed`)}function we(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Te(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ee(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function De(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Oe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function ke(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ae(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function je(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function D(e){E=e}var O;function k(e){if(e===null)throw Ae(),r;return O=e}function Me(){return k(Qt(O))}function A(e){if(E){if(Qt(O)!==null)throw Ae(),r;O=e}}function Ne(e=1){if(E){for(var t=e,n=O;t--;)n=Qt(n);O=n}}function Pe(e=!0){for(var t=0,n=O;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Qt(n);e&&n.remove(),n=i}}function Fe(e){if(!e||e.nodeType!==8)throw Ae(),r;return e.data}function Ie(e){return e===this.v}function Le(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Re(e){return!Le(e,this.v)}var ze=!1,Be=!1,j=null;function Ve(e){j=e}function He(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:K,l:Be&&!t?{s:null,u:null,$:[]}:null}}function Ue(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)mn(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,e??{}}function We(){return!Be||j!==null&&j.l===null}var Ge=[];function Ke(){var e=Ge;Ge=[],x(e)}function M(e){if(Ge.length===0&&!at){var t=Ge;queueMicrotask(()=>{t===Ge&&Ke()})}Ge.push(e)}function qe(){for(;Ge.length>0;)Ke()}function Je(e){var t=K;if(t===null)return G.f|=de,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ye(e,t)}function Ye(e,t){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 Xe=~(w|T|C);function N(e,t){e.f=e.f&Xe|t}function Ze(e){e.f&512||e.deps===null?N(e,C):N(e,T)}function Qe(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,Qe(t.deps))}function $e(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Qe(e.deps),N(e,C)}var et=!1,tt=!1;function nt(e){var t=tt;try{return tt=!1,[e(),tt]}finally{tt=t}}var rt=new Set,P=null,F=null,it=null,at=!1,ot=!1,st=null,ct=null,lt=0,ut=1,dt=class e{id=ut++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=new Set;#r=new Map;#i=new Map;#a=null;#o=[];#s=[];#c=new Set;#l=new Set;#u=new Map;#d=new Set;is_fork=!1;#f=!1;#p=new Set;#m(){return this.is_fork||this.#i.size>0}#h(){for(let n of this.#p)for(let r of n.#i.keys()){for(var e=!1,t=r;t.parent!==null;){if(this.#u.has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}skip_effect(e){this.#u.has(e)||this.#u.set(e,{d:[],m:[]}),this.#d.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#u.get(e);if(n){this.#u.delete(e);for(var r of n.d)N(r,w),t(r);for(r of n.m)N(r,T),t(r)}this.#d.add(e)}#g(){if(lt++>1e3&&(rt.delete(this),ft()),!this.#m()){for(let e of this.#c)this.#l.delete(e),N(e,w),this.schedule(e);for(let e of this.#l)N(e,T),this.schedule(e)}let t=this.#o;this.#o=[],this.apply();var n=st=[],r=[],i=ct=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw yt(e),t}if(P=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(st=null,ct=null,this.#m()||this.#h()){this.#v(r),this.#v(n);for(let[e,t]of this.#u)vt(e,t)}else{this.#r.size===0&&rt.delete(this),this.#c.clear(),this.#l.clear();for(let e of this.#e)e(this);this.#e.clear(),mt(r),mt(n),this.#a?.resolve()}var o=P;if(this.#o.length>0){let e=o??=this;e.#o.push(...this.#o.filter(t=>!e.#o.includes(t)))}o!==null&&(rt.add(o),o.#g()),ze&&!rt.has(this)&&this.#y()}#_(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#u.has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):ze&&i&16777224?n.push(r):Xn(r)&&(i&16&&this.#l.add(r),tr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(e){for(var t=0;t<e.length;t+=1)$e(e[t],this.#c,this.#l)}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]),F?.set(e,t)),this.is_fork||(e.v=t)}activate(){P=this}deactivate(){P=null,F=null}flush(){try{ot=!0,P=this,this.#g()}finally{lt=0,it=null,st=null,ct=null,ot=!1,P=null,F=null,Lt.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),this.#n.clear(),rt.delete(this)}register_created_effect(e){this.#s.push(e)}#y(){for(let l of rt){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}var r=[...l.current.keys()].filter(e=>!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#d)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#v([e])});l.activate();var i=new Set,a=new Map;for(var o of t)ht(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e:!0);for(let e of this.#s)!(e.f&155648)&&gt(e,s,a)&&(e.f&4194320?(N(e,w),l.schedule(e)):l.#c.add(e));if(l.#o.length>0){l.apply();for(var c of l.#o)l.#_(c,[],[]);l.#o=[]}l.deactivate()}}for(let e of rt)e.#p.has(this)&&(e.#p.delete(this),e.#p.size===0&&!e.#m()&&(e.activate(),e.#g()))}increment(e,t){let n=this.#r.get(t)??0;if(this.#r.set(t,n+1),e){let e=this.#i.get(t)??0;this.#i.set(t,e+1)}}decrement(e,t,n){let r=this.#r.get(t)??0;if(r===1?this.#r.delete(t):this.#r.set(t,r-1),e){let e=this.#i.get(t)??0;e===1?this.#i.delete(t):this.#i.set(t,e-1)}this.#f||n||(this.#f=!0,M(()=>{this.#f=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#c.add(t);for(let e of t)this.#l.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}on_fork_commit(e){this.#n.add(e)}run_fork_commit_callbacks(){for(let e of this.#n)e(this);this.#n.clear()}settled(){return(this.#a??=S()).promise}static ensure(){if(P===null){let t=P=new e;ot||(rt.add(P),at||M(()=>{P===t&&t.flush()}))}return P}apply(){if(!ze||!this.is_fork&&rt.size===1){F=null;return}F=new Map;for(let[e,[t]]of this.current)F.set(e,t);for(let n of rt)if(!(n===this||n.is_fork)){var e=!1,t=!1;if(n.id<this.id)for(let[r,[,i]]of n.current)i||(e||=this.current.has(r),t||=!this.current.has(r));if(e&&t)this.#p.add(n);else for(let[e,t]of n.previous)F.has(e)||F.set(e,t)}}schedule(e){if(it=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(st!==null&&t===K&&(ze||(G===null||!(G.f&2))&&!et))return;if(n&96){if(!(n&1024))return;t.f^=C}}this.#o.push(t)}};function I(e){var t=at;at=!0;try{var n;for(e&&(P!==null&&!P.is_fork&&P.flush(),n=e());;){if(qe(),P===null)return n;P.flush()}}finally{at=t}}function ft(){try{Se()}catch(e){Ye(e,it)}}var pt=null;function mt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Xn(r)&&(pt=new Set,tr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&En(r),pt?.size>0)){Lt.clear();for(let e of pt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)pt.has(n)&&(pt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||tr(n)}}pt.clear()}}pt=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)&&gt(i,t,r)&&(N(i,w),_t(i))}}function gt(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&&gt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function _t(e){P.schedule(e)}function vt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),N(e,C);for(var n=e.first;n!==null;)vt(n,t),n=n.next}}function yt(e){N(e,C);for(var t=e.first;t!==null;)yt(t),t=t.next}function bt(e){let t=0,n=zt(0),r;return()=>{dn()&&(q(n),yn(()=>(t===0&&(r=ir(()=>e(()=>Ut(n)))),t+=1,()=>{M(()=>{--t,t===0&&(r?.(),r=void 0,Ut(n))})})))}}var xt=ie|ae;function St(e,t,n,r){new Ct(e,t,n,r)}var Ct=class{parent;is_pending=!1;transform_error;#e;#t=E?O: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=bt(()=>(this.#m=zt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=K;t.b=this,t.f|=128,n(e)},this.parent=K.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=bn(()=>{if(E){let e=this.#t;Me();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},xt),E&&(this.#e=O)}#g(){try{this.#a=xn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=xn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=xn(()=>e(this.#e)),M(()=>{var e=this.#c=document.createDocumentFragment(),t=Zt();e.append(t),this.#a=this.#x(()=>xn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Dn(this.#o,()=>{this.#o=null}),this.#b(P))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=xn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();jn(this.#a,e);let t=this.#n.pending;this.#o=xn(()=>t(this.#e))}else this.#b(P)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){$e(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=K,n=G,r=j;Rn(this.#i),Ln(this.#i),Ve(this.#i.ctx);try{return dt.ensure(),e()}catch(e){return Je(e),null}finally{Rn(t),Ln(n),Ve(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Dn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,M(()=>{this.#d=!1,this.#m&&Vt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),q(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;P?.is_fork?(this.#a&&P.skip_effect(this.#a),this.#o&&P.skip_effect(this.#o),this.#s&&P.skip_effect(this.#s),P.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(W(this.#a),null),this.#o&&=(W(this.#o),null),this.#s&&=(W(this.#s),null),E&&(k(this.#t),Ne(),k(Pe()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){je();return}r=!0,i&&Oe(),this.#s!==null&&Dn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Ye(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return xn(()=>{var t=K;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Ye(e,this.#i.parent),null}}))};M(()=>{var t;try{t=this.transform_error(e)}catch(e){Ye(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Ye(e,this.#i&&this.#i.parent)):o(t)})}};function wt(e,t,n,r){let i=We()?Ot:At;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=K,s=Tt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||Ye(e,o)}Et()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=Dt();function d(){Promise.all(n.map(e=>kt(e))).then(e=>l([...t.map(i),...e])).catch(e=>Ye(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),Et()}):d()}function Tt(){var e=K,t=G,n=j,r=P;return function(i=!0){Rn(e),Ln(t),Ve(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Et(e=!0){Rn(null),Ln(null),Ve(null),e&&P?.deactivate()}function Dt(){var e=K,t=e.b,n=P,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Ot(e){var t=2|w;return K!==null&&(K.f|=ae),{ctx:j,deps:null,effects:null,equals:Ie,f:t,fn:e,reactions:null,rv:0,v:i,wv:0,parent:K,ac:null}}function kt(e,t,n){let r=K;r===null&&_e();var a=void 0,o=zt(i),s=!G,c=new Map;return vn(()=>{var t=K,n=S();a=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(Et)}catch(e){n.reject(e),Et()}var i=P;if(s){if(t.f&32768)var l=Dt();if(r.b.is_rendered())c.get(i)?.reject(he),c.delete(i);else{for(let e of c.values())e.reject(he);c.clear()}c.set(i,n)}let u=(e,n=void 0)=>{if(l&&l(n===he),!(n===he||t.f&16384)){if(i.activate(),n)o.f|=de,Vt(o,n);else{o.f&8388608&&(o.f^=de),Vt(o,e);for(let[e,t]of c){if(c.delete(e),e===i)break;t.reject(he)}}i.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),fn(()=>{for(let e of c.values())e.reject(he)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function L(e){let t=Ot(e);return ze||Bn(t),t}function At(e){let t=Ot(e);return t.equals=Re,t}function jt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)W(t[n])}}function Mt(e){var t,n=K,r=e.parent;if(!Pn&&r!==null&&r.f&24576)return ke(),e.v;Rn(r);try{e.f&=~ce,jt(e),t=Qn(e)}finally{Rn(n)}return t}function Nt(e){var t=Mt(e);if(!e.equals(t)&&(e.wv=Yn(),(!P?.is_fork||e.deps===null)&&(P===null?e.v=t:P.capture(e,t,!0),e.deps===null))){N(e,C);return}Pn||(F===null?Ze(e):(dn()||P?.is_fork)&&F.set(e,t))}function Pt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(he),t.teardown=b,t.ac=null,er(t,0),Cn(t))}function Ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&tr(t)}var It=new Set,Lt=new Map,Rt=!1;function zt(e,t){return{f:0,v:e,reactions:null,equals:Ie,rv:0,wv:0}}function R(e,t){let n=zt(e,t);return Bn(n),n}function Bt(e,t=!1,n=!0){let r=zt(e);return t||(r.equals=Re),Be&&n&&j!==null&&j.l!==null&&(j.l.s??=[]).push(r),r}function z(e,t,n=!1){return G!==null&&(!In||G.f&131072)&&We()&&G.f&4325394&&(zn===null||!u.call(zn,e))&&De(),Vt(e,n?Gt(t):t,ct)}function Vt(e,t,n=null){if(!e.equals(t)){Lt.set(e,Pn?t:e.v);var r=dt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Mt(t),F===null&&Ze(t)}e.wv=Yn(),Wt(e,w,n),We()&&K!==null&&K.f&1024&&!(K.f&96)&&(Un===null?Wn([e]):Un.push(e)),!r.is_fork&&It.size>0&&!Rt&&Ht()}return t}function Ht(){Rt=!1;for(let e of It)e.f&1024&&N(e,T),Xn(e)&&tr(e);It.clear()}function Ut(e){z(e,e.v+1)}function Wt(e,t,n){var r=e.reactions;if(r!==null)for(var i=We(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===K)){var l=(c&w)===0;if(l&&N(s,t),c&2){var u=s;F?.delete(u),c&65536||(c&512&&(K===null||!(K.f&2097152))&&(s.f|=ce),Wt(u,T,n))}else if(l){var d=s;c&16&&pt!==null&&pt.add(d),n===null?_t(d):n.push(d)}}}}function Gt(e){if(typeof e!=`object`||!e||fe in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=c(e),a=R(0),o=null,s=qn,l=e=>{if(qn===s)return e();var t=G,n=qn;Ln(null),Jn(s);var r=e();return Ln(t),Jn(n),r};return r&&n.set(`length`,R(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Te();var i=n.get(t);return i===void 0?l(()=>{var e=R(r.value,o);return n.set(t,e),e}):z(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>R(i,o));n.set(t,e),Ut(a)}}else z(r,i),Ut(a);return!0},get(t,r,a){if(r===fe)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||m(t,r)?.writable)&&(s=l(()=>R(Gt(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===fe)return!0;var r=n.get(t),a=r!==void 0&&r.v!==i||Reflect.has(e,t);return(r!==void 0||K!==null&&(!a||m(e,t)?.writable))&&(r===void 0&&(r=l(()=>R(a?Gt(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(()=>R(i,o)),n.set(f+``,p)):z(p,i)}if(u===void 0)(!d||m(e,t)?.writable)&&(u=l(()=>R(void 0,o)),z(u,Gt(s)),n.set(t,u));else{d=u.v!==i;var h=l(()=>Gt(s));z(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&&z(_,v+1)}Ut(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(){Ee()}})}var Kt,qt,Jt,Yt;function Xt(){if(Kt===void 0){Kt=window,qt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Jt=m(t,`firstChild`).get,Yt=m(t,`nextSibling`).get,y(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),y(n)&&(n.__t=void 0)}}function Zt(e=``){return document.createTextNode(e)}function B(e){return Jt.call(e)}function Qt(e){return Yt.call(e)}function V(e,t){if(!E)return B(e);var n=B(O);if(n===null)n=O.appendChild(Zt());else if(t&&n.nodeType!==3){var r=Zt();return n?.before(r),k(r),r}return t&&rn(n),k(n),n}function $t(e,t=!1){if(!E){var n=B(e);return n instanceof Comment&&n.data===``?Qt(n):n}if(t){if(O?.nodeType!==3){var r=Zt();return O?.before(r),k(r),r}rn(O)}return O}function H(e,t=1,n=!1){let r=E?O:e;for(var i;t--;)i=r,r=Qt(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=Zt();return r===null?i?.after(a):r.before(a),k(a),a}rn(r)}return k(r),r}function en(e){e.textContent=``}function tn(){return!ze||pt!==null?!1:(K.f&ne)!==0}function nn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function rn(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}var an=!1;function on(){an||(an=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function sn(e){var t=G,n=K;Ln(null),Rn(null);try{return e()}finally{Ln(t),Rn(n)}}function cn(e){K===null&&(G===null&&xe(e),be()),Pn&&ye(e)}function ln(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function un(e,t){var n=K;n!==null&&n.f&8192&&(e|=ee);var r={ctx:j,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};P?.register_created_effect(r);var i=r;if(e&4)st===null?dt.ensure().schedule(r):st.push(r);else if(t!==null){try{tr(r)}catch(e){throw W(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|=ie))}if(i!==null&&(i.parent=n,n!==null&&ln(i,n),G!==null&&G.f&2&&!(e&64))){var a=G;(a.effects??=[]).push(i)}return r}function dn(){return G!==null&&!In}function fn(e){let t=un(8,null);return N(t,C),t.teardown=e,t}function pn(e){cn(`$effect`);var t=K.f;if(!G&&t&32&&!(t&32768)){var n=j;(n.e??=[]).push(e)}else return mn(e)}function mn(e){return un(4|oe,e)}function hn(e){dt.ensure();let t=un(64|ae,e);return()=>{W(t)}}function gn(e){dt.ensure();let t=un(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Dn(t,()=>{W(t),n(void 0)}):(W(t),n(void 0))})}function _n(e){return un(4,e)}function vn(e){return un(ue|ae,e)}function yn(e,t=0){return un(8|t,e)}function U(e,t=[],n=[],r=[]){wt(r,t,n,t=>{un(8,()=>e(...t.map(q)))})}function bn(e,t=0){return un(16|t,e)}function xn(e){return un(32|ae,e)}function Sn(e){var t=e.teardown;if(t!==null){let e=Pn,n=G;Fn(!0),Ln(null);try{t.call(null)}finally{Fn(e),Ln(n)}}}function Cn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&sn(()=>{e.abort(he)});var r=n.next;n.f&64?n.parent=null:W(n,t),n=r}}function wn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||W(t),t=n}}function W(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Tn(e.nodes.start,e.nodes.end),n=!0),N(e,re),Cn(e,t&&!n),er(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Sn(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&En(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Tn(e,t){for(;e!==null;){var n=e===t?null:Qt(e);e.remove(),e=n}}function En(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 Dn(e,t,n=!0){var r=[];On(e,r,!0);var i=()=>{n&&W(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function On(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;On(i,t,o?n:!1)}i=a}}}function kn(e){An(e,!0)}function An(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(N(e,w),dt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;An(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 jn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Qt(n);t.append(n),n=i}}var Mn=null,Nn=!1,Pn=!1;function Fn(e){Pn=e}var G=null,In=!1;function Ln(e){G=e}var K=null;function Rn(e){K=e}var zn=null;function Bn(e){G!==null&&(!ze||G.f&2)&&(zn===null?zn=[e]:zn.push(e))}var Vn=null,Hn=0,Un=null;function Wn(e){Un=e}var Gn=1,Kn=0,qn=Kn;function Jn(e){qn=e}function Yn(){return++Gn}function Xn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Xn(a)&&Nt(a),a.wv>e.wv)return!0}t&512&&F===null&&N(e,C)}return!1}function Zn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!ze&&zn!==null&&u.call(zn,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Zn(a,t,!1):t===a&&(n?N(a,w):a.f&1024&&N(a,T),_t(a))}}function Qn(e){var t=Vn,n=Hn,r=Un,i=G,a=zn,o=j,s=In,c=qn,l=e.f;Vn=null,Hn=0,Un=null,G=l&96?null:e,zn=null,Ve(e.ctx),In=!1,qn=++Kn,e.ac!==null&&(sn(()=>{e.ac.abort(he)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=P?.is_fork;if(Vn!==null){var m;if(p||er(e,Hn),f!==null&&Hn>0)for(f.length=Hn+Vn.length,m=0;m<Vn.length;m++)f[Hn+m]=Vn[m];else e.deps=f=Vn;if(dn()&&e.f&512)for(m=Hn;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Hn<f.length&&(er(e,Hn),f.length=Hn);if(We()&&Un!==null&&!In&&f!==null&&!(e.f&6146))for(m=0;m<Un.length;m++)Zn(Un[m],e);if(i!==null&&i!==e){if(Kn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Kn;if(t!==null)for(let e of t)e.rv=Kn;Un!==null&&(r===null?r=Un:r.push(...Un))}return e.f&8388608&&(e.f^=de),d}catch(e){return Je(e)}finally{e.f^=le,Vn=t,Hn=n,Un=r,G=i,zn=a,Ve(o),In=s,qn=c}}function $n(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&&(Vn===null||!u.call(Vn,t))){var o=t;o.f&512&&(o.f^=512,o.f&=~ce),o.v!==i&&Ze(o),Pt(o),er(o,0)}}function er(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$n(e,n[r])}function tr(e){var t=e.f;if(!(t&16384)){N(e,C);var n=K,r=Nn;K=e,Nn=!0;try{t&16777232?wn(e):Cn(e),Sn(e);var i=Qn(e);e.teardown=typeof i==`function`?i:null,e.wv=Gn}finally{Nn=r,K=n}}}function q(e){var t=(e.f&2)!=0;if(Mn?.add(e),G!==null&&!In&&!(K!==null&&K.f&16384)&&(zn===null||!u.call(zn,e))){var n=G.deps;if(G.f&2097152)e.rv<Kn&&(e.rv=Kn,Vn===null&&n!==null&&n[Hn]===e?Hn++:Vn===null?Vn=[e]:Vn.push(e));else{(G.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[G]:u.call(r,G)||r.push(G)}}if(Pn&&Lt.has(e))return Lt.get(e);if(t){var i=e;if(Pn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||rr(i))&&(a=Mt(i)),Lt.set(i,a),a}var o=(i.f&512)==0&&!In&&G!==null&&(Nn||(G.f&512)!=0),s=(i.f&ne)===0;Xn(i)&&(o&&(i.f|=512),Nt(i)),o&&!s&&(Ft(i),nr(i))}if(F?.has(e))return F.get(e);if(e.f&8388608)throw e.v;return e.v}function nr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Ft(t),nr(t))}function rr(e){if(e.v===i)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Lt.has(t)||t.f&2&&rr(t))return!0;return!1}function ir(e){var t=In;try{return In=!0,e()}finally{In=t}}var ar=Symbol(`events`),or=new Set,sr=new Set,cr=null;function lr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;cr=e;var o=0,s=cr===e&&e[ar];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ar]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){p(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=G,d=K;Ln(null),Rn(null);try{for(var f,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[ar]?.[r];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(e){f?m.push(e):f=e}if(e.cancelBubble||h===t||h===null)break;a=h}if(f){for(let e of m)queueMicrotask(()=>{throw e});throw f}}finally{e[ar]=t,delete e.currentTarget,Ln(u),Rn(d)}}}var ur=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function dr(e){return ur?.createHTML(e)??e}function fr(e){var t=nn(`template`);return t.innerHTML=dr(e.replaceAll(`<!>`,`<!---->`)),t.content}function pr(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function J(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return pr(O,null),O;i===void 0&&(i=fr(a?e:`<!>`+e),n||(i=B(i)));var t=r||qt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=B(t),s=t.lastChild;pr(o,s)}else pr(t,t);return t}}function mr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return pr(O,null),O;if(!o){var e=B(fr(a));if(i)for(o=document.createDocumentFragment();B(e);)o.appendChild(B(e));else o=B(e)}var t=o.cloneNode(!0);if(i){var n=B(t),r=t.lastChild;pr(n,r)}else pr(t,t);return t}}function hr(e,t){return mr(e,t,`svg`)}function gr(){if(E)return pr(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(``),n=Zt();return e.append(t,n),pr(t,n),e}function Y(e,t){if(E){var n=K;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=O),Me();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 _r=[`touchstart`,`touchmove`];function vr(e){return _r.includes(e)}function yr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function br(e,t){return Cr(e,t)}function xr(e,t){Xt(),t.intro=t.intro??!1;let n=t.target,i=E,a=O;try{for(var o=B(n);o&&(o.nodeType!==8||o.data!==`[`);)o=Qt(o);if(!o)throw r;D(!0),k(o);let i=Cr(e,{...t,anchor:o});return D(!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&&Ce(),Xt(),en(n),D(!1),br(e,t)}finally{D(i),k(a)}}var Sr=new Map;function Cr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Xt();var l=void 0,u=gn(()=>{var s=n??t.appendChild(Zt());St(s,{pending:()=>{}},t=>{He({});var n=j;if(o&&(n.c=o),a&&(i.$$events=a),E&&pr(t,null),l=e(t,i)||{},E&&(K.nodes.end=O,O===null||O.nodeType!==8||O.data!==`]`))throw Ae(),r;Ue()},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=vr(r);for(let e of[t,document]){var a=Sr.get(e);a===void 0&&(a=new Map,Sr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,lr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(d(or)),sr.add(f),()=>{for(var e of u)for(let n of[t,document]){var r=Sr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,lr),r.delete(e),r.size===0&&Sr.delete(n)):r.set(e,i)}sr.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return wr.set(l,u),l}var wr=new WeakMap;function Tr(e,t){let n=wr.get(e);return n?(wr.delete(e),n(t)):Promise.resolve()}var Er=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)kn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(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&&(W(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();jn(r,t),t.append(Zt()),this.#n.set(e,{effect:r,fragment:t})}else W(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Dn(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)||(W(n.effect),this.#n.delete(e))};ensure(e,t){var n=P,r=tn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Zt();i.append(a),this.#n.set(e,{effect:xn(()=>t(a)),fragment:i})}else this.#t.set(e,xn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else E&&(this.anchor=O),this.#a(n)}};function Dr(e,t,n=!1){var r;E&&(r=O,Me());var i=new Er(e),a=n?ie:0;function o(e,t){if(E){var n=Fe(r);if(e!==parseInt(n.substring(1))){var a=Pe();k(a),i.anchor=a,D(!1),i.ensure(e,t),D(!0);return}}i.ensure(e,t)}bn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Or(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Dn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;kr(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;if(c){var l=n,u=l.parentNode;en(u),u.append(l),e.items.clear()}kr(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function kr(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|=se,jn(a,document.createDocumentFragment())):W(t[i],n)}}var Ar;function jr(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var l=e;o=E?k(B(l)):l.appendChild(Zt())}E&&Me();var u=null,f=At(()=>{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,Nr(v,p,o,t,r),u!==null&&(p.length===0?u.f&33554432?(u.f^=se,Fr(u,null,o)):kn(u):Dn(u,()=>{u=null})))}function _(e){v.pending.delete(e)}var v={effect:bn(()=>{p=q(f);var e=p.length;let c=!1;E&&Fe(o)===`[!`!=(e===0)&&(o=Pe(),k(o),D(!1),c=!0);for(var l=new Set,d=P,v=tn(),y=0;y<e;y+=1){E&&O.nodeType===8&&O.data===`]`&&(o=O,c=!0,D(!1));var b=p[y],x=r(b,y),S=h?null:s.get(x);S?(S.v&&Vt(S.v,b),S.i&&Vt(S.i,y),v&&d.unskip_effect(S.e)):(S=Pr(s,h?o:Ar??=Zt(),b,x,y,i,t,n),h||(S.e.f|=se),s.set(x,S)),l.add(x)}if(e===0&&a&&!u&&(h?u=xn(()=>a(o)):(u=xn(()=>a(Ar??=Zt())),u.f|=se)),e>l.size&&ve(``,``,``),E&&e>0&&k(Pe()),!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&&D(!0),q(f)}),flags:t,items:s,pending:m,outrogroups:null,fallback:u};h=!1,E&&(o=O)}function Mr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Nr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Mr(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&&(kn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=se,_===c)Fr(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ir(e,u,_),Ir(e,_,y),Fr(_,y,n),u=_,p=[],m=[],c=Mr(u.next);continue}if(_!==c){if(l!==void 0&&l.has(_)){if(p.length<m.length){var b=m[0],x;u=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Fr(p[x],b,n);for(x=0;x<m.length;x+=1)l.delete(m[x]);Ir(e,S.prev,C.next),Ir(e,u,S),Ir(e,C,b),c=b,u=C,--v,p=[],m=[]}else l.delete(_),Fr(_,c,n),Ir(e,_.prev,_.next),Ir(e,_,u===null?e.effect.first:u.next),Ir(e,u,_),u=_;continue}for(p=[],m=[];c!==null&&c!==_;)(l??=new Set).add(c),m.push(c),c=Mr(c.next);if(c===null)continue}_.f&33554432||p.push(_),u=_,c=Mr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(kr(e,d(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var w=[];if(l!==void 0)for(_ of l)_.f&8192||w.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&w.push(c),c=Mr(c.next);var T=w.length;if(T>0){var ee=r&4&&o===0?n:null;if(a){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}Or(e,w,ee)}}a&&M(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Pr(e,t,n,r,i,a,o,s){var c=o&1?o&16?zt(n):Bt(n,!1,!1):null,l=o&2?zt(i):null;return{v:c,i:l,e:xn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Fr(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=Qt(r);if(a.before(r),r===i)return;r=o}}function Ir(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Lr(e,t,n=!1,i=!1,a=!1,c=!1){var l=e,u=``;if(n){var d=e;E&&(l=k(B(d)))}U(()=>{var e=K;if(u===(u=t()??``)){E&&Me();return}if(n&&!E){e.nodes=null,d.innerHTML=u,u!==``&&pr(B(d),d.lastChild);return}if(e.nodes!==null&&(Tn(e.nodes.start,e.nodes.end),e.nodes=null),u!==``){if(E){for(var c=O.data,f=Me(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=Qt(f);if(f===null)throw Ae(),r;pr(O,p),l=k(f);return}var m=nn(i?`svg`:a?`math`:`template`,i?o:a?s:void 0);m.innerHTML=u;var h=i||a?m:m.content;if(pr(B(h),h.lastChild),i||a)for(;B(h);)l.before(B(h));else l.before(h)}})}function Rr(e,t){_n(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=nn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var zr=[...`
3
+ \r\f\xA0\v`];function Br(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||zr.includes(r[o-1]))&&(s===r.length||zr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Vr(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 Hr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Ur(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(Hr)),i&&c.push(...Object.keys(i).map(Hr));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=Hr(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+=Vr(r)),i&&(n+=Vr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Wr(e,t,n,r,i,a){var o=e.__className;if(E||o!==n||o===void 0){var s=Br(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=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 Gr(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 Kr(e,t,n,r){var i=e.__style;if(E||i!==t){var a=Ur(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Gr(e,n?.[0],r[0]),Gr(e,n?.[1],r[1],`important`)):Gr(e,n,r));return r}var qr=Symbol(`is custom element`),Jr=Symbol(`is html`),Yr=ge?`link`:`LINK`,Xr=ge?`progress`:`PROGRESS`;function Zr(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;X(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;X(e,`checked`,null),e.checked=r}}};e.__on_r=n,M(n),on()}}function Qr(e,t){var n=ei(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Xr)||(e.value=t??``)}function $r(e,t){var n=ei(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function X(e,t,n,r){var i=ei(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Yr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[me]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ni(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ei(e){return e.__attributes??={[qr]:e.nodeName.includes(`-`),[Jr]:e.namespaceURI===a}}var ti=new Map;function ni(e){var t=e.getAttribute(`is`)||e.nodeName,n=ti.get(t);if(n)return n;ti.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&n.push(o);i=v(i)}return n}function ri(e,t){return e===t||e?.[fe]===t}function ii(e={},t,n,r){var i=j.r,a=K;return _n(()=>{var o,s;return yn(()=>{o=s,s=r?.()||[],ir(()=>{e!==n(...s)&&(t(e,...s),o&&ri(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&&ri(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Z(e,t,n,r){var i=!Be||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?ir(r):r),s);let u;if(a){var d=fe in e||pe in e;u=m(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=nt(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&we(t),u(f)));var h=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(u){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||p)&&u(t?h():e),e):h()})}var _=!1,v=(n&1?Ot:At)(()=>(_=!1,h()));a&&q(v);var y=K;return(function(e,t){if(arguments.length>0){let n=t?q(v):i&&a?Gt(e):e;return z(v,n),_=!0,s!==void 0&&(s=n),e}return Pn&&_||y.f&16384?v.v:q(v)})}function ai(e){return new oi(e)}var oi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Bt(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===pe?!0:(q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return z(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?xr:br)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!ze&&(!e?.props?.$$host||e.sync===!1)&&I(),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=()=>{Tr(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()}},si;typeof HTMLElement==`function`&&(si=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=nn(`slot`);e!==`default`&&(n.name=e),Y(t,n)}}let t={},n=li(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]=ci(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=ai({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=hn(()=>{yn(()=>{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=ci(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]=ci(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 ci(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 li(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function ui(e,t,n,r,i,a){let o=class extends si{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=ci(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 di={50:`#e8f5e9`,500:`#4caf50`},fi={200:`#9fa8da`,500:`#3f51b5`,800:`#283593`},pi={500:`#ff9800`},mi={200:`#f48fb1`,900:`#880e4f`,A400:`#f50057`},hi={50:`#ffebee`,700:`#d32f2f`},Q={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:di[500],CORRECT_SECONDARY:di[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:pi[500],INCORRECT_SECONDARY:hi[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:hi[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:fi[500],PRIMARY_LIGHT:fi[200],PRIMARY_DARK:fi[800],SECONDARY:mi.A400,SECONDARY_LIGHT:mi[200],SECONDARY_DARK:mi[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`};Object.freeze(Q);var $=(e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)})(`pie`),gi={text:()=>$(`text`,Q.TEXT),disabled:()=>$(`disabled`,Q.DISABLED),disabledSecondary:()=>$(`disabled-secondary`,Q.DISABLED_SECONDARY),correct:()=>$(`correct`,Q.CORRECT),correctSecondary:()=>$(`correct-secondary`,Q.CORRECT_SECONDARY),correctTertiary:()=>$(`correct-tertiary`,Q.CORRECT_TERTIARY),correctWithIcon:()=>$(`correct-icon`,Q.CORRECT_WITH_ICON),incorrect:()=>$(`incorrect`,Q.INCORRECT),incorrectWithIcon:()=>$(`incorrect-icon`,Q.INCORRECT_WITH_ICON),incorrectSecondary:()=>$(`incorrect-secondary`,Q.INCORRECT_SECONDARY),missing:()=>$(`missing`,Q.MISSING),missingWithIcon:()=>$(`missing-icon`,Q.MISSING_WITH_ICON),primary:()=>$(`primary`,Q.PRIMARY),primaryLight:()=>$(`primary-light`,Q.PRIMARY_LIGHT),primaryDark:()=>$(`primary-dark`,Q.PRIMARY_DARK),primaryText:()=>$(`primary-text`,`text`,Q.TEXT),fadedPrimary:()=>$(`faded-primary`,Q.FADED_PRIMARY),secondary:()=>$(`secondary`,Q.SECONDARY),secondaryLight:()=>$(`secondary-light`,Q.SECONDARY_LIGHT),secondaryDark:()=>$(`secondary-dark`,Q.SECONDARY_DARK),secondaryText:()=>$(`secondary-text`,`text`,Q.TEXT),background:()=>$(`background`,Q.BACKGROUND),backgroundDark:()=>$(`background-dark`,Q.BACKGROUND_DARK),secondaryBackground:()=>$(`secondary-background`,Q.SECONDARY_BACKGROUND),dropdownBackground:()=>$(`dropdown-background`,Q.DROPDOWN_BACKGROUND),tertiary:()=>$(`tertiary`,Q.TERTIARY),tertiaryLight:()=>$(`tertiary-light`,Q.TERTIARY_LIGHT),border:()=>$(`border`,Q.BORDER),borderLight:()=>$(`border-light`,Q.BORDER_LIGHT),borderDark:()=>$(`border-dark`,Q.BORDER_DARK),borderGray:()=>$(`border-gray`,Q.BORDER_GRAY),black:()=>$(`black`,Q.BLACK),white:()=>$(`white`,Q.WHITE),transparent:()=>Q.TRANSPARENT,focusChecked:()=>$(`focus-checked`,Q.FOCUS_CHECKED),focusCheckedBorder:()=>$(`focus-checked-border`,Q.FOCUS_CHECKED_BORDER),focusUnchecked:()=>$(`focus-unchecked`,Q.FOCUS_UNCHECKED),focusUncheckedBorder:()=>$(`focus-unchecked-border`,Q.FOCUS_UNCHECKED_BORDER),blueGrey100:()=>$(`blue-grey-100`,Q.BLUE_GREY100),blueGrey300:()=>$(`blue-grey-300`,Q.BLUE_GREY300),blueGrey600:()=>$(`blue-grey-600`,Q.BLUE_GREY600),blueGrey900:()=>$(`blue-grey-900`,Q.BLUE_GREY900)},_i=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}},vi=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}},yi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function bi(e,t={}){let n=t.hostPredicate??yi,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 xi({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=bi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new vi(n,r)),a):null}function Si(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var Ci=J(`<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),wi=J(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),Ti=J(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),Ei=J(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Di=J(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),Oi={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 ki(e,t){He(t,!0),Rr(e,Oi);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=Z(t,`hasAudio`,7,!1),i=Z(t,`audioUrl`,7),a=Z(t,`useFeatureButtonAudio`,7,!1),o=Z(t,`autoplayEnabled`,7,!1),s=Z(t,`audioTranscript`,7),c=Z(t,`showVisibleTranscript`,7),l=Z(t,`transcriptId`,7),u=Z(t,`featureAudioSkin`,7),d=Z(t,`uiText`,7),f=Z(t,`locale`,7,``),p=Z(t,`onaudiostarted`,7),m=Z(t,`onaudioended`,7),h=R(null),g=R(null),_=R(null),v=R(Gt(n.IDLE)),y=L(()=>Si({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),b=L(()=>q(v)===n.PLAYING),x=L(()=>q(v)===n.BLOCKED),S=L(()=>q(y)===`error`?d().audioResourceUnavailable:``);pn(()=>{i(),z(v,n.IDLE,!0)});function C(){q(y)!==`none`&&q(y)!==`error`&&q(h)&&q(h).play().catch(()=>{})}function w(){q(y)!==`none`&&q(y)!==`error`&&q(h)&&q(h).play().finally(()=>{q(v)===n.BLOCKED&&z(v,n.PAUSED,!0)})}function T(e,t,n){pn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}T(()=>q(h),`playing`,()=>{z(v,n.PLAYING,!0),p()?.()}),T(()=>q(h),`ended`,()=>{z(v,n.PAUSED,!0),m()?.()}),T(()=>q(g),`click`,()=>C()),T(()=>q(_),`click`,()=>w()),pn(()=>{!o()||q(y)===`none`||q(y)===`error`||q(v)===n.IDLE&&q(h)&&i()&&(z(v,n.PAUSED,!0),q(h).play().catch(()=>{z(v,n.BLOCKED,!0)}))});function ee(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function te(e=``){return e.toLowerCase().startsWith(`es`)?d().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:d().listenSilentAlt??`Repeat instructions`}function ne(e=``){return e.toLowerCase().startsWith(`es`)?d().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:d().listenPlayingAlt??`Instructions are playing`}var re={get hasAudio(){return r()},set hasAudio(e=!1){r(e),I()},get audioUrl(){return i()},set audioUrl(e){i(e),I()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),I()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),I()},get audioTranscript(){return s()},set audioTranscript(e){s(e),I()},get showVisibleTranscript(){return c()},set showVisibleTranscript(e){c(e),I()},get transcriptId(){return l()},set transcriptId(e){l(e),I()},get featureAudioSkin(){return u()},set featureAudioSkin(e){u(e),I()},get uiText(){return d()},set uiText(e){d(e),I()},get locale(){return f()},set locale(e=``){f(e),I()},get onaudiostarted(){return p()},set onaudiostarted(e){p(e),I()},get onaudioended(){return m()},set onaudioended(e){m(e),I()}},ie=gr(),ae=$t(ie),oe=e=>{var t=Di(),n=V(t),r=e=>{var t=Ci(),n=$t(t);ii(n,e=>z(h,e),()=>q(h));var r=H(n,2),a=V(r),o=H(a,2);A(r),ii(r,e=>z(g,e),()=>q(g)),U((e,t,s)=>{X(n,`src`,i()),X(r,`aria-label`,e),Wr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(b)?``:`listen-active`}`,`svelte-ypdwb3`),X(a,`src`,u().silentUrl),X(a,`alt`,t),Wr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(b)?`listen-active`:``}`,`svelte-ypdwb3`),X(o,`src`,u().playingUrl),X(o,`alt`,s)},[()=>ee(f()),()=>te(f()),()=>ne(f())]),Y(e,t)},a=e=>{var t=Ti(),n=$t(t);ii(n,e=>z(h,e),()=>q(h));var r=H(n,2),a=e=>{var t=wi(),n=V(t,!0);A(t),ii(t,e=>z(_,e),()=>q(_)),U(()=>yr(n,d().clickToEnableAutoplay)),Y(e,t)};Dr(r,e=>{q(x)&&e(a)}),U(()=>{X(n,`src`,i()),X(n,`aria-describedby`,s()?l():void 0)}),Y(e,t)},o=e=>{var t=Ei(),n=V(t,!0);A(t),U(()=>yr(n,q(S))),Y(e,t)};Dr(n,e=>{q(y)===`feature-button`?e(r):q(y)===`controls`?e(a,1):q(y)===`error`&&e(o,2)}),A(t),Y(e,t)};return Dr(ae,e=>{q(y)!==`none`&&e(oe)}),Y(e,ie),Ue(re)}ui(ki,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},audioTranscript:{},showVisibleTranscript:{},transcriptId:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var Ai=J(`<img class="w-auto object-contain pie-blank-image" style="max-height:var(--mpb-selected-image-max-height, 4rem);"/>`),ji=J(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Mi=J(`<span class="cloze-marker-empty svelte-d9l5tb" aria-hidden="true">&nbsp;</span>`),Ni=J(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Pi={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(--pie-focus, #2563eb);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 Fi(e,t){He(t,!0),Rr(e,Pi);let n=Z(t,`choiceMode`,7,`text`),r=Z(t,`displayChoice`,7,void 0),i=Z(t,`displayChoiceLabelHtml`,7,``),a=Z(t,`isStandalone`,7,!1),o=Z(t,`blankWidth`,7),s=Z(t,`blankBorderWidth`,7),c=Z(t,`ariaLabel`,7);var l={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),I()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),I()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),I()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),I()},get blankWidth(){return o()},set blankWidth(e){o(e),I()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),I()},get ariaLabel(){return c()},set ariaLabel(e){c(e),I()}},u=Ni(),d=V(u),f=e=>{var t=Ai();U(()=>{X(t,`src`,r().imageUrl),X(t,`alt`,r().imageAlt||`Selected answer image`)}),Y(e,t)},p=e=>{var t=ji();Lr(t,i,!0),A(t),Y(e,t)},m=e=>{Y(e,Mi())};return Dr(d,e=>{n()===`image`&&r()?.imageUrl?e(f):i()?e(p,1):e(m,-1)}),A(u),U(()=>{Wr(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`),Kr(u,`width:${o()};border-bottom-width:${s()};`),X(u,`aria-label`,c())}),Y(e,u),Ue(l)}ui(Fi,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{}},[],[],{mode:`open`});var Ii=J(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Li=J(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Ri=J(`<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>`),zi=J(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Bi=J(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Vi=J(`<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),Hi=J(`<span aria-hidden="true"> </span>`),Ui=J(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Wi={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-correct-answer-choice-hover-bg, #f2f2f2));}.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-correct-answer-choice-selected-bg, #fcfcd3));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-correct-answer-choice-selected-bg, #fcfcd3));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-hover-bg, #ececec);}.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-correct-answer-choice-selected-bg, #f1f1f1);border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-correct-border, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-incorrect-border, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-correct-bg, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-incorrect-bg, #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-correct-answer-feedback-glyph-color, #fff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-correct-bg, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-incorrect-bg, #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 Gi(e,t){He(t,!0),Rr(e,Wi);let n=Z(t,`choice`,7),r=Z(t,`choiceMode`,7,`text`),i=Z(t,`isHorizontal`,7,!1),a=Z(t,`isSelected`,7,!1),o=Z(t,`isDisabled`,7,!1),s=Z(t,`correctness`,7,void 0),c=Z(t,`isEvaluateMode`,7,!1),l=Z(t,`instanceId`,7),u=Z(t,`radioGroupName`,7);var d={get choice(){return n()},set choice(e){n(e),I()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),I()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),I()},get isSelected(){return a()},set isSelected(e=!1){a(e),I()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),I()},get correctness(){return s()},set correctness(e=void 0){s(e),I()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),I()},get instanceId(){return l()},set instanceId(e){l(e),I()},get radioGroupName(){return u()},set radioGroupName(e){u(e),I()}},f=Ui(),p=V(f),m=e=>{var t=Ri(),i=V(t),s=V(i),c=e=>{var t=Ii();U(()=>{X(t,`src`,n().imageUrl),X(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),Y(e,t)},d=e=>{var t=Li();Lr(t,()=>n().labelHtml||``,!0),A(t),Y(e,t)};Dr(s,e=>{r()===`image`&&n().imageUrl?e(c):e(d,-1)}),A(i);var f=H(i,2);Zr(f),A(t),U(()=>{X(t,`for`,`${l()}-opt-${n().id}`),X(f,`name`,u()),X(f,`id`,`${l()}-opt-${n().id}`),Qr(f,n().id),$r(f,a()),f.disabled=o()}),Y(e,t)},h=e=>{var t=Vi(),i=$t(t);Zr(i);var s=H(i,2),c=V(s),d=e=>{var t=zi();U(()=>{X(t,`src`,n().imageUrl),X(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),Y(e,t)},f=e=>{var t=Bi();Lr(t,()=>n().labelHtml||``,!0),A(t),Y(e,t)};Dr(c,e=>{r()===`image`&&n().imageUrl?e(d):e(f,-1)}),A(s),U(()=>{X(i,`name`,u()),X(i,`id`,`${l()}-opt-${n().id}`),Qr(i,n().id),$r(i,a()),i.disabled=o(),X(s,`for`,`${l()}-opt-${n().id}`)}),Y(e,t)};Dr(p,e=>{i()?e(m):e(h,-1)});var g=H(p,2),_=e=>{var t=Hi(),n=V(t,!0);A(t),U(()=>{Wr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),yr(n,s()===`correct`?`✓`:`✕`)}),Y(e,t)};return Dr(g,e=>{c()&&s()&&e(_)}),A(f),U(()=>Wr(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`)),Y(e,f),Ue(d)}ui(Gi,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{}},[],[],{mode:`open`});function Ki(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 qi=`{{blank}}`,Ji=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Yi(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/&nbsp;/g,` `).trim()===qi:!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&&Ji.has(i)}}var Xi={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},Zi={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`}},Qi={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 $i(e){let{layoutProfile:t,isBlankOnlyTemplate:n,correctAnswerStyleVars:r}=e,i=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},a=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},o=a[t]&&typeof a[t]==`object`?a[t]:{},s={...Qi[t]??{},...o},c={...Xi,...i,...s},l=[`audio_blank_only`,`stimulus_image_blank`],u=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],d=l.includes(t)?`${c.blankWideWidthRem}rem`:n?`${c.blankStandaloneWidthRem}rem`:`auto`,f=u.includes(t)?`${c.blankUnderlineWideWidthPx}px`:`${c.blankUnderlineWidthPx}px`;return{rootStyle:[...Object.keys(Zi).map(e=>`${Zi[e].varName}:${c[e]}${Zi[e].unit}`),r].join(`;`),blankWidth:d,blankBorderWidth:f,legendMaxChars:c.legendMaxChars}}var ea={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 ta(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`)?ea.es:ea.default;return r[t]||r[n]||r.default||i||a}function na(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,alwaysShowCorrect:i,correctChoiceId:a}=e;return i&&a||n&&r&&a?a:t}function ra(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 ia(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 aa=`/* 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 */
7
7
 
8
- /* r1.scss: Starial font throughout */
8
+ /* r1.scss: Starial font throughout.
9
+ font-size 14px mirrors the Learnosity host root (.lrn_widget) which sets the
10
+ base for all em-scaled rules in r1.scss (e.g. .rli-r1-content-element { 1.9em })
11
+ and any em-based author content (e.g. <span style="font-size:1.8em">). Without
12
+ this base PIE inherits the 16px browser default and renders ~14% larger than
13
+ the LSY reference. See CONTOOL-2567. */
9
14
  [class*="variant-sel-r1-"] {
10
15
  font-family: Starial, Arial, sans-serif;
16
+ font-size: 14px;
11
17
  }
12
18
 
13
19
  /* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */
@@ -26,13 +32,16 @@
26
32
 
27
33
  /* r1.scss: .rli-r1-stem { display:flex; flex-direction:row; justify-content:center }
28
34
  r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.
29
- column-gap:4px replicates the 2px+2px per-element margin. */
35
+ Apply the per-element margin to both classless tokens and the blank slot
36
+ (which is the cloze equivalent) so the gap stacks with whitespace text-nodes
37
+ between flex items the same way LSY does. Earlier this used column-gap:4px,
38
+ but flex column-gap accumulates with the cloze-side mx-1 and the implicit
39
+ whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */
30
40
  [class*="variant-sel-r1-"] .pie-template-line {
31
41
  display: flex;
32
42
  flex-direction: row;
33
43
  align-items: baseline;
34
44
  justify-content: center;
35
- column-gap: 4px;
36
45
  }
37
46
 
38
47
  [class*="variant-sel-r1-"] .pie-template-line p {
@@ -40,18 +49,44 @@
40
49
  display: flex;
41
50
  flex-direction: row;
42
51
  align-items: baseline;
43
- gap: 4px;
44
52
  }
45
53
 
46
54
  /* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px; min-height:150px;
47
- line-height:89px } — every stem token (blank slot and adjacent spans) is a 150px box.
48
- Scoped to token_sequence layout so the audio_blank_only standalone blank (160px) is unaffected. */
49
- [class*="variant-sel-r1-"].layout-token_sequence .pie-template-line span:not([class]),
55
+ line-height:89px; margin-right:2px; margin-left:2px } — wraps every stem token
56
+ (blank slot and adjacent inline spans) in LSY, giving each a 150px box with a
57
+ 2px per-side margin. Apply to inline tokens in all r1 variants so trailing
58
+ tokens in audio_blank_only (gplusggg) match the blank's height the way LSY does. */
59
+ [class*="variant-sel-r1-"] .pie-template-line span:not([class]) {
60
+ min-width: 150px;
61
+ max-width: 150px;
62
+ min-height: 150px;
63
+ line-height: 89px;
64
+ margin-left: 2px;
65
+ margin-right: 2px;
66
+ }
67
+
68
+ /* In token_sequence layouts the blank itself is also a content-element box (no
69
+ surrounding .rli-r1-cloze container at 160px). audio_blank_only / stimulus_image_blank
70
+ keep their own 160px min-height set on the blank slot in McPopulatedBlank.svelte to
71
+ mirror LSY's .rli-r1-cloze height. The 2px per-side margin matches LSY's
72
+ .rli-r1-content-element pattern (overriding the default Tailwind mx-1). */
50
73
  [class*="variant-sel-r1-"].layout-token_sequence .pie-template-line .pie-blank-slot {
51
74
  min-width: 150px;
52
75
  max-width: 150px;
53
76
  min-height: 150px;
54
77
  line-height: 89px;
78
+ margin-left: 2px;
79
+ margin-right: 2px;
80
+ }
81
+
82
+ /* audio_blank_only / stimulus_image_blank keep the 160px wide blank slot, but
83
+ still need the 2px per-side margin so the gap to the trailing token mirrors
84
+ LSY's .rli-r1-content-element rhythm. Without this, Tailwind's mx-1 (4px)
85
+ would dominate and the cloze→token gap diverges from LSY. See CONTOOL-2569. */
86
+ [class*="variant-sel-r1-"].layout-audio_blank_only .pie-template-line .pie-blank-slot,
87
+ [class*="variant-sel-r1-"].layout-stimulus_image_blank .pie-template-line .pie-blank-slot {
88
+ margin-left: 2px;
89
+ margin-right: 2px;
55
90
  }
56
91
 
57
92
  /* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */
@@ -59,7 +94,19 @@
59
94
  font-size: 1.9em;
60
95
  line-height: 89px;
61
96
  }
62
- `,fa={"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 */
97
+
98
+ /* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px;
99
+ min-height:150px } wraps every image (stem token + distractor) and forces
100
+ the content box to 150×150. LSY's host also rewrites <img width/height>
101
+ to 150 server-side. PIE keeps the authored attributes (typically 108×108),
102
+ so without an explicit override images render ~28% smaller than LSY.
103
+ See CONTOOL-2570. */
104
+ [class*="variant-sel-r1-"] .pie-template-line img,
105
+ [class*="variant-sel-r1-"] .pie-choice-label img {
106
+ width: 150px;
107
+ height: 150px;
108
+ }
109
+ `,oa={"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 */
63
110
  /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
64
111
  .mc-populated-blank-root.variant-sel-r1-plusggg {
65
112
  max-width: 875px;
@@ -100,6 +147,15 @@
100
147
  margin: 0;
101
148
  }
102
149
 
150
+ /* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's
151
+ inline_sentence layout sets text-align:center on .template-line via a
152
+ Svelte-scoped selector with specificity (0,4,0), so we need to match or
153
+ exceed that. Pin sr-vic back to start so wrapped lines stay left-aligned.
154
+ Same root cause as sel-vic. See CONTOOL-2573. */
155
+ .mc-populated-blank-root.variant-sr-vic.layout-inline_sentence .pie-template-line.template-line {
156
+ text-align: start;
157
+ }
158
+
103
159
  /* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */
104
160
  .mc-populated-blank-root.variant-sr-vic .pie-blank-value {
105
161
  color: #cc3333;
@@ -143,7 +199,10 @@
143
199
  /* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/sel_vic/scss/main.scss + vic.scss */
144
200
  .mc-populated-blank-root.variant-sel-vic {
145
201
  font-family: Starial, Arial, sans-serif;
146
- font-size: 1.5em;
202
+ /* LSY chain: .lrn_widget (14px host) → .sel-vic { 1.5em } = 21px.
203
+ PIE collapses both LSY layers into this single variant-root selector, so
204
+ the resolved value is set directly. See CONTOOL-2567. */
205
+ font-size: 21px;
147
206
  max-width: 800px;
148
207
  margin-inline: auto;
149
208
  --mpb-inline-grid-column-gap: 1rem;
@@ -186,6 +245,26 @@
186
245
  margin: 0;
187
246
  }
188
247
 
248
+ /* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's
249
+ inline_sentence layout sets text-align:center on .template-line via a
250
+ Svelte-scoped selector with specificity (0,4,0), so we need to match or
251
+ exceed that. Pin sel-vic back to start so wrapped lines stay left-aligned.
252
+ See CONTOOL-2573. */
253
+ .mc-populated-blank-root.variant-sel-vic.layout-inline_sentence .pie-template-line.template-line {
254
+ text-align: start;
255
+ }
256
+
257
+ /* vic.scss: .rli-vic-cloze { margin-left: 6px; margin-right: 6px } gives the
258
+ cloze breathing room from adjacent text or punctuation. The PIE markup uses
259
+ Tailwind-style mx-1 in the class list, but mc-populated-blank does not
260
+ compile Tailwind, so that class is a no-op. Set the inline margin
261
+ explicitly so the cloze→trailing-punctuation gap matches LSY. See
262
+ CONTOOL-2572. */
263
+ .mc-populated-blank-root.variant-sel-vic .pie-template-line .pie-blank-slot {
264
+ margin-left: 6px;
265
+ margin-right: 6px;
266
+ }
267
+
189
268
  /* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */
190
269
  .mc-populated-blank-root.variant-sel-vic .pie-blank-value {
191
270
  color: #cc3333;
@@ -301,11 +380,6 @@
301
380
  --mpb-choice-hover-bg: #f2f2f2;
302
381
  --mpb-choice-selected-bg: #fcfcd3;
303
382
  }
304
-
305
- /* In this variant, the blank appears before trailing tokens; avoid left-margin offset. */
306
- .mc-populated-blank-root.variant-sel-r1-ggplus.layout-token_sequence .pie-blank-slot {
307
- margin-left: 0;
308
- }
309
383
  `},"sel_r1-s3_plusggg":{variantId:`sel-r1-s3`,variantClass:`variant-sel-r1-s3`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css */
310
384
  /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
311
385
  .mc-populated-blank-root.variant-sel-r1-s3 {
@@ -325,12 +399,14 @@
325
399
  --mpb-blank-wide-width: 6.8rem;
326
400
  }
327
401
 
328
- /* s3 overrides base choice-label with font-weight:500 */
402
+ /* sel_r1-s3_plusggg/question.css does not set font-weight on distractors or
403
+ cloze content-element, so they inherit 400 from the host root. The earlier
404
+ font-weight:500 override caused PIE to render visibly heavier than LSY for
405
+ the same author content. See CONTOOL-2571. */
329
406
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label,
330
407
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label :is(span, p, div) {
331
408
  font-size: 1.9em;
332
409
  line-height: 89px;
333
- font-weight: 500;
334
410
  }
335
411
 
336
412
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value,
@@ -391,7 +467,7 @@
391
467
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {
392
468
  transform: scale(0.85);
393
469
  }
394
- `}},pa=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),ma=e=>fa[pa(e)],ha=e=>ma(e)?.variantClass||``,ga=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),_a=(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)},va=e=>{!e?.cssText||typeof document>`u`||(ga.has(e.variantId)&&_a(`mc-populated-blank-css-sel-r1-base`,`sel-r1-base`,da),_a(`mc-populated-blank-css-${e.variantId}`,e.variantId,e.cssText))},ya=q(`<div class="mb-4 prose pie-prompt"></div>`),ba=q(`<p> </p>`),xa=wr(`<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-correct-answer-toggle-icon-open-bg, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-correct-answer-toggle-icon-open-bg, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)"></polygon></svg>`),Sa=wr(`<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-correct-answer-toggle-icon-closed-bg, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)"></polygon></svg>`),Ca=q(`<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>`),wa=q(`<div class="mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4"></div>`),Ta=q(`<div class="mb-4 template-line pie-template-line svelte-6wlbb4"><!> <!> <!></div>`),Ea=q(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),Da=q(`<div><!> <!> <!> <!> <!> <!> <!> <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>`),Oa={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 .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-correct-answer-toggle-label-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),
470
+ `}},sa=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),ca=e=>oa[sa(e)],la=e=>ca(e)?.variantClass||``,ua=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),da=(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)},fa=e=>{!e?.cssText||typeof document>`u`||(ua.has(e.variantId)&&da(`mc-populated-blank-css-sel-r1-base`,`sel-r1-base`,aa),da(`mc-populated-blank-css-${e.variantId}`,e.variantId,e.cssText))},pa=J(`<div class="mb-4 prose pie-prompt"></div>`),ma=J(`<p> </p>`),ha=hr(`<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-correct-answer-toggle-icon-open-bg, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-correct-answer-toggle-icon-open-bg, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)"></polygon></svg>`),ga=hr(`<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-correct-answer-toggle-icon-closed-bg, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-correct-answer-toggle-icon-glyph-color, #1a9cff)"></polygon></svg>`),_a=J(`<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>`),va=J(`<div class="mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4"></div>`),ya=J(`<div class="mb-4 template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),ba=J(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),xa=J(`<div><!> <!> <!> <!> <!> <!> <!> <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>`),Sa={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 .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-correct-answer-toggle-label-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),
395
471
  .pie-toggle-correct-answer.svelte-6wlbb4:focus-visible .pie-correct-answer-toggle-label:where(.svelte-6wlbb4) {text-decoration:underline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;}.template-line.svelte-6wlbb4 p {margin:0;}.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,
396
472
  .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),
397
473
  .layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0
@@ -417,4 +493,4 @@
417
493
  .layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
418
494
  .layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
419
495
  .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;}
420
- }`};function ka(e,t){Je(t,!0),Kr(e,Oa);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.`,transcriptLabel:`Transcript`},r=Z(t,`model`,7),i=Z(t,`session`,7),a=I(``),o=I(null),s=I(null),c=I(null),l=I(!1),u=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,d=F(()=>(r()?.mode||r()?.env?.mode||``).toString()),f=F(()=>K(d)===`evaluate`),p=F(()=>r()?.correctness),m=F(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:K(p)===`correct`),h=F(()=>K(p)===`correct`),g=F(()=>K(p)===`incorrect`),_=I(!1),v=F(()=>K(f)&&!K(m)&&!!r()?.correctChoiceId),y=F(()=>r()?.layoutProfile||``),b=F(()=>ta({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:K(y),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),x=F(()=>K(b).isAudioOnlyMode),S=F(()=>K(b).isBlankOnlyTemplate),C=F(()=>K(b).isHorizontalChoices),w=F(()=>K(b).hasInlineSentenceAudioLayout),T=F(()=>K(b).useFeatureButtonAudio),ee=F(()=>K(l)),te=F(()=>[`--pie-correct-answer-toggle-label-color:${wi.text()}`,`--pie-correct-answer-toggle-icon-open-bg:${wi.tertiaryLight()}`,`--pie-correct-answer-toggle-icon-closed-bg:${wi.backgroundDark()}`,`--pie-correct-answer-toggle-icon-glyph-color:${wi.tertiary()}`,`--pie-correct-answer-choice-hover-bg:${wi.backgroundDark()}`,`--pie-correct-answer-choice-selected-bg:${wi.secondaryBackground()}`,`--pie-correct-answer-choice-correct-bg:${wi.correctSecondary()}`,`--pie-correct-answer-choice-incorrect-bg:${wi.incorrectSecondary()}`,`--pie-correct-answer-choice-correct-border:${wi.correctTertiary()}`,`--pie-correct-answer-choice-incorrect-border:${wi.incorrectWithIcon()}`,`--pie-correct-answer-feedback-correct-bg:${wi.correctWithIcon()}`,`--pie-correct-answer-feedback-incorrect-bg:${wi.incorrectWithIcon()}`,`--pie-correct-answer-feedback-glyph-color:${wi.white()}`].join(`;`)),ne=F(()=>aa({layoutProfile:K(y),isBlankOnlyTemplate:K(S),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets,correctAnswerStyleVars:K(te)})),re=F(()=>Array.isArray(r()?.choices)?r().choices:[]),ie=F(()=>r()?.choiceMode||`text`),ae=F(()=>i()?.choiceId||K(a)||``),oe=F(()=>`${u}-choice-group-${r()?.id||`1`}`),se=F(()=>ca({selectedId:K(ae),isEvaluateMode:K(f),showCorrectAnswer:K(_),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),ce=F(()=>K(re).find(e=>e.id===K(se))),le=F(()=>String(K(ce)?.labelHtml||``)),ue=F(()=>la({isEvaluateMode:K(f),showCorrectAnswer:K(_),isCorrect:K(h),isIncorrect:K(g),selectedId:K(ae)})),de=F(()=>Qi({isEvaluateMode:K(f),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(K(ae)||``),showCorrectAnswer:K(_)})),fe=F(()=>({...n,...r()?.uiText||{}})),pe=F(()=>`${u}-prompt`),me=F(()=>`${u}-transcript`),he=F(()=>`${u}-choices-legend`),ge=F(()=>`${u}-result`),_e=F(()=>ua({prompt:r()?.prompt||``,legendMaxChars:K(ne).legendMaxChars,answerChoicesLabel:K(fe).answerChoices})),ve=F(()=>r()?.prompt?K(pe):void 0),ye=F(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||K(_e)),be=F(()=>{let e=[];return r()?.prompt&&e.push(K(pe)),r()?.hasAudio&&r()?.audioTranscript&&e.push(K(me)),e.length?e.join(` `):void 0}),xe=F(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),Se=F(()=>ma(r()?.customType)),Ce=F(()=>ha(r()?.customType)),we=F(()=>{let e=r()?.template||``,t=e.indexOf(`{{blank}}`);return t<0?{before:e,after:``}:{before:e.slice(0,t),after:e.slice(t+9)}});function Te(e,t){ki({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function Ee(e){let t=e.target;if(!t.checked)return;let n=t.value;L(a,n,!0),Te({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function De(){K(v)&&L(_,!K(_))}Cn(()=>{(!K(f)||K(m))&&L(_,!1)});function Oe(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 ke=F(()=>sa({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function Ae(){Oi(K(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function je(){Oi(K(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}Cn(()=>{i()?.choiceId&&L(a,i().choiceId,!0)}),Cn(()=>{let e=K(o);if(e)return e.addEventListener(`click`,De),()=>e.removeEventListener(`click`,De)}),Cn(()=>{let e=K(s);if(!e)return;let t=e=>{let t=e.target;!t||t.type!==`radio`||Ee(e)},n=e=>Oe(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),Cn(()=>{va(K(Se))}),Cn(()=>{let e=K(c);if(!e)return;let t=()=>{L(l,!!e.closest(`.rli-with-audio-transcript`))};t();let n=new MutationObserver(t),r=e.parentElement;for(;r;)n.observe(r,{attributes:!0,attributeFilter:[`class`]}),r=r.parentElement;return()=>n.disconnect()});var Me={get model(){return r()},set model(e){r(e),P()},get session(){return i()},set session(e){i(e),P()}},Ne=Da(),Pe=z(Ne),Fe=e=>{var t=ya();Gr(t,()=>r().prompt,!0),k(t),V(()=>X(t,`id`,K(pe))),J(e,t)};Y(Pe,e=>{r()?.prompt&&e(Fe)});var Ie=B(Pe,2),E=e=>{var t=ba(),n=z(t,!0);k(t),V(()=>{Qr(t,1,`text-sm mb-3 text-gray-700 text-center pie-audio-transcript ${K(ee)?``:`sr-only`}`,`svelte-6wlbb4`),X(t,`id`,K(me)),Or(n,r().audioTranscript)}),J(e,t)};Y(Ie,e=>{r()?.audioTranscript&&e(E)});var Le=B(Ie,2),D=e=>{var t=Ca(),n=z(t),r=z(n),i=z(r),a=z(i),s=e=>{J(e,xa())},c=e=>{J(e,Sa())};Y(a,e=>{K(_)?e(s):e(c,-1)}),k(i);var l=B(i,2),u=z(l,!0);k(l),k(r),k(n),fi(n,e=>L(o,e),()=>K(o)),k(t),V(()=>{X(n,`aria-pressed`,K(_)),Or(u,K(_)?K(fe).hideCorrectAnswer:K(fe).showCorrectAnswer)}),J(e,t)};Y(Le,e=>{K(v)&&e(D)});var O=B(Le,2);{let e=F(()=>!!r()?.hasAudio),t=F(()=>r()?.audioUrl),n=F(()=>!!r()?.autoplayAudioEnabled),i=F(()=>r()?.audioTranscript),a=F(()=>r()?.locale);Li(O,{get hasAudio(){return K(e)},get audioUrl(){return K(t)},get useFeatureButtonAudio(){return K(T)},get autoplayEnabled(){return K(n)},get audioTranscript(){return K(i)},get showVisibleTranscript(){return K(ee)},get transcriptId(){return K(me)},get featureAudioSkin(){return K(ke)},get uiText(){return K(fe)},get locale(){return K(a)},onaudiostarted:Ae,onaudioended:je})}var Re=B(O,2),ze=e=>{var t=wa();Gr(t,()=>r().sentenceHtml,!0),k(t),V(()=>X(t,`aria-describedby`,K(be))),J(e,t)};Y(Re,e=>{r()?.sentenceHtml&&e(ze)});var Be=B(Re,2),Ve=e=>{var t=Ta(),n=z(t);Gr(n,()=>K(we).before);var r=B(n,2);Ui(r,{get choiceMode(){return K(ie)},get displayChoice(){return K(ce)},get displayChoiceLabelHtml(){return K(le)},get isStandalone(){return K(S)},get blankWidth(){return K(ne).blankWidth},get blankBorderWidth(){return K(ne).blankBorderWidth},get ariaLabel(){return K(fe).selectedAnswerInSentence}}),Gr(B(r,2),()=>K(we).after),k(t),V(()=>X(t,`aria-describedby`,K(be))),J(e,t)};Y(Be,e=>{K(x)||e(Ve)});var He=B(Be,2),Ue=e=>{var t=Ea(),n=z(t,!0);k(t),V(()=>{X(t,`id`,K(ge)),Or(n,K(ue))}),J(e,t)};Y(He,e=>{K(ue)&&e(Ue)});var We=B(He,2),Ge=z(We),Ke=z(Ge,!0);k(Ge);var A=B(Ge,2);return zr(A,21,()=>K(re),e=>e.id,(e,t)=>{{let n=F(()=>K(se)===K(t).id),i=F(()=>!!r()?.disabled),a=F(()=>K(de).get(K(t).id));Zi(e,{get choice(){return K(t)},get choiceMode(){return K(ie)},get isHorizontal(){return K(C)},get isSelected(){return K(n)},get isDisabled(){return K(i)},get correctness(){return K(a)},get isEvaluateMode(){return K(f)},get instanceId(){return u},get radioGroupName(){return K(oe)}})}}),k(A),fi(A,e=>L(s,e),()=>K(s)),k(We),k(Ne),fi(Ne,e=>L(c,e),()=>K(c)),V(()=>{Qr(Ne,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${K(y)} ${K(Ce)} ${K(w)?`has-inline-audio`:``}`,`svelte-6wlbb4`),X(Ne,`lang`,K(xe)),ei(Ne,K(ne).rootStyle),We.disabled=r()?.disabled,X(Ge,`id`,K(he)),Or(Ke,K(_e)),Qr(A,1,`pie-choices ${K(C)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),X(A,`aria-labelledby`,K(ve)),X(A,`aria-label`,K(ye)),X(A,`aria-describedby`,K(ue)?K(ge):void 0)}),J(e,Ne),Ye(Me)}vi(ka,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function Aa(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var ja=ka.element,Ma=class extends ja{_internalSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new Ti(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new Ei(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=()=>Aa(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},Na=`{{blank}}`,Pa={model:{id:`1`,element:`mc-populated-blank`,prompt:`<p><strong>Demo prompt</strong></p>`,promptEnabled:!0,interactionMode:`populate_blank`,layoutProfile:``,choiceLayout:``,layoutProfilePresets:{},layoutLimits:{...na},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 ${Na}.</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:``,showVisibleTranscript:!1,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},Fa=n({countBlankTokens:()=>La,createCorrectResponseSession:()=>Za,createDefaultModel:()=>Va,getCorrectness:()=>Ra,getPartialScore:()=>za,model:()=>Xa,normalize:()=>Ha,normalizeSession:()=>Ua,outcome:()=>Ba,validate:()=>Qa}),Ia=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function La(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var Ra=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},za=(e,t)=>!t||Ia(t)||!t.choiceId?0:1,Ba=(e,t,n)=>new Promise(r=>{if(!t||Ia(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=Ua(t);let i=Ra(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}.`]})}),Va=(e={})=>({...Pa.model,...e,layoutLimits:{...na,...e?.layoutLimits||{}}}),Ha=(e={})=>Va(e),Ua=e=>({...e}),Wa=e=>!!e?.shuffle,Ga=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function Ka(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 qa=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Ja=(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]},Ya=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!Wa(e)||Ga(e,n||{}))return i;let a=qa(t);if(a.length)return Ja(i,a,`id`);let o=Ka(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},Xa=async(e,t,n,r)=>{let i=t||{},a=n||{},o=Ha(e),s=await Ya(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||{...na},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,showVisibleTranscript:!!o.showVisibleTranscript,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=Ra(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},Za=(e,t)=>new Promise(n=>{t.mode!==`evaluate`&&t.role===`instructor`?n({id:`1`,element:`mc-populated-blank`,choiceId:e?.correctChoiceId||``}):n(null)}),Qa=(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=La(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${Na} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${Na} placeholder`:i>1&&(n.template=`Template must contain only one ${Na} 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},$a={...Fa},eo=Ma;e.controller=$a,e.default=eo})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});
496
+ }`};function Ca(e,t){He(t,!0),Rr(e,Sa);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.`,transcriptLabel:`Transcript`},r=Z(t,`model`,7),i=Z(t,`session`,7),a=R(``),o=R(null),s=R(null),c=R(null),l=R(!1),u=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,d=L(()=>(r()?.mode||r()?.env?.mode||``).toString()),f=L(()=>q(d)===`evaluate`),p=L(()=>r()?.correctness),m=L(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:q(p)===`correct`),h=L(()=>q(p)===`correct`),g=L(()=>q(p)===`incorrect`),_=R(!1),v=L(()=>q(f)&&!q(m)&&!!r()?.correctChoiceId),y=L(()=>r()?.layoutProfile||``),b=L(()=>Yi({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:q(y),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),x=L(()=>q(b).isAudioOnlyMode),S=L(()=>q(b).isBlankOnlyTemplate),C=L(()=>q(b).isHorizontalChoices),w=L(()=>q(b).hasInlineSentenceAudioLayout),T=L(()=>q(b).useFeatureButtonAudio),ee=L(()=>q(l)),te=L(()=>[`--pie-correct-answer-toggle-label-color:${gi.text()}`,`--pie-correct-answer-toggle-icon-open-bg:${gi.tertiaryLight()}`,`--pie-correct-answer-toggle-icon-closed-bg:${gi.backgroundDark()}`,`--pie-correct-answer-toggle-icon-glyph-color:${gi.tertiary()}`,`--pie-correct-answer-choice-hover-bg:${gi.backgroundDark()}`,`--pie-correct-answer-choice-selected-bg:${gi.secondaryBackground()}`,`--pie-correct-answer-choice-correct-bg:${gi.correctSecondary()}`,`--pie-correct-answer-choice-incorrect-bg:${gi.incorrectSecondary()}`,`--pie-correct-answer-choice-correct-border:${gi.correctTertiary()}`,`--pie-correct-answer-choice-incorrect-border:${gi.incorrectWithIcon()}`,`--pie-correct-answer-feedback-correct-bg:${gi.correctWithIcon()}`,`--pie-correct-answer-feedback-incorrect-bg:${gi.incorrectWithIcon()}`,`--pie-correct-answer-feedback-glyph-color:${gi.white()}`].join(`;`)),ne=L(()=>$i({layoutProfile:q(y),isBlankOnlyTemplate:q(S),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets,correctAnswerStyleVars:q(te)})),re=L(()=>Array.isArray(r()?.choices)?r().choices:[]),ie=L(()=>r()?.choiceMode||`text`),ae=L(()=>i()?.choiceId||q(a)||``),oe=L(()=>`${u}-choice-group-${r()?.id||`1`}`),se=L(()=>na({selectedId:q(ae),isEvaluateMode:q(f),showCorrectAnswer:q(_),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),ce=L(()=>q(re).find(e=>e.id===q(se))),le=L(()=>String(q(ce)?.labelHtml||``)),ue=L(()=>ra({isEvaluateMode:q(f),showCorrectAnswer:q(_),isCorrect:q(h),isIncorrect:q(g),selectedId:q(ae)})),de=L(()=>Ki({isEvaluateMode:q(f),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(q(ae)||``),showCorrectAnswer:q(_)})),fe=L(()=>({...n,...r()?.uiText||{}})),pe=L(()=>`${u}-prompt`),me=L(()=>`${u}-transcript`),he=L(()=>`${u}-choices-legend`),ge=L(()=>`${u}-result`),_e=L(()=>ia({prompt:r()?.prompt||``,legendMaxChars:q(ne).legendMaxChars,answerChoicesLabel:q(fe).answerChoices})),ve=L(()=>r()?.prompt?q(pe):void 0),ye=L(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||q(_e)),be=L(()=>{let e=[];return r()?.prompt&&e.push(q(pe)),r()?.hasAudio&&r()?.audioTranscript&&e.push(q(me)),e.length?e.join(` `):void 0}),xe=L(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),Se=L(()=>ca(r()?.customType)),Ce=L(()=>la(r()?.customType)),we=L(()=>{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(y)===`inline_sentence`&&(n=`${n.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:n,after:i}});function Te(e,t){xi({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function Ee(e){let t=e.target;if(!t.checked)return;let n=t.value;z(a,n,!0),Te({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function De(){q(v)&&z(_,!q(_))}pn(()=>{(!q(f)||q(m))&&z(_,!1)});function Oe(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 ke=L(()=>ta({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function Ae(){bi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function je(){bi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}pn(()=>{i()?.choiceId&&z(a,i().choiceId,!0)}),pn(()=>{let e=q(o);if(e)return e.addEventListener(`click`,De),()=>e.removeEventListener(`click`,De)}),pn(()=>{let e=q(s);if(!e)return;let t=e=>{let t=e.target;!t||t.type!==`radio`||Ee(e)},n=e=>Oe(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),pn(()=>{fa(q(Se))}),pn(()=>{let e=q(c);if(!e)return;let t=()=>{z(l,!!e.closest(`.rli-with-audio-transcript`))};t();let n=new MutationObserver(t),r=e.parentElement;for(;r;)n.observe(r,{attributes:!0,attributeFilter:[`class`]}),r=r.parentElement;return()=>n.disconnect()});var E={get model(){return r()},set model(e){r(e),I()},get session(){return i()},set session(e){i(e),I()}},D=xa(),O=V(D),k=e=>{var t=pa();Lr(t,()=>r().prompt,!0),A(t),U(()=>X(t,`id`,q(pe))),Y(e,t)};Dr(O,e=>{r()?.prompt&&e(k)});var Me=H(O,2),Ne=e=>{var t=ma(),n=V(t,!0);A(t),U(()=>{Wr(t,1,`text-sm mb-3 text-gray-700 text-center pie-audio-transcript ${q(ee)?``:`sr-only`}`,`svelte-6wlbb4`),X(t,`id`,q(me)),yr(n,r().audioTranscript)}),Y(e,t)};Dr(Me,e=>{r()?.audioTranscript&&e(Ne)});var Pe=H(Me,2),Fe=e=>{var t=_a(),n=V(t),r=V(n),i=V(r),a=V(i),s=e=>{Y(e,ha())},c=e=>{Y(e,ga())};Dr(a,e=>{q(_)?e(s):e(c,-1)}),A(i);var l=H(i,2),u=V(l,!0);A(l),A(r),A(n),ii(n,e=>z(o,e),()=>q(o)),A(t),U(()=>{X(n,`aria-pressed`,q(_)),yr(u,q(_)?q(fe).hideCorrectAnswer:q(fe).showCorrectAnswer)}),Y(e,t)};Dr(Pe,e=>{q(v)&&e(Fe)});var Ie=H(Pe,2);{let e=L(()=>!!r()?.hasAudio),t=L(()=>r()?.audioUrl),n=L(()=>!!r()?.autoplayAudioEnabled),i=L(()=>r()?.audioTranscript),a=L(()=>r()?.locale);ki(Ie,{get hasAudio(){return q(e)},get audioUrl(){return q(t)},get useFeatureButtonAudio(){return q(T)},get autoplayEnabled(){return q(n)},get audioTranscript(){return q(i)},get showVisibleTranscript(){return q(ee)},get transcriptId(){return q(me)},get featureAudioSkin(){return q(ke)},get uiText(){return q(fe)},get locale(){return q(a)},onaudiostarted:Ae,onaudioended:je})}var Le=H(Ie,2),Re=e=>{var t=va();Lr(t,()=>r().sentenceHtml,!0),A(t),U(()=>X(t,`aria-describedby`,q(be))),Y(e,t)};Dr(Le,e=>{r()?.sentenceHtml&&e(Re)});var ze=H(Le,2),Be=e=>{var t=ya(),n=V(t);Lr(n,()=>q(we).before);var r=H(n);Fi(r,{get choiceMode(){return q(ie)},get displayChoice(){return q(ce)},get displayChoiceLabelHtml(){return q(le)},get isStandalone(){return q(S)},get blankWidth(){return q(ne).blankWidth},get blankBorderWidth(){return q(ne).blankBorderWidth},get ariaLabel(){return q(fe).selectedAnswerInSentence}}),Lr(H(r),()=>q(we).after),A(t),U(()=>X(t,`aria-describedby`,q(be))),Y(e,t)};Dr(ze,e=>{q(x)||e(Be)});var j=H(ze,2),Ve=e=>{var t=ba(),n=V(t,!0);A(t),U(()=>{X(t,`id`,q(ge)),yr(n,q(ue))}),Y(e,t)};Dr(j,e=>{q(ue)&&e(Ve)});var We=H(j,2),Ge=V(We),Ke=V(Ge,!0);A(Ge);var M=H(Ge,2);return jr(M,21,()=>q(re),e=>e.id,(e,t)=>{{let n=L(()=>q(se)===q(t).id),i=L(()=>!!r()?.disabled),a=L(()=>q(de).get(q(t).id));Gi(e,{get choice(){return q(t)},get choiceMode(){return q(ie)},get isHorizontal(){return q(C)},get isSelected(){return q(n)},get isDisabled(){return q(i)},get correctness(){return q(a)},get isEvaluateMode(){return q(f)},get instanceId(){return u},get radioGroupName(){return q(oe)}})}}),A(M),ii(M,e=>z(s,e),()=>q(s)),A(We),A(D),ii(D,e=>z(c,e),()=>q(c)),U(()=>{Wr(D,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${q(y)} ${q(Ce)} ${q(w)?`has-inline-audio`:``}`,`svelte-6wlbb4`),X(D,`lang`,q(xe)),Kr(D,q(ne).rootStyle),We.disabled=r()?.disabled,X(Ge,`id`,q(he)),yr(Ke,q(_e)),Wr(M,1,`pie-choices ${q(C)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),X(M,`aria-labelledby`,q(ve)),X(M,`aria-label`,q(ye)),X(M,`aria-describedby`,q(ue)?q(ge):void 0)}),Y(e,D),Ue(E)}ui(Ca,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function wa(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var Ta=Ca.element,Ea=class extends Ta{_internalSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new _i(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new vi(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=()=>wa(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},Da=`{{blank}}`,Oa={model:{id:`1`,element:`mc-populated-blank`,prompt:`<p><strong>Demo prompt</strong></p>`,promptEnabled:!0,interactionMode:`populate_blank`,layoutProfile:``,choiceLayout:``,layoutProfilePresets:{},layoutLimits:{...Xi},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 ${Da}.</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:``,showVisibleTranscript:!1,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},ka=n({countBlankTokens:()=>ja,createCorrectResponseSession:()=>Ga,createDefaultModel:()=>Fa,getCorrectness:()=>Ma,getPartialScore:()=>Na,model:()=>Wa,normalize:()=>Ia,normalizeSession:()=>La,outcome:()=>Pa,validate:()=>Ka}),Aa=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function ja(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var Ma=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},Na=(e,t)=>!t||Aa(t)||!t.choiceId?0:1,Pa=(e,t,n)=>new Promise(r=>{if(!t||Aa(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=La(t);let i=Ma(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}.`]})}),Fa=(e={})=>({...Oa.model,...e,layoutLimits:{...Xi,...e?.layoutLimits||{}}}),Ia=(e={})=>Fa(e),La=e=>({...e}),Ra=e=>!!e?.shuffle,za=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function Ba(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 Va=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Ha=(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]},Ua=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!Ra(e)||za(e,n||{}))return i;let a=Va(t);if(a.length)return Ha(i,a,`id`);let o=Ba(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},Wa=async(e,t,n,r)=>{let i=t||{},a=n||{},o=Ia(e),s=await Ua(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||{...Xi},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,showVisibleTranscript:!!o.showVisibleTranscript,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=Ma(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},Ga=(e,t)=>new Promise(n=>{t.mode!==`evaluate`&&t.role===`instructor`?n({id:`1`,element:`mc-populated-blank`,choiceId:e?.correctChoiceId||``}):n(null)}),Ka=(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=ja(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${Da} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${Da} placeholder`:i>1&&(n.template=`Template must contain only one ${Da} 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},qa={...ka},Ja=Ea;e.controller=qa,e.default=Ja})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});