@credenza3/passport-sui 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/App-D8Bsln9W.js +606 -0
  2. package/dist/App-D8Bsln9W.js.map +1 -0
  3. package/dist/{Button-DdkN4ygx.js → Button-FKUK-FB7.js} +8 -8
  4. package/dist/{Button-DdkN4ygx.js.map → Button-FKUK-FB7.js.map} +1 -1
  5. package/dist/{ButtonBack-DOt6efWB.js → ButtonBack-DVLBbyYt.js} +4 -4
  6. package/dist/{ButtonBack-DOt6efWB.js.map → ButtonBack-DVLBbyYt.js.map} +1 -1
  7. package/dist/{ButtonLink-C3suV3YT.js → ButtonLink-BA_d9t6a.js} +4 -4
  8. package/dist/{ButtonLink-C3suV3YT.js.map → ButtonLink-BA_d9t6a.js.map} +1 -1
  9. package/dist/{ConfirmAccount-B0QimErt.js → ConfirmAccount-XP4R3yKl.js} +51 -51
  10. package/dist/{ConfirmAccount-B0QimErt.js.map → ConfirmAccount-XP4R3yKl.js.map} +1 -1
  11. package/dist/{ContentHeader-DWeKFCbL.js → ContentHeader-DtZj1Hgo.js} +4 -4
  12. package/dist/{ContentHeader-DWeKFCbL.js.map → ContentHeader-DtZj1Hgo.js.map} +1 -1
  13. package/dist/{Error-6xg8-wZJ.js → Error-CSKRMnSS.js} +18 -18
  14. package/dist/{Error-6xg8-wZJ.js.map → Error-CSKRMnSS.js.map} +1 -1
  15. package/dist/{Input-CoBmMhni.js → Input-C7u8hGWy.js} +7 -7
  16. package/dist/{Input-CoBmMhni.js.map → Input-C7u8hGWy.js.map} +1 -1
  17. package/dist/{Label-B8iJ43l6.js → Label-4blmucYF.js} +3 -3
  18. package/dist/{Label-B8iJ43l6.js.map → Label-4blmucYF.js.map} +1 -1
  19. package/dist/Loader-Cu6YpHI4.js +29 -0
  20. package/dist/Loader-Cu6YpHI4.js.map +1 -0
  21. package/dist/{Login-DsclMbeX.js → Login-Cwa8nS7a.js} +79 -78
  22. package/dist/{Login-DsclMbeX.js.map → Login-Cwa8nS7a.js.map} +1 -1
  23. package/dist/{Logout-ClD-Lgcx.js → Logout-sQNv9wRk.js} +17 -17
  24. package/dist/{Logout-ClD-Lgcx.js.map → Logout-sQNv9wRk.js.map} +1 -1
  25. package/dist/Nav-HeCF0rs6.js +669 -0
  26. package/dist/{Nav-DGxksgRd.js.map → Nav-HeCF0rs6.js.map} +1 -1
  27. package/dist/{PassportId-5U1tRgrN.js → PassportId-ChJDp_KV.js} +13 -13
  28. package/dist/{PassportId-5U1tRgrN.js.map → PassportId-ChJDp_KV.js.map} +1 -1
  29. package/dist/{Payment-DXvVU-Oe.js → Payment-DVmk-5zj.js} +119 -118
  30. package/dist/{Payment-DXvVU-Oe.js.map → Payment-DVmk-5zj.js.map} +1 -1
  31. package/dist/{PaymentResult-BDKwT5Sg.js → PaymentResult-BPNUpR6a.js} +62 -62
  32. package/dist/{PaymentResult-BDKwT5Sg.js.map → PaymentResult-BPNUpR6a.js.map} +1 -1
  33. package/dist/{Profile-euztX9tl.js → Profile-DN_Y-fHB.js} +22 -22
  34. package/dist/{Profile-euztX9tl.js.map → Profile-DN_Y-fHB.js.map} +1 -1
  35. package/dist/{ProgressVideo-D4DPjIEy.js → ProgressVideo-BgMprzFf.js} +21 -21
  36. package/dist/{ProgressVideo-D4DPjIEy.js.map → ProgressVideo-BgMprzFf.js.map} +1 -1
  37. package/dist/{ProgressVideo.service-BK7Nt-Vk.js → ProgressVideo.service-CiCieW6X.js} +2 -2
  38. package/dist/{ProgressVideo.service-BK7Nt-Vk.js.map → ProgressVideo.service-CiCieW6X.js.map} +1 -1
  39. package/dist/{RichAlert-D10QwVqC.js → RichAlert-dSY8MJTQ.js} +24 -24
  40. package/dist/{RichAlert-D10QwVqC.js.map → RichAlert-dSY8MJTQ.js.map} +1 -1
  41. package/dist/{Scanner-8y4vkfL1.js → Scanner-qMAihqZq.js} +21 -21
  42. package/dist/{Scanner-8y4vkfL1.js.map → Scanner-qMAihqZq.js.map} +1 -1
  43. package/dist/{SendTokens-DSJTklJ_.js → SendTokens-D87tzGx9.js} +70 -70
  44. package/dist/{SendTokens-DSJTklJ_.js.map → SendTokens-D87tzGx9.js.map} +1 -1
  45. package/dist/{Sign-CnrilrlB.js → Sign-BGA7enT4.js} +26 -26
  46. package/dist/{Sign-CnrilrlB.js.map → Sign-BGA7enT4.js.map} +1 -1
  47. package/dist/{Stripe.service-DZue_N62.js → Stripe.service-C119NvVj.js} +3 -3
  48. package/dist/{Stripe.service-DZue_N62.js.map → Stripe.service-C119NvVj.js.map} +1 -1
  49. package/dist/{UpdateProfile-DVYtN4B3.js → UpdateProfile-DKgDmHn9.js} +100 -100
  50. package/dist/{UpdateProfile-DVYtN4B3.js.map → UpdateProfile-DKgDmHn9.js.map} +1 -1
  51. package/dist/{UserInfo-D8COK5lo.js → UserInfo-CFTntH_A.js} +26 -26
  52. package/dist/{UserInfo-D8COK5lo.js.map → UserInfo-CFTntH_A.js.map} +1 -1
  53. package/dist/{Wallet-C--KgjFi.js → Wallet-eC5Y6pR2.js} +27 -27
  54. package/dist/{Wallet-C--KgjFi.js.map → Wallet-eC5Y6pR2.js.map} +1 -1
  55. package/dist/{each-C50_uszW.js → each-CvlyEbiw.js} +16 -16
  56. package/dist/{each-C50_uszW.js.map → each-CvlyEbiw.js.map} +1 -1
  57. package/dist/{html-DTfBoa9t.js → html-CoDrz2MD.js} +3 -3
  58. package/dist/{html-DTfBoa9t.js.map → html-CoDrz2MD.js.map} +1 -1
  59. package/dist/{index-client-BARQdFBp.js → index-client-DqEnqJlv.js} +2 -2
  60. package/dist/{index-client-BARQdFBp.js.map → index-client-DqEnqJlv.js.map} +1 -1
  61. package/dist/{index-DmO4Bf6j.js → index-qsKp2OJc.js} +64 -67
  62. package/dist/{index-DmO4Bf6j.js.map → index-qsKp2OJc.js.map} +1 -1
  63. package/dist/{input-wkVwDWFH.js → input-B_qkEDlO.js} +3 -3
  64. package/dist/{input-wkVwDWFH.js.map → input-B_qkEDlO.js.map} +1 -1
  65. package/dist/{legacy-BgObIK2n.js → legacy-CYnP3rAB.js} +59 -59
  66. package/dist/{legacy-BgObIK2n.js.map → legacy-CYnP3rAB.js.map} +1 -1
  67. package/dist/passport.es.js +1 -1
  68. package/dist/passport.umd.js +126 -126
  69. package/dist/passport.umd.js.map +1 -1
  70. package/dist/{socket-io-BNYia6TN.js → socket-io-C0kUrNSm.js} +2 -2
  71. package/dist/{socket-io-BNYia6TN.js.map → socket-io-C0kUrNSm.js.map} +1 -1
  72. package/dist/types/Passport.d.ts +0 -1
  73. package/package.json +1 -1
  74. package/dist/App-CzJCZTZI.js +0 -644
  75. package/dist/App-CzJCZTZI.js.map +0 -1
  76. package/dist/Nav-DGxksgRd.js +0 -669
