@credenza3/passport-sui 0.3.21 → 0.3.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/dist/{App-DFtR1TeS.js → App-ygXfVpxx.js} +19 -19
- package/dist/{App-DFtR1TeS.js.map → App-ygXfVpxx.js.map} +1 -1
- package/dist/{AssetItem-DmYWJF7G.js → AssetItem-Dr8YW0U7.js} +61 -61
- package/dist/{AssetItem-DmYWJF7G.js.map → AssetItem-Dr8YW0U7.js.map} +1 -1
- package/dist/{Button-Ch77vn9A.js → Button-DR-zmLrg.js} +4 -4
- package/dist/{Button-Ch77vn9A.js.map → Button-DR-zmLrg.js.map} +1 -1
- package/dist/{ButtonBack-B8Q5tLmt.js → ButtonBack-CW3PR7Q2.js} +4 -4
- package/dist/{ButtonBack-B8Q5tLmt.js.map → ButtonBack-CW3PR7Q2.js.map} +1 -1
- package/dist/{ButtonLink-C4JFpgjc.js → ButtonLink-DsRUfTxX.js} +3 -3
- package/dist/{ButtonLink-C4JFpgjc.js.map → ButtonLink-DsRUfTxX.js.map} +1 -1
- package/dist/{ConfirmAccount-BqN7XAyH.js → ConfirmAccount-DPSXb7N_.js} +9 -9
- package/dist/{ConfirmAccount-BqN7XAyH.js.map → ConfirmAccount-DPSXb7N_.js.map} +1 -1
- package/dist/{ContentHeader-BsFCkQzR.js → ContentHeader-Corz7XkS.js} +3 -3
- package/dist/{ContentHeader-BsFCkQzR.js.map → ContentHeader-Corz7XkS.js.map} +1 -1
- package/dist/{Error-CEGdSBU5.js → Error-Dv3d53TH.js} +5 -5
- package/dist/{Error-CEGdSBU5.js.map → Error-Dv3d53TH.js.map} +1 -1
- package/dist/{Input-0_3XrTHx.js → Input-2GKiPjsO.js} +4 -4
- package/dist/{Input-0_3XrTHx.js.map → Input-2GKiPjsO.js.map} +1 -1
- package/dist/{Label-BDDL_wb-.js → Label-iC-LWv3V.js} +3 -3
- package/dist/{Label-BDDL_wb-.js.map → Label-iC-LWv3V.js.map} +1 -1
- package/dist/{Loader-b7lFrT_N.js → Loader-B57ynk0a.js} +3 -3
- package/dist/{Loader-b7lFrT_N.js.map → Loader-B57ynk0a.js.map} +1 -1
- package/dist/Login-BZHxDv1G.js +258 -0
- package/dist/Login-BZHxDv1G.js.map +1 -0
- package/dist/{Logout-Cm2BaIom.js → Logout-skhJratR.js} +6 -6
- package/dist/{Logout-Cm2BaIom.js.map → Logout-skhJratR.js.map} +1 -1
- package/dist/Nav-DW3py7OR.js +711 -0
- package/dist/{Nav-BJ_icYoA.js.map → Nav-DW3py7OR.js.map} +1 -1
- package/dist/{NavMenu-DFf6kRtD.js → NavMenu-CcDtawVC.js} +5 -5
- package/dist/{NavMenu-DFf6kRtD.js.map → NavMenu-CcDtawVC.js.map} +1 -1
- package/dist/{PassportId-COvlt0B0.js → PassportId-C_FsjtsF.js} +7 -7
- package/dist/{PassportId-COvlt0B0.js.map → PassportId-C_FsjtsF.js.map} +1 -1
- package/dist/{Payment-UUQjDU0X.js → Payment-BkYYi71O.js} +11 -11
- package/dist/{Payment-UUQjDU0X.js.map → Payment-BkYYi71O.js.map} +1 -1
- package/dist/{PaymentResult-DdrmRiCu.js → PaymentResult-V8GugbLC.js} +4 -4
- package/dist/{PaymentResult-DdrmRiCu.js.map → PaymentResult-V8GugbLC.js.map} +1 -1
- package/dist/{Profile-CFp7FrV_.js → Profile-DzyMaV61.js} +7 -7
- package/dist/{Profile-CFp7FrV_.js.map → Profile-DzyMaV61.js.map} +1 -1
- package/dist/{ProgressVideo-CjjUBFmR.js → ProgressVideo-Bywmtsl_.js} +6 -6
- package/dist/{ProgressVideo-CjjUBFmR.js.map → ProgressVideo-Bywmtsl_.js.map} +1 -1
- package/dist/{ProgressVideo.service-BcSgRnSE.js → ProgressVideo.service-CeTEtmpY.js} +2 -2
- package/dist/{ProgressVideo.service-BcSgRnSE.js.map → ProgressVideo.service-CeTEtmpY.js.map} +1 -1
- package/dist/{RichAlert-jaqLzpGA.js → RichAlert-B1hg-j-u.js} +5 -5
- package/dist/{RichAlert-jaqLzpGA.js.map → RichAlert-B1hg-j-u.js.map} +1 -1
- package/dist/{Scanner-Dq_HKOIV.js → Scanner-D9jFMR1E.js} +7 -7
- package/dist/{Scanner-Dq_HKOIV.js.map → Scanner-D9jFMR1E.js.map} +1 -1
- package/dist/{SendTokens-DwKIv54j.js → SendTokens-B7MzAQr0.js} +7 -7
- package/dist/{SendTokens-DwKIv54j.js.map → SendTokens-B7MzAQr0.js.map} +1 -1
- package/dist/{Sign-Dle0xfNW.js → Sign-D2CT8LoY.js} +7 -7
- package/dist/{Sign-Dle0xfNW.js.map → Sign-D2CT8LoY.js.map} +1 -1
- package/dist/{Stripe.service-CQg6Spa7.js → Stripe.service-Bs1OxPZf.js} +3 -3
- package/dist/{Stripe.service-CQg6Spa7.js.map → Stripe.service-Bs1OxPZf.js.map} +1 -1
- package/dist/{UpdateProfile-DUSaynRR.js → UpdateProfile-B_99zRSE.js} +10 -10
- package/dist/{UpdateProfile-DUSaynRR.js.map → UpdateProfile-B_99zRSE.js.map} +1 -1
- package/dist/{UserInfo-C1ArfH_8.js → UserInfo-BPv9LCRd.js} +4 -4
- package/dist/{UserInfo-C1ArfH_8.js.map → UserInfo-BPv9LCRd.js.map} +1 -1
- package/dist/{Wallet-C1fm5Mr1.js → Wallet-DYSu-i2_.js} +8 -8
- package/dist/{Wallet-C1fm5Mr1.js.map → Wallet-DYSu-i2_.js.map} +1 -1
- package/dist/{each-DDTBsf6R.js → each-BqMsIE1Y.js} +42 -42
- package/dist/{each-DDTBsf6R.js.map → each-BqMsIE1Y.js.map} +1 -1
- package/dist/{html-BdQYZxh8.js → html-BofUeBT7.js} +11 -11
- package/dist/{html-BdQYZxh8.js.map → html-BofUeBT7.js.map} +1 -1
- package/dist/{index-ZTKns9nv.js → index-CMvsSnts.js} +94 -94
- package/dist/{index-ZTKns9nv.js.map → index-CMvsSnts.js.map} +1 -1
- package/dist/{index-client-BPWhyzSv.js → index-client-nIQFei1c.js} +6 -6
- package/dist/{index-client-BPWhyzSv.js.map → index-client-nIQFei1c.js.map} +1 -1
- package/dist/{input-BGkgNr2f.js → input-Dg6JDrfT.js} +2 -2
- package/dist/{input-BGkgNr2f.js.map → input-Dg6JDrfT.js.map} +1 -1
- package/dist/passport.es.js +1 -1
- package/dist/passport.umd.js +114 -114
- package/dist/passport.umd.js.map +1 -1
- package/dist/{socket-io-DorfmWed.js → socket-io--YNJ_p_y.js} +2 -2
- package/dist/{socket-io-DorfmWed.js.map → socket-io--YNJ_p_y.js.map} +1 -1
- package/package.json +1 -1
- package/dist/Login-D6ZjdKK4.js +0 -259
- package/dist/Login-D6ZjdKK4.js.map +0 -1
- package/dist/Nav-BJ_icYoA.js +0 -707
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as E, p as k, h as N, f as D, i as q, b as V, d as z, u as W, v as X, e as A, k as Z, r as F } from "./AssetItem-
|
|
2
|
-
import { a as $ } from "./index-client-
|
|
3
|
-
import { t as K, m as I, w as P, z as b, x as S, E as a, r as U, l as B, p as ee, y as G, C as te, D as y, n as re, v as ae, o as ne, F as j, I as O, K as se, bv as oe, W as le, N as H, O as L, L as ue, bw as ce } from "./index-
|
|
4
|
-
import { C as ie } from "./ContentHeader-
|
|
5
|
-
import { B as Y } from "./Button-
|
|
6
|
-
import { e as de, i as ve } from "./each-
|
|
7
|
-
import { b as fe } from "./input-
|
|
1
|
+
import { c as E, p as k, h as N, f as D, i as q, b as V, d as z, u as W, v as X, e as A, k as Z, r as F } from "./AssetItem-Dr8YW0U7.js";
|
|
2
|
+
import { a as $ } from "./index-client-nIQFei1c.js";
|
|
3
|
+
import { t as K, m as I, w as P, z as b, x as S, E as a, r as U, l as B, p as ee, y as G, C as te, D as y, n as re, v as ae, o as ne, F as j, I as O, K as se, bv as oe, W as le, N as H, O as L, L as ue, bw as ce } from "./index-CMvsSnts.js";
|
|
4
|
+
import { C as ie } from "./ContentHeader-Corz7XkS.js";
|
|
5
|
+
import { B as Y } from "./Button-DR-zmLrg.js";
|
|
6
|
+
import { e as de, i as ve } from "./each-BqMsIE1Y.js";
|
|
7
|
+
import { b as fe } from "./input-Dg6JDrfT.js";
|
|
8
8
|
var me = D("<button> </button>"), ge = D('<div class="crtw-text-xs crtw-text-gray-400 crtw-mt-1"> </div>'), pe = D('<input class="crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100" type="number" min="1" max="100"/> <!>', 1), we = D('<div><div class="crtw-flex crtw-flex-col">Select amount <div class="crtw-inline-flex crtw-w-full" role="group"></div> <!></div></div>');
|
|
9
9
|
function J(g, n) {
|
|
10
10
|
if (new.target) return E({ component: J, ...g });
|
|
@@ -255,4 +255,4 @@ function _e(g, n) {
|
|
|
255
255
|
export {
|
|
256
256
|
_e as default
|
|
257
257
|
};
|
|
258
|
-
//# sourceMappingURL=Wallet-
|
|
258
|
+
//# sourceMappingURL=Wallet-DYSu-i2_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wallet-
|
|
1
|
+
{"version":3,"file":"Wallet-DYSu-i2_.js","sources":["../../ui/main/wallet/ButtonGroup.svelte","../../ui/main/wallet/Wallet.svelte","../src/app/pages/wallet/Wallet.svelte"],"sourcesContent":["<script lang=\"ts\">\n export let selected: string | undefined = undefined\n export let minStoredValueToPurchase: number = 0\n export let maxStoredValueToPurchase: number = 100\n\n let isInputShown = false\n let active = selected\n\n const selectItems = [\n { value: '10', name: '10' },\n { value: '25', name: '25' },\n { value: '50', name: '50' },\n { value: 'CUSTOM', name: 'Custom' },\n ]\n const handleChangeButton = (value: string) => {\n active = value\n if (value === 'CUSTOM') {\n isInputShown = true\n selected = ''\n return\n }\n isInputShown = false\n selected = value\n }\n const handleChangeInput = (e: Event) => {\n const target = e.target as HTMLSelectElement | HTMLInputElement\n target.value = target.value.replace(/[,.-]/g, '')\n if (+target.value > maxStoredValueToPurchase) {\n selected = maxStoredValueToPurchase.toString()\n return\n }\n selected = target.value\n }\n</script>\n\n<div>\n <div class=\"crtw-flex crtw-flex-col\">\n Select amount\n <div class=\"crtw-inline-flex crtw-w-full\" role=\"group\">\n {#each selectItems as item}\n <button\n on:click={() => handleChangeButton(item.value)}\n class=\"crtw-w-full crtw-h-[30px] crtw-text-sm crtw-border hover:crtw-bg-gray-100 hover:crtw-text-blue-800 first:crtw-rounded-l last:crtw-rounded-r\"\n class:crtw-border-blue-800={item.value === active}\n class:crtw-z-10={item.value === active}\n >\n {item.name}\n </button>\n {/each}\n </div>\n {#if isInputShown}\n <input\n class=\"crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100\"\n type=\"number\"\n min=\"1\"\n max=\"100\"\n bind:value={selected}\n on:input={handleChangeInput}\n />\n {#if minStoredValueToPurchase}\n <div class=\"crtw-text-xs crtw-text-gray-400 crtw-mt-1\">\n Minimum purchase amount is {minStoredValueToPurchase}\n </div>\n {/if}\n {/if}\n </div>\n</div>\n","<script lang=\"ts\">\n import ContentHeader from \"../shared/ContentHeader.svelte\";\n import Button from \"../shared/inputs/button/Button.svelte\";\n import ButtonGroup from \"./ButtonGroup.svelte\";\n\n export let selected: string;\n export let options: {\n title: string;\n description: string;\n onSendClick: () => void;\n sendValueButtonText: string;\n isSendValueDisabled: boolean;\n onPaymentClick: () => void;\n minStoredValueToPurchase?: number;\n maxStoredValueToPurchase?: number;\n };\n\n let { title, description, onSendClick, sendValueButtonText, onPaymentClick, minStoredValueToPurchase = 0, maxStoredValueToPurchase = 100 } =\n options;\n\n $: isSendValueDisabled = options.isSendValueDisabled;\n</script>\n\n<div class=\"crtw-w-full crtw-px-2.5\">\n <ContentHeader text={title} {description} />\n <ButtonGroup bind:selected {minStoredValueToPurchase} {maxStoredValueToPurchase}/>\n <div class=\"crtw-h-4\" />\n <Button\n text=\"Confirm purchase\"\n disabled={!selected || (!!minStoredValueToPurchase && +selected < minStoredValueToPurchase)}\n onClick={onPaymentClick}\n />\n <div class=\"crtw-m-3.5\" />\n <Button\n onClick={onSendClick}\n text={sendValueButtonText}\n disabled={isSendValueDisabled}\n />\n</div>\n","<script lang=\"ts\">\n import { pageStore, pageOptsStore, fn, suiPackageStore } from '@packages/stores'\n import { Pages } from '@packages/utils/enums'\n import { Wallet } from '@packages/ui'\n import { onMount } from 'svelte'\n import { get } from 'svelte/store'\n import { getClientConfigByClientId } from '@lib/clients'\n import { configStore } from '@src/stores/config'\n\n const { getBalance } = get(fn)\n\n const { maxStoredValueToPurchase, minStoredValueToPurchase } = getClientConfigByClientId(get(configStore).clientId)\n\n let balance: string = ''\n\n onMount(async () => {\n balance = await getBalance()\n })\n\n let selected: string = '10'\n\n const goToPayment = () => {\n pageOptsStore.set({\n subtitle: `Purchase stored value`,\n payments: {\n credenzaStoredValue: {\n disabled: true,\n },\n },\n assets: [\n {\n packageId: get(suiPackageStore),\n type: 'cred',\n amount: +selected,\n },\n ],\n })\n pageStore.set(Pages.PAYMENT)\n }\n</script>\n\n<Wallet\n bind:selected\n options={{\n title: `buy stored value`,\n description: `Buy/Send stored value for purchases throughout this website.`,\n onSendClick: () => pageStore.set(Pages.SEND_TOKENS),\n sendValueButtonText: `Send stored value`,\n isSendValueDisabled: !balance,\n onPaymentClick: goToPayment,\n maxStoredValueToPurchase,\n minStoredValueToPurchase,\n }}\n/>\n"],"names":["selected","minStoredValueToPurchase","maxStoredValueToPurchase","isInputShown","active","handleChangeButton","value","$.set","handleChangeInput","target","div","root","div_1","div_2","selectItems","$.index","$$anchor","item","button","root_1","text","$.child","$.reset","classes","$.set_class","$.get","$.untrack","$.event","$.append","input","$.first_child","fragment","$.remove_input_defaults","node_1","$.sibling","div_3","root_3","$$render","consequent","$.bind_value","consequent_1","$.prop","$$props","options","title","description","onSendClick","sendValueButtonText","onPaymentClick","isSendValueDisabled","ContentHeader","node","__awaiter","thisArg","_arguments","P","generator","getBalance","get","fn","getClientConfigByClientId","configStore","balance","onMount","goToPayment","pageOptsStore","suiPackageStore","pageStore","Pages","Wallet"],"mappings":";;;;;;;;iBAAA;;;AAEa,MAAAA,yBAAoC,MAAA,GACpCC,yCAAsC,CAAA,GAE7CC,yCAAoB,GAAA,GAGlBC,MAAc,EAAA,GAChBC,MAAOJ,GAAU;YAEJ;AAAA,IACb,EAAA,OAAO,MAAA,MAAU,KAAM;AAAA,IAC1B,EAAA,OAAA,MAAA,MAAA,KAAA;AAAA,IACK,EAAA,OAAA,MAAA,MAAkB,KAAI;AAAA,IAC1B,EAAA,OAAS,UAAK,MAAA,SAAA;AAAA,KAEZK,IAAe,CAAIC,MAAA;QACnBC,EAAAH,GAAAE,IACAA,MAAA,UAAA;AACFC,MAAAA,EAAAJ,GAAA,EAAA,GACAH,IAAe;;IAEhB;AACDO,IAAAA,EAAAJ,GAAM,EAAiB,GACrBH,EAAMM,CAAU;AAAA,EAChB,GACIE;UACFC,IAAW,EAAA;AAEb,QADEA,EAAA,QAAAA,EAAA,MAAA,QAAA,UAAA,EAAA,GACF,CAAAA,EAAA,QAAAP,KAAA;AACA,MAAAF,EAAWE,IAAY,UAAA;;IAEzB;;EAED;;;;;;;;;;;;;;;;;;;;;;;;MAGDQ,IAAIC,GAAA,GACJC,MADAF,CAAI,GAGJG,QAFAD,CAAM,CAAA;KAENC,GAAA,GAAA,MACUC,GAAcC,IAAA,CAAAC,GAAIC,MAAC;AAC7B,QAAAC,IAAAC,GAAA;;AAAA,QAAAC,IAAAC,EAAAH,GAAA,EAAA;AAAAI,IAAAA,EAAAJ,CAAA;AAAA,MAAAK,IAAAC,EAAAN,GAAA,GAAA,+IAAA,MAAAK,GAAA;AAAA,kCAGoBN,CAAA,EAAA,UAAAQ,EAAArB,CAAA;AAAA,uBACJa,CAAA,EAAA,UAAAQ,EAAArB,CAAA;AAAA,kB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;;;UACN,YAAAC,EAAW,IAAAC,EAAAC,EAAA,KAEX,0BAAAzD,GAAc,0BAAAD,EAAc,IAAA2D,GAAAF,EAAAG,EAAA,EAAA,QAAA;AAErC,MAAAC,MAAoB,EAAA;AAEpB,EAAAC,EAAS,MAAWX,EAAA,QAAA,QAAA,QAAA,aAAA;AAEpB7C,IAAAA,EAAAuD,SAAoBL,GAAU;AAAA,EAE9B,CAAA,CAAA;AAIA,MAAAzD,MAAmB,IAAA;AAEjB,QAAAgE,IAAA,MAAA;AAEE,IAAAC,GAAmB,IAAI;AAAA,MAErB,UAAA;AAAA,MACJ,UAAA,EACE,qBAAU,EACV,UAAU,GAAA,EAAA;AAAA,MAGP,QAAA;AAAA;UAEH,WAAQP,EAAAQ,EAAA;AAAA,UACN,MAAA;AAAA,UACE,WAAAlE,CAAW;AAAA;;QAIdmE,EAAA,IAAAC,EAAA,OAAA;AAAA;;;;;;;;aAOA;AAAA,MACL,aAAS;AAAA,MACP,mBAAmBD,EAAM,IAAAC,EAAA,WAAA;AAAA,MACzB,qBAAkB;AAAA,MAClB,wBAAmBN,CAAU;AAAA,MAC7B,gBAAAE;AAAA,MACA,0BAAA9D;AAAA,MACA,0BAAAD;AAAA;AAVH,IAAAoE,EAAArD,GAAA;AAAA;;;;;;;;;;;;;AAFG;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { s as
|
|
1
|
+
import { s as k, h as H, as as G, a5 as D, a as Q, b as y, E as V, F as j, aM as ee, H as re, d as Y, e as O, a0 as F, a2 as ne, aH as ae, f as X, aJ as fe, a3 as L, bV as ie, aL as le, bW as P, aF as B, aP as ue, g as J, m as se, bX as oe, bY as te, bZ as ve, b_ as m, aK as U, a4 as W, b$ as z, q as de, aB as ce, c0 as pe, c1 as _e, aE as he, ai as ge } from "./index-CMvsSnts.js";
|
|
2
2
|
function Ae(e, i) {
|
|
3
3
|
return i;
|
|
4
4
|
}
|
|
5
5
|
function Ee(e, i, l) {
|
|
6
6
|
for (var d = [], g = i.length, s, u = i.length, p = 0; p < g; p++) {
|
|
7
7
|
let E = i[p];
|
|
8
|
-
|
|
8
|
+
W(
|
|
9
9
|
E,
|
|
10
10
|
() => {
|
|
11
11
|
if (s) {
|
|
@@ -14,7 +14,7 @@ function Ee(e, i, l) {
|
|
|
14
14
|
/** @type {Set<EachOutroGroup>} */
|
|
15
15
|
e.outrogroups
|
|
16
16
|
);
|
|
17
|
-
q(
|
|
17
|
+
q(B(s.done)), o.delete(s), o.size === 0 && (e.outrogroups = null);
|
|
18
18
|
}
|
|
19
19
|
} else
|
|
20
20
|
u -= 1;
|
|
@@ -45,46 +45,46 @@ function q(e, i = !0) {
|
|
|
45
45
|
for (var l = 0; l < e.length; l++)
|
|
46
46
|
ge(e[l], i);
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var K;
|
|
49
49
|
function Ce(e, i, l, d, g, s = null) {
|
|
50
|
-
var u = e, p = /* @__PURE__ */ new Map(), f = (i &
|
|
50
|
+
var u = e, p = /* @__PURE__ */ new Map(), f = (i & P) !== 0;
|
|
51
51
|
if (f) {
|
|
52
52
|
var t = (
|
|
53
53
|
/** @type {Element} */
|
|
54
54
|
e
|
|
55
55
|
);
|
|
56
|
-
u = H ?
|
|
56
|
+
u = H ? k(G(t)) : t.appendChild(D());
|
|
57
57
|
}
|
|
58
58
|
H && Q();
|
|
59
59
|
var n = null, E = j(() => {
|
|
60
60
|
var a = l();
|
|
61
|
-
return ue(a) ? a : a == null ? [] :
|
|
61
|
+
return ue(a) ? a : a == null ? [] : B(a);
|
|
62
62
|
}), o, c = !0;
|
|
63
63
|
function b() {
|
|
64
|
-
r.fallback = n, me(r, o, u, i, d), n !== null && (o.length === 0 ? (n.f & m) === 0 ?
|
|
64
|
+
r.fallback = n, me(r, o, u, i, d), n !== null && (o.length === 0 ? (n.f & m) === 0 ? U(n) : (n.f ^= m, R(n, null, u)) : W(n, () => {
|
|
65
65
|
n = null;
|
|
66
66
|
}));
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var w = y(() => {
|
|
69
69
|
o = /** @type {V[]} */
|
|
70
|
-
|
|
70
|
+
V(E);
|
|
71
71
|
var a = o.length;
|
|
72
|
-
let
|
|
72
|
+
let I = !1;
|
|
73
73
|
if (H) {
|
|
74
74
|
var N = ee(u) === re;
|
|
75
|
-
N !== (a === 0) && (u =
|
|
75
|
+
N !== (a === 0) && (u = Y(), k(u), O(!1), I = !0);
|
|
76
76
|
}
|
|
77
77
|
for (var h = /* @__PURE__ */ new Set(), A = (
|
|
78
78
|
/** @type {Batch} */
|
|
79
79
|
fe
|
|
80
80
|
), S = le(), _ = 0; _ < a; _ += 1) {
|
|
81
|
-
H &&
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
H && F.nodeType === ne && /** @type {Comment} */
|
|
82
|
+
F.data === ae && (u = /** @type {Comment} */
|
|
83
|
+
F, I = !0, O(!1));
|
|
84
84
|
var C = o[_], x = d(C, _), v = c ? null : p.get(x);
|
|
85
85
|
v ? (v.v && X(v.v, C), v.i && X(v.i, _), S && A.unskip_effect(v.e)) : (v = Te(
|
|
86
86
|
p,
|
|
87
|
-
c ? u :
|
|
87
|
+
c ? u : K ??= D(),
|
|
88
88
|
C,
|
|
89
89
|
x,
|
|
90
90
|
_,
|
|
@@ -93,67 +93,67 @@ function Ce(e, i, l, d, g, s = null) {
|
|
|
93
93
|
l
|
|
94
94
|
), c || (v.e.f |= m), p.set(x, v)), h.add(x);
|
|
95
95
|
}
|
|
96
|
-
if (a === 0 && s && !n && (c ? n = L(() => s(u)) : (n = L(() => s(
|
|
96
|
+
if (a === 0 && s && !n && (c ? n = L(() => s(u)) : (n = L(() => s(K ??= D())), n.f |= m)), a > h.size && ie(), H && a > 0 && k(Y()), !c)
|
|
97
97
|
if (S) {
|
|
98
|
-
for (const [
|
|
99
|
-
h.has(
|
|
98
|
+
for (const [Z, $] of p)
|
|
99
|
+
h.has(Z) || A.skip_effect($.e);
|
|
100
100
|
A.oncommit(b), A.ondiscard(() => {
|
|
101
101
|
});
|
|
102
102
|
} else
|
|
103
103
|
b();
|
|
104
|
-
|
|
105
|
-
}), r = { effect:
|
|
106
|
-
c = !1, H && (u =
|
|
104
|
+
I && O(!0), V(E);
|
|
105
|
+
}), r = { effect: w, items: p, outrogroups: null, fallback: n };
|
|
106
|
+
c = !1, H && (u = F);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function M(e) {
|
|
109
109
|
for (; e !== null && (e.f & pe) === 0; )
|
|
110
110
|
e = e.next;
|
|
111
111
|
return e;
|
|
112
112
|
}
|
|
113
113
|
function me(e, i, l, d, g) {
|
|
114
|
-
var s = (d & _e) !== 0, u = i.length, p = e.items, f =
|
|
114
|
+
var s = (d & _e) !== 0, u = i.length, p = e.items, f = M(e.effect.first), t, n = null, E, o = [], c = [], b, w, r, a;
|
|
115
115
|
if (s)
|
|
116
116
|
for (a = 0; a < u; a += 1)
|
|
117
|
-
b = i[a],
|
|
118
|
-
p.get(
|
|
117
|
+
b = i[a], w = g(b, a), r = /** @type {EachItem} */
|
|
118
|
+
p.get(w).e, (r.f & m) === 0 && (r.nodes?.a?.measure(), (E ??= /* @__PURE__ */ new Set()).add(r));
|
|
119
119
|
for (a = 0; a < u; a += 1) {
|
|
120
|
-
if (b = i[a],
|
|
121
|
-
p.get(
|
|
120
|
+
if (b = i[a], w = g(b, a), r = /** @type {EachItem} */
|
|
121
|
+
p.get(w).e, e.outrogroups !== null)
|
|
122
122
|
for (const v of e.outrogroups)
|
|
123
123
|
v.pending.delete(r), v.done.delete(r);
|
|
124
124
|
if ((r.f & m) !== 0)
|
|
125
125
|
if (r.f ^= m, r === f)
|
|
126
|
-
|
|
126
|
+
R(r, null, l);
|
|
127
127
|
else {
|
|
128
|
-
var
|
|
129
|
-
r === e.effect.last && (e.effect.last = r.prev), r.prev && (r.prev.next = r.next), r.next && (r.next.prev = r.prev), T(e, n, r), T(e, r,
|
|
128
|
+
var I = n ? n.next : f;
|
|
129
|
+
r === e.effect.last && (e.effect.last = r.prev), r.prev && (r.prev.next = r.next), r.next && (r.next.prev = r.prev), T(e, n, r), T(e, r, I), R(r, I, l), n = r, o = [], c = [], f = M(n.next);
|
|
130
130
|
continue;
|
|
131
131
|
}
|
|
132
|
-
if ((r.f & z) !== 0 && (
|
|
132
|
+
if ((r.f & z) !== 0 && (U(r), s && (r.nodes?.a?.unfix(), (E ??= /* @__PURE__ */ new Set()).delete(r))), r !== f) {
|
|
133
133
|
if (t !== void 0 && t.has(r)) {
|
|
134
134
|
if (o.length < c.length) {
|
|
135
135
|
var N = c[0], h;
|
|
136
136
|
n = N.prev;
|
|
137
137
|
var A = o[0], S = o[o.length - 1];
|
|
138
138
|
for (h = 0; h < o.length; h += 1)
|
|
139
|
-
|
|
139
|
+
R(o[h], N, l);
|
|
140
140
|
for (h = 0; h < c.length; h += 1)
|
|
141
141
|
t.delete(c[h]);
|
|
142
142
|
T(e, A.prev, S.next), T(e, n, A), T(e, S, N), f = N, n = S, a -= 1, o = [], c = [];
|
|
143
143
|
} else
|
|
144
|
-
t.delete(r),
|
|
144
|
+
t.delete(r), R(r, f, l), T(e, r.prev, r.next), T(e, r, n === null ? e.effect.first : n.next), T(e, n, r), n = r;
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
147
147
|
for (o = [], c = []; f !== null && f !== r; )
|
|
148
|
-
(t ??= /* @__PURE__ */ new Set()).add(f), c.push(f), f =
|
|
148
|
+
(t ??= /* @__PURE__ */ new Set()).add(f), c.push(f), f = M(f.next);
|
|
149
149
|
if (f === null)
|
|
150
150
|
continue;
|
|
151
151
|
}
|
|
152
|
-
(r.f & m) === 0 && o.push(r), n = r, f =
|
|
152
|
+
(r.f & m) === 0 && o.push(r), n = r, f = M(r.next);
|
|
153
153
|
}
|
|
154
154
|
if (e.outrogroups !== null) {
|
|
155
155
|
for (const v of e.outrogroups)
|
|
156
|
-
v.pending.size === 0 && (q(
|
|
156
|
+
v.pending.size === 0 && (q(B(v.done)), e.outrogroups?.delete(v));
|
|
157
157
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
158
158
|
}
|
|
159
159
|
if (f !== null || t !== void 0) {
|
|
@@ -162,10 +162,10 @@ function me(e, i, l, d, g) {
|
|
|
162
162
|
for (r of t)
|
|
163
163
|
(r.f & z) === 0 && _.push(r);
|
|
164
164
|
for (; f !== null; )
|
|
165
|
-
(f.f & z) === 0 && f !== e.fallback && _.push(f), f =
|
|
165
|
+
(f.f & z) === 0 && f !== e.fallback && _.push(f), f = M(f.next);
|
|
166
166
|
var C = _.length;
|
|
167
167
|
if (C > 0) {
|
|
168
|
-
var x = (d &
|
|
168
|
+
var x = (d & P) !== 0 && u === 0 ? l : null;
|
|
169
169
|
if (s) {
|
|
170
170
|
for (a = 0; a < C; a += 1)
|
|
171
171
|
_[a].nodes?.a?.measure();
|
|
@@ -182,7 +182,7 @@ function me(e, i, l, d, g) {
|
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
function Te(e, i, l, d, g, s, u, p) {
|
|
185
|
-
var f = (u & te) !== 0 ? (u & ve) === 0 ? se(l, !1, !1) :
|
|
185
|
+
var f = (u & te) !== 0 ? (u & ve) === 0 ? se(l, !1, !1) : J(l) : null, t = (u & oe) !== 0 ? J(g) : null;
|
|
186
186
|
return {
|
|
187
187
|
v: f,
|
|
188
188
|
i: t,
|
|
@@ -191,7 +191,7 @@ function Te(e, i, l, d, g, s, u, p) {
|
|
|
191
191
|
}))
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function R(e, i, l) {
|
|
195
195
|
if (e.nodes)
|
|
196
196
|
for (var d = e.nodes.start, g = e.nodes.end, s = i && (i.f & m) === 0 ? (
|
|
197
197
|
/** @type {EffectNodes} */
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
Ce as e,
|
|
214
214
|
Ae as i
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=each-
|
|
216
|
+
//# sourceMappingURL=each-BqMsIE1Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"each-DDTBsf6R.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\n/** @import { Batch } from '../../reactivity/batch.js'; */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tshould_defer_append\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { BRANCH_EFFECT, COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\nimport { current_batch } from '../../reactivity/batch.js';\nimport * as e from '../../errors.js';\n\n// When making substantive changes to this file, validate them with the each block stress test:\n// https://svelte.dev/playground/1972b2cf46564476ad8c8c6405b23b7b\n// This test also exists in this repo, as `packages/svelte/tests/manual/each-stress-test`\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {Effect[]} to_destroy\n * @param {null | Node} controlled_anchor\n */\nfunction pause_effects(state, to_destroy, controlled_anchor) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = to_destroy.length;\n\n\t/** @type {EachOutroGroup} */\n\tvar group;\n\tvar remaining = to_destroy.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tlet effect = to_destroy[i];\n\n\t\tpause_effect(\n\t\t\teffect,\n\t\t\t() => {\n\t\t\t\tif (group) {\n\t\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\t\tgroup.done.add(effect);\n\n\t\t\t\t\tif (group.pending.size === 0) {\n\t\t\t\t\t\tvar groups = /** @type {Set<EachOutroGroup>} */ (state.outrogroups);\n\n\t\t\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\t\t\tgroups.delete(group);\n\n\t\t\t\t\t\tif (groups.size === 0) {\n\t\t\t\t\t\t\tstate.outrogroups = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tremaining -= 1;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\tif (remaining === 0) {\n\t\t// If we're in a controlled each block (i.e. the block is the only child of an\n\t\t// element), and we are removing all items, _and_ there are no out transitions,\n\t\t// we can use the fast path — emptying the element and replacing the anchor\n\t\tvar fast_path = transitions.length === 0 && controlled_anchor !== null;\n\n\t\tif (fast_path) {\n\t\t\tvar anchor = /** @type {Element} */ (controlled_anchor);\n\t\t\tvar parent_node = /** @type {Element} */ (anchor.parentNode);\n\n\t\t\tclear_text_content(parent_node);\n\t\t\tparent_node.append(anchor);\n\n\t\t\tstate.items.clear();\n\t\t}\n\n\t\tdestroy_effects(to_destroy, !fast_path);\n\t} else {\n\t\tgroup = {\n\t\t\tpending: new Set(to_destroy),\n\t\t\tdone: new Set()\n\t\t};\n\n\t\t(state.outrogroups ??= new Set()).add(group);\n\t}\n}\n\n/**\n * @param {Effect[]} to_destroy\n * @param {boolean} remove_dom\n */\nfunction destroy_effects(to_destroy, remove_dom = true) {\n\t// TODO only destroy effects if no pending batch needs them. otherwise,\n\t// just re-add the `EFFECT_OFFSCREEN` flag\n\tfor (var i = 0; i < to_destroy.length; i++) {\n\t\tdestroy_effect(to_destroy[i], remove_dom);\n\t}\n}\n\n/** @type {TemplateNode} */\nvar offscreen_anchor;\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource<V>, index: MaybeSource<number>) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {Map<any, EachItem>} */\n\tvar items = new Map();\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(get_first_child(parent_node))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\t/** @type {V[]} */\n\tvar array;\n\n\tvar first_run = true;\n\n\tfunction commit() {\n\t\tstate.fallback = fallback;\n\t\treconcile(state, array, anchor, flags, get_key);\n\n\t\tif (fallback !== null) {\n\t\t\tif (array.length === 0) {\n\t\t\t\tif ((fallback.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback.f ^= EFFECT_OFFSCREEN;\n\t\t\t\t\tmove(fallback, null, anchor);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\t// TODO only null out if no pending batch needs it,\n\t\t\t\t\t// otherwise re-add `fallback.fragment` and move the\n\t\t\t\t\t// effect into it\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tvar effect = block(() => {\n\t\tarray = /** @type {V[]} */ (get(each_array));\n\t\tvar length = array.length;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\tvar keys = new Set();\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tfor (var index = 0; index < length; index += 1) {\n\t\t\tif (\n\t\t\t\thydrating &&\n\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t) {\n\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\tmismatch = true;\n\t\t\t\tset_hydrating(false);\n\t\t\t}\n\n\t\t\tvar value = array[index];\n\t\t\tvar key = get_key(value, index);\n\n\t\t\tvar item = first_run ? null : items.get(key);\n\n\t\t\tif (item) {\n\t\t\t\t// update before reconciliation, to trigger any async updates\n\t\t\t\tif (item.v) internal_set(item.v, value);\n\t\t\t\tif (item.i) internal_set(item.i, index);\n\n\t\t\t\tif (defer) {\n\t\t\t\t\tbatch.unskip_effect(item.e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem = create_item(\n\t\t\t\t\titems,\n\t\t\t\t\tfirst_run ? anchor : (offscreen_anchor ??= create_text()),\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\n\t\t\t\tif (!first_run) {\n\t\t\t\t\titem.e.f |= EFFECT_OFFSCREEN;\n\t\t\t\t}\n\n\t\t\t\titems.set(key, item);\n\t\t\t}\n\n\t\t\tkeys.add(key);\n\t\t}\n\n\t\tif (length === 0 && fallback_fn && !fallback) {\n\t\t\tif (first_run) {\n\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t} else {\n\t\t\t\tfallback = branch(() => fallback_fn((offscreen_anchor ??= create_text())));\n\t\t\t\tfallback.f |= EFFECT_OFFSCREEN;\n\t\t\t}\n\t\t}\n\n\t\tif (length > keys.size) {\n\t\t\tif (DEV) {\n\t\t\t\tvalidate_each_keys(array, get_key);\n\t\t\t} else {\n\t\t\t\t// in prod, the additional information isn't printed, so don't bother computing it\n\t\t\t\te.each_key_duplicate('', '', '');\n\t\t\t}\n\t\t}\n\n\t\t// remove excess nodes\n\t\tif (hydrating && length > 0) {\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t}\n\n\t\tif (!first_run) {\n\t\t\tif (defer) {\n\t\t\t\tfor (const [key, item] of items) {\n\t\t\t\t\tif (!keys.has(key)) {\n\t\t\t\t\t\tbatch.skip_effect(item.e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbatch.oncommit(commit);\n\t\t\t\tbatch.ondiscard(() => {\n\t\t\t\t\t// TODO presumably we need to do something here?\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcommit();\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\t/** @type {EachState} */\n\tvar state = { effect, flags, items, outrogroups: null, fallback };\n\n\tfirst_run = false;\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect\n * @param {Effect | null} effect\n * @returns {Effect | null}\n */\nfunction skip_to_branch(effect) {\n\twhile (effect !== null && (effect.f & BRANCH_EFFECT) === 0) {\n\t\teffect = effect.next;\n\t}\n\treturn effect;\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {EachState} state\n * @param {Array<V>} array\n * @param {Element | Comment | Text} anchor\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @returns {void}\n */\nfunction reconcile(state, array, anchor, flags, get_key) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar current = skip_to_branch(state.effect.first);\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar seen;\n\n\t/** @type {Effect | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar to_animate;\n\n\t/** @type {Effect[]} */\n\tvar matched = [];\n\n\t/** @type {Effect[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {Effect | undefined} */\n\tvar effect;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\t\t// offscreen == coming in now, no animation in that case,\n\t\t\t// else this would happen https://github.com/sveltejs/svelte/issues/17181\n\t\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\teffect.nodes?.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(effect);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\n\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\tif (state.outrogroups !== null) {\n\t\t\tfor (const group of state.outrogroups) {\n\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\tgroup.done.delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) !== 0) {\n\t\t\teffect.f ^= EFFECT_OFFSCREEN;\n\n\t\t\tif (effect === current) {\n\t\t\t\tmove(effect, null, anchor);\n\t\t\t} else {\n\t\t\t\tvar next = prev ? prev.next : current;\n\n\t\t\t\tif (effect === state.effect.last) {\n\t\t\t\t\tstate.effect.last = effect.prev;\n\t\t\t\t}\n\n\t\t\t\tif (effect.prev) effect.prev.next = effect.next;\n\t\t\t\tif (effect.next) effect.next.prev = effect.prev;\n\t\t\t\tlink(state, prev, effect);\n\t\t\t\tlink(state, effect, next);\n\n\t\t\t\tmove(effect, next, anchor);\n\t\t\t\tprev = effect;\n\n\t\t\t\tmatched = [];\n\t\t\t\tstashed = [];\n\n\t\t\t\tcurrent = skip_to_branch(prev.next);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & INERT) !== 0) {\n\t\t\tresume_effect(effect);\n\t\t\tif (is_animated) {\n\t\t\t\teffect.nodes?.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif (effect !== current) {\n\t\t\tif (seen !== undefined && seen.has(effect)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(effect);\n\t\t\t\t\tmove(effect, current, anchor);\n\n\t\t\t\t\tlink(state, effect.prev, effect.next);\n\t\t\t\t\tlink(state, effect, prev === null ? state.effect.first : prev.next);\n\t\t\t\t\tlink(state, prev, effect);\n\n\t\t\t\t\tprev = effect;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current !== effect) {\n\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = skip_to_branch(current.next);\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\tmatched.push(effect);\n\t\t}\n\n\t\tprev = effect;\n\t\tcurrent = skip_to_branch(effect.next);\n\t}\n\n\tif (state.outrogroups !== null) {\n\t\tfor (const group of state.outrogroups) {\n\t\t\tif (group.pending.size === 0) {\n\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\tstate.outrogroups?.delete(group);\n\t\t\t}\n\t\t}\n\n\t\tif (state.outrogroups.size === 0) {\n\t\t\tstate.outrogroups = null;\n\t\t}\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\t/** @type {Effect[]} */\n\t\tvar to_destroy = [];\n\n\t\tif (seen !== undefined) {\n\t\t\tfor (effect of seen) {\n\t\t\t\tif ((effect.f & INERT) === 0) {\n\t\t\t\t\tto_destroy.push(effect);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.f & INERT) === 0 && current !== state.fallback) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\n\t\t\tcurrent = skip_to_branch(current.next);\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (effect of to_animate) {\n\t\t\t\teffect.nodes?.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @template V\n * @param {Map<any, EachItem>} items\n * @param {Node} anchor\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(items, anchor, value, key, index, render_fn, flags, get_collection) {\n\tvar v =\n\t\t(flags & EACH_ITEM_REACTIVE) !== 0\n\t\t\t? (flags & EACH_ITEM_IMMUTABLE) === 0\n\t\t\t\t? mutable_source(value, false, false)\n\t\t\t\t: source(value)\n\t\t\t: null;\n\n\tvar i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index) : null;\n\n\tif (DEV && v) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\tv.trace = () => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[i?.v ?? index];\n\t\t};\n\t}\n\n\treturn {\n\t\tv,\n\t\ti,\n\t\te: branch(() => {\n\t\t\trender_fn(anchor, v ?? value, i ?? index, get_collection);\n\n\t\t\treturn () => {\n\t\t\t\titems.delete(key);\n\t\t\t};\n\t\t})\n\t};\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(effect, next, anchor) {\n\tif (!effect.nodes) return;\n\n\tvar node = effect.nodes.start;\n\tvar end = effect.nodes.end;\n\n\tvar dest =\n\t\tnext && (next.f & EFFECT_OFFSCREEN) === 0\n\t\t\t? /** @type {EffectNodes} */ (next.nodes).start\n\t\t\t: anchor;\n\n\twhile (node !== null) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\n\t\tif (node === end) {\n\t\t\treturn;\n\t\t}\n\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {Effect | null} prev\n * @param {Effect | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.effect.first = next;\n\t} else {\n\t\tprev.next = next;\n\t}\n\n\tif (next === null) {\n\t\tstate.effect.last = prev;\n\t} else {\n\t\tnext.prev = prev;\n\t}\n}\n\n/**\n * @param {Array<any>} array\n * @param {(item: any, index: number) => string} key_fn\n * @returns {void}\n */\nfunction validate_each_keys(array, key_fn) {\n\tconst keys = new Map();\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst key = key_fn(array[i], i);\n\n\t\tif (keys.has(key)) {\n\t\t\tconst a = String(keys.get(key));\n\t\t\tconst b = String(i);\n\n\t\t\t/** @type {string | null} */\n\t\t\tlet k = String(key);\n\t\t\tif (k.startsWith('[object ')) k = null;\n\n\t\t\te.each_key_duplicate(a, b, k);\n\t\t}\n\n\t\tkeys.set(key, i);\n\t}\n}\n"],"names":["index","_","pause_effects","state","to_destroy","controlled_anchor","transitions","length","group","remaining","i","effect","pause_effect","groups","destroy_effects","array_from","fast_path","anchor","parent_node","clear_text_content","remove_dom","destroy_effect","offscreen_anchor","each","node","flags","get_collection","get_key","render_fn","fallback_fn","items","is_controlled","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","each_array","derived_safe_equal","collection","is_array","array","first_run","commit","reconcile","EFFECT_OFFSCREEN","resume_effect","move","block","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","skip_nodes","set_hydrating","keys","batch","current_batch","defer","should_defer_append","hydrate_node","COMMENT_NODE","HYDRATION_END","value","key","item","internal_set","create_item","branch","e.each_key_duplicate","skip_to_branch","BRANCH_EFFECT","is_animated","EACH_IS_ANIMATED","current","seen","prev","to_animate","matched","stashed","next","link","INERT","start","j","a","b","destroy_length","queue_micro_task","v","EACH_ITEM_REACTIVE","EACH_ITEM_IMMUTABLE","mutable_source","source","EACH_INDEX_REACTIVE","end","dest","next_node","get_next_sibling"],"mappings":";AAoDO,SAASA,GAAMC,GAAG,GAAG;AAC3B,SAAO;AACR;AASA,SAASC,GAAcC,GAAOC,GAAYC,GAAmB;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EnBwF,IACHhB,MAASA,EAAK,IAAIpC,OAAsB;AAAA;AAAA,MACToC,EAAK,MAAO;AAAA,QACxClE,GAEGO,MAAS,QAAM;AACrB,UAAI4E;AAAA;AAAA,QAAyCC,GAAiB7E,CAAI;AAAA;AAGlE,UAFA2E,EAAK,OAAO3E,CAAI,GAEZA,MAAS0E;AACZ;AAGD,MAAA1E,IAAO4E;AAAA,IACR;AACD;AAOA,SAAShB,EAAKjF,GAAO4E,GAAMI,GAAM;AAChC,EAAIJ,MAAS,OACZ5E,EAAM,OAAO,QAAQgF,IAErBJ,EAAK,OAAOI,GAGTA,MAAS,OACZhF,EAAM,OAAO,OAAO4E,IAEpBI,EAAK,OAAOJ;AAEd;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"each-BqMsIE1Y.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\n/** @import { Batch } from '../../reactivity/batch.js'; */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tshould_defer_append\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { BRANCH_EFFECT, COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\nimport { current_batch } from '../../reactivity/batch.js';\nimport * as e from '../../errors.js';\n\n// When making substantive changes to this file, validate them with the each block stress test:\n// https://svelte.dev/playground/1972b2cf46564476ad8c8c6405b23b7b\n// This test also exists in this repo, as `packages/svelte/tests/manual/each-stress-test`\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {Effect[]} to_destroy\n * @param {null | Node} controlled_anchor\n */\nfunction pause_effects(state, to_destroy, controlled_anchor) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = to_destroy.length;\n\n\t/** @type {EachOutroGroup} */\n\tvar group;\n\tvar remaining = to_destroy.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tlet effect = to_destroy[i];\n\n\t\tpause_effect(\n\t\t\teffect,\n\t\t\t() => {\n\t\t\t\tif (group) {\n\t\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\t\tgroup.done.add(effect);\n\n\t\t\t\t\tif (group.pending.size === 0) {\n\t\t\t\t\t\tvar groups = /** @type {Set<EachOutroGroup>} */ (state.outrogroups);\n\n\t\t\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\t\t\tgroups.delete(group);\n\n\t\t\t\t\t\tif (groups.size === 0) {\n\t\t\t\t\t\t\tstate.outrogroups = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tremaining -= 1;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t}\n\n\tif (remaining === 0) {\n\t\t// If we're in a controlled each block (i.e. the block is the only child of an\n\t\t// element), and we are removing all items, _and_ there are no out transitions,\n\t\t// we can use the fast path — emptying the element and replacing the anchor\n\t\tvar fast_path = transitions.length === 0 && controlled_anchor !== null;\n\n\t\tif (fast_path) {\n\t\t\tvar anchor = /** @type {Element} */ (controlled_anchor);\n\t\t\tvar parent_node = /** @type {Element} */ (anchor.parentNode);\n\n\t\t\tclear_text_content(parent_node);\n\t\t\tparent_node.append(anchor);\n\n\t\t\tstate.items.clear();\n\t\t}\n\n\t\tdestroy_effects(to_destroy, !fast_path);\n\t} else {\n\t\tgroup = {\n\t\t\tpending: new Set(to_destroy),\n\t\t\tdone: new Set()\n\t\t};\n\n\t\t(state.outrogroups ??= new Set()).add(group);\n\t}\n}\n\n/**\n * @param {Effect[]} to_destroy\n * @param {boolean} remove_dom\n */\nfunction destroy_effects(to_destroy, remove_dom = true) {\n\t// TODO only destroy effects if no pending batch needs them. otherwise,\n\t// just re-add the `EFFECT_OFFSCREEN` flag\n\tfor (var i = 0; i < to_destroy.length; i++) {\n\t\tdestroy_effect(to_destroy[i], remove_dom);\n\t}\n}\n\n/** @type {TemplateNode} */\nvar offscreen_anchor;\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource<V>, index: MaybeSource<number>) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {Map<any, EachItem>} */\n\tvar items = new Map();\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(get_first_child(parent_node))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\t/** @type {V[]} */\n\tvar array;\n\n\tvar first_run = true;\n\n\tfunction commit() {\n\t\tstate.fallback = fallback;\n\t\treconcile(state, array, anchor, flags, get_key);\n\n\t\tif (fallback !== null) {\n\t\t\tif (array.length === 0) {\n\t\t\t\tif ((fallback.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback.f ^= EFFECT_OFFSCREEN;\n\t\t\t\t\tmove(fallback, null, anchor);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\t// TODO only null out if no pending batch needs it,\n\t\t\t\t\t// otherwise re-add `fallback.fragment` and move the\n\t\t\t\t\t// effect into it\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tvar effect = block(() => {\n\t\tarray = /** @type {V[]} */ (get(each_array));\n\t\tvar length = array.length;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\tvar keys = new Set();\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tfor (var index = 0; index < length; index += 1) {\n\t\t\tif (\n\t\t\t\thydrating &&\n\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t) {\n\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\tmismatch = true;\n\t\t\t\tset_hydrating(false);\n\t\t\t}\n\n\t\t\tvar value = array[index];\n\t\t\tvar key = get_key(value, index);\n\n\t\t\tvar item = first_run ? null : items.get(key);\n\n\t\t\tif (item) {\n\t\t\t\t// update before reconciliation, to trigger any async updates\n\t\t\t\tif (item.v) internal_set(item.v, value);\n\t\t\t\tif (item.i) internal_set(item.i, index);\n\n\t\t\t\tif (defer) {\n\t\t\t\t\tbatch.unskip_effect(item.e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem = create_item(\n\t\t\t\t\titems,\n\t\t\t\t\tfirst_run ? anchor : (offscreen_anchor ??= create_text()),\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\n\t\t\t\tif (!first_run) {\n\t\t\t\t\titem.e.f |= EFFECT_OFFSCREEN;\n\t\t\t\t}\n\n\t\t\t\titems.set(key, item);\n\t\t\t}\n\n\t\t\tkeys.add(key);\n\t\t}\n\n\t\tif (length === 0 && fallback_fn && !fallback) {\n\t\t\tif (first_run) {\n\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t} else {\n\t\t\t\tfallback = branch(() => fallback_fn((offscreen_anchor ??= create_text())));\n\t\t\t\tfallback.f |= EFFECT_OFFSCREEN;\n\t\t\t}\n\t\t}\n\n\t\tif (length > keys.size) {\n\t\t\tif (DEV) {\n\t\t\t\tvalidate_each_keys(array, get_key);\n\t\t\t} else {\n\t\t\t\t// in prod, the additional information isn't printed, so don't bother computing it\n\t\t\t\te.each_key_duplicate('', '', '');\n\t\t\t}\n\t\t}\n\n\t\t// remove excess nodes\n\t\tif (hydrating && length > 0) {\n\t\t\tset_hydrate_node(skip_nodes());\n\t\t}\n\n\t\tif (!first_run) {\n\t\t\tif (defer) {\n\t\t\t\tfor (const [key, item] of items) {\n\t\t\t\t\tif (!keys.has(key)) {\n\t\t\t\t\t\tbatch.skip_effect(item.e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbatch.oncommit(commit);\n\t\t\t\tbatch.ondiscard(() => {\n\t\t\t\t\t// TODO presumably we need to do something here?\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcommit();\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\t/** @type {EachState} */\n\tvar state = { effect, flags, items, outrogroups: null, fallback };\n\n\tfirst_run = false;\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect\n * @param {Effect | null} effect\n * @returns {Effect | null}\n */\nfunction skip_to_branch(effect) {\n\twhile (effect !== null && (effect.f & BRANCH_EFFECT) === 0) {\n\t\teffect = effect.next;\n\t}\n\treturn effect;\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {EachState} state\n * @param {Array<V>} array\n * @param {Element | Comment | Text} anchor\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @returns {void}\n */\nfunction reconcile(state, array, anchor, flags, get_key) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar current = skip_to_branch(state.effect.first);\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar seen;\n\n\t/** @type {Effect | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<Effect>} */\n\tvar to_animate;\n\n\t/** @type {Effect[]} */\n\tvar matched = [];\n\n\t/** @type {Effect[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {Effect | undefined} */\n\tvar effect;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\t\t// offscreen == coming in now, no animation in that case,\n\t\t\t// else this would happen https://github.com/sveltejs/svelte/issues/17181\n\t\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\t\teffect.nodes?.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(effect);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\n\t\teffect = /** @type {EachItem} */ (items.get(key)).e;\n\n\t\tif (state.outrogroups !== null) {\n\t\t\tfor (const group of state.outrogroups) {\n\t\t\t\tgroup.pending.delete(effect);\n\t\t\t\tgroup.done.delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) !== 0) {\n\t\t\teffect.f ^= EFFECT_OFFSCREEN;\n\n\t\t\tif (effect === current) {\n\t\t\t\tmove(effect, null, anchor);\n\t\t\t} else {\n\t\t\t\tvar next = prev ? prev.next : current;\n\n\t\t\t\tif (effect === state.effect.last) {\n\t\t\t\t\tstate.effect.last = effect.prev;\n\t\t\t\t}\n\n\t\t\t\tif (effect.prev) effect.prev.next = effect.next;\n\t\t\t\tif (effect.next) effect.next.prev = effect.prev;\n\t\t\t\tlink(state, prev, effect);\n\t\t\t\tlink(state, effect, next);\n\n\t\t\t\tmove(effect, next, anchor);\n\t\t\t\tprev = effect;\n\n\t\t\t\tmatched = [];\n\t\t\t\tstashed = [];\n\n\t\t\t\tcurrent = skip_to_branch(prev.next);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & INERT) !== 0) {\n\t\t\tresume_effect(effect);\n\t\t\tif (is_animated) {\n\t\t\t\teffect.nodes?.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(effect);\n\t\t\t}\n\t\t}\n\n\t\tif (effect !== current) {\n\t\t\tif (seen !== undefined && seen.has(effect)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(effect);\n\t\t\t\t\tmove(effect, current, anchor);\n\n\t\t\t\t\tlink(state, effect.prev, effect.next);\n\t\t\t\t\tlink(state, effect, prev === null ? state.effect.first : prev.next);\n\t\t\t\t\tlink(state, prev, effect);\n\n\t\t\t\t\tprev = effect;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current !== effect) {\n\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = skip_to_branch(current.next);\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif ((effect.f & EFFECT_OFFSCREEN) === 0) {\n\t\t\tmatched.push(effect);\n\t\t}\n\n\t\tprev = effect;\n\t\tcurrent = skip_to_branch(effect.next);\n\t}\n\n\tif (state.outrogroups !== null) {\n\t\tfor (const group of state.outrogroups) {\n\t\t\tif (group.pending.size === 0) {\n\t\t\t\tdestroy_effects(array_from(group.done));\n\t\t\t\tstate.outrogroups?.delete(group);\n\t\t\t}\n\t\t}\n\n\t\tif (state.outrogroups.size === 0) {\n\t\t\tstate.outrogroups = null;\n\t\t}\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\t/** @type {Effect[]} */\n\t\tvar to_destroy = [];\n\n\t\tif (seen !== undefined) {\n\t\t\tfor (effect of seen) {\n\t\t\t\tif ((effect.f & INERT) === 0) {\n\t\t\t\t\tto_destroy.push(effect);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.f & INERT) === 0 && current !== state.fallback) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\n\t\t\tcurrent = skip_to_branch(current.next);\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].nodes?.a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (effect of to_animate) {\n\t\t\t\teffect.nodes?.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @template V\n * @param {Map<any, EachItem>} items\n * @param {Node} anchor\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(items, anchor, value, key, index, render_fn, flags, get_collection) {\n\tvar v =\n\t\t(flags & EACH_ITEM_REACTIVE) !== 0\n\t\t\t? (flags & EACH_ITEM_IMMUTABLE) === 0\n\t\t\t\t? mutable_source(value, false, false)\n\t\t\t\t: source(value)\n\t\t\t: null;\n\n\tvar i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index) : null;\n\n\tif (DEV && v) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\tv.trace = () => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[i?.v ?? index];\n\t\t};\n\t}\n\n\treturn {\n\t\tv,\n\t\ti,\n\t\te: branch(() => {\n\t\t\trender_fn(anchor, v ?? value, i ?? index, get_collection);\n\n\t\t\treturn () => {\n\t\t\t\titems.delete(key);\n\t\t\t};\n\t\t})\n\t};\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(effect, next, anchor) {\n\tif (!effect.nodes) return;\n\n\tvar node = effect.nodes.start;\n\tvar end = effect.nodes.end;\n\n\tvar dest =\n\t\tnext && (next.f & EFFECT_OFFSCREEN) === 0\n\t\t\t? /** @type {EffectNodes} */ (next.nodes).start\n\t\t\t: anchor;\n\n\twhile (node !== null) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\n\t\tif (node === end) {\n\t\t\treturn;\n\t\t}\n\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {Effect | null} prev\n * @param {Effect | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.effect.first = next;\n\t} else {\n\t\tprev.next = next;\n\t}\n\n\tif (next === null) {\n\t\tstate.effect.last = prev;\n\t} else {\n\t\tnext.prev = prev;\n\t}\n}\n\n/**\n * @param {Array<any>} array\n * @param {(item: any, index: number) => string} key_fn\n * @returns {void}\n */\nfunction validate_each_keys(array, key_fn) {\n\tconst keys = new Map();\n\tconst length = array.length;\n\n\tfor (let i = 0; i < length; i++) {\n\t\tconst key = key_fn(array[i], i);\n\n\t\tif (keys.has(key)) {\n\t\t\tconst a = String(keys.get(key));\n\t\t\tconst b = String(i);\n\n\t\t\t/** @type {string | null} */\n\t\t\tlet k = String(key);\n\t\t\tif (k.startsWith('[object ')) k = null;\n\n\t\t\te.each_key_duplicate(a, b, k);\n\t\t}\n\n\t\tkeys.set(key, i);\n\t}\n}\n"],"names":["index","_","pause_effects","state","to_destroy","controlled_anchor","transitions","length","group","remaining","i","effect","pause_effect","groups","destroy_effects","array_from","fast_path","anchor","parent_node","clear_text_content","remove_dom","destroy_effect","offscreen_anchor","each","node","flags","get_collection","get_key","render_fn","fallback_fn","items","is_controlled","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","each_array","derived_safe_equal","collection","is_array","array","first_run","commit","reconcile","EFFECT_OFFSCREEN","resume_effect","move","block","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","skip_nodes","set_hydrating","keys","batch","current_batch","defer","should_defer_append","hydrate_node","COMMENT_NODE","HYDRATION_END","value","key","item","internal_set","create_item","branch","e.each_key_duplicate","skip_to_branch","BRANCH_EFFECT","is_animated","EACH_IS_ANIMATED","current","seen","prev","to_animate","matched","stashed","next","link","INERT","start","j","a","b","destroy_length","queue_micro_task","v","EACH_ITEM_REACTIVE","EACH_ITEM_IMMUTABLE","mutable_source","source","EACH_INDEX_REACTIVE","end","dest","next_node","get_next_sibling"],"mappings":";AAoDO,SAASA,GAAMC,GAAG,GAAG;AAC3B,SAAO;AACR;AASA,SAASC,GAAcC,GAAOC,GAAYC,GAAmB;AAS5D,WAPIC,IAAc,CAAA,GACdC,IAASH,EAAW,QAGpBI,GACAC,IAAYL,EAAW,QAElBM,IAAI,GAAGA,IAAIH,GAAQG,KAAK;AAChC,QAAIC,IAASP,EAAWM,CAAC;AAEzB,IAAAE;AAAA,MACCD;AAAA,MACA,MAAM;AACL,YAAIH;AAIH,cAHAA,EAAM,QAAQ,OAAOG,CAAM,GAC3BH,EAAM,KAAK,IAAIG,CAAM,GAEjBH,EAAM,QAAQ,SAAS,GAAG;AAC7B,gBAAIK;AAAA;AAAA,cAA6CV,EAAM;AAAA;AAEvD,YAAAW,EAAgBC,EAAWP,EAAM,IAAI,CAAC,GACtCK,EAAO,OAAOL,CAAK,GAEfK,EAAO,SAAS,MACnBV,EAAM,cAAc;AAAA,UAEtB;AAAA;AAEA,UAAAM,KAAa;AAAA,MAEf;AAAA,MACA;AAAA,IACH;AAAA,EACC;AAEA,MAAIA,MAAc,GAAG;AAIpB,QAAIO,IAAYV,EAAY,WAAW,KAAKD,MAAsB;AAElE,QAAIW,GAAW;AACd,UAAIC;AAAA;AAAA,QAAiCZ;AAAA,SACjCa;AAAA;AAAA,QAAsCD,EAAO;AAAA;AAEjD,MAAAE,GAAmBD,CAAW,GAC9BA,EAAY,OAAOD,CAAM,GAEzBd,EAAM,MAAM,M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C8B,EAAO9B,CAAK,IACb,MAEAxD,KAAKe,IAAQwE,QAAyB,IAAID,EAAOhG,CAAK,IAAI;AAW9D,SAAO;AAAA,IACN,GAAA4F;AAAA,IACA,GAAAlF;AAAA,IACA,GAAG6D,EAAO,OACT3C,EAAUX,GAAQ2E,KAAK1B,GAAOxD,KAAKV,GAAO0B,CAAc,GAEjD,MAAM;AACZ,MAAAI,EAAM,OAAOqC,CAAG;AAAA,IACjB,EACA;AAAA,EACH;AACA;AAOA,SAASlB,EAAKtC,GAAQwE,GAAMlE,GAAQ;AACnC,MAAKN,EAAO;AAUZ,aARIa,IAAOb,EAAO,MAAM,OACpBuF,IAAMvF,EAAO,MAAM,KAEnBwF,IACHhB,MAASA,EAAK,IAAIpC,OAAsB;AAAA;AAAA,MACToC,EAAK,MAAO;AAAA,QACxClE,GAEGO,MAAS,QAAM;AACrB,UAAI4E;AAAA;AAAA,QAAyCC,GAAiB7E,CAAI;AAAA;AAGlE,UAFA2E,EAAK,OAAO3E,CAAI,GAEZA,MAAS0E;AACZ;AAGD,MAAA1E,IAAO4E;AAAA,IACR;AACD;AAOA,SAAShB,EAAKjF,GAAO4E,GAAMI,GAAM;AAChC,EAAIJ,MAAS,OACZ5E,EAAM,OAAO,QAAQgF,IAErBJ,EAAK,OAAOI,GAGTA,MAAS,OACZhF,EAAM,OAAO,OAAO4E,IAEpBI,EAAK,OAAOJ;AAEd;","x_google_ignoreList":[0]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { y as u, h as d, a as _,
|
|
2
|
-
import { y as m, z as
|
|
3
|
-
function
|
|
4
|
-
var l = c,
|
|
1
|
+
import { y as u, h as d, a as _, a1 as y, bs as g, a0 as h, a2 as p, aB as b, aI as w, aC as O, s as R, as as t } from "./index-CMvsSnts.js";
|
|
2
|
+
import { y as m, z as C } from "./AssetItem-Dr8YW0U7.js";
|
|
3
|
+
function D(c, v, i = !1, o = !1, E = !1) {
|
|
4
|
+
var l = c, r = "";
|
|
5
5
|
u(() => {
|
|
6
6
|
var f = (
|
|
7
7
|
/** @type {Effect} */
|
|
8
8
|
y
|
|
9
9
|
);
|
|
10
|
-
if (
|
|
10
|
+
if (r === (r = v() ?? "")) {
|
|
11
11
|
d && _();
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ function A(c, v, i = !1, o = !1, N = !1) {
|
|
|
15
15
|
f.nodes.start,
|
|
16
16
|
/** @type {TemplateNode} */
|
|
17
17
|
f.nodes.end
|
|
18
|
-
), f.nodes = null),
|
|
18
|
+
), f.nodes = null), r !== "") {
|
|
19
19
|
if (d) {
|
|
20
20
|
h.data;
|
|
21
21
|
for (var a = _(), n = a; a !== null && (a.nodeType !== p || /** @type {Comment} */
|
|
@@ -26,9 +26,9 @@ function A(c, v, i = !1, o = !1, N = !1) {
|
|
|
26
26
|
m(h, n), l = R(a);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
30
|
-
i ?
|
|
31
|
-
var e =
|
|
29
|
+
var s = r + "";
|
|
30
|
+
i ? s = `<svg>${s}</svg>` : o && (s = `<math>${s}</math>`);
|
|
31
|
+
var e = C(s);
|
|
32
32
|
if ((i || o) && (e = /** @type {Element} */
|
|
33
33
|
t(e)), m(
|
|
34
34
|
/** @type {TemplateNode} */
|
|
@@ -47,6 +47,6 @@ function A(c, v, i = !1, o = !1, N = !1) {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
D as h
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=html-
|
|
52
|
+
//# sourceMappingURL=html-BofUeBT7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-
|
|
1
|
+
{"version":3,"file":"html-BofUeBT7.js","sources":["../../../node_modules/.pnpm/svelte@5.50.2/node_modules/svelte/src/internal/client/dom/blocks/html.js"],"sourcesContent":["/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\nimport { COMMENT_NODE } from '#client/constants';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string} get_value\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(node, get_value, svg = false, mathml = false, skip_warning = false) {\n\tvar anchor = node;\n\n\tvar value = '';\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes !== null) {\n\t\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\t\teffect.nodes = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (\n\t\t\t\tnext !== null &&\n\t\t\t\t(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')\n\t\t\t) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = get_next_sibling(next);\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\tvar html = value + '';\n\t\tif (svg) html = `<svg>${html}</svg>`;\n\t\telse if (mathml) html = `<math>${html}</math>`;\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = create_fragment_from_html(html);\n\n\t\tif (svg || mathml) {\n\t\t\tnode = /** @type {Element} */ (get_first_child(node));\n\t\t}\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {TemplateNode} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n"],"names":["html","node","get_value","svg","mathml","skip_warning","anchor","value","template_effect","effect","active_effect","hydrating","hydrate_next","remove_effect_dom","hydrate_node","next","last","COMMENT_NODE","get_next_sibling","w.hydration_mismatch","HYDRATION_ERRO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