@citolab/qti-components 7.0.6-beta.0 → 7.0.6-beta.2
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/cdn/{chunk-QGKK4T2J.js → chunks/chunk-3V6LA7B3.js} +1 -1
- package/cdn/chunks/chunk-4UJBK6JO.js +1 -0
- package/cdn/chunks/chunk-4WXQYE2P.js +8 -0
- package/cdn/{chunk-L4TDHAKL.js → chunks/chunk-5BR5CJFH.js} +5 -5
- package/cdn/chunks/chunk-5GCSZ3CH.js +73 -0
- package/cdn/{chunk-BLKKKK6C.js → chunks/chunk-5P7CTN7Q.js} +1 -1
- package/cdn/{chunk-A536ZOJJ.js → chunks/chunk-6S4CDN3T.js} +1 -1
- package/cdn/chunks/chunk-7XYBFL7U.js +934 -0
- package/cdn/chunks/chunk-DZCKF45D.js +5 -0
- package/cdn/chunks/chunk-EHK76KRT.js +1 -0
- package/cdn/chunks/chunk-IAP2CEE7.js +1 -0
- package/cdn/chunks/chunk-IMJOPCFR.js +1 -0
- package/cdn/chunks/chunk-KWPDTFYH.js +1 -0
- package/cdn/{chunk-MFWSHIPH.js → chunks/chunk-L4CUWIE6.js} +1 -1
- package/cdn/{chunk-4DFVJE2A.js → chunks/chunk-LZZB4VGC.js} +1 -1
- package/cdn/{chunk-SQDSHH6N.js → chunks/chunk-MJMONWKB.js} +1 -1
- package/cdn/chunks/chunk-N5OHGRGG.js +8 -0
- package/cdn/chunks/chunk-NDHSIO2G.js +8 -0
- package/cdn/{chunk-ROXN2HIJ.js → chunks/chunk-PKT2SJQD.js} +1 -1
- package/cdn/chunks/chunk-QQCGUVEV.js +1 -0
- package/cdn/chunks/chunk-QV6I5NVQ.js +8 -0
- package/cdn/chunks/chunk-R33OODNX.js +1 -0
- package/cdn/chunks/chunk-RXKI3AO4.js +1 -0
- package/cdn/chunks/chunk-TQBDBMWL.js +5 -0
- package/cdn/chunks/chunk-X2KBNXRO.js +6 -0
- package/cdn/chunks/chunk-XUJ7TXHW.js +1 -0
- package/cdn/exports/expression-result.js +0 -0
- package/cdn/exports/interaction.interface.js +0 -0
- package/cdn/exports/interaction.js +1 -0
- package/cdn/exports/item.context.js +1 -0
- package/cdn/exports/qti-assessment-item.context.js +1 -0
- package/cdn/exports/qti-condition-expression.js +1 -0
- package/cdn/exports/qti-expression.js +1 -0
- package/cdn/exports/variables.js +0 -0
- package/cdn/index.global.js +7 -58
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-loader/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/styles.js +1 -1
- package/cdn/qti-test/components/test-component.abstract.js +1 -1
- package/cdn/qti-test/components/test-item-link.js +1 -1
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-view.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/cdn/qti-transformers/index.js +1 -1
- package/dist/{chunk-ANLIJZBL.js → chunks/chunk-3EU75IUF.js} +4 -4
- package/dist/chunks/chunk-3EU75IUF.js.map +1 -0
- package/dist/{chunk-CNQYM52B.js → chunks/chunk-4GNVYCBN.js} +65 -7
- package/dist/chunks/chunk-4GNVYCBN.js.map +1 -0
- package/dist/{chunk-UB5K44DB.js → chunks/chunk-4O5F7WV7.js} +1 -1
- package/dist/chunks/chunk-4O5F7WV7.js.map +1 -0
- package/dist/{chunk-OO6JSYLP.js → chunks/chunk-6JXR63MH.js} +4 -4
- package/dist/chunks/chunk-6JXR63MH.js.map +1 -0
- package/dist/{chunk-4FH7P7YI.js → chunks/chunk-7QMCKYDR.js} +4 -4
- package/dist/chunks/chunk-7QMCKYDR.js.map +1 -0
- package/dist/{chunk-3TFUBCJW.js → chunks/chunk-A24F75DB.js} +4 -4
- package/dist/chunks/chunk-A24F75DB.js.map +1 -0
- package/dist/chunks/chunk-BPHQLJWE.js +102 -0
- package/dist/chunks/chunk-BPHQLJWE.js.map +1 -0
- package/dist/chunks/chunk-D3RGDWKP.js +37 -0
- package/dist/chunks/chunk-D3RGDWKP.js.map +1 -0
- package/dist/chunks/chunk-DLUJN2FW.js +22 -0
- package/dist/chunks/chunk-DLUJN2FW.js.map +1 -0
- package/dist/{chunk-4YG2FPKK.js → chunks/chunk-ELDMXTUQ.js} +1 -1
- package/dist/chunks/chunk-ELDMXTUQ.js.map +1 -0
- package/dist/chunks/chunk-FV7HWK54.js +29 -0
- package/dist/chunks/chunk-FV7HWK54.js.map +1 -0
- package/dist/{chunk-6SG3NMKU.js → chunks/chunk-GSWZT6N2.js} +4 -4
- package/dist/chunks/chunk-GSWZT6N2.js.map +1 -0
- package/dist/chunks/chunk-H2JE6IVU.js +15 -0
- package/dist/{chunk-QYN5S4EM.js → chunks/chunk-HHVRU3AJ.js} +5 -5
- package/dist/chunks/chunk-HHVRU3AJ.js.map +1 -0
- package/dist/{chunk-2CHF3TMY.js → chunks/chunk-J2SHENRN.js} +1 -1
- package/dist/{chunk-UBZPSVSE.js → chunks/chunk-K6ATVWMP.js} +5131 -5341
- package/dist/chunks/chunk-K6ATVWMP.js.map +1 -0
- package/dist/chunks/chunk-KOEILLVS.js +8 -0
- package/dist/chunks/chunk-KOEILLVS.js.map +1 -0
- package/dist/{chunk-F7HTXGGH.js → chunks/chunk-KYAIMBP5.js} +3 -3
- package/dist/chunks/chunk-KYAIMBP5.js.map +1 -0
- package/dist/{chunk-F3NTI6TX.js → chunks/chunk-UFYWCLXF.js} +1 -1
- package/dist/chunks/chunk-UFYWCLXF.js.map +1 -0
- package/dist/chunks/chunk-UN2IFSGC.js +1 -0
- package/dist/{chunk-2OA7E3E7.js → chunks/chunk-XDMSEAYC.js} +1 -1
- package/dist/chunks/chunk-XDMSEAYC.js.map +1 -0
- package/dist/chunks/chunk-XSI6FXGD.js +19 -0
- package/dist/chunks/chunk-XSI6FXGD.js.map +1 -0
- package/dist/chunks/chunk-ZPNJ2HP5.js +71 -0
- package/dist/chunks/chunk-ZPNJ2HP5.js.map +1 -0
- package/dist/exports/expression-result.d.ts +19 -0
- package/dist/exports/expression-result.js +1 -0
- package/dist/exports/expression-result.js.map +1 -0
- package/dist/exports/interaction.d.ts +23 -0
- package/dist/exports/interaction.interface.d.ts +13 -0
- package/dist/exports/interaction.interface.js +1 -0
- package/dist/exports/interaction.interface.js.map +1 -0
- package/dist/exports/interaction.js +8 -0
- package/dist/exports/interaction.js.map +1 -0
- package/dist/exports/item.context.d.ts +12 -0
- package/dist/exports/item.context.js +8 -0
- package/dist/exports/item.context.js.map +1 -0
- package/dist/exports/qti-assessment-item.context.d.ts +10 -0
- package/dist/exports/qti-assessment-item.context.js +8 -0
- package/dist/exports/qti-assessment-item.context.js.map +1 -0
- package/dist/exports/qti-condition-expression.d.ts +13 -0
- package/dist/exports/qti-condition-expression.js +10 -0
- package/dist/exports/qti-condition-expression.js.map +1 -0
- package/dist/exports/qti-expression.d.ts +21 -0
- package/dist/exports/qti-expression.js +9 -0
- package/dist/exports/qti-expression.js.map +1 -0
- package/dist/exports/variables.d.ts +3 -0
- package/dist/exports/variables.js +1 -0
- package/dist/exports/variables.js.map +1 -0
- package/dist/index.d.ts +12 -3
- package/dist/index.js +35 -28
- package/dist/qti-components/index.d.ts +36 -9
- package/dist/qti-components/index.js +10 -16
- package/dist/qti-components-jsx.d.ts +328 -623
- package/dist/qti-item/core/index.js +5 -5
- package/dist/qti-loader/index.d.ts +7 -1
- package/dist/qti-loader/index.js +5 -23
- package/dist/qti-loader/index.js.map +1 -1
- package/dist/{qti-simple-choice-DxWcdKHi.d.ts → qti-response-declaration-DAeBp8HH.d.ts} +463 -613
- package/dist/qti-test/components/index.d.ts +8 -2
- package/dist/qti-test/components/index.js +12 -11
- package/dist/qti-test/components/styles.js +2 -2
- package/dist/qti-test/components/test-component.abstract.d.ts +8 -2
- package/dist/qti-test/components/test-component.abstract.js +5 -4
- package/dist/qti-test/components/test-item-link.d.ts +8 -2
- package/dist/qti-test/components/test-item-link.js +7 -6
- package/dist/qti-test/components/test-next.d.ts +8 -2
- package/dist/qti-test/components/test-next.js +7 -6
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +8 -2
- package/dist/qti-test/components/test-paging-buttons-stamp.js +6 -5
- package/dist/qti-test/components/test-prev.d.ts +8 -2
- package/dist/qti-test/components/test-prev.js +7 -6
- package/dist/qti-test/components/test-view.d.ts +8 -2
- package/dist/qti-test/components/test-view.js +6 -5
- package/dist/qti-test/core/index.d.ts +15 -4
- package/dist/qti-test/core/index.js +6 -6
- package/dist/qti-transformers/index.js +2 -2
- package/dist/{test.context-DbSTxKk_.d.ts → test.context-CaENAJNk.d.ts} +4 -2
- package/dist/variables-cO3DzqJy.d.ts +33 -0
- package/dist/vscode.html-custom-data.json +208 -275
- package/package.json +14 -20
- package/cdn/chunk-4I75QSIL.js +0 -8
- package/cdn/chunk-5WCOPF7O.js +0 -73
- package/cdn/chunk-DC2R556M.js +0 -5
- package/cdn/chunk-GALSGMIP.js +0 -5
- package/cdn/chunk-KYOTSBCX.js +0 -1
- package/cdn/chunk-T4A5AZCI.js +0 -939
- package/cdn/chunk-VI2WKTN4.js +0 -1
- package/cdn/qti-components/index.global.js +0 -226
- package/cdn/qti-item/core/index.global.js +0 -149
- package/cdn/qti-loader/index.global.js +0 -1
- package/cdn/qti-test/components/index.global.js +0 -207
- package/cdn/qti-test/components/styles.global.js +0 -44
- package/cdn/qti-test/components/test-component.abstract.global.js +0 -170
- package/cdn/qti-test/components/test-item-link.global.js +0 -170
- package/cdn/qti-test/components/test-next.global.js +0 -170
- package/cdn/qti-test/components/test-next.spec.css +0 -1
- package/cdn/qti-test/components/test-next.spec.global.js +0 -64
- package/cdn/qti-test/components/test-next.spec.js +0 -713
- package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +0 -207
- package/cdn/qti-test/components/test-prev.global.js +0 -170
- package/cdn/qti-test/components/test-view.global.js +0 -170
- package/cdn/qti-test/core/index.global.js +0 -205
- package/cdn/qti-transformers/index.global.js +0 -1
- package/dist/chunk-2OA7E3E7.js.map +0 -1
- package/dist/chunk-3TFUBCJW.js.map +0 -1
- package/dist/chunk-44VE5POH.js +0 -55
- package/dist/chunk-4FH7P7YI.js.map +0 -1
- package/dist/chunk-4YG2FPKK.js.map +0 -1
- package/dist/chunk-6SG3NMKU.js.map +0 -1
- package/dist/chunk-ANLIJZBL.js.map +0 -1
- package/dist/chunk-CNQYM52B.js.map +0 -1
- package/dist/chunk-F3NTI6TX.js.map +0 -1
- package/dist/chunk-F7HTXGGH.js.map +0 -1
- package/dist/chunk-MAC76UNI.js +0 -1
- package/dist/chunk-OO6JSYLP.js.map +0 -1
- package/dist/chunk-QYN5S4EM.js.map +0 -1
- package/dist/chunk-UB5K44DB.js.map +0 -1
- package/dist/chunk-UBZPSVSE.js.map +0 -1
- package/dist/qti-test/components/test-next.spec.css +0 -2481
- package/dist/qti-test/components/test-next.spec.css.map +0 -1
- package/dist/qti-test/components/test-next.spec.d.ts +0 -13
- package/dist/qti-test/components/test-next.spec.js +0 -45904
- package/dist/qti-test/components/test-next.spec.js.map +0 -1
- /package/cdn/{chunk-22HAPLRD.js → chunks/chunk-3GO57DNP.js} +0 -0
- /package/cdn/{chunk-LVW3MHTI.js → chunks/chunk-5FCXUJAG.js} +0 -0
- /package/cdn/{chunk-IXSX4SJX.js → chunks/chunk-6MCYE7P5.js} +0 -0
- /package/cdn/{chunk-M6AATWPS.js → chunks/chunk-FRS2J3OS.js} +0 -0
- /package/dist/{chunk-44VE5POH.js.map → chunks/chunk-H2JE6IVU.js.map} +0 -0
- /package/dist/{chunk-2CHF3TMY.js.map → chunks/chunk-J2SHENRN.js.map} +0 -0
- /package/dist/{chunk-MAC76UNI.js.map → chunks/chunk-UN2IFSGC.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as r}from"./chunk-IMJOPCFR.js";import{b as m,c as o}from"./chunk-L4CUWIE6.js";import{a as l}from"./chunk-5GCSZ3CH.js";import{a as i,d as n}from"./chunk-LZZB4VGC.js";import{a as s}from"./chunk-IAP2CEE7.js";var t=class extends r{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",e=>{e.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex+1].identifier)})}willUpdate(e){super.willUpdate(e),e.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex<0||this.itemIndex>=this.items.length-1)}render(){return n`<slot></slot>`}};t.styles=i`
|
|
2
2
|
:host {
|
|
3
3
|
${m};
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as o,c as r}from"./chunk-5FCXUJAG.js";var h=async s=>{let t=s.substring(0,s.lastIndexOf("/")),e=await o().load(`${s}`).then(n=>n.assessmentTest()),m=await r().load(`${t}/${e.href}`).then(n=>n.htmlDoc()),f=await r().load(`${t}/${e.href}`).then(n=>n.items()),a=`${t}/${e.href}`,c=`${t}/${e.href.substring(0,e.href.lastIndexOf("/"))}`;return{testHTMLDoc:m,testURI:c,testURL:a,items:f,testIdentifier:e.identifier}},d=async s=>i().load(s).then(t=>t.htmlDoc().firstElementChild);export{h as a,d as b};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as l}from"./chunk-IMJOPCFR.js";import{b as m,c as a}from"./chunk-L4CUWIE6.js";import{a as i,b as o}from"./chunk-5GCSZ3CH.js";import{a as s,d as r}from"./chunk-LZZB4VGC.js";import{a as e}from"./chunk-IAP2CEE7.js";var t=class extends l{constructor(){super();this.itemId=null;this.addEventListener("click",()=>this._requestItem(this.itemId))}render(){return r` <slot></slot> `}};t.styles=s`
|
|
2
|
+
:host {
|
|
3
|
+
${m};
|
|
4
|
+
}
|
|
5
|
+
:host([disabled]) {
|
|
6
|
+
${a};
|
|
7
|
+
}
|
|
8
|
+
`,e([o({type:String,attribute:"item-id"})],t.prototype,"itemId",2),t=e([i("test-item-link")],t);export{t as a};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{h as l}from"./chunk-
|
|
1
|
+
import{h as l}from"./chunk-LZZB4VGC.js";var d={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},T=e=>(...t)=>({_$litDirective$:e,values:t}),A=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this._$Ct=t,this._$AM=s,this._$Ci=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};var{I:m}=l,D=e=>e===null||typeof e!="object"&&typeof e!="function";var p=e=>e.strings===void 0,h=()=>document.createComment(""),E=(e,t,s)=>{let i=e._$AA.parentNode,o=t===void 0?e._$AB:t._$AA;if(s===void 0){let r=i.insertBefore(h(),o),_=i.insertBefore(h(),o);s=new m(r,_,e,e.options)}else{let r=s._$AB.nextSibling,_=s._$AM,a=_!==e;if(a){let $;s._$AQ?.(e),s._$AM=e,s._$AP!==void 0&&($=e._$AU)!==_._$AU&&s._$AP($)}if(r!==o||a){let $=s._$AA;for(;$!==r;){let v=$.nextSibling;i.insertBefore($,o),$=v}}}return s},N=(e,t,s=e)=>(e._$AI(t,s),e),C={},B=(e,t=C)=>e._$AH=t,H=e=>e._$AH,R=e=>{e._$AP?.(!1,!0);let t=e._$AA,s=e._$AB.nextSibling;for(;t!==s;){let i=t.nextSibling;t.remove(),t=i}};var n=(e,t)=>{let s=e._$AN;if(s===void 0)return!1;for(let i of s)i._$AO?.(t,!1),n(i,t);return!0},c=e=>{let t,s;do{if((t=e._$AM)===void 0)break;s=t._$AN,s.delete(e),e=t}while(s?.size===0)},f=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),M(t)}};function P(e){this._$AN!==void 0?(c(this),this._$AM=e,f(this)):this._$AM=e}function y(e,t=!1,s=0){let i=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(i))for(let r=s;r<i.length;r++)n(i[r],!1),c(i[r]);else i!=null&&(n(i,!1),c(i));else n(this,e)}var M=e=>{e.type==d.CHILD&&(e._$AP??(e._$AP=y),e._$AQ??(e._$AQ=P))},u=class extends A{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),f(this),this.isConnected=t._$AU}_$AO(t,s=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),s&&(n(this,t),c(this))}setValue(t){if(p(this._$Ct))this._$Ct._$AI(t,this);else{let s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}};export{d as a,T as b,A as c,D as d,E as e,N as f,B as g,H as h,R as i,u as j};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
|
-
lit-html/node/directive
|
|
4
|
+
lit-html/node/directive.js:
|
|
5
5
|
(**
|
|
6
6
|
* @license
|
|
7
|
-
* Copyright
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
9
|
*)
|
|
10
10
|
|
|
11
|
-
lit-html/node/directive.js:
|
|
11
|
+
lit-html/node/directive-helpers.js:
|
|
12
12
|
(**
|
|
13
13
|
* @license
|
|
14
|
-
* Copyright
|
|
14
|
+
* Copyright 2020 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*)
|
|
17
17
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import{b as l,c as p}from"./chunk-LZZB4VGC.js";var y=e=>(r,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(e,r)}):customElements.define(e,r)};var f={attribute:!0,type:String,converter:l,reflect:!1,hasChanged:p},h=(e=f,r,t)=>{let{kind:s,metadata:i}=t,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),a.set(t.name,e),s==="accessor"){let{name:o}=t;return{set(c){let n=r.get.call(this);r.set.call(this,c),this.requestUpdate(o,n,e)},init(c){return c!==void 0&&this.P(o,void 0,e),c}}}if(s==="setter"){let{name:o}=t;return function(c){let n=this[o];r.call(this,c),this.requestUpdate(o,n,e)}}throw Error("Unsupported decorator location: "+s)};function d(e){return(r,t)=>typeof t=="object"?h(e,r,t):((s,i,a)=>{let o=i.hasOwnProperty(a);return i.constructor.createProperty(a,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,a):void 0})(e,r,t)}function v(e){return d({...e,state:!0,attribute:!1})}var u=(e,r,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof r!="object"&&Object.defineProperty(e,r,t),t);function w(e,r){return(t,s,i)=>{let a=o=>o.renderRoot?.querySelector(e)??null;if(r){let{get:o,set:c}=typeof s=="object"?t:i??(()=>{let n=Symbol();return{get(){return this[n]},set(m){this[n]=m}}})();return u(t,s,{get(){let n=o.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&c.call(this,n)),n}})}return u(t,s,{get(){return a(this)}})}}function D(e){return(r,t)=>{let{slot:s,selector:i}=e??{},a="slot"+(s?`[name=${s}]`:":not([name])");return u(r,t,{get(){let o=this.renderRoot?.querySelector(a),c=o?.assignedElements(e)??[];return i===void 0?c:c.filter(n=>n.matches(i))}})}}export{y as a,d as b,v as c,w as d,D as e};
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
@lit/reactive-element/node/decorators/custom-element.js:
|
|
5
|
+
(**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*)
|
|
10
|
+
|
|
11
|
+
@lit/reactive-element/node/decorators/property.js:
|
|
12
|
+
(**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*)
|
|
17
|
+
|
|
18
|
+
@lit/reactive-element/node/decorators/state.js:
|
|
19
|
+
(**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*)
|
|
24
|
+
|
|
25
|
+
@lit/reactive-element/node/decorators/event-options.js:
|
|
26
|
+
(**
|
|
27
|
+
* @license
|
|
28
|
+
* Copyright 2017 Google LLC
|
|
29
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
|
+
*)
|
|
31
|
+
|
|
32
|
+
@lit/reactive-element/node/decorators/base.js:
|
|
33
|
+
(**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2017 Google LLC
|
|
36
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
+
*)
|
|
38
|
+
|
|
39
|
+
@lit/reactive-element/node/decorators/query.js:
|
|
40
|
+
(**
|
|
41
|
+
* @license
|
|
42
|
+
* Copyright 2017 Google LLC
|
|
43
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
+
*)
|
|
45
|
+
|
|
46
|
+
@lit/reactive-element/node/decorators/query-all.js:
|
|
47
|
+
(**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright 2017 Google LLC
|
|
50
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
+
*)
|
|
52
|
+
|
|
53
|
+
@lit/reactive-element/node/decorators/query-async.js:
|
|
54
|
+
(**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright 2017 Google LLC
|
|
57
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
+
*)
|
|
59
|
+
|
|
60
|
+
@lit/reactive-element/node/decorators/query-assigned-elements.js:
|
|
61
|
+
(**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright 2021 Google LLC
|
|
64
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
+
*)
|
|
66
|
+
|
|
67
|
+
@lit/reactive-element/node/decorators/query-assigned-nodes.js:
|
|
68
|
+
(**
|
|
69
|
+
* @license
|
|
70
|
+
* Copyright 2017 Google LLC
|
|
71
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
+
*)
|
|
73
|
+
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-IMJOPCFR.js";import{a as l}from"./chunk-XUJ7TXHW.js";import{a as p,b as n,c as r}from"./chunk-5GCSZ3CH.js";import{d as a}from"./chunk-LZZB4VGC.js";import{a as i}from"./chunk-IAP2CEE7.js";var t=class extends s{constructor(){super(...arguments);this.label="view";this._handleViewOptionsChange=()=>{this.updateViewOptions()};this._viewOptions=t.DEFAULT_VIEW_OPTIONS}connectedCallback(){super.connectedCallback(),this.updateViewOptions()}updateViewOptions(){if(this.viewOptions){let e=this.viewOptions.split(",").map(o=>o.trim());this._viewOptions=e.filter(o=>t.DEFAULT_VIEW_OPTIONS.includes(o))}else this._viewOptions=t.DEFAULT_VIEW_OPTIONS}render(){return a`
|
|
2
2
|
<label part="label" for="viewSelect">${this.label}</label>
|
|
3
3
|
<select
|
|
4
4
|
part="select"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-IMJOPCFR.js";import{a as Y,b as L}from"./chunk-5GCSZ3CH.js";import{d as W,f as H,g as V,h as m}from"./chunk-LZZB4VGC.js";import{a as A,b as x}from"./chunk-IAP2CEE7.js";var b=["this"],j=["+","-","!"],X=["=","+","-","*","/","%","^","==","!=",">","<",">=","<=","||","&&","??","&","===","!==","|","|>"],G={"!":0,":":0,",":0,")":0,"]":0,"}":0,"|>":1,"?":2,"??":3,"||":4,"&&":5,"|":6,"^":7,"&":8,"!=":9,"==":9,"!==":9,"===":9,">=":10,">":10,"<=":10,"<":10,"+":11,"-":11,"%":12,"/":12,"*":12,"(":13,"[":13,".":13,"{":13},C=13;var ne=["==","!=","<=",">=","||","&&","??","|>"],se=["===","!=="],i;(function(t){t[t.STRING=1]="STRING",t[t.IDENTIFIER=2]="IDENTIFIER",t[t.DOT=3]="DOT",t[t.COMMA=4]="COMMA",t[t.COLON=5]="COLON",t[t.INTEGER=6]="INTEGER",t[t.DECIMAL=7]="DECIMAL",t[t.OPERATOR=8]="OPERATOR",t[t.GROUPER=9]="GROUPER",t[t.KEYWORD=10]="KEYWORD",t[t.ARROW=11]="ARROW"})(i||(i={}));var g=(t,e,r=0)=>({kind:t,value:e,precedence:r}),ie=t=>t===9||t===10||t===13||t===32,q=t=>t===95||t===36||(t&=-33,65<=t&&t<=90),ae=t=>q(t)||R(t),oe=t=>b.indexOf(t)!==-1,ue=t=>t===34||t===39,R=t=>48<=t&&t<=57,he=t=>t===43||t===45||t===42||t===47||t===33||t===38||t===37||t===60||t===61||t===62||t===63||t===94||t===124,ce=t=>t===40||t===41||t===91||t===93||t===123||t===125,le=t=>t.replace(/\\(.)/g,(e,r)=>{switch(r){case"n":return`
|
|
2
2
|
`;case"r":return"\r";case"t":return" ";case"b":return"\b";case"f":return"\f";default:return r}}),N=class{constructor(e){x(this,"_input");x(this,"_index",-1);x(this,"_tokenStart",0);x(this,"_next");this._input=e,this._advance()}nextToken(){for(;ie(this._next);)this._advance(!0);if(ue(this._next))return this._tokenizeString();if(q(this._next))return this._tokenizeIdentOrKeyword();if(R(this._next))return this._tokenizeNumber();if(this._next===46)return this._tokenizeDot();if(this._next===44)return this._tokenizeComma();if(this._next===58)return this._tokenizeColon();if(he(this._next))return this._tokenizeOperator();if(ce(this._next))return this._tokenizeGrouper();if(this._advance(),this._next!==void 0)throw new Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),e===!0&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){let r=this._input.substring(this._tokenStart,this._index+e);return e===0&&this._clearValue(),r}_clearValue(){this._tokenStart=this._index}_tokenizeString(){let e="unterminated string",r=this._next;for(this._advance(!0);this._next!==r;){if(this._next===void 0)throw new Error(e);if(this._next===92&&(this._advance(),this._next===void 0))throw new Error(e);this._advance()}let n=g(i.STRING,le(this._getValue()));return this._advance(),n}_tokenizeIdentOrKeyword(){do this._advance();while(ae(this._next));let e=this._getValue(),r=oe(e)?i.KEYWORD:i.IDENTIFIER;return g(r,e)}_tokenizeNumber(){do this._advance();while(R(this._next));return this._next===46?this._tokenizeDot():g(i.INTEGER,this._getValue())}_tokenizeDot(){return this._advance(),R(this._next)?this._tokenizeFraction():(this._clearValue(),g(i.DOT,".",C))}_tokenizeComma(){return this._advance(!0),g(i.COMMA,",")}_tokenizeColon(){return this._advance(!0),g(i.COLON,":")}_tokenizeFraction(){do this._advance();while(R(this._next));return g(i.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(se.indexOf(e)!==-1)this._advance(),this._advance();else{if(e=this._getValue(1),e==="=>")return this._advance(),g(i.ARROW,e);ne.indexOf(e)!==-1&&this._advance()}return e=this._getValue(),g(i.OPERATOR,e,G[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next),r=g(i.GROUPER,e,G[e]);return this._advance(!0),r}};var $=(t,e)=>new k(t,e).parse(),k=class{constructor(e,r){x(this,"_kind");x(this,"_tokenizer");x(this,"_ast");x(this,"_token");x(this,"_value");this._tokenizer=new N(e),this._ast=r}parse(){return this._advance(),this._parseExpression()}_advance(e,r){if(!this._matches(e,r))throw new Error(`Expected kind ${e} (${r}), was ${this._token?.kind} (${this._token?.value})`);let n=this._tokenizer.nextToken();this._token=n,this._kind=n?.kind,this._value=n?.value}_matches(e,r){return!(e&&this._kind!==e||r&&this._value!==r)}_parseExpression(){if(!this._token)return this._ast.empty();let e=this._parseUnary();return e===void 0?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,r){if(e===void 0)throw new Error("Expected left to be defined.");for(;this._token;)if(this._matches(i.GROUPER,"(")){let n=this._parseArguments();e=this._ast.invoke(e,void 0,n)}else if(this._matches(i.GROUPER,"[")){let n=this._parseIndex();e=this._ast.index(e,n)}else if(this._matches(i.DOT)){this._advance();let n=this._parseUnary();e=this._makeInvokeOrGetter(e,n)}else{if(this._matches(i.KEYWORD))break;if(this._matches(i.OPERATOR)&&this._token.precedence>=r)e=this._value==="?"?this._parseTernary(e):this._parseBinary(e,this._token);else break}return e}_makeInvokeOrGetter(e,r){if(r===void 0)throw new Error("expected identifier");if(r.type==="ID")return this._ast.getter(e,r.value);if(r.type==="Invoke"&&r.receiver.type==="ID"){let n=r.receiver;return this._ast.invoke(e,n.value,r.arguments)}else throw new Error(`expected identifier: ${r}`)}_parseBinary(e,r){if(X.indexOf(r.value)===-1)throw new Error(`unknown operator: ${r.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===i.OPERATOR||this._kind===i.DOT||this._kind===i.GROUPER)&&this._token.precedence>r.precedence;)n=this._parsePrecedence(n,this._token.precedence);return this._ast.binary(e,r.value,n)}_parseUnary(){if(this._matches(i.OPERATOR)){let e=this._value;if(this._advance(),e==="+"||e==="-"){if(this._matches(i.INTEGER))return this._parseInteger(e);if(this._matches(i.DECIMAL))return this._parseDecimal(e)}if(j.indexOf(e)===-1)throw new Error(`unexpected token: ${e}`);let r=this._parsePrecedence(this._parsePrimary(),C);return this._ast.unary(e,r)}return this._parsePrimary()}_parseTernary(e){this._advance(i.OPERATOR,"?");let r=this._parseExpression();this._advance(i.COLON);let n=this._parseExpression();return this._ast.ternary(e,r,n)}_parsePrimary(){switch(this._kind){case i.KEYWORD:let e=this._value;if(e==="this")return this._advance(),this._ast.id(e);throw b.indexOf(e)!==-1?new Error(`unexpected keyword: ${e}`):new Error(`unrecognized keyword: ${e}`);case i.IDENTIFIER:return this._parseInvokeOrIdentifier();case i.STRING:return this._parseString();case i.INTEGER:return this._parseInteger();case i.DECIMAL:return this._parseDecimal();case i.GROUPER:return this._value==="("?this._parseParenOrFunction():this._value==="{"?this._parseMap():this._value==="["?this._parseList():void 0;case i.COLON:throw new Error('unexpected token ":"');default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(i.GROUPER,"]"))break;e.push(this._parseExpression())}while(this._matches(i.COMMA));return this._advance(i.GROUPER,"]"),this._ast.list(e)}_parseMap(){let e={};do{if(this._advance(),this._matches(i.GROUPER,"}"))break;let r=this._value;(this._matches(i.STRING)||this._matches(i.IDENTIFIER))&&this._advance(),this._advance(i.COLON),e[r]=this._parseExpression()}while(this._matches(i.COMMA));return this._advance(i.GROUPER,"}"),this._ast.map(e)}_parseInvokeOrIdentifier(){let e=this._value;if(e==="true")return this._advance(),this._ast.literal(!0);if(e==="false")return this._advance(),this._ast.literal(!1);if(e==="null")return this._advance(),this._ast.literal(null);if(e==="undefined")return this._advance(),this._ast.literal(void 0);let r=this._parseIdentifier(),n=this._parseArguments();return n?this._ast.invoke(r,void 0,n):r}_parseIdentifier(){if(!this._matches(i.IDENTIFIER))throw new Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e)}_parseArguments(){if(!this._matches(i.GROUPER,"("))return;let e=[];do{if(this._advance(),this._matches(i.GROUPER,")"))break;let r=this._parseExpression();e.push(r)}while(this._matches(i.COMMA));return this._advance(i.GROUPER,")"),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(i.GROUPER,"]"),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(i.ARROW)){this._advance();let r=this._parseExpression(),n=e?.map(s=>s.value)??[];return this._ast.arrowFunction(n,r)}else return this._ast.paren(e[0])}_parseString(){let e=this._ast.literal(this._value);return this._advance(),e}_parseInteger(e=""){let r=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),r}_parseDecimal(e=""){let r=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),r}};var pe={"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"||":(t,e)=>t||e,"&&":(t,e)=>t&&e,"??":(t,e)=>t??e,"|":(t,e)=>e(t),"|>":(t,e)=>e(t)},_e={"+":t=>t,"-":t=>-t,"!":t=>!t},P=class{empty(){return{type:"Empty",evaluate(e){return e},getIds(e){return e}}}literal(e){return{type:"Literal",value:e,evaluate(r){return this.value},getIds(r){return r}}}id(e){return{type:"ID",value:e,evaluate(r){return this.value==="this"?r:r?.[this.value]},getIds(r){return r.push(this.value),r}}}unary(e,r){let n=_e[e];return{type:"Unary",operator:e,child:r,evaluate(s){return n(this.child.evaluate(s))},getIds(s){return this.child.getIds(s)}}}binary(e,r,n){let s=pe[r];return{type:"Binary",operator:r,left:e,right:n,evaluate(o){if(this.operator==="="){if(this.left.type!=="ID"&&this.left.type!=="Getter"&&this.left.type!=="Index")throw new Error(`Invalid assignment target: ${this.left}`);let a=this.right.evaluate(o),u,h;return this.left.type==="Getter"?(u=this.left.receiver.evaluate(o),h=this.left.name):this.left.type==="Index"?(u=this.left.receiver.evaluate(o),h=this.left.argument.evaluate(o)):this.left.type==="ID"&&(u=o,h=this.left.value),u===void 0?void 0:u[h]=a}return s(this.left.evaluate(o),this.right.evaluate(o))},getIds(o){return this.left.getIds(o),this.right.getIds(o),o}}}getter(e,r){return{type:"Getter",receiver:e,name:r,evaluate(n){return this.receiver.evaluate(n)?.[this.name]},getIds(n){return this.receiver.getIds(n),n}}}invoke(e,r,n){if(r!=null&&typeof r!="string")throw new Error("method not a string");return{type:"Invoke",receiver:e,method:r,arguments:n,evaluate(s){let o=this.receiver.evaluate(s),a=this.method?o:s?.this??s,u=this.method?o?.[r]:o,l=(this.arguments??[]).map(c=>c?.evaluate(s));return u?.apply?.(a,l)},getIds(s){return this.receiver.getIds(s),this.arguments?.forEach(o=>o?.getIds(s)),s}}}paren(e){return e}index(e,r){return{type:"Index",receiver:e,argument:r,evaluate(n){return this.receiver.evaluate(n)?.[this.argument.evaluate(n)]},getIds(n){return this.receiver.getIds(n),n}}}ternary(e,r,n){return{type:"Ternary",condition:e,trueExpr:r,falseExpr:n,evaluate(s){return this.condition.evaluate(s)?this.trueExpr.evaluate(s):this.falseExpr.evaluate(s)},getIds(s){return this.condition.getIds(s),this.trueExpr.getIds(s),this.falseExpr.getIds(s),s}}}map(e){return{type:"Map",entries:e,evaluate(r){let n={};if(e&&this.entries)for(let s in e){let o=this.entries[s];o&&(n[s]=o.evaluate(r))}return n},getIds(r){if(e&&this.entries)for(let n in e){let s=this.entries[n];s&&s.getIds(r)}return r}}}list(e){return{type:"List",items:e,evaluate(r){return this.items?.map(n=>n?.evaluate(r))},getIds(r){return this.items?.forEach(n=>n?.getIds(r)),r}}}arrowFunction(e,r){return{type:"ArrowFunction",params:e,body:r,evaluate(n){let s=this.params,o=this.body;return function(...a){let u=Object.fromEntries(s.map((l,c)=>[l,a[c]])),h=new Proxy(n??{},{set(l,c,p){return u.hasOwnProperty(c)&&(u[c]=p),l[c]=p},get(l,c){return u.hasOwnProperty(c)?u[c]:l[c]}});return o.evaluate(h)}},getIds(n){return this.body.getIds(n).filter(s=>!this.params.includes(s))}}}};var U=null,Q={boundAttributeSuffix:m.M,marker:m.P,markerMatch:m.A,HTML_RESULT:m.C,getTemplateHtml:m.L,overrideDirectiveResolve:(t,e)=>class extends t{_$AS(r,n){return e(this,n)}},patchDirectiveResolve:(t,e)=>{if(t.prototype._$AS!==e){U??(U=t.prototype._$AS.name);for(let r=t.prototype;r!==Object.prototype;r=Object.getPrototypeOf(r))if(r.hasOwnProperty(U))return void(r[U]=e);throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527")}},setDirectiveClass(t,e){t._$litDirective$=e},getAttributePartCommittedValue:(t,e,r)=>{let n=H;return t.j=s=>n=s,t._$AI(e,t,r),n},connectedDisconnectable:t=>({...t,_$AU:!0}),resolveDirective:m.V,AttributePart:m.H,PropertyPart:m.B,BooleanAttributePart:m.N,EventPart:m.U,ElementPart:m.F,TemplateInstance:m.R,isIterable:m.D,ChildPart:m.I};var{AttributePart:de,PropertyPart:fe,BooleanAttributePart:me,EventPart:ve}=Q,F=new P,z=new Map,J=t=>t.replace(/-(-|\w)/g,(e,r)=>r.toUpperCase()),D=(t,e)=>{let r=z.get(t);if(r===void 0){if(z.has(t))return;if(t=t.trim(),t.startsWith("{{")&&t.endsWith("}}")){let n=t.substring(2,t.length-2).trim();r=new k(n,F).parse(),z.set(t,r)}}return r?.evaluate(e)},Ee=(t,e,r,n)=>{let s=t.getAttribute("if");if(s!==null&&D(s,e))return S(t,e,r,n)},Z=/(?<!\\){{(.*?)(?:(?<!\\)}})/g,K=t=>/(?:\\{{)|(?:\\}})/g.test(t),T=t=>t.replaceAll(/\\{{/g,"{{").replace(/\\}}/g,"}}"),xe=(t,e,r,n)=>{let s=t.getAttribute("repeat");if(s!==null){let o=D(s,e);if(!o[Symbol.iterator])return V;let a=w(t),u=-1,h=[];for(let l of o){u++;let c=Object.create(e);c.item=l,c.index=u,c.this=e.this??e;let p=[];for(let f of a.parts){let d=f.update(c,r,n);f.type===1?p.push(...d):p.push(d)}let _={_$litType$:a,values:p};h.push(_)}return h}},te={if:Ee,repeat:xe},re=(t,e=te,r={},n)=>{let o=w(t).renderers;if(n){let u=w(n).renderers,h=o.super;h!==void 0?r={...o,...r,super:(l,c,p)=>(p={...u,...p,super:(_,f,d)=>S(n,_,f,d)},h(l,c,p))}:(r={...u,...o,...r},t=n)}else r={...o,...r};return a=>S(t,a,e,r)};var S=(t,e,r=te,n={})=>{let s=w(t),o=[];for(let u of s.parts){let h=u.update(e,r,n);u.type===1?o.push(...h):o.push(h)}return{_$litType$:s,values:o}},ee=new Map,w=t=>{let e=ee.get(t);return e===void 0&&ee.set(t,e=ge(t)),e},ge=t=>{let e={h:void 0,el:t.cloneNode(!0),parts:[],renderers:{}},r=document.createTreeWalker(e.el.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),n=r.currentNode,s=-1,o=[];for(;(n=r.nextNode())!==null;)if(n.nodeType===Node.ELEMENT_NODE){s++;let a=n;if(a.tagName==="TEMPLATE"){let h=a.getAttribute("type"),l=a.getAttribute("name"),c=a.getAttribute("call");if(c!==null||h!==null||l!==null){a.parentNode.insertBefore(document.createComment(""),a),o.push(a);let p;if(c!==null){let _=c.trim(),f=_.startsWith("{{")&&_.endsWith("}}");p=(d,E,v)=>{let y=a.getAttribute("data"),M=y===null?void 0:D(y,d);return(f?D(_,d):v[c])?.(M,E,v)}}else h!==null?p=(_,f,d)=>{let E=f[h];return E?.(a,_,f,d)}:(l==="super"?e.renderers.super=(_,f,d)=>{let E=d.super,v=w(a);return d={...d,...v.renderers},E(_,f,d)}:e.renderers[l]=(_,f,d)=>S(a,_,f,d),p=(_,f,d)=>{let E=d[l];return E?.(_,f,d)});e.parts.push({type:2,index:s,update:p});continue}}let u=a.getAttributeNames();for(let h of u){let l=a.getAttribute(h),c=l.split(Z);if(c.length===1){K(l)&&a.setAttribute(h,T(l));continue}a.removeAttribute(h);let p=h,_=de,f=h[0];f==="."?(p=J(h.substring(1)),_=fe):f==="?"?(p=h.substring(1),_=me):f==="@"&&(p=J(h.substring(1)),_=ve);let d=[T(c[0])],E=[];for(let v=1;v<c.length;v+=2){let y=c[v];E.push($(y,F)),d.push(T(c[v+1]))}e.parts.push({type:1,index:s,name:p,strings:d,ctor:_,update:(v,y,M)=>E.map(I=>I.evaluate(v))})}}else if(n.nodeType===Node.TEXT_NODE){let a=n,u=a.textContent,h=u.split(Z);h.length>1?a.textContent=T(h[0]):K(u)&&(a.textContent=T(u));for(let l=1;l<h.length;l+=2){let c=h[l],p=$(c,F);e.parts.push({type:2,index:++s,update:(f,d)=>p.evaluate(f)});let _=new Text(h[l+1].replace("\\{{","{{"));a.parentNode.insertBefore(_,a.nextSibling),a.parentNode.insertBefore(document.createComment(""),a.nextSibling),a=_,r.currentNode=_}}for(let a of o)a.remove();return e};var O=class extends B{constructor(){super();this.maxDisplayedItems=2;this.skipOnCategory="dep-informational";this._internals.ariaLabel="pagination"}createRenderRoot(){return this}render(){let r=this._testContext.items.reduce((u,h)=>{let c=h.category?.split(" ").includes(this.skipOnCategory)?"i":u.counter++;return u.result.push({...h,newIndex:c}),u},{counter:0,result:[]}).result,n=r.findIndex(u=>u.identifier===this._testContext.navItemId),s=Math.max(0,n-this.maxDisplayedItems),o=Math.min(r.length,n+this.maxDisplayedItems+1),a=r.slice(s,o);return W`
|
|
3
3
|
${a.map(u=>{let h=u.variables.find(I=>I.identifier=="SCORE"),l=parseInt(h?.value?.toString()),c=u.variables.find(I=>I.identifier==="completionStatus")?.value,p=u.category!==this.skipOnCategory?"regular":"info",_=this._testContext.navItemId===u.identifier,f=this._testContext.view==="scorer"&&p=="regular"&&l!==void 0&&!isNaN(l)&&l>0,d=this._testContext.view==="scorer"&&p=="regular"&&l!==void 0&&!isNaN(l)&&l<=0,E=this._testContext.view==="candidate"&&c==="completed"&&u.category!==this.skipOnCategory,v={...u,type:p,active:_,correct:f,incorrect:d,answered:E},y=this.firstElementChild;return re(y)({item:v})})}
|
|
4
4
|
`}};A([L({type:Number,attribute:"max-displayed-items"})],O.prototype,"maxDisplayedItems",2),A([L({type:String,attribute:"skip-on-category"})],O.prototype,"skipOnCategory",2),O=A([Y("test-paging-buttons-stamp")],O);export{O as a};
|