@pie-element/mc-populated-blank 0.3.0-next.7 → 0.3.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/delivery/index.js +145 -127
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/delivery/index.d.ts +7 -0
- package/dist/delivery/index.js +36 -7
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +6 -6
- package/dist/index.js +36 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -10
package/dist/index.iife.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var r={},i=Symbol(`uninitialized`),a=`http://www.w3.org/1999/xhtml`,o=`http://www.w3.org/2000/svg`,s=`http://www.w3.org/1998/Math/MathML`,c=Array.isArray,l=Array.prototype.indexOf,u=Array.prototype.includes,d=Array.from,f=Object.keys,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,g=Object.prototype,_=Array.prototype,v=Object.getPrototypeOf,y=Object.isExtensible,ee=()=>{};function b(e){for(var t=0;t<e.length;t++)e[t]()}function x(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var S=1024,C=2048,w=4096,te=8192,ne=16384,re=32768,ie=1<<25,ae=65536,oe=1<<19,se=1<<20,ce=1<<25,le=65536,ue=1<<21,de=1<<22,fe=1<<23,pe=Symbol(`$state`),me=Symbol(`component`),he=Symbol(`legacy props`),ge=Symbol(``),_e=Symbol(`attributes`),ve=Symbol(`class`),ye=Symbol(`style`),be=Symbol(`text`),xe=Symbol(`form reset`),Se=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ce=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function we(){console.warn(`https://svelte.dev/e/derived_inert`)}function Te(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ee(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function De(e){T=e}var E;function D(e){if(e===null)throw Te(),r;return E=e}function O(){return D(an(E))}function k(e){if(T){if(an(E)!==null)throw Te(),r;E=e}}function Oe(e=1){if(T){for(var t=e,n=E;t--;)n=an(n);E=n}}function ke(e=!0){for(var t=0,n=E;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=an(n);e&&n.remove(),n=i}}function Ae(e){if(!e||e.nodeType!==8)throw Te(),r;return e.data}function je(e){return e===this.v}function Me(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ne(e){return!Me(e,this.v)}function Pe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Fe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Le(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Re(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function ze(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Be(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function He(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ue(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ge(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var A=null;function Ke(e){A=e}function qe(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:W,l:null}}function Je(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)bn(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,Ye(e)}function Ye(e={}){return p(e,me,{value:!0}),e}function Xe(){return!0}var Ze=[];function Qe(){var e=Ze;Ze=[],b(e)}function $e(e){if(Ze.length===0&&!Dt){var t=Ze;queueMicrotask(()=>{t===Ze&&Qe()})}Ze.push(e)}function et(){for(;Ze.length>0;)Qe()}var tt=~(C|w|S);function j(e,t){e.f=e.f&tt|t}function nt(e){e.f&512||e.deps===null?j(e,S):j(e,w)}function rt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=le,rt(t.deps))}function it(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),rt(e.deps),j(e,S)}var at=!1;function ot(e){var t=at;try{return at=!1,[e(),at]}finally{at=t}}var st=!1;function ct(){st||(st=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[xe]?.()})},{capture:!0}))}function lt(e){var t=U,n=W;Hn(null),Un(null);try{return e()}finally{Hn(t),Un(n)}}function ut(e,t,n,r){let i=Xe()?mt:_t;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=W,c=dt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){pn(e,s)}ft()}}var d=pt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>gt(e))).then(u).catch(e=>pn(e,s)).finally(d)}l?l.then(()=>{c(),f(),ft()}):f()}function dt(){var e=W,t=U,n=A,r=N;return function(i=!0){Un(e),Hn(t),Ke(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function ft(e=!0){Un(null),Hn(null),Ke(null),e&&N?.deactivate()}function pt(){var e=W,t=e.b,n=N,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function mt(e){var t=2|C;return W!==null&&(W.f|=oe),{ctx:A,deps:null,effects:null,equals:je,f:t,fn:e,reactions:null,rv:0,v:i,wv:0,parent:W,ac:null}}var ht=Symbol(`obsolete`);function gt(e,t,n){let r=W;r===null&&Pe();var a=void 0,o=Gt(i),s=!U,c=new Set;return wn(()=>{var t=W,n=x();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==Se&&n.reject(e)}).finally(ft)}catch(e){n.reject(e),ft()}var i=N;if(s){if(t.f&32768)var l=pt();if(r.b?.is_rendered())i.async_deriveds.get(t)?.reject(ht);else for(let e of c.values())e.reject(ht);c.add(n),i.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ht&&(i.activate(),t?(o.f|=fe,qt(o,t)):(o.f&8388608&&(o.f^=fe),qt(o,e)),i.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),vn(()=>{for(let e of c)e.reject(ht)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function M(e){let t=mt(e);return Gn(t),t}function _t(e){let t=mt(e);return t.equals=Ne,t}function vt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)H(t[n])}}function yt(e){var t,n=W,r=e.parent;if(!zn&&r!==null&&e.v!==i&&r.f&24576)return we(),e.v;Un(r);try{e.f&=~le,vt(e),t=tr(e)}finally{Un(n)}return t}function bt(e){var t=yt(e);if(!e.equals(t)&&(e.wv=Qn(),(!N?.is_fork||e.deps===null)&&(N===null?e.v=t:(N.capture(e,t,!0),wt?.capture(e,t,!0)),e.deps===null))){j(e,S);return}zn||(Tt===null?nt(e):(_n()||N?.is_fork)&&Tt.set(e,t))}function xt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&<(()=>{t.ac.abort(Se),t.ac=null}),t.fn!==null&&(t.teardown=ee),ir(t,0),On(t))}function St(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ar(t)}var Ct=null,N=null,wt=null,Tt=null,Et=null,Dt=!1,Ot=!1,kt=null,At=null,jt=0,Mt=1,Nt=class e{id=Mt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){Ct===null?Ct=this:(Ct.#n=this,this.#t=Ct),Ct=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)j(r,C),t(r);for(r of n.m)j(r,w),t(r)}this.#p.add(e)}#g(){this.#e=!0,jt++>1e3&&(this.#x(),Pt());for(let e of this.#u)this.#d.delete(e),j(e,C),this.schedule(e);for(let e of this.#d)j(e,w),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=kt=[],r=[],i=At=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Vt(e),this.#h()||this.discard(),t}if(N=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(kt=null,At=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Bt(e,t);i.length>0&&N.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),wt=this,It(r),It(n),wt=null,this.#s?.resolve();var s=N;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&(Ut.clear(),s.#g())}#_(e,t,n){e.f^=S;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=S:i&4?t.push(r):$n(r)&&(i&16&&this.#d.add(r),ar(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),j(i,C),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),N=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)it(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==i&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Tt?.set(e,t)),this.is_fork||(e.v=t)}activate(){N=this}deactivate(){N=null,Tt=null}flush(){try{Ot=!0,N=this,this.#g()}finally{jt=0,Et=null,kt=null,At=null,Ot=!1,N=null,Tt=null,Ut.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ht);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,$e(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=x()).promise}static ensure(){if(N===null){let t=N=new e;!Ot&&!Dt&&$e(()=>{t.#e||t.flush()})}return N}apply(){Tt=null}schedule(e){if(Et=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(kt!==null&&t===W&&(U===null||!(U.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=S}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?Ct=e:t.#t=e,this.linked=!1}}};function P(e){var t=Dt;Dt=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(et(),N===null)return n;N.flush()}}finally{Dt=t}}function Pt(){try{ze()}catch(e){pn(e,Et)}}var Ft=null;function It(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&$n(r)&&(Ft=new Set,ar(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jn(r),Ft?.size>0)){Ut.clear();for(let e of Ft){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ft.has(n)&&(Ft.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||ar(n)}}Ft.clear()}}Ft=null}}function Lt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Lt(i,t,n,r):e&4194320&&!(e&2048)&&Rt(i,t,r)&&(j(i,C),zt(i))}}function Rt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(u.call(t,r))return!0;if(r.f&2&&Rt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function zt(e){N.schedule(e)}function Bt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,S);for(var n=e.first;n!==null;)Bt(n,t),n=n.next}}function Vt(e){j(e,S);for(var t=e.first;t!==null;)Vt(t),t=t.next}var Ht=new Set,Ut=new Map,Wt=!1;function Gt(e,t){return{f:0,v:e,reactions:null,equals:je,rv:0,wv:0}}function F(e,t){let n=Gt(e,t);return Gn(n),n}function Kt(e,t=!1,n=!0){let r=Gt(e);return t||(r.equals=Ne),r}function I(e,t,n=!1){return U!==null&&(!Vn||U.f&131072)&&Xe()&&U.f&4325394&&(Wn===null||!Wn.has(e))&&We(),qt(e,n?Zt(t):t,At)}function qt(e,t,n=null){if(!e.equals(t)){zn?Ut.set(e,t):Ut.has(e)||Ut.set(e,e.v);var r=Nt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&yt(t),Tt===null&&nt(t)}e.wv=Qn(),Xt(e,C,n),Xe()&&W!==null&&W.f&1024&&!(W.f&96)&&(Kn===null?qn([e]):Kn.push(e)),!r.is_fork&&Ht.size>0&&!Wt&&Jt()}return t}function Jt(){Wt=!1;for(let e of Ht){e.f&1024&&j(e,w);let t;try{t=$n(e)}catch{t=!0}t&&ar(e)}Ht.clear()}function Yt(e){I(e,e.v+1)}function Xt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Xe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===W)){var l=(c&C)===0;if(l&&j(s,t),c&131072)Ht.add(s);else if(c&2){var u=s;Tt?.delete(u),c&65536||(c&512&&(W===null||!(W.f&2097152))&&(s.f|=le),Xt(u,w,n))}else if(l){var d=s;c&16&&Ft!==null&&Ft.add(d),n===null?zt(d):n.push(d)}}}}function Zt(e){if(typeof e!=`object`||!e||pe in e||me in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=c(e),a=F(0),o=null,s=Xn,l=e=>{if(Xn===s)return e();var t=U,n=Xn;Hn(null),Zn(s);var r=e();return Hn(t),Zn(n),r};return r&&n.set(`length`,F(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&He();var i=n.get(t);return i===void 0?l(()=>{var e=F(r.value,o);return n.set(t,e),e}):I(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>F(i,o));n.set(t,e),Yt(a)}}else I(r,i),Yt(a);return!0},get(t,r,a){if(r===pe)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||m(t,r)?.writable)&&(s=l(()=>F(Zt(c?t[r]:i),o)),n.set(r,s)),s!==void 0){var u=q(s);return u===i?void 0:u}return Reflect.get(t,r,a)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var a=n.get(t);a&&(r.value=q(a))}else if(r===void 0){var o=n.get(t),s=o?.v;if(o!==void 0&&s!==i)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(e,t){if(t===pe)return!0;var r=n.get(t),a=r!==void 0&&r.v!==i||Reflect.has(e,t);return(r!==void 0||W!==null&&(!a||m(e,t)?.writable))&&(r===void 0&&(r=l(()=>F(a?Zt(e[t]):i,o)),n.set(t,r)),q(r)===i)?!1:a},set(e,t,s,c){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=s;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=l(()=>F(i,o)),n.set(f+``,p)):I(p,i)}if(u===void 0)(!d||m(e,t)?.writable)&&(u=l(()=>F(void 0,o)),I(u,Zt(s)),n.set(t,u));else{d=u.v!==i;var h=l(()=>Zt(s));I(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,t);if(g?.set&&g.set.call(c,s),!d){if(r&&typeof t==`string`){var _=n.get(`length`),v=Number(t);Number.isInteger(v)&&v>=_.v&&I(_,v+1)}Yt(a)}return!0},ownKeys(e){q(a);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==i});for(var[r,o]of n)o.v!==i&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ue()}})}var Qt,$t,en,tn;function nn(){if(Qt===void 0){Qt=window,$t=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;en=m(t,`firstChild`).get,tn=m(t,`nextSibling`).get,y(e)&&(e[ve]=void 0,e[_e]=null,e[ye]=void 0,e.__e=void 0),y(n)&&(n[be]=void 0)}}function rn(e=``){return document.createTextNode(e)}function L(e){return en.call(e)}function an(e){return tn.call(e)}function R(e,t){if(!T)return L(e);var n=L(E);if(n===null)n=E.appendChild(rn());else if(t&&n.nodeType!==3){var r=rn();return n?.before(r),D(r),r}return t&&dn(n),D(n),n}function on(e,t=!1){if(!T){var n=L(e);return n instanceof Comment&&n.data===``?an(n):n}if(t){if(E?.nodeType!==3){var r=rn();return E?.before(r),D(r),r}dn(E)}return E}function sn(e,t=!1){if(!T)return L(e);var n=R(e,t);return k(e),n}function z(e,t=1,n=!1){let r=T?E:e;for(var i;t--;)i=r,r=an(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=rn();return r===null?i?.after(a):r.before(a),D(a),a}dn(r)}return D(r),r}function cn(e){e.textContent=``}function ln(){return!1}function un(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function dn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function fn(e){var t=W;if(t===null)return U.f|=fe,e;if(!(t.f&32768)&&!(t.f&4))throw e;pn(e,t)}function pn(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function mn(e){W===null&&(U===null&&Re(e),Le()),zn&&Ie(e)}function hn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function gn(e,t){var n=W;n!==null&&n.f&8192&&(e|=te);var r={ctx:A,deps:null,nodes:null,f:e|C|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};N?.register_created_effect(r);var i=r;if(e&4)kt===null?Nt.ensure().schedule(r):kt.push(r);else if(t!==null){try{ar(r)}catch(e){throw H(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ae))}if(i!==null&&(i.parent=n,n!==null&&hn(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function _n(){return U!==null&&!Vn}function vn(e){let t=gn(8,null);return j(t,S),t.teardown=e,t}function yn(e){mn(`$effect`);var t=W.f;if(!U&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return bn(e)}function bn(e){return gn(4|se,e)}function xn(e){Nt.ensure();let t=gn(64|oe,e);return()=>{H(t)}}function Sn(e){Nt.ensure();let t=gn(64|oe,e);return(e={})=>new Promise(n=>{e.outro?Mn(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function Cn(e){return gn(4,e)}function wn(e){return gn(de|oe,e)}function Tn(e,t=0){return gn(8|t,e)}function B(e,t=[],n=[],r=[]){ut(r,t,n,t=>{gn(8,()=>{e(...t.map(q))})})}function En(e,t=0){return gn(16|t,e)}function V(e){return gn(32|oe,e)}function Dn(e){var t=e.teardown;if(t!==null){let n=zn,r=U;Bn(!0),Hn(null);try{t.call(null)}catch(t){pn(t,e.parent)}finally{Bn(n),Hn(r)}}}function On(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&<(()=>{e.abort(Se)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function kn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||H(t),t=n}}function H(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(An(e.nodes.start,e.nodes.end),n=!0),e.f|=ie,On(e,t&&!n),ir(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Dn(e),e.f^=ie,e.f|=ne;var i=e.parent;i!==null&&i.first!==null&&jn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function An(e,t){for(;e!==null;){var n=e===t?null:an(e);e.remove(),e=n}}function jn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Mn(e,t,n=!0){var r=[];e.f|=256,Nn(e,r,!0);var i=()=>{n&&H(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Nn(e,t,n){if(!(e.f&8192)){e.f^=te;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Nn(i,t,o?n:!1)}i=a}}}function Pn(e){e.f&=-257,Fn(e,!0)}function Fn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=te,e.f&1024||(j(e,C),Nt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Fn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function In(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:an(n);t.append(n),n=i}}var Ln=null,Rn=!1,zn=!1;function Bn(e){zn=e}var U=null,Vn=!1;function Hn(e){U=e}var W=null;function Un(e){W=e}var Wn=null;function Gn(e){U!==null&&(Wn??=new Set).add(e)}var G=null,K=0,Kn=null;function qn(e){Kn=e}var Jn=1,Yn=0,Xn=Yn;function Zn(e){Xn=e}function Qn(){return++Jn}function $n(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~le),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if($n(a)&&bt(a),a.wv>e.wv)return!0}t&512&&Tt===null&&j(e,S)}return!1}function er(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Wn!==null&&Wn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?er(a,t,!1):t===a&&(n?j(a,C):a.f&1024&&j(a,w),zt(a))}}function tr(e){var t=G,n=K,r=Kn,i=U,a=Wn,o=A,s=Vn,c=Xn,l=e.f;G=null,K=0,Kn=null,U=l&96?null:e,Wn=null,Ke(e.ctx),Vn=!1,Xn=++Yn,e.ac!==null&&(lt(()=>{e.ac.abort(Se)}),e.ac=null);try{e.f|=ue;var u=e.fn,d=u();e.f|=re;var f=nr(e);if(Xe()&&Kn!==null&&!Vn&&f!==null&&!(e.f&6146))for(var p=0;p<Kn.length;p++)er(Kn[p],e);if(i!==null&&i!==e){if(Yn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Yn;if(t!==null)for(let e of t)e.rv=Yn;Kn!==null&&(r===null?r=Kn:r.push(...Kn))}return e.f&8388608&&(e.f^=fe),d}catch(t){return nr(e),fn(t)}finally{e.f^=ue,G=t,K=n,Kn=r,U=i,Wn=a,Ke(o),Vn=s,Xn=c}}function nr(e){var t=e.deps,n=N?.is_fork;if(G!==null){var r;if(n||ir(e,K),t!==null&&K>0)for(t.length=K+G.length,r=0;r<G.length;r++)t[K+r]=G[r];else e.deps=t=G;if(_n()&&e.f&512)for(r=K;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&K<t.length&&(ir(e,K),t.length=K);return t}function rr(e,t){let n=t.reactions;if(n!==null){var r=l.call(n,e);if(r!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[r]=n[a],n.pop())}}if(n===null&&t.f&2&&(G===null||!u.call(G,t))){var o=t;o.f&512&&(o.f^=512,o.f&=~le),o.v!==i&&nt(o),o.ac!==null&<(()=>{o.ac.abort(Se),o.ac=null,j(o,C)}),xt(o),ir(o,0)}}function ir(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)rr(e,n[r])}function ar(e){var t=e.f;if(!(t&16384)){j(e,S);var n=W,r=Rn;W=e,Rn=(t&96)==0;try{t&16777232?kn(e):On(e),Dn(e);var i=tr(e);e.teardown=typeof i==`function`?i:null,e.wv=Jn}finally{Rn=r,W=n}}}function q(e){var t=(e.f&2)!=0;if(Ln?.add(e),U!==null&&!Vn&&!(W!==null&&W.f&16384)&&(Wn===null||!Wn.has(e))){var n=U.deps;if(U.f&2097152)e.rv<Yn&&(e.rv=Yn,G===null&&n!==null&&n[K]===e?K++:G===null?G=[e]:G.push(e));else{U.deps??=[],u.call(U.deps,e)||U.deps.push(e);var r=e.reactions;r===null?e.reactions=[U]:u.call(r,U)||r.push(U)}}if(zn&&Ut.has(e))return Ut.get(e);if(t){var i=e;if(zn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||sr(i))&&(a=yt(i)),Ut.set(i,a),a}var o=(i.f&512)==0&&!Vn&&U!==null&&(Rn||(U.f&512)!=0),s=(i.f&re)===0;$n(i)&&(o&&(i.f|=512),bt(i)),o&&!s&&(St(i),or(i))}if(Tt?.has(e))return Tt.get(e);if(e.f&8388608)throw e.v;return e.v}function or(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(St(t),or(t))}function sr(e){if(e.v===i)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ut.has(t)||t.f&2&&sr(t))return!0;return!1}function cr(e){var t=Vn;try{return Vn=!0,e()}finally{Vn=t}}var lr=Symbol(`events`),ur=new Set,dr=new Set,fr=null,pr=!1;function mr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;fr=e,pr||(pr=!0,setTimeout(()=>{pr=!1,fr=null}));var o=0,s=fr===e&&e[lr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[lr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){p(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=U,d=W;Hn(null),Un(null);try{for(var f,m=[];a!==null&&a!==t;){try{var h=a[lr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?m.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of m)queueMicrotask(()=>{throw e});throw f}}finally{e[lr]=t,delete e.currentTarget,Hn(u),Un(d)}}}var hr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function gr(e){return hr?.createHTML(e)??e}function _r(e){var t=un(`template`);return t.innerHTML=gr(e.replaceAll(`<!>`,`<!---->`)),t.content}function J(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Y(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return J(E,null),E;i===void 0&&(i=_r(a?e:`<!>`+e),n||(i=L(i)));var t=r||$t?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;J(o,s)}else J(t,t);return t}}function vr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(T)return J(E,null),E;if(!o){var e=L(_r(a));if(i)for(o=document.createDocumentFragment();L(e);)o.appendChild(L(e));else o=L(e)}var t=o.cloneNode(!0);if(i){var n=L(t),r=t.lastChild;J(n,r)}else J(t,t);return t}}function yr(e,t){return vr(e,t,`svg`)}function br(){if(T)return J(E,null),E;var e=document.createDocumentFragment(),t=document.createComment(``),n=rn();return e.append(t,n),J(t,n),e}function X(e,t){if(T){var n=W;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),O();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var xr=[`touchstart`,`touchmove`];function Sr(e){return xr.includes(e)}function Cr(e){let t=0,n=Gt(0),r;return()=>{_n()&&(q(n),Tn(()=>(t===0&&(r=cr(()=>e(()=>Yt(n)))),t+=1,()=>{$e(()=>{--t,t===0&&(r?.(),r=void 0,Yt(n))})})))}}var wr=ae|oe;function Tr(e,t,n,r){new Er(e,t,n,r)}var Er=class{parent;is_pending=!1;transform_error;#e;#t=T?E:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Cr(()=>(this.#m=Gt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=W;t.b=this,t.f|=128,n(e)},this.parent=W.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=En(()=>{if(T){let e=this.#t;O();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},wr),T&&(this.#e=E)}#g(){try{this.#a=V(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);$e(r),t&&(this.#s=V(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Ee();return}t=!0,n&&Ge(),this.#s!==null&&Mn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){pn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=V(()=>e(this.#e)),$e(()=>{var e=this.#c=document.createDocumentFragment(),t=rn(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return V(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){pn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(N);return}this.#u===0&&(this.#e.before(e),this.#c=null,Mn(this.#o,()=>{this.#o=null}),this.#x(N))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=V(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();In(this.#a,e);let t=this.#n.pending;this.#o=V(()=>t(this.#e))}else this.#x(N)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){it(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=W,n=U,r=A;Un(this.#i),Hn(this.#i),Ke(this.#i.ctx);try{return Nt.ensure(),e()}finally{Un(t),Hn(n),Ke(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Mn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,$e(()=>{this.#d=!1,this.#m&&qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),q(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;N?.is_fork?(this.#a&&N.skip_effect(this.#a),this.#o&&N.skip_effect(this.#o),this.#s&&N.skip_effect(this.#s),N.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),T&&(D(this.#t),Oe(),D(ke()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return V(()=>{var r=W;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return pn(e,this.#i.parent),null}}))};$e(()=>{var t;try{t=this.transform_error(e)}catch(e){pn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>pn(e,this.#i&&this.#i.parent)):n(t)})}};function Dr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[be]??=e.nodeValue)&&(e[be]=n,e.nodeValue=`${n}`)}function Or(e,t){return jr(e,t)}function kr(e,t){nn(),t.intro=t.intro??!1;let n=t.target,i=T,a=E;try{for(var o=L(n);o&&(o.nodeType!==8||o.data!==`[`);)o=an(o);if(!o)throw r;De(!0),D(o);let i=jr(e,{...t,anchor:o});return De(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
2
|
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==r&&console.warn(`Failed to hydrate: `,i),t.recover===!1&&Be(),nn(),cn(n),De(!1),Or(e,t)}finally{De(i),D(a)}}var Ar=new Map;function jr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){nn();var l=void 0,u=Sn(()=>{var s=n??t.appendChild(rn());Tr(s,{pending:()=>{}},t=>{qe({});var n=A;if(o&&(n.c=o),a&&(i.$$events=a),T&&J(t,null),l=e(t,i)||Ye(),T&&(W.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw Te(),r;Je()},c);var u=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Sr(r);for(let e of[t,document]){var a=Ar.get(e);a===void 0&&(a=new Map,Ar.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,mr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(d(ur)),dr.add(f),()=>{for(var e of u)for(let n of[t,document]){var r=Ar.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,mr),r.delete(e),r.size===0&&Ar.delete(n)):r.set(e,i)}dr.delete(f),s!==n&&s.parentNode?.removeChild(s)}});return Mr.set(l,u),l}var Mr=new WeakMap;function Nr(e,t){let n=Mr.get(e);return n?(Mr.delete(e),n(t)):Promise.resolve()}var Pr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Pn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Pn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(H(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();In(r,t),t.append(rn()),this.#n.set(e,{effect:r,fragment:t})}else H(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Mn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(H(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=ln();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=rn();i.append(a),this.#n.set(e,{effect:V(()=>t(a)),fragment:i})}else this.#t.set(e,V(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else T&&(this.anchor=E),this.#a(n)}};function Z(e,t,n=!1){var r;T&&(r=E,O());var i=new Pr(e),a=n?ae:0;function o(e,t){if(T){var n=Ae(r);if(e!==parseInt(n.substring(1))){var a=ke();D(a),i.anchor=a,De(!1),i.ensure(e,t),De(!0);return}}i.ensure(e,t)}En(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Fr(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Mn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Ir(e,d(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var c=r.length===0&&n!==null&&e.pending.size===0;if(c){var l=n,u=l.parentNode;cn(u),u.append(l),e.items.clear()}Ir(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Ir(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ce,In(a,document.createDocumentFragment())):H(t[i],n)}}var Lr;function Rr(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var l=e;o=T?D(L(l)):l.appendChild(rn())}T&&O();var u=null,f=_t(()=>{var e=n();return c(e)?e:e==null?[]:d(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=u,Br(v,p,o,t,r),u!==null&&(p.length===0?u.f&33554432?(u.f^=ce,Hr(u,null,o)):Pn(u):Mn(u,()=>{u=null})))}function _(e){v.pending.delete(e)}var v={effect:En(()=>{p=q(f);var e=p.length;let c=!1;T&&Ae(o)===`[!`!=(e===0)&&(o=ke(),D(o),De(!1),c=!0);for(var l=new Set,d=N,v=ln(),y=0;y<e;y+=1){T&&E.nodeType===8&&E.data===`]`&&(o=E,c=!0,De(!1));var ee=p[y],b=r(ee,y),x=h?null:s.get(b);x?(x.v&&qt(x.v,ee),x.i&&qt(x.i,y),v&&d.unskip_effect(x.e)):(x=Vr(s,h?o:Lr??=rn(),ee,b,y,i,t,n),h||(x.e.f|=ce),s.set(b,x)),l.add(b)}if(e===0&&a&&!u&&(h?u=V(()=>a(o)):(u=V(()=>a(Lr??=rn())),u.f|=ce)),e>l.size&&Fe(``,``,``),T&&e>0&&D(ke()),!h)if(m.set(d,l),v){for(let[e,t]of s)l.has(e)||d.skip_effect(t.e);d.oncommit(g),d.ondiscard(_)}else g(d);c&&De(!0),q(f)}),flags:t,items:s,pending:m,outrogroups:null,fallback:u};h=!1,T&&(o=E)}function zr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Br(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=zr(e.effect.first),l,u=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Pn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ce,_===c)Hr(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ur(e,u,_),Ur(e,_,y),Hr(_,y,n),u=_,p=[],m=[],c=zr(u.next);continue}if(_!==c){if(l!==void 0&&l.has(_)){if(p.length<m.length){var ee=m[0],b;u=ee.prev;var x=p[0],S=p[p.length-1];for(b=0;b<p.length;b+=1)Hr(p[b],ee,n);for(b=0;b<m.length;b+=1)l.delete(m[b]);Ur(e,x.prev,S.next),Ur(e,u,x),Ur(e,S,ee),c=ee,u=S,--v,p=[],m=[]}else l.delete(_),Hr(_,c,n),Ur(e,_.prev,_.next),Ur(e,_,u===null?e.effect.first:u.next),Ur(e,u,_),u=_;continue}for(p=[],m=[];c!==null&&c!==_;)(l??=new Set).add(c),m.push(c),c=zr(c.next);if(c===null)continue}_.f&33554432||p.push(_),u=_,c=zr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Ir(e,d(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var C=[];if(l!==void 0)for(_ of l)_.f&8192||C.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&C.push(c),c=zr(c.next);var w=C.length;if(w>0){var te=r&4&&o===0?n:null;if(a){for(v=0;v<w;v+=1)C[v].nodes?.a?.measure();for(v=0;v<w;v+=1)C[v].nodes?.a?.fix()}Fr(e,C,te)}}a&&$e(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Vr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Gt(n):Kt(n,!1,!1):null,l=o&2?Gt(i):null;return{v:c,i:l,e:V(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Hr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=an(r);if(a.before(r),r===i)return;r=o}}function Ur(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Wr(e,t,n=!1,i=!1,a=!1,c=!1){var l=e,u=``;if(n){var d=e;T&&(l=D(L(d)))}B(()=>{var e=W;if(u===(u=t()??``)){T&&O();return}if(n&&!T){e.nodes=null,d.innerHTML=u,u!==``&&J(L(d),d.lastChild);return}if(e.nodes!==null&&(An(e.nodes.start,e.nodes.end),e.nodes=null),u!==``){if(T){for(var c=E.data,f=O(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=an(f);if(f===null)throw Te(),r;J(E,p),l=D(f);return}var m=un(i?`svg`:a?`math`:`template`,i?o:a?s:void 0);m.innerHTML=u;var h=i||a?m:m.content;if(J(L(h),h.lastChild),i||a)for(;L(h);)l.before(L(h));else l.before(h)}})}function Gr(e,t){Cn(()=>{e=W?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=un(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var Kr=[...`
|
|
3
|
-
\r\f\xA0\v`];function qr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Kr.includes(r[o-1]))&&(s===r.length||Kr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Jr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Yr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Xr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Yr)),i&&c.push(...Object.keys(i).map(Yr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Yr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Jr(r)),i&&(n+=Jr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Zr(e,t,n,r,i,a){var o=e[ve];if(T||o!==n||o===void 0){var s=qr(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[ve]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Qr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function $r(e,t,n,r){var i=e[ye];if(T||i!==t){var a=Xr(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ye]=t}else r&&(Array.isArray(r)?(Qr(e,n?.[0],r[0]),Qr(e,n?.[1],r[1],`important`)):Qr(e,n,r));return r}var ei=Symbol(`is custom element`),ti=Symbol(`is html`),ni=Ce?`link`:`LINK`,ri=Ce?`progress`:`PROGRESS`;function ii(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Q(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Q(e,`checked`,null),e.checked=r}}};e[xe]=n,$e(n),ct()}}function ai(e,t){var n=si(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ri)||(e.value=t??``)}function oi(e,t){var n=si(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Q(e,t,n,r){var i=si(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ni)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ge]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&li(e).has(t)?e[t]=n:e.setAttribute(t,n))}function si(e){return e[_e]??={[ei]:e.nodeName.includes(`-`),[ti]:e.namespaceURI===a}}var ci=new Map;function li(e){var t=e.getAttribute(`is`)||e.nodeName,n=ci.get(t);if(n)return n;ci.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=v(i)}return n}function ui(e,t){return e===t||e?.[pe]===t}function di(e=Ye(),t,n,r){var i=A.r,a=W;return Cn(()=>{var o,s;return Tn(()=>{o=s,s=r?.()||[],cr(()=>{ui(n(...s),e)||(t(e,...s),o&&ui(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&ui(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function $(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=mt(r),q(l)):(c&&(c=!1,s=o?cr(r):r),s);let d;if(a){var f=pe in e||he in e;d=m(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,h=!1;a?[p,h]=ot(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Ve(t),d(p)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(d){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&d(t?g():e),e):g()})}var v=!1,y=(n&1?mt:_t)(()=>(v=!1,g()));a&&q(y);var ee=W;return(function(e,t){if(arguments.length>0){let n=t?q(y):i&&a?Zt(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return zn&&v||ee.f&16384?y.v:q(y)})}function fi(e){return new pi(e)}var pi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Kt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===he?!0:(q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?kr:Or)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),(!e?.props?.$$host||e.sync===!1)&&P(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||p(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Nr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},mi;typeof HTMLElement==`function`&&(mi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=un(`slot`);e!=="default"&&(n.name=e),X(t,n)}}let t={},n=gi(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=hi(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=fi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=xn(()=>{Tn(()=>{this.$$r=!0;for(let e of f(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=hi(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=hi(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return f(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function hi(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function gi(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function _i(e,t,n,r,i,a){let o=class extends mi{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return f(t).map(e=>(t[e].attribute||e).toLowerCase())}};return f(t).forEach(e=>{p(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=hi(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(m(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{p(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var vi=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},yi=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},bi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function xi(e,t={}){let n=t.hostPredicate??bi,r=e;for(;r;){if(n(r))return r;r=r.parentElement}if(typeof document<`u`&&t.fallbackSelector){let e=document.querySelector(t.fallbackSelector);if(n(e))return e}return null}function Si({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=xi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new yi(n,r)),a):null}function Ci(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var wi=Y(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),Ti=Y(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),Ei=Y(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),Di=Y(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Oi=Y(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),ki={hash:`svelte-ypdwb3`,code:`.listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Ai(e,t){qe(t,!0),Gr(e,ki);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=$(t,`hasAudio`,7,!1),i=$(t,`audioUrl`,7),a=$(t,`useFeatureButtonAudio`,7,!1),o=$(t,`autoplayEnabled`,7,!1),s=$(t,`featureAudioSkin`,7),c=$(t,`uiText`,7),l=$(t,`locale`,7,``),u=$(t,`onaudiostarted`,7),d=$(t,`onaudioended`,7),f=F(null),p=F(null),m=F(null),h=F(Zt(n.IDLE)),g=M(()=>Ci({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),_=M(()=>q(h)===n.PLAYING),v=M(()=>q(h)===n.BLOCKED),y=M(()=>q(g)===`error`?c().audioResourceUnavailable:``);yn(()=>{i(),I(h,n.IDLE,!0)});function ee(){q(g)!==`none`&&q(g)!==`error`&&q(f)&&q(f).play().catch(()=>{})}function b(){q(g)!==`none`&&q(g)!==`error`&&q(f)&&q(f).play().finally(()=>{q(h)===n.BLOCKED&&I(h,n.PAUSED,!0)})}function x(e,t,n){yn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>q(f),`playing`,()=>{I(h,n.PLAYING,!0),u()?.()}),x(()=>q(f),`ended`,()=>{I(h,n.PAUSED,!0),d()?.()}),x(()=>q(p),`click`,()=>ee()),x(()=>q(m),`click`,()=>b()),yn(()=>{!o()||q(g)===`none`||q(g)===`error`||q(h)===n.IDLE&&q(f)&&i()&&(I(h,n.PAUSED,!0),q(f).play().catch(()=>{I(h,n.BLOCKED,!0)}))});function S(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function C(e=``){return e.toLowerCase().startsWith(`es`)?c().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:c().listenSilentAlt??`Repeat instructions`}function w(e=``){return e.toLowerCase().startsWith(`es`)?c().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:c().listenPlayingAlt??`Instructions are playing`}var te={get hasAudio(){return r()},set hasAudio(e=!1){r(e),P()},get audioUrl(){return i()},set audioUrl(e){i(e),P()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),P()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),P()},get featureAudioSkin(){return s()},set featureAudioSkin(e){s(e),P()},get uiText(){return c()},set uiText(e){c(e),P()},get locale(){return l()},set locale(e=``){l(e),P()},get onaudiostarted(){return u()},set onaudiostarted(e){u(e),P()},get onaudioended(){return d()},set onaudioended(e){d(e),P()}},ne=br(),re=on(ne),ie=e=>{var t=Oi(),n=R(t),r=e=>{var t=wi(),n=on(t);di(n,e=>I(f,e),()=>q(f));var r=z(n,2),a=R(r),o=z(a,2);k(r),di(r,e=>I(p,e),()=>q(p)),B((e,t,c)=>{Q(n,`src`,i()),Q(r,`aria-label`,e),Zr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(_)?``:`listen-active`}`,`svelte-ypdwb3`),Q(a,`src`,s().silentUrl),Q(a,`alt`,t),Zr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(_)?`listen-active`:``}`,`svelte-ypdwb3`),Q(o,`src`,s().playingUrl),Q(o,`alt`,c)},[()=>S(l()),()=>C(l()),()=>w(l())]),X(e,t)},a=e=>{var t=Ei(),n=on(t);di(n,e=>I(f,e),()=>q(f));var r=z(n,2),a=e=>{var t=Ti(),n=sn(t,!0);di(t,e=>I(m,e),()=>q(m)),B(()=>Dr(n,c().clickToEnableAutoplay)),X(e,t)};Z(r,e=>{q(v)&&e(a)}),B(()=>Q(n,`src`,i())),X(e,t)},o=e=>{var t=Di(),n=sn(t,!0);B(()=>Dr(n,q(y))),X(e,t)};Z(n,e=>{q(g)===`feature-button`?e(r):q(g)===`controls`?e(a,1):q(g)===`error`&&e(o,2)}),k(t),X(e,t)};return Z(re,e=>{q(g)!==`none`&&e(ie)}),X(e,ne),Je(te)}_i(Ai,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var ji=Y(`<img class="w-auto object-contain pie-blank-image" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Mi=Y(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Ni=Y(`<span class="cloze-marker-empty svelte-d9l5tb"><span aria-hidden="true"> </span> <span class="sr-only svelte-d9l5tb">(blank)</span></span>`),Pi=Y(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Fi={hash:`svelte-d9l5tb`,code:`.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--mpb-focus-ring, #1565c0);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}
|
|
3
|
+
\r\f\xA0\v`];function qr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Kr.includes(r[o-1]))&&(s===r.length||Kr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Jr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Yr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Xr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Yr)),i&&c.push(...Object.keys(i).map(Yr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Yr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Jr(r)),i&&(n+=Jr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Zr(e,t,n,r,i,a){var o=e[ve];if(T||o!==n||o===void 0){var s=qr(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[ve]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Qr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function $r(e,t,n,r){var i=e[ye];if(T||i!==t){var a=Xr(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ye]=t}else r&&(Array.isArray(r)?(Qr(e,n?.[0],r[0]),Qr(e,n?.[1],r[1],`important`)):Qr(e,n,r));return r}var ei=Symbol(`is custom element`),ti=Symbol(`is html`),ni=Ce?`link`:`LINK`,ri=Ce?`progress`:`PROGRESS`;function ii(e){if(T){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Q(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Q(e,`checked`,null),e.checked=r}}};e[xe]=n,$e(n),ct()}}function ai(e,t){var n=si(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ri)||(e.value=t??``)}function oi(e,t){var n=si(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Q(e,t,n,r){var i=si(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ni)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ge]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&li(e).has(t)?e[t]=n:e.setAttribute(t,n))}function si(e){return e[_e]??={[ei]:e.nodeName.includes(`-`),[ti]:e.namespaceURI===a}}var ci=new Map;function li(e){var t=e.getAttribute(`is`)||e.nodeName,n=ci.get(t);if(n)return n;ci.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=v(i)}return n}function ui(e,t){return e===t||e?.[pe]===t}function di(e=Ye(),t,n,r){var i=A.r,a=W;return Cn(()=>{var o,s;return Tn(()=>{o=s,s=r?.()||[],cr(()=>{ui(n(...s),e)||(t(e,...s),o&&ui(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&ui(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function $(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=mt(r),q(l)):(c&&(c=!1,s=o?cr(r):r),s);let d;if(a){var f=pe in e||he in e;d=m(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,h=!1;a?[p,h]=ot(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Ve(t),d(p)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(d){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&d(t?g():e),e):g()})}var v=!1,y=(n&1?mt:_t)(()=>(v=!1,g()));a&&q(y);var ee=W;return(function(e,t){if(arguments.length>0){let n=t?q(y):i&&a?Zt(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return zn&&v||ee.f&16384?y.v:q(y)})}function fi(e){return new pi(e)}var pi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Kt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===he?!0:(q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?kr:Or)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),(!e?.props?.$$host||e.sync===!1)&&P(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||p(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Nr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},mi;typeof HTMLElement==`function`&&(mi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=un(`slot`);e!=="default"&&(n.name=e),X(t,n)}}let t={},n=gi(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=hi(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=fi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=xn(()=>{Tn(()=>{this.$$r=!0;for(let e of f(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=hi(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=hi(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return f(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function hi(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function gi(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function _i(e,t,n,r,i,a){let o=class extends mi{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return f(t).map(e=>(t[e].attribute||e).toLowerCase())}};return f(t).forEach(e=>{p(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=hi(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(m(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{p(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var vi=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},yi=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},bi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function xi(e,t={}){let n=t.hostPredicate??bi,r=e;for(;r;){if(n(r))return r;r=r.parentElement}if(typeof document<`u`&&t.fallbackSelector){let e=document.querySelector(t.fallbackSelector);if(n(e))return e}return null}function Si(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Ci(e,t){if(e===t)return e;if(!Si(e)||!Si(t)||Object.isFrozen(e)||!Object.isExtensible(e))return t;try{for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}catch{return t}return e}function wi({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=xi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new yi(n,r)),a):null}function Ti(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var Ei=Y(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),Di=Y(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),Oi=Y(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),ki=Y(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Ai=Y(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),ji={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 Mi(e,t){qe(t,!0),Gr(e,ji);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=$(t,`hasAudio`,7,!1),i=$(t,`audioUrl`,7),a=$(t,`useFeatureButtonAudio`,7,!1),o=$(t,`autoplayEnabled`,7,!1),s=$(t,`featureAudioSkin`,7),c=$(t,`uiText`,7),l=$(t,`locale`,7,``),u=$(t,`onaudiostarted`,7),d=$(t,`onaudioended`,7),f=F(null),p=F(null),m=F(null),h=F(Zt(n.IDLE)),g=M(()=>Ti({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),_=M(()=>q(h)===n.PLAYING),v=M(()=>q(h)===n.BLOCKED),y=M(()=>q(g)===`error`?c().audioResourceUnavailable:``);yn(()=>{i(),I(h,n.IDLE,!0)});function ee(){q(g)!==`none`&&q(g)!==`error`&&q(f)&&q(f).play().catch(()=>{})}function b(){q(g)!==`none`&&q(g)!==`error`&&q(f)&&q(f).play().finally(()=>{q(h)===n.BLOCKED&&I(h,n.PAUSED,!0)})}function x(e,t,n){yn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>q(f),`playing`,()=>{I(h,n.PLAYING,!0),u()?.()}),x(()=>q(f),`ended`,()=>{I(h,n.PAUSED,!0),d()?.()}),x(()=>q(p),`click`,()=>ee()),x(()=>q(m),`click`,()=>b()),yn(()=>{!o()||q(g)===`none`||q(g)===`error`||q(h)===n.IDLE&&q(f)&&i()&&(I(h,n.PAUSED,!0),q(f).play().catch(()=>{I(h,n.BLOCKED,!0)}))});function S(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function C(e=``){return e.toLowerCase().startsWith(`es`)?c().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:c().listenSilentAlt??`Repeat instructions`}function w(e=``){return e.toLowerCase().startsWith(`es`)?c().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:c().listenPlayingAlt??`Instructions are playing`}var te={get hasAudio(){return r()},set hasAudio(e=!1){r(e),P()},get audioUrl(){return i()},set audioUrl(e){i(e),P()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),P()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),P()},get featureAudioSkin(){return s()},set featureAudioSkin(e){s(e),P()},get uiText(){return c()},set uiText(e){c(e),P()},get locale(){return l()},set locale(e=``){l(e),P()},get onaudiostarted(){return u()},set onaudiostarted(e){u(e),P()},get onaudioended(){return d()},set onaudioended(e){d(e),P()}},ne=br(),re=on(ne),ie=e=>{var t=Ai(),n=R(t),r=e=>{var t=Ei(),n=on(t);di(n,e=>I(f,e),()=>q(f));var r=z(n,2),a=R(r),o=z(a,2);k(r),di(r,e=>I(p,e),()=>q(p)),B((e,t,c)=>{Q(n,`src`,i()),Q(r,`aria-label`,e),Zr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(_)?``:`listen-active`}`,`svelte-ypdwb3`),Q(a,`src`,s().silentUrl),Q(a,`alt`,t),Zr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(_)?`listen-active`:``}`,`svelte-ypdwb3`),Q(o,`src`,s().playingUrl),Q(o,`alt`,c)},[()=>S(l()),()=>C(l()),()=>w(l())]),X(e,t)},a=e=>{var t=Oi(),n=on(t);di(n,e=>I(f,e),()=>q(f));var r=z(n,2),a=e=>{var t=Di(),n=sn(t,!0);di(t,e=>I(m,e),()=>q(m)),B(()=>Dr(n,c().clickToEnableAutoplay)),X(e,t)};Z(r,e=>{q(v)&&e(a)}),B(()=>Q(n,`src`,i())),X(e,t)},o=e=>{var t=ki(),n=sn(t,!0);B(()=>Dr(n,q(y))),X(e,t)};Z(n,e=>{q(g)===`feature-button`?e(r):q(g)===`controls`?e(a,1):q(g)===`error`&&e(o,2)}),k(t),X(e,t)};return Z(re,e=>{q(g)!==`none`&&e(ie)}),X(e,ne),Je(te)}_i(Mi,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var Ni=Y(`<img class="w-auto object-contain pie-blank-image" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Pi=Y(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Fi=Y(`<span class="cloze-marker-empty svelte-d9l5tb"><span aria-hidden="true"> </span> <span class="sr-only svelte-d9l5tb">(blank)</span></span>`),Ii=Y(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Li={hash:`svelte-d9l5tb`,code:`.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--mpb-focus-ring, #1565c0);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}
|
|
4
4
|
|
|
5
5
|
/* Same 150x150 content-element constraint as ChoiceRow.svelte's .choice-html
|
|
6
6
|
img — the selected choice's raw labelHtml can carry an embedded <img> here
|
|
7
|
-
too, regardless of customType. See CONTOOL-3159. */.cloze-marker-value.svelte-d9l5tb img {width:150px;height:150px;}.sr-only.svelte-d9l5tb {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function
|
|
7
|
+
too, regardless of customType. See CONTOOL-3159. */.cloze-marker-value.svelte-d9l5tb img {width:150px;height:150px;}.sr-only.svelte-d9l5tb {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Ri(e,t){qe(t,!0),Gr(e,Li);let n=$(t,`choiceMode`,7,`text`),r=$(t,`displayChoice`,7,void 0),i=$(t,`displayChoiceLabelHtml`,7,``),a=$(t,`isStandalone`,7,!1),o=$(t,`blankWidth`,7),s=$(t,`blankBorderWidth`,7),c=$(t,`ariaLabel`,7);var l={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),P()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),P()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),P()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),P()},get blankWidth(){return o()},set blankWidth(e){o(e),P()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),P()},get ariaLabel(){return c()},set ariaLabel(e){c(e),P()}},u=Ii(),d=R(u),f=e=>{var t=Ni();B(()=>{Q(t,`src`,r().imageUrl),Q(t,`alt`,r().imageAlt||`Selected answer image`)}),X(e,t)},p=e=>{var t=Pi();Wr(t,i,!0),k(t),X(e,t)},m=e=>{X(e,Fi())};return Z(d,e=>{n()===`image`&&r()?.imageUrl?e(f):i()?e(p,1):e(m,-1)}),k(u),B(()=>{Zr(u,1,`inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),$r(u,`width:${o()};border-bottom-width:${s()};`),Q(u,`aria-label`,c())}),X(e,u),Je(l)}_i(Ri,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{}},[],[],{mode:`open`});var zi=Y(`<img class="object-contain pie-choice-image" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Bi=Y(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Vi=Y(`<label class="cursor-pointer choice-tile text-center pie-choice-tile svelte-8xu1pt"><span class="choice-tile-content pie-choice-tile-content svelte-8xu1pt"><!></span> <input type="radio" class="choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt"/></label>`),Hi=Y(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Ui=Y(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Wi=Y(`<span aria-hidden="true"> </span>`),Gi=Y(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Ki={hash:`svelte-8xu1pt`,code:`.choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-background-dark, #ecedf1);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-tertiary, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-incorrect-icon, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-secondary, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-incorrect-secondary, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-white, #ffffff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-icon, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-incorrect-icon, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}
|
|
8
8
|
|
|
9
9
|
/* Choices carrying raw <img> markup in labelHtml (rather than the dedicated
|
|
10
10
|
imageUrl/imageAlt fields) render unconstrained at their authored size
|
|
11
11
|
otherwise — 3rd-party/CQT-sourced content is typically authored well above
|
|
12
12
|
the platform's 150x150 content-element spec. Applies regardless of
|
|
13
|
-
customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */.choice-html.svelte-8xu1pt img {width:150px;height:150px;}.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
|
|
13
|
+
customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */.choice-html.svelte-8xu1pt img {width:150px;height:150px;}.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 qi(e,t){qe(t,!0),Gr(e,Ki);let n=$(t,`choice`,7),r=$(t,`choiceMode`,7,`text`),i=$(t,`isHorizontal`,7,!1),a=$(t,`isSelected`,7,!1),o=$(t,`isDisabled`,7,!1),s=$(t,`correctness`,7,void 0),c=$(t,`isEvaluateMode`,7,!1),l=$(t,`instanceId`,7),u=$(t,`radioGroupName`,7);var d={get choice(){return n()},set choice(e){n(e),P()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),P()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),P()},get isSelected(){return a()},set isSelected(e=!1){a(e),P()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),P()},get correctness(){return s()},set correctness(e=void 0){s(e),P()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),P()},get instanceId(){return l()},set instanceId(e){l(e),P()},get radioGroupName(){return u()},set radioGroupName(e){u(e),P()}},f=Gi(),p=R(f),m=e=>{var t=Vi(),i=R(t),s=R(i),c=e=>{var t=zi();B(()=>{Q(t,`src`,n().imageUrl),Q(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),X(e,t)},d=e=>{var t=Bi();Wr(t,()=>n().labelHtml||``,!0),k(t),X(e,t)};Z(s,e=>{r()===`image`&&n().imageUrl?e(c):e(d,-1)}),k(i);var f=z(i,2);ii(f),k(t),B(()=>{Q(t,`for`,`${l()}-opt-${n().id}`),Q(f,`name`,u()),Q(f,`id`,`${l()}-opt-${n().id}`),ai(f,n().id),oi(f,a()),f.disabled=o()}),X(e,t)},h=e=>{var t=Ui(),i=on(t);ii(i);var s=z(i,2),c=R(s),d=e=>{var t=Hi();B(()=>{Q(t,`src`,n().imageUrl),Q(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),X(e,t)},f=e=>{var t=Bi();Wr(t,()=>n().labelHtml||``,!0),k(t),X(e,t)};Z(c,e=>{r()===`image`&&n().imageUrl?e(d):e(f,-1)}),k(s),B(()=>{Q(i,`name`,u()),Q(i,`id`,`${l()}-opt-${n().id}`),ai(i,n().id),oi(i,a()),i.disabled=o(),Q(s,`for`,`${l()}-opt-${n().id}`)}),X(e,t)};Z(p,e=>{i()?e(m):e(h,-1)});var g=z(p,2),_=e=>{var t=Wi(),n=sn(t,!0);B(()=>{Zr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Dr(n,s()===`correct`?`✓`:`✕`)}),X(e,t)};return Z(g,e=>{c()&&s()&&e(_)}),k(f),B(()=>Zr(f,1,`flex items-start choice-row pie-choice ${i()?`choice-row-horizontal pie-choice-horizontal`:``} ${a()?`is-selected pie-choice-selected`:``} ${s()?`choice-${s()} pie-choice-${s()}`:``}`,`svelte-8xu1pt`)),X(e,f),Je(d)}_i(qi,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{}},[],[],{mode:`open`});function Ji(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 Yi=`{{blank}}`,Xi=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Zi(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/ /g,` `).trim()===Yi:!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&&Xi.has(i)}}var Qi={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,choiceImageMaxHeightRem:9.375,choiceImageMaxWidthRem:9.375,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,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},$i={blankStandaloneWidthRem:{varName:`--mpb-blank-standalone-width`,unit:`rem`},blankWideWidthRem:{varName:`--mpb-blank-wide-width`,unit:`rem`},blankUnderlineWidthPx:{varName:`--mpb-blank-underline-width`,unit:`px`},blankUnderlineWideWidthPx:{varName:`--mpb-blank-underline-wide-width`,unit:`px`},horizontalChoiceWidthPx:{varName:`--mpb-choice-width-px`,unit:`px`},horizontalChoiceWidthVw:{varName:`--mpb-choice-width-vw`,unit:`vw`},horizontalChoiceTileMinHeightRem:{varName:`--mpb-choice-tile-min-height`,unit:`rem`},horizontalChoiceContentMinHeightRem:{varName:`--mpb-choice-content-min-height`,unit:`rem`},choiceImageMaxHeightRem:{varName:`--mpb-choice-image-max-height`,unit:`rem`},choiceImageMaxWidthRem:{varName:`--mpb-choice-image-max-width`,unit:`rem`},choiceGroupGapRem:{varName:`--mpb-choice-group-gap`,unit:`rem`},choiceRowGapRem:{varName:`--mpb-choice-row-gap`,unit:`rem`},horizontalChoiceRadioTopMarginRem:{varName:`--mpb-horizontal-choice-radio-top-margin`,unit:`rem`},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`}},ea={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 ta(e){let{layoutProfile:t,isBlankOnlyTemplate:n}=e,r=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},i=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},a=i[t]&&typeof i[t]==`object`?i[t]:{},o={...ea[t]??{},...a},s={...Qi,...r,...o},c=[`audio_blank_only`,`stimulus_image_blank`],l=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],u=c.includes(t)?`${s.blankWideWidthRem}rem`:n?`${s.blankStandaloneWidthRem}rem`:`auto`,d=l.includes(t)?`${s.blankUnderlineWideWidthPx}px`:`${s.blankUnderlineWidthPx}px`;return{rootStyle:Object.keys($i).map(e=>`${$i[e].varName}:${s[e]}${$i[e].unit}`).join(`;`),blankWidth:u,blankBorderWidth:d,legendMaxChars:s.legendMaxChars}}var na={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 ra(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`)?na.es:na.default;return r[t]||r[n]||r.default||i||a}function ia(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,alwaysShowCorrect:i,correctChoiceId:a}=e;return i&&a||n&&r&&a?a:t}function aa(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 oa(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 sa=`/* Shared base styles for all sel_r1-*_plusggg variants.
|
|
14
14
|
Applied via the data-mpb-variant="sel-r1-base" style element.
|
|
15
15
|
Uses [class*="variant-sel-r1-"] so it covers every r1 variant class.
|
|
16
16
|
Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
width: 150px;
|
|
163
163
|
height: 150px;
|
|
164
164
|
}
|
|
165
|
-
`,
|
|
165
|
+
`,ca={"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 */
|
|
166
166
|
/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
|
|
167
167
|
.mc-populated-blank-root.variant-sel-r1-plusggg {
|
|
168
168
|
max-width: 875px;
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {
|
|
538
538
|
transform: scale(0.85);
|
|
539
539
|
}
|
|
540
|
-
`}},
|
|
540
|
+
`}},la=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),ua=e=>ca[la(e)],da=e=>ua(e)?.variantClass||``,fa=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),pa=(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)},ma=e=>{!e?.cssText||typeof document>`u`||(fa.has(e.variantId)&&pa(`mc-populated-blank-css-sel-r1-base`,`sel-r1-base`,sa),pa(`mc-populated-blank-css-${e.variantId}`,e.variantId,e.cssText))},ha=Y(`<div class="mb-4 prose pie-prompt"></div>`),ga=yr(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #d0e2f0)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-tertiary-light, #d0e2f0)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-tertiary, #146eb3)"></polygon></svg>`),_a=yr(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35"><path d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z" fill="#D0CAC5" stroke="#E6E3E0" stroke-width="0.75"></path><path d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z" fill="#B3ABA4" stroke="#CDC7C2" stroke-width="0.5"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="var(--pie-background-dark, #ecedf1)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-tertiary, #146eb3)"></polygon></svg>`),va=Y(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="mb-3 pie-toggle-correct-answer svelte-6wlbb4" style="gap:var(--mpb-toggle-button-gap, 0.5rem);" data-testid="show-correct-answer"><span class="pie-correct-answer-toggle-content svelte-6wlbb4"><span class="pie-correct-answer-toggle-icon-holder svelte-6wlbb4" aria-hidden="true"><!></span> <span class="pie-correct-answer-toggle-label svelte-6wlbb4"> </span></span></button></div>`),ya=Y(`<div class="mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4"></div>`),ba=Y(`<div class="mb-4 template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),xa=Y(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),Sa=Y(`<div><!> <!> <!> <!> <!> <!> <p class="sr-only pie-blank-hint svelte-6wlbb4"> </p> <fieldset class="border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`),Ca={hash:`svelte-6wlbb4`,code:`.sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 {--mpb-focus-ring: var(
|
|
541
541
|
--pie-focus-outline,
|
|
542
542
|
var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))
|
|
543
543
|
);}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-text, black);}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),
|
|
@@ -564,4 +564,4 @@
|
|
|
564
564
|
.layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
|
|
565
565
|
.layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
|
|
566
566
|
.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;}
|
|
567
|
-
}`};function Sa(e,t){qe(t,!0),Gr(e,xa);let n={answerChoices:`Answer choices`,selectedAnswerInSentence:`Selected answer in sentence`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`},r=$(t,`model`,7),i=$(t,`session`,7),a=F(``),o=F(null),s=F(null),c=F(null),l=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,u=M(()=>(r()?.mode||r()?.env?.mode||``).toString()),d=M(()=>q(u)===`evaluate`),f=M(()=>r()?.correctness),p=M(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:q(f)===`correct`),m=M(()=>q(f)===`correct`),h=M(()=>q(f)===`incorrect`),g=F(!1),_=M(()=>q(d)&&!q(p)&&!!r()?.correctChoiceId),v=M(()=>r()?.layoutProfile||``),y=M(()=>Yi({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:q(v),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),ee=M(()=>q(y).isAudioOnlyMode),b=M(()=>q(y).isBlankOnlyTemplate),x=M(()=>q(y).isHorizontalChoices),S=M(()=>q(y).hasInlineSentenceAudioLayout),C=M(()=>q(y).useFeatureButtonAudio),w=M(()=>$i({layoutProfile:q(v),isBlankOnlyTemplate:q(b),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets})),te=M(()=>Array.isArray(r()?.choices)?r().choices:[]),ne=M(()=>r()?.choiceMode||`text`),re=M(()=>i()?.choiceId||q(a)||``),ie=M(()=>`${l}-choice-group-${r()?.id||`1`}`),ae=M(()=>na({selectedId:q(re),isEvaluateMode:q(d),showCorrectAnswer:q(g),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),oe=M(()=>q(te).find(e=>e.id===q(ae))),se=M(()=>String(q(oe)?.labelHtml||``)),ce=M(()=>ra({isEvaluateMode:q(d),showCorrectAnswer:q(g),isCorrect:q(m),isIncorrect:q(h),selectedId:q(re)})),le=M(()=>Ki({isEvaluateMode:q(d),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(q(re)||``),showCorrectAnswer:q(g)})),ue=M(()=>({...n,...r()?.uiText||{}})),de=M(()=>`${l}-prompt`),fe=M(()=>`${l}-choices-legend`),pe=M(()=>`${l}-result`),me=M(()=>`${l}-blank-hint`),he=M(()=>ia({prompt:r()?.prompt||``,legendMaxChars:q(w).legendMaxChars,answerChoicesLabel:q(ue).answerChoices})),ge=M(()=>r()?.prompt?q(de):void 0),_e=M(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||q(he)),ve=M(()=>r()?.prompt?q(de):void 0),ye=M(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),be=M(()=>ca(r()?.customType)),xe=M(()=>la(r()?.customType)),Se=M(()=>{let e=r()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let n=e.slice(0,t),i=e.slice(t+9);return q(v)===`inline_sentence`&&(n=`${n.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:n,after:i}});function Ce(e,t){Si({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function we(e){let t=e.target;if(!t.checked)return;let n=t.value;I(a,n,!0),Ce({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function Te(){q(_)&&I(g,!q(g))}yn(()=>{(!q(d)||q(p))&&I(g,!1)});function Ee(e){if(r()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let n=e.currentTarget,i=Array.from(n.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let T=M(()=>ta({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function De(){xi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function E(){xi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}yn(()=>{i()?.choiceId&&I(a,i().choiceId,!0)}),yn(()=>{let e=q(o);if(e)return e.addEventListener(`click`,Te),()=>e.removeEventListener(`click`,Te)}),yn(()=>{let e=q(s);if(!e)return;let t=e=>{e.target?.type===`radio`&&we(e)},n=e=>Ee(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),yn(()=>{fa(q(be))});var D={get model(){return r()},set model(e){r(e),P()},get session(){return i()},set session(e){i(e),P()}},O=ba(),Oe=R(O),ke=e=>{var t=pa();Wr(t,()=>r().prompt,!0),k(t),B(()=>Q(t,`id`,q(de))),X(e,t)};Z(Oe,e=>{r()?.prompt&&e(ke)});var Ae=z(Oe,2),je=e=>{var t=ga(),n=R(t),r=R(n),i=R(r),a=R(i),s=e=>{X(e,ma())},c=e=>{X(e,ha())};Z(a,e=>{q(g)?e(s):e(c,-1)}),k(i);var l=sn(z(i,2),!0);k(r),k(n),di(n,e=>I(o,e),()=>q(o)),k(t),B(()=>{Q(n,`aria-pressed`,q(g)),Dr(l,q(g)?q(ue).hideCorrectAnswer:q(ue).showCorrectAnswer)}),X(e,t)};Z(Ae,e=>{q(_)&&e(je)});var Me=z(Ae,2);{let e=M(()=>!!r()?.hasAudio),t=M(()=>r()?.audioUrl),n=M(()=>!!r()?.autoplayAudioEnabled),i=M(()=>r()?.locale);Ai(Me,{get hasAudio(){return q(e)},get audioUrl(){return q(t)},get useFeatureButtonAudio(){return q(C)},get autoplayEnabled(){return q(n)},get featureAudioSkin(){return q(T)},get uiText(){return q(ue)},get locale(){return q(i)},onaudiostarted:De,onaudioended:E})}var Ne=z(Me,2),Pe=e=>{var t=_a();Wr(t,()=>r().sentenceHtml,!0),k(t),B(()=>Q(t,`aria-describedby`,q(ve))),X(e,t)};Z(Ne,e=>{r()?.sentenceHtml&&e(Pe)});var Fe=z(Ne,2),Ie=e=>{var t=va(),n=R(t);Wr(n,()=>q(Se).before);var r=z(n);Ii(r,{get choiceMode(){return q(ne)},get displayChoice(){return q(oe)},get displayChoiceLabelHtml(){return q(se)},get isStandalone(){return q(b)},get blankWidth(){return q(w).blankWidth},get blankBorderWidth(){return q(w).blankBorderWidth},get ariaLabel(){return q(ue).selectedAnswerInSentence}}),Wr(z(r),()=>q(Se).after),k(t),B(()=>Q(t,`aria-describedby`,q(ve))),X(e,t)};Z(Fe,e=>{q(ee)||e(Ie)});var Le=z(Fe,2),Re=e=>{var t=ya(),n=sn(t,!0);B(()=>{Q(t,`id`,q(pe)),Dr(n,q(ce))}),X(e,t)};Z(Le,e=>{q(ce)&&e(Re)});var ze=z(Le,2),Be=sn(ze,!0),Ve=z(ze,2),He=R(Ve),Ue=sn(He,!0),We=z(He,2);return Rr(We,21,()=>q(te),e=>e.id,(e,t)=>{{let n=M(()=>q(ae)===q(t).id),i=M(()=>!!r()?.disabled),a=M(()=>q(le).get(q(t).id));Gi(e,{get choice(){return q(t)},get choiceMode(){return q(ne)},get isHorizontal(){return q(x)},get isSelected(){return q(n)},get isDisabled(){return q(i)},get correctness(){return q(a)},get isEvaluateMode(){return q(d)},get instanceId(){return l},get radioGroupName(){return q(ie)}})}}),k(We),di(We,e=>I(s,e),()=>q(s)),k(Ve),k(O),di(O,e=>I(c,e),()=>q(c)),B(e=>{Zr(O,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${q(v)} ${q(xe)} ${q(S)?`has-inline-audio`:``}`,`svelte-6wlbb4`),Q(O,`lang`,q(ye)),$r(O,q(w).rootStyle),Q(ze,`id`,q(me)),Dr(Be,q(ue).blankPreSelectionHint),Ve.disabled=r()?.disabled,Q(He,`id`,q(fe)),Dr(Ue,q(he)),Zr(We,1,`pie-choices ${q(x)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),Q(We,`aria-labelledby`,q(ge)),Q(We,`aria-label`,q(_e)),Q(We,`aria-describedby`,e)},[()=>[q(me),q(ce)?q(pe):void 0].filter(Boolean).join(` `)]),X(e,O),Je(D)}_i(Sa,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function Ca(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var wa=Sa.element,Ta=class extends wa{_internalSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new vi(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new yi(this.tagName.toLowerCase(),this._isComplete()))};set model(e){this._model=e,this.audioComplete=!1,super.model=e,this._dispatchModelSet()}get model(){return this._model}set session(e){this._internalSession=e,super.session=e,this._dispatchSessionChanged()}get session(){return this._internalSession}set options(e){this._options=e,super.options=e}get options(){return this._options}onSessionChange=e=>{this._internalSession=e,super.session=e,this._dispatchSessionChanged()};onAudioStarted=()=>{this._internalSession={...this._internalSession||{},audioStartTime:Date.now()}};onAudioEnded=()=>{this.audioComplete=!0,this._internalSession={...this._internalSession||{},audioEndTime:Date.now()},this._dispatchSessionChanged()};_isComplete=()=>Ca(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},Ea=`{{blank}}`,Da={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`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,transcriptLabel:`Transcript`,listenLabelEn:`Listen`,listenLabelEs:`Escuchar`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,listenSilentAltEs:`Escuchar. Repetir las instrucciones.`,listenPlayingAltEs:`Escuchar. Estas son las instrucciones.`},sentenceHtml:``,template:`<p>The answer is ${Ea}.</p>`,choiceMode:`text`,choices:[{id:`c1`,labelHtml:`<p>Option A</p>`},{id:`c2`,labelHtml:`<p>Option B</p>`},{id:`c3`,labelHtml:`<p>Option C</p>`}],correctChoiceId:`c2`,hasAudio:!1,autoplayAudioEnabled:!1,completeAudioEnabled:!1,audioUrl:``,audioTranscript:``,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},Oa=n({countBlankTokens:()=>Aa,createCorrectResponseSession:()=>Wa,createDefaultModel:()=>Pa,getCorrectness:()=>ja,getPartialScore:()=>Ma,model:()=>Ua,normalize:()=>Fa,normalizeSession:()=>Ia,outcome:()=>Na,validate:()=>Ga}),ka=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function Aa(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var ja=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},Ma=(e,t)=>!t||ka(t)||!t.choiceId?0:1,Na=(e,t,n)=>new Promise(r=>{if(!t||ka(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=Ia(t);let i=ja(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}.`]})}),Pa=(e={})=>({...Da.model,...e,layoutLimits:{...Xi,...e?.layoutLimits||{}}}),Fa=(e={})=>Pa(e),Ia=e=>({...e}),La=e=>!!e?.shuffle,Ra=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function za(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 Ba=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Va=(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]},Ha=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!La(e)||Ra(e,n||{}))return i;let a=Ba(t);if(a.length)return Va(i,a,`id`);let o=za(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},Ua=async(e,t,n,r)=>{let i=t||{},a=n||{},o=Fa(e),s=await Ha(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,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=ja(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},Wa=(e,t)=>new Promise(n=>{t.mode!==`evaluate`&&t.role===`instructor`?n({id:`1`,element:`mc-populated-blank`,choiceId:e?.correctChoiceId||``}):n(null)}),Ga=(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=Aa(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${Ea} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${Ea} placeholder`:i>1&&(n.template=`Template must contain only one ${Ea} 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.choiceImageMaxHeightRem.choiceImageMaxWidthRem.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},Ka={...Oa},qa=Ta;e.controller=Ka,e.default=qa})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});
|
|
567
|
+
}`};function wa(e,t){qe(t,!0),Gr(e,Ca);let n={answerChoices:`Answer choices`,selectedAnswerInSentence:`Selected answer in sentence`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`},r=$(t,`model`,7),i=$(t,`session`,7),a=F(``),o=F(null),s=F(null),c=F(null),l=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,u=M(()=>(r()?.mode||r()?.env?.mode||``).toString()),d=M(()=>q(u)===`evaluate`),f=M(()=>r()?.correctness),p=M(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:q(f)===`correct`),m=M(()=>q(f)===`correct`),h=M(()=>q(f)===`incorrect`),g=F(!1),_=M(()=>q(d)&&!q(p)&&!!r()?.correctChoiceId),v=M(()=>r()?.layoutProfile||``),y=M(()=>Zi({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:q(v),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),ee=M(()=>q(y).isAudioOnlyMode),b=M(()=>q(y).isBlankOnlyTemplate),x=M(()=>q(y).isHorizontalChoices),S=M(()=>q(y).hasInlineSentenceAudioLayout),C=M(()=>q(y).useFeatureButtonAudio),w=M(()=>ta({layoutProfile:q(v),isBlankOnlyTemplate:q(b),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets})),te=M(()=>Array.isArray(r()?.choices)?r().choices:[]),ne=M(()=>r()?.choiceMode||`text`),re=M(()=>i()?.choiceId||q(a)||``),ie=M(()=>`${l}-choice-group-${r()?.id||`1`}`),ae=M(()=>ia({selectedId:q(re),isEvaluateMode:q(d),showCorrectAnswer:q(g),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),oe=M(()=>q(te).find(e=>e.id===q(ae))),se=M(()=>String(q(oe)?.labelHtml||``)),ce=M(()=>aa({isEvaluateMode:q(d),showCorrectAnswer:q(g),isCorrect:q(m),isIncorrect:q(h),selectedId:q(re)})),le=M(()=>Ji({isEvaluateMode:q(d),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(q(re)||``),showCorrectAnswer:q(g)})),ue=M(()=>({...n,...r()?.uiText||{}})),de=M(()=>`${l}-prompt`),fe=M(()=>`${l}-choices-legend`),pe=M(()=>`${l}-result`),me=M(()=>`${l}-blank-hint`),he=M(()=>oa({prompt:r()?.prompt||``,legendMaxChars:q(w).legendMaxChars,answerChoicesLabel:q(ue).answerChoices})),ge=M(()=>r()?.prompt?q(de):void 0),_e=M(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||q(he)),ve=M(()=>r()?.prompt?q(de):void 0),ye=M(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),be=M(()=>ua(r()?.customType)),xe=M(()=>da(r()?.customType)),Se=M(()=>{let e=r()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let n=e.slice(0,t),i=e.slice(t+9);return q(v)===`inline_sentence`&&(n=`${n.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:n,after:i}});function Ce(e,t){wi({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function we(e){let t=e.target;if(!t.checked)return;let n=t.value;I(a,n,!0),Ce({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function Te(){q(_)&&I(g,!q(g))}yn(()=>{(!q(d)||q(p))&&I(g,!1)});function Ee(e){if(r()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let n=e.currentTarget,i=Array.from(n.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let T=M(()=>ra({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function De(){xi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function E(){xi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}yn(()=>{i()?.choiceId&&I(a,i().choiceId,!0)}),yn(()=>{let e=q(o);if(e)return e.addEventListener(`click`,Te),()=>e.removeEventListener(`click`,Te)}),yn(()=>{let e=q(s);if(!e)return;let t=e=>{e.target?.type===`radio`&&we(e)},n=e=>Ee(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),yn(()=>{ma(q(be))});var D={get model(){return r()},set model(e){r(e),P()},get session(){return i()},set session(e){i(e),P()}},O=Sa(),Oe=R(O),ke=e=>{var t=ha();Wr(t,()=>r().prompt,!0),k(t),B(()=>Q(t,`id`,q(de))),X(e,t)};Z(Oe,e=>{r()?.prompt&&e(ke)});var Ae=z(Oe,2),je=e=>{var t=va(),n=R(t),r=R(n),i=R(r),a=R(i),s=e=>{X(e,ga())},c=e=>{X(e,_a())};Z(a,e=>{q(g)?e(s):e(c,-1)}),k(i);var l=sn(z(i,2),!0);k(r),k(n),di(n,e=>I(o,e),()=>q(o)),k(t),B(()=>{Q(n,`aria-pressed`,q(g)),Dr(l,q(g)?q(ue).hideCorrectAnswer:q(ue).showCorrectAnswer)}),X(e,t)};Z(Ae,e=>{q(_)&&e(je)});var Me=z(Ae,2);{let e=M(()=>!!r()?.hasAudio),t=M(()=>r()?.audioUrl),n=M(()=>!!r()?.autoplayAudioEnabled),i=M(()=>r()?.locale);Mi(Me,{get hasAudio(){return q(e)},get audioUrl(){return q(t)},get useFeatureButtonAudio(){return q(C)},get autoplayEnabled(){return q(n)},get featureAudioSkin(){return q(T)},get uiText(){return q(ue)},get locale(){return q(i)},onaudiostarted:De,onaudioended:E})}var Ne=z(Me,2),Pe=e=>{var t=ya();Wr(t,()=>r().sentenceHtml,!0),k(t),B(()=>Q(t,`aria-describedby`,q(ve))),X(e,t)};Z(Ne,e=>{r()?.sentenceHtml&&e(Pe)});var Fe=z(Ne,2),Ie=e=>{var t=ba(),n=R(t);Wr(n,()=>q(Se).before);var r=z(n);Ri(r,{get choiceMode(){return q(ne)},get displayChoice(){return q(oe)},get displayChoiceLabelHtml(){return q(se)},get isStandalone(){return q(b)},get blankWidth(){return q(w).blankWidth},get blankBorderWidth(){return q(w).blankBorderWidth},get ariaLabel(){return q(ue).selectedAnswerInSentence}}),Wr(z(r),()=>q(Se).after),k(t),B(()=>Q(t,`aria-describedby`,q(ve))),X(e,t)};Z(Fe,e=>{q(ee)||e(Ie)});var Le=z(Fe,2),Re=e=>{var t=xa(),n=sn(t,!0);B(()=>{Q(t,`id`,q(pe)),Dr(n,q(ce))}),X(e,t)};Z(Le,e=>{q(ce)&&e(Re)});var ze=z(Le,2),Be=sn(ze,!0),Ve=z(ze,2),He=R(Ve),Ue=sn(He,!0),We=z(He,2);return Rr(We,21,()=>q(te),e=>e.id,(e,t)=>{{let n=M(()=>q(ae)===q(t).id),i=M(()=>!!r()?.disabled),a=M(()=>q(le).get(q(t).id));qi(e,{get choice(){return q(t)},get choiceMode(){return q(ne)},get isHorizontal(){return q(x)},get isSelected(){return q(n)},get isDisabled(){return q(i)},get correctness(){return q(a)},get isEvaluateMode(){return q(d)},get instanceId(){return l},get radioGroupName(){return q(ie)}})}}),k(We),di(We,e=>I(s,e),()=>q(s)),k(Ve),k(O),di(O,e=>I(c,e),()=>q(c)),B(e=>{Zr(O,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${q(v)} ${q(xe)} ${q(S)?`has-inline-audio`:``}`,`svelte-6wlbb4`),Q(O,`lang`,q(ye)),$r(O,q(w).rootStyle),Q(ze,`id`,q(me)),Dr(Be,q(ue).blankPreSelectionHint),Ve.disabled=r()?.disabled,Q(He,`id`,q(fe)),Dr(Ue,q(he)),Zr(We,1,`pie-choices ${q(x)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),Q(We,`aria-labelledby`,q(ge)),Q(We,`aria-label`,q(_e)),Q(We,`aria-describedby`,e)},[()=>[q(me),q(ce)?q(pe):void 0].filter(Boolean).join(` `)]),X(e,O),Je(D)}_i(wa,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function Ta(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var Ea=wa.element,Da=class extends Ea{_internalSession=null;_playerSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new vi(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new yi(this.tagName.toLowerCase(),this._isComplete()))};set model(e){this._model=e,this.audioComplete=!1,super.model=e,this._dispatchModelSet()}get model(){return this._model}set session(e){this._playerSession=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._writeSession(e),super.session=e,this._dispatchSessionChanged()};onAudioStarted=()=>{this._writeSession({...this._internalSession||{},audioStartTime:Date.now()})};onAudioEnded=()=>{this.audioComplete=!0,this._writeSession({...this._internalSession||{},audioEndTime:Date.now()}),this._dispatchSessionChanged()};_writeSession=e=>{Ci(this._playerSession,e),this._internalSession=e};_isComplete=()=>Ta(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},Oa=`{{blank}}`,ka={model:{id:`1`,element:`mc-populated-blank`,prompt:`<p><strong>Demo prompt</strong></p>`,promptEnabled:!0,interactionMode:`populate_blank`,layoutProfile:``,choiceLayout:``,layoutProfilePresets:{},layoutLimits:{...Qi},audioButtonSkin:null,audioButtonSkinsByLocale:{},uiText:{answerChoices:`Answer choices`,selectedAnswerInSentence:`blank`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,transcriptLabel:`Transcript`,listenLabelEn:`Listen`,listenLabelEs:`Escuchar`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,listenSilentAltEs:`Escuchar. Repetir las instrucciones.`,listenPlayingAltEs:`Escuchar. Estas son las instrucciones.`},sentenceHtml:``,template:`<p>The answer is ${Oa}.</p>`,choiceMode:`text`,choices:[{id:`c1`,labelHtml:`<p>Option A</p>`},{id:`c2`,labelHtml:`<p>Option B</p>`},{id:`c3`,labelHtml:`<p>Option C</p>`}],correctChoiceId:`c2`,hasAudio:!1,autoplayAudioEnabled:!1,completeAudioEnabled:!1,audioUrl:``,audioTranscript:``,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},Aa=n({countBlankTokens:()=>Ma,createCorrectResponseSession:()=>Ka,createDefaultModel:()=>Ia,getCorrectness:()=>Na,getPartialScore:()=>Pa,model:()=>Ga,normalize:()=>La,normalizeSession:()=>Ra,outcome:()=>Fa,validate:()=>qa}),ja=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function Ma(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var Na=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},Pa=(e,t)=>!t||ja(t)||!t.choiceId?0:1,Fa=(e,t,n)=>new Promise(r=>{if(!t||ja(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=Ra(t);let i=Na(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}.`]})}),Ia=(e={})=>({...ka.model,...e,layoutLimits:{...Qi,...e?.layoutLimits||{}}}),La=(e={})=>Ia(e),Ra=e=>({...e}),za=e=>!!e?.shuffle,Ba=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function Va(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 Ha=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Ua=(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]},Wa=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!za(e)||Ba(e,n||{}))return i;let a=Ha(t);if(a.length)return Ua(i,a,`id`);let o=Va(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},Ga=async(e,t,n,r)=>{let i=t||{},a=n||{},o=La(e),s=await Wa(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||{...Qi},audioButtonSkin:o.audioButtonSkin&&typeof o.audioButtonSkin==`object`?o.audioButtonSkin:null,audioButtonSkinsByLocale:o.audioButtonSkinsByLocale&&typeof o.audioButtonSkinsByLocale==`object`?o.audioButtonSkinsByLocale:{},uiText:o.uiText&&typeof o.uiText==`object`?o.uiText:{},sentenceHtml:o.sentenceHtml||null,template:o.template,choiceMode:o.choiceMode,choices:s,hasAudio:o.hasAudio,autoplayAudioEnabled:!!o.autoplayAudioEnabled,completeAudioEnabled:!!o.completeAudioEnabled,audioUrl:o.hasAudio?o.audioUrl:null,audioTranscript:o.hasAudio?o.audioTranscript:null,customType:o.customType||``,useFeatureButtonAudio:typeof o.useFeatureButtonAudio==`boolean`?o.useFeatureButtonAudio:void 0,locale:o.locale||``,disabled:a.mode!==`gather`,mode:a.mode};if(a.mode===`evaluate`){let e=Na(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},Ka=(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=Ma(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${Oa} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${Oa} placeholder`:i>1&&(n.template=`Template must contain only one ${Oa} 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.choiceImageMaxHeightRem.choiceImageMaxWidthRem.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},Ja={...Aa},Ya=Da;e.controller=Ja,e.default=Ya})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});
|
package/dist/index.js
CHANGED
|
@@ -5329,7 +5329,21 @@ function n(e, n = {}) {
|
|
|
5329
5329
|
}
|
|
5330
5330
|
return null;
|
|
5331
5331
|
}
|
|
5332
|
-
function r(
|
|
5332
|
+
function r(e) {
|
|
5333
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
5334
|
+
}
|
|
5335
|
+
function i(e, t) {
|
|
5336
|
+
if (e === t) return e;
|
|
5337
|
+
if (!r(e) || !r(t) || Object.isFrozen(e) || !Object.isExtensible(e)) return t;
|
|
5338
|
+
try {
|
|
5339
|
+
for (let n of Object.keys(e)) n in t || delete e[n];
|
|
5340
|
+
Object.assign(e, t);
|
|
5341
|
+
} catch {
|
|
5342
|
+
return t;
|
|
5343
|
+
}
|
|
5344
|
+
return e;
|
|
5345
|
+
}
|
|
5346
|
+
function a({ sourceEl: t, fallbackSelector: r, component: i, complete: a, session: o }) {
|
|
5333
5347
|
let s = n(t, { fallbackSelector: r });
|
|
5334
5348
|
return s ? typeof s.onSessionChange == "function" ? (s.onSessionChange(o), s) : (s.dispatchEvent(new t$1(i, a)), s) : null;
|
|
5335
5349
|
}
|
|
@@ -6429,7 +6443,7 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6429
6443
|
};
|
|
6430
6444
|
});
|
|
6431
6445
|
function emitSession(updatedSession, sourceEl) {
|
|
6432
|
-
|
|
6446
|
+
a({
|
|
6433
6447
|
sourceEl,
|
|
6434
6448
|
fallbackSelector: "mc-populated-blank",
|
|
6435
6449
|
component: "mc-populated-blank",
|
|
@@ -6749,6 +6763,16 @@ var McPopulatedBlankElement = class extends SvelteElementClass {
|
|
|
6749
6763
|
constructor(..._args) {
|
|
6750
6764
|
super(..._args);
|
|
6751
6765
|
_defineProperty(this, "_internalSession", null);
|
|
6766
|
+
_defineProperty(
|
|
6767
|
+
this,
|
|
6768
|
+
/**
|
|
6769
|
+
* The session object the player handed us. A player reads the learner's
|
|
6770
|
+
* response back off this object, so every update is written into it as well
|
|
6771
|
+
* as into the copy the component renders from.
|
|
6772
|
+
*/
|
|
6773
|
+
"_playerSession",
|
|
6774
|
+
null
|
|
6775
|
+
);
|
|
6752
6776
|
_defineProperty(this, "_model", null);
|
|
6753
6777
|
_defineProperty(this, "_options", null);
|
|
6754
6778
|
_defineProperty(this, "audioComplete", false);
|
|
@@ -6759,24 +6783,28 @@ var McPopulatedBlankElement = class extends SvelteElementClass {
|
|
|
6759
6783
|
this.dispatchEvent(new t$1(this.tagName.toLowerCase(), this._isComplete()));
|
|
6760
6784
|
});
|
|
6761
6785
|
_defineProperty(this, "onSessionChange", (updatedSession) => {
|
|
6762
|
-
this.
|
|
6786
|
+
this._writeSession(updatedSession);
|
|
6763
6787
|
super.session = updatedSession;
|
|
6764
6788
|
this._dispatchSessionChanged();
|
|
6765
6789
|
});
|
|
6766
6790
|
_defineProperty(this, "onAudioStarted", () => {
|
|
6767
|
-
this.
|
|
6791
|
+
this._writeSession({
|
|
6768
6792
|
...this._internalSession || {},
|
|
6769
6793
|
audioStartTime: Date.now()
|
|
6770
|
-
};
|
|
6794
|
+
});
|
|
6771
6795
|
});
|
|
6772
6796
|
_defineProperty(this, "onAudioEnded", () => {
|
|
6773
6797
|
this.audioComplete = true;
|
|
6774
|
-
this.
|
|
6798
|
+
this._writeSession({
|
|
6775
6799
|
...this._internalSession || {},
|
|
6776
6800
|
audioEndTime: Date.now()
|
|
6777
|
-
};
|
|
6801
|
+
});
|
|
6778
6802
|
this._dispatchSessionChanged();
|
|
6779
6803
|
});
|
|
6804
|
+
_defineProperty(this, "_writeSession", (updatedSession) => {
|
|
6805
|
+
i(this._playerSession, updatedSession);
|
|
6806
|
+
this._internalSession = updatedSession;
|
|
6807
|
+
});
|
|
6780
6808
|
_defineProperty(this, "_isComplete", () => {
|
|
6781
6809
|
return isComplete(this._model, this._internalSession, this.audioComplete);
|
|
6782
6810
|
});
|
|
@@ -6791,6 +6819,7 @@ var McPopulatedBlankElement = class extends SvelteElementClass {
|
|
|
6791
6819
|
return this._model;
|
|
6792
6820
|
}
|
|
6793
6821
|
set session(s) {
|
|
6822
|
+
this._playerSession = s;
|
|
6794
6823
|
this._internalSession = s;
|
|
6795
6824
|
super.session = s;
|
|
6796
6825
|
this._dispatchSessionChanged();
|