@epa-wg/custom-element-dist 0.0.21 → 0.0.22
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/README.md +4 -4
- package/coverage/coverage-final.json +15 -11
- package/coverage/index.html +25 -25
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +604 -421
- package/coverage/src/custom-element/custom-element1-1.js/coverage.svg +10 -0
- package/coverage/src/custom-element/custom-element1-1.js.html +2374 -0
- package/coverage/src/custom-element/custom-element1.js/coverage.svg +10 -0
- package/coverage/src/custom-element/custom-element1.js.html +2374 -0
- package/coverage/src/custom-element/http-request.js.html +10 -10
- package/coverage/src/custom-element/index.html +49 -19
- package/coverage/src/custom-element/local-storage.js.html +6 -6
- package/coverage/src/custom-element/location-element.js.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/{attributes.stories.ts.html → attributes.test.stories.ts.html} +51 -15
- package/coverage/src/stories/{css.stories.ts.html → css.test.stories.ts.html} +77 -17
- package/coverage/src/stories/{dom-merge.stories.ts.html → dom-merge.test.stories.ts.html} +60 -12
- package/coverage/src/stories/{external-template.stories.ts.html → external-template.test.stories.ts.html} +42 -12
- package/coverage/src/stories/form.test.stories.ts.html +658 -0
- package/coverage/src/stories/http-request.stories.ts.html +7 -7
- package/coverage/src/stories/index.html +71 -41
- package/coverage/src/stories/{local-storage.stories.ts.html → local-storage.test.stories.ts.html} +56 -20
- package/coverage/src/stories/{location-element.stories.ts.html → location-element.test.stories.ts.html} +53 -17
- package/coverage/src/stories/renderPlay.ts.html +12 -15
- package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/{slice-events.stories.ts.html → slice-events.test.stories.ts.html} +264 -15
- package/coverage/src/stories/slots.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/slots.test.stories.ts.html +739 -0
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-BISbI4SU.js +463 -0
- package/dist/custom-element-N-sWiqGK.cjs +53 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +2 -2
- package/dist/mockServiceWorker.js +1 -1
- package/package.json +4 -4
- package/public/mockServiceWorker.js +1 -1
- package/src/custom-element/custom-element.d.ts +4 -0
- package/src/custom-element/custom-element.js +103 -42
- package/src/custom-element/custom-element1-1.js +763 -0
- package/src/custom-element/custom-element1.js +763 -0
- package/src/custom-element/custom-element1.js0 +750 -0
- package/src/custom-element/custom-element2.js0 +759 -0
- package/src/custom-element/custom-element3.js0 +763 -0
- package/src/custom-element/demo/a.html +38 -41
- package/src/custom-element/demo/b.html +13 -0
- package/src/custom-element/demo/data-slices.html +32 -0
- package/src/custom-element/demo/form.html +193 -0
- package/src/custom-element/demo/s.xml +19 -14
- package/src/custom-element/demo/s.xslt +22 -38
- package/src/custom-element/demo/s1.xslt +60 -0
- package/src/custom-element/ide/customData-dce.json +14 -1
- package/src/custom-element/ide/web-types-dce.json +6 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +1 -0
- package/src/custom-element.test.ts +24 -8
- package/src/stories/{attributes.stories.ts → attributes.test.stories.ts} +19 -7
- package/src/stories/{css.stories.ts → css.test.stories.ts} +29 -9
- package/src/stories/{dom-merge.stories.ts → dom-merge.test.stories.ts} +19 -3
- package/src/stories/{external-template.stories.ts → external-template.test.stories.ts} +13 -3
- package/src/stories/form.test.stories.ts +191 -0
- package/src/stories/http-request.stories.ts +6 -6
- package/src/stories/http-request.test.ts +0 -9
- package/src/stories/{local-storage.stories.ts → local-storage.test.stories.ts} +24 -12
- package/src/stories/{location-element.stories.ts → location-element.test.stories.ts} +21 -9
- package/src/stories/renderPlay.ts +1 -2
- package/src/stories/{slice-events.stories.ts → slice-events.test.stories.ts} +88 -5
- package/src/stories/slots.test.stories.ts +218 -0
- package/storybook-static/assets/{Color-RQJUDNI5-C4yZhNbM.js → Color-PRSJMWNM-e4s261EJ.js} +1 -1
- package/storybook-static/assets/{Configure-C7d36rng.js → Configure-DWut7txe.js} +1 -1
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-CaXVGjCl.js +2 -0
- package/storybook-static/assets/WithTooltip-KJL26V4Q--B8vdnMi.js +1 -0
- package/storybook-static/assets/{attributes.stories-ZB0RTY1d.js → attributes.test.stories-IuwazrdL.js} +21 -21
- package/storybook-static/assets/css.test.stories-D9WaxrEv.js +96 -0
- package/storybook-static/assets/custom-element-BV8-hRQS.js +219 -0
- package/storybook-static/assets/{dom-merge.stories-CgHZUABU.js → dom-merge.test.stories-BhbNeum_.js} +5 -6
- package/storybook-static/assets/{entry-preview-CQqNFx4W.js → entry-preview-DrgzXgwT.js} +1 -1
- package/storybook-static/assets/{entry-preview-docs-CWgqLfd3.js → entry-preview-docs-Bxv0qQWs.js} +1 -1
- package/storybook-static/assets/{external-template.stories-DtSLMxvg.js → external-template.test.stories-Bpr_wxBo.js} +23 -24
- package/storybook-static/assets/form.test.stories-3tURbEdv.js +250 -0
- package/storybook-static/assets/{formatter-B5HCVTEV-tKeEfJA9.js → formatter-2WMMO6ZP-SJtgH3vM.js} +5 -5
- package/storybook-static/assets/http-request.stories-8K_qSs8C.js +300 -0
- package/storybook-static/assets/iframe-CM82WlGY.js +2 -0
- package/storybook-static/assets/index-CEZitmnt.js +548 -0
- package/storybook-static/assets/index-CVRyq5ci.js +27 -0
- package/storybook-static/assets/{index-DnEJ_bKa.js → index-D1MP-Zis.js} +1 -1
- package/storybook-static/assets/index-DNL-IEpS.js +1 -0
- package/storybook-static/assets/index-DXimoRZY.js +1 -0
- package/storybook-static/assets/index-DuIEV_9C.js +13 -0
- package/storybook-static/assets/{lit-element-B4_0akdT.js → lit-element-CenEXOuS.js} +2 -2
- package/storybook-static/assets/{local-storage.stories-BkO6djDz.js → local-storage.test.stories-CtisAQBB.js} +28 -24
- package/storybook-static/assets/{location-element.stories-DCIOUd0D.js → location-element.test.stories-5O_t_m4Y.js} +11 -11
- package/storybook-static/assets/preview-4Up_z4Em.js +7 -0
- package/storybook-static/assets/{preview-CkgAD_DE.js → preview-5Y0XiZgz.js} +2 -2
- package/storybook-static/assets/preview-BKCN0mOr.js +1 -0
- package/storybook-static/assets/preview-DRnyIGXK.js +48 -0
- package/storybook-static/assets/preview-FpHGYA1q.js +1 -0
- package/storybook-static/assets/{preview-PxUn-cIn.js → preview-TCN6m6T-.js} +1 -1
- package/storybook-static/assets/slice-events.test.stories-BSXCLIA5.js +231 -0
- package/storybook-static/assets/slots.test.stories-B1vqfHmN.js +214 -0
- package/storybook-static/assets/syntaxhighlighter-BP7B2CQK-BWFH_0wQ.js +1 -0
- package/storybook-static/iframe.html +153 -10
- package/storybook-static/index.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +35 -29
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +1 -1
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +5 -5
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +35 -35
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +18 -16
- package/storybook-static/sb-addons/links-1/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/WithTooltip-KJL26V4Q-5LS5AN27.js +1 -0
- package/storybook-static/sb-manager/{chunk-S4VOIVUE.js → chunk-B3YDJJJH.js} +9 -9
- package/storybook-static/sb-manager/{chunk-FEE35O7J.js → chunk-BLWCBWKL.js} +3 -3
- package/storybook-static/sb-manager/{chunk-XCO5HRLK.js → chunk-GUVK2GTO.js} +3 -3
- package/storybook-static/sb-manager/chunk-LFRML3ZV.js +186 -0
- package/storybook-static/sb-manager/chunk-MC7RAF2B.js +274 -0
- package/storybook-static/sb-manager/{chunk-XP3HGWTR.js → chunk-ZR5JZWHI.js} +1 -1
- package/storybook-static/sb-manager/{formatter-B5HCVTEV-7DCBOGO6.js → formatter-2WMMO6ZP-JI7RHVTW.js} +1 -1
- package/storybook-static/sb-manager/globals-module-info.js +1 -1
- package/storybook-static/sb-manager/globals-runtime.js +1 -1
- package/storybook-static/sb-manager/index.js +1 -1
- package/storybook-static/sb-manager/runtime.js +1 -1
- package/storybook-static/sb-manager/{syntaxhighlighter-JOJW2KGS-VF6EEVPI.js → syntaxhighlighter-BP7B2CQK-WOJYHKQR.js} +1 -1
- package/storybook-static/sb-preview/runtime.js +28 -11
- package/vite.config.js +5 -5
- package/dist/custom-element-B4v-KaIh.cjs +0 -53
- package/dist/custom-element-_g0GTup2.js +0 -436
- package/src/stories/attributes.test.ts +0 -14
- package/src/stories/css.test.ts +0 -12
- package/src/stories/dom-merge.test.ts +0 -12
- package/src/stories/external-template.test.ts +0 -12
- package/src/stories/local-storage.test.ts +0 -12
- package/src/stories/location-element.test.ts +0 -14
- package/src/stories/slice-events.test.ts +0 -12
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-BLMupvSb.js +0 -2
- package/storybook-static/assets/WithTooltip-Y7J54OF7-BAQSPSFk.js +0 -1
- package/storybook-static/assets/css.stories-CLSX-Xxd.js +0 -86
- package/storybook-static/assets/custom-element-BLZZ00dz.js +0 -53
- package/storybook-static/assets/http-request.stories-CUzlXO89.js +0 -300
- package/storybook-static/assets/iframe-gCvlWuoC.js +0 -2
- package/storybook-static/assets/index-CBQwM6ST.js +0 -508
- package/storybook-static/assets/index-CDavW7r9.js +0 -193
- package/storybook-static/assets/index-CQA5dlr6.js +0 -13
- package/storybook-static/assets/index-DgaNIR0t.js +0 -1
- package/storybook-static/assets/index-Dkj0J1ds.js +0 -1
- package/storybook-static/assets/preview-C6t8KBFr.js +0 -1
- package/storybook-static/assets/preview-CYD85dwb.js +0 -7
- package/storybook-static/assets/preview-D8LadFCz.js +0 -48
- package/storybook-static/assets/preview-DNpCpRPf.js +0 -1
- package/storybook-static/assets/slice-events.stories-DXKjXI37.js +0 -115
- package/storybook-static/assets/syntaxhighlighter-JOJW2KGS-C04pIVD3.js +0 -1
- package/storybook-static/sb-manager/WithTooltip-Y7J54OF7-CEHQ77YF.js +0 -1
- package/storybook-static/sb-manager/chunk-E3WK6ZOZ.js +0 -234
- package/storybook-static/sb-manager/chunk-E6ABNH5R.js +0 -183
- /package/coverage/src/stories/{attributes.stories.ts → attributes.test.stories.ts}/coverage.svg +0 -0
- /package/coverage/src/stories/{css.stories.ts → css.test.stories.ts}/coverage.svg +0 -0
- /package/coverage/src/stories/{dom-merge.stories.ts → dom-merge.test.stories.ts}/coverage.svg +0 -0
- /package/coverage/src/stories/{external-template.stories.ts → external-template.test.stories.ts}/coverage.svg +0 -0
- /package/coverage/src/stories/{local-storage.stories.ts → form.test.stories.ts}/coverage.svg +0 -0
- /package/coverage/src/stories/{location-element.stories.ts → local-storage.test.stories.ts}/coverage.svg +0 -0
- /package/coverage/src/stories/{slice-events.stories.ts → location-element.test.stories.ts}/coverage.svg +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import{w as u,e as n}from"./index-CDavW7r9.js";import"./custom-element-BLZZ00dz.js";const g={title:"",tag:"",style:"",slot:"",payload:""};function p(t){const{title:e,tag:o,style:s,slot:l,payload:y}={...g,...t};return`
|
|
2
|
-
<fieldset>
|
|
3
|
-
<legend>${e}</legend>
|
|
4
|
-
<custom-element ${o?`tag="${o}"`:""} >
|
|
5
|
-
<template>
|
|
6
|
-
<style>
|
|
7
|
-
${s}
|
|
8
|
-
</style>
|
|
9
|
-
<u><slot>${l}</slot></u>
|
|
10
|
-
</template>
|
|
11
|
-
</custom-element>
|
|
12
|
-
${y}
|
|
13
|
-
</fieldset>
|
|
14
|
-
`}const h={title:"Css",render:p},d='<b style="color:green">green</b>',i='<i style="color:red">red</i>',a={args:{title:`The default color should stay on this label, the message inside should be ${d}`,style:"color:green",slot:"text has to be green",payload:"<u>no tags</u>"},play:async({canvasElement:t})=>{const o=await u(t).findByText("text has to be green"),l=getComputedStyle(o).getPropertyValue("color");n(l).to.equal("rgb(0, 128, 0)")}},c={args:{title:`The default color should apply ${d} in all instances`,style:"color:green",slot:"text has to be green",tag:"dce-2",payload:'<u>2 instances:</u> <dce-2 id="dce21"></dce-2> * <dce-2 id="dce22"></dce-2>'},play:async({canvasElement:t})=>{await u(t).findByText("2 instances:");const e=o=>{const s=t.querySelector(o);return getComputedStyle(s).getPropertyValue("color")};n(e("legend")).to.not.equal(e("b")),n(e("legend")).to.not.equal(e("b")),n(e("#dce21 u")).to.equal(e("b")),n(e("#dce22 u")).to.equal(e("b"))}},r={args:{title:`${d} in instance style can be overridden in payload as ${i} in 1st instance`,style:"color:green",slot:"is green",tag:"dce-3",payload:` <u>should be</u> ${i}:<dce-3 id="dce32">
|
|
15
|
-
<template>
|
|
16
|
-
<style> color:red; </style>
|
|
17
|
-
<u>red</u>
|
|
18
|
-
</template>
|
|
19
|
-
</dce-3> <br/>
|
|
20
|
-
should be ${d}: <dce-3 id="dce31">green</dce-3> `},play:async({canvasElement:t})=>{await u(t).findByText("should be");const e=o=>{const s=t.querySelector(o);return getComputedStyle(s).getPropertyValue("color")};n(e("legend")).to.not.equal(e("b")),n(e("#dce31 u")).to.equal(e("b")),n(e("#dce32 u")).to.equal(e("i"))}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
21
|
-
args: {
|
|
22
|
-
title: \`The default color should stay on this label, the message inside should be \${GREEN}\`,
|
|
23
|
-
style: \`color:green\`,
|
|
24
|
-
slot: 'text has to be green',
|
|
25
|
-
payload: '<u>no tags</u>'
|
|
26
|
-
},
|
|
27
|
-
play: async ({
|
|
28
|
-
canvasElement
|
|
29
|
-
}) => {
|
|
30
|
-
const canvas = within(canvasElement);
|
|
31
|
-
const el = await canvas.findByText('text has to be green');
|
|
32
|
-
const st = getComputedStyle(el);
|
|
33
|
-
const color = st.getPropertyValue('color');
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
expect(color).to.equal('rgb(0, 128, 0)');
|
|
36
|
-
}
|
|
37
|
-
}`,...a.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
38
|
-
args: {
|
|
39
|
-
title: \`The default color should apply \${GREEN} in all instances\`,
|
|
40
|
-
style: \`color:green\`,
|
|
41
|
-
slot: 'text has to be green',
|
|
42
|
-
tag: 'dce-2',
|
|
43
|
-
payload: \`<u>2 instances:</u> <dce-2 id="dce21"></dce-2> * <dce-2 id="dce22"></dce-2>\`
|
|
44
|
-
},
|
|
45
|
-
play: async ({
|
|
46
|
-
canvasElement
|
|
47
|
-
}) => {
|
|
48
|
-
await within(canvasElement).findByText('2 instances:');
|
|
49
|
-
const color = (css: string) => {
|
|
50
|
-
const el = canvasElement.querySelector(css);
|
|
51
|
-
const st = getComputedStyle(el!);
|
|
52
|
-
return st.getPropertyValue('color');
|
|
53
|
-
};
|
|
54
|
-
expect(color('legend')).to.not.equal(color('b'));
|
|
55
|
-
expect(color('legend')).to.not.equal(color('b'));
|
|
56
|
-
expect(color('#dce21 u')).to.equal(color('b'));
|
|
57
|
-
expect(color('#dce22 u')).to.equal(color('b'));
|
|
58
|
-
}
|
|
59
|
-
}`,...c.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
60
|
-
args: {
|
|
61
|
-
title: \`\${GREEN} in instance style can be overridden in payload as \${RED} in 1st instance\`,
|
|
62
|
-
style: \`color:green\`,
|
|
63
|
-
slot: 'is green',
|
|
64
|
-
tag: 'dce-3',
|
|
65
|
-
payload: \` <u>should be</u> \${RED}:<dce-3 id="dce32">
|
|
66
|
-
<template>
|
|
67
|
-
<style> color:red; </style>
|
|
68
|
-
<u>red</u>
|
|
69
|
-
</template>
|
|
70
|
-
</dce-3> <br/>
|
|
71
|
-
should be \${GREEN}: <dce-3 id="dce31">green</dce-3> \`
|
|
72
|
-
},
|
|
73
|
-
play: async ({
|
|
74
|
-
canvasElement
|
|
75
|
-
}) => {
|
|
76
|
-
await within(canvasElement).findByText('should be');
|
|
77
|
-
const color = (css: string) => {
|
|
78
|
-
const el = canvasElement.querySelector(css);
|
|
79
|
-
const st = getComputedStyle(el!);
|
|
80
|
-
return st.getPropertyValue('color');
|
|
81
|
-
};
|
|
82
|
-
expect(color('legend')).to.not.equal(color('b'));
|
|
83
|
-
expect(color('#dce31 u')).to.equal(color('b'));
|
|
84
|
-
expect(color('#dce32 u')).to.equal(color('i'));
|
|
85
|
-
}
|
|
86
|
-
}`,...r.parameters?.docs?.source}}};const x=["StyleDoesNotLeak","StyleIn2Instances","OverrideInPayload"];export{r as OverrideInPayload,a as StyleDoesNotLeak,c as StyleIn2Instances,x as __namedExportsOrder,h as default};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const M="http://www.w3.org/1999/XSL/Transform",z="http://www.w3.org/1999/xhtml",W="http://exslt.org/common",f=(e,n)=>e.getAttribute?.(n),X=e=>e.nodeType===3,G=e=>typeof e=="string",Y=e=>e&&typeof e.nodeType=="number",E=(e,n="",t=document)=>(s=>(n&&s.append(w(t.ownerDocument||t,n)),s))((t.ownerDocument||t).createElement(e)),w=(e,n)=>(e.ownerDocument||e).createTextNode(n),O=e=>{for(;e.firstChild;)e.firstChild.remove();return e},R=e=>(e.getAttributeNames().map(n=>e.removeAttribute(n)),O(e)),J=e=>(e?.setAttribute("xmlns:xsl",M),e),K=e=>(e?.setAttribute("xmlns:xhtml",z),J(e)),H=(e,n)=>{const t=e.ownerDocument.createElementNS(e.namespaceURI,n);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);return t};function C(e){return new DOMParser().parseFromString(e,"application/xml")}function I(e){return new XMLSerializer().serializeToString(e)}function D(e,n,t,s){const l=p=>e.ownerDocument.createElement(p),h=((p,y,d)=>(y.append(d=l(p)),d))(n,e);return[...t].forEach(p=>h.append(s(p))),h}function Q(e){return e.slot||(e.setAttribute||(e=E("span",e.textContent.replaceAll(`
|
|
2
|
-
`,""))),e.setAttribute("slot","")),e}function j(e,n,t){const s=typeof e;if(s==="function")debugger;if(s==="string")return E(n,e,t);if(s==="number")return E(n,""+e,t);if(e instanceof Array){const o=E("array");return e.map(h=>o.append(j(h,n,t))),o}const l=E(n,"",t);for(let o in e)Y(e[o])||typeof e[o]=="function"||e[o]instanceof Window||(typeof e[o]!="object"?l.setAttribute(o,e[o]):l.append(j(e[o],o,t)));return l}function k(e){if(S(e,"*",n=>[...n.childNodes].filter(t=>t.nodeType===3).forEach(t=>{if(t.parentNode.localName==="style")return;const s=t.data.matchAll(/{([^}]*)}/g);if(s){let l=0,o=p=>w(t,p||""),h=[];if([...s].forEach(p=>{p.index>l&&h.push(o(p.input.substring(l,p.index)));const y=e.querySelector("value-of").cloneNode();y.setAttribute("select",p[1]),h.push(y),l=p.index+p[0].length}),l<t.data.length&&h.push(o(t.data.substring(l,t.data.length))),h.length){for(let p of h)n.insertBefore(p,t);n.removeChild(t)}}})),"all"in e){let n=1;for(let t of e.all)t.setAttribute&&!t.tagName.startsWith("xsl:")&&t.setAttribute("data-dce-id",""+n++)}return e}function Z(e,n="xsl:stylesheet"){if(e.tagName===n||e.documentElement?.tagName===n)return k(e);const t=C(`<xsl:stylesheet version="1.0" xmlns:xsl="${M}" xmlns:xhtml="${z}" xmlns:exsl="${W}" exclude-result-prefixes="exsl" >
|
|
3
|
-
<xsl:output method="xml" />
|
|
4
|
-
<xsl:template match="/"><dce-root xmlns="${z}"><xsl:apply-templates select="*"/></dce-root></xsl:template>
|
|
5
|
-
<xsl:template match="*[name()='template']"><xsl:apply-templates mode="sanitize" select="*|text()"/></xsl:template>
|
|
6
|
-
<xsl:template match="*"><xsl:apply-templates mode="sanitize" select="*|text()"/></xsl:template>
|
|
7
|
-
<xsl:template match="*[name()='svg']|*[name()='math']"><xsl:apply-templates mode="sanitize" select="."/></xsl:template>
|
|
8
|
-
<xsl:template mode="sanitize" match="*[count(text())=1 and count(*)=0]"><xsl:copy><xsl:apply-templates mode="sanitize" select="@*"/><xsl:value-of select="text()"></xsl:value-of></xsl:copy></xsl:template>
|
|
9
|
-
<xsl:template mode="sanitize" match="xhtml:*[count(text())=1 and count(*)=0]"><xsl:element name="{local-name()}"><xsl:apply-templates mode="sanitize" select="@*"/><xsl:value-of select="text()"></xsl:value-of></xsl:element></xsl:template>
|
|
10
|
-
<xsl:template mode="sanitize" match="*|@*"><xsl:copy><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:copy></xsl:template>
|
|
11
|
-
<xsl:template mode="sanitize" match="text()[normalize-space(.) = '']"/>
|
|
12
|
-
<xsl:template mode="sanitize" match="text()"><dce-text><xsl:copy/></dce-text></xsl:template>
|
|
13
|
-
<xsl:template mode="sanitize" match="xsl:value-of|*[name()='slot']"><dce-text><xsl:copy><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:copy></dce-text></xsl:template>
|
|
14
|
-
<xsl:template mode="sanitize" match="xhtml:*"><xsl:element name="{local-name()}"><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:element></xsl:template>
|
|
15
|
-
</xsl:stylesheet>`),s=new XSLTProcessor,l=(a=>{S(a,"script",g=>g.remove());const i=a.content??a.firstElementChild?.content??a.body??a;re.forEach(g=>S(i,g,x=>ie(x,i)));const N=a.firstElementChild?.content||a.content,v=g=>{const x=C("<xhtml/>"),T=x.importNode(g,!0);return x.replaceChild(T,x.documentElement),K(T)};if(N){const g=E("div");return[...N.childNodes].map(x=>g.append(x.cloneNode(!0))),v(g)}return v(a.documentElement||a.body||a)})(e),o=C(`<xsl:stylesheet version="1.0"
|
|
16
|
-
xmlns:xsl="${M}"
|
|
17
|
-
xmlns:xhtml="${z}"
|
|
18
|
-
xmlns:dce="urn:schemas-epa-wg:dce"
|
|
19
|
-
xmlns:exsl="http://exslt.org/common"
|
|
20
|
-
exclude-result-prefixes="exsl"
|
|
21
|
-
>
|
|
22
|
-
<xsl:template match="ignore">
|
|
23
|
-
<xsl:choose>
|
|
24
|
-
<xsl:when test="//attr">{//attr}</xsl:when>
|
|
25
|
-
<xsl:otherwise>{def}</xsl:otherwise>
|
|
26
|
-
</xsl:choose><xsl:value-of select="."></xsl:value-of></xsl:template>
|
|
27
|
-
<xsl:template mode="payload" match="attributes"></xsl:template>
|
|
28
|
-
<xsl:template match="/">
|
|
29
|
-
<xsl:apply-templates mode="payload" select="/datadom/attributes"/>
|
|
30
|
-
</xsl:template>
|
|
31
|
-
<xsl:template name="slot" >
|
|
32
|
-
<xsl:param name="slotname" />
|
|
33
|
-
<xsl:param name="defaultvalue" />
|
|
34
|
-
<xsl:choose>
|
|
35
|
-
<xsl:when test="//payload/*[@slot=$slotname]">
|
|
36
|
-
<xsl:copy-of select="//payload/*[@slot=$slotname]"/>
|
|
37
|
-
</xsl:when>
|
|
38
|
-
<xsl:otherwise>
|
|
39
|
-
<xsl:copy-of select="$defaultvalue"/>
|
|
40
|
-
</xsl:otherwise>
|
|
41
|
-
</xsl:choose>
|
|
42
|
-
</xsl:template>
|
|
43
|
-
<xsl:variable name="js-injected-body">
|
|
44
|
-
<xsl:call-template name="slot" >
|
|
45
|
-
<xsl:with-param name="slotname" select="''"/>
|
|
46
|
-
<xsl:with-param name="defaultvalue"/>
|
|
47
|
-
</xsl:call-template>
|
|
48
|
-
</xsl:variable>
|
|
49
|
-
</xsl:stylesheet>`);s.importStylesheet(t);const h=s.transformToFragment(l,document),p=(a,i)=>a.querySelector(i),y=p(o,'template[mode="payload"]');if(!h)return console.error("transformation error",{xml:l.outerHTML,xsl:I(t)});const d=[];[...h.querySelectorAll("dce-root>attribute")].forEach(a=>{const i=H(a,"xsl:param"),N=f(a,"name");y.append(i);let v=f(i,"select")?.split("??");v||(v=["//"+N,`'${i.textContent}'`],R(i),i.setAttribute("name",N));let g;if(v?.length>1){i.removeAttribute("select");const x=p(o,'template[match="ignore"]>choose').cloneNode(!0);R(x.firstElementChild).append(w(x,"{"+v[0]+"}")),R(x.lastElementChild).append(w(x,"{"+v[1]+"}")),x.firstElementChild.setAttribute("test",v[0]),i.append(x),g=x.cloneNode(!0)}else g=H(a,"xsl:value-of");g.removeAttribute("name"),a.append(g),a.removeAttribute("select"),d.push(i)}),[...h.querySelectorAll("[value]")].filter(a=>a.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach(a=>{const i=f(a,"value");i&&a.setAttribute("value",oe(i))});for(const a of h.childNodes)y.append(o.importNode(a,!0));[...y.querySelectorAll("template")].forEach(a=>y.ownerDocument.documentElement.append(a));const $=p(o,'call-template[name="slot"]'),u=a=>{const i=$.cloneNode(!0),N=f(a,"name")||"";N&&i.firstElementChild.setAttribute("select",`'${N}'`);for(let v of a.childNodes)i.lastElementChild.append(v);return i};S(y,"slot",a=>a.parentNode.replaceChild(u(a),a));const c=k(o);return c.params=d,c}async function ee(e){return await new Promise((t,s)=>{const l=new XMLHttpRequest;l.open("GET",e),l.responseType="document",l.onload=()=>{l.readyState===l.DONE&&l.status===200&&t(l.responseXML||E("div",l.responseText)),s(l.statusText)},l.addEventListener("error",o=>s(o)),l.send()})}const te=(e,n)=>n.split("|").map(t=>t.trim()).map(t=>{if(t.includes("/")){const s=[],l=e.ownerDocument.evaluate(t,e);for(let o;o=l.iterateNext();)s.push(o);return s}return[...e.childNodes].find(s=>s.localName===t)||E(t)}).flat();function se(e,n,t,s){te(e,n).map(l=>{const o=e.ownerDocument,h=t.sliceEventSource,p=t.sliceElement,y=()=>[...l.childNodes].filter(d=>d.nodeType===3||d.localName==="value").map(d=>d.remove());if(h.getAttributeNames().map(d=>l.setAttribute(d,f(h,d))),[...l.childNodes].filter(d=>d.localName==="event").map(d=>d.remove()),t.type==="init"&&y(),l.append(j(t,"event",o)),p.hasAttribute("slice-value")){h.value===void 0?l.removeAttribute("value"):l.setAttribute("value",h.value);const d=B(f(p,"slice-value"),l);y(),l.append(w(o,d))}else{const d=h.value??f(p,"value");y(),d==null?[...l.childNodes].filter(A=>A.localName!=="event").map(A=>A.remove()):G(d)?l.append(w(o,d)):l.append(j(d,"value",l.ownerDocument))}})}function S(e,n,t){e.querySelectorAll&&[...e.querySelectorAll(n)].forEach(t)}const V=(e,n)=>(t=>e===t?null:t&&(t.querySelector(n)||V(t,n)))(e.getRootNode()),le=async(e,n)=>{if(!e||!e.trim())return[n];if(e.startsWith("#"))return(t=>{if(!t)return[];const s=t.querySelectorAll(e);if(s.length)return[...s];const l=t.getRootNode();return l===t?[]:V(l)})(n.parentElement);try{const t=await ee(e),s=new URL(e,location).hash;if(s){const l=t.querySelectorAll(s);return l.length?[...l]:[n]}return[t]}catch{return[n]}};function ne(e,n){if(X(e)){if(!X(n))debugger;return}for(let t of e.attributes)t.namespaceURI?n.setAttributeNS(t.namespaceURI,t.name,t.value):n.setAttribute(t.name,t.value),t.name==="value"&&(n.value=t.value)}function _(e,n=0){const t={};for(const s of e.childNodes){const l=f(s,"data-dce-id")||s.dceId||0;if(!t[l])l?t[l]=1:(t[l]=s.dceId=++n,s.setAttribute&&s.setAttribute("data-dce-id",s.dceId));else{const o=s.dceId=l+"-"+t[l]++;s.setAttribute&&s.setAttribute("data-dce-id",o)}s.childNodes.length&&_(s)}}function F(e,n){if(!n.length)return O(e);const t={};for(let s of e.childNodes)t[s.dceId],X(s)?(s.data.trim(),t[s.dceId||0]=s):t[f(s,"data-dce-id")||0]=s;for(let s of[...n]){const l=f(s,"data-dce-id")||s.dceId,o=t[l];o?(X(s)?o.nodeValue!==s.nodeValue&&(o.nodeValue=s.nodeValue):(ne(s,o),(o.childNodes.length||s.childNodes.length)&&F(o,s.childNodes)),delete t[l]):e.append(s)}for(let s of Object.values(t))s.remove()}function ae(e,n){return e.hasAttribute(n)||e.setAttribute(n,crypto.randomUUID()),e.getAttribute(n)}const oe=e=>[...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map(t=>`${t[1]}{${P(t[3])}}${t[4]}`).join(""),P=e=>{if(!e.trim())return e;const n=e.split("??"),t=n.shift(),s=P(n.join("??"));return n.length?`concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )`:e},B=(e,n)=>{e=P(e);const t=n.ownerDocument.evaluate(e,n);switch(t.resultType){case XPathResult.NUMBER_TYPE:return t.numberValue;case XPathResult.STRING_TYPE:return t.stringValue}let s="";for(let l;l=t.iterateNext();)s+=l.textContent;return s},re="stylesheet,transform,import,include,strip-space,preserve-space,output,key,decimal-format,namespace-alias,template,value-of,copy-of,number,apply-templates,apply-imports,for-each,sort,if,choose,when,otherwise,attribute-set,call-template,with-param,variable,param,text,processing-instruction,element,attribute,comment,copy,message,fallback".split(","),ie=(e,n)=>{const t=E("xsl:"+e.localName);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);if(e.parentElement)e.parentElement.replaceChild(t,e);else{const s=e.parentElement||n,l=[...s.childNodes];l.forEach((o,h)=>{o===e&&(l[h]=t)}),s.replaceChildren(...l)}};class ce extends HTMLElement{static observedAttributes=["src","tag","hidden"];async connectedCallback(){const n=await le(f(this,"src"),this),t=f(this,"tag"),s=t||"dce-"+crypto.randomUUID();for(const u of n)S(u.templateNode||u.content||u,"style",c=>{const a=c.closest("slot"),i=a?`slot[name="${a.name}"]`:"";c.innerHTML=`${s} ${i}{${c.innerHTML}}`,this.append(c)});const l=n.map(u=>Z(u)),o=l.map((u,c)=>(c=new XSLTProcessor,c.importStylesheet(u),c));Object.defineProperty(this,"xsltString",{get:()=>l.map(u=>I(u)).join(`
|
|
50
|
-
`)});const h=this,p=[...this.templateNode.querySelectorAll("[slice]")],y=p.map(u=>f(u,"slice")).filter(u=>!u.includes("/")).filter((u,c,a)=>a.indexOf(u)===c),d=l.reduce((u,c)=>(c.params&&u.push(...c.params),u),[]);class A extends HTMLElement{static get observedAttributes(){return d.map(c=>f(c,"name"))}#e=0;connectedCallback(){let c=this.childNodes;if(this.firstElementChild?.tagName==="TEMPLATE"){const m=this.firstElementChild;m.remove(),c=m.content.childNodes;for(const r of[...m.content.childNodes])if(r.localName==="style"){const b=ae(this,"data-dce-style");r.innerHTML=`${s}[data-dce-style="${b}"]{${r.innerHTML}}`,m.insertAdjacentElement("beforebegin",r)}else r.nodeType===1?m.insertAdjacentElement("beforebegin",r):r.nodeType===3&&m.insertAdjacentText("beforebegin",r.data)}const a=C("<datadom/>").documentElement,i=(m,r="")=>(b=>(r&&b.append(w(a,r)),b))(a.ownerDocument.createElement(m));D(a,"payload",c,Q),this.innerHTML="",D(a,"attributes",this.attributes,m=>i(m.nodeName,m.value)),D(a,"dataset",Object.keys(this.dataset),m=>i(m,this.dataset[m]));const N=D(a,"slice",y,m=>i(m,"")),v=m=>B(m,N);this.xml=a;const g=[],x=()=>{const m={};for(let r;r=g.pop();){const b=f(r.sliceElement,"slice");m[b]||(se(N,b,r),m[b]=r)}Object.keys(m).length!==0&&q()};let T;this.onSlice=m=>{m.stopPropagation?.(),m.sliceEventSource=m.currentTarget||m.target,g.push(m),T||(T=setTimeout(()=>{x(),T=0},10))};const q=this.transform=()=>{if(this.#e)debugger;this.#e=1,o.map((r,b)=>{const L=r.transformToFragment(a.ownerDocument,document);return L||console.error(`XSLT transformation error. xsl:
|
|
51
|
-
`,I(l[b]),`
|
|
52
|
-
xml:
|
|
53
|
-
`,I(a)),L}).map(r=>{r&&(_(r),F(this,r.childNodes))}),A.observedAttributes.map(r=>{let b=f(this.firstElementChild,r);b!==f(this,r)&&(this.setAttribute(r,b),this.#t(r,b))}),S(this,"[slice]",r=>{if(!r.dceInitialized){r.dceInitialized=1;const b=f(r,"slice-event");(b||"change").split(" ").forEach(L=>(r.localName==="slice"?r.parentElement:r).addEventListener(L,U=>{U.sliceElement=r,this.onSlice(U)})),(!b||b.includes("init"))&&(r.hasAttribute("slice-value")||r.hasAttribute("value")||r.value?this.onSlice({type:"init",target:r,sliceElement:r}):r.value=v(f(r,"slice")))}}),this.#e=0};q(),x()}#t(c,a){let i=this.xml.querySelector(`attributes>${c}`);i?R(i).append(w(i,a)):(i=E(c,a,this.xml),this.xml.querySelector("attributes").append(i))}attributeChangedCallback(c,a,i){!this.xml||this.#e||(this.#t(c,i),this.transform())}get dce(){return h}}const $=u=>{window.customElements.get(u)!==A&&window.customElements.define(u,A)};if(t)$(t);else{const u=s;this.setAttribute("tag",u),$(u);const c=document.createElement(u);this.getAttributeNames().forEach(a=>c.setAttribute(a,this.getAttribute(a))),c.append(...[...this.childNodes].filter(a=>a.localName!=="style")),this.append(c)}}get templateNode(){return this.firstElementChild?.tagName==="TEMPLATE"?this.firstElementChild.content:this}get dce(){return this}get xslt(){return C(this.xsltString)}}window.customElements.define("custom-element",ce);
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import{w as U,e as w}from"./index-CDavW7r9.js";import"./custom-element-BLZZ00dz.js";import{i as be,d as X,s as Q,R as xe,t as Te}from"./index-CQA5dlr6.js";const Ee=(t,e)=>t.getAttribute(e);class _e extends HTMLElement{static observedAttributes=["value","slice","url","method","header-accept"];get requestHeaders(){const e={};return[...this.attributes].filter(r=>r.name.startsWith("header-")).map(r=>e[r.name.substring(7)]=r.value),e}get requestProps(){const e={};return[...this.attributes].filter(r=>!r.name.startsWith("header-")).filter(r=>!r.name.startsWith("slice")).map(r=>e[r.name]=r.value),e}disconnectedCallback(){this.#e?.()}connectedCallback(){setTimeout(()=>this.fetch(),0)}#t="";#e=()=>{};async fetch(){if(!this.closest("body"))return;const e=Ee(this,"url")||"";if(!e)return this.#e?.(),this.value={};if(this.#t===e)return;this.#t=e;const r=new AbortController;this.#e=()=>{r.abort(this.localName+" disconnected"),this.#t=""};const n={...this.requestProps,headers:this.requestHeaders},a={request:n},l=()=>this.dispatchEvent(new Event("change"));this.value=a,l();const u=await fetch(e,{...this.requestProps,signal:r.signal,headers:this.requestHeaders}),d={headers:{}};if([...u.headers].map(([s,o])=>d.headers[s]=o),"ok,status,statusText,type,url,redirected".split(",").map(s=>d[s]=u[s]),a.response=d,l(),d.headers["content-type"]?.includes("json"))try{a.data=await u.json(),l()}catch{}}attributeChangedCallback(e,r,n){e==="url"&&r!==n&&(r&&this.#e?.(),n?setTimeout(()=>this.fetch(),10):(this.value={},setTimeout(()=>this.dispatchEvent(new Event("change")),10)))}}window.customElements.define("http-request",_e);function Ce(){be(typeof URL<"u",X.formatMessage(`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`))}function Pe(t,e){return t.toLowerCase()===e.toLowerCase()}function Re(t){return t<300?"#69AB32":t<400?"#F0BB4B":"#E95F5D"}function ke(){const t=new Date;return[t.getHours(),t.getMinutes(),t.getSeconds()].map(String).map(e=>e.slice(0,2)).map(e=>e.padStart(2,"0")).join(":")}async function qe(t){const r=await t.clone().text();return{url:new URL(t.url),method:t.method,headers:Object.fromEntries(t.headers.entries()),body:r}}var Se=Object.create,ie=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,ce=Object.getOwnPropertyNames,Oe=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty,le=(t,e)=>function(){return e||(0,t[ce(t)[0]])((e={exports:{}}).exports,e),e.exports},$e=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ce(e))!Be.call(t,a)&&a!==r&&ie(t,a,{get:()=>e[a],enumerable:!(n=Ae(e,a))||n.enumerable});return t},Ie=(t,e,r)=>(r=t!=null?Se(Oe(t)):{},$e(e||!t||!t.__esModule?ie(r,"default",{value:t,enumerable:!0}):r,t)),De=le({"node_modules/statuses/codes.json"(t,e){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}}),Ne=le({"node_modules/statuses/index.js"(t,e){var r=De();e.exports=d,d.message=r,d.code=n(r),d.codes=a(r),d.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},d.empty={204:!0,205:!0,304:!0},d.retry={502:!0,503:!0,504:!0};function n(s){var o={};return Object.keys(s).forEach(function(f){var c=s[f],h=Number(f);o[c.toLowerCase()]=h}),o}function a(s){return Object.keys(s).map(function(i){return Number(i)})}function l(s){var o=s.toLowerCase();if(!Object.prototype.hasOwnProperty.call(d.code,o))throw new Error('invalid status message: "'+s+'"');return d.code[o]}function u(s){if(!Object.prototype.hasOwnProperty.call(d.message,s))throw new Error("invalid status code: "+s);return d.message[s]}function d(s){if(typeof s=="number")return u(s);if(typeof s!="string")throw new TypeError("code must be a number or string");var o=parseInt(s,10);return isNaN(o)?l(s):u(o)}}}),je=Ie(Ne(),1),ue=je.default;/*! Bundled license information:
|
|
2
|
-
|
|
3
|
-
statuses/index.js:
|
|
4
|
-
(*!
|
|
5
|
-
* statuses
|
|
6
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
7
|
-
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
8
|
-
* MIT Licensed
|
|
9
|
-
*)
|
|
10
|
-
*/const{message:Le}=ue;async function Ue(t){const e=t.clone(),r=await e.text(),n=e.status||200,a=e.statusText||Le[n]||"OK";return{status:n,statusText:a,headers:Object.fromEntries(e.headers.entries()),body:r}}function He(t){for(var e=[],r=0;r<t.length;){var n=t[r];if(n==="*"||n==="+"||n==="?"){e.push({type:"MODIFIER",index:r,value:t[r++]});continue}if(n==="\\"){e.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(n==="{"){e.push({type:"OPEN",index:r,value:t[r++]});continue}if(n==="}"){e.push({type:"CLOSE",index:r,value:t[r++]});continue}if(n===":"){for(var a="",l=r+1;l<t.length;){var u=t.charCodeAt(l);if(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||u===95){a+=t[l++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));e.push({type:"NAME",index:r,value:a}),r=l;continue}if(n==="("){var d=1,s="",l=r+1;if(t[l]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(l));for(;l<t.length;){if(t[l]==="\\"){s+=t[l++]+t[l++];continue}if(t[l]===")"){if(d--,d===0){l++;break}}else if(t[l]==="("&&(d++,t[l+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(l));s+=t[l++]}if(d)throw new TypeError("Unbalanced pattern at ".concat(r));if(!s)throw new TypeError("Missing pattern at ".concat(r));e.push({type:"PATTERN",index:r,value:s}),r=l;continue}e.push({type:"CHAR",index:r,value:t[r++]})}return e.push({type:"END",index:r,value:""}),e}function Me(t,e){e===void 0&&(e={});for(var r=He(t),n=e.prefixes,a=n===void 0?"./":n,l="[^".concat(A(e.delimiter||"/#?"),"]+?"),u=[],d=0,s=0,o="",i=function(x){if(s<r.length&&r[s].type===x)return r[s++].value},f=function(x){var R=i(x);if(R!==void 0)return R;var k=r[s],z=k.type,F=k.index;throw new TypeError("Unexpected ".concat(z," at ").concat(F,", expected ").concat(x))},c=function(){for(var x="",R;R=i("CHAR")||i("ESCAPED_CHAR");)x+=R;return x};s<r.length;){var h=i("CHAR"),m=i("NAME"),p=i("PATTERN");if(m||p){var v=h||"";a.indexOf(v)===-1&&(o+=v,v=""),o&&(u.push(o),o=""),u.push({name:m||d++,prefix:v,suffix:"",pattern:p||l,modifier:i("MODIFIER")||""});continue}var y=h||i("ESCAPED_CHAR");if(y){o+=y;continue}o&&(u.push(o),o="");var b=i("OPEN");if(b){var v=c(),T=i("NAME")||"",g=i("PATTERN")||"",P=c();f("CLOSE"),u.push({name:T||(g?d++:""),pattern:T&&!g?l:g,prefix:v,suffix:P,modifier:i("MODIFIER")||""});continue}f("END")}return u}function ze(t,e){var r=[],n=pe(t,r,e);return Fe(n,r,e)}function Fe(t,e,r){r===void 0&&(r={});var n=r.decode,a=n===void 0?function(l){return l}:n;return function(l){var u=t.exec(l);if(!u)return!1;for(var d=u[0],s=u.index,o=Object.create(null),i=function(c){if(u[c]===void 0)return"continue";var h=e[c-1];h.modifier==="*"||h.modifier==="+"?o[h.name]=u[c].split(h.prefix+h.suffix).map(function(m){return a(m,h)}):o[h.name]=a(u[c],h)},f=1;f<u.length;f++)i(f);return{path:d,index:s,params:o}}}function A(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function de(t){return t&&t.sensitive?"":"i"}function Ve(t,e){if(!e)return t;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(t.source);a;)e.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(t.source);return t}function We(t,e,r){var n=t.map(function(a){return pe(a,e,r).source});return new RegExp("(?:".concat(n.join("|"),")"),de(r))}function Ge(t,e,r){return Je(Me(t,r),e,r)}function Je(t,e,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,l=r.start,u=l===void 0?!0:l,d=r.end,s=d===void 0?!0:d,o=r.encode,i=o===void 0?function(F){return F}:o,f=r.delimiter,c=f===void 0?"/#?":f,h=r.endsWith,m=h===void 0?"":h,p="[".concat(A(m),"]|$"),v="[".concat(A(c),"]"),y=u?"^":"",b=0,T=t;b<T.length;b++){var g=T[b];if(typeof g=="string")y+=A(i(g));else{var P=A(i(g.prefix)),x=A(i(g.suffix));if(g.pattern)if(e&&e.push(g),P||x)if(g.modifier==="+"||g.modifier==="*"){var R=g.modifier==="*"?"?":"";y+="(?:".concat(P,"((?:").concat(g.pattern,")(?:").concat(x).concat(P,"(?:").concat(g.pattern,"))*)").concat(x,")").concat(R)}else y+="(?:".concat(P,"(").concat(g.pattern,")").concat(x,")").concat(g.modifier);else g.modifier==="+"||g.modifier==="*"?y+="((?:".concat(g.pattern,")").concat(g.modifier,")"):y+="(".concat(g.pattern,")").concat(g.modifier);else y+="(?:".concat(P).concat(x,")").concat(g.modifier)}}if(s)a||(y+="".concat(v,"?")),y+=r.endsWith?"(?=".concat(p,")"):"$";else{var k=t[t.length-1],z=typeof k=="string"?v.indexOf(k[k.length-1])>-1:k===void 0;a||(y+="(?:".concat(v,"(?=").concat(p,"))?")),z||(y+="(?=".concat(v,"|").concat(p,")"))}return new RegExp(y,de(r))}function pe(t,e,r){return t instanceof RegExp?Ve(t,e):Array.isArray(t)?We(t,e,r):Ge(t,e,r)}new TextEncoder;function fe(){if(typeof navigator<"u"&&navigator.product==="ReactNative")return!0;if(typeof process<"u"){const t=process.type;return t==="renderer"||t==="worker"?!1:!!(process.versions&&process.versions.node)}return!1}var Xe=Object.defineProperty,Ke=(t,e)=>{for(var r in e)Xe(t,r,{get:e[r],enumerable:!0})},Qe={};Ke(Qe,{blue:()=>Ye,gray:()=>et,green:()=>rt,red:()=>tt,yellow:()=>Ze});function Ze(t){return`\x1B[33m${t}\x1B[0m`}function Ye(t){return`\x1B[34m${t}\x1B[0m`}function et(t){return`\x1B[90m${t}\x1B[0m`}function tt(t){return`\x1B[31m${t}\x1B[0m`}function rt(t){return`\x1B[32m${t}\x1B[0m`}fe();function nt(t,e=!0){return[e&&t.origin,t.pathname].filter(Boolean).join("")}const at=/[\?|#].*$/g;function st(t){return new URL(`/${t}`,"http://localhost").searchParams}function he(t){return t.replace(at,"")}function ot(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}function it(t,e){if(ot(t)||t.startsWith("*"))return t;const r=e||typeof document<"u"&&document.baseURI;return r?decodeURI(new URL(encodeURI(t),r).href):t}function ct(t,e){if(t instanceof RegExp)return t;const r=it(t,e);return he(r)}function lt(t){return t.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,(e,r,n)=>{const a="(.*)";return r?r.startsWith(":")?`${r}${n}`:`${r}${a}`:a}).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}function ut(t,e,r){const n=ct(e,r),a=typeof n=="string"?lt(n):n,l=nt(t),u=ze(a,{decode:decodeURIComponent})(l),d=u&&u.params||{};return{matches:u!==!1,params:d}}var dt=Object.create,me=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ve=Object.getOwnPropertyNames,ft=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty,mt=(t,e)=>function(){return e||(0,t[ve(t)[0]])((e={exports:{}}).exports,e),e.exports},vt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ve(e))!ht.call(t,a)&&a!==r&&me(t,a,{get:()=>e[a],enumerable:!(n=pt(e,a))||n.enumerable});return t},yt=(t,e,r)=>(r=t!=null?dt(ft(t)):{},vt(e||!t||!t.__esModule?me(r,"default",{value:t,enumerable:!0}):r,t)),gt=mt({"node_modules/cookie/index.js"(t){t.parse=n,t.serialize=a;var e=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n(o,i){if(typeof o!="string")throw new TypeError("argument str must be a string");for(var f={},c=i||{},h=c.decode||l,m=0;m<o.length;){var p=o.indexOf("=",m);if(p===-1)break;var v=o.indexOf(";",m);if(v===-1)v=o.length;else if(v<p){m=o.lastIndexOf(";",p-1)+1;continue}var y=o.slice(m,p).trim();if(f[y]===void 0){var b=o.slice(p+1,v).trim();b.charCodeAt(0)===34&&(b=b.slice(1,-1)),f[y]=s(b,h)}m=v+1}return f}function a(o,i,f){var c=f||{},h=c.encode||u;if(typeof h!="function")throw new TypeError("option encode is invalid");if(!r.test(o))throw new TypeError("argument name is invalid");var m=h(i);if(m&&!r.test(m))throw new TypeError("argument val is invalid");var p=o+"="+m;if(c.maxAge!=null){var v=c.maxAge-0;if(isNaN(v)||!isFinite(v))throw new TypeError("option maxAge is invalid");p+="; Max-Age="+Math.floor(v)}if(c.domain){if(!r.test(c.domain))throw new TypeError("option domain is invalid");p+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError("option path is invalid");p+="; Path="+c.path}if(c.expires){var y=c.expires;if(!d(y)||isNaN(y.valueOf()))throw new TypeError("option expires is invalid");p+="; Expires="+y.toUTCString()}if(c.httpOnly&&(p+="; HttpOnly"),c.secure&&(p+="; Secure"),c.priority){var b=typeof c.priority=="string"?c.priority.toLowerCase():c.priority;switch(b){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(c.sameSite){var T=typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite;switch(T){case!0:p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"strict":p+="; SameSite=Strict";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return p}function l(o){return o.indexOf("%")!==-1?decodeURIComponent(o):o}function u(o){return encodeURIComponent(o)}function d(o){return e.call(o)==="[object Date]"||o instanceof Date}function s(o,i){try{return i(o)}catch{return o}}}}),wt=yt(gt(),1),K=wt.default;/*! Bundled license information:
|
|
11
|
-
|
|
12
|
-
cookie/index.js:
|
|
13
|
-
(*!
|
|
14
|
-
* cookie
|
|
15
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
16
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
17
|
-
* MIT Licensed
|
|
18
|
-
*)
|
|
19
|
-
*/function Z(){return K.parse(document.cookie)}function bt(t){if(typeof document>"u"||typeof location>"u")return{};switch(t.credentials){case"same-origin":{const e=new URL(t.url);return location.origin===e.origin?Z():{}}case"include":return Z();default:return{}}}function xt(t){const e=t.headers.get("cookie"),r=e?K.parse(e):{};Q.hydrate();const n=Array.from(Q.get(t)?.entries()).reduce((u,[d,{value:s}])=>Object.assign(u,{[d.trim()]:s}),{}),l={...bt(t),...n};for(const[u,d]of Object.entries(l))t.headers.append("cookie",K.serialize(u,d));return{...l,...r}}var C=(t=>(t.HEAD="HEAD",t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.OPTIONS="OPTIONS",t.DELETE="DELETE",t))(C||{});class Tt extends xe{constructor(e,r,n,a){super({info:{header:`${e} ${r}`,path:r,method:e},resolver:n,options:a}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:r}=this.info;if(r instanceof RegExp||he(r)===r)return;st(r).forEach((l,u)=>{}),X.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${r}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`)}async parse(e){const r=new URL(e.request.url),n=ut(r,this.info.path,e.resolutionContext?.baseUrl),a=xt(e.request);return{match:n,cookies:a}}predicate(e){const r=this.matchMethod(e.request.method),n=e.parsedResult.match.matches;return r&&n}matchMethod(e){return this.info.method instanceof RegExp?this.info.method.test(e):Pe(this.info.method,e)}extendResolverArgs(e){return{params:e.parsedResult.match?.params||{},cookies:e.parsedResult.cookies}}async log(e){const r=Te(e.request.url),n=await qe(e.request),a=await Ue(e.response),l=Re(a.status);console.groupCollapsed(X.formatMessage(`${ke()} ${e.request.method} ${r} (%c${a.status} ${a.statusText}%c)`),`color:${l}`,"color:inherit"),console.log("Request",n),console.log("Handler:",this),console.log("Response",a),console.groupEnd()}}function _(t){return(e,r,n={})=>new Tt(t,e,r,n)}const M={all:_(/.+/),head:_(C.HEAD),get:_(C.GET),post:_(C.POST),put:_(C.PUT),delete:_(C.DELETE),patch:_(C.PATCH),options:_(C.OPTIONS)};var Et=Object.create,ye=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyNames,Ct=Object.getPrototypeOf,Pt=Object.prototype.hasOwnProperty,Rt=(t,e)=>function(){return e||(0,t[ge(t)[0]])((e={exports:{}}).exports,e),e.exports},kt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ge(e))!Pt.call(t,a)&&a!==r&&ye(t,a,{get:()=>e[a],enumerable:!(n=_t(e,a))||n.enumerable});return t},qt=(t,e,r)=>(r=t!=null?Et(Ct(t)):{},kt(e||!t||!t.__esModule?ye(r,"default",{value:t,enumerable:!0}):r,t)),St=Rt({"node_modules/set-cookie-parser/lib/set-cookie.js"(t,e){var r={decodeValues:!0,map:!1,silent:!1};function n(s){return typeof s=="string"&&!!s.trim()}function a(s,o){var i=s.split(";").filter(n),f=i.shift(),c=l(f),h=c.name,m=c.value;o=o?Object.assign({},r,o):r;try{m=o.decodeValues?decodeURIComponent(m):m}catch(v){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+m+"'. Set options.decodeValues to false to disable this feature.",v)}var p={name:h,value:m};return i.forEach(function(v){var y=v.split("="),b=y.shift().trimLeft().toLowerCase(),T=y.join("=");b==="expires"?p.expires=new Date(T):b==="max-age"?p.maxAge=parseInt(T,10):b==="secure"?p.secure=!0:b==="httponly"?p.httpOnly=!0:b==="samesite"?p.sameSite=T:p[b]=T}),p}function l(s){var o="",i="",f=s.split("=");return f.length>1?(o=f.shift(),i=f.join("=")):i=s,{name:o,value:i}}function u(s,o){if(o=o?Object.assign({},r,o):r,!s)return o.map?{}:[];if(s.headers)if(typeof s.headers.getSetCookie=="function")s=s.headers.getSetCookie();else if(s.headers["set-cookie"])s=s.headers["set-cookie"];else{var i=s.headers[Object.keys(s.headers).find(function(c){return c.toLowerCase()==="set-cookie"})];!i&&s.headers.cookie&&!o.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),s=i}if(Array.isArray(s)||(s=[s]),o=o?Object.assign({},r,o):r,o.map){var f={};return s.filter(n).reduce(function(c,h){var m=a(h,o);return c[m.name]=m,c},f)}else return s.filter(n).map(function(c){return a(c,o)})}function d(s){if(Array.isArray(s))return s;if(typeof s!="string")return[];var o=[],i=0,f,c,h,m,p;function v(){for(;i<s.length&&/\s/.test(s.charAt(i));)i+=1;return i<s.length}function y(){return c=s.charAt(i),c!=="="&&c!==";"&&c!==","}for(;i<s.length;){for(f=i,p=!1;v();)if(c=s.charAt(i),c===","){for(h=i,i+=1,v(),m=i;i<s.length&&y();)i+=1;i<s.length&&s.charAt(i)==="="?(p=!0,i=m,o.push(s.substring(f,h)),f=i):i=h+1}else i+=1;(!p||i>=s.length)&&o.push(s.substring(f,s.length))}return o}e.exports=u,e.exports.parse=u,e.exports.parseString=a,e.exports.splitCookiesString=d}}),At=qt(St()),Ot=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function B(t){if(Ot.test(t)||t.trim()==="")throw new TypeError("Invalid character in header field name");return t.trim().toLowerCase()}var Y=[`
|
|
20
|
-
`,"\r"," "," "],Bt=new RegExp(`(^[${Y.join("")}]|$[${Y.join("")}])`,"g");function V(t){return t.replace(Bt,"")}function $(t){if(typeof t!="string"||t.length===0)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r>127||!$t(r))return!1}return!0}function $t(t){return![127,32,"(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"].includes(t)}function ee(t){if(typeof t!="string"||t.trim()!==t)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r===0||r===10||r===13)return!1}return!0}var q=Symbol("normalizedHeaders"),W=Symbol("rawHeaderNames"),te=", ",re,ne,ae,It=class we{constructor(e){this[re]={},this[ne]=new Map,this[ae]="Headers",["Headers","HeadersPolyfill"].includes(e?.constructor.name)||e instanceof we||typeof globalThis.Headers<"u"&&e instanceof globalThis.Headers?e.forEach((n,a)=>{this.append(a,n)},this):Array.isArray(e)?e.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(te):n)}):e&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];this.append(r,Array.isArray(n)?n.join(te):n)})}[(re=q,ne=W,ae=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(const[e]of this.entries())yield e}*values(){for(const[,e]of this.entries())yield e}*entries(){let e=Object.keys(this[q]).sort((r,n)=>r.localeCompare(n));for(const r of e)if(r==="set-cookie")for(const n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(e){if(!$(e))throw new TypeError(`Invalid header name "${e}"`);return this[q].hasOwnProperty(B(e))}get(e){if(!$(e))throw TypeError(`Invalid header name "${e}"`);return this[q][B(e)]??null}set(e,r){if(!$(e)||!ee(r))return;const n=B(e),a=V(r);this[q][n]=V(a),this[W].set(n,e)}append(e,r){if(!$(e)||!ee(r))return;const n=B(e),a=V(r);let l=this.has(n)?`${this.get(n)}, ${a}`:a;this.set(e,l)}delete(e){if(!$(e)||!this.has(e))return;const r=B(e);delete this[q][r],this[W].delete(r)}forEach(e,r){for(const[n,a]of this.entries())e.call(r,a,n,this)}getSetCookie(){const e=this.get("set-cookie");return e===null?[]:e===""?[""]:(0,At.splitCookiesString)(e)}};const{message:Dt}=ue;function S(t={}){const e=t?.status||200,r=t?.statusText||Dt[e]||"",n=new Headers(t?.headers);return{...t,headers:n,status:e,statusText:r}}function Nt(t,e){if(e.type&&Object.defineProperty(t,"type",{value:e.type,enumerable:!0,writable:!1}),typeof document<"u"){const r=It.prototype.getSetCookie.call(e.headers);for(const n of r)document.cookie=n}return t}class E extends Response{constructor(e,r){const n=S(r);super(e,n),Nt(this,n)}static text(e,r){const n=S(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/plain"),n.headers.has("Content-Length")||n.headers.set("Content-Length",e?new Blob([e]).size.toString():"0"),new E(e,n)}static json(e,r){const n=S(r);n.headers.has("Content-Type")||n.headers.set("Content-Type","application/json");const a=JSON.stringify(e);return n.headers.has("Content-Length")||n.headers.set("Content-Length",a?new Blob([a]).size.toString():"0"),new E(a,n)}static xml(e,r){const n=S(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/xml"),new E(e,n)}static arrayBuffer(e,r){const n=S(r);return e&&n.headers.set("Content-Length",e.byteLength.toString()),new E(e,n)}static formData(e,r){return new E(e,S(r))}}const G=2147483647,se=100,jt=400,Lt=5;function oe(){return fe()?Lt:Math.floor(Math.random()*(jt-se)+se)}async function Ut(t){let e;if(typeof t=="string")switch(t){case"infinite":{e=G;break}case"real":{e=oe();break}default:throw new Error(`Failed to delay a response: unknown delay mode "${t}". Please make sure you provide one of the supported modes ("real", "infinite") or a number.`)}else if(typeof t>"u")e=oe();else{if(t>G)throw new Error(`Failed to delay a response: provided delay duration (${t}) exceeds the maximum allowed duration for "setTimeout" (${G}). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);e=t}return new Promise(r=>setTimeout(r,e))}Ce();const J={count:1279,next:"https://pokeapi.co/api/v2/pokemon?offset=6&limit=6",previous:null,results:[{name:"bulbasaur",url:"https://pokeapi.co/api/v2/pokemon/1/"},{name:"ivysaur",url:"https://pokeapi.co/api/v2/pokemon/2/"},{name:"venusaur",url:"https://pokeapi.co/api/v2/pokemon/3/"},{name:"charmander",url:"https://pokeapi.co/api/v2/pokemon/4/"},{name:"charmeleon",url:"https://pokeapi.co/api/v2/pokemon/5/"},{name:"charizard",url:"https://pokeapi.co/api/v2/pokemon/6/"}]},H=[M.get("/pokemon",({request:t})=>{const r=new URL(t.url).searchParams.get("limit"),n=structuredClone(J);return r&&(n.results=n.results.slice(0,Number(r))),E.json(n)}),M.get("/noreturn",async()=>(await Ut(500),E.json(J))),M.get("/reflect",({request:t})=>{const e={};return[...t.headers.entries()].map(([r,n])=>e[r]="reflected-"+n),e["x-added"]="abc",E.json(J,{headers:e})}),M.get("/404",()=>new E(null,{status:404,statusText:"not found"}))],Ht={title:"",slice:"page",url:"/pokemon?limit=6"};function O(t){return new Promise(e=>setTimeout(e,t))}function Mt({title:t,slice:e,url:r}){return`
|
|
21
|
-
<fieldset>
|
|
22
|
-
<legend>${t}</legend>
|
|
23
|
-
<custom-element>
|
|
24
|
-
<template><!-- wrapping into template to prevent images loading within DCE declaration -->
|
|
25
|
-
<http-request
|
|
26
|
-
url="{ //slice/url }"
|
|
27
|
-
slice="${e}"
|
|
28
|
-
></http-request>
|
|
29
|
-
<input placeholder="URL for fetch" slice="url" value="{ //url ?? '${r}' }"/>
|
|
30
|
-
<button>set</button>
|
|
31
|
-
<button slice="url" slice-value="''" slice-event="click">set blank</button>
|
|
32
|
-
<button slice="url" slice-value="'/reflect'" slice-event="click">/reflect</button>
|
|
33
|
-
<button slice="url" slice-value="'/pokemon'" slice-event="click">/pokemon</button>
|
|
34
|
-
<button slice="url" slice-value="'/pokemon?limit=6'" slice-event="click">/pokemon?limit=6</button>
|
|
35
|
-
<button slice="url" slice-value="'/pokemon?limit=3'" slice-event="click">/pokemon?limit=3</button>
|
|
36
|
-
|
|
37
|
-
<p>Pokemon Count: {count(/datadom/slice/${e}//results)}</p>
|
|
38
|
-
<if test="count(/datadom/slice/${e}//results) < 0">
|
|
39
|
-
<h3>loading...</h3>
|
|
40
|
-
</if>
|
|
41
|
-
<for-each select="/datadom/slice/${e}//results">
|
|
42
|
-
<variable name="pokeid"
|
|
43
|
-
select="substring-before( substring-after( @url, 'https://pokeapi.co/api/v2/pokemon/'),'/')"
|
|
44
|
-
></variable>
|
|
45
|
-
<button>
|
|
46
|
-
<value-of select='@name'/>
|
|
47
|
-
</button>
|
|
48
|
-
</for-each>
|
|
49
|
-
<for-each select="//slice/${e}/value/*">
|
|
50
|
-
<ul>
|
|
51
|
-
<var data-testid="request-section"><value-of select='name(.)'/></var>
|
|
52
|
-
<for-each select="@*">
|
|
53
|
-
<div>
|
|
54
|
-
<var>@{local-name(.)}</var>
|
|
55
|
-
=
|
|
56
|
-
<code data-testid="attr-{local-name(.)}">{.}</code>
|
|
57
|
-
</div>
|
|
58
|
-
</for-each>
|
|
59
|
-
</ul>
|
|
60
|
-
</for-each>
|
|
61
|
-
</template>
|
|
62
|
-
</custom-element>
|
|
63
|
-
</fieldset>
|
|
64
|
-
`}const zt={title:"http-request",render:t=>Mt(t),renderPlay:async function(e){document.body.innerHTML=(e.render?e:zt).render({...Ht,...e.args}),await new Promise(r=>setTimeout(async()=>{await e.play({canvasElement:document.body.firstElementChild}),r(0)},0))}},I={args:{title:"url and slice",url:"/pokemon?limit=4"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(I.args.title),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 4")).toBeInTheDocument(t)},parameters:{msw:H}},D={args:{title:"url change",url:""},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(D.args.title);const r=l=>e.getByText(l),n=t.querySelector("http-request"),a=()=>n.getAttribute("url");w(r("Pokemon Count: 0")).toBeInTheDocument(),w(a()).toEqual(""),r("/pokemon").click(),await O(100),w(a()).toEqual("/pokemon"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=6").click(),await O(100),w(a()).toEqual("/pokemon?limit=6"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=3").click(),await O(100),w(a()).toEqual("/pokemon?limit=3"),w(r("Pokemon Count: 3")).toBeInTheDocument(),r("set blank").click(),await O(100),w(a()).toEqual(""),w(r("Pokemon Count: 0")).toBeInTheDocument()},parameters:{msw:H}},N={args:{title:"http-request with error",url:"/404"},play:async({canvasElement:t})=>{const e=U(t),r=async n=>(await e.findByTestId(n)).textContent;await e.findByText(N.args.title),await O(200),w(await r("attr-status")).to.include("404")},parameters:{msw:H}},j={args:{title:"http-request with delayed .5 seconds response",url:"/noreturn"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(j.args.title),w(await e.findByText("request")).toBeInTheDocument(),w(e.queryByText("response")).toBe(null),w(await e.findByText("response")).toBeInTheDocument(),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 6")).toBeInTheDocument()},parameters:{msw:H}},L={args:{title:"http-request headers and response status and headers",url:"/reflect"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(L.args.title),await O(200);const r=await e.findByTestId("section-request-attr-x-test");w(r).toBeInTheDocument(),w(r.textContent.trim()).toEqual("testing");const n=await e.findByTestId("section-response-attr-x-test");w(n).toBeInTheDocument(),w(n.textContent.trim()).toEqual("reflected-testing");const a=await e.findByTestId("section-response-attr-x-added");w(a).toBeInTheDocument(),w(a.textContent.trim()).toEqual("abc")},parameters:{msw:H},render:({url:t,title:e})=>`
|
|
65
|
-
<fieldset>
|
|
66
|
-
<legend>${e}</legend>
|
|
67
|
-
<p> <b>request</b> headers are populated into dedicated <b>slice/request/headers</b></p>
|
|
68
|
-
|
|
69
|
-
<custom-element tag="headers-demo" >
|
|
70
|
-
<template>
|
|
71
|
-
<http-request
|
|
72
|
-
url="${t}"
|
|
73
|
-
slice="request_slice"
|
|
74
|
-
type="text"
|
|
75
|
-
mode="cors"
|
|
76
|
-
header-x-test="testing"
|
|
77
|
-
></http-request>
|
|
78
|
-
Content of <code>//slice/request_slice</code> is filled by <b>request</b> and <b>response</b>
|
|
79
|
-
from <code>${t}</code>
|
|
80
|
-
|
|
81
|
-
<h3>Samples</h3>
|
|
82
|
-
<table>
|
|
83
|
-
<tr><th>//slice/request_slice/value/request/headers/@mode</th>
|
|
84
|
-
<td><value-of select="//slice/request_slice/value/request/@mode"/></td></tr>
|
|
85
|
-
<tr><th>//slice/request_slice/value/response/headers/@content-type</th>
|
|
86
|
-
<td><value-of select="//slice/request_slice/value/response/headers/@content-type"/></td></tr>
|
|
87
|
-
<tr><th>//slice/request_slice/value/response/@status</th>
|
|
88
|
-
<td><value-of select="//slice/request_slice/value/response/@status"/></td></tr>
|
|
89
|
-
</table>
|
|
90
|
-
<for-each select="//slice/request_slice/value/*">
|
|
91
|
-
<xsl:variable name="section">{name(.)}</xsl:variable>
|
|
92
|
-
<ul date-testid="section-{$section}">
|
|
93
|
-
<b data-testid="request-section"><value-of select='name(.)'/></b>
|
|
94
|
-
<for-each select="@*">
|
|
95
|
-
<div>
|
|
96
|
-
<var >@{local-name(.)}</var>
|
|
97
|
-
=
|
|
98
|
-
<code data-testid="section-{$section}-prop-{local-name(.)}">{.}</code>
|
|
99
|
-
</div>
|
|
100
|
-
</for-each>
|
|
101
|
-
<for-each select="*">
|
|
102
|
-
<div>
|
|
103
|
-
<b data-testid="section-deep"><value-of select='local-name(.)'/></b>
|
|
104
|
-
<ul>
|
|
105
|
-
<for-each select="@*">
|
|
106
|
-
<li>
|
|
107
|
-
<var data-testid="section-attribute">@{local-name(.)}</var>
|
|
108
|
-
=
|
|
109
|
-
<code data-testid="section-{$section}-attr-{local-name(.)}">{.}</code>
|
|
110
|
-
</li>
|
|
111
|
-
</for-each>
|
|
112
|
-
<code><value-of select='.'/></code>
|
|
113
|
-
</ul>
|
|
114
|
-
</div>
|
|
115
|
-
</for-each>
|
|
116
|
-
</ul>
|
|
117
|
-
</for-each>
|
|
118
|
-
</template>
|
|
119
|
-
</custom-element>
|
|
120
|
-
<headers-demo></headers-demo>
|
|
121
|
-
</fieldset>
|
|
122
|
-
`};I.parameters={...I.parameters,docs:{...I.parameters?.docs,source:{originalSource:`{
|
|
123
|
-
args: {
|
|
124
|
-
title: 'url and slice',
|
|
125
|
-
url: '/pokemon?limit=4'
|
|
126
|
-
},
|
|
127
|
-
play: async ({
|
|
128
|
-
canvasElement
|
|
129
|
-
}) => {
|
|
130
|
-
const canvas = within(canvasElement);
|
|
131
|
-
await canvas.findByText((Demo.args!.title as string));
|
|
132
|
-
expect(await canvas.findByText('bulbasaur')).toBeInTheDocument();
|
|
133
|
-
expect(await canvas.findByText('Pokemon Count: 4')).toBeInTheDocument(canvasElement);
|
|
134
|
-
},
|
|
135
|
-
parameters: {
|
|
136
|
-
msw: handlers
|
|
137
|
-
}
|
|
138
|
-
}`,...I.parameters?.docs?.source}}};D.parameters={...D.parameters,docs:{...D.parameters?.docs,source:{originalSource:`{
|
|
139
|
-
args: {
|
|
140
|
-
title: 'url change',
|
|
141
|
-
url: ''
|
|
142
|
-
},
|
|
143
|
-
play: async ({
|
|
144
|
-
canvasElement
|
|
145
|
-
}) => {
|
|
146
|
-
const canvas = within(canvasElement);
|
|
147
|
-
await canvas.findByText((UrlChange.args!.title as string));
|
|
148
|
-
const byText = txt => canvas.getByText(txt);
|
|
149
|
-
const requestElement = canvasElement.querySelector('http-request'),
|
|
150
|
-
urlAttr = () => requestElement.getAttribute('url');
|
|
151
|
-
expect(byText('Pokemon Count: 0')).toBeInTheDocument();
|
|
152
|
-
expect(urlAttr()).toEqual('');
|
|
153
|
-
byText('/pokemon').click();
|
|
154
|
-
await sleep(100);
|
|
155
|
-
expect(urlAttr()).toEqual('/pokemon');
|
|
156
|
-
expect(byText('Pokemon Count: 6')).toBeInTheDocument();
|
|
157
|
-
byText('/pokemon?limit=6').click();
|
|
158
|
-
await sleep(100);
|
|
159
|
-
expect(urlAttr()).toEqual('/pokemon?limit=6');
|
|
160
|
-
expect(byText('Pokemon Count: 6')).toBeInTheDocument();
|
|
161
|
-
byText('/pokemon?limit=3').click();
|
|
162
|
-
await sleep(100);
|
|
163
|
-
expect(urlAttr()).toEqual('/pokemon?limit=3');
|
|
164
|
-
expect(byText('Pokemon Count: 3')).toBeInTheDocument();
|
|
165
|
-
byText('set blank').click();
|
|
166
|
-
await sleep(100);
|
|
167
|
-
expect(urlAttr()).toEqual('');
|
|
168
|
-
expect(byText('Pokemon Count: 0')).toBeInTheDocument();
|
|
169
|
-
},
|
|
170
|
-
parameters: {
|
|
171
|
-
msw: handlers
|
|
172
|
-
}
|
|
173
|
-
}`,...D.parameters?.docs?.source}}};N.parameters={...N.parameters,docs:{...N.parameters?.docs,source:{originalSource:`{
|
|
174
|
-
args: {
|
|
175
|
-
title: 'http-request with error',
|
|
176
|
-
url: '/404'
|
|
177
|
-
},
|
|
178
|
-
play: async ({
|
|
179
|
-
canvasElement
|
|
180
|
-
}) => {
|
|
181
|
-
const canvas = within(canvasElement),
|
|
182
|
-
$t = async testId => (await canvas.findByTestId(testId)).textContent;
|
|
183
|
-
await canvas.findByText((Http404.args!.title as string));
|
|
184
|
-
await sleep(200);
|
|
185
|
-
expect(await $t('attr-status')).to.include('404');
|
|
186
|
-
},
|
|
187
|
-
parameters: {
|
|
188
|
-
msw: handlers
|
|
189
|
-
}
|
|
190
|
-
}`,...N.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
|
|
191
|
-
args: {
|
|
192
|
-
title: 'http-request with delayed .5 seconds response',
|
|
193
|
-
url: '/noreturn'
|
|
194
|
-
},
|
|
195
|
-
play: async ({
|
|
196
|
-
canvasElement
|
|
197
|
-
}) => {
|
|
198
|
-
const canvas = within(canvasElement);
|
|
199
|
-
await canvas.findByText((LifecycleInitialized.args!.title as string));
|
|
200
|
-
expect(await canvas.findByText('request')).toBeInTheDocument(); // after DCE initiated
|
|
201
|
-
expect(canvas.queryByText('response')).toBe(null); // response is not available
|
|
202
|
-
// wait while response appears ~ 0.5 seconds
|
|
203
|
-
expect(await canvas.findByText('response')).toBeInTheDocument(); // only after delay is shown
|
|
204
|
-
|
|
205
|
-
expect(await canvas.findByText('bulbasaur')).toBeInTheDocument();
|
|
206
|
-
expect(await canvas.findByText('Pokemon Count: 6')).toBeInTheDocument();
|
|
207
|
-
},
|
|
208
|
-
parameters: {
|
|
209
|
-
msw: handlers
|
|
210
|
-
}
|
|
211
|
-
}`,...j.parameters?.docs?.source}}};L.parameters={...L.parameters,docs:{...L.parameters?.docs,source:{originalSource:`{
|
|
212
|
-
args: {
|
|
213
|
-
title: 'http-request headers and response status and headers',
|
|
214
|
-
url: '/reflect'
|
|
215
|
-
},
|
|
216
|
-
play: async ({
|
|
217
|
-
canvasElement
|
|
218
|
-
}) => {
|
|
219
|
-
const canvas = within(canvasElement);
|
|
220
|
-
await canvas.findByText((RequestResponseHeaders.args!.title as string));
|
|
221
|
-
await sleep(200);
|
|
222
|
-
|
|
223
|
-
// see response made by /reflect handler
|
|
224
|
-
|
|
225
|
-
const te = await canvas.findByTestId('section-request-attr-x-test');
|
|
226
|
-
expect(te).toBeInTheDocument();
|
|
227
|
-
expect(te.textContent.trim()).toEqual('testing');
|
|
228
|
-
const t1 = await canvas.findByTestId('section-response-attr-x-test');
|
|
229
|
-
expect(t1).toBeInTheDocument();
|
|
230
|
-
expect(t1.textContent.trim()).toEqual('reflected-testing');
|
|
231
|
-
const tAdded = await canvas.findByTestId('section-response-attr-x-added');
|
|
232
|
-
expect(tAdded).toBeInTheDocument();
|
|
233
|
-
expect(tAdded.textContent.trim()).toEqual('abc');
|
|
234
|
-
},
|
|
235
|
-
parameters: {
|
|
236
|
-
msw: handlers
|
|
237
|
-
},
|
|
238
|
-
render: ({
|
|
239
|
-
url,
|
|
240
|
-
title
|
|
241
|
-
}) => \`
|
|
242
|
-
<fieldset>
|
|
243
|
-
<legend>\${title}</legend>
|
|
244
|
-
<p> <b>request</b> headers are populated into dedicated <b>slice/request/headers</b></p>
|
|
245
|
-
|
|
246
|
-
<custom-element tag="headers-demo" >
|
|
247
|
-
<template>
|
|
248
|
-
<http-request
|
|
249
|
-
url="\${url}"
|
|
250
|
-
slice="request_slice"
|
|
251
|
-
type="text"
|
|
252
|
-
mode="cors"
|
|
253
|
-
header-x-test="testing"
|
|
254
|
-
></http-request>
|
|
255
|
-
Content of <code>//slice/request_slice</code> is filled by <b>request</b> and <b>response</b>
|
|
256
|
-
from <code>\${url}</code>
|
|
257
|
-
|
|
258
|
-
<h3>Samples</h3>
|
|
259
|
-
<table>
|
|
260
|
-
<tr><th>//slice/request_slice/value/request/headers/@mode</th>
|
|
261
|
-
<td><value-of select="//slice/request_slice/value/request/@mode"/></td></tr>
|
|
262
|
-
<tr><th>//slice/request_slice/value/response/headers/@content-type</th>
|
|
263
|
-
<td><value-of select="//slice/request_slice/value/response/headers/@content-type"/></td></tr>
|
|
264
|
-
<tr><th>//slice/request_slice/value/response/@status</th>
|
|
265
|
-
<td><value-of select="//slice/request_slice/value/response/@status"/></td></tr>
|
|
266
|
-
</table>
|
|
267
|
-
<for-each select="//slice/request_slice/value/*">
|
|
268
|
-
<xsl:variable name="section">{name(.)}</xsl:variable>
|
|
269
|
-
<ul date-testid="section-{$section}">
|
|
270
|
-
<b data-testid="request-section"><value-of select='name(.)'/></b>
|
|
271
|
-
<for-each select="@*">
|
|
272
|
-
<div>
|
|
273
|
-
<var >@{local-name(.)}</var>
|
|
274
|
-
=
|
|
275
|
-
<code data-testid="section-{$section}-prop-{local-name(.)}">{.}</code>
|
|
276
|
-
</div>
|
|
277
|
-
</for-each>
|
|
278
|
-
<for-each select="*">
|
|
279
|
-
<div>
|
|
280
|
-
<b data-testid="section-deep"><value-of select='local-name(.)'/></b>
|
|
281
|
-
<ul>
|
|
282
|
-
<for-each select="@*">
|
|
283
|
-
<li>
|
|
284
|
-
<var data-testid="section-attribute">@{local-name(.)}</var>
|
|
285
|
-
=
|
|
286
|
-
<code data-testid="section-{$section}-attr-{local-name(.)}">{.}</code>
|
|
287
|
-
</li>
|
|
288
|
-
</for-each>
|
|
289
|
-
<code><value-of select='.'/></code>
|
|
290
|
-
</ul>
|
|
291
|
-
</div>
|
|
292
|
-
</for-each>
|
|
293
|
-
</ul>
|
|
294
|
-
</for-each>
|
|
295
|
-
</template>
|
|
296
|
-
</custom-element>
|
|
297
|
-
<headers-demo></headers-demo>
|
|
298
|
-
</fieldset>
|
|
299
|
-
\`
|
|
300
|
-
}`,...L.parameters?.docs?.source}}};const Gt=["Demo","UrlChange","Http404","LifecycleInitialized","RequestResponseHeaders"];export{I as Demo,N as Http404,j as LifecycleInitialized,L as RequestResponseHeaders,D as UrlChange,Gt as __namedExportsOrder,zt as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__fileDeps=["./Configure-C7d36rng.js","./index-CBQwM6ST.js","./index-Cc7K62zD.js","./index-Dkj0J1ds.js","./index-DrFu-skq.js","./index-DnEJ_bKa.js","./attributes.stories-ZB0RTY1d.js","./index-CDavW7r9.js","./custom-element-BLZZ00dz.js","./css.stories-CLSX-Xxd.js","./dom-merge.stories-CgHZUABU.js","./external-template.stories-DtSLMxvg.js","./http-request.stories-CUzlXO89.js","./index-CQA5dlr6.js","./local-storage.stories-BkO6djDz.js","./location-element.stories-DCIOUd0D.js","./slice-events.stories-DXKjXI37.js","./entry-preview-CQqNFx4W.js","./lit-element-B4_0akdT.js","./entry-preview-docs-CWgqLfd3.js","./tiny-invariant-BxWVcicq.js","./preview-PxUn-cIn.js","./preview-B63p-W8V.js","./preview-BDY5ThwJ.js","./preview-BAz7FMXc.js","./preview-C6t8KBFr.js","./preview-D8LadFCz.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
-
import"../sb-preview/runtime.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))l(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});function c(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function l(t){if(t.ep)return;t.ep=!0;const r=c(t);fetch(t.href,r)}})();const f="modulepreload",R=function(_,n){return new URL(_,n).href},d={},e=function(n,c,l){let t=Promise.resolve();if(c&&c.length>0){const r=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),p=o?.nonce||o?.getAttribute("nonce");t=Promise.all(c.map(i=>{if(i=R(i,l),i in d)return;d[i]=!0;const m=i.endsWith(".css"),O=m?'[rel="stylesheet"]':"";if(!!l)for(let a=r.length-1;a>=0;a--){const u=r[a];if(u.href===i&&(!m||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const s=document.createElement("link");if(s.rel=m?"stylesheet":f,m||(s.as="script",s.crossOrigin=""),s.href=i,p&&s.setAttribute("nonce",p),document.head.appendChild(s),m)return new Promise((a,u)=>{s.addEventListener("load",a),s.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})}))}return t.then(()=>n()).catch(r=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=r,window.dispatchEvent(o),!o.defaultPrevented)throw r})},{createBrowserChannel:P}=__STORYBOOK_MODULE_CHANNELS__,{addons:T}=__STORYBOOK_MODULE_PREVIEW_API__,E=P({page:"preview"});T.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const L={"./src/stories/Configure.mdx":async()=>e(()=>import("./Configure-C7d36rng.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"./src/stories/attributes.stories.ts":async()=>e(()=>import("./attributes.stories-ZB0RTY1d.js"),__vite__mapDeps([6,7,8]),import.meta.url),"./src/stories/css.stories.ts":async()=>e(()=>import("./css.stories-CLSX-Xxd.js"),__vite__mapDeps([9,7,8]),import.meta.url),"./src/stories/dom-merge.stories.ts":async()=>e(()=>import("./dom-merge.stories-CgHZUABU.js"),__vite__mapDeps([10,7,8]),import.meta.url),"./src/stories/external-template.stories.ts":async()=>e(()=>import("./external-template.stories-DtSLMxvg.js"),__vite__mapDeps([11,7,8]),import.meta.url),"./src/stories/http-request.stories.ts":async()=>e(()=>import("./http-request.stories-CUzlXO89.js"),__vite__mapDeps([12,7,8,13]),import.meta.url),"./src/stories/local-storage.stories.ts":async()=>e(()=>import("./local-storage.stories-BkO6djDz.js"),__vite__mapDeps([14,7,8]),import.meta.url),"./src/stories/location-element.stories.ts":async()=>e(()=>import("./location-element.stories-DCIOUd0D.js"),__vite__mapDeps([15,7,8]),import.meta.url),"./src/stories/slice-events.stories.ts":async()=>e(()=>import("./slice-events.stories-DXKjXI37.js"),__vite__mapDeps([16,7,8]),import.meta.url)};async function v(_){return L[_]()}const{composeConfigs:A,PreviewWeb:y,ClientApi:h}=__STORYBOOK_MODULE_PREVIEW_API__,I=async()=>{const _=await Promise.all([e(()=>import("./entry-preview-CQqNFx4W.js"),__vite__mapDeps([17,4,18]),import.meta.url),e(()=>import("./entry-preview-docs-CWgqLfd3.js"),__vite__mapDeps([19,2,20,18]),import.meta.url),e(()=>import("./preview-PxUn-cIn.js"),__vite__mapDeps([21,3]),import.meta.url),e(()=>import("./preview-CkgAD_DE.js"),[],import.meta.url),e(()=>import("./preview-DNpCpRPf.js"),[],import.meta.url),e(()=>import("./preview-B63p-W8V.js"),__vite__mapDeps([22,4]),import.meta.url),e(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),e(()=>import("./preview-BDY5ThwJ.js"),__vite__mapDeps([23,20]),import.meta.url),e(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([24,4]),import.meta.url),e(()=>import("./preview-CYD85dwb.js"),[],import.meta.url),e(()=>import("./preview-C6t8KBFr.js"),__vite__mapDeps([25,7]),import.meta.url),e(()=>import("./preview-D8LadFCz.js"),__vite__mapDeps([26,13]),import.meta.url)]);return A(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new y(v,I);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{e as _};
|