@@ -1,10 +1,10 @@
1
- import { c as O, p as k, h as E, f as D, k as Q, r as W, e as q, b as P, i as F, d as N, u as z, v as X } from "./legacy-BgObIK2n.js";
2
- import { a as Z } from "./index-client-BARQdFBp.js";
3
- import { v as A, m as I, B as V, E as b, C as S, D as G, I as K, L as n, F as $, A as U, u as B, K as y, z as ee, w as te, x as re, y as ae, N as M, O as ne, b4 as se, $ as oe, T as H, P as L, R as ue, b5 as le } from "./index-DmO4Bf6j.js";
4
- import { C as ce } from "./ContentHeader-DWeKFCbL.js";
5
- import { B as R } from "./Button-DdkN4ygx.js";
6
- import { e as ie, i as de } from "./each-C50_uszW.js";
7
- import { b as ve } from "./input-wkVwDWFH.js";
1
+ import { c as O, p as k, h as E, f as D, k as Q, r as U, e as W, b as V, i as q, d as N, u as z, v as X } from "./legacy-CYnP3rAB.js";
2
+ import { a as Z } from "./index-client-DqEnqJlv.js";
3
+ import { v as A, m as I, B as P, E as b, C as S, D as H, I as G, K as n, G as $, z as K, u as B, J as y, y as ee, w as te, A as re, x as ae, L as M, N as ne, b4 as se, $ as oe, R as J, S as L, O as ue, b5 as le } from "./index-qsKp2OJc.js";
4
+ import { C as ce } from "./ContentHeader-DtZj1Hgo.js";
5
+ import { B as R } from "./Button-FKUK-FB7.js";
6
+ import { e as ie, i as de } from "./each-CvlyEbiw.js";
7
+ import { b as ve } from "./input-B_qkEDlO.js";
8
8
  var fe = D("<button> </button>"), me = D('<div class="crtw-text-xs crtw-text-gray-400 crtw-mt-1"> </div>'), ge = 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), pe = 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 Y(m, s) {
10
10
  if (new.target) return O({ component: Y, ...m });
@@ -30,14 +30,14 @@ function Y(m, s) {
30
30
  o(t.value);
31
31
  };
32
32
  E();
33
- var l = pe(), p = V(l), d = b(V(p));
33
+ var l = pe(), p = P(l), d = b(P(p));
34
34
  ie(d, 5, () => h, de, (e, t) => {
35
35
  var r = fe();
36
36
  let a;
37
- var f = V(r, !0);
38
- S(r), G(
37
+ var f = P(r, !0);
38
+ S(r), H(
39
39
  (c) => {
40
- a = Q(r, 1, "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", null, a, c), W(f, (n(t), $(() => n(t).name)));
40
+ a = Q(r, 1, "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", null, a, c), U(f, (n(t), $(() => n(t).name)));
41
41
  },
42
42
  [
43
43
  () => ({
@@ -45,8 +45,8 @@ function Y(m, s) {
45
45
  "crtw-z-10": n(t).value === n(g)
46
46
  })
47
47
  ],
48
- K
49
- ), q("click", r, () => T(n(t).value)), P(e, r);
48
+ G
49
+ ), W("click", r, () => T(n(t).value)), V(e, r);
50
50
  }), S(d);
51
51
  var v = b(d, 2);
52
52
  {
@@ -56,20 +56,20 @@ function Y(m, s) {
56
56
  var a = b(r, 2);
57
57
  {
58
58
  var f = (c) => {
59
- var _ = me(), J = V(_);
60
- S(_), G(() => W(J, `Minimum purchase amount is ${u() ?? ""}`)), P(c, _);
59
+ var _ = me(), F = P(_);
60
+ S(_), H(() => U(F, `Minimum purchase amount is ${u() ?? ""}`)), V(c, _);
61
61
  };
62
- F(a, (c) => {
62
+ q(a, (c) => {
63
63
  u() && c(f);
64
64
  });
65
65
  }
66
- ve(r, o), q("input", r, C), P(e, t);
66
+ ve(r, o), W("input", r, C), V(e, t);
67
67
  };
68
- F(v, (e) => {
68
+ q(v, (e) => {
69
69
  n(w) && e(x);
70
70
  });
71
71
  }
72
- return S(p), S(l), P(m, l), U({
72
+ return S(p), S(l), V(m, l), K({
73
73
  get selected() {
74
74
  return o();
75
75
  },
@@ -109,7 +109,7 @@ function j(m, s) {
109
109
  te(() => re(i()), () => {
110
110
  y(o, i().isSendValueDisabled);
111
111
  }), ae(), E();
112
- var d = we(), v = V(d);
112
+ var d = we(), v = P(d);
113
113
  ce(v, {
114
114
  get text() {
115
115
  return w;
@@ -135,7 +135,7 @@ function j(m, s) {
135
135
  $$legacy: !0
136
136
  });
137
137
  var e = b(x, 4);
138
- const t = K(() => !u() || !!l && +u() < l);
138
+ const t = G(() => !u() || !!l && +u() < l);
139
139
  R(e, {
140
140
  text: "Confirm purchase",
141
141
  get disabled() {
@@ -156,7 +156,7 @@ function j(m, s) {
156
156
  get disabled() {
157
157
  return n(o);
158
158
  }
159
- }), S(d), P(m, d), U({
159
+ }), S(d), V(m, d), K({
160
160
  get selected() {
161
161
  return u();
162
162
  },
@@ -223,13 +223,13 @@ function he(m, s) {
223
223
  amount: +n(h)
224
224
  }
225
225
  ]
226
- }), H.set(L.PAYMENT);
226
+ }), J.set(L.PAYMENT);
227
227
  };
228
228
  E();
229
- const C = K(() => ({
229
+ const C = G(() => ({
230
230
  title: "buy stored value",
231
231
  description: "Buy/Send stored value for purchases throughout this website.",
232
- onSendClick: () => H.set(L.SEND_TOKENS),
232
+ onSendClick: () => J.set(L.SEND_TOKENS),
233
233
  sendValueButtonText: "Send stored value",
234
234
  isSendValueDisabled: !n(g),
235
235
  onPaymentClick: T,
@@ -247,7 +247,7 @@ function he(m, s) {
247
247
  y(h, l);
248
248
  },
249
249
  $$legacy: !0
250
- }), U({
250
+ }), K({
251
251
  $set: z,
252
252
  $on: (l, p) => N(s, l, p)
253
253
  });
@@ -255,4 +255,4 @@ function he(m, s) {
255
255
  export {
256
256
  he as default
257
257
  };
258
- //# sourceMappingURL=Wallet-C--KgjFi.js.map
258
+ //# sourceMappingURL=Wallet-eC5Y6pR2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet-C--KgjFi.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","selectItems","handleChangeButton","value","$.set","handleChangeInput","target","$.each","div_2","item","$.untrack","$.get","$$render","consequent","consequent_1","$.prop","$$props","options","title","description","onSendClick","sendValueButtonText","onPaymentClick","isSendValueDisabled","expression","$.derived_safe_equal","__awaiter","thisArg","_arguments","P","generator","getBalance","get","fn","getClientConfigByClientId","configStore","balance","onMount","goToPayment","pageOptsStore","suiPackageStore","pageStore","Pages"],"mappings":";;;;;;;;;;;AACa,MAAAA,yBAA+B,MAAS,GACxCC,yCAAmC,CAAC,GACpCC,yCAAmC,GAAG,GAE7CC,MAAe,EAAK,GACpBC,MAASJ,GAAQ;QAEfK,IAAW;AAAA,IACb,EAAA,OAAO,MAAM,MAAM,KAAI;AAAA,IACvB,EAAA,O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
+ {"version":3,"file":"Wallet-eC5Y6pR2.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","selectItems","handleChangeButton","value","$.set","handleChangeInput","target","$.each","div_2","item","$.untrack","$.get","$$render","consequent","consequent_1","$.prop","$$props","options","title","description","onSendClick","sendValueButtonText","onPaymentClick","isSendValueDisabled","expression","$.derived_safe_equal","__awaiter","thisArg","_arguments","P","generator","getBalance","get","fn","getClientConfigByClientId","configStore","balance","onMount","goToPayment","pageOptsStore","suiPackageStore","pageStore","Pages"],"mappings":";;;;;;;;;;;AACa,MAAAA,yBAA+B,MAAS,GACxCC,yCAAmC,CAAC,GACpCC,yCAAmC,GAAG,GAE7CC,MAAe,EAAK,GACpBC,MAASJ,GAAQ;QAEfK,IAAW;AAAA,IACb,EAAA,OAAO,MAAM,MAAM,KAAI;AAAA,IACvB,EAAA,OAAO,MAAM,MAAM,KAAI;AAAA,IACvB,EAAA,OAAO,MAAM,MAAM,KAAI;AAAA,IACvB,EAAA,OAAO,UAAU,MAAM,SAAQ;AAAA,KAE7BC,IAAkB,CAAIC,MAAiB;QAC3CC,EAAAJ,GAASG,CAAK,GACVA,MAAU,UAAU;AACtBC,MAAAA,EAAAL,GAAe,EAAI,GACnBH,EAAW,EAAE;;IAEf;AACAQ,IAAAA,EAAAL,GAAe,EAAK,GACpBH,EAAWO,CAAK;AAAA,EACjB,GACKE,IAAiB,CAAI,MAAY;UAC/BC,IAAS,EAAE;AAEZ,QADLA,EAAO,QAAQA,EAAO,MAAM,QAAQ,UAAU,EAAE,GAC3C,CAAAA,EAAO,QAAQR,KAA0B;AAC5C,MAAAF,EAAWE,IAAyB,UA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AAAA,IAA0B,0BAAAD;AAAA,EAA6B,IAAAqC,GAA0BF,EAAIG,EAAW,EAAE,QAAQ;AAE9G,MAAAC,MAAkB,EAAE;AAExB,EAAAC,EAAmB,MAAAX,EAAA,QAAA,QAAA,QAAA,aAAA;AACjBtB,IAAAA,EAAAgC,SAAgBL,GAAU;AAAA,GAC3B,CAAA;AAEG,MAAAnC,MAAmB,IAAI;AAErB,QAAA0C,IAAmB,MAAA;AACvB,IAAAC,GAAc,IAAG;AAAA,MACf,UAAQ;AAAA,MACR,UACE,EAAA,qBACE,EAAA,UAAU,GAAI,EAAA;AAAA,MAGlB,QAAM;AAAA;UAEF,WAAWP,EAAIQ,EAAe;AAAA,UAC9B,MAAM;AAAA,UACN,WAAS5C,CAAQ;AAAA;;QAIvB6C,EAAU,IAAIC,EAAM,OAAO;AAAA,EAC5B;;;IAMC,OAAK;AAAA,IACL,aAAW;AAAA,IACX,mBAAmBD,EAAU,IAAIC,EAAM,WAAW;AAAA,IAClD,qBAAmB;AAAA,IACnB,wBAAsBN,CAAO;AAAA,IAC7B,gBAAgBE;AAAA,IAChB,0BAAAxC;AAAA,IACA,0BAAAD;AAAA;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { h as m, a as ee, b as ae, L as U, I as re, an as ne, H as fe, r as X, s as D, d as R, g as w, ac as ie, ag as le, o as K, p as P, t as se, ak as Q, a4 as ue, m as te, f as z, bq as S, a1 as F, br as k, e as G, bs as ve, aj as de, bt as _e, ao as oe, bu as O, bv as ce, ae as he, a6 as Ee, a5 as pe, bw as W, q as be, bx as Te } from "./index-DmO4Bf6j.js";
1
+ import { h as m, a as ee, b as ae, K, I as re, an as ne, H as fe, r as U, s as D, d as R, g as w, ac as ie, ag as le, o as J, p as P, t as se, ak as Q, a4 as ue, m as te, f as X, bq as S, a1 as z, br as k, e as F, bs as ve, aj as de, bt as _e, ao as oe, bu as O, bv as ce, ae as he, a5 as Ee, a7 as pe, bw as W, q as be, bx as Te } from "./index-qsKp2OJc.js";
2
2
  function Ce(l, e) {
3
3
  return e;
4
4
  }
@@ -42,14 +42,14 @@ function Ne(l, e, a, u, v, _ = null) {
42
42
  return ue(s) ? s : s == null ? [] : Q(s);
43
43
  });
44
44
  ae(() => {
45
- var s = U(f), r = s.length;
45
+ var s = K(f), r = s.length;
46
46
  if (C && r === 0)
47
47
  return;
48
48
  C = r === 0;
49
49
  let A = !1;
50
50
  if (m) {
51
51
  var E = ne(t) === fe;
52
- E !== (r === 0) && (t = X(), D(t), R(!1), A = !0);
52
+ E !== (r === 0) && (t = U(), D(t), R(!1), A = !0);
53
53
  }
54
54
  if (m) {
55
55
  for (var p = null, T, c = 0; c < r; c++) {
@@ -73,19 +73,19 @@ function Ne(l, e, a, u, v, _ = null) {
73
73
  a
74
74
  ), o.items.set(i, T), p = T;
75
75
  }
76
- r > 0 && D(X());
76
+ r > 0 && D(U());
77
77
  }
78
- m || Ie(s, o, t, v, e, u, a), _ !== null && (r === 0 ? d ? K(d) : d = P(() => _(t)) : d !== null && se(d, () => {
78
+ m || Ie(s, o, t, v, e, u, a), _ !== null && (r === 0 ? d ? J(d) : d = P(() => _(t)) : d !== null && se(d, () => {
79
79
  d = null;
80
- })), A && R(!0), U(f);
80
+ })), A && R(!0), K(f);
81
81
  }), m && (t = w);
82
82
  }
83
83
  function Ie(l, e, a, u, v, _, t) {
84
- var L, q, V, Y;
84
+ var q, L, V, Y;
85
85
  var o = (v & Te) !== 0, b = (v & (O | k)) !== 0, h = l.length, d = e.items, C = e.first, f = C, s, r = null, A, E = [], p = [], T, c, n, i;
86
86
  if (o)
87
87
  for (i = 0; i < h; i += 1)
88
- T = l[i], c = _(T, i), n = d.get(c), n !== void 0 && ((L = n.a) == null || L.measure(), (A ?? (A = /* @__PURE__ */ new Set())).add(n));
88
+ T = l[i], c = _(T, i), n = d.get(c), n !== void 0 && ((q = n.a) == null || q.measure(), (A ?? (A = /* @__PURE__ */ new Set())).add(n));
89
89
  for (i = 0; i < h; i += 1) {
90
90
  if (T = l[i], c = _(T, i), n = d.get(c), n === void 0) {
91
91
  var $ = f ? (
@@ -106,19 +106,19 @@ function Ie(l, e, a, u, v, _, t) {
106
106
  ), d.set(c, r), E = [], p = [], f = r.next;
107
107
  continue;
108
108
  }
109
- if (b && xe(n, T, i, v), (n.e.f & S) !== 0 && (K(n.e), o && ((q = n.a) == null || q.unfix(), (A ?? (A = /* @__PURE__ */ new Set())).delete(n))), n !== f) {
109
+ if (b && xe(n, T, i, v), (n.e.f & S) !== 0 && (J(n.e), o && ((L = n.a) == null || L.unfix(), (A ?? (A = /* @__PURE__ */ new Set())).delete(n))), n !== f) {
110
110
  if (s !== void 0 && s.has(n)) {
111
111
  if (E.length < p.length) {
112
112
  var g = p[0], I;
113
113
  r = g.prev;
114
114
  var y = E[0], H = E[E.length - 1];
115
115
  for (I = 0; I < E.length; I += 1)
116
- J(E[I], g, a);
116
+ G(E[I], g, a);
117
117
  for (I = 0; I < p.length; I += 1)
118
118
  s.delete(p[I]);
119
119
  x(e, y.prev, H.next), x(e, r, y), x(e, H, g), f = g, r = H, i -= 1, E = [], p = [];
120
120
  } else
121
- s.delete(n), J(n, f, a), x(e, n.prev, n.next), x(e, n, r === null ? e.first : r.next), x(e, r, n), r = n;
121
+ s.delete(n), G(n, f, a), x(e, n.prev, n.next), x(e, n, r === null ? e.first : r.next), x(e, r, n), r = n;
122
122
  continue;
123
123
  }
124
124
  for (E = [], p = []; f !== null && f.k !== c; )
@@ -149,17 +149,17 @@ function Ie(l, e, a, u, v, _, t) {
149
149
  if (A !== void 0)
150
150
  for (n of A)
151
151
  (B = n.a) == null || B.apply();
152
- }), F.first = e.first && e.first.e, F.last = r && r.e;
152
+ }), z.first = e.first && e.first.e, z.last = r && r.e;
153
153
  }
154
154
  function xe(l, e, a, u) {
155
- (u & O) !== 0 && G(l.v, e), (u & k) !== 0 ? G(
155
+ (u & O) !== 0 && F(l.v, e), (u & k) !== 0 ? F(
156
156
  /** @type {Value<number>} */
157
157
  l.i,
158
158
  a
159
159
  ) : l.i = a;
160
160
  }
161
161
  function Z(l, e, a, u, v, _, t, o, b, h) {
162
- var d = (b & O) !== 0, C = (b & ce) === 0, f = d ? C ? te(v, !1, !1) : z(v) : v, s = (b & k) === 0 ? t : z(t), r = {
162
+ var d = (b & O) !== 0, C = (b & ce) === 0, f = d ? C ? te(v, !1, !1) : X(v) : v, s = (b & k) === 0 ? t : X(t), r = {
163
163
  i: s,
164
164
  v: f,
165
165
  k: _,
@@ -174,7 +174,7 @@ function Z(l, e, a, u, v, _, t, o, b, h) {
174
174
  } finally {
175
175
  }
176
176
  }
177
- function J(l, e, a) {
177
+ function G(l, e, a) {
178
178
  for (var u = l.next ? (
179
179
  /** @type {TemplateNode} */
180
180
  l.next.e.nodes_start
@@ -199,4 +199,4 @@ export {
199
199
  Ne as e,
200
200
  Ce as i
201
201
  };
202
- //# sourceMappingURL=each-C50_uszW.js.map
202
+ //# sourceMappingURL=each-CvlyEbiw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"each-C50_uszW.js","sources":["../../../node_modules/.pnpm/svelte@5.34.8/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachState, Effect, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\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\tremove_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} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\trun_out_transitions,\n\tpause_children,\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 { COMMENT_NODE, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { active_effect, get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\n\n/**\n * The row of a keyed each block that is currently updating. We track this\n * so that `animate:` directives have something to attach themselves to\n * @type {EachItem | null}\n */\nexport let current_each_item = null;\n\n/** @param {EachItem | null} item */\nexport function set_current_each_item(item) {\n\tcurrent_each_item = item;\n}\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 {EachItem[]} items\n * @param {null | Node} controlled_anchor\n * @param {Map<any, EachItem>} items_map\n */\nfunction pause_effects(state, items, controlled_anchor, items_map) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = items.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tpause_children(items[i].e, transitions, true);\n\t}\n\n\tvar is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null;\n\t// If we have a controlled anchor, it means that the each block is inside a single\n\t// DOM element, so we can apply a fast-path for clearing the contents of the element.\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (\n\t\t\t/** @type {Element} */ (controlled_anchor).parentNode\n\t\t);\n\t\tclear_text_content(parent_node);\n\t\tparent_node.append(/** @type {Element} */ (controlled_anchor));\n\t\titems_map.clear();\n\t\tlink(state, items[0].prev, items[length - 1].next);\n\t}\n\n\trun_out_transitions(transitions, () => {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tvar item = items[i];\n\t\t\tif (!is_controlled) {\n\t\t\t\titems_map.delete(item.k);\n\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t}\n\t\t\tdestroy_effect(item.e, !is_controlled);\n\t\t}\n\t});\n}\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 {EachState} */\n\tvar state = { flags, items: new Map(), first: null };\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(/** @type {Comment | Text} */ (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\tvar was_empty = false;\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\tblock(() => {\n\t\tvar array = get(each_array);\n\t\tvar length = array.length;\n\n\t\tif (was_empty && length === 0) {\n\t\t\t// ignore updates if the array is empty,\n\t\t\t// and it already was empty on previous run\n\t\t\treturn;\n\t\t}\n\t\twas_empty = length === 0;\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 = remove_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\t// this is separate to the previous block because `hydrating` might change\n\t\tif (hydrating) {\n\t\t\t/** @type {EachItem | null} */\n\t\t\tvar prev = null;\n\n\t\t\t/** @type {EachItem} */\n\t\t\tvar item;\n\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tif (\n\t\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t\t) {\n\t\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\t\tmismatch = true;\n\t\t\t\t\tset_hydrating(false);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tvar value = array[i];\n\t\t\t\tvar key = get_key(value, i);\n\t\t\t\titem = create_item(\n\t\t\t\t\thydrate_node,\n\t\t\t\t\tstate,\n\t\t\t\t\tprev,\n\t\t\t\t\tnull,\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\ti,\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\t\t\t\tstate.items.set(key, item);\n\n\t\t\t\tprev = item;\n\t\t\t}\n\n\t\t\t// remove excess nodes\n\t\t\tif (length > 0) {\n\t\t\t\tset_hydrate_node(remove_nodes());\n\t\t\t}\n\t\t}\n\n\t\tif (!hydrating) {\n\t\t\treconcile(array, state, anchor, render_fn, flags, get_key, get_collection);\n\t\t}\n\n\t\tif (fallback_fn !== null) {\n\t\t\tif (length === 0) {\n\t\t\t\tif (fallback) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t\t}\n\t\t\t} else if (fallback !== null) {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\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\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {Array<V>} array\n * @param {EachState} state\n * @param {Element | Comment | Text} anchor\n * @param {(anchor: Node, item: MaybeSource<V>, index: number | Source<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @param {() => V[]} get_collection\n * @returns {void}\n */\nfunction reconcile(array, state, anchor, render_fn, flags, get_key, get_collection) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\tvar should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar first = state.first;\n\tvar current = first;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar seen;\n\n\t/** @type {EachItem | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar to_animate;\n\n\t/** @type {EachItem[]} */\n\tvar matched = [];\n\n\t/** @type {EachItem[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {EachItem | undefined} */\n\tvar item;\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\titem = items.get(key);\n\n\t\t\tif (item !== undefined) {\n\t\t\t\titem.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(item);\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\t\titem = items.get(key);\n\n\t\tif (item === undefined) {\n\t\t\tvar child_anchor = current ? /** @type {TemplateNode} */ (current.e.nodes_start) : anchor;\n\n\t\t\tprev = create_item(\n\t\t\t\tchild_anchor,\n\t\t\t\tstate,\n\t\t\t\tprev,\n\t\t\t\tprev === null ? state.first : prev.next,\n\t\t\t\tvalue,\n\t\t\t\tkey,\n\t\t\t\ti,\n\t\t\t\trender_fn,\n\t\t\t\tflags,\n\t\t\t\tget_collection\n\t\t\t);\n\n\t\t\titems.set(key, prev);\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\tcurrent = prev.next;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (should_update) {\n\t\t\tupdate_item(item, value, i, flags);\n\t\t}\n\n\t\tif ((item.e.f & INERT) !== 0) {\n\t\t\tresume_effect(item.e);\n\t\t\tif (is_animated) {\n\t\t\t\titem.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(item);\n\t\t\t}\n\t\t}\n\n\t\tif (item !== current) {\n\t\t\tif (seen !== undefined && seen.has(item)) {\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(item);\n\t\t\t\t\tmove(item, current, anchor);\n\n\t\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t\t\tlink(state, item, prev === null ? state.first : prev.next);\n\t\t\t\t\tlink(state, prev, item);\n\n\t\t\t\t\tprev = item;\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.k !== key) {\n\t\t\t\t// If the each block isn't inert and an item has an effect that is already inert,\n\t\t\t\t// skip over adding it to our seen Set as the item is already being handled\n\t\t\t\tif ((current.e.f & INERT) === 0) {\n\t\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\t}\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\titem = current;\n\t\t}\n\n\t\tmatched.push(item);\n\t\tprev = item;\n\t\tcurrent = item.next;\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\tvar to_destroy = seen === undefined ? [] : array_from(seen);\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.e.f & INERT) === 0) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\t\t\tcurrent = 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].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].a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor, items);\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 (item of to_animate) {\n\t\t\t\titem.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n\n\t/** @type {Effect} */ (active_effect).first = state.first && state.first.e;\n\t/** @type {Effect} */ (active_effect).last = prev && prev.e;\n}\n\n/**\n * @param {EachItem} item\n * @param {any} value\n * @param {number} index\n * @param {number} type\n * @returns {void}\n */\nfunction update_item(item, value, index, type) {\n\tif ((type & EACH_ITEM_REACTIVE) !== 0) {\n\t\tinternal_set(item.v, value);\n\t}\n\n\tif ((type & EACH_INDEX_REACTIVE) !== 0) {\n\t\tinternal_set(/** @type {Value<number>} */ (item.i), index);\n\t} else {\n\t\titem.i = index;\n\t}\n}\n\n/**\n * @template V\n * @param {Node} anchor\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\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(\n\tanchor,\n\tstate,\n\tprev,\n\tnext,\n\tvalue,\n\tkey,\n\tindex,\n\trender_fn,\n\tflags,\n\tget_collection\n) {\n\tvar previous_each_item = current_each_item;\n\tvar reactive = (flags & EACH_ITEM_REACTIVE) !== 0;\n\tvar mutable = (flags & EACH_ITEM_IMMUTABLE) === 0;\n\n\tvar v = reactive ? (mutable ? mutable_source(value, false, false) : source(value)) : value;\n\tvar i = (flags & EACH_INDEX_REACTIVE) === 0 ? index : source(index);\n\n\tif (DEV && reactive) {\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\t/** @type {Value} */ (v).trace = () => {\n\t\t\tvar collection_index = typeof i === 'number' ? index : i.v;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[collection_index];\n\t\t};\n\t}\n\n\t/** @type {EachItem} */\n\tvar item = {\n\t\ti,\n\t\tv,\n\t\tk: key,\n\t\ta: null,\n\t\t// @ts-expect-error\n\t\te: null,\n\t\tprev,\n\t\tnext\n\t};\n\n\tcurrent_each_item = item;\n\n\ttry {\n\t\titem.e = branch(() => render_fn(anchor, v, i, get_collection), hydrating);\n\n\t\titem.e.prev = prev && prev.e;\n\t\titem.e.next = next && next.e;\n\n\t\tif (prev === null) {\n\t\t\tstate.first = item;\n\t\t} else {\n\t\t\tprev.next = item;\n\t\t\tprev.e.next = item.e;\n\t\t}\n\n\t\tif (next !== null) {\n\t\t\tnext.prev = item;\n\t\t\tnext.e.prev = item.e;\n\t\t}\n\n\t\treturn item;\n\t} finally {\n\t\tcurrent_each_item = previous_each_item;\n\t}\n}\n\n/**\n * @param {EachItem} item\n * @param {EachItem | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(item, next, anchor) {\n\tvar end = item.next ? /** @type {TemplateNode} */ (item.next.e.nodes_start) : anchor;\n\n\tvar dest = next ? /** @type {TemplateNode} */ (next.e.nodes_start) : anchor;\n\tvar node = /** @type {TemplateNode} */ (item.e.nodes_start);\n\n\twhile (node !== end) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.first = next;\n\t} else {\n\t\tprev.next = next;\n\t\tprev.e.next = next && next.e;\n\t}\n\n\tif (next !== null) {\n\t\tnext.prev = prev;\n\t\tnext.e.prev = prev && prev.e;\n\t}\n}\n"],"names":["index","_","i","pause_effects","state","items","controlled_anchor","items_map","transitions","length","pause_children","is_controlled","parent_node","clear_text_content","link","run_out_transitions","item","destroy_effect","each","node","flags","get_collection","get_key","render_fn","fallback_fn","anchor","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","was_empty","each_array","derived_safe_equal","collection","is_array","array_from","block","array","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","remove_nodes","set_hydrating","prev","hydrate_node","COMMENT_NODE","HYDRATION_END","value","key","create_item","reconcile","resume_effect","branch","pause_effect","is_animated","EACH_IS_ANIMATED","should_update","EACH_ITEM_REACTIVE","EACH_INDEX_REACTIVE","first","current","seen","to_animate","matched","stashed","_a","child_anchor","update_item","INERT","_b","start","j","a","b","move","to_destroy","destroy_length","_c","_d","queue_micro_task","active_effect","type","internal_set","next","reactive","mutable","EACH_ITEM_IMMUTABLE","v","mutable_source","source","end","dest","next_node","get_next_sibling"],"mappings":";AA0DO,SAASA,GAAMC,GAAGC,GAAG;AAC3B,SAAOA;AACR;AAUA,SAASC,GAAcC,GAAOC,GAAOC,GAAmBC,GAAW;AAKlE,WAHIC,IAAc,CAAE,GAChBC,IAASJ,EAAM,QAEVH,IAAI,GAAGA,IAAIO,GAAQP;AAC3B,IAAAQ,GAAeL,EAAMH,CAAC,EAAE,GAAGM,GAAa,EAAI;AAG7C,MAAIG,IAAgBF,IAAS,KAAKD,EAAY,WAAW,KAAKF,MAAsB;AAGpF,MAAIK,GAAe;AAClB,QAAIC;AAAA;AAAA;AAAA,MACqBN,EAAmB;AAAA;AAE5C,IAAAO,GAAmBD,CAAW,GAC9BA,EAAY;AAAA;AAAA,MAA+BN;AAAA,IAAmB,GAC9DC,EAAU,MAAO,GACjBO,EAAKV,GAAO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OwC,GACZxC,EAAK,EAAE,OAAOwC,KAAQA,EAAK,IAGxBA,MAAS,SACZA,EAAK,OAAOxC,GACZwC,EAAK,EAAE,OAAOxC,KAAQA,EAAK;AAE7B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"each-CvlyEbiw.js","sources":["../../../node_modules/.pnpm/svelte@5.34.8/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachState, Effect, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\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\tremove_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} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\trun_out_transitions,\n\tpause_children,\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 { COMMENT_NODE, INERT } from '#client/constants';\nimport { queue_micro_task } from '../task.js';\nimport { active_effect, get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\n\n/**\n * The row of a keyed each block that is currently updating. We track this\n * so that `animate:` directives have something to attach themselves to\n * @type {EachItem | null}\n */\nexport let current_each_item = null;\n\n/** @param {EachItem | null} item */\nexport function set_current_each_item(item) {\n\tcurrent_each_item = item;\n}\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 {EachItem[]} items\n * @param {null | Node} controlled_anchor\n * @param {Map<any, EachItem>} items_map\n */\nfunction pause_effects(state, items, controlled_anchor, items_map) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = items.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tpause_children(items[i].e, transitions, true);\n\t}\n\n\tvar is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null;\n\t// If we have a controlled anchor, it means that the each block is inside a single\n\t// DOM element, so we can apply a fast-path for clearing the contents of the element.\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (\n\t\t\t/** @type {Element} */ (controlled_anchor).parentNode\n\t\t);\n\t\tclear_text_content(parent_node);\n\t\tparent_node.append(/** @type {Element} */ (controlled_anchor));\n\t\titems_map.clear();\n\t\tlink(state, items[0].prev, items[length - 1].next);\n\t}\n\n\trun_out_transitions(transitions, () => {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tvar item = items[i];\n\t\t\tif (!is_controlled) {\n\t\t\t\titems_map.delete(item.k);\n\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t}\n\t\t\tdestroy_effect(item.e, !is_controlled);\n\t\t}\n\t});\n}\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 {EachState} */\n\tvar state = { flags, items: new Map(), first: null };\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(/** @type {Comment | Text} */ (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\tvar was_empty = false;\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\tblock(() => {\n\t\tvar array = get(each_array);\n\t\tvar length = array.length;\n\n\t\tif (was_empty && length === 0) {\n\t\t\t// ignore updates if the array is empty,\n\t\t\t// and it already was empty on previous run\n\t\t\treturn;\n\t\t}\n\t\twas_empty = length === 0;\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 = remove_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\t// this is separate to the previous block because `hydrating` might change\n\t\tif (hydrating) {\n\t\t\t/** @type {EachItem | null} */\n\t\t\tvar prev = null;\n\n\t\t\t/** @type {EachItem} */\n\t\t\tvar item;\n\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tif (\n\t\t\t\t\thydrate_node.nodeType === COMMENT_NODE &&\n\t\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t\t) {\n\t\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\t\tmismatch = true;\n\t\t\t\t\tset_hydrating(false);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tvar value = array[i];\n\t\t\t\tvar key = get_key(value, i);\n\t\t\t\titem = create_item(\n\t\t\t\t\thydrate_node,\n\t\t\t\t\tstate,\n\t\t\t\t\tprev,\n\t\t\t\t\tnull,\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\ti,\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\t\t\t\tstate.items.set(key, item);\n\n\t\t\t\tprev = item;\n\t\t\t}\n\n\t\t\t// remove excess nodes\n\t\t\tif (length > 0) {\n\t\t\t\tset_hydrate_node(remove_nodes());\n\t\t\t}\n\t\t}\n\n\t\tif (!hydrating) {\n\t\t\treconcile(array, state, anchor, render_fn, flags, get_key, get_collection);\n\t\t}\n\n\t\tif (fallback_fn !== null) {\n\t\t\tif (length === 0) {\n\t\t\t\tif (fallback) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t\t}\n\t\t\t} else if (fallback !== null) {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\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\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {Array<V>} array\n * @param {EachState} state\n * @param {Element | Comment | Text} anchor\n * @param {(anchor: Node, item: MaybeSource<V>, index: number | Source<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @param {() => V[]} get_collection\n * @returns {void}\n */\nfunction reconcile(array, state, anchor, render_fn, flags, get_key, get_collection) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\tvar should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar first = state.first;\n\tvar current = first;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar seen;\n\n\t/** @type {EachItem | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar to_animate;\n\n\t/** @type {EachItem[]} */\n\tvar matched = [];\n\n\t/** @type {EachItem[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {EachItem | undefined} */\n\tvar item;\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\titem = items.get(key);\n\n\t\t\tif (item !== undefined) {\n\t\t\t\titem.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(item);\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\t\titem = items.get(key);\n\n\t\tif (item === undefined) {\n\t\t\tvar child_anchor = current ? /** @type {TemplateNode} */ (current.e.nodes_start) : anchor;\n\n\t\t\tprev = create_item(\n\t\t\t\tchild_anchor,\n\t\t\t\tstate,\n\t\t\t\tprev,\n\t\t\t\tprev === null ? state.first : prev.next,\n\t\t\t\tvalue,\n\t\t\t\tkey,\n\t\t\t\ti,\n\t\t\t\trender_fn,\n\t\t\t\tflags,\n\t\t\t\tget_collection\n\t\t\t);\n\n\t\t\titems.set(key, prev);\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\tcurrent = prev.next;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (should_update) {\n\t\t\tupdate_item(item, value, i, flags);\n\t\t}\n\n\t\tif ((item.e.f & INERT) !== 0) {\n\t\t\tresume_effect(item.e);\n\t\t\tif (is_animated) {\n\t\t\t\titem.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(item);\n\t\t\t}\n\t\t}\n\n\t\tif (item !== current) {\n\t\t\tif (seen !== undefined && seen.has(item)) {\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(item);\n\t\t\t\t\tmove(item, current, anchor);\n\n\t\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t\t\tlink(state, item, prev === null ? state.first : prev.next);\n\t\t\t\t\tlink(state, prev, item);\n\n\t\t\t\t\tprev = item;\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.k !== key) {\n\t\t\t\t// If the each block isn't inert and an item has an effect that is already inert,\n\t\t\t\t// skip over adding it to our seen Set as the item is already being handled\n\t\t\t\tif ((current.e.f & INERT) === 0) {\n\t\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\t}\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\titem = current;\n\t\t}\n\n\t\tmatched.push(item);\n\t\tprev = item;\n\t\tcurrent = item.next;\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\tvar to_destroy = seen === undefined ? [] : array_from(seen);\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.e.f & INERT) === 0) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\t\t\tcurrent = 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].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].a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor, items);\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 (item of to_animate) {\n\t\t\t\titem.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n\n\t/** @type {Effect} */ (active_effect).first = state.first && state.first.e;\n\t/** @type {Effect} */ (active_effect).last = prev && prev.e;\n}\n\n/**\n * @param {EachItem} item\n * @param {any} value\n * @param {number} index\n * @param {number} type\n * @returns {void}\n */\nfunction update_item(item, value, index, type) {\n\tif ((type & EACH_ITEM_REACTIVE) !== 0) {\n\t\tinternal_set(item.v, value);\n\t}\n\n\tif ((type & EACH_INDEX_REACTIVE) !== 0) {\n\t\tinternal_set(/** @type {Value<number>} */ (item.i), index);\n\t} else {\n\t\titem.i = index;\n\t}\n}\n\n/**\n * @template V\n * @param {Node} anchor\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\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(\n\tanchor,\n\tstate,\n\tprev,\n\tnext,\n\tvalue,\n\tkey,\n\tindex,\n\trender_fn,\n\tflags,\n\tget_collection\n) {\n\tvar previous_each_item = current_each_item;\n\tvar reactive = (flags & EACH_ITEM_REACTIVE) !== 0;\n\tvar mutable = (flags & EACH_ITEM_IMMUTABLE) === 0;\n\n\tvar v = reactive ? (mutable ? mutable_source(value, false, false) : source(value)) : value;\n\tvar i = (flags & EACH_INDEX_REACTIVE) === 0 ? index : source(index);\n\n\tif (DEV && reactive) {\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\t/** @type {Value} */ (v).trace = () => {\n\t\t\tvar collection_index = typeof i === 'number' ? index : i.v;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[collection_index];\n\t\t};\n\t}\n\n\t/** @type {EachItem} */\n\tvar item = {\n\t\ti,\n\t\tv,\n\t\tk: key,\n\t\ta: null,\n\t\t// @ts-expect-error\n\t\te: null,\n\t\tprev,\n\t\tnext\n\t};\n\n\tcurrent_each_item = item;\n\n\ttry {\n\t\titem.e = branch(() => render_fn(anchor, v, i, get_collection), hydrating);\n\n\t\titem.e.prev = prev && prev.e;\n\t\titem.e.next = next && next.e;\n\n\t\tif (prev === null) {\n\t\t\tstate.first = item;\n\t\t} else {\n\t\t\tprev.next = item;\n\t\t\tprev.e.next = item.e;\n\t\t}\n\n\t\tif (next !== null) {\n\t\t\tnext.prev = item;\n\t\t\tnext.e.prev = item.e;\n\t\t}\n\n\t\treturn item;\n\t} finally {\n\t\tcurrent_each_item = previous_each_item;\n\t}\n}\n\n/**\n * @param {EachItem} item\n * @param {EachItem | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(item, next, anchor) {\n\tvar end = item.next ? /** @type {TemplateNode} */ (item.next.e.nodes_start) : anchor;\n\n\tvar dest = next ? /** @type {TemplateNode} */ (next.e.nodes_start) : anchor;\n\tvar node = /** @type {TemplateNode} */ (item.e.nodes_start);\n\n\twhile (node !== end) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.first = next;\n\t} else {\n\t\tprev.next = next;\n\t\tprev.e.next = next && next.e;\n\t}\n\n\tif (next !== null) {\n\t\tnext.prev = prev;\n\t\tnext.e.prev = prev && prev.e;\n\t}\n}\n"],"names":["index","_","i","pause_effects","state","items","controlled_anchor","items_map","transitions","length","pause_children","is_controlled","parent_node","clear_text_content","link","run_out_transitions","item","destroy_effect","each","node","flags","get_collection","get_key","render_fn","fallback_fn","anchor","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","was_empty","each_array","derived_safe_equal","collection","is_array","array_from","block","array","get","mismatch","is_else","read_hydration_instruction","HYDRATION_START_ELSE","remove_nodes","set_hydrating","prev","hydrate_node","COMMENT_NODE","HYDRATION_END","value","key","create_item","reconcile","resume_effect","branch","pause_effect","is_animated","EACH_IS_ANIMATED","should_update","EACH_ITEM_REACTIVE","EACH_INDEX_REACTIVE","first","current","seen","to_animate","matched","stashed","_a","child_anchor","update_item","INERT","_b","start","j","a","b","move","to_destroy","destroy_length","_c","_d","queue_micro_task","active_effect","type","internal_set","next","reactive","mutable","EACH_ITEM_IMMUTABLE","v","mutable_source","source","end","dest","next_node","get_next_sibling"],"mappings":";AA0DO,SAASA,GAAMC,GAAGC,GAAG;AAC3B,SAAOA;AACR;AAUA,SAASC,GAAcC,GAAOC,GAAOC,GAAmBC,GAAW;AAKlE,WAHIC,IAAc,CAAE,GAChBC,IAASJ,EAAM,QAEVH,IAAI,GAAGA,IAAIO,GAAQP;AAC3B,IAAAQ,GAAeL,EAAMH,CAAC,EAAE,GAAGM,GAAa,EAAI;AAG7C,MAAIG,IAAgBF,IAAS,KAAKD,EAAY,WAAW,KAAKF,MAAsB;AAGpF,MAAIK,GAAe;AAClB,QAAIC;AAAA;AAAA;AAAA,MACqBN,EAAmB;AAAA;AAE5C,IAAAO,GAAmBD,CAAW,GAC9BA,EAAY;AAAA;AAAA,MAA+BN;AAAA,IAAmB,GAC9DC,EAAU,MAAO,GACjBO,EAAKV,GAAOC,EAAM,CAAC,EAAE,MAAMA,EAAMI,IAAS,CAAC,EAAE,IAAI;AAAA,EACnD;AAEC,EAAAM,GAAoBP,GAAa,MAAM;AACtC,aAASN,IAAI,GAAGA,IAAIO,GAAQP,KAAK;AAChC,UAAIc,IAAOX,EAAMH,CAAC;AAClB,MAAKS,MACJJ,EAAU,OAAOS,EAAK,CAAC,GACvBF,EAAKV,GAAOY,EAAK,MAAMA,EAAK,IAAI,IAEjCC,GAAeD,EAAK,GAAG,CAACL,CAAa;AAAA,IACxC;AAAA,EACA,CAAE;AACF;AAYO,SAASO,GAAKC,GAAMC,GAAOC,GAAgBC,GAASC,GAAWC,IAAc,MAAM;AACzF,MAAIC,IAASN,GAGTf,IAAQ,EAAE,OAAAgB,GAAO,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EAAE,OAAOgC,KAAQA,EAAK,GAC3BhC,EAAK,EAAE,OAAOwE,KAAQA,EAAK,GAEvBxC,MAAS,OACZ5C,EAAM,QAAQY,KAEdgC,EAAK,OAAOhC,GACZgC,EAAK,EAAE,OAAOhC,EAAK,IAGhBwE,MAAS,SACZA,EAAK,OAAOxE,GACZwE,EAAK,EAAE,OAAOxE,EAAK,IAGbA;AAAA,EACT,UAAW;AAAA,EAEX;AACA;AAOA,SAAS+D,EAAK/D,GAAMwE,GAAM/D,GAAQ;AAMjC,WALIsE,IAAM/E,EAAK;AAAA;AAAA,IAAoCA,EAAK,KAAK,EAAE;AAAA,MAAeS,GAE1EuE,IAAOR;AAAA;AAAA,IAAoCA,EAAK,EAAE;AAAA,MAAe/D,GACjEN;AAAA;AAAA,IAAoCH,EAAK,EAAE;AAAA,KAExCG,MAAS4E,KAAK;AACpB,QAAIE;AAAA;AAAA,MAAyCC,GAAiB/E,CAAI;AAAA;AAClE,IAAA6E,EAAK,OAAO7E,CAAI,GAChBA,IAAO8E;AAAA,EACT;AACA;AAOA,SAASnF,EAAKV,GAAO4C,GAAMwC,GAAM;AAChC,EAAIxC,MAAS,OACZ5C,EAAM,QAAQoF,KAEdxC,EAAK,OAAOwC,GACZxC,EAAK,EAAE,OAAOwC,KAAQA,EAAK,IAGxBA,MAAS,SACZA,EAAK,OAAOxC,GACZwC,EAAK,EAAE,OAAOxC,KAAQA,EAAK;AAE7B;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
- import { D as u, h as d, a as l, a1 as g, b1 as y, g as h, ac as p, ae as b, ah as w, af as O, s as R, a6 as f } from "./index-DmO4Bf6j.js";
2
- import { y as m, z as D } from "./legacy-BgObIK2n.js";
1
+ import { D as u, h as d, a as l, a1 as g, b1 as y, g as h, ac as p, ae as b, ah as w, af as O, s as R, a5 as f } from "./index-qsKp2OJc.js";
2
+ import { y as m, z as D } from "./legacy-CYnP3rAB.js";
3
3
  function C(c, v, i = !1, _ = !1, E = !1) {
4
4
  var o = c, t = "";
5
5
  u(() => {
@@ -50,4 +50,4 @@ function C(c, v, i = !1, _ = !1, E = !1) {
50
50
  export {
51
51
  C as h
52
52
  };
53
- //# sourceMappingURL=html-DTfBoa9t.js.map
53
+ //# sourceMappingURL=html-CoDrz2MD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"html-DTfBoa9t.js","sources":["../../../node_modules/.pnpm/svelte@5.34.8/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_start !== null) {\n\t\t\tremove_effect_dom(effect.nodes_start, /** @type {TemplateNode} */ (effect.nodes_end));\n\t\t\teffect.nodes_start = effect.nodes_end = 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\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 = /** @type {TemplateNode} */ (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 {Node} */ (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_ERROR","assign_nodes","set_hydrate_node","create_fragment_from_html","get_first_child"],"mappings":";;AA2CO,SAASA,EAAKC,GAAMC,GAAWC,IAAM,IAAOC,IAAS,IAAOC,IAAe,IAAO;AACxF,MAAIC,IAASL,GAETM,IAAQ;AAEZ,EAAAC,EAAgB,MAAM;AACrB,QAAIC;AAAA;AAAA,MAAgCC;AAAA;AAEpC,QAAIH,OAAWA,IAAQL,EAAW,KAAI,KAAK;AAC1C,MAAIS,KAAWC,EAAc;AAC7B;AAAA,IACH;AAOE,QALIH,EAAO,gBAAgB,SAC1BI;AAAA,MAAkBJ,EAAO;AAAA;AAAA,MAA0CA,EAAO;AAAA,IAAW,GACrFA,EAAO,cAAcA,EAAO,YAAY,OAGrCF,MAAU,IAEd;AAAA,UAAII,GAAW;AAGoB,QAACG,EAAc;AAIjD,iBAHIC,IAAOH,EAAc,GACrBI,IAAOD,GAGVA,MAAS,SACRA,EAAK,aAAaE;AAAA,QAAwCF,EAAM,SAAS;AAE1E,UAAAC,IAAOD,GACPA;AAAA,UAAoCG,EAAiBH,CAAI;AAG1D,YAAIA,MAAS;AACZI,gBAAAA,EAAsB,GAChBC;AAOP,QAAAC,EAAaP,GAAcE,CAAI,GAC/BV,IAASgB,EAAiBP,CAAI;AAC9B;AAAA,MACH;AAEE,UAAIf,IAAOO,IAAQ;AACnB,MAAIJ,IAAKH,IAAO,QAAQA,CAAI,WACnBI,MAAQJ,IAAO,SAASA,CAAI;AAKrC,UAAIC,IAAOsB,EAA0BvB,CAAI;AAWzC,WATIG,KAAOC,OACVH;AAAA,MAA+BuB,EAAgBvB,CAAI,IAGpDoB;AAAA;AAAA,QAC8BG,EAAgBvB,CAAI;AAAA;AAAA,QACpBA,EAAK;AAAA,MAClC,GAEGE,KAAOC;AACV,eAAOoB,EAAgBvB,CAAI;AAC1B,UAAAK,EAAO;AAAA;AAAA,YAA4BkB,EAAgBvB,CAAI;AAAA,UAAG;AAAA;AAG3D,QAAAK,EAAO,OAAOL,CAAI;AAAA;AAAA,EAErB,CAAE;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"html-CoDrz2MD.js","sources":["../../../node_modules/.pnpm/svelte@5.34.8/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_start !== null) {\n\t\t\tremove_effect_dom(effect.nodes_start, /** @type {TemplateNode} */ (effect.nodes_end));\n\t\t\teffect.nodes_start = effect.nodes_end = 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\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 = /** @type {TemplateNode} */ (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 {Node} */ (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_ERROR","assign_nodes","set_hydrate_node","create_fragment_from_html","get_first_child"],"mappings":";;AA2CO,SAASA,EAAKC,GAAMC,GAAWC,IAAM,IAAOC,IAAS,IAAOC,IAAe,IAAO;AACxF,MAAIC,IAASL,GAETM,IAAQ;AAEZ,EAAAC,EAAgB,MAAM;AACrB,QAAIC;AAAA;AAAA,MAAgCC;AAAA;AAEpC,QAAIH,OAAWA,IAAQL,EAAW,KAAI,KAAK;AAC1C,MAAIS,KAAWC,EAAc;AAC7B;AAAA,IACH;AAOE,QALIH,EAAO,gBAAgB,SAC1BI;AAAA,MAAkBJ,EAAO;AAAA;AAAA,MAA0CA,EAAO;AAAA,IAAW,GACrFA,EAAO,cAAcA,EAAO,YAAY,OAGrCF,MAAU,IAEd;AAAA,UAAII,GAAW;AAGoB,QAACG,EAAc;AAIjD,iBAHIC,IAAOH,EAAc,GACrBI,IAAOD,GAGVA,MAAS,SACRA,EAAK,aAAaE;AAAA,QAAwCF,EAAM,SAAS;AAE1E,UAAAC,IAAOD,GACPA;AAAA,UAAoCG,EAAiBH,CAAI;AAG1D,YAAIA,MAAS;AACZI,gBAAAA,EAAsB,GAChBC;AAOP,QAAAC,EAAaP,GAAcE,CAAI,GAC/BV,IAASgB,EAAiBP,CAAI;AAC9B;AAAA,MACH;AAEE,UAAIf,IAAOO,IAAQ;AACnB,MAAIJ,IAAKH,IAAO,QAAQA,CAAI,WACnBI,MAAQJ,IAAO,SAASA,CAAI;AAKrC,UAAIC,IAAOsB,EAA0BvB,CAAI;AAWzC,WATIG,KAAOC,OACVH;AAAA,MAA+BuB,EAAgBvB,CAAI,IAGpDoB;AAAA;AAAA,QAC8BG,EAAgBvB,CAAI;AAAA;AAAA,QACpBA,EAAK;AAAA,MAClC,GAEGE,KAAOC;AACV,eAAOoB,EAAgBvB,CAAI;AAC1B,UAAAK,EAAO;AAAA;AAAA,YAA4BkB,EAAgBvB,CAAI;AAAA,UAAG;AAAA;AAG3D,QAAAK,EAAO,OAAOL,CAAI;AAAA;AAAA,EAErB,CAAE;AACF;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { n as t, aA as a, F as o, aL as u } from "./index-DmO4Bf6j.js";
1
+ import { n as t, aA as a, G as o, aO as u } from "./index-qsKp2OJc.js";
2
2
  function c(n) {
3
3
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
4
4
  }
@@ -25,4 +25,4 @@ export {
25
25
  l as a,
26
26
  f as o
27
27
  };
28
- //# sourceMappingURL=index-client-BARQdFBp.js.map
28
+ //# sourceMappingURL=index-client-DqEnqJlv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-client-BARQdFBp.js","sources":["../../../node_modules/.pnpm/svelte@5.34.8/node_modules/svelte/src/internal/shared/errors.js","../../../node_modules/.pnpm/svelte@5.34.8/node_modules/svelte/src/index-client.js"],"sourcesContent":["/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\n/**\n * Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\n * @returns {never}\n */\nexport function invalid_default_snippet() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_default_snippet\\nCannot use \\`{@render children(...)}\\` if the parent component uses \\`let:\\` directives. Consider using a named snippet instead\\nhttps://svelte.dev/e/invalid_default_snippet`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_default_snippet`);\n\t}\n}\n\n/**\n * A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`\n * @returns {never}\n */\nexport function invalid_snippet_arguments() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_snippet_arguments\\nA snippet function was passed invalid arguments. Snippets should only be instantiated via \\`{@render ...}\\`\\nhttps://svelte.dev/e/invalid_snippet_arguments`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_snippet_arguments`);\n\t}\n}\n\n/**\n * `%name%(...)` can only be used during component initialisation\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_outside_component(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`lifecycle_outside_component\\n\\`${name}(...)\\` can only be used during component initialisation\\nhttps://svelte.dev/e/lifecycle_outside_component`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/lifecycle_outside_component`);\n\t}\n}\n\n/**\n * Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.\n * @returns {never}\n */\nexport function snippet_without_render_tag() {\n\tif (DEV) {\n\t\tconst error = new Error(`snippet_without_render_tag\\nAttempted to render a snippet without a \\`{@render}\\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \\`{snippet}\\` to \\`{@render snippet()}\\`.\\nhttps://svelte.dev/e/snippet_without_render_tag`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/snippet_without_render_tag`);\n\t}\n}\n\n/**\n * `%name%` is not a store with a `subscribe` method\n * @param {string} name\n * @returns {never}\n */\nexport function store_invalid_shape(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`store_invalid_shape\\n\\`${name}\\` is not a store with a \\`subscribe\\` method\\nhttps://svelte.dev/e/store_invalid_shape`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/store_invalid_shape`);\n\t}\n}\n\n/**\n * The `this` prop on `<svelte:element>` must be a string, if defined\n * @returns {never}\n */\nexport function svelte_element_invalid_this_value() {\n\tif (DEV) {\n\t\tconst error = new Error(`svelte_element_invalid_this_value\\nThe \\`this\\` prop on \\`<svelte:element>\\` must be a string, if defined\\nhttps://svelte.dev/e/svelte_element_invalid_this_value`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`);\n\t}\n}","/** @import { ComponentContext, ComponentContextLegacy } from '#client' */\n/** @import { EventDispatcher } from './index.js' */\n/** @import { NotFunction } from './internal/types.js' */\nimport { untrack } from './internal/client/runtime.js';\nimport { is_array } from './internal/shared/utils.js';\nimport { user_effect } from './internal/client/index.js';\nimport * as e from './internal/client/errors.js';\nimport { lifecycle_outside_component } from './internal/shared/errors.js';\nimport { legacy_mode_flag } from './internal/flags/index.js';\nimport { component_context } from './internal/client/context.js';\nimport { DEV } from 'esm-env';\n\nif (DEV) {\n\t/**\n\t * @param {string} rune\n\t */\n\tfunction throw_rune_error(rune) {\n\t\tif (!(rune in globalThis)) {\n\t\t\t// TODO if people start adjusting the \"this can contain runes\" config through v-p-s more, adjust this message\n\t\t\t/** @type {any} */\n\t\t\tlet value; // let's hope noone modifies this global, but belts and braces\n\t\t\tObject.defineProperty(globalThis, rune, {\n\t\t\t\tconfigurable: true,\n\t\t\t\t// eslint-disable-next-line getter-return\n\t\t\t\tget: () => {\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\te.rune_outside_svelte(rune);\n\t\t\t\t},\n\t\t\t\tset: (v) => {\n\t\t\t\t\tvalue = v;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tthrow_rune_error('$state');\n\tthrow_rune_error('$effect');\n\tthrow_rune_error('$derived');\n\tthrow_rune_error('$inspect');\n\tthrow_rune_error('$props');\n\tthrow_rune_error('$bindable');\n}\n\n/**\n * `onMount`, like [`$effect`](https://svelte.dev/docs/svelte/$effect), schedules a function to run as soon as the component has been mounted to the DOM.\n * Unlike `$effect`, the provided function only runs once.\n *\n * It must be called during the component's initialisation (but doesn't need to live _inside_ the component;\n * it can be called from an external module). If a function is returned _synchronously_ from `onMount`,\n * it will be called when the component is unmounted.\n *\n * `onMount` functions do not run during [server-side rendering](https://svelte.dev/docs/svelte/svelte-server#render).\n *\n * @template T\n * @param {() => NotFunction<T> | Promise<NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('onMount');\n\t}\n\n\tif (legacy_mode_flag && component_context.l !== null) {\n\t\tinit_update_callbacks(component_context).m.push(fn);\n\t} else {\n\t\tuser_effect(() => {\n\t\t\tconst cleanup = untrack(fn);\n\t\t\tif (typeof cleanup === 'function') return /** @type {() => void} */ (cleanup);\n\t\t});\n\t}\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('onDestroy');\n\t}\n\n\tonMount(() => () => untrack(fn));\n}\n\n/**\n * @template [T=any]\n * @param {string} type\n * @param {T} [detail]\n * @param {any}params_0\n * @returns {CustomEvent<T>}\n */\nfunction create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: null; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events)\n * @template {Record<string, any>} [EventMap = any]\n * @returns {EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst active_component_context = component_context;\n\tif (active_component_context === null) {\n\t\tlifecycle_outside_component('createEventDispatcher');\n\t}\n\n\treturn (type, detail, options) => {\n\t\tconst events = /** @type {Record<string, Function | Function[]>} */ (\n\t\t\tactive_component_context.s.$$events\n\t\t)?.[/** @type {any} */ (type)];\n\n\t\tif (events) {\n\t\t\tconst callbacks = is_array(events) ? events.slice() : [events];\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = create_custom_event(/** @type {string} */ (type), detail, options);\n\t\t\tfor (const fn of callbacks) {\n\t\t\t\tfn.call(active_component_context.x, event);\n\t\t\t}\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n// TODO mark beforeUpdate and afterUpdate as deprecated in Svelte 6\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`.\n *\n * In runes mode use `$effect.pre` instead.\n *\n * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('beforeUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('beforeUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).b.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`.\n *\n * In runes mode use `$effect` instead.\n *\n * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('afterUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('afterUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).a.push(fn);\n}\n\n/**\n * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate\n * @param {ComponentContext} context\n */\nfunction init_update_callbacks(context) {\n\tvar l = /** @type {ComponentContextLegacy} */ (context).l;\n\treturn (l.u ??= { a: [], b: [], m: [] });\n}\n\nexport { flushSync } from './internal/client/runtime.js';\nexport { getContext, getAllContexts, hasContext, setContext } from './internal/client/context.js';\nexport { hydrate, mount, unmount } from './internal/client/render.js';\nexport { tick, untrack } from './internal/client/runtime.js';\nexport { createRawSnippet } from './internal/client/dom/blocks/snippet.js';\n"],"names":["lifecycle_outside_component","name","onMount","fn","component_context","legacy_mode_flag","init_update_callbacks","user_effect","cleanup","untrack","onDestroy","context","l"],"mappings":";AAuCO,SAASA,EAA4BC,GAAM;AAOhD,QAAM,IAAI,MAAM,kDAAkD;AAEpE;ACYO,SAASC,EAAQC,GAAI;AAC3B,EAAIC,MAAsB,QACzBJ,EAAqC,GAGlCK,KAAoBD,EAAkB,MAAM,OAC/CE,EAAsBF,CAAiB,EAAE,EAAE,KAAKD,CAAE,IAElDI,EAAY,MAAM;AACX,UAAAC,IAAUC,EAAQN,CAAE;AACtB,QAAA,OAAOK,KAAY,WAAY;AAAA;AAAA,MAAkCA;AAAA;AAAA,EAAA,CACrE;AAEH;AAWO,SAASE,EAAUP,GAAI;AAC7B,EAAIC,MAAsB,QACzBJ,EAAuC,GAGxCE,EAAQ,MAAM,MAAMO,EAAQN,CAAE,CAAC;AAChC;AAkHA,SAASG,EAAsBK,GAAS;AACnC,MAAAC;AAAA;AAAA,IAA2CD,EAAS;AAAA;AAChD,SAAAC,EAAE,MAAFA,EAAE,IAAM,EAAE,GAAG,CAAI,GAAA,GAAG,CAAA,GAAI,GAAG,GAAG;AACvC;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"index-client-DqEnqJlv.js","sources":["../../../node_modules/.pnpm/svelte@5.34.8/node_modules/svelte/src/internal/shared/errors.js","../../../node_modules/.pnpm/svelte@5.34.8/node_modules/svelte/src/index-client.js"],"sourcesContent":["/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\n/**\n * Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\n * @returns {never}\n */\nexport function invalid_default_snippet() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_default_snippet\\nCannot use \\`{@render children(...)}\\` if the parent component uses \\`let:\\` directives. Consider using a named snippet instead\\nhttps://svelte.dev/e/invalid_default_snippet`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_default_snippet`);\n\t}\n}\n\n/**\n * A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`\n * @returns {never}\n */\nexport function invalid_snippet_arguments() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_snippet_arguments\\nA snippet function was passed invalid arguments. Snippets should only be instantiated via \\`{@render ...}\\`\\nhttps://svelte.dev/e/invalid_snippet_arguments`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_snippet_arguments`);\n\t}\n}\n\n/**\n * `%name%(...)` can only be used during component initialisation\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_outside_component(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`lifecycle_outside_component\\n\\`${name}(...)\\` can only be used during component initialisation\\nhttps://svelte.dev/e/lifecycle_outside_component`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/lifecycle_outside_component`);\n\t}\n}\n\n/**\n * Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.\n * @returns {never}\n */\nexport function snippet_without_render_tag() {\n\tif (DEV) {\n\t\tconst error = new Error(`snippet_without_render_tag\\nAttempted to render a snippet without a \\`{@render}\\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \\`{snippet}\\` to \\`{@render snippet()}\\`.\\nhttps://svelte.dev/e/snippet_without_render_tag`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/snippet_without_render_tag`);\n\t}\n}\n\n/**\n * `%name%` is not a store with a `subscribe` method\n * @param {string} name\n * @returns {never}\n */\nexport function store_invalid_shape(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`store_invalid_shape\\n\\`${name}\\` is not a store with a \\`subscribe\\` method\\nhttps://svelte.dev/e/store_invalid_shape`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/store_invalid_shape`);\n\t}\n}\n\n/**\n * The `this` prop on `<svelte:element>` must be a string, if defined\n * @returns {never}\n */\nexport function svelte_element_invalid_this_value() {\n\tif (DEV) {\n\t\tconst error = new Error(`svelte_element_invalid_this_value\\nThe \\`this\\` prop on \\`<svelte:element>\\` must be a string, if defined\\nhttps://svelte.dev/e/svelte_element_invalid_this_value`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`);\n\t}\n}","/** @import { ComponentContext, ComponentContextLegacy } from '#client' */\n/** @import { EventDispatcher } from './index.js' */\n/** @import { NotFunction } from './internal/types.js' */\nimport { untrack } from './internal/client/runtime.js';\nimport { is_array } from './internal/shared/utils.js';\nimport { user_effect } from './internal/client/index.js';\nimport * as e from './internal/client/errors.js';\nimport { lifecycle_outside_component } from './internal/shared/errors.js';\nimport { legacy_mode_flag } from './internal/flags/index.js';\nimport { component_context } from './internal/client/context.js';\nimport { DEV } from 'esm-env';\n\nif (DEV) {\n\t/**\n\t * @param {string} rune\n\t */\n\tfunction throw_rune_error(rune) {\n\t\tif (!(rune in globalThis)) {\n\t\t\t// TODO if people start adjusting the \"this can contain runes\" config through v-p-s more, adjust this message\n\t\t\t/** @type {any} */\n\t\t\tlet value; // let's hope noone modifies this global, but belts and braces\n\t\t\tObject.defineProperty(globalThis, rune, {\n\t\t\t\tconfigurable: true,\n\t\t\t\t// eslint-disable-next-line getter-return\n\t\t\t\tget: () => {\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\te.rune_outside_svelte(rune);\n\t\t\t\t},\n\t\t\t\tset: (v) => {\n\t\t\t\t\tvalue = v;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tthrow_rune_error('$state');\n\tthrow_rune_error('$effect');\n\tthrow_rune_error('$derived');\n\tthrow_rune_error('$inspect');\n\tthrow_rune_error('$props');\n\tthrow_rune_error('$bindable');\n}\n\n/**\n * `onMount`, like [`$effect`](https://svelte.dev/docs/svelte/$effect), schedules a function to run as soon as the component has been mounted to the DOM.\n * Unlike `$effect`, the provided function only runs once.\n *\n * It must be called during the component's initialisation (but doesn't need to live _inside_ the component;\n * it can be called from an external module). If a function is returned _synchronously_ from `onMount`,\n * it will be called when the component is unmounted.\n *\n * `onMount` functions do not run during [server-side rendering](https://svelte.dev/docs/svelte/svelte-server#render).\n *\n * @template T\n * @param {() => NotFunction<T> | Promise<NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('onMount');\n\t}\n\n\tif (legacy_mode_flag && component_context.l !== null) {\n\t\tinit_update_callbacks(component_context).m.push(fn);\n\t} else {\n\t\tuser_effect(() => {\n\t\t\tconst cleanup = untrack(fn);\n\t\t\tif (typeof cleanup === 'function') return /** @type {() => void} */ (cleanup);\n\t\t});\n\t}\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('onDestroy');\n\t}\n\n\tonMount(() => () => untrack(fn));\n}\n\n/**\n * @template [T=any]\n * @param {string} type\n * @param {T} [detail]\n * @param {any}params_0\n * @returns {CustomEvent<T>}\n */\nfunction create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: null; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events)\n * @template {Record<string, any>} [EventMap = any]\n * @returns {EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst active_component_context = component_context;\n\tif (active_component_context === null) {\n\t\tlifecycle_outside_component('createEventDispatcher');\n\t}\n\n\treturn (type, detail, options) => {\n\t\tconst events = /** @type {Record<string, Function | Function[]>} */ (\n\t\t\tactive_component_context.s.$$events\n\t\t)?.[/** @type {any} */ (type)];\n\n\t\tif (events) {\n\t\t\tconst callbacks = is_array(events) ? events.slice() : [events];\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = create_custom_event(/** @type {string} */ (type), detail, options);\n\t\t\tfor (const fn of callbacks) {\n\t\t\t\tfn.call(active_component_context.x, event);\n\t\t\t}\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n// TODO mark beforeUpdate and afterUpdate as deprecated in Svelte 6\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`.\n *\n * In runes mode use `$effect.pre` instead.\n *\n * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('beforeUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('beforeUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).b.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`.\n *\n * In runes mode use `$effect` instead.\n *\n * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('afterUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('afterUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).a.push(fn);\n}\n\n/**\n * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate\n * @param {ComponentContext} context\n */\nfunction init_update_callbacks(context) {\n\tvar l = /** @type {ComponentContextLegacy} */ (context).l;\n\treturn (l.u ??= { a: [], b: [], m: [] });\n}\n\nexport { flushSync } from './internal/client/runtime.js';\nexport { getContext, getAllContexts, hasContext, setContext } from './internal/client/context.js';\nexport { hydrate, mount, unmount } from './internal/client/render.js';\nexport { tick, untrack } from './internal/client/runtime.js';\nexport { createRawSnippet } from './internal/client/dom/blocks/snippet.js';\n"],"names":["lifecycle_outside_component","name","onMount","fn","component_context","legacy_mode_flag","init_update_callbacks","user_effect","cleanup","untrack","onDestroy","context","l"],"mappings":";AAuCO,SAASA,EAA4BC,GAAM;AAOhD,QAAM,IAAI,MAAM,kDAAkD;AAEpE;ACYO,SAASC,EAAQC,GAAI;AAC3B,EAAIC,MAAsB,QACzBJ,EAAqC,GAGlCK,KAAoBD,EAAkB,MAAM,OAC/CE,EAAsBF,CAAiB,EAAE,EAAE,KAAKD,CAAE,IAElDI,EAAY,MAAM;AACX,UAAAC,IAAUC,EAAQN,CAAE;AACtB,QAAA,OAAOK,KAAY,WAAY;AAAA;AAAA,MAAkCA;AAAA;AAAA,EAAA,CACrE;AAEH;AAWO,SAASE,EAAUP,GAAI;AAC7B,EAAIC,MAAsB,QACzBJ,EAAuC,GAGxCE,EAAQ,MAAM,MAAMO,EAAQN,CAAE,CAAC;AAChC;AAkHA,SAASG,EAAsBK,GAAS;AACnC,MAAAC;AAAA;AAAA,IAA2CD,EAAS;AAAA;AAChD,SAAAC,EAAE,MAAFA,EAAE,IAAM,EAAE,GAAG,CAAI,GAAA,GAAG,CAAA,GAAI,GAAG,GAAG;AACvC;","x_google_ignoreList":[0,1]}