@zaisma/game-server 1.6.0 → 1.7.0

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 (2) hide show
  1. package/bench/glass.js +346 -57
  2. package/package.json +1 -1
package/bench/glass.js CHANGED
@@ -6314,6 +6314,11 @@ var ERROR_CODES = {
6314
6314
  no_game_server: { httpStatus: 409, meaning: "purchase_delivery game_server needs a game server, on Zaisma or the developer's own, and the game has none." },
6315
6315
  already_handled: { httpStatus: 409, meaning: "The purchase was handed over already, or its refund was told already." },
6316
6316
  handled_by_server: { httpStatus: 409, meaning: "The game's purchases go to its game server or the developer's own server (purchase_delivery), so the game can't mark them handled." },
6317
+ bad_full_game_item: { httpStatus: 400, meaning: "full_game_item_name doesn't name one of the game's items that's permanent and content, or the game is another game's demo." },
6318
+ full_game_item_in_use: { httpStatus: 409, meaning: "The item is the game's full game (full_game_item_name), so it can't be removed or stop being permanent and content." },
6319
+ bad_demo_game: { httpStatus: 400, meaning: "demo_game_slug isn't another of the developer's games that's free to play, or the game itself is free to play." },
6320
+ account_requirement_locked: { httpStatus: 400, meaning: "A game that sells itself (full_game_item_name) needs account_requirement whole_game, since only accounts own it." },
6321
+ full_game_not_owned: { httpStatus: 403, meaning: "The game sells itself, and the player's account doesn't own it: buy it on its game page." },
6317
6322
  // Cloud saves
6318
6323
  no_save: { httpStatus: 404, meaning: "The player has no save in the game." },
6319
6324
  no_save_copy: { httpStatus: 404, meaning: "The player's save has no earlier version with that ID." },
@@ -7189,6 +7194,141 @@ function linkBrand(destinationUrl) {
7189
7194
  return { brand, label: name };
7190
7195
  }
7191
7196
 
7197
+ // ../core/src/items.ts
7198
+ var ZERO_DECIMAL_CURRENCIES = ["bif", "clp", "djf", "gnf", "jpy", "kmf", "krw", "mga", "pyg", "rwf", "vnd", "vuv", "xaf", "xof", "xpf"];
7199
+ var COUNTRY_CURRENCIES = {
7200
+ US: "usd",
7201
+ // Places Cloudflare names apart from the United States, and countries that use the US dollar.
7202
+ PR: "usd",
7203
+ GU: "usd",
7204
+ VI: "usd",
7205
+ AS: "usd",
7206
+ MP: "usd",
7207
+ UM: "usd",
7208
+ EC: "usd",
7209
+ SV: "usd",
7210
+ PA: "usd",
7211
+ TL: "usd",
7212
+ FM: "usd",
7213
+ MH: "usd",
7214
+ PW: "usd",
7215
+ BQ: "usd",
7216
+ TC: "usd",
7217
+ VG: "usd",
7218
+ AE: "aed",
7219
+ AR: "ars",
7220
+ AU: "aud",
7221
+ CX: "aud",
7222
+ CC: "aud",
7223
+ NF: "aud",
7224
+ KI: "aud",
7225
+ NR: "aud",
7226
+ TV: "aud",
7227
+ BR: "brl",
7228
+ CA: "cad",
7229
+ CH: "chf",
7230
+ LI: "chf",
7231
+ CO: "cop",
7232
+ CZ: "czk",
7233
+ DK: "dkk",
7234
+ FO: "dkk",
7235
+ GL: "dkk",
7236
+ GB: "gbp",
7237
+ IM: "gbp",
7238
+ JE: "gbp",
7239
+ GG: "gbp",
7240
+ HK: "hkd",
7241
+ HU: "huf",
7242
+ ID: "idr",
7243
+ IL: "ils",
7244
+ IN: "inr",
7245
+ JP: "jpy",
7246
+ KR: "krw",
7247
+ MX: "mxn",
7248
+ MY: "myr",
7249
+ NO: "nok",
7250
+ SJ: "nok",
7251
+ NZ: "nzd",
7252
+ CK: "nzd",
7253
+ NU: "nzd",
7254
+ PN: "nzd",
7255
+ TK: "nzd",
7256
+ PH: "php",
7257
+ PL: "pln",
7258
+ RO: "ron",
7259
+ RU: "rub",
7260
+ SE: "sek",
7261
+ SG: "sgd",
7262
+ TH: "thb",
7263
+ ZA: "zar",
7264
+ // The euro area (Bulgaria since January 1, 2026), the regions of its countries Cloudflare names apart, and the small states that use the euro.
7265
+ AT: "eur",
7266
+ BE: "eur",
7267
+ BG: "eur",
7268
+ HR: "eur",
7269
+ CY: "eur",
7270
+ EE: "eur",
7271
+ FI: "eur",
7272
+ FR: "eur",
7273
+ DE: "eur",
7274
+ GR: "eur",
7275
+ IE: "eur",
7276
+ IT: "eur",
7277
+ LV: "eur",
7278
+ LT: "eur",
7279
+ LU: "eur",
7280
+ MT: "eur",
7281
+ NL: "eur",
7282
+ PT: "eur",
7283
+ SK: "eur",
7284
+ SI: "eur",
7285
+ ES: "eur",
7286
+ AX: "eur",
7287
+ GF: "eur",
7288
+ GP: "eur",
7289
+ MQ: "eur",
7290
+ RE: "eur",
7291
+ YT: "eur",
7292
+ PM: "eur",
7293
+ BL: "eur",
7294
+ MF: "eur",
7295
+ AD: "eur",
7296
+ MC: "eur",
7297
+ SM: "eur",
7298
+ VA: "eur",
7299
+ ME: "eur",
7300
+ XK: "eur"
7301
+ };
7302
+ function currencyForCountry(countryCode) {
7303
+ return countryCode ? COUNTRY_CURRENCIES[countryCode.toUpperCase()] ?? null : null;
7304
+ }
7305
+ function priceFor(gameItem, countryCode) {
7306
+ if (gameItem.price_minor_units === null || gameItem.currency_code === null) return null;
7307
+ const currencyCode = currencyForCountry(countryCode);
7308
+ const local = currencyCode ? gameItem.local_prices.find((price) => price.currency_code === currencyCode) : void 0;
7309
+ return local ? { currencyCode: local.currency_code, priceMinorUnits: local.price_minor_units } : { currencyCode: gameItem.currency_code, priceMinorUnits: gameItem.price_minor_units };
7310
+ }
7311
+ var minorUnitCountPerUnit = (currencyCode) => ZERO_DECIMAL_CURRENCIES.includes(currencyCode) ? 1 : 100;
7312
+ function priceText(currencyCode, priceMinorUnits, locale = "en-US") {
7313
+ const minorUnitCount = minorUnitCountPerUnit(currencyCode);
7314
+ const fractionDigitCount = minorUnitCount === 1 ? 0 : 2;
7315
+ return new Intl.NumberFormat(locale, { style: "currency", currency: currencyCode.toUpperCase(), minimumFractionDigits: fractionDigitCount, maximumFractionDigits: fractionDigitCount }).format(priceMinorUnits / minorUnitCount);
7316
+ }
7317
+ var ITEM_FIELDS = ["title", "description", "item_kind", "item_category", "price_minor_units", "currency_code", "local_prices", "is_on_game_page"];
7318
+ var purchaseSettingsOf = (game) => ({
7319
+ refund_policy: game.refund_policy,
7320
+ refund_policy_text: game.refund_policy_text,
7321
+ own_payment_categories: JSON.parse(game.own_payment_categories || "[]"),
7322
+ purchase_delivery: game.purchase_delivery ?? "game"
7323
+ });
7324
+ function refundPolicyWords(game) {
7325
+ if (game.refund_policy === "no_refunds") return "No refunds.";
7326
+ if (game.refund_policy === "unused_within_14_days") return "Refunds for items you haven't used yet, within 14 days.";
7327
+ if (game.refund_policy === "within_14_days") return "Refunds within 14 days.";
7328
+ if (game.refund_policy === "own_words") return game.refund_policy_text;
7329
+ return null;
7330
+ }
7331
+
7192
7332
  // ../cli/shader-check.mjs
7193
7333
  var MOST_GLASS_PANE_COUNT = 16;
7194
7334
  var GLASS_LIGHT_PASS = `
@@ -7565,22 +7705,6 @@ var PIECE_WINDOW_CHARACTER_COUNT = 48;
7565
7705
  var PIECE_HASH_MULTIPLIER_NUMBER = 16777619;
7566
7706
  var PIECE_HASH_LEAVING_MULTIPLIER_NUMBER = Array.from({ length: PIECE_WINDOW_CHARACTER_COUNT }).reduce((powerNumber) => Math.imul(powerNumber, PIECE_HASH_MULTIPLIER_NUMBER), 1);
7567
7707
 
7568
- // ../core/src/items.ts
7569
- var ITEM_FIELDS = ["title", "description", "item_kind", "item_category", "price_minor_units", "currency_code", "local_prices"];
7570
- var purchaseSettingsOf = (game) => ({
7571
- refund_policy: game.refund_policy,
7572
- refund_policy_text: game.refund_policy_text,
7573
- own_payment_categories: JSON.parse(game.own_payment_categories || "[]"),
7574
- purchase_delivery: game.purchase_delivery ?? "game"
7575
- });
7576
- function refundPolicyWords(game) {
7577
- if (game.refund_policy === "no_refunds") return "No refunds.";
7578
- if (game.refund_policy === "unused_within_14_days") return "Refunds for items you haven't used yet, within 14 days.";
7579
- if (game.refund_policy === "within_14_days") return "Refunds within 14 days.";
7580
- if (game.refund_policy === "own_words") return game.refund_policy_text;
7581
- return null;
7582
- }
7583
-
7584
7708
  // src/outside-calls.ts
7585
7709
  var OUTSIDE_CALL_LIMITS = {
7586
7710
  maximumBodySizeBytes: 5 * 1024 * 1024,
@@ -8822,7 +8946,7 @@ function pageStyleResponse(path) {
8822
8946
  import { createHash as createHash3 } from "node:crypto";
8823
8947
 
8824
8948
  // ../../apps/site/src/generated/components-script.generated.ts
8825
- var MINIFIED_COMPONENT_SCRIPT = { sourceSha256: "63f4551d1cab306eed2fddd5acaa07229e27ab4e272bd89df3e07c72fa74ea7e", minifiedText: `(function(){var b=[],f=new Map,l=[],n=[],h=null,v=!1,s=!1,p=null;function m(y){y()}function i(y){var x=new Map;y.forEach(function(A){var P=A.batch||m,O=x.get(P);O||(O=new Set,x.set(P,O)),O.add(A.callback)}),x.forEach(function(A,P){P(function(){A.forEach(function(O){O()})})})}function d(y,x,A,P){x.push({callback:A,batch:P}),!(y==="resize"?v:s)&&(y==="resize"?(v=!0,window.addEventListener("resize",function(){i(l.slice())})):(s=!0,window.addEventListener("scroll",function(){i(n.slice())},{passive:!0,capture:!0})))}var c=null;function e(){if(c)return c;var y=["textarea","select","[popover]","dialog","[style*='overflow']"];function x(A){for(var P=0;P<A.length;P++){var O=A[P],q=O.style;q&&O.selectorText&&/auto|scroll|var\\(/.test(q.overflowY+" "+q.getPropertyValue("overflow"))&&y.push(O.selectorText),O.cssRules&&x(O.cssRules)}}return Array.prototype.forEach.call(document.styleSheets,function(A){try{x(A.cssRules)}catch{}}),c=y,y}function o(y,x){var A;try{A=y.querySelectorAll(x)}catch{try{A=y.querySelectorAll(x.replace(/::[a-z-]+(\\([^)]*\\))?/g,""))}catch{return[]}}return Array.from(A)}function r(y){return y!==document.body&&document.body.contains(y)&&/^(auto|scroll)$/.test(getComputedStyle(y).overflowY)}window.zaismaWatch={page:function(y){b.push(y)},size:function(y,x,A){if(!window.ResizeObserver){d("resize",l,x,A);return}h||(h=new ResizeObserver(function(O){var q=[];O.forEach(function(T){(f.get(T.target)||[]).forEach(function(j){q.push(j)})}),i(q)}));var P=f.get(y);P||(P=[],f.set(y,P),h.observe(y,{box:"border-box"})),P.push({callback:x,batch:A})},resize:function(y,x){d("resize",l,y,x)},scroll:function(y){d("scroll",n,y)},scrollBoxes:function(){if(p)return p;var y=new Set;return e().forEach(function(x){o(document,x).forEach(function(A){r(A)&&y.add(A)})}),p=Array.from(y).sort(function(x,A){return x.compareDocumentPosition(A)&4?-1:1}),p},scrollBoxesIn:function(y){var x=new Set;return e().forEach(function(A){var P=o(y,A);try{y.matches(A)&&P.unshift(y)}catch{}P.forEach(function(O){r(O)&&x.add(O)})}),Array.from(x)},each:function(y,x){var A=new WeakSet;function P(O){A.has(O)||(A.add(O),x(O))}document.querySelectorAll(y).forEach(P),b.push(function(O){O.forEach(function(q){q.addedNodes.forEach(function(T){T.nodeType!==1||!T.isConnected||(T.matches(y)&&P(T),T.querySelectorAll(y).forEach(P))})})})}};function E(y){var x=new Map;return y.filter(function(A){if(A.target instanceof SVGElement)return!1;if(A.type!=="attributes")return!0;var P=x.get(A.target);return P||(P={},x.set(A.target,P)),P[A.attributeName]?!1:(P[A.attributeName]=!0,A.oldValue!==A.target.getAttribute(A.attributeName))})}new MutationObserver(function(y){var x=E(y);x.length&&b.slice().forEach(function(A){A(x)})}).observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class","open","hidden"]})})(),(function(){var b="http://www.w3.org/2000/svg",f={};function l(a){return a in f||(f[a]=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--"+a.replace(/-(large|small)$/,"-cut-$1")))||0),f[a]}["pane","header","menu"].forEach(function(a){l(a+"-large"),l(a+"-small")});function n(a,g){var L=(a.getAttribute("data-glass-corners")||g).trim().split(/\\s+/);return L.length===1&&/^[a-z]+$/.test(L[0])&&(L=[L[0]+"-large",L[0]+"-small",L[0]+"-large",L[0]+"-small"]),L.map(function(F){return/^[a-z]+-(large|small)$/.test(F)?l(F):Number(F)||0})}window.zaismaCorners=n;function h(a,g,L,F){var z=F,X=F*.414,D=L.map(function(N){return N>0?N+X:z});return[[z,D[0]],[D[0],z],[a-D[1],z],[a-z,D[1]],[a-z,g-D[2]],[a-D[2],g-z],[D[3],g-z],[z,g-D[3]]]}function v(a){return a.map(function(g){return g[0].toFixed(1)+","+g[1].toFixed(1)}).join(" ")}var s=[80,100,70,28,12,0,40,62],p={"top-left":80,top:100,"top-right":70,right:28,"bottom-right":12,bottom:0,"bottom-left":40,left:62};function m(a,g,L,F,z){for(;g.length<L.length;){var X=document.createElementNS(b,"polygon");a.appendChild(X),g.push(X)}for(;g.length>L.length;)a.removeChild(g.pop());g.forEach(function(D,N){var U=(N+1)%L.length;D.style.setProperty("--side-light",z[N]+"%"),D.setAttribute("points",v([L[N],L[U],F[U],F[N]]))})}var i=null;function d(a,g){if(i){a();return}i={rects:new Map,sizes:new Map,groups:new Map,scrollers:new Map,isBatch:!!g,isMeasured:!1};try{a()}finally{i=null}}function c(a){d(a,!0)}function e(){i.isMeasured=!0,document.querySelectorAll("[data-cut-line], [data-glass]").forEach(function(a){i.rects.set(a,a.getBoundingClientRect()),i.sizes.set(a,[a.offsetWidth,a.offsetHeight])}),document.querySelectorAll("[data-cut-line]").forEach(function(a){E(it(a)).push(a)}),document.querySelectorAll("body .own-scroll, body .layout-track").forEach(function(a){i.scrollers.set(a,o(a))})}function o(a){return{scrollTop:a.scrollTop,scrollHeight:a.scrollHeight,clientHeight:a.clientHeight,scrollLeft:a.scrollLeft,scrollWidth:a.scrollWidth,clientWidth:a.clientWidth}}function r(a){var g=i.scrollers.get(a);return g||(g=o(a),i.scrollers.set(a,g)),g}function E(a){var g=i.groups.get(a);return g||(g=[],i.groups.set(a,g)),g}function y(a){i.isBatch&&!i.isMeasured&&e();var g=i.rects.get(a);return g||(g=a.getBoundingClientRect(),i.rects.set(a,g)),g}function x(a){i.isBatch&&!i.isMeasured&&e();var g=i.sizes.get(a);return g||(g=[a.offsetWidth,a.offsetHeight],i.sizes.set(a,g)),g}function A(a){if(i.isBatch&&!i.isMeasured&&e(),i.isMeasured)return i.groups.get(a)||[];var g=i.groups.get(a);return g||(g=Array.prototype.filter.call((a||document).querySelectorAll("[data-cut-line]"),function(L){return it(L)===a}),i.groups.set(a,g)),g}var P=new Map,O=!1;function q(){c(function(){P.forEach(function(a,g){g.isConnected?a():P.delete(g)})})}var T=!!(document.fonts&&document.fonts.addEventListener);T&&document.fonts.addEventListener("loadingdone",function(){q(),Pt()});function j(){T||O||!document.fonts||!document.fonts.ready||document.fonts.status!=="loading"||(O=!0,document.fonts.ready.then(function(){O=!1,q()}))}var k=-1;window.zaismaWatch.size(document.documentElement,function(){var a=document.documentElement.clientWidth,g=k<0;a!==k&&(k=a,g||(q(),Pt()))},c);var B=0;function $(a,g){var L=a.querySelector(":scope > .edge"),F="zg"+B++,z=null,X="",D="",N=a.hasAttribute("data-cut-line");L||(L=document.createElementNS(b,"svg"),L.setAttribute("class","edge"),L.setAttribute("aria-hidden","true"),a.appendChild(L));function U(u,w){var S=document.createElementNS(b,u);for(var M in w)S.setAttribute(M,w[M]);return L.appendChild(S),S}function rt(){L.innerHTML='<defs><linearGradient id="'+F+'fr" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#7fd8ff" stop-opacity="0.5"/><stop offset="0.5" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#ffc58a" stop-opacity="0.5"/></linearGradient><linearGradient id="'+F+'in" x1="1" y1="1" x2="0" y2="0"><stop class="gleam" offset="0"/><stop class="gleam" offset="0.4" stop-opacity="0"/><stop class="gleam" offset="0.75" stop-opacity="0"/><stop class="gleam" offset="1" stop-opacity="0.35"/></linearGradient><linearGradient id="'+F+'sp" x1="0" y1="0" x2="1" y2="1"><stop class="spec" offset="0"/><stop class="spec" offset="0.08"/><stop class="spec" offset="0.3" stop-opacity="0"/></linearGradient></defs>',z={dense:U("path",{class:"dense","fill-rule":"evenodd"}),bevel:U("g",{class:"bevel"}),bevelQuads:[],hair:U("polygon",{class:"hair",fill:"none","stroke-width":"1.2"}),rimBand:U("g",{class:"rim-band"}),rimQuads:[],rim:U("polygon",{class:"rim",fill:"none","stroke-width":"1.6"}),spec:U("polygon",{class:"spec-line",fill:"none",stroke:"url(#"+F+"sp)","stroke-width":"1.4"}),fringe:U("polygon",{class:"fringe",fill:"none",stroke:"url(#"+F+"fr)","stroke-width":"0.8"}),inner:U("polygon",{class:"inner",fill:"none",stroke:"url(#"+F+"in)","stroke-width":"1"}),caustics:N?[]:[1,2,3,4].map(function(u){return{group:U("g",{class:"caustic step-"+u}),quads:[]}}),facets:[]}}function lt(){d(t)}function t(){var u=x(a),w=u[0],S=u[1];if(!(!w||!S)){var M=Math.min(w,S),Z=Number(a.getAttribute("data-glass-band"))||Math.max(2,Math.min(4,M*.04)),Q,G;if(z||rt(),N){var K=_(W(a,w,S)),nt=w+"x"+S+":"+v(K);if(nt===X)return;X=nt,a.style.setProperty("--cut-shape",C(K)),a.style.clipPath=C(K),Q=function(ht){return I(K,ht)},G=K.map(function(ht,Et){return p[R(ht,K[(Et+1)%K.length])]})}else{var Y=g().map(function(ht){return Math.min(ht,Math.round(M*.3))}),vt=Y.join(",");vt!==X&&(X=vt,a.style.clipPath="polygon(0 "+Y[0]+"px, "+Y[0]+"px 0, calc(100% - "+Y[1]+"px) 0, 100% "+Y[1]+"px, 100% calc(100% - "+Y[2]+"px), calc(100% - "+Y[2]+"px) 100%, "+Y[3]+"px 100%, 0 calc(100% - "+Y[3]+"px))");var yt=a.getAttribute("data-glass-open")==="top"?Math.ceil(Z*1.6)+2:0,St=w+"x"+S+":"+Z+":"+yt+":"+vt;if(St===D)return;D&&Ut(a),D=St,Q=function(ht){return h(w,S+yt,Y,ht).map(function(Et){return[Et[0],Et[1]-yt]})},G=s}L.removeAttribute("viewBox"),z.dense.setAttribute("d","M"+v(Q(0))+"Z M"+v(Q(Z*1.6))+"Z"),m(z.bevel,z.bevelQuads,Q(0),Q(Z),G),m(z.rimBand,z.rimQuads,Q(0),Q(1.6),G),z.hair.setAttribute("points",v(Q(.6))),z.rim.setAttribute("points",v(Q(1.6))),z.spec.setAttribute("points",v(Q(1.6))),z.fringe.setAttribute("points",v(Q(Math.max(2.4,Z-.8)))),z.inner.setAttribute("points",v(Q(Z)));var zt=[Z,Z+2,Z+5,Z+9,Z+14];z.caustics.forEach(function(ht,Et){m(ht.group,ht.quads,Q(zt[Et]),Q(zt[Et+1]),G)});var Tt=Q(0),xt=[];for(Tt.forEach(function(ht,Et){var wt=Tt[(Et+1)%Tt.length],Dt=R(ht,wt);Dt.indexOf("-")>0&&Math.hypot(wt[0]-ht[0],wt[1]-ht[1])>.5&&xt.push([ht,wt,Dt])});z.facets.length<xt.length;)z.facets.push(U("line",{}));z.facets.forEach(function(ht,Et){var wt=xt[Et];if(ht.style.display=wt?"":"none",!!wt){var Dt=wt[2]==="top-left";ht.setAttribute("class",Dt?"facet lit":"facet"),ht.setAttribute("stroke-width",Dt?"4.5":"3"),ht.setAttribute("x1",wt[0][0]),ht.setAttribute("y1",wt[0][1]),ht.setAttribute("x2",wt[1][0]),ht.setAttribute("y2",wt[1][1])}})}}return lt(),window.zaismaWatch.size(a,lt,c),N&&(P.set(a,lt),j()),lt}var ot=getComputedStyle(document.documentElement),ft=function(a,g){return parseFloat(ot.getPropertyValue(a))||g},et=ft("--control-slant",10),st=ft("--gap-control-row",4),mt=ft("--gap-control-stack",8),H=st-et-.5,V=st-et+.5,ct=[16,8,16,8];function at(a){var g=n(a,"header"),L=x(a),F=Math.min(L[0],L[1]);return g.map(function(z){return Math.min(z,Math.round(F*.3))})}function it(a){var g=a.parentElement&&a.parentElement.closest("[data-glass], [data-cut-line], [data-on-no-pane]");return g&&!g.hasAttribute("data-on-no-pane")?g:null}function ut(a,g){var L=y(g),F=a.parentElement&&a.parentElement.closest(".own-scroll"),z=a.parentElement&&a.parentElement.closest(".layout-track");if(z&&z!==g&&g.contains(z)){var X=r(z);X.scrollWidth>X.clientWidth+1&&(L={top:L.top,bottom:L.bottom,left:L.left-X.scrollLeft,right:L.right+X.scrollWidth-X.clientWidth-X.scrollLeft})}if(!F||F===g||!g.contains(F))return L;var D=r(F);return D.scrollHeight<=D.clientHeight+1?L:{top:L.top-D.scrollTop,bottom:L.bottom+D.scrollHeight-D.clientHeight-D.scrollTop,left:L.left,right:L.right}}function pt(a,g,L,F){var z=it(a);if(!z){var X=At(a);return ct.map(function(Q,G){return(G<2?X.above:X.below)?0:Math.min(Q,Math.round(Math.min(g,L)*.25))})}var D=z.hasAttribute("data-cut-line")?z.cutCorners||[0,0,0,0]:at(z),N=y(a),U=ut(a,z),rt=F?F.ends:a.getAttribute("data-cut-ends")||"",lt=N.top-U.top,t=U.bottom-N.bottom,u=F?F.stack:a.getAttribute("data-cut-stack");if(u!=null){var w=N.left-U.left;lt=/first/.test(u)?w:1e6,t=/last/.test(u)?w:1e6}var S=/start/.test(rt)?(lt+t)/2:N.left-U.left,M=/end/.test(rt)?(lt+t)/2:U.right-N.right,Z=Math.max(g,L)<3*Math.min(g,L)?Math.min(g,L)*.5:1/0;return[[S,lt],[M,lt],[M,t],[S,t]].map(function(Q,G){var K=Math.max(0,Q[0])+Math.max(0,Q[1]);return Math.min(Z,Math.max(0,(D[G]||0)-K+Math.SQRT2*K/2))})}function gt(a,g){var L=g?g.beside:a.getAttribute("data-cut-beside");if(L!==null)return{start:/start/.test(L),end:/end/.test(L)};var F=it(a),z=y(a),X={start:!1,end:!1};return A(F).forEach(function(D){if(D!==a){var N=y(D);if(!(!N.width||!N.height)&&!(Math.min(z.bottom,N.bottom)-Math.max(z.top,N.top)<Math.min(z.height,N.height)/2)){var U=N.left-z.right,rt=z.left-N.right,lt=U>=H&&U<=V,t=rt>=H&&rt<=V;(lt||t)&&!D.contains(a)&&!a.contains(D)&&(lt&&(X.end=!0),t&&(X.start=!0))}}}),X}function At(a){var g=y(a),L={above:!1,below:!1};return A(null).forEach(function(F){if(F!==a){var z=y(F);if(!(!z.width||!z.height)&&!(Math.min(g.right,z.right)-Math.max(g.left,z.left)<Math.min(g.width,z.width)/2)){var X=z.top-g.bottom,D=g.top-z.bottom,N=X>=-1&&X<=mt+.5,U=D>=-1&&D<=mt+.5;(N||U)&&!F.contains(a)&&!a.contains(F)&&(N&&(L.below=!0),U&&(L.above=!0))}}}),L}function bt(a,g,L,F,z){var X=Math.min(L,a/3),D=F.map(function(U){return Math.min(U,g)});[[0,3],[1,2]].forEach(function(U){var rt=D[U[0]]+D[U[1]];rt>g&&(D[U[0]]*=g/rt,D[U[1]]*=g/rt)});var N=function(U,rt,lt,t){return U>.5?[rt,lt]:[t,t]};return[].concat(z.start?[[X,0],[X,0]]:N(D[0],[0,D[0]],[D[0],0],[0,0]),z.end?[[a,0],[a,0]]:N(D[1],[a-D[1],0],[a,D[1]],[a,0]),z.end?[[a-X,g],[a-X,g]]:N(D[2],[a,g-D[2]],[a-D[2],g],[a,g]),z.start?[[0,g],[0,g]]:N(D[3],[D[3],g],[0,g-D[3]],[0,g]))}function W(a,g,L,F){var z=gt(a,F),X=pt(a,g,L,F),D=[z.start?0:X[0],z.end?0:X[1],z.end?0:X[2],z.start?0:X[3]].map(function(U){return Math.min(U,L)});if([[0,3],[1,2]].forEach(function(U){var rt=D[U[0]]+D[U[1]];rt>L&&(D[U[0]]*=L/rt,D[U[1]]*=L/rt)}),a.cutCorners=D,!F){var N=((z.start?"start ":"")+(z.end?"end":"")).trim();(a.getAttribute("data-slanted")||"")!==N&&(N?a.setAttribute("data-slanted",N):a.removeAttribute("data-slanted"))}return bt(g,L,a.hasAttribute("data-cut-beside")&&Number(a.getAttribute("data-cut-line"))||et,X,z)}function _(a){return a.filter(function(g,L){var F=a[(L+a.length-1)%a.length];return Math.abs(g[0]-F[0])>.01||Math.abs(g[1]-F[1])>.01})}function C(a){return"polygon("+a.map(function(g){return g[0].toFixed(2)+"px "+g[1].toFixed(2)+"px"}).join(", ")+")"}function I(a,g){if(!g)return a;var L=a.length,F=a.map(function(z,X){var D=a[(X+1)%L],N=D[0]-z[0],U=D[1]-z[1],rt=Math.hypot(N,U)||1,lt=-U/rt,t=N/rt;return{x:z[0]+lt*g,y:z[1]+t*g,dx:N,dy:U,nx:lt,ny:t}});return F.map(function(z,X){var D=F[(X+L-1)%L],N=D.dx*z.dy-D.dy*z.dx;if(Math.abs(N)<1e-6)return[z.x,z.y];var U=((z.x-D.x)*z.dy-(z.y-D.y)*z.dx)/N;return[D.x+D.dx*U,D.y+D.dy*U]})}var J=["right","top-right","top","top-left","left","bottom-left","bottom","bottom-right"];function R(a,g){var L=g[0]-a[0],F=g[1]-a[1],z=Math.atan2(L,F)*180/Math.PI;return J[(Math.round(z/45)%8+8)%8]}function tt(a){var g=a.querySelector(":scope > .cut-line");g||(g=document.createElementNS(b,"svg"),g.setAttribute("class","cut-line"),g.setAttribute("aria-hidden","true"),g.appendChild(document.createElementNS(b,"polygon")),a.insertBefore(g,a.firstChild));var L=g.querySelector("polygon"),F=[],z="";function X(lt){return lt.map(function(t){return t[0].toFixed(2)+","+t[1].toFixed(2)}).join(" ")}var D=null;function N(){d(U)}function U(){var lt=x(a),t=lt[0],u=lt[1];if(!(!t||!u)){var w=W(a,t,u);if(D){var S=Math.min(1,(performance.now()-D.startMs)/D.ms),M=1-Math.pow(1-S,3),Q=W(a,t,u,D.from);w=w.map(function(vt,yt){return[Q[yt][0]+(vt[0]-Q[yt][0])*M,Q[yt][1]+(vt[1]-Q[yt][1])*M]}),S<1?requestAnimationFrame(N):D=null}w=_(w);var Z=t+"x"+u+":"+X(w);if(Z!==z){z=Z,a.style.setProperty("--cut-shape",C(w)),g.setAttribute("viewBox","0 0 "+t+" "+u),L.setAttribute("points",X(I(w,1)));for(var Q=Number(a.getAttribute("data-cut-inset"))||0,G=I(w,Q),K=I(w,Q+1.5);F.length<w.length;){var nt=document.createElementNS(b,"path");g.insertBefore(nt,L),F.push(nt)}for(;F.length>w.length;)g.removeChild(F.pop());F.forEach(function(Y,vt){var yt=(vt+1)%w.length;Y.setAttribute("class","cut-band on-"+R(w[vt],w[yt])),Y.setAttribute("d","M"+X([G[vt],G[yt],K[yt],K[vt]])+"Z")})}}}N(),a.redrawCut=function(lt){lt&&lt.ms>0&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(D={from:lt.from,ms:lt.ms,startMs:performance.now()}),N()},window.zaismaWatch.size(a,N,c);var rt=a.parentElement&&a.parentElement.closest("[data-glass], [data-on-no-pane]");rt&&rt.hasAttribute("data-glass")&&window.zaismaWatch.size(rt,N,c),P.set(a,N),j()}var dt=6,Lt=new Map;function Bt(a){return a!=="none"&&(a.match(/rgba?\\([^)]*\\)/g)||[""]).some(function(g){var L=g.match(/[\\d.]+/g);return!L||L.length<4||Number(L[3])>.04})}function _t(a,g){if(/^(IMG|VIDEO|CANVAS|IFRAME)$/.test(a.tagName)||g.backgroundImage!=="none"||Bt(g.boxShadow))return!0;var L=g.backgroundColor.match(/[\\d.]+/g);return L&&(L.length<4||Number(L[3])>.04)?!0:["Top","Right","Bottom","Left"].some(function(F){return parseFloat(g["border"+F+"Width"])>0&&!/rgba\\(.*, 0\\)|transparent/.test(g["border"+F+"Color"])})}function Nt(a){var g=[],L=y(a),F=Math.max.apply(null,at(a))/(1-Math.SQRT2/2);function z(D){return[[D.left-L.left,D.top-L.top],[L.right-D.right,D.top-L.top],[L.right-D.right,L.bottom-D.bottom],[D.left-L.left,L.bottom-D.bottom]].some(function(N){return Math.max(0,N[0])+Math.max(0,N[1])<F})}function X(D){Array.prototype.forEach.call(D.children,function(N){if(!(N instanceof SVGElement||N.matches("[data-glass], [data-cut-line], .edge, .cut-line"))){var U=N.getBoundingClientRect();if(!(!U.width||!U.height||!z(U))){if(Lt.has(N)){g.push(N);return}var rt=getComputedStyle(N);if(rt.display==="contents"||rt.display==="inline"||rt.position==="fixed")return X(N);rt.clipPath==="none"&&Math.min(U.width,U.height)>=dt&&_t(N,rt)?g.push(N):X(N)}}})}return X(a),g}function Ot(a){if(Lt.has(a))return;var g=null;function L(){d(F)}function F(){var z=x(a),X=z[0],D=z[1];if(!(!X||!D||!a.isConnected)){var N=_(bt(X,D,0,pt(a,X,D),{start:!1,end:!1})),U=N.length>4?C(N):"";U!==g&&(g=U,U?(a.style.setProperty("--cut-shape",U),a.style.clipPath=U):(a.style.removeProperty("--cut-shape"),a.style.removeProperty("clip-path")))}}Lt.set(a,L),P.set(a,L),window.zaismaWatch.size(a,L,c),L()}var Mt="[data-glass]:not([data-cut-line])";function Gt(){var a=Wt?Array.prototype.slice.call(document.querySelectorAll(Mt)):Array.from(kt);Wt=!1,kt.clear(),c(function(){a.forEach(function(g){g.isConnected&&Nt(g).forEach(Ot)})})}window.zaismaSettings={set:function(a,g){var L=g||document.documentElement;L.classList.add("eases-settings"),a.theme!==void 0&&(a.theme==="light"||a.theme==="dark"?L.setAttribute("data-theme-choice",a.theme):L.removeAttribute("data-theme-choice"));var F=a.glass;F&&F.hueColor!==void 0&&(typeof F.hueColor=="string"&&/^#[0-9a-fA-F]{6}$/.test(F.hueColor)?L.style.setProperty("--glass-hue",F.hueColor):L.style.removeProperty("--glass-hue"))},read:function(a){var g=a||document.documentElement,L=g.style.getPropertyValue("--glass-hue").trim();return{theme:g.getAttribute("data-theme-choice")||null,glass:{hueColor:L||null}}}},window.zaismaGlass=$,window.zaismaCutLine=tt,window.zaismaInput=(function(){var a=!1;return document.addEventListener("keydown",function(g){/^(Shift|Control|Alt|Meta|AltGraph|CapsLock)$/.test(g.key)||(a=!0)},!0),["pointerdown","mousedown","touchstart"].forEach(function(g){document.addEventListener(g,function(){a=!1},!0)}),{isKeyboard:function(){return a}}})();var qt=typeof WeakSet=="function"?new WeakSet:{has:function(){return!1},add:function(){}};function Rt(a){if(a.querySelectorAll){var g=Array.prototype.slice.call(a.querySelectorAll("[data-glass]")),L=Array.prototype.slice.call(a.querySelectorAll("[data-cut-line]"));a.matches&&a.matches("[data-glass]")&&g.push(a),a.matches&&a.matches("[data-cut-line]")&&L.push(a),g.forEach(function(F){if(!qt.has(F)){qt.add(F);var z=$(F,function(){var X=n(F,"pane");if(X.some(function(N){return N>0})||!it(F))return X;var D=x(F);return pt(F,D[0],D[1])});/^[0\\s]+$/.test(F.getAttribute("data-glass-corners")||"")&&(P.set(F,z),j())}}),L.forEach(function(F){qt.has(F)||F.hasAttribute("data-glass")||(qt.add(F),tt(F))})}}c(function(){Rt(document)}),window.zaismaWatch.page(function(a){c(function(){a.forEach(function(g){g.addedNodes.forEach(Rt)})})});var Ft=0,kt=new Set,Wt=!1;function Ct(){clearTimeout(Ft),Ft=setTimeout(Gt,50)}function Pt(a){Array.isArray(a)?a.forEach(function(g){Vt(g.target).forEach(function(L){kt.add(L)})}):Wt=!0,Ct()}function Ut(a){kt.add(a),Ct()}function Vt(a){if(a.nodeType!==1)return[];for(var g=Array.prototype.slice.call(a.querySelectorAll(Mt)),L=a.closest(Mt);L;)g.push(L),L=L.parentElement&&L.parentElement.closest(Mt);return g}Pt(),window.zaismaWatch.page(Pt)})(),(function(){var b=\`
8949
+ var MINIFIED_COMPONENT_SCRIPT = { sourceSha256: "5ef559ae8492fb2de1c1a8aa1ae1814bfca405cf7dc44ac6420fe9f949f45e79", minifiedText: `(function(){var y=[],u=new Map,c=[],n=[],h=null,v=!1,o=!1,p=null;function m(w){w()}function i(w){var x=new Map;w.forEach(function(A){var P=A.batch||m,_=x.get(P);_||(_=new Set,x.set(P,_)),_.add(A.callback)}),x.forEach(function(A,P){P(function(){A.forEach(function(_){_()})})})}function d(w,x,A,P){x.push({callback:A,batch:P}),!(w==="resize"?v:o)&&(w==="resize"?(v=!0,window.addEventListener("resize",function(){i(c.slice())})):(o=!0,window.addEventListener("scroll",function(){i(n.slice())},{passive:!0,capture:!0})))}var l=null;function e(){if(l)return l;var w=["textarea","select","[popover]","dialog","[style*='overflow']"];function x(A){for(var P=0;P<A.length;P++){var _=A[P],q=_.style;q&&_.selectorText&&/auto|scroll|var\\(/.test(q.overflowY+" "+q.getPropertyValue("overflow"))&&w.push(_.selectorText),_.cssRules&&x(_.cssRules)}}return Array.prototype.forEach.call(document.styleSheets,function(A){try{x(A.cssRules)}catch{}}),l=w,w}function s(w,x){var A;try{A=w.querySelectorAll(x)}catch{try{A=w.querySelectorAll(x.replace(/::[a-z-]+(\\([^)]*\\))?/g,""))}catch{return[]}}return Array.from(A)}function r(w){return w!==document.body&&document.body.contains(w)&&/^(auto|scroll)$/.test(getComputedStyle(w).overflowY)}window.zaismaWatch={page:function(w){y.push(w)},size:function(w,x,A){if(!window.ResizeObserver){d("resize",c,x,A);return}h||(h=new ResizeObserver(function(_){var q=[];_.forEach(function(T){(u.get(T.target)||[]).forEach(function($){q.push($)})}),i(q)}));var P=u.get(w);P||(P=[],u.set(w,P),h.observe(w,{box:"border-box"})),P.push({callback:x,batch:A})},resize:function(w,x){d("resize",c,w,x)},scroll:function(w){d("scroll",n,w)},scrollBoxes:function(){if(p)return p;var w=new Set;return e().forEach(function(x){s(document,x).forEach(function(A){r(A)&&w.add(A)})}),p=Array.from(w).sort(function(x,A){return x.compareDocumentPosition(A)&4?-1:1}),p},scrollBoxesIn:function(w){var x=new Set;return e().forEach(function(A){var P=s(w,A);try{w.matches(A)&&P.unshift(w)}catch{}P.forEach(function(_){r(_)&&x.add(_)})}),Array.from(x)},each:function(w,x){var A=new WeakSet;function P(_){A.has(_)||(A.add(_),x(_))}document.querySelectorAll(w).forEach(P),y.push(function(_){_.forEach(function(q){q.addedNodes.forEach(function(T){T.nodeType!==1||!T.isConnected||(T.matches(w)&&P(T),T.querySelectorAll(w).forEach(P))})})})}};function E(w){var x=new Map;return w.filter(function(A){if(A.target instanceof SVGElement)return!1;if(A.type!=="attributes")return!0;var P=x.get(A.target);return P||(P={},x.set(A.target,P)),P[A.attributeName]?!1:(P[A.attributeName]=!0,A.oldValue!==A.target.getAttribute(A.attributeName))})}new MutationObserver(function(w){var x=E(w);x.length&&y.slice().forEach(function(A){A(x)})}).observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class","open","hidden"]})})(),(function(){var y="http://www.w3.org/2000/svg",u={};function c(a){return a in u||(u[a]=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--"+a.replace(/-(large|small)$/,"-cut-$1")))||0),u[a]}["pane","header","menu"].forEach(function(a){c(a+"-large"),c(a+"-small")});function n(a,g){var L=(a.getAttribute("data-glass-corners")||g).trim().split(/\\s+/);return L.length===1&&/^[a-z]+$/.test(L[0])&&(L=[L[0]+"-large",L[0]+"-small",L[0]+"-large",L[0]+"-small"]),L.map(function(F){return/^[a-z]+-(large|small)$/.test(F)?c(F):Number(F)||0})}window.zaismaCorners=n;function h(a,g,L,F){var z=F,X=F*.414,D=L.map(function(O){return O>0?O+X:z});return[[z,D[0]],[D[0],z],[a-D[1],z],[a-z,D[1]],[a-z,g-D[2]],[a-D[2],g-z],[D[3],g-z],[z,g-D[3]]]}function v(a){return a.map(function(g){return g[0].toFixed(1)+","+g[1].toFixed(1)}).join(" ")}var o=[80,100,70,28,12,0,40,62],p={"top-left":80,top:100,"top-right":70,right:28,"bottom-right":12,bottom:0,"bottom-left":40,left:62};function m(a,g,L,F,z){for(;g.length<L.length;){var X=document.createElementNS(y,"polygon");a.appendChild(X),g.push(X)}for(;g.length>L.length;)a.removeChild(g.pop());g.forEach(function(D,O){var U=(O+1)%L.length;D.style.setProperty("--side-light",z[O]+"%"),D.setAttribute("points",v([L[O],L[U],F[U],F[O]]))})}var i=null;function d(a,g){if(i){a();return}i={rects:new Map,sizes:new Map,groups:new Map,scrollers:new Map,isBatch:!!g,isMeasured:!1};try{a()}finally{i=null}}function l(a){d(a,!0)}function e(){i.isMeasured=!0,document.querySelectorAll("[data-cut-line], [data-glass]").forEach(function(a){i.rects.set(a,a.getBoundingClientRect()),i.sizes.set(a,[a.offsetWidth,a.offsetHeight])}),document.querySelectorAll("[data-cut-line]").forEach(function(a){E(ot(a)).push(a)}),document.querySelectorAll("body .own-scroll, body .layout-track").forEach(function(a){i.scrollers.set(a,s(a))})}function s(a){return{scrollTop:a.scrollTop,scrollHeight:a.scrollHeight,clientHeight:a.clientHeight,scrollLeft:a.scrollLeft,scrollWidth:a.scrollWidth,clientWidth:a.clientWidth}}function r(a){var g=i.scrollers.get(a);return g||(g=s(a),i.scrollers.set(a,g)),g}function E(a){var g=i.groups.get(a);return g||(g=[],i.groups.set(a,g)),g}function w(a){i.isBatch&&!i.isMeasured&&e();var g=i.rects.get(a);return g||(g=a.getBoundingClientRect(),i.rects.set(a,g)),g}function x(a){i.isBatch&&!i.isMeasured&&e();var g=i.sizes.get(a);return g||(g=[a.offsetWidth,a.offsetHeight],i.sizes.set(a,g)),g}function A(a){if(i.isBatch&&!i.isMeasured&&e(),i.isMeasured)return i.groups.get(a)||[];var g=i.groups.get(a);return g||(g=Array.prototype.filter.call((a||document).querySelectorAll("[data-cut-line]"),function(L){return ot(L)===a}),i.groups.set(a,g)),g}var P=new Map,_=!1;function q(){l(function(){P.forEach(function(a,g){g.isConnected?a():P.delete(g)})})}var T=!!(document.fonts&&document.fonts.addEventListener);T&&document.fonts.addEventListener("loadingdone",function(){q(),Pt()});function $(){T||_||!document.fonts||!document.fonts.ready||document.fonts.status!=="loading"||(_=!0,document.fonts.ready.then(function(){_=!1,q()}))}var k=-1;window.zaismaWatch.size(document.documentElement,function(){var a=document.documentElement.clientWidth,g=k<0;a!==k&&(k=a,g||(q(),Pt()))},l);var R=0;function Y(a,g){var L=a.querySelector(":scope > .edge"),F="zg"+R++,z=null,X="",D="",O=a.hasAttribute("data-cut-line");L||(L=document.createElementNS(y,"svg"),L.setAttribute("class","edge"),L.setAttribute("aria-hidden","true"),a.appendChild(L));function U(f,b){var S=document.createElementNS(y,f);for(var M in b)S.setAttribute(M,b[M]);return L.appendChild(S),S}function rt(){L.innerHTML='<defs><linearGradient id="'+F+'fr" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#7fd8ff" stop-opacity="0.5"/><stop offset="0.5" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#ffc58a" stop-opacity="0.5"/></linearGradient><linearGradient id="'+F+'in" x1="1" y1="1" x2="0" y2="0"><stop class="gleam" offset="0"/><stop class="gleam" offset="0.4" stop-opacity="0"/><stop class="gleam" offset="0.75" stop-opacity="0"/><stop class="gleam" offset="1" stop-opacity="0.35"/></linearGradient><linearGradient id="'+F+'sp" x1="0" y1="0" x2="1" y2="1"><stop class="spec" offset="0"/><stop class="spec" offset="0.08"/><stop class="spec" offset="0.3" stop-opacity="0"/></linearGradient></defs>',z={dense:U("path",{class:"dense","fill-rule":"evenodd"}),bevel:U("g",{class:"bevel"}),bevelQuads:[],hair:U("polygon",{class:"hair",fill:"none","stroke-width":"1.2"}),rimBand:U("g",{class:"rim-band"}),rimQuads:[],rim:U("polygon",{class:"rim",fill:"none","stroke-width":"1.6"}),spec:U("polygon",{class:"spec-line",fill:"none",stroke:"url(#"+F+"sp)","stroke-width":"1.4"}),fringe:U("polygon",{class:"fringe",fill:"none",stroke:"url(#"+F+"fr)","stroke-width":"0.8"}),inner:U("polygon",{class:"inner",fill:"none",stroke:"url(#"+F+"in)","stroke-width":"1"}),caustics:O?[]:[1,2,3,4].map(function(f){return{group:U("g",{class:"caustic step-"+f}),quads:[]}}),facets:[]}}function lt(){d(t)}function t(){var f=x(a),b=f[0],S=f[1];if(!(!b||!S)){var M=Math.min(b,S),Z=Number(a.getAttribute("data-glass-band"))||Math.max(2,Math.min(4,M*.04)),Q,G;if(z||rt(),O){var j=N(W(a,b,S)),nt=b+"x"+S+":"+v(j);if(nt===X)return;X=nt,a.style.setProperty("--cut-shape",C(j)),a.style.clipPath=C(j),Q=function(ht){return B(j,ht)},G=j.map(function(ht,Et){return p[I(ht,j[(Et+1)%j.length])]})}else{var K=g().map(function(ht){return Math.min(ht,Math.round(M*.3))}),vt=K.join(",");vt!==X&&(X=vt,a.style.clipPath="polygon(0 "+K[0]+"px, "+K[0]+"px 0, calc(100% - "+K[1]+"px) 0, 100% "+K[1]+"px, 100% calc(100% - "+K[2]+"px), calc(100% - "+K[2]+"px) 100%, "+K[3]+"px 100%, 0 calc(100% - "+K[3]+"px))");var yt=a.getAttribute("data-glass-open")==="top"?Math.ceil(Z*1.6)+2:0,St=b+"x"+S+":"+Z+":"+yt+":"+vt;if(St===D)return;D&&Ut(a),D=St,Q=function(ht){return h(b,S+yt,K,ht).map(function(Et){return[Et[0],Et[1]-yt]})},G=o}L.removeAttribute("viewBox"),z.dense.setAttribute("d","M"+v(Q(0))+"Z M"+v(Q(Z*1.6))+"Z"),m(z.bevel,z.bevelQuads,Q(0),Q(Z),G),m(z.rimBand,z.rimQuads,Q(0),Q(1.6),G),z.hair.setAttribute("points",v(Q(.6))),z.rim.setAttribute("points",v(Q(1.6))),z.spec.setAttribute("points",v(Q(1.6))),z.fringe.setAttribute("points",v(Q(Math.max(2.4,Z-.8)))),z.inner.setAttribute("points",v(Q(Z)));var zt=[Z,Z+2,Z+5,Z+9,Z+14];z.caustics.forEach(function(ht,Et){m(ht.group,ht.quads,Q(zt[Et]),Q(zt[Et+1]),G)});var Tt=Q(0),xt=[];for(Tt.forEach(function(ht,Et){var wt=Tt[(Et+1)%Tt.length],Dt=I(ht,wt);Dt.indexOf("-")>0&&Math.hypot(wt[0]-ht[0],wt[1]-ht[1])>.5&&xt.push([ht,wt,Dt])});z.facets.length<xt.length;)z.facets.push(U("line",{}));z.facets.forEach(function(ht,Et){var wt=xt[Et];if(ht.style.display=wt?"":"none",!!wt){var Dt=wt[2]==="top-left";ht.setAttribute("class",Dt?"facet lit":"facet"),ht.setAttribute("stroke-width",Dt?"4.5":"3"),ht.setAttribute("x1",wt[0][0]),ht.setAttribute("y1",wt[0][1]),ht.setAttribute("x2",wt[1][0]),ht.setAttribute("y2",wt[1][1])}})}}return lt(),window.zaismaWatch.size(a,lt,l),O&&(P.set(a,lt),$()),lt}var at=getComputedStyle(document.documentElement),ut=function(a,g){return parseFloat(at.getPropertyValue(a))||g},et=ut("--control-slant",10),st=ut("--gap-control-row",4),mt=ut("--gap-control-stack",8),H=st-et-.5,V=st-et+.5,ct=[16,8,16,8];function it(a){var g=n(a,"header"),L=x(a),F=Math.min(L[0],L[1]);return g.map(function(z){return Math.min(z,Math.round(F*.3))})}function ot(a){var g=a.parentElement&&a.parentElement.closest("[data-glass], [data-cut-line], [data-on-no-pane]");return g&&!g.hasAttribute("data-on-no-pane")?g:null}function ft(a,g){var L=w(g),F=a.parentElement&&a.parentElement.closest(".own-scroll"),z=a.parentElement&&a.parentElement.closest(".layout-track");if(z&&z!==g&&g.contains(z)){var X=r(z);X.scrollWidth>X.clientWidth+1&&(L={top:L.top,bottom:L.bottom,left:L.left-X.scrollLeft,right:L.right+X.scrollWidth-X.clientWidth-X.scrollLeft})}if(!F||F===g||!g.contains(F))return L;var D=r(F);return D.scrollHeight<=D.clientHeight+1?L:{top:L.top-D.scrollTop,bottom:L.bottom+D.scrollHeight-D.clientHeight-D.scrollTop,left:L.left,right:L.right}}function pt(a,g,L,F){var z=ot(a);if(!z){var X=At(a);return ct.map(function(Q,G){return(G<2?X.above:X.below)?0:Math.min(Q,Math.round(Math.min(g,L)*.25))})}var D=z.hasAttribute("data-cut-line")?z.cutCorners||[0,0,0,0]:it(z),O=w(a),U=ft(a,z),rt=F?F.ends:a.getAttribute("data-cut-ends")||"",lt=O.top-U.top,t=U.bottom-O.bottom,f=F?F.stack:a.getAttribute("data-cut-stack");if(f!=null){var b=O.left-U.left;lt=/first/.test(f)?b:1e6,t=/last/.test(f)?b:1e6}var S=/start/.test(rt)?(lt+t)/2:O.left-U.left,M=/end/.test(rt)?(lt+t)/2:U.right-O.right,Z=Math.max(g,L)<3*Math.min(g,L)?Math.min(g,L)*.5:1/0;return[[S,lt],[M,lt],[M,t],[S,t]].map(function(Q,G){var j=Math.max(0,Q[0])+Math.max(0,Q[1]);return Math.min(Z,Math.max(0,(D[G]||0)-j+Math.SQRT2*j/2))})}function gt(a,g){var L=g?g.beside:a.getAttribute("data-cut-beside");if(L!==null)return{start:/start/.test(L),end:/end/.test(L)};var F=ot(a),z=w(a),X={start:!1,end:!1};return A(F).forEach(function(D){if(D!==a){var O=w(D);if(!(!O.width||!O.height)&&!(Math.min(z.bottom,O.bottom)-Math.max(z.top,O.top)<Math.min(z.height,O.height)/2)){var U=O.left-z.right,rt=z.left-O.right,lt=U>=H&&U<=V,t=rt>=H&&rt<=V;(lt||t)&&!D.contains(a)&&!a.contains(D)&&(lt&&(X.end=!0),t&&(X.start=!0))}}}),X}function At(a){var g=w(a),L={above:!1,below:!1};return A(null).forEach(function(F){if(F!==a){var z=w(F);if(!(!z.width||!z.height)&&!(Math.min(g.right,z.right)-Math.max(g.left,z.left)<Math.min(g.width,z.width)/2)){var X=z.top-g.bottom,D=g.top-z.bottom,O=X>=-1&&X<=mt+.5,U=D>=-1&&D<=mt+.5;(O||U)&&!F.contains(a)&&!a.contains(F)&&(O&&(L.below=!0),U&&(L.above=!0))}}}),L}function bt(a,g,L,F,z){var X=Math.min(L,a/3),D=F.map(function(U){return Math.min(U,g)});[[0,3],[1,2]].forEach(function(U){var rt=D[U[0]]+D[U[1]];rt>g&&(D[U[0]]*=g/rt,D[U[1]]*=g/rt)});var O=function(U,rt,lt,t){return U>.5?[rt,lt]:[t,t]};return[].concat(z.start?[[X,0],[X,0]]:O(D[0],[0,D[0]],[D[0],0],[0,0]),z.end?[[a,0],[a,0]]:O(D[1],[a-D[1],0],[a,D[1]],[a,0]),z.end?[[a-X,g],[a-X,g]]:O(D[2],[a,g-D[2]],[a-D[2],g],[a,g]),z.start?[[0,g],[0,g]]:O(D[3],[D[3],g],[0,g-D[3]],[0,g]))}function W(a,g,L,F){var z=gt(a,F),X=pt(a,g,L,F),D=[z.start?0:X[0],z.end?0:X[1],z.end?0:X[2],z.start?0:X[3]].map(function(U){return Math.min(U,L)});if([[0,3],[1,2]].forEach(function(U){var rt=D[U[0]]+D[U[1]];rt>L&&(D[U[0]]*=L/rt,D[U[1]]*=L/rt)}),a.cutCorners=D,!F){var O=((z.start?"start ":"")+(z.end?"end":"")).trim();(a.getAttribute("data-slanted")||"")!==O&&(O?a.setAttribute("data-slanted",O):a.removeAttribute("data-slanted"))}return bt(g,L,a.hasAttribute("data-cut-beside")&&Number(a.getAttribute("data-cut-line"))||et,X,z)}function N(a){return a.filter(function(g,L){var F=a[(L+a.length-1)%a.length];return Math.abs(g[0]-F[0])>.01||Math.abs(g[1]-F[1])>.01})}function C(a){return"polygon("+a.map(function(g){return g[0].toFixed(2)+"px "+g[1].toFixed(2)+"px"}).join(", ")+")"}function B(a,g){if(!g)return a;var L=a.length,F=a.map(function(z,X){var D=a[(X+1)%L],O=D[0]-z[0],U=D[1]-z[1],rt=Math.hypot(O,U)||1,lt=-U/rt,t=O/rt;return{x:z[0]+lt*g,y:z[1]+t*g,dx:O,dy:U,nx:lt,ny:t}});return F.map(function(z,X){var D=F[(X+L-1)%L],O=D.dx*z.dy-D.dy*z.dx;if(Math.abs(O)<1e-6)return[z.x,z.y];var U=((z.x-D.x)*z.dy-(z.y-D.y)*z.dx)/O;return[D.x+D.dx*U,D.y+D.dy*U]})}var J=["right","top-right","top","top-left","left","bottom-left","bottom","bottom-right"];function I(a,g){var L=g[0]-a[0],F=g[1]-a[1],z=Math.atan2(L,F)*180/Math.PI;return J[(Math.round(z/45)%8+8)%8]}function tt(a){var g=a.querySelector(":scope > .cut-line");g||(g=document.createElementNS(y,"svg"),g.setAttribute("class","cut-line"),g.setAttribute("aria-hidden","true"),g.appendChild(document.createElementNS(y,"polygon")),a.insertBefore(g,a.firstChild));var L=g.querySelector("polygon"),F=[],z="";function X(lt){return lt.map(function(t){return t[0].toFixed(2)+","+t[1].toFixed(2)}).join(" ")}var D=null;function O(){d(U)}function U(){var lt=x(a),t=lt[0],f=lt[1];if(!(!t||!f)){var b=W(a,t,f);if(D){var S=Math.min(1,(performance.now()-D.startMs)/D.ms),M=1-Math.pow(1-S,3),Q=W(a,t,f,D.from);b=b.map(function(vt,yt){return[Q[yt][0]+(vt[0]-Q[yt][0])*M,Q[yt][1]+(vt[1]-Q[yt][1])*M]}),S<1?requestAnimationFrame(O):D=null}b=N(b);var Z=t+"x"+f+":"+X(b);if(Z!==z){z=Z,a.style.setProperty("--cut-shape",C(b)),g.setAttribute("viewBox","0 0 "+t+" "+f),L.setAttribute("points",X(B(b,1)));for(var Q=Number(a.getAttribute("data-cut-inset"))||0,G=B(b,Q),j=B(b,Q+1.5);F.length<b.length;){var nt=document.createElementNS(y,"path");g.insertBefore(nt,L),F.push(nt)}for(;F.length>b.length;)g.removeChild(F.pop());F.forEach(function(K,vt){var yt=(vt+1)%b.length;K.setAttribute("class","cut-band on-"+I(b[vt],b[yt])),K.setAttribute("d","M"+X([G[vt],G[yt],j[yt],j[vt]])+"Z")})}}}O(),a.redrawCut=function(lt){lt&&lt.ms>0&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(D={from:lt.from,ms:lt.ms,startMs:performance.now()}),O()},window.zaismaWatch.size(a,O,l);var rt=a.parentElement&&a.parentElement.closest("[data-glass], [data-on-no-pane]");rt&&rt.hasAttribute("data-glass")&&window.zaismaWatch.size(rt,O,l),P.set(a,O),$()}var dt=6,Lt=new Map;function Bt(a){return a!=="none"&&(a.match(/rgba?\\([^)]*\\)/g)||[""]).some(function(g){var L=g.match(/[\\d.]+/g);return!L||L.length<4||Number(L[3])>.04})}function Nt(a,g){if(/^(IMG|VIDEO|CANVAS|IFRAME)$/.test(a.tagName)||g.backgroundImage!=="none"||Bt(g.boxShadow))return!0;var L=g.backgroundColor.match(/[\\d.]+/g);return L&&(L.length<4||Number(L[3])>.04)?!0:["Top","Right","Bottom","Left"].some(function(F){return parseFloat(g["border"+F+"Width"])>0&&!/rgba\\(.*, 0\\)|transparent/.test(g["border"+F+"Color"])})}function Ot(a){var g=[],L=w(a),F=Math.max.apply(null,it(a))/(1-Math.SQRT2/2);function z(D){return[[D.left-L.left,D.top-L.top],[L.right-D.right,D.top-L.top],[L.right-D.right,L.bottom-D.bottom],[D.left-L.left,L.bottom-D.bottom]].some(function(O){return Math.max(0,O[0])+Math.max(0,O[1])<F})}function X(D){Array.prototype.forEach.call(D.children,function(O){if(!(O instanceof SVGElement||O.matches("[data-glass], [data-cut-line], .edge, .cut-line"))){var U=O.getBoundingClientRect();if(!(!U.width||!U.height||!z(U))){if(Lt.has(O)){g.push(O);return}var rt=getComputedStyle(O);if(rt.display==="contents"||rt.display==="inline"||rt.position==="fixed")return X(O);rt.clipPath==="none"&&Math.min(U.width,U.height)>=dt&&Nt(O,rt)?g.push(O):X(O)}}})}return X(a),g}function _t(a){if(Lt.has(a))return;var g=null;function L(){d(F)}function F(){var z=x(a),X=z[0],D=z[1];if(!(!X||!D||!a.isConnected)){var O=N(bt(X,D,0,pt(a,X,D),{start:!1,end:!1})),U=O.length>4?C(O):"";U!==g&&(g=U,U?(a.style.setProperty("--cut-shape",U),a.style.clipPath=U):(a.style.removeProperty("--cut-shape"),a.style.removeProperty("clip-path")))}}Lt.set(a,L),P.set(a,L),window.zaismaWatch.size(a,L,l),L()}var Mt="[data-glass]:not([data-cut-line])";function Gt(){var a=Wt?Array.prototype.slice.call(document.querySelectorAll(Mt)):Array.from(kt);Wt=!1,kt.clear(),l(function(){a.forEach(function(g){g.isConnected&&Ot(g).forEach(_t)})})}window.zaismaSettings={set:function(a,g){var L=g||document.documentElement;L.classList.add("eases-settings"),a.theme!==void 0&&(a.theme==="light"||a.theme==="dark"?L.setAttribute("data-theme-choice",a.theme):L.removeAttribute("data-theme-choice"));var F=a.glass;F&&F.hueColor!==void 0&&(typeof F.hueColor=="string"&&/^#[0-9a-fA-F]{6}$/.test(F.hueColor)?L.style.setProperty("--glass-hue",F.hueColor):L.style.removeProperty("--glass-hue"))},read:function(a){var g=a||document.documentElement,L=g.style.getPropertyValue("--glass-hue").trim();return{theme:g.getAttribute("data-theme-choice")||null,glass:{hueColor:L||null}}}},window.zaismaGlass=Y,window.zaismaCutLine=tt,window.zaismaInput=(function(){var a=!1;return document.addEventListener("keydown",function(g){/^(Shift|Control|Alt|Meta|AltGraph|CapsLock)$/.test(g.key)||(a=!0)},!0),["pointerdown","mousedown","touchstart"].forEach(function(g){document.addEventListener(g,function(){a=!1},!0)}),{isKeyboard:function(){return a}}})();var qt=typeof WeakSet=="function"?new WeakSet:{has:function(){return!1},add:function(){}};function Rt(a){if(a.querySelectorAll){var g=Array.prototype.slice.call(a.querySelectorAll("[data-glass]")),L=Array.prototype.slice.call(a.querySelectorAll("[data-cut-line]"));a.matches&&a.matches("[data-glass]")&&g.push(a),a.matches&&a.matches("[data-cut-line]")&&L.push(a),g.forEach(function(F){if(!qt.has(F)){qt.add(F);var z=Y(F,function(){var X=n(F,"pane");if(X.some(function(O){return O>0})||!ot(F))return X;var D=x(F);return pt(F,D[0],D[1])});/^[0\\s]+$/.test(F.getAttribute("data-glass-corners")||"")&&(P.set(F,z),$())}}),L.forEach(function(F){qt.has(F)||F.hasAttribute("data-glass")||(qt.add(F),tt(F))})}}l(function(){Rt(document)}),window.zaismaWatch.page(function(a){l(function(){a.forEach(function(g){g.addedNodes.forEach(Rt)})})});var Ft=0,kt=new Set,Wt=!1;function Ct(){clearTimeout(Ft),Ft=setTimeout(Gt,50)}function Pt(a){Array.isArray(a)?a.forEach(function(g){Vt(g.target).forEach(function(L){kt.add(L)})}):Wt=!0,Ct()}function Ut(a){kt.add(a),Ct()}function Vt(a){if(a.nodeType!==1)return[];for(var g=Array.prototype.slice.call(a.querySelectorAll(Mt)),L=a.closest(Mt);L;)g.push(L),L=L.parentElement&&L.parentElement.closest(Mt);return g}Pt(),window.zaismaWatch.page(Pt)})(),(function(){var y=\`
8826
8950
  float h1(float n) { return fract(sin(n * 127.1) * 43758.5453); }
8827
8951
  float h2(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
8828
8952
  vec2 h22(vec2 p) { p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3))); return fract(sin(p) * 43758.5453); }
@@ -8836,7 +8960,7 @@ float motes(vec2 p, float size, float chance, float seed) {
8836
8960
  float d = length(f - r * 0.7);
8837
8961
  return on * smoothstep(size, 0.0, d);
8838
8962
  }
8839
- \`,f=\`
8963
+ \`,u=\`
8840
8964
  float sn(vec2 p) { vec2 i = floor(p), f = fract(p); vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);
8841
8965
  return mix(mix(h2(i), h2(i + vec2(1.0, 0.0)), u.x), mix(h2(i + vec2(0.0, 1.0)), h2(i + vec2(1.0, 1.0)), u.x), u.y); }
8842
8966
  // The cloth's height: long folds running on the diagonal, bent and swaying slowly.
@@ -8863,7 +8987,7 @@ void mainImage(out vec4 o, in vec2 f) {
8863
8987
  col += (h2(f) + h2(f + 17.31) - 1.0) / 255.0;
8864
8988
  o = vec4(col, 1.0);
8865
8989
  }
8866
- \`,l=\`
8990
+ \`,c=\`
8867
8991
  uniform vec4 zaismaPaneCuts[16]; // each pane's cut corners: top left, top right, bottom right, bottom left; 4096 added to the last on smoked glass
8868
8992
  uniform float zaismaPixel; // canvas pixels per CSS pixel
8869
8993
  uniform vec2 zaismaViewOffset; // where the canvas sits in the scene it shows a part of (the gallery's framed examples), in its pixels
@@ -8916,7 +9040,7 @@ uniform int iGlassPaneCount;
8916
9040
  #line 1
8917
9041
  \`,v=\`#version 300 es
8918
9042
  in vec2 corner;
8919
- void main() { gl_Position = vec4(corner, 0.0, 1.0); }\`,s=\`#version 300 es
9043
+ void main() { gl_Position = vec4(corner, 0.0, 1.0); }\`,o=\`#version 300 es
8920
9044
  precision highp float;
8921
9045
  uniform sampler2D zaismaDrawn;
8922
9046
  uniform vec2 zaismaDrawnSize;
@@ -8937,11 +9061,11 @@ void main() {
8937
9061
  vec3 low = min(min(min(north, south), min(east, west)), color), high = max(max(max(north, south), max(east, west)), color);
8938
9062
  vec3 weight = -sqrt(clamp(min(low, 2.0 - high) / max(high, vec3(0.0001)), 0.0, 1.0)) / 7.0;
8939
9063
  zaismaFragColor = vec4(clamp((color + (north + south + east + west) * weight) / (1.0 + 4.0 * weight), 0.0, 1.0), 1.0);
8940
- }\`,p=.7,m=1.4,i=6e4,d=33,c=67,e=window.matchMedia("(prefers-reduced-motion: reduce)"),o=[],r=0,E=!1,y=!1,x=!0;function A(){E||(E=!0,y=!0,requestAnimationFrame(L))}function P(t){var u=t.trim().replace("#","");u.length===3&&(u=u.split("").map(function(S){return S+S}).join(""));var w=parseInt(u,16)||0;return[(w>>16&255)/255,(w>>8&255)/255,(w&255)/255]}function O(t){var u=getComputedStyle(t);return{base:P(u.getPropertyValue("--backdrop-base")),a:P(u.getPropertyValue("--backdrop-a")),b:P(u.getPropertyValue("--backdrop-b")),c:P(u.getPropertyValue("--backdrop-c")),isDark:/dark/.test(u.colorScheme||"")}}var q=!0,T=!0,j=[],k=typeof WeakSet=="function"?new WeakSet:null;function B(){T=!0,A()}function $(){o.some(function(t){return!t.isOuter&&t.isInView})&&B()}function ot(t){return t.closest(":has(> .backdrop)")}function ft(){q=!1,T=!0,j=Array.prototype.filter.call(document.querySelectorAll("[data-glass]:not([data-cut-line])"),function(t){t.glassHost=ot(t),t.glassHost&&t.glassHost.shownGlass&&it(t,t.glassHost.shownGlass);var u=getComputedStyle(t);return t.glassIsSmoked=/dark/.test(u.colorScheme||""),u.visibility!=="hidden"&&u.display!=="none"&&Number(u.opacity)>.05}),j.forEach(function(t){k&&!k.has(t)&&(k.add(t),window.zaismaWatch.size(t,B))})}function et(t,u,w){var S=Math.min(u,w);return window.zaismaCorners(t,"pane").map(function(M){return Math.min(M,Math.round(S*.3))})}function st(t){var u=t.canvas.getBoundingClientRect(),w=t.canvas.parentElement,S=t.isOuter?1:(t.drawnWidth||t.canvas.width)/Math.max(1,u.width),M=[];j.forEach(function(G){if(G.glassHost===w){var K=G.getBoundingClientRect();K.width<24||K.height<24||K.right<u.left||K.left>u.right||K.bottom<u.top||K.top>u.bottom||M.push({el:G,r:K,area:K.width*K.height})}}),M.sort(function(G,K){return K.area-G.area}),M=M.slice(0,n).sort(function(G,K){return G.area-K.area});var Z=new Float32Array(n*4),Q=new Float32Array(n*4);M.forEach(function(G,K){var nt=G.r,Y=et(G.el,nt.width,nt.height);Z.set([(nt.left-u.left)*S,(u.bottom-nt.bottom)*S,(nt.right-u.left)*S,(u.bottom-nt.top)*S],K*4),Q.set([Y[0]*S,Y[1]*S,Y[2]*S,Y[3]*S+(G.el.glassIsSmoked?4096:0)],K*4)}),t.glass={rects:Z,cuts:Q,count:M.length,scale:S,box:u,els:M.map(function(G){return G.el})},t.isDrawn=!1}function mt(t){var u=function(w){return w/=255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)};return .2126*u(t[0])+.7152*u(t[1])+.0722*u(t[2])}function H(t,u){var w=mt(t),S=mt(u);return(Math.max(w,S)+.05)/(Math.min(w,S)+.05)}function V(t,u,w){return[t[0]+(u[0]-t[0])*w,t[1]+(u[1]-t[1])*w,t[2]+(u[2]-t[2])*w]}function ct(t,u){for(var w=u.slice().sort(function(K,nt){return mt(K)-mt(nt)}),S=t.isSmoked?w[Math.floor(w.length*.75)]:w[Math.floor(w.length*.25)],M=.3;M<=.95;M+=.02){var Z=V(S,t.base,M),Q=t.isSmoked?[247,249,252]:[20,23,28],G=t.isSmoked?V(Z,Q,.7):[89,96,106];if(H(Z,G)>=4.5&&H(Z,Q)>=6)return M}return .95}function at(t){var u=t.reduce(function(K,nt){return[K[0]+nt[0],K[1]+nt[1],K[2]+nt[2]]},[0,0,0]),w=u.map(function(K){return K/t.length}),S={isSmoked:!1,base:V([255,255,255],w,.1)},M={isSmoked:!0,base:V([12,15,20],w,.3)},Z=ct(S,t),Q=ct(M,t),G=Z<=Q?S:M;return{isSmoked:G.isSmoked,tint:"rgba("+G.base.map(Math.round).join(", ")+", "+Math.min(Z,Q).toFixed(2)+")"}}function it(t,u){t.glassPick!==u&&(t.glassPick=u,t.classList.toggle("smoke",u.isSmoked),u.isSmoked?t.removeAttribute("data-theme-choice"):t.setAttribute("data-theme-choice","light"),t.style.setProperty("--glass-tint",u.tint))}function ut(t,u){u.length&&pt(t,at(u))}function pt(t,u){var w=t.canvas.parentElement;w&&(w.shownGlass=u,q=!0,w.querySelectorAll("[data-glass]:not([data-cut-line])").forEach(function(S){ot(S)===w&&it(S,w.shownGlass)}))}function gt(t){for(var u=[],w=4*Math.max(1,Math.floor(t.length/4/2400)),S=0;S<t.length;S+=w)u.push([t[S],t[S+1],t[S+2]]);return u}function At(t,u,w,S){var M=new Uint8Array(w*S*4);t.readPixels(0,0,w,S,t.RGBA,t.UNSIGNED_BYTE,M),ut(u,gt(M))}function bt(t){var u=t.still;if(!(!u||!u.naturalWidth)){var w=document.createElement("canvas"),S=Math.min(1,160/Math.max(u.naturalWidth,u.naturalHeight));w.width=Math.max(2,Math.round(u.naturalWidth*S)),w.height=Math.max(2,Math.round(u.naturalHeight*S));var M=w.getContext("2d",{willReadFrequently:!0});M.drawImage(u,0,0,w.width,w.height),t.isGlassAdapted=!0;try{ut(t,gt(M.getImageData(0,0,w.width,w.height).data))}catch{}}}function W(t){var u=t.canvas.contentWindow;if(u)try{u.postMessage({panes:[],isIdle:_},new URL(t.canvas.src).origin)}catch{}}var _=!1,C=0;function I(){_=!0,J()}function J(){o.forEach(function(t){t.kind==="frame"&&W(t)})}var R=null;function tt(){if(R)return R.isLost?null:R;var t=document.createElement("canvas");t.width=2,t.height=2;var u=t.getContext("webgl2",{antialias:!1,depth:!1,stencil:!1,alpha:!1,powerPreference:"low-power"});if(!u)return null;R={board:t,gl:u,programs:{},isLost:!1,parallel:u.getExtension("KHR_parallel_shader_compile")};function w(){u.bindVertexArray(u.createVertexArray()),u.bindBuffer(u.ARRAY_BUFFER,u.createBuffer()),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),u.STATIC_DRAW),u.enableVertexAttribArray(0),u.vertexAttribPointer(0,2,u.FLOAT,!1,0,0),R.vertex=u.createShader(u.VERTEX_SHADER),u.shaderSource(R.vertex,v),u.compileShader(R.vertex),R.upscale={status:"compiling",names:["zaismaDrawn","zaismaDrawnSize","zaismaCanvasSize"]},dt(R.upscale,s),R.drawn={texture:u.createTexture(),framebuffer:u.createFramebuffer(),widthPx:0,heightPx:0}}return w(),t.addEventListener("webglcontextlost",function(S){S.preventDefault(),R.isLost=!0}),t.addEventListener("webglcontextrestored",function(){R.programs={},R.isLost=!1,w(),o.forEach(function(S){S.isDrawn=!1}),A()}),R}function dt(t,u){var w=R.gl,S=w.createShader(w.FRAGMENT_SHADER),M=w.createProgram();w.shaderSource(S,u),w.compileShader(S),w.attachShader(M,R.vertex),w.attachShader(M,S),w.bindAttribLocation(M,0,"corner"),w.linkProgram(M),t.pending={program:M,fragment:S}}function Lt(t){if(t.status!=="compiling")return t.status==="ready";var u=R.gl,w=t.pending;if(R.parallel&&!u.getProgramParameter(w.program,R.parallel.COMPLETION_STATUS_KHR))return!1;if(u.getProgramParameter(w.program,u.LINK_STATUS))t.program=w.program,t.status="ready",t.at={},t.names.forEach(function(M){t.at[M]=u.getUniformLocation(w.program,M)});else if(console.warn("Backdrop shader:",u.getShaderInfoLog(w.fragment)||u.getProgramInfoLog(w.program)),u.deleteProgram(w.program),t.status="failed",t.plainSource){var S=t.plainSource;t.plainSource=null,t.status="compiling",t.hasPass=!1,dt(t,S)}return u.deleteShader(w.fragment),t.status!=="compiling"&&(t.pending=null),t.status==="ready"}function Bt(t,u){if(t.programs[u])return t.programs[u];var w=h+\`uniform float iDark;
8941
- \`+b+u+\`
8942
- \`,S={status:"compiling",hasPass:!0,names:["iResolution","iTime","iDark","iGlassPanes","iGlassPaneCount","zaismaPaneCuts","zaismaPixel","zaismaViewOffset"],plainSource:w+\`uniform vec2 zaismaViewOffset;
9064
+ }\`,p=.7,m=1.4,i=6e4,d=33,l=67,e=window.matchMedia("(prefers-reduced-motion: reduce)"),s=[],r=0,E=!1,w=!1,x=!0;function A(){E||(E=!0,w=!0,requestAnimationFrame(L))}function P(t){var f=t.trim().replace("#","");f.length===3&&(f=f.split("").map(function(S){return S+S}).join(""));var b=parseInt(f,16)||0;return[(b>>16&255)/255,(b>>8&255)/255,(b&255)/255]}function _(t){var f=getComputedStyle(t);return{base:P(f.getPropertyValue("--backdrop-base")),a:P(f.getPropertyValue("--backdrop-a")),b:P(f.getPropertyValue("--backdrop-b")),c:P(f.getPropertyValue("--backdrop-c")),isDark:/dark/.test(f.colorScheme||"")}}var q=!0,T=!0,$=[],k=typeof WeakSet=="function"?new WeakSet:null;function R(){T=!0,A()}function Y(){s.some(function(t){return!t.isOuter&&t.isInView})&&R()}function at(t){return t.closest(":has(> .backdrop)")}function ut(){q=!1,T=!0,$=Array.prototype.filter.call(document.querySelectorAll("[data-glass]:not([data-cut-line])"),function(t){t.glassHost=at(t),t.glassHost&&t.glassHost.shownGlass&&ot(t,t.glassHost.shownGlass);var f=getComputedStyle(t);return t.glassIsSmoked=/dark/.test(f.colorScheme||""),f.visibility!=="hidden"&&f.display!=="none"&&Number(f.opacity)>.05}),$.forEach(function(t){k&&!k.has(t)&&(k.add(t),window.zaismaWatch.size(t,R))})}function et(t,f,b){var S=Math.min(f,b);return window.zaismaCorners(t,"pane").map(function(M){return Math.min(M,Math.round(S*.3))})}function st(t){var f=t.canvas.getBoundingClientRect(),b=t.canvas.parentElement,S=t.isOuter?1:(t.drawnWidth||t.canvas.width)/Math.max(1,f.width),M=[];$.forEach(function(G){if(G.glassHost===b){var j=G.getBoundingClientRect();j.width<24||j.height<24||j.right<f.left||j.left>f.right||j.bottom<f.top||j.top>f.bottom||M.push({el:G,r:j,area:j.width*j.height})}}),M.sort(function(G,j){return j.area-G.area}),M=M.slice(0,n).sort(function(G,j){return G.area-j.area});var Z=new Float32Array(n*4),Q=new Float32Array(n*4);M.forEach(function(G,j){var nt=G.r,K=et(G.el,nt.width,nt.height);Z.set([(nt.left-f.left)*S,(f.bottom-nt.bottom)*S,(nt.right-f.left)*S,(f.bottom-nt.top)*S],j*4),Q.set([K[0]*S,K[1]*S,K[2]*S,K[3]*S+(G.el.glassIsSmoked?4096:0)],j*4)}),t.glass={rects:Z,cuts:Q,count:M.length,scale:S,box:f,els:M.map(function(G){return G.el})},t.isDrawn=!1}function mt(t){var f=function(b){return b/=255,b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4)};return .2126*f(t[0])+.7152*f(t[1])+.0722*f(t[2])}function H(t,f){var b=mt(t),S=mt(f);return(Math.max(b,S)+.05)/(Math.min(b,S)+.05)}function V(t,f,b){return[t[0]+(f[0]-t[0])*b,t[1]+(f[1]-t[1])*b,t[2]+(f[2]-t[2])*b]}function ct(t,f){for(var b=f.slice().sort(function(j,nt){return mt(j)-mt(nt)}),S=t.isSmoked?b[Math.floor(b.length*.75)]:b[Math.floor(b.length*.25)],M=.3;M<=.95;M+=.02){var Z=V(S,t.base,M),Q=t.isSmoked?[247,249,252]:[20,23,28],G=t.isSmoked?V(Z,Q,.7):[89,96,106];if(H(Z,G)>=4.5&&H(Z,Q)>=6)return M}return .95}function it(t){var f=t.reduce(function(j,nt){return[j[0]+nt[0],j[1]+nt[1],j[2]+nt[2]]},[0,0,0]),b=f.map(function(j){return j/t.length}),S={isSmoked:!1,base:V([255,255,255],b,.1)},M={isSmoked:!0,base:V([12,15,20],b,.3)},Z=ct(S,t),Q=ct(M,t),G=Z<=Q?S:M;return{isSmoked:G.isSmoked,tint:"rgba("+G.base.map(Math.round).join(", ")+", "+Math.min(Z,Q).toFixed(2)+")"}}function ot(t,f){t.glassPick!==f&&(t.glassPick=f,t.classList.toggle("smoke",f.isSmoked),f.isSmoked?t.removeAttribute("data-theme-choice"):t.setAttribute("data-theme-choice","light"),t.style.setProperty("--glass-tint",f.tint))}function ft(t,f){f.length&&pt(t,it(f))}function pt(t,f){var b=t.canvas.parentElement;b&&(b.shownGlass=f,q=!0,b.querySelectorAll("[data-glass]:not([data-cut-line])").forEach(function(S){at(S)===b&&ot(S,b.shownGlass)}))}function gt(t){for(var f=[],b=4*Math.max(1,Math.floor(t.length/4/2400)),S=0;S<t.length;S+=b)f.push([t[S],t[S+1],t[S+2]]);return f}function At(t,f,b,S){var M=new Uint8Array(b*S*4);t.readPixels(0,0,b,S,t.RGBA,t.UNSIGNED_BYTE,M),ft(f,gt(M))}function bt(t){var f=t.still;if(!(!f||!f.naturalWidth)){var b=document.createElement("canvas"),S=Math.min(1,160/Math.max(f.naturalWidth,f.naturalHeight));b.width=Math.max(2,Math.round(f.naturalWidth*S)),b.height=Math.max(2,Math.round(f.naturalHeight*S));var M=b.getContext("2d",{willReadFrequently:!0});M.drawImage(f,0,0,b.width,b.height),t.isGlassAdapted=!0;try{ft(t,gt(M.getImageData(0,0,b.width,b.height).data))}catch{}}}function W(t){var f=t.canvas.contentWindow;if(f)try{f.postMessage({panes:[],isIdle:N},new URL(t.canvas.src).origin)}catch{}}var N=!1,C=0;function B(){N=!0,J()}function J(){s.forEach(function(t){t.kind==="frame"&&W(t)})}var I=null;function tt(){if(I)return I.isLost?null:I;var t=document.createElement("canvas");t.width=2,t.height=2;var f=t.getContext("webgl2",{antialias:!1,depth:!1,stencil:!1,alpha:!1,powerPreference:"low-power"});if(!f)return null;I={board:t,gl:f,programs:{},isLost:!1,parallel:f.getExtension("KHR_parallel_shader_compile")};function b(){f.bindVertexArray(f.createVertexArray()),f.bindBuffer(f.ARRAY_BUFFER,f.createBuffer()),f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),f.STATIC_DRAW),f.enableVertexAttribArray(0),f.vertexAttribPointer(0,2,f.FLOAT,!1,0,0),I.vertex=f.createShader(f.VERTEX_SHADER),f.shaderSource(I.vertex,v),f.compileShader(I.vertex),I.upscale={status:"compiling",names:["zaismaDrawn","zaismaDrawnSize","zaismaCanvasSize"]},dt(I.upscale,o),I.drawn={texture:f.createTexture(),framebuffer:f.createFramebuffer(),widthPx:0,heightPx:0}}return b(),t.addEventListener("webglcontextlost",function(S){S.preventDefault(),I.isLost=!0}),t.addEventListener("webglcontextrestored",function(){I.programs={},I.isLost=!1,b(),s.forEach(function(S){S.isDrawn=!1}),A()}),I}function dt(t,f){var b=I.gl,S=b.createShader(b.FRAGMENT_SHADER),M=b.createProgram();b.shaderSource(S,f),b.compileShader(S),b.attachShader(M,I.vertex),b.attachShader(M,S),b.bindAttribLocation(M,0,"corner"),b.linkProgram(M),t.pending={program:M,fragment:S}}function Lt(t){if(t.status!=="compiling")return t.status==="ready";var f=I.gl,b=t.pending;if(I.parallel&&!f.getProgramParameter(b.program,I.parallel.COMPLETION_STATUS_KHR))return!1;if(f.getProgramParameter(b.program,f.LINK_STATUS))t.program=b.program,t.status="ready",t.at={},t.names.forEach(function(M){t.at[M]=f.getUniformLocation(b.program,M)});else if(console.warn("Backdrop shader:",f.getShaderInfoLog(b.fragment)||f.getProgramInfoLog(b.program)),f.deleteProgram(b.program),t.status="failed",t.plainSource){var S=t.plainSource;t.plainSource=null,t.status="compiling",t.hasPass=!1,dt(t,S)}return f.deleteShader(b.fragment),t.status!=="compiling"&&(t.pending=null),t.status==="ready"}function Bt(t,f){if(t.programs[f])return t.programs[f];var b=h+\`uniform float iDark;
9065
+ \`+y+f+\`
9066
+ \`,S={status:"compiling",hasPass:!0,names:["iResolution","iTime","iDark","iGlassPanes","iGlassPaneCount","zaismaPaneCuts","zaismaPixel","zaismaViewOffset"],plainSource:b+\`uniform vec2 zaismaViewOffset;
8943
9067
  out vec4 zaismaFragColor;
8944
- void main() { vec4 color = vec4(0.0); mainImage(color, gl_FragCoord.xy + zaismaViewOffset); zaismaFragColor = vec4(color.rgb, 1.0); }\`};return dt(S,w+l),t.programs[u]=S,S}function _t(t,u,w){var S=t.gl,M=t.drawn;return(M.widthPx<u||M.heightPx<w)&&(M.widthPx=Math.max(M.widthPx,u),M.heightPx=Math.max(M.heightPx,w),S.bindTexture(S.TEXTURE_2D,M.texture),S.texImage2D(S.TEXTURE_2D,0,S.RGBA8,M.widthPx,M.heightPx,0,S.RGBA,S.UNSIGNED_BYTE,null),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,S.LINEAR),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,S.LINEAR),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.bindFramebuffer(S.FRAMEBUFFER,M.framebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,M.texture,0)),M}function Nt(t){var u=t.getAttribute("data-backdrop-shader")||f,w=tt(),S=null;if(!w)return null;function M(Z,Q,G){var K=tt(),nt=K&&Bt(K,u);if(!nt||!Lt(nt)||!Lt(K.upscale))return nt&&(nt.status==="failed"||K.upscale.status==="failed")&&(G.isLost=!0),!1;if(S=S||t.getContext("2d",{alpha:!1}),!S)return!1;var Y=K.gl,vt=K.board,yt=t.width,St=t.height,zt=G.drawnWidth,Tt=G.drawnHeight,xt=nt.at;(vt.width<yt||vt.height<St)&&(vt.width=Math.max(vt.width,yt),vt.height=Math.max(vt.height,St));var ht=_t(K,zt,Tt);Y.bindFramebuffer(Y.FRAMEBUFFER,ht.framebuffer),Y.useProgram(nt.program),Y.viewport(0,0,zt,Tt);var Et=t.classList.contains("is-framed"),wt=Et?1.8:1,Dt=zt*wt,Xt=Tt*wt;Y.uniform3f(xt.iResolution,Dt,Xt,1),Y.uniform1f(xt.iTime,Z),Y.uniform1f(xt.iDark,Q.darkShare),Y.uniform2f(xt.zaismaViewOffset,(Dt-zt)/2,(Xt-Tt)/2);var Yt=!1;if(nt.hasPass){var It=G.glass||{rects:new Float32Array(n*4),cuts:new Float32Array(n*4),count:0,scale:1,box:t.getBoundingClientRect()};Y.uniform4fv(xt.iGlassPanes,It.rects),Y.uniform4fv(xt.zaismaPaneCuts,It.cuts),Y.uniform1i(xt.iGlassPaneCount,It.count),Y.uniform1f(xt.zaismaPixel,It.scale),Yt=t.hasAttribute("data-adapts-glass")&&!G.isGlassAdapted&&It.count>0}Y.drawArrays(Y.TRIANGLES,0,3);var Ht=K.upscale;return Y.bindFramebuffer(Y.FRAMEBUFFER,null),Y.useProgram(Ht.program),Y.viewport(0,0,yt,St),Y.activeTexture(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,ht.texture),Y.uniform1i(Ht.at.zaismaDrawn,0),Y.uniform2f(Ht.at.zaismaDrawnSize,zt,Tt),Y.uniform2f(Ht.at.zaismaCanvasSize,yt,St),Y.drawArrays(Y.TRIANGLES,0,3),Yt&&(G.isGlassAdapted=!0,At(Y,G,yt,St)),S.drawImage(vt,0,vt.height-St,yt,St,0,0,yt,St),t.classList.contains("is-drawn")||t.classList.add("is-drawn"),!0}return M.prepare=function(){var Z=tt();Z&&Bt(Z,u)},M}var Ot=500;function Mt(t,u,w){return t.map(function(S,M){return S+(u[M]-S)*w})}function Gt(t,u){var w=e.matches||!t.from?1:Math.min(1,(u-t.fadeStartMs)/Ot);if(w>=1)return t.from=null,Object.assign({},t.target,{darkShare:t.target.isDark?1:0});var S=w*w*(3-2*w),M=t.from,Z=t.target;return{base:Mt(M.base,Z.base,S),a:Mt(M.a,Z.a,S),b:Mt(M.b,Z.b,S),c:Mt(M.c,Z.c,S),isDark:S<.5?M.isDark:Z.isDark,darkShare:(M.darkShare!==void 0?M.darkShare:M.isDark?1:0)+((Z.isDark?1:0)-(M.darkShare!==void 0?M.darkShare:M.isDark?1:0))*S}}var qt=1e3,Rt="zaisma:backdrop-lag-s",Ft=performance.now(),kt=1,Wt=performance.now(),Ct=!1,Pt=Date.now()/1e3;try{Pt-=Number(sessionStorage.getItem(Rt))||0}catch{}function Ut(t){var u=Math.max(0,t-Wt);Wt=t,kt=t-Ft>i?Math.max(0,kt-u/qt):Math.min(1,kt+u/qt),Pt+=kt*u/1e3,Ct=kt===0}function Vt(){Ft=performance.now(),clearTimeout(C),C=setTimeout(I,i),_&&(_=!1,J()),Ct&&(Ct=!1,Wt=Ft,o.forEach(function(t){t.isDrawn=!1}),A())}["pointerdown","pointermove","keydown","wheel","touchstart","scroll"].forEach(function(t){window.addEventListener(t,Vt,{passive:!0,capture:!0})}),C=setTimeout(I,i),window.addEventListener("pagehide",function(){try{sessionStorage.setItem(Rt,String(Date.now()/1e3-Pt))}catch{}});function a(t,u){if(!t.isOuter){var w=e.matches?20:Pt%3600;t.colors=Gt(t,u);var S=!0;if(t.drawShader){if(S=t.drawShader(w,t.colors,t),t.isLost){t.canvas.classList.remove("is-drawn");return}}else t.canvas.dispatchEvent(new CustomEvent("backdrop-frame",{detail:{timeS:w,colors:t.colors,widthPx:t.canvas.width,heightPx:t.canvas.height}}));t.isDrawn=S&&!t.from}}function g(t){return t.isOuter||!t.isInView||t.isLost||t.canvas.hasAttribute("data-backdrop-paused")?!1:!((t.isHeld||e.matches||Ct)&&t.isDrawn)}function L(t){if(E=!1,!document.hidden){var u=_?c:d;if(t-r<u&&!T){E=!0,requestAnimationFrame(L);return}var w=y?d:t-r;r=t,y=!1,x=!1,Ut(t),q&&ft();var S=T;T=!1,o.forEach(function(M){if(!(!M.isInView||M.canvas.hasAttribute("data-backdrop-paused"))){if(M.isOuter){M.kind==="frame"&&!M.isTold&&(M.isTold=!0,W(M)),M.canvas.hasAttribute("data-adapts-glass")&&!M.isGlassAdapted&&bt(M);return}M.drawShader&&(S||!M.glass)&&st(M),!((M.isHeld||e.matches||Ct)&&M.isDrawn)&&(M.drawShader&&w<1e3&&(M.slowS=w>u*1.5?M.slowS+w/1e3:Math.max(0,M.slowS-w/2e3),M.slowS>1.5&&(M.slowS=0,M.scale>.26?(M.scale*=.75,M.size()):M.isHeld=!0)),a(M,t))}}),(T||q||o.some(g))&&(E=!0,requestAnimationFrame(L))}}function F(){var t=performance.now();q=!0,o.forEach(function(u){var w=O(u.canvas);JSON.stringify(w)!==JSON.stringify(u.target)&&(u.from=u.colors,u.target=w,u.fadeStartMs=t,u.isDrawn=!1,u.isGlassAdapted=!1,u.isInView&&a(u,t))}),A()}function z(){var t="";o.forEach(function(u){var w=u.isOuter&&u.canvas.getAttribute("data-backdrop-color");w&&/^#[0-9a-fA-F]{6}$/.test(w)&&(t=w)}),t?document.documentElement.style.setProperty("--backdrop-edge",t):document.documentElement.style.removeProperty("--backdrop-edge")}function X(t,u){var w={canvas:t,kind:u,isOuter:!0,isInView:!0,isTold:!1,isGlassAdapted:!1,target:O(t),from:null};t.backdropLayer=w,o.push(w),u==="frame"&&(w.onMessage=function(M){M.source===t.contentWindow&&M.data&&M.data.zaismaBackground&&(w.isTold=!1,B())},window.addEventListener("message",w.onMessage));function S(){var M=t.getAttribute("data-glass-kind");if(t.hasAttribute("data-adapts-glass")&&M){w.isGlassAdapted=!0,pt(w,{isSmoked:M==="smoked",tint:t.getAttribute("data-glass-tint")||""});return}var Z=t.getAttribute("data-backdrop-still")||(u==="picture"?t.currentSrc||t.src:"");if(!(!t.hasAttribute("data-adapts-glass")||!Z)){var Q=new Image;Q.onload=function(){t.getAttribute("data-backdrop-still")!==Z&&u!=="picture"||(w.still=Q,w.isGlassAdapted=!1,B())},Q.src=Z}}S(),new MutationObserver(S).observe(t,{attributes:!0,attributeFilter:["data-backdrop-still","src","data-glass-kind"]}),window.IntersectionObserver&&new IntersectionObserver(function(M){w.isInView=M[M.length-1].isIntersecting,w.isInView&&B()}).observe(t),B(),z()}function D(t){if(!t.backdropLayer&&!(t.hasAttribute("data-backdrop-stand-in")&&!t.hasAttribute("data-backdrop-shader"))){var u=t.getAttribute("data-backdrop");if(u==="frame"||u==="picture")return X(t,u);var w=t.getAttribute("data-backdrop")==="scene",S=window.matchMedia("(max-width: 760px)").matches,M=Math.min(window.devicePixelRatio||1,w?2:1.5),Z=t.classList.contains("is-framed"),Q=rt&&rt.has(t)?rt.get(t):N(t),G={canvas:t,isInView:Q,isDrawn:!1,isHeld:!1,slowS:0,target:O(t),from:null,scale:w||Z?M:(S?.4:.55)*M};if(!(!w&&(G.drawShader=Nt(t),!G.drawShader))){if(t.backdropLayer=G,G.size=function(){var nt=Math.max(2,Math.round(t.clientWidth*G.scale)),Y=Math.max(2,Math.round(t.clientHeight*G.scale));w||(G.drawnWidth=Math.max(2,Math.round(t.clientWidth*G.scale*p)),G.drawnHeight=Math.max(2,Math.round(t.clientHeight*G.scale*p)),nt=Math.round(G.drawnWidth*m),Y=Math.round(G.drawnHeight*m)),!(nt===t.width&&Y===t.height)&&(t.width=nt,t.height=Y,G.isDrawn=!1,G.glass=null,t.backdropLayer&&!x&&G.isInView&&a(G,performance.now()))},G.size(),window.zaismaWatch.size(t,G.size),window.IntersectionObserver&&new IntersectionObserver(function(nt){G.isInView=nt[nt.length-1].isIntersecting,G.onView&&G.onView(),G.isInView&&A()}).observe(t),G.drawShader&&!Q&&window.IntersectionObserver){var K=new IntersectionObserver(function(nt){nt[nt.length-1].isIntersecting&&(K.disconnect(),G.drawShader.prepare())},{rootMargin:"100% 0px"});K.observe(t)}else G.drawShader&&G.drawShader.prepare();new MutationObserver(A).observe(t,{attributes:!0,attributeFilter:["data-backdrop-paused"]}),o.push(G),!x&&G.isInView&&a(G,performance.now()),A()}}}function N(t){var u=t.getBoundingClientRect();return u.bottom>0&&u.right>0&&u.top<window.innerHeight&&u.left<window.innerWidth}var U=document.querySelectorAll("canvas[data-backdrop], iframe[data-backdrop='frame'], img[data-backdrop='picture']"),rt=new Map;U.forEach(function(t){t.tagName==="CANVAS"&&rt.set(t,N(t))}),U.forEach(D),rt.clear(),window.zaismaBackdrop={add:function(t){q=!0,D(t),A()},remove:function(t){var u=t.backdropLayer;u&&(o=o.filter(function(w){return w!==u}),u.onMessage&&window.removeEventListener("message",u.onMessage),t.backdropLayer=null,B(),z())},forgetGlass:function(){document.querySelectorAll(":has(> .backdrop)").forEach(function(t){t.shownGlass=null}),document.querySelectorAll("[data-glass]").forEach(function(t){t.glassPick=null,t.classList.remove("smoke"),t.removeAttribute("data-theme-choice"),t.style.removeProperty("--glass-tint")})}},window.zaismaWatch.scroll($),window.zaismaWatch.resize(B);function lt(t){return t.nodeType===1&&(t.hasAttribute("data-glass")||!!t.querySelector("[data-glass]"))}window.zaismaWatch.page(function(t){q||(q=t.some(function(u){return u.type==="attributes"?u.target.hasAttribute("data-glass"):Array.prototype.some.call(u.addedNodes,lt)||Array.prototype.some.call(u.removedNodes,lt)}),q&&A())}),document.addEventListener("toggle",function(){q=!0,A()},!0),document.addEventListener("visibilitychange",function(){document.hidden||A()}),new MutationObserver(F).observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["data-theme-choice"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",F),e.addEventListener("change",F)})(),(function(){var b=getComputedStyle(document.documentElement),f=parseFloat(b.getPropertyValue("--control-slant"))||10;function l(h,v){var s=h.querySelector(".color-mark"),p=Array.prototype.slice.call(h.querySelectorAll(".color-pick")),m=h.querySelector('.color-pick[aria-pressed="true"]');if(!s||!m){s&&(s.hidden=!0);return}s.hidden=!1;var i=m.offsetHeight,d=f/i,c=m.offsetLeft,e=c+m.offsetWidth,o=s.offsetTop,r=o-(m.offsetTop+i),E=s.offsetHeight,y=m===p[0],x=m===p[p.length-1],A=y?[c,c]:[c-d*r,c-d*(r+E)],P=x?[e,e]:[e-f-d*r,e-f-d*(r+E)],O=Math.min(A[0],A[1]),q=Math.max(P[0],P[1]),T=[[A[0]-O,0],[P[0]-O,0],[P[1]-O,E],[A[1]-O,E]];v||(s.style.transition="none"),s.style.width=q-O+"px",s.style.transform="translateX("+O+"px)",s.style.setProperty("--cut-shape","polygon("+T.map(function(j){return j[0].toFixed(2)+"px "+j[1].toFixed(2)+"px"}).join(", ")+")"),v||(s.offsetWidth,s.style.transition="")}function n(){document.querySelectorAll(".color-well").forEach(function(h){l(h,!1)})}requestAnimationFrame(n),document.fonts&&document.fonts.ready&&document.fonts.ready.then(n),document.addEventListener("click",function(h){var v=h.target.closest&&h.target.closest(".color-pick");if(v){var s=v.closest(".color-picker");s.querySelectorAll(".color-pick").forEach(function(p){p.setAttribute("aria-pressed",String(p===v))}),l(v.parentElement,!0),s.querySelector(".color-picker-name").textContent=v.getAttribute("aria-label")}})})(),(function(){document.addEventListener("click",function(n){var h=n.target.closest&&n.target.closest(".find > .cut-btn");if(h){var v=h.parentElement.querySelector('input[type="search"]');v&&(v.value="",v.dispatchEvent(new Event("input",{bubbles:!0})),v.focus());return}var s=n.target.closest&&n.target.closest(".field:not(.code) > .cut-btn[aria-controls]");if(s){var p=document.getElementById(s.getAttribute("aria-controls"));if(p){var m=p.type==="password";p.type=m?"text":"password",s.querySelector(".face > span:not(.loader)").textContent=m?"Hide":"Show",s.setAttribute("aria-pressed",String(m))}}});var b=".field > input:not([type='hidden']), .find > input[type='search']";function f(n){var h=n.parentElement,v=n.scrollWidth-n.clientWidth;h.classList.toggle("more-left",v>1&&n.scrollLeft>1),h.classList.toggle("more-right",v>1&&n.scrollLeft<v-1)}function l(n){requestAnimationFrame(function(){f(n)})}["input","focusin","focusout","keyup","click","scroll"].forEach(function(n){document.addEventListener(n,function(h){h.target.matches&&h.target.matches(b)&&l(h.target)},!0)}),document.addEventListener("selectionchange",function(){var n=document.activeElement;n&&n.matches&&n.matches(b)&&l(n)}),window.zaismaWatch.each(b,function(n){f(n),window.zaismaWatch.size(n,function(){f(n)})})})(),(function(){var b=6;function f(s){return typeof s=="string"?document.getElementById(s):s}function l(s){return Array.prototype.slice.call(s.querySelectorAll(".pin-box > input"))}function n(s){return l(s).map(function(p){return p.value}).join("")}function h(s,p){var m=s.querySelector(".field-error");m.textContent=p||"",m.hidden=!p,Array.prototype.forEach.call(s.querySelectorAll(".pin-box"),function(i){i.classList.toggle("is-marked",!!p)}),l(s).forEach(function(i){p?i.setAttribute("aria-invalid","true"):i.removeAttribute("aria-invalid")})}function v(s){s.querySelector('input[type="hidden"]').value=n(s)}window.zaismaPinField={digits:function(s){return n(f(s))},clear:function(s){var p=f(s);l(p).forEach(function(m){m.value=""}),v(p)},focus:function(s){var p=l(f(s))[0];p.focus({preventScroll:!0}),p.select()},setError:function(s,p){h(f(s),p)},setDisabled:function(s,p){var m=f(s);l(m).forEach(function(i){i.disabled=!!p}),p?m.setAttribute("aria-busy","true"):m.removeAttribute("aria-busy")}},window.zaismaWatch.each("[data-pin]",function(s){var p=l(s);function m(c){var e=p[Math.max(0,Math.min(b-1,c))];e.focus({preventScroll:!0}),e.select()}function i(){s.querySelector(".pin-box.is-marked")&&h(s,""),v(s);var c=n(s);c.length===b&&s.dispatchEvent(new CustomEvent("zaisma:pin-complete",{bubbles:!0,detail:{digits:c}}))}function d(c,e){var o=e.replace(/\\D/g,"").slice(0,b-c);o&&(o.split("").forEach(function(r,E){p[c+E].value=r}),m(c+o.length),i())}p.forEach(function(c,e){c.addEventListener("focus",function(){c.select()}),c.addEventListener("keydown",function(o){if(!(o.ctrlKey||o.metaKey||o.altKey)){var r=o.key;if(/^[0-9]$/.test(r)){o.preventDefault(),d(e,r);return}if(r==="Backspace"||r==="Delete"){if(o.preventDefault(),c.value){c.value="",i();return}r==="Backspace"&&e>0&&(p[e-1].value="",m(e-1),i());return}if(r==="ArrowLeft"||r==="ArrowRight"){o.preventDefault(),m(e+(r==="ArrowLeft"?-1:1));return}if(r==="Home"||r==="End"){o.preventDefault(),m(r==="Home"?0:b-1);return}r.length===1&&o.preventDefault()}}),c.addEventListener("input",function(){var o=c.value.replace(/\\D/g,"");if(c.value="",!o)return i();if(o.length===b)return p.forEach(function(r){r.value=""}),d(0,o);d(e,o.slice(-1))}),c.addEventListener("paste",function(o){o.preventDefault();var r=((o.clipboardData||window.clipboardData).getData("text")||"").replace(/\\D/g,"");r&&(p.forEach(function(E){E.value=""}),d(0,r))})})})})(),(function(){window.zaismaWatch.each(".tab-switch",function(b){var f=b.querySelector(".slab"),l=b.querySelector(".ghost"),n=b.querySelectorAll(":scope > a, :scope > button"),h=b.classList.contains("vertical");function v(){return b.querySelector('[aria-current="page"], [aria-pressed="true"]')}var s=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--gap-control-row"))||4;function p(k){return Math.max(0,((Number(k.getAttribute("data-cut-line"))||0)-s)/2)}function m(k,B,$){if(!B){k.style.width="0px";return}var ot={beside:k.getAttribute("data-cut-beside"),ends:k.getAttribute("data-cut-ends")||"",stack:k.getAttribute("data-cut-stack")},ft=Array.prototype.filter.call(n,function(at){return!at.classList.contains("folded")}),et=B===ft[0],st=B===ft[ft.length-1];if(h){k.style.height=B.offsetHeight+"px",k.style.transform="translateY("+B.offsetTop+"px)",k.setAttribute("data-cut-beside",""),k.setAttribute("data-cut-stack",((et?"first ":"")+(st?"last":"")).trim()),k.redrawCut&&k.redrawCut($&&ot.stack!==null?{from:ot,ms:parseFloat(getComputedStyle(k).transitionDuration)*1e3}:void 0);return}var mt=p(k),H=et?0:mt,V=st?0:mt;k.style.width=B.offsetWidth+H+V+"px",k.style.transform="translateX("+(B.offsetLeft-H)+"px)",k.setAttribute("data-cut-beside",((et?"":"start ")+(st?"":"end")).trim());var ct=((et?"start ":"")+(st?"end":"")).trim();ct?k.setAttribute("data-cut-ends",ct):k.removeAttribute("data-cut-ends"),k.redrawCut&&k.redrawCut($&&ot.beside!==null?{from:ot,ms:parseFloat(getComputedStyle(k).transitionDuration)*1e3}:void 0)}var i=6;function d(){if(!(h||b.classList.contains("framed"))){b.style.removeProperty("--tab-room");var k=b.scrollWidth-b.clientWidth,B=Array.prototype.filter.call(n,function(ot){return!ot.classList.contains("folded")});if(!(k<=.5||!B.length)){var $=parseFloat(getComputedStyle(b).getPropertyValue("--tab-room"))||i;b.style.setProperty("--tab-room",Math.max(i,$-k/(2*B.length)).toFixed(2)+"px")}}}var c=!1;function e(){var k=b.querySelector(":scope > .is-pointed"),B=b.querySelector(":scope > .is-focused"),$=b.querySelector(".focus-ring");k&&(m(l,k),b.classList.add("pointing")),B&&$&&(m($,B),b.classList.add("is-focus-shown"))}function o(){if(!c){d();var k=v(),B=b.querySelector(":scope > :focus-visible"),$=b.querySelector(".focus-ring");f.style.transition="none",m(f,k),m(l,k),$&&B&&m($,B),e(),f.offsetWidth,f.style.transition="",b.classList.add("is-ready")}}o();var r=window.navigation&&navigation.activation&&navigation.activation.from;if(r&&r.url&&f.animate&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var E=new URL(r.url),y=E.pathname,x=Array.prototype.filter.call(n,function(k){return k.href&&new URL(k.href).pathname===y}),A=x.find(function(k){return new URL(k.href).search===E.search})||(x.length===1?x[0]:void 0),P=v();if(A&&P&&A!==P){var O=function(){var k=h?"translateY("+A.offsetTop+"px)":"translateX("+A.offsetLeft+"px) scaleX("+(A.offsetWidth/Math.max(1,P.offsetWidth)).toFixed(4)+")",B=h?"translateY("+P.offsetTop+"px)":"translateX("+P.offsetLeft+"px) scaleX(1)";return f.animate([{transform:k,transformOrigin:"0 0"},{transform:B,transformOrigin:"0 0"}],{duration:parseFloat(getComputedStyle(f).transitionDuration)*1e3||550,easing:"cubic-bezier(.3, 1.2, .4, 1)"})};f.style.transition="none",m(f,A),f.offsetWidth,f.style.transition="",c=!0;var q=function(){requestAnimationFrame(function(){var k=document.getAnimations?document.getAnimations().filter(function(B){return B.effect&&/^::view-transition/.test(B.effect.pseudoElement||"")}):[];Promise.all(k.map(function(B){return B.finished.catch(function(){})})).then(function(){c=!1,o(),c=!0;var B=function(){c=!1,o()};O().finished.then(B,B)})})};document.fonts&&document.fonts.ready?document.fonts.ready.then(q):q()}}document.fonts&&document.fonts.ready&&document.fonts.ready.then(o),window.zaismaWatch.size(b,o),!h&&!b.classList.contains("framed")&&b.parentElement&&window.zaismaWatch.size(b.parentElement,o),b.pickTab=function(k){b.classList.remove("pointing"),k.tagName==="BUTTON"&&n.forEach(function($){$.setAttribute("aria-pressed",String($===k))}),m(f,k,!0),m(l,k,!0);var B=b.closest("[data-fades-sideways]");B&&B.showWhole&&B.showWhole(k,!0)};function T(k){return k.disabled||k.getAttribute("aria-disabled")==="true"}n.forEach(function(k){k.addEventListener("pointerenter",function(B){T(k)||B.pointerType&&B.pointerType!=="mouse"||(k!==v()?(m(l,k),b.classList.add("pointing")):b.classList.remove("pointing"))}),k.addEventListener("click",function(B){if(!T(k)){if(k.href&&k.getAttribute("aria-current")==="page"&&B.button===0&&!B.metaKey&&!B.ctrlKey&&!B.shiftKey&&!B.altKey){B.preventDefault();return}if(k.href&&!B.defaultPrevented){var $=new URL(k.href,location.href);if($.pathname!==location.pathname||$.search!==location.search)return}b.pickTab(k)}})}),b.addEventListener("pointerleave",function(){b.classList.remove("pointing")});var j=b.querySelector(".focus-ring");b.addEventListener("focusin",function(k){var B=k.target;!j||B.parentElement!==b||!B.matches(":focus-visible")||(m(j,B),b.classList.add("is-focus-shown"))}),b.addEventListener("focusout",function(){b.classList.remove("is-focus-shown")})}),window.addEventListener("pageswap",function(b){if(!(!b.viewTransition||!b.activation||!b.activation.entry||!b.activation.entry.url)){var f=new URL(b.activation.entry.url);document.querySelectorAll(".tab-switch").forEach(function(l){var n=l.querySelector(":scope > .slab"),h=Array.prototype.some.call(l.querySelectorAll(":scope > a[href]"),function(v){return new URL(v.href).pathname===f.pathname&&v.getAttribute("aria-current")!=="page"});n&&h&&(n.style.visibility="hidden")})}}),window.addEventListener("pageshow",function(){document.querySelectorAll(".tab-switch > .slab").forEach(function(b){b.style.visibility=""})})})(),(function(){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||!window.matchMedia("(hover: hover)").matches)return;function b(f){if(!f.dataset.lean){f.dataset.lean="1";var l=f.querySelector(".run");l&&(f.addEventListener("pointerenter",function(){f.classList.add("over"),f.style.setProperty("--lift","-1.5px"),l.classList.contains("glint")||l.classList.add("glint")}),l.addEventListener("animationend",function(n){n.animationName==="run-glint"&&l.classList.remove("glint")}),f.addEventListener("pointerleave",function(){f.classList.remove("over"),["--lift","--rx","--ry"].forEach(function(n){f.style.removeProperty(n)}),l.style.removeProperty("--refl")}),f.addEventListener("pointermove",function(n){var h=f.getBoundingClientRect(),v=(n.clientX-h.left)/h.width-.5,s=(n.clientY-h.top)/h.height-.5;f.style.setProperty("--ry",(v*6).toFixed(2)+"deg"),f.style.setProperty("--rx",(-s*9).toFixed(2)+"deg"),l.style.setProperty("--refl",(50-v*70).toFixed(1)+"%")}))}}document.querySelectorAll(".run-wrap").forEach(b),window.zaismaWatch.page(function(f){f.forEach(function(l){l.addedNodes.forEach(function(n){n.querySelectorAll&&n.querySelectorAll(".run-wrap").forEach(b)})})}),document.addEventListener("pointermove",function(f){var l=f.target.closest&&f.target.closest(".glass-btn");if(l){var n=l.getBoundingClientRect();l.style.setProperty("--mx",(f.clientX-n.left).toFixed(0)+"px"),l.style.setProperty("--my",(f.clientY-n.top).toFixed(0)+"px")}},{passive:!0})})(),(function(){function b(l){!l||l.getAttribute("aria-busy")==="true"||(l.setAttribute("aria-busy","true"),l.tagName==="BUTTON"&&setTimeout(function(){l.disabled=!0},0))}function f(l,n){setTimeout(function(){l.defaultPrevented||n()},0)}document.addEventListener("submit",function(l){if(!(l.target.getAttribute("method")==="dialog"||l.submitter&&l.submitter.getAttribute("formmethod")==="dialog")){var n=l.submitter&&l.submitter.closest(".shell")||l.target.querySelector('.shell[type="submit"]');f(l,function(){b(n)})}}),document.addEventListener("click",function(l){var n=l.target.closest&&l.target.closest("a.shell[href]");if(!(!n||l.button!==0||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||n.target==="_blank")){var h=new URL(n.href,location.href);h.origin===location.origin&&h.pathname===location.pathname&&h.search===location.search||f(l,function(){b(n)})}}),window.addEventListener("pageshow",function(l){l.persisted&&document.querySelectorAll('.shell[aria-busy="true"]').forEach(function(n){n.removeAttribute("aria-busy"),n.disabled=!1})})})(),(function(){for(var b=window.matchMedia("(prefers-reduced-motion: reduce)").matches,f=["January","February","March","April","May","June","July","August","September","October","November","December"],l=40,n=new Date().getFullYear(),h=window.matchMedia("(pointer: coarse)").matches?"Swipe each wheel to pick.":"Scroll or type to pick each one.",v=[],s=n;s>n-100;s--)v.push(String(s));function p(m,i){return m?new Date(i||2e3,m,0).getDate():31}window.zaismaWatch.each("[data-birthday]",function(m){var i=m.querySelector(".bday-field"),d=m.querySelector(".bday-pick"),c=m.querySelector(".bday-value"),e=m.querySelector(".field-error"),o=m.querySelector(".field-hint"),r=m.querySelector(".bday-read"),E=m.querySelector('input[type="hidden"]'),y=E.getAttribute("data-id"),x={month:0,day:0,year:0},A=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(E.value);A&&(x.month=Number(A[2]),x.day=Number(A[3]),x.year=Math.max(0,v.indexOf(A[1])+1)),r.textContent=h;var P={month:{el:m.querySelector('[data-part="month"]'),blank:"Month",items:function(){return f}},day:{el:m.querySelector('[data-part="day"]'),blank:"Day",items:function(){for(var H=p(x.month,x.year?Number(v[x.year-1]):0),V=[],ct=1;ct<=H;ct++)V.push(String(ct));return V}},year:{el:m.querySelector('[data-part="year"]'),blank:"Year",items:function(){return v}}};function O(H){var V=P[H],ct=[V.blank].concat(V.items());V.count=ct.length,V.el.textContent="";var at=document.createDocumentFragment();ct.forEach(function(it,ut){var pt=document.createElement("div");pt.setAttribute("role","option"),pt.id=y+"-"+H+"-"+ut,pt.textContent=it,ut===0&&(pt.className="blank"),at.appendChild(pt)}),V.el.appendChild(at),V.isWired||(V.isWired=!0,V.el.addEventListener("click",function(it){var ut=it.target.closest('[role="option"]');ut&&ut.parentElement===V.el&&T(H,Array.prototype.indexOf.call(V.el.children,ut),!0)})),q(H)}function q(H){var V=P[H],ct=x[H];Array.prototype.forEach.call(V.el.children,function(at,it){at.setAttribute("aria-selected",String(it===ct))}),V.el.setAttribute("aria-activedescendant",y+"-"+H+"-"+ct)}function T(H,V,ct){var at=P[H];V=Math.max(0,Math.min(at.count-1,V)),at.el.scrollTo({top:V*l,behavior:ct&&!b?"smooth":"auto"}),j(H,V)}function j(H,V){x[H]!==V&&(x[H]=V,q(H),H!=="day"&&(O("day"),x.day>P.day.count-1&&(x.day=P.day.count-1,q("day")),P.day.el.scrollTop=x.day*l),ot())}function k(){return f[x.month-1]+" "+x.day+", "+v[x.year-1]}function B(){return f[x.month-1].slice(0,3)+" "+x.day+", "+v[x.year-1]}function $(){return x.month&&x.day&&x.year}function ot(){var H=$();r.textContent=H?k():h,H?(c.textContent=B(),i.classList.add("set"),i.classList.remove("is-marked"),e.hidden=!0,o&&(o.hidden=!1),E.value=v[x.year-1]+"-"+String(x.month).padStart(2,"0")+"-"+String(x.day).padStart(2,"0")):i.classList.contains("is-marked")?(i.classList.remove("set"),E.value=""):(c.textContent="Choose a date",i.classList.remove("set"),E.value="")}Object.keys(P).forEach(function(H){var V=P[H],ct=null,at="",it=0;O(H),V.el.addEventListener("scroll",function(){clearTimeout(ct),ct=setTimeout(function(){j(H,Math.round(V.el.scrollTop/l))},110)},{passive:!0}),V.el.addEventListener("keydown",function(ut){var pt=x[H],gt=ut.key,At={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[gt];if(At){T(H,pt+At,!0),ut.preventDefault();return}if(gt==="Home"){T(H,1,!0),ut.preventDefault();return}if(gt==="End"){T(H,V.count-1,!0),ut.preventDefault();return}if(gt==="Enter"&&$()){st(!0),ut.preventDefault();return}if(!(gt.length!==1||ut.metaKey||ut.ctrlKey)){var bt=Date.now();at=bt-it>900?gt.toLowerCase():at+gt.toLowerCase(),it=bt;for(var W=[V.blank].concat(V.items()),_=-1,C=1;C<W.length&&_<0;C++)W[C].toLowerCase().indexOf(at)===0&&(_=C);if(H==="year"&&_<0&&/^\\d{2}$/.test(at))for(var I=1;I<W.length&&_<0;I++)W[I].slice(2)===at&&(_=I);_>0&&(T(H,_,!0),ut.preventDefault())}})});function ft(){Object.keys(P).forEach(function(H){P[H].el.scrollTop=x[H]*l})}function et(){d.hidden=!1,i.setAttribute("aria-expanded","true"),ft(),P[$()?"month":x.month?x.day?"year":"day":"month"].el.focus({preventScroll:!0}),d.scrollIntoView({block:"nearest",behavior:b?"auto":"smooth"})}function st(H){d.hidden=!0,i.setAttribute("aria-expanded","false"),H&&i.focus()}i.addEventListener("click",function(){d.hidden?et():st(!1)}),d.addEventListener("keydown",function(H){H.key==="Escape"&&(st(!0),H.preventDefault())}),d.hidden||requestAnimationFrame(ft),ot();var mt=m.closest("form");mt&&m.hasAttribute("data-required")&&mt.addEventListener("submit",function(H){$()||(H.preventDefault(),i.classList.add("is-marked"),e.textContent="Pick your birthday to go on.",e.hidden=!1,o&&(o.hidden=!0),et())})})})(),(function(){for(var b=window.matchMedia("(prefers-reduced-motion: reduce)").matches,f=40,l=864e5,n=3e5,h=[],v=[],s=0;s<24;s++)h.push((s%12||12)+(s<12?" AM":" PM"));for(var p=0;p<60;p+=5)v.push(String(p).padStart(2,"0"));function m(e){return String(e).padStart(2,"0")}function i(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function d(e){var o=-e.getTimezoneOffset(),r=o<0?"-":"+",E=Math.abs(o);return e.getFullYear()+"-"+m(e.getMonth()+1)+"-"+m(e.getDate())+"T"+m(e.getHours())+":"+m(e.getMinutes())+r+m(Math.floor(E/60))+":"+m(E%60)}function c(e){try{var o=new Intl.DateTimeFormat("en-US",{timeZoneName:"long"}).formatToParts(e).find(function(r){return r.type==="timeZoneName"});return o?o.value:""}catch{return""}}window.zaismaWatch.each("[data-date-time]",function(e){var o=e.querySelector(".bday-field"),r=e.querySelector(".bday-pick"),E=e.querySelector(".bday-value"),y=e.querySelector(".date-time-zone"),x=e.querySelector(".bday-read"),A=e.querySelector('input[type="hidden"]'),P=A.getAttribute("data-id"),O=e.hasAttribute("data-minimum-at")?new Date(e.getAttribute("data-minimum-at")):new Date;isNaN(O)&&(O=new Date),O=new Date(Math.ceil(O.getTime()/n)*n);for(var q=i(O),T=[],j=0;j<366;j++)T.push(new Date(q.getFullYear(),q.getMonth(),q.getDate()+j));var k=i(new Date).getTime(),B=new Date().getFullYear(),$=new Intl.DateTimeFormat("en-US",{weekday:"short",month:"short",day:"numeric"}),ot=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"});function ft(C){var I=Math.round((C.getTime()-k)/l);return I===0?"Today":I===1?"Tomorrow":(C.getFullYear()===B?$:ot).format(C)}var et={day:0,hour:0,minute:0},st=!1;function mt(C){var I=T[C.day];return new Date(I.getFullYear(),I.getMonth(),I.getDate(),C.hour,C.minute*5)}function H(C){var I=Math.max(0,Math.min(T.length-1,Math.round((i(C).getTime()-q.getTime())/l)));return{day:I,hour:C.getHours(),minute:Math.floor(C.getMinutes()/5)}}var V=A.value?new Date(A.value):null,ct=e.querySelector(".field-error"),at=V&&!isNaN(V)&&o.classList.contains("is-marked")?V:null;V&&!isNaN(V)&&(et=H(V<O?O:V),st=!0);var it={day:{el:e.querySelector('[data-part="day"]'),items:T.map(ft)},hour:{el:e.querySelector('[data-part="hour"]'),items:h},minute:{el:e.querySelector('[data-part="minute"]'),items:v}};function ut(C){var I=it[C],J=et[C];Array.prototype.forEach.call(I.el.children,function(R,tt){R.setAttribute("aria-selected",String(tt===J))}),I.el.setAttribute("aria-activedescendant",P+"-"+C+"-"+J)}Object.keys(it).forEach(function(C){var I=it[C],J=document.createDocumentFragment();I.items.forEach(function(R,tt){var dt=document.createElement("div");dt.setAttribute("role","option"),dt.id=P+"-"+C+"-"+tt,dt.textContent=R,J.appendChild(dt)}),I.el.appendChild(J),I.el.addEventListener("click",function(R){var tt=R.target.closest('[role="option"]');tt&&tt.parentElement===I.el&&gt(C,Array.prototype.indexOf.call(I.el.children,tt),!0)}),ut(C)});function pt(C){Object.keys(it).forEach(function(I){it[I].el.scrollTo({top:et[I]*f,behavior:C&&!b?"smooth":"auto"})})}function gt(C,I,J){I=Math.max(0,Math.min(it[C].items.length-1,I)),it[C].el.scrollTo({top:I*f,behavior:J&&!b?"smooth":"auto"}),At(C,I)}function At(C,I){et[C]===I&&st||(et[C]=I,st=!0,at&&(at=null,o.classList.remove("is-marked"),ct&&(ct.hidden=!0)),mt(et)<O?(et=H(O),Object.keys(it).forEach(ut),pt(!0)):ut(C),bt())}function bt(){var C=mt(et);if(y.textContent="Your time"+(c(C)?": "+c(C):""),!st){E.textContent="Choose a time",o.classList.remove("set"),A.value="",x.textContent="";return}at&&(C=at);var I=C.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),J=at?i(at):T[et.day],R=Math.round((J.getTime()-k)/l),tt=R===0?"Today":R===1?"Tomorrow":J.toLocaleDateString("en-US",J.getFullYear()===B?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"});E.textContent=tt+", "+I,o.classList.add("set"),x.textContent=C.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})+" at "+I,A.value=d(C)}Object.keys(it).forEach(function(C){var I=it[C],J=null;I.el.addEventListener("scroll",function(){clearTimeout(J),J=setTimeout(function(){r.hidden||At(C,Math.round(I.el.scrollTop/f))},110)},{passive:!0}),I.el.addEventListener("keydown",function(R){var tt=et[C],dt={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[R.key];if(dt){gt(C,tt+dt,!0),R.preventDefault();return}if(R.key==="Home"){gt(C,0,!0),R.preventDefault();return}if(R.key==="End"){gt(C,I.items.length-1,!0),R.preventDefault();return}R.key==="Enter"&&(_(!0),R.preventDefault())})});function W(C){if(!st){var I=new Date;I.setMinutes(60,0,0),et=H(I<O?O:I),st=!0,Object.keys(it).forEach(ut),bt()}r.hidden=!1,o.setAttribute("aria-expanded","true"),pt(!1),!C&&(it.day.el.focus({preventScroll:!0}),r.scrollIntoView({block:"nearest",behavior:b?"auto":"smooth"}))}function _(C){r.hidden=!0,o.setAttribute("aria-expanded","false"),C&&o.focus()}o.addEventListener("click",function(){r.hidden?W():_(!1)}),r.addEventListener("keydown",function(C){C.key==="Escape"&&(_(!0),C.preventDefault())}),r.hidden||(st?requestAnimationFrame(function(){pt(!1)}):W(!0)),bt()})})(),(function(){function b(f){return f<1e3?f+"\\xA0bytes":f<1e6?Math.round(f/1e3)+"\\xA0KB":f<1e9?Number((f/1e6).toFixed(1))+"\\xA0MB":Number((f/1e9).toFixed(2))+"\\xA0GB"}document.querySelectorAll("[data-file-drop]").forEach(function(f){var l=f.querySelector(".file-drop"),n=f.querySelector(".file-drop-input"),h=f.querySelector(".file-drop-list"),v=f.querySelector(".field-error"),s=Number(f.getAttribute("data-most-bytes"))||0,p=(n.getAttribute("accept")||"").split(",").map(function(e){return e.trim().toLowerCase()}).filter(Boolean),m=0;function i(){var e=p.map(function(o){var r=o.split("/");return o.charAt(0)==="."?o:r[1]==="*"?r[0]+" file":"."+r[1]});return e.length>1?e.slice(0,-1).join(", ")+" or "+e[e.length-1]:e[0]}function d(e){if(!p.length)return!0;var o=e.name.toLowerCase(),r=(e.type||"").toLowerCase();return p.some(function(E){return E.charAt(0)==="."?o.slice(-E.length)===E:/\\/\\*$/.test(E)?r.indexOf(E.slice(0,-1))===0:r===E})}function c(e){v.textContent=e,v.hidden=!e,l.classList.toggle("is-marked",!!e);var o=(n.getAttribute("aria-describedby")||"").split(" ").filter(function(r){return r&&r!==v.id});e?(o.push(v.id),n.setAttribute("aria-invalid","true")):n.removeAttribute("aria-invalid"),n.setAttribute("aria-describedby",o.join(" "))}n.addEventListener("dragenter",function(){m++,l.classList.add("is-over")}),n.addEventListener("dragleave",function(){m=Math.max(0,m-1),m||l.classList.remove("is-over")}),n.addEventListener("drop",function(){m=0,l.classList.remove("is-over")}),n.addEventListener("change",function(){var e=Array.prototype.slice.call(n.files),o=e.find(function(y){return!d(y)}),r=s?e.find(function(y){return y.size>s}):null,E=o?o.name+" isn't a "+i()+".":r?r.name+" is "+b(r.size)+"; the most is "+b(s)+".":"";E&&(n.value="",e=[]),c(E),h.textContent="",e.forEach(function(y){var x=document.createElement("li"),A=document.createElement("span"),P=document.createElement("span");A.className="file-drop-name",A.textContent=y.name,P.className="file-drop-size",P.textContent=b(y.size),x.appendChild(A),x.appendChild(P),h.appendChild(x)}),h.hidden=!e.length})})})(),(function(){function b(f){var l=document.createRange();l.selectNodeContents(f);var n=window.getSelection();n.removeAllRanges(),n.addRange(l)}document.addEventListener("click",function(f){var l=f.target.closest&&f.target.closest(".field.code > .code-text");if(l){b(l);return}var n=f.target.closest&&f.target.closest(".field.code > .cut-btn[aria-controls]");if(!n)return;var h=document.getElementById(n.getAttribute("aria-controls")),v=n.closest(".code-field"),s=v&&v.querySelector(".code-copied");if(!h||!s)return;function p(i){s.textContent=i,v.classList.add("is-copied"),clearTimeout(s.timer),s.timer=setTimeout(function(){s.textContent="",v.classList.remove("is-copied")},1600)}function m(){b(h);var i=!1;try{i=document.execCommand("copy")}catch{}p(i?"Copied":"Selected")}navigator.clipboard&&navigator.clipboard.writeText?(p("Copied"),navigator.clipboard.writeText(h.getAttribute("data-code")||h.textContent).catch(m)):m()})})(),(function(){document.querySelectorAll("[data-chart-scroll]").forEach(function(l){l.scrollLeft=l.scrollWidth});function b(l,n,h){n.forEach(function(i,d){i.classList.toggle("is-focused",d===h)});var v=l.querySelector("[data-chart-scroll]"),s=n[h];if(!(!v||!s)){var p=v.getBoundingClientRect(),m=s.getBoundingClientRect();m.left<p.left?v.scrollLeft-=p.left-m.left:m.right>p.right&&(v.scrollLeft+=m.right-p.right)}}function f(l){return Array.prototype.slice.call(l.querySelectorAll(".chart-hit"))}document.addEventListener("focusin",function(l){var n=l.target instanceof Element&&l.target.matches("[data-chart-points]")?l.target:null;if(n){var h=f(n);h.length&&!n.querySelector(".chart-hit.is-focused")&&b(n,h,h.length-1)}}),document.addEventListener("keydown",function(l){var n=l.target instanceof Element&&l.target.matches("[data-chart-points]")?l.target:null;if(n){var h=f(n),v=h.indexOf(n.querySelector(".chart-hit.is-focused")),s=v;if(l.key==="ArrowRight"||l.key==="ArrowUp")s=Math.min(h.length-1,v+1);else if(l.key==="ArrowLeft"||l.key==="ArrowDown")s=Math.max(0,v-1);else if(l.key==="Home")s=0;else if(l.key==="End")s=h.length-1;else return;l.preventDefault(),b(n,h,s)}})})(),(function(){var b=12;function f(l){var n=getComputedStyle(l),h=parseFloat(n.lineHeight)||24,v=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);l.style.height="auto",l.classList.remove("is-scrolling");var s=h*(Number(l.getAttribute("rows"))||2)+v,p=h*b+v;l.classList.toggle("is-scrolling",l.scrollHeight>p+1),l.style.height=Math.max(s,Math.min(l.scrollHeight,p))+"px";var m=Number(l.getAttribute("maxlength")),i=document.getElementById(l.id+"-count");!m||!i||(i.hidden=l.value.length<m*.8,i.textContent=l.value.length.toLocaleString("en-US")+" of "+m.toLocaleString("en-US"))}document.querySelectorAll("textarea[data-long-field]").forEach(f),document.addEventListener("input",function(l){l.target.matches&&l.target.matches("textarea[data-long-field]")&&f(l.target)}),document.fonts&&document.fonts.ready&&document.fonts.ready.then(function(){document.querySelectorAll("textarea[data-long-field]").forEach(f)})})(),(function(){function b(f){var l=f.closest(".slider"),n=Number(f.min),h=Number(f.max),v=l.querySelector("output"),s=v.getAttribute("data-unit");l.style.setProperty("--fill",((Number(f.value)-n)/Math.max(1e-9,h-n)).toFixed(4));var p=l.querySelector(".slider-thumb");p&&p.redrawCut&&p.redrawCut(),v.textContent=Number(f.value).toLocaleString("en-US")+(s==="%"?"%":" "+s)}document.addEventListener("input",function(f){f.target.matches&&f.target.matches("input[data-slider]")&&b(f.target)}),window.addEventListener("pageshow",function(){document.querySelectorAll("input[data-slider]").forEach(b)})})(),(function(){window.zaismaPlace=function(b,f,l){var n=l.roomRect||{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight},h=l.gapPx,v=l.edgePx,s=(b.left+b.right)/2>(n.left+n.right)/2,p=Math.max(n.left+v,Math.min(s?b.right-f.width:b.left,n.right-v-f.width)),m=n.bottom-v-b.bottom-h,i=b.top-h-v-n.top,d=f.height<=m,c=f.height<=i,e=(b.top+b.bottom)/2>(n.top+n.bottom)/2,o=!l.isAlwaysBelow&&(d&&c?e:!d&&i>m),r=o?b.top-h-f.height:b.bottom+h;return{leftPx:p,topPx:Math.max(n.top+v,Math.min(r,n.bottom-v-f.height)),isAtEnd:s,isAbove:o}}})(),(function(){var b=6,f=8,l=12,n=new WeakMap;window.zaismaWatch.each("[data-select]",function(h){var v=h.querySelector(".select-button"),s=h.querySelector(".select-list"),p=s.querySelector('[role="listbox"]'),m=h.querySelector('input[type="hidden"]'),i=v.closest(".field"),d=h.querySelector(".select-value");function c(){s.style.maxHeight="";var q=p.scrollHeight-p.clientHeight;q>0&&q<l&&(s.style.maxHeight=Math.floor(s.getBoundingClientRect().height-(l-q))+"px")}if(document.fonts?document.fonts.ready.then(c):c(),window.zaismaWatch.resize(c),!s.hasAttribute("popover"))return;document.querySelectorAll("body > .select-list").forEach(function(q){var T=n.get(q);T&&!T.isConnected&&q.remove()}),h.closest(".smoke")&&s.classList.add("smoke"),n.set(s,h),document.body.appendChild(s);var e=Array.prototype.slice.call(p.querySelectorAll('[role="option"]')),o=-1,r="",E=0;function y(){return e.findIndex(function(q){return q.getAttribute("aria-selected")==="true"})}function x(q){o=Math.max(0,Math.min(e.length-1,q)),e.forEach(function(k,B){k.classList.toggle("is-active",B===o)}),p.setAttribute("aria-activedescendant",e[o].id);var T=e[o],j=T.offsetTop;j<p.scrollTop?p.scrollTop=j:j+T.offsetHeight>p.scrollTop+p.clientHeight&&(p.scrollTop=j+T.offsetHeight-p.clientHeight)}function A(){var q=i.getBoundingClientRect();if(!i.isConnected||q.bottom<0||q.top>window.innerHeight||q.right<0||q.left>document.documentElement.clientWidth){s.hidePopover();return}s.style.width=q.width+"px";var T=window.zaismaPlace(q,{width:q.width,height:s.offsetHeight},{gapPx:b,edgePx:f});s.style.left=Math.round(T.leftPx)+"px",s.style.top=Math.round(T.topPx)+"px",s.classList.toggle("is-above",T.isAbove)}function P(q){e.forEach(function(T,j){T.setAttribute("aria-selected",String(j===q))}),d.textContent=e[q].textContent,d.classList.remove("is-placeholder"),(m.value!==e[q].getAttribute("data-choice-value")||!O)&&(m.value=e[q].getAttribute("data-choice-value"),m.dispatchEvent(new Event("change",{bubbles:!0}))),O=!0,s.hidePopover(),v.focus()}var O=y()>=0;s.addEventListener("toggle",function(q){var T=q.newState==="open";if(v.setAttribute("aria-expanded",String(T)),i.classList.toggle("is-open",T),T&&!h.isConnected){s.hidePopover(),s.remove();return}if(T){var j=h.closest("[data-theme-choice]");j&&j!==document.documentElement?s.setAttribute("data-theme-choice",j.getAttribute("data-theme-choice")):s.removeAttribute("data-theme-choice"),s.style.setProperty("--glass-hue",getComputedStyle(h).getPropertyValue("--glass-hue")),c(),A(),x(Math.max(0,y())),p.focus({preventScroll:!0})}}),window.zaismaWatch.resize(function(){s.matches(":popover-open")&&A()}),window.zaismaWatch.scroll(function(){s.matches(":popover-open")&&A()}),v.addEventListener("keydown",function(q){(q.key==="ArrowDown"||q.key==="ArrowUp")&&(q.preventDefault(),v.disabled||s.showPopover())}),p.addEventListener("click",function(q){var T=q.target.closest('[role="option"]');T&&P(e.indexOf(T))}),p.addEventListener("pointermove",function(q){var T=q.target.closest('[role="option"]');T&&e.indexOf(T)!==o&&x(e.indexOf(T))}),p.addEventListener("keydown",function(q){var T=q.key,j={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[T];if(j){x(o+j),q.preventDefault();return}if(T==="Home"||T==="End"){x(T==="Home"?0:e.length-1),q.preventDefault();return}if(T==="Enter"||T===" "){P(o),q.preventDefault();return}if(T==="Tab"){s.hidePopover();return}if(!(T.length!==1||q.metaKey||q.ctrlKey)){var k=Date.now();r=k-E>900?T.toLowerCase():r+T.toLowerCase(),E=k;var B=e.findIndex(function($){return $.textContent.toLowerCase().indexOf(r)===0});B>=0&&x(B)}})})})(),(function(){var b=getComputedStyle(document.documentElement);function f(d,c){return parseFloat(b.getPropertyValue(d))||c}function l(d){for(var c=d.parentElement;c&&c!==document.documentElement;c=c.parentElement){var e=getComputedStyle(c);if(e.transform!=="none"||e.filter!=="none"||(e.backdropFilter||"none")!=="none"||(e.containerType||"normal")!=="normal"||/transform|filter/.test(e.willChange||"")||/paint|layout|strict|content/.test(e.contain||""))return c.getBoundingClientRect()}return{left:0,top:0}}function n(d){return document.querySelector('[aria-controls="'+d.id+'"][aria-expanded]')}function h(d){return Array.prototype.slice.call(d.querySelectorAll('[role="menuitem"]')).filter(function(c){return!c.closest("[hidden]")})}function v(d){var c=n(d);if(!(!c||d.classList.contains("shut"))){var e=f("--gap-control-stack",8),o=f("--pad-frame",10),r=l(d),E=c.getBoundingClientRect(),y=c.closest(".top"),x=y?y.getBoundingClientRect().bottom:E.bottom,A=r.width?r.left:0,P=r.width?r.right:document.documentElement.clientWidth,O=r.height?r.top:0,q=r.height?r.bottom:window.innerHeight,T=y?{left:E.left,right:E.right,top:x-1,bottom:x}:E,j={left:A,right:P,top:O,bottom:q};d.style.removeProperty("--menu-room"),d.style.setProperty("--menu-room-width",Math.max(0,P-A-2*o)+"px");var k=window.zaismaPlace(T,{width:d.offsetWidth,height:d.offsetHeight},{roomRect:j,gapPx:e,edgePx:o,isAlwaysBelow:!!y});d.style.setProperty("--menu-room",Math.max(0,k.isAbove?T.top-e-O-o:q-T.bottom-e-o)+"px"),k=window.zaismaPlace(T,{width:d.offsetWidth,height:d.offsetHeight},{roomRect:j,gapPx:e,edgePx:o,isAlwaysBelow:!!y}),d.classList.toggle("from-start",!k.isAtEnd),d.classList.toggle("is-above",k.isAbove),d.style.top=k.topPx-r.top+"px",d.style.left=k.leftPx-r.left+"px"}}function s(d,c,e){var o=n(d);o&&o.setAttribute("aria-expanded",String(c)),d.classList.toggle("shut",!c),d.setAttribute("aria-hidden",String(!c)),c&&(v(d),e&&h(d)[0]&&h(d)[0].focus({preventScroll:!0}))}var p=[];function m(){return p=p.filter(function(d){return d.isConnected}),p}window.zaismaWatch.each('.dropdown[role="menu"]',function(d){p.push(d),d.classList.contains("shut")||requestAnimationFrame(function(){v(d)}),d.addEventListener("keydown",function(c){var e=h(d),o=e.indexOf(document.activeElement);if((c.key==="ArrowDown"||c.key==="ArrowUp")&&(c.preventDefault(),e[(o+(c.key==="ArrowDown"?1:e.length-1))%e.length].focus()),(c.key==="Home"||c.key==="End")&&(c.preventDefault(),e[c.key==="Home"?0:e.length-1].focus()),(c.key==="Escape"||c.key==="Tab")&&(s(d,!1),c.key==="Escape")){var r=n(d);r&&r.focus()}}),d.addEventListener("click",function(c){c.target.closest('[role="menuitem"]')&&s(d,!1)})}),document.addEventListener("click",function(d){var c=d.target.closest&&d.target.closest("[aria-controls][aria-expanded]"),e=c&&document.getElementById(c.getAttribute("aria-controls"));!e||!e.matches('.dropdown[role="menu"]')||s(e,c.getAttribute("aria-expanded")!=="true",d.detail===0)}),document.addEventListener("pointerdown",function(d){m().forEach(function(c){var e=n(c);!c.classList.contains("shut")&&!c.contains(d.target)&&!(e&&e.contains(d.target))&&s(c,!1)})});function i(){m().forEach(v)}window.zaismaWatch.resize(i),window.zaismaWatch.scroll(i)})(),(function(){var b=HTMLDialogElement.prototype.close;function f(r){return r.open&&r.matches(".sheet:not(.in-place)")}function l(r,E){if(r.classList.contains("is-leaving"))return;r.classList.add("is-leaving");var y=setTimeout(A,400);function x(P){P.target===r&&P.propertyName==="opacity"&&A()}function A(){clearTimeout(y),r.removeEventListener("transitionend",x),r.classList.contains("is-leaving")&&(r.classList.remove("is-leaving"),b.apply(r,E))}r.addEventListener("transitionend",x)}var n=window.matchMedia("(min-width: 761px)"),h=new Map,v=8,s=16,p=null,m=HTMLDialogElement.prototype.showModal;document.addEventListener("click",function(r){var E=r.target.closest&&r.target.closest("button, a, [role='button']");p=E?{button:E,at:performance.now()}:null},!0),HTMLDialogElement.prototype.showModal=function(){var r=this.open;m.apply(this,arguments),!r&&this.matches(".sheet")&&(d(this),c(this),i(this))};function i(r){window.zaismaInput&&window.zaismaInput.isKeyboard()||(r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))}function d(r){var E=p&&performance.now()-p.at<2e3&&p.button.isConnected?p.button:null;!E||r.matches(".in-place, .placement-side, .placement-middle, .is-picture")||E.closest("[popover]")||r.contains(E)||(h.set(r,{opener:E,rect:E.getBoundingClientRect()}),r.classList.add("is-anchored"),o&&o.observe(r))}function c(r){var E=h.get(r);if(!(!E||!r.open||!n.matches)){var y=E.opener.isConnected?E.opener.getBoundingClientRect():E.rect;y.width||y.height?E.rect=y:y=E.rect;var x=document.documentElement.clientWidth,A=window.innerHeight;if(y.bottom<0||y.top>A||y.right<0||y.left>x){r.close();return}r.style.setProperty("--sheet-max-height",A-2*s+"px");var P=window.zaismaPlace(y,{width:r.offsetWidth,height:r.offsetHeight},{roomRect:{left:0,top:0,right:x,bottom:A},gapPx:v,edgePx:s});r.style.setProperty("--sheet-left",Math.round(P.leftPx)+"px"),r.style.setProperty("--sheet-top",Math.round(P.topPx)+"px"),r.classList.toggle("is-above",P.isAbove),r.classList.toggle("is-at-end",P.isAtEnd)}}function e(){h.forEach(function(r,E){c(E)})}var o=window.ResizeObserver?new ResizeObserver(function(r){r.forEach(function(E){h.has(E.target)&&c(E.target)})}):null;window.addEventListener("resize",e),window.addEventListener("scroll",e,{passive:!0,capture:!0}),document.addEventListener("close",function(r){var E=r.target;h.has(E)&&(h.delete(E),o&&o.unobserve(E),E.classList.remove("is-anchored","is-above","is-at-end"),E.style.removeProperty("--sheet-left"),E.style.removeProperty("--sheet-top"),E.style.removeProperty("--sheet-max-height"))},!0),HTMLDialogElement.prototype.close=function(){f(this)?l(this,arguments):b.apply(this,arguments)},document.addEventListener("cancel",function(r){r.target.matches&&f(r.target)&&(r.preventDefault(),l(r.target,[]))},!0),document.addEventListener("submit",function(r){var E=r.submitter&&r.submitter.getAttribute("formmethod")||r.target.getAttribute("method"),y=r.target.closest("dialog");!E||E.toLowerCase()!=="dialog"||!y||!f(y)||(r.preventDefault(),l(y,r.submitter&&r.submitter.hasAttribute("value")?[r.submitter.value]:[]))}),document.addEventListener("click",function(r){var E=r.target.closest&&r.target.closest("[aria-controls]:not([aria-expanded])"),y=E&&document.getElementById(E.getAttribute("aria-controls"));if(y&&y.matches("dialog.sheet")){r.preventDefault(),y.classList.remove("is-leaving"),y.open||y.showModal();return}var x=r.target.matches&&r.target.matches("dialog.sheet[open]")?r.target:null;if(!(!x||!r.detail)){var A=x.getBoundingClientRect();(r.clientX<A.left||r.clientX>A.right||r.clientY<A.top||r.clientY>A.bottom)&&x.close()}})})(),(function(){function b(f){var l=f.querySelector(".run-wrap"),n=f.querySelector(":scope > .pane-in > .layout-stack")||f.querySelector(":scope > .pane-in"),h=l&&n&&Array.prototype.find.call(n.children,function(s){return s.contains(l)});if(h){var v=parseFloat(getComputedStyle(f).marginTop)||0;f.style.setProperty("--started-low-used",Math.round(h.getBoundingClientRect().bottom+window.scrollY-v)+"px")}}window.zaismaWatch.each(".glass-pane.is-started-low",function(f){b(f),window.zaismaWatch.size(f,function(){b(f)})})})(),(function(){var b=4e3,f=8e3,l=300,n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--gap-control-stack"))||8;function h(){var i=0;document.querySelectorAll("[data-notice]:not(.in-place)").forEach(function(d){d.style.setProperty("--notice-shift",i+"px"),d.classList.contains("is-leaving")||(i+=d.offsetHeight+n)})}function v(i){i.classList.contains("is-leaving")||(i.classList.add("is-leaving"),i.classList.contains("in-place")?setTimeout(function(){i.classList.remove("is-leaving")},1600):setTimeout(function(){i.remove(),h()},l))}function s(i){clearTimeout(i.noticeTimer),i.noticeTimer=setTimeout(function(){v(i)},i.hasAttribute("data-notice-undo")?f:b)}function p(i){i.noticeArrived||i.classList.contains("in-place")||(i.noticeArrived=!0,h(),i.getAttribute("data-notice")==="done"&&(s(i),i.addEventListener("pointerenter",function(){clearTimeout(i.noticeTimer)}),i.addEventListener("pointerleave",function(){s(i)})))}function m(i){i.querySelectorAll&&(i.matches("[data-notice]")&&p(i),i.querySelectorAll("[data-notice]").forEach(p))}m(document.body),window.zaismaWatch.page(function(i){i.forEach(function(d){d.addedNodes.forEach(m)})}),document.addEventListener("click",function(i){var d=i.target.closest&&i.target.closest("[data-notice] > .cut-btn");d&&v(d.closest("[data-notice]"))})})(),(function(){var b=450;window.zaismaWatch.each("form[data-steps]",function(f){var l=Array.prototype.slice.call(f.querySelectorAll(":scope > .step-body")),n=Array.prototype.slice.call(f.closest(".pane-in").querySelectorAll(".step-line > li")),h=f.querySelector(":scope > .layout-row"),v=h.querySelector(".cut-btn"),s=h.querySelector(".run-wrap"),p=s.querySelector(".run-words:not(.label-busy)"),m=Number(f.getAttribute("data-steps"))||0,i=l.length-1,d="Next",c=f.getAttribute("data-finish-label"),e=0;function o(E){n.forEach(function(y,x){y.classList.remove("is-leaving","is-waiting"),y.classList.toggle("is-done",x<E),y.classList.toggle("is-current",x===E),x===E?y.setAttribute("aria-current","step"):y.removeAttribute("aria-current")})}function r(E){var y=m;m=Math.max(0,Math.min(i,E)),l.forEach(function(A,P){A.hidden=P!==m}),clearTimeout(e),m<y&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?(n.forEach(function(A,P){P>m&&(A.classList.contains("is-current")||A.classList.contains("is-done"))&&(A.classList.remove("is-current","is-done"),A.classList.add("is-leaving")),A.removeAttribute("aria-current")}),n[m].classList.remove("is-done"),n[m].classList.add("is-current","is-waiting"),n[m].setAttribute("aria-current","step"),e=setTimeout(function(){o(m)},b)):o(m),v.hidden=m===0,p&&(p.textContent=m===i?c:d);var x=l[m].querySelector("input, select, textarea, button");x&&document.activeElement&&f.contains(document.activeElement)&&x.focus({preventScroll:!0})}f.goToStep=r,v.addEventListener("click",function(){r(m-1)}),f.addEventListener("submit",function(E){if(m!==i){E.preventDefault();for(var y=l[m].querySelectorAll("input, select, textarea"),x=0;x<y.length;x++)if(!y[x].checkValidity()){y[x].reportValidity();return}r(m+1)}})})})(),(function(){var b={passkey:"Use your passkey instead",purchase_pin:"Use your purchase PIN instead",password:"Use your password instead"},f=6,l={purchase_pin:"Enter all "+f+" digits of your purchase PIN.",password:"Enter your password."},n=new WeakMap;function h(c,e){return document.getElementById(c+"-"+e)}function v(c,e){var o=document.getElementById(c).dataset.method==="purchase_pin",r=h(c,"problem");r.hidden=o||!e,r.querySelector("p").textContent=o?"":e||"",window.zaismaPinField.setError(h(c,"pin-field"),o?e:"")}function s(c,e,o){var r=o.method;h(e,"reason").querySelector("p").textContent=o.options.reason||"",h(e,"pin").hidden=r!=="purchase_pin",h(e,"password").hidden=r!=="password";var E=o.methods.filter(function(x){return x!==r})[0]||null;h(e,"switch").hidden=!E,E&&(h(e,"switch").querySelector(".text-label").textContent=b[E]);var y=h(e,"go");y.querySelector(".label-idle").textContent=r==="passkey"?"Use your passkey":"Confirm",o.isBusy?y.setAttribute("aria-busy","true"):y.removeAttribute("aria-busy"),y.hidden=r==="purchase_pin",y.disabled=o.isBusy,window.zaismaPinField.setDisabled(h(e,"pin-field"),o.isBusy&&r==="purchase_pin"),h(e,"cancel").disabled=o.isBusy,c.dataset.method=r}function p(c){window.zaismaPinField.clear(h(c,"pin-field")),h(c,"password-field").value=""}function m(c,e){e.method==="purchase_pin"?window.zaismaPinField.focus(h(c,"pin-field")):e.method==="password"&&h(c,"password-field").focus({preventScroll:!0})}async function i(c,e,o){if(!(o.isBusy||n.get(c)!==o)){var r=o.method,E;if(v(e,""),r==="passkey"){o.isBusy=!0,s(c,e,o);var y=await window.zaismaPasskeyTap(o.options.passkeyPurpose);if(y.error)return o.isBusy=!1,s(c,e,o),v(e,y.error);E={method:"passkey",passkey_tap:y.tap}}else{var x=r==="purchase_pin"?window.zaismaPinField.digits(h(e,"pin-field")):h(e,"password-field").value;if(!x||r==="purchase_pin"&&x.length<f)return v(e,l[r]);E=r==="purchase_pin"?{method:r,purchase_pin:x}:{method:r,password:x},o.isBusy=!0,s(c,e,o)}var A;try{A=await o.options.send(E)}catch{A={ok:!1,message:"Zaisma didn't answer. Check your connection and try again."}}if(o.isBusy=!1,A&&A.ok){o.isDone=!0,p(e),s(c,e,o),c.close(),o.options.onConfirmed();return}var P=A&&A.removed_methods||[];o.methods=o.methods.filter(function(O){return P.indexOf(O)===-1}),o.methods.indexOf(o.method)===-1&&(o.method=o.methods[0]||o.method),p(e),s(c,e,o),v(e,A&&A.message||"That didn't work. Try again."),m(e,o)}}function d(c,e){var o=function(){return n.get(c)};h(e,"go").addEventListener("click",function(){var r=o();r&&i(c,e,r)}),h(e,"switch").querySelector("button").addEventListener("click",function(){var r=o();!r||r.isBusy||(r.method=r.methods.filter(function(E){return E!==r.method})[0]||r.method,p(e),v(e,""),s(c,e,r),m(e,r))}),c.addEventListener("zaisma:pin-complete",function(){var r=o();r&&r.method==="purchase_pin"&&i(c,e,r)}),c.addEventListener("keydown",function(r){if(!(r.key!=="Enter"||!(r.target instanceof HTMLInputElement))){r.preventDefault();var E=o();E&&i(c,e,E)}}),c.addEventListener("cancel",function(r){var E=o();E&&E.isBusy&&r.preventDefault()}),c.addEventListener("close",function(){var r=o();n.delete(c),p(e),r&&!r.isDone&&r.options.onCancelled&&r.options.onCancelled()})}window.zaismaConfirmItsYou=function(c,e){var o=document.getElementById(c);if(!o)return!1;if(o.open)return!0;var r=e.methods.filter(function(x){return x!=="passkey"||window.PublicKeyCredential&&window.zaismaPasskeyTap});if(!r.length)return!1;var E={options:e,methods:r,method:r[0],isBusy:!1,isDone:!1};o.dataset.confirmWired||(o.dataset.confirmWired="1",d(o,c)),n.set(o,E),p(c),v(c,""),s(o,c,E),o.classList.remove("is-leaving");var y=!navigator.userActivation||navigator.userActivation.isActive;return o.showModal(),E.method==="passkey"&&y?i(o,c,E):m(c,E),!0}})(),(function(){var b=new Set,f=!1;function l(s){b.add(s),!f&&(f=!0,requestAnimationFrame(function(){f=!1;var p=Array.from(b);b.clear();var m=p.map(function(d){return d.place()});p.forEach(function(d,c){d.putPlace(m[c])});var i=p.map(function(d,c){return d.measure(m[c])});p.forEach(function(d,c){d.put(m[c],i[c])})}))}function n(s,p){var m=s.map(function(i){var d=i.tagName==="TEXTAREA"||i.tagName==="SELECT"&&(i.multiple||i.size>1);if(/^(SELECT|INPUT)$/.test(i.tagName)&&!d||i.nextElementSibling&&i.nextElementSibling.hasAttribute("data-rail")||getComputedStyle(i).scrollbarWidth==="none"||i.classList.contains("rail-thumb"))return null;var c=i.parentElement;return!c||c===document.body?null:{box:i,isControl:d,isParentStatic:getComputedStyle(c).position==="static"}});m.forEach(function(i){i&&(i.isParentStatic&&(i.box.parentElement.style.position="relative"),i.box.insertAdjacentHTML("afterend",'<div class="rail"'+(i.isControl?" data-rail-follows":"")+' data-rail="box" aria-hidden="true"><div class="rail-line"></div><div class="rail-thumb glass"></div></div>'))}),p.querySelectorAll("[data-side-rail]").forEach(function(i){i.nextElementSibling&&i.nextElementSibling.hasAttribute("data-rail")||i.insertAdjacentHTML("afterend",'<div class="rail sideways" data-rail="side" data-cut-line="0" aria-hidden="true"><div class="rail-line"></div><div class="rail-thumb glass"></div></div>')})}var h=new WeakSet;function v(){document.querySelectorAll("[data-rail]").forEach(function(s){if(h.has(s))return;h.add(s);var p=s.getAttribute("data-rail")==="page",m=s.getAttribute("data-rail")==="side",i=p?null:s.previousElementSibling;if(!p&&!i)return;var d=s.querySelector(".rail-line"),c=s.querySelector(".rail-thumb");p?document.documentElement.classList.add("own-scroll"):i.classList.add("own-scroll");var e=!0;s.classList.add("is-on");var o=function(){return parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||90},r=p?Array.prototype.filter.call(document.querySelectorAll("[data-rail-mark]"),function(W){return!W.closest("[data-rail-marks-own]")}):Array.prototype.filter.call(i.querySelectorAll("[data-rail-mark]"),function(W){var _=W.parentElement.closest("[data-side-rail], [data-rail-marks-own]");return!_||_===i||!i.contains(_)});!p&&r.length&&i.setAttribute("data-rail-marks-own","");function E(W,_){if(p)return W.getBoundingClientRect().top+window.scrollY-(_===void 0?o():_);var C=i.getBoundingClientRect(),I=W.getBoundingClientRect();return m?I.left-C.left+i.scrollLeft:I.top-C.top+i.scrollTop}var y=r.map(function(W){var _=document.createElement("button"),C=document.createElement("span");return _.type="button",_.className="rail-mark",_.tabIndex=-1,C.className="tag glass",C.textContent=W.getAttribute("data-rail-mark"),_.appendChild(C),s.appendChild(_),_.addEventListener("click",function(){var I=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth";p?window.scrollTo({top:E(W),behavior:I}):i.scrollTo(m?{left:E(W),behavior:I}:{top:E(W),behavior:I})}),{part:W,mark:_,name:C}}),x=4;function A(W){if(m){y.forEach(function(R){if(!R.mark.hidden){var tt=parseFloat(R.mark.style.left)||0,dt=R.size/2,Lt=Math.max(dt,Math.min(W-dt,tt));R.name.style.setProperty("--label-shift",(Lt-tt).toFixed(1)+"px")}});return}var _=y.filter(function(R){return!R.mark.hidden}).map(function(R){return{m:R,at:parseFloat(R.mark.style[m?"left":"top"])||0,size:R.size}}).sort(function(R,tt){return R.at-tt.at});_.forEach(function(R,tt){R.center=tt?Math.max(R.at,_[tt-1].center+(_[tt-1].size+R.size)/2+x):R.at});for(var C=_.length-1;C>=0;C--){var I=_[C],J=C===_.length-1?Math.max(I.at,W-I.size/2):_[C+1].center-(_[C+1].size+I.size)/2-x;I.center>J&&(I.center=J)}_.forEach(function(R,tt){var dt=tt?_[tt-1].center+(_[tt-1].size+R.size)/2+x:Math.min(R.at,R.size/2);R.center<dt&&(R.center=dt)}),_.forEach(function(R){R.m.name.style.setProperty("--label-shift",(R.center-R.at).toFixed(1)+"px")})}function P(){return p?window.scrollY:m?i.scrollLeft:i.scrollTop}function O(W){p?window.scrollTo(0,W):m?i.scrollLeft=W:i.scrollTop=W}function q(W){return m?W.clientX:W.clientY}var T={track:0,thumb:0,max:1},j=p?document.querySelector("[data-rail-starts-below]"):null,k=10,B={place:function(){var W={whole:p?document.documentElement.scrollHeight:m?i.scrollWidth:i.scrollHeight,view:p?window.innerHeight:m?i.clientWidth:i.clientHeight};return W.max=W.whole-W.view,j&&(W.top=Math.round(j.getBoundingClientRect().bottom+k)+"px"),s.hasAttribute("data-rail-follows")&&(W.follows={top:i.offsetTop+8+"px",height:Math.max(0,i.offsetHeight-16)+"px",left:i.offsetLeft+i.offsetWidth-22+"px"}),W},putPlace:function(W){W.top&&(s.style.top=W.top),W.follows&&(s.style.top=W.follows.top,s.style.bottom="auto",s.style.height=W.follows.height,s.style.right="auto",s.style.left=W.follows.left),e!==W.max>4&&(e=W.max>4,s.classList.toggle("is-on",e)),p||i.classList.toggle("shows-rail",e)},measure:function(){if(!e)return null;var W=p&&y.length?o():0;return{track:m?s.clientWidth:s.clientHeight,at:P(),marks:y.map(function(_){var C=!!_.part.offsetParent;return C?{shown:!0,spot:E(_.part,W),size:m?_.name.offsetWidth:_.name.offsetHeight}:{shown:!1}})}},put:function(W,_){if(_){var C=_.track,I=W.max,J=Math.max(36,Math.round(C*W.view/W.whole));T={track:C,thumb:J,max:I},c.style[m?"width":"height"]=J+"px",ft(_.at),y.forEach(function(R,tt){var dt=_.marks[tt];if(R.mark.hidden=!dt.shown,!!dt.shown){var Lt=Math.max(0,Math.min(I,dt.spot));R.mark.style[m?"left":"top"]=((C-J)*Lt/I+J/2).toFixed(1)+"px",R.size=dt.size||(m?R.name.offsetWidth:R.name.offsetHeight)}}),A(C)}}},$=!1;function ot(){if(H){$=!0;return}l(B)}function ft(W){e&&(c.style.transform=(m?"translateX(":"translateY(")+((T.track-T.thumb)*Math.min(1,(W===void 0?P():W)/T.max)).toFixed(1)+"px)")}var et=0,st=!1;function mt(){s.classList.contains("awake")||s.classList.add("awake"),clearTimeout(et),et=setTimeout(function(){s.classList.remove("awake")},1100)}(p?window:i).addEventListener("scroll",function(){mt(),!st&&(st=!0,requestAnimationFrame(function(){st=!1,ft()}))},{passive:!0}),window.zaismaWatch.resize(ot),window.zaismaWatch.size(p?document.body:i.firstElementChild||i,ot),j&&window.zaismaWatch.size(j,ot),p||window.zaismaWatch.page(function(W){W.some(function(_){return i.contains(_.target)})&&ot()});var H=null,V=6,ct=8;function at(W){var _=q(W);if(!H.isTouch||!p)return _;var C=_+window.scrollY,I=_,J=1/0;return H.scrolls.forEach(function(R){var tt=C-R,dt=Math.abs(tt-H.last);dt<J&&(J=dt,I=tt)}),I}function it(W,_){W.preventDefault();var C=P();if(_){var I=q(W)-(m?s.getBoundingClientRect().left:s.getBoundingClientRect().top)-T.thumb/2;O(Math.max(0,Math.min(1,I/(T.track-T.thumb)))*T.max)}H={y:q(W),last:q(W),from:P(),scrolls:[C,P()],isMoving:W.pointerType==="mouse",isTouch:W.pointerType!=="mouse"},s.classList.add("dragging");try{s.setPointerCapture(W.pointerId)}catch{}}c.addEventListener("pointerdown",function(W){it(W,!1)}),d.addEventListener("pointerdown",function(W){it(W,!0)}),s.addEventListener("pointermove",function(W){if(H){var _=at(W);if(H.last=_,!H.isMoving){if(Math.abs(_-H.y)<V)return;H.isMoving=!0,H.y=_,H.from=P()}var C=Math.max(0,Math.min(T.max,H.from+(_-H.y)*T.max/Math.max(1,T.track-T.thumb)));Math.abs(C-P())<1||(O(C),H.scrolls.push(P()),H.scrolls.length>ct&&H.scrolls.shift())}});function ut(){H=null,s.classList.remove("dragging"),$&&($=!1,ot())}function pt(W){if(!(!m||!y.length)){var _=H?(T.track-T.thumb)*Math.min(1,P()/T.max)+T.thumb/2:W.clientX-s.getBoundingClientRect().left,C=null,I=1/0;y.forEach(function(J){if(!J.mark.hidden){var R=Math.abs(parseFloat(J.mark.style.left)-_);R<I&&(I=R,C=J)}}),y.forEach(function(J){J.mark.classList.toggle("is-near",J===C)})}}function gt(){y.forEach(function(W){W.mark.classList.remove("is-near")})}s.addEventListener("pointermove",pt),s.addEventListener("pointerdown",pt),s.addEventListener("pointerleave",function(){H||gt()});var At=18;function bt(W){var _=!!(H&&H.isMoving);if(ut(),W.pointerType!=="mouse"&&gt(),!(!_||W.pointerType==="mouse"||!y.length)){var C=(T.track-T.thumb)*Math.min(1,P()/T.max)+T.thumb/2,I=null,J=At;y.forEach(function(R){if(!R.mark.hidden){var tt=Math.abs(parseFloat(R.mark.style[m?"left":"top"])-C);tt<=J&&(J=tt,I=R)}}),I&&I.mark.click()}}s.addEventListener("pointerup",bt),s.addEventListener("pointercancel",ut),ot(),mt()})}n(window.zaismaWatch.scrollBoxes(),document),v(),window.zaismaWatch.page(function(s){var p=[],m=!1;s.forEach(function(i){Array.prototype.forEach.call(i.addedNodes||[],function(d){d.nodeType!==1||!d.isConnected||d.closest(".rail, svg, .edge, .cut-line")||(window.zaismaWatch.scrollBoxesIn(d).forEach(function(c){p.indexOf(c)<0&&p.push(c)}),(d.matches("[data-side-rail]")||d.querySelector("[data-side-rail]"))&&(m=!0))})}),!(!p.length&&!m)&&(n(p,document),v())})})(),(function(){var b=window.matchMedia("(prefers-reduced-motion: reduce)").matches;document.querySelectorAll("[data-row-arrows]").forEach(function(f){var l=f.querySelectorAll(".cut-btn"),n=l[0],h=l[1],v=document.getElementById(n.getAttribute("aria-controls"));if(!v)return;var s=f.getAttribute("data-scrolled-to");function p(){var i=v.scrollWidth-v.clientWidth;s&&i>2&&(v.scrollLeft=s==="end"?i:i/2,s=null);var d=v.scrollLeft>2,c=v.scrollLeft<i-2;n.disabled=!d,h.disabled=!c,f.hidden=i<=2}function m(i){v.scrollBy({left:i*v.clientWidth*.8,behavior:b?"auto":"smooth"})}n.addEventListener("click",function(){m(-1)}),h.addEventListener("click",function(){m(1)}),v.addEventListener("scroll",p,{passive:!0}),window.zaismaWatch.size(v,p),p()})})(),(function(){if(!window.zaismaWatch)return;function b(n){var h=Array.prototype.slice.call(n.children);n.classList.add("is-measuring");var v=0;n.classList.contains("widths-equal")&&h.forEach(function(c){c.classList.contains("fills")&&(v=Math.max(v,c.getBoundingClientRect().width))}),n.classList.remove("is-measuring");var s=v?Math.ceil(v)+"px":"";n.style.getPropertyValue("--equal-cell-width")!==s&&n.style.setProperty("--equal-cell-width",s);var p=n.classList.contains("is-wrapped");p&&n.classList.remove("is-wrapped");var m=getComputedStyle(n).direction==="rtl",i=null,d=!1;h.forEach(function(c){var e=c.getBoundingClientRect();if(!(e.width<1)){var o=m?-e.right:e.left;i!==null&&o<=i+.5&&(d=!0),i=o}}),d&&n.classList.add("is-wrapped")}window.zaismaWatch.each(".layout-row",function(n){b(n),window.zaismaWatch.size(n,function(){b(n)})}),document.fonts&&document.fonts.ready.then(function(){document.querySelectorAll(".layout-row").forEach(b)});var f=".stack-cell, .row-cell";function l(n){var h=n.children.length===1&&n.firstElementChild.hidden;n.classList.contains("holds-only-hidden")!==h&&n.classList.toggle("holds-only-hidden",h)}window.zaismaWatch.each(f,l),window.zaismaWatch.page(function(n){n.forEach(function(h){var v=h.type==="attributes"?h.target.parentElement:h.target;v&&v.matches&&v.matches(f)&&(h.type!=="attributes"||h.attributeName==="hidden")&&l(v)})})})(),(function(){var b=28,f=[],l=null;function n(e){var o=e.querySelector(":scope > table > thead");return{scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,headPx:o?o.offsetHeight:null}}function h(e,o){var r=o.scrollHeight>o.clientHeight+1,E=Math.min(b,o.scrollTop),y=Math.min(b,o.scrollHeight-o.clientHeight-o.scrollTop);e.style.setProperty("--fade-top",Math.max(0,E)+"px"),e.style.setProperty("--fade-bottom",Math.max(0,y)+"px"),o.headPx!==null&&e.style.setProperty("--fade-from",o.headPx+"px"),e.classList.toggle("is-fading",r),e.classList.toggle("is-scrollable",r)}function v(e){var o=e.map(n);e.forEach(function(r,E){h(r,o[E])})}function s(e){l=new Set,e();var o=Array.from(l);l=null,v(o)}function p(e){l?l.add(e):v([e])}function m(e){e.classList.toggle("is-scrollable",e.scrollHeight>e.clientHeight+1)}function i(){var e=Array.from(document.querySelectorAll("[data-scroll-box]")),o=e.map(function(r){return r.scrollHeight>r.clientHeight+1});e.forEach(function(r,E){r.classList.toggle("is-scrollable",o[E]),window.zaismaWatch.size(r.firstElementChild||r,function(){m(r)})}),d(window.zaismaWatch.scrollBoxes())}function d(e){var o=e.filter(function(r){return!(r.classList.contains("scroll-fades")||/^(TEXTAREA|SELECT|INPUT)$/.test(r.tagName)||r.hasAttribute("data-scroll-box")||r.hasAttribute("data-own-fade"))});f=f.filter(function(r){return r.isConnected}),o.forEach(function(r){r.classList.add("scroll-fades"),f.push(r);var E=!1;r.addEventListener("scroll",function(){E||(E=!0,requestAnimationFrame(function(){E=!1,p(r)}))},{passive:!0}),window.zaismaWatch.size(r,function(){p(r)},s)}),v(o)}i(),window.zaismaWatch.page(function(e){var o=[];e.forEach(function(r){Array.prototype.forEach.call(r.addedNodes||[],function(E){E.nodeType!==1||!E.isConnected||E.closest(".rail, svg, .edge, .cut-line")||window.zaismaWatch.scrollBoxesIn(E).forEach(function(y){o.indexOf(y)<0&&o.push(y)})})}),o.length&&d(o)}),window.zaismaWatch.resize(function(){v(f)});var c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;document.querySelectorAll("[data-fades-sideways]").forEach(function(e){function o(){return Array.prototype.filter.call(e.querySelectorAll(":scope > *, :scope > * > *"),function(k){return k.classList.contains("folded")||k.hasAttribute("aria-hidden")||k.children.length&&k.parentElement===e&&k.querySelector(":scope > a, :scope > button, :scope > .cover")?!1:k.getBoundingClientRect().width>=1&&!/^(absolute|fixed)$/.test(getComputedStyle(k).position)})}var r=null;function E(){var k=e.getBoundingClientRect(),B=1/0,$=-1/0,ot=e.scrollLeft;o().forEach(function(ft){var et=ft.getBoundingClientRect();B=Math.min(B,et.left),$=Math.max($,et.right)}),r={start:B===1/0?null:B-k.left+ot,end:$-k.left+ot,width:e.clientWidth,whole:e.scrollWidth}}function y(){r||E();var k=e.scrollLeft,B=k,$=r.whole-r.width-k;return r.start===null?{before:B,after:$}:{before:Math.max(k-r.start,B),after:Math.max(r.end-k-r.width,$)}}function x(){var k=y();return e.classList.toggle("more-left",k.before>2),e.classList.toggle("more-right",k.after>2),k}var A=e.querySelector('[aria-current="page"], [aria-pressed="true"]'),P=!1;function O(){A&&!P&&e.scrollWidth-e.clientWidth>1&&(P=!0,e.showWhole(A,!1))}function q(){r=null,O();var k=x();e.classList.toggle("is-scrollable-sideways",k.before+k.after>2)}function T(k){var B=k.getBoundingClientRect(),$=B.left-e.getBoundingClientRect().left+e.scrollLeft;return{start:$,end:$+B.width}}e.showWhole=function(k,B){var $=getComputedStyle(e),ot=e.scrollWidth-e.clientWidth,ft=e.scrollLeft,et=T(k),st=parseFloat($.scrollPaddingLeft)||0,mt=parseFloat($.getPropertyValue("--fade-sideways-px"))||st;if(!(ot<=1)){var H=function(ct){return ct<ot-1?mt:0},V=ft;if(et.start<ft+(ft>1?st:0)?V=et.start-st:et.end>ft+e.clientWidth-H(ft)&&(V=et.start-st,o().some(function(ct){var at=Math.max(0,Math.min(ot,T(ct).start-st));return at>ft&&et.end<=at+e.clientWidth-H(at)?(V=at,!0):!1})),V=Math.max(0,Math.min(ot,V)),!(Math.abs(V-ft)<1)){if(!B||c){e.scrollLeft=V;return}e.scrollTo({left:V,behavior:"smooth"}),clearTimeout(e.settleTimer),e.settleTimer=setTimeout(function(){Math.abs(e.scrollLeft-V)>1&&e.scrollTo({left:V,behavior:"smooth"})},450)}}},A&&document.fonts&&document.fonts.ready&&document.fonts.ready.then(function(){P&&e.showWhole(A,!1)});var j=!1;e.addEventListener("scroll",function(){j||(j=!0,requestAnimationFrame(function(){j=!1,x()}))},{passive:!0}),window.zaismaWatch.size(e,q),e.firstElementChild&&window.zaismaWatch.size(e.firstElementChild,q),q()})})(),(function(){var b=24;document.querySelectorAll("[data-compacts]").forEach(function(f){if(f.hasAttribute("data-stays-compact")){f.classList.add("is-compact");return}var l=f.parentElement&&f.parentElement.querySelector(":scope > [data-scroll-box]"),n=l||window;function h(){return l?l.scrollTop:window.scrollY}function v(){var s=h();s>b?f.classList.add("is-compact"):s<=0&&f.classList.remove("is-compact")}n.addEventListener("scroll",v,{passive:!0}),v()})})(),(function(){document.addEventListener("click",function(l){var n=l.target.closest&&l.target.closest("[data-load-more] > a.shell[href]");if(!(!n||l.button!==0||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey)){var h=n.parentElement,v=h.getAttribute("data-load-more").split(" "),s=document.getElementById(v[0]),p=h.querySelector(".load-more-words");s&&(l.preventDefault(),n.getAttribute("aria-busy")!=="true"&&(n.setAttribute("aria-busy","true"),fetch(n.href,{headers:{accept:"text/html"},credentials:"same-origin"}).then(function(m){if(!m.ok)throw new Error(String(m.status));return m.text()}).then(function(m){var i=new DOMParser().parseFromString(m,"text/html");if(!i.getElementById(s.id)){location.href=n.href;return}v.forEach(function(e){var o=document.getElementById(e),r=i.getElementById(e);if(!(!o||!r||!r.children.length)){Array.prototype.slice.call(r.children).forEach(function(y){o.appendChild(document.importNode(y,!0))}),o.dispatchEvent(new Event("scroll"));var E=o.closest("[hidden]");E&&(E.hidden=!1)}});var d=i.querySelector("[data-load-more]");if(d){var c=document.importNode(d,!0);h.replaceWith(c),f(c)}else h.remove()}).catch(function(){n.removeAttribute("aria-busy"),h.classList.add("is-failed"),p&&(p.textContent="That didn't load. Check your connection, then try again.",p.hidden=!1)})))}});var b="IntersectionObserver"in window?new IntersectionObserver(function(l){l.forEach(function(n){var h=n.target.querySelector("a.shell[href]");n.isIntersecting&&h&&!n.target.classList.contains("is-failed")&&h.click()})},{rootMargin:"100% 0px"}):null;function f(l){b&&l.hasAttribute("data-loads-on-scroll")&&b.observe(l)}document.querySelectorAll("[data-loads-on-scroll]").forEach(f),window.zaismaLoadMore={watch:f}})(),(function(){var b=56,f=32,l=8,n=null,h=function(){return matchMedia("(prefers-reduced-motion: reduce)").matches},v=function(d){return!d.classList.contains("in-place")&&!d.querySelector("a, button, input, select, textarea")};function s(d){d.classList.remove("is-swiping"),["--swipe-x","--swipe-y","--swipe-opacity"].forEach(function(c){d.style.removeProperty(c)})}function p(d,c,e){d.classList.remove("is-swiping"),!h()&&c==="x"&&d.style.setProperty("--swipe-x",e*d.offsetWidth+"px"),!h()&&c==="y"&&d.style.setProperty("--swipe-y",-d.offsetHeight+"px"),d.hidden=!0}var m=new WeakSet;function i(d){m.has(d)||(m.add(d),new MutationObserver(function(){d.hidden||s(d)}).observe(d,{attributes:!0,attributeFilter:["hidden"]}))}document.querySelectorAll(".playing-card").forEach(i),document.addEventListener("pointerdown",function(d){var c=d.target.closest&&d.target.closest(".playing-card");!c||c.hidden||!v(c)||d.pointerType==="mouse"&&d.button!==0||(i(c),n={card:c,id:d.pointerId,x:d.clientX,y:d.clientY,axis:"",dx:0,dy:0})}),document.addEventListener("pointermove",function(d){if(!(!n||d.pointerId!==n.id)){var c=d.clientX-n.x,e=d.clientY-n.y;if(!n.axis){if(Math.max(Math.abs(c),Math.abs(e))<l)return;if(n.axis=Math.abs(c)>=Math.abs(e)?"x":e<0?"y":"none",n.axis==="none"){n=null;return}try{n.card.setPointerCapture(d.pointerId)}catch{}h()||n.card.classList.add("is-swiping")}if(n.dx=c,n.dy=Math.min(0,e),!h()){var o=n.axis==="x"?Math.abs(n.dx)/n.card.offsetWidth:-n.dy/n.card.offsetHeight;n.card.style.setProperty(n.axis==="x"?"--swipe-x":"--swipe-y",(n.axis==="x"?n.dx:n.dy)+"px"),n.card.style.setProperty("--swipe-opacity",String(Math.max(0,1-o)))}}}),document.addEventListener("pointerup",function(d){if(!(!n||d.pointerId!==n.id)){var c=n.card,e=n.axis,o=n.dx,r=n.dy;n=null,!e||e==="x"&&Math.abs(o)>=b||e==="y"&&-r>=f?p(c,e,o<0?-1:1):s(c)}}),document.addEventListener("pointercancel",function(d){!n||d.pointerId!==n.id||(s(n.card),n=null)}),document.addEventListener("keydown",function(d){d.key==="Escape"&&document.querySelectorAll(".playing-card:not([hidden])").forEach(function(c){v(c)&&p(c,"",1)})})})();
9068
+ void main() { vec4 color = vec4(0.0); mainImage(color, gl_FragCoord.xy + zaismaViewOffset); zaismaFragColor = vec4(color.rgb, 1.0); }\`};return dt(S,b+c),t.programs[f]=S,S}function Nt(t,f,b){var S=t.gl,M=t.drawn;return(M.widthPx<f||M.heightPx<b)&&(M.widthPx=Math.max(M.widthPx,f),M.heightPx=Math.max(M.heightPx,b),S.bindTexture(S.TEXTURE_2D,M.texture),S.texImage2D(S.TEXTURE_2D,0,S.RGBA8,M.widthPx,M.heightPx,0,S.RGBA,S.UNSIGNED_BYTE,null),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,S.LINEAR),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,S.LINEAR),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.bindFramebuffer(S.FRAMEBUFFER,M.framebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,M.texture,0)),M}function Ot(t){var f=t.getAttribute("data-backdrop-shader")||u,b=tt(),S=null;if(!b)return null;function M(Z,Q,G){var j=tt(),nt=j&&Bt(j,f);if(!nt||!Lt(nt)||!Lt(j.upscale))return nt&&(nt.status==="failed"||j.upscale.status==="failed")&&(G.isLost=!0),!1;if(S=S||t.getContext("2d",{alpha:!1}),!S)return!1;var K=j.gl,vt=j.board,yt=t.width,St=t.height,zt=G.drawnWidth,Tt=G.drawnHeight,xt=nt.at;(vt.width<yt||vt.height<St)&&(vt.width=Math.max(vt.width,yt),vt.height=Math.max(vt.height,St));var ht=Nt(j,zt,Tt);K.bindFramebuffer(K.FRAMEBUFFER,ht.framebuffer),K.useProgram(nt.program),K.viewport(0,0,zt,Tt);var Et=t.classList.contains("is-framed"),wt=Et?1.8:1,Dt=zt*wt,Xt=Tt*wt;K.uniform3f(xt.iResolution,Dt,Xt,1),K.uniform1f(xt.iTime,Z),K.uniform1f(xt.iDark,Q.darkShare),K.uniform2f(xt.zaismaViewOffset,(Dt-zt)/2,(Xt-Tt)/2);var Yt=!1;if(nt.hasPass){var It=G.glass||{rects:new Float32Array(n*4),cuts:new Float32Array(n*4),count:0,scale:1,box:t.getBoundingClientRect()};K.uniform4fv(xt.iGlassPanes,It.rects),K.uniform4fv(xt.zaismaPaneCuts,It.cuts),K.uniform1i(xt.iGlassPaneCount,It.count),K.uniform1f(xt.zaismaPixel,It.scale),Yt=t.hasAttribute("data-adapts-glass")&&!G.isGlassAdapted&&It.count>0}K.drawArrays(K.TRIANGLES,0,3);var Ht=j.upscale;return K.bindFramebuffer(K.FRAMEBUFFER,null),K.useProgram(Ht.program),K.viewport(0,0,yt,St),K.activeTexture(K.TEXTURE0),K.bindTexture(K.TEXTURE_2D,ht.texture),K.uniform1i(Ht.at.zaismaDrawn,0),K.uniform2f(Ht.at.zaismaDrawnSize,zt,Tt),K.uniform2f(Ht.at.zaismaCanvasSize,yt,St),K.drawArrays(K.TRIANGLES,0,3),Yt&&(G.isGlassAdapted=!0,At(K,G,yt,St)),S.drawImage(vt,0,vt.height-St,yt,St,0,0,yt,St),t.classList.contains("is-drawn")||t.classList.add("is-drawn"),!0}return M.prepare=function(){var Z=tt();Z&&Bt(Z,f)},M}var _t=500;function Mt(t,f,b){return t.map(function(S,M){return S+(f[M]-S)*b})}function Gt(t,f){var b=e.matches||!t.from?1:Math.min(1,(f-t.fadeStartMs)/_t);if(b>=1)return t.from=null,Object.assign({},t.target,{darkShare:t.target.isDark?1:0});var S=b*b*(3-2*b),M=t.from,Z=t.target;return{base:Mt(M.base,Z.base,S),a:Mt(M.a,Z.a,S),b:Mt(M.b,Z.b,S),c:Mt(M.c,Z.c,S),isDark:S<.5?M.isDark:Z.isDark,darkShare:(M.darkShare!==void 0?M.darkShare:M.isDark?1:0)+((Z.isDark?1:0)-(M.darkShare!==void 0?M.darkShare:M.isDark?1:0))*S}}var qt=1e3,Rt="zaisma:backdrop-lag-s",Ft=performance.now(),kt=1,Wt=performance.now(),Ct=!1,Pt=Date.now()/1e3;try{Pt-=Number(sessionStorage.getItem(Rt))||0}catch{}function Ut(t){var f=Math.max(0,t-Wt);Wt=t,kt=t-Ft>i?Math.max(0,kt-f/qt):Math.min(1,kt+f/qt),Pt+=kt*f/1e3,Ct=kt===0}function Vt(){Ft=performance.now(),clearTimeout(C),C=setTimeout(B,i),N&&(N=!1,J()),Ct&&(Ct=!1,Wt=Ft,s.forEach(function(t){t.isDrawn=!1}),A())}["pointerdown","pointermove","keydown","wheel","touchstart","scroll"].forEach(function(t){window.addEventListener(t,Vt,{passive:!0,capture:!0})}),C=setTimeout(B,i),window.addEventListener("pagehide",function(){try{sessionStorage.setItem(Rt,String(Date.now()/1e3-Pt))}catch{}});function a(t,f){if(!t.isOuter){var b=e.matches?20:Pt%3600;t.colors=Gt(t,f);var S=!0;if(t.drawShader){if(S=t.drawShader(b,t.colors,t),t.isLost){t.canvas.classList.remove("is-drawn");return}}else t.canvas.dispatchEvent(new CustomEvent("backdrop-frame",{detail:{timeS:b,colors:t.colors,widthPx:t.canvas.width,heightPx:t.canvas.height}}));t.isDrawn=S&&!t.from}}function g(t){return t.isOuter||!t.isInView||t.isLost||t.canvas.hasAttribute("data-backdrop-paused")?!1:!((t.isHeld||e.matches||Ct)&&t.isDrawn)}function L(t){if(E=!1,!document.hidden){var f=N?l:d;if(t-r<f&&!T){E=!0,requestAnimationFrame(L);return}var b=w?d:t-r;r=t,w=!1,x=!1,Ut(t),q&&ut();var S=T;T=!1,s.forEach(function(M){if(!(!M.isInView||M.canvas.hasAttribute("data-backdrop-paused"))){if(M.isOuter){M.kind==="frame"&&!M.isTold&&(M.isTold=!0,W(M)),M.canvas.hasAttribute("data-adapts-glass")&&!M.isGlassAdapted&&bt(M);return}M.drawShader&&(S||!M.glass)&&st(M),!((M.isHeld||e.matches||Ct)&&M.isDrawn)&&(M.drawShader&&b<1e3&&(M.slowS=b>f*1.5?M.slowS+b/1e3:Math.max(0,M.slowS-b/2e3),M.slowS>1.5&&(M.slowS=0,M.scale>.26?(M.scale*=.75,M.size()):M.isHeld=!0)),a(M,t))}}),(T||q||s.some(g))&&(E=!0,requestAnimationFrame(L))}}function F(){var t=performance.now();q=!0,s.forEach(function(f){var b=_(f.canvas);JSON.stringify(b)!==JSON.stringify(f.target)&&(f.from=f.colors,f.target=b,f.fadeStartMs=t,f.isDrawn=!1,f.isGlassAdapted=!1,f.isInView&&a(f,t))}),A()}function z(){var t="";s.forEach(function(f){var b=f.isOuter&&f.canvas.getAttribute("data-backdrop-color");b&&/^#[0-9a-fA-F]{6}$/.test(b)&&(t=b)}),t?document.documentElement.style.setProperty("--backdrop-edge",t):document.documentElement.style.removeProperty("--backdrop-edge")}function X(t,f){var b={canvas:t,kind:f,isOuter:!0,isInView:!0,isTold:!1,isGlassAdapted:!1,target:_(t),from:null};t.backdropLayer=b,s.push(b),f==="frame"&&(b.onMessage=function(M){M.source===t.contentWindow&&M.data&&M.data.zaismaBackground&&(b.isTold=!1,R())},window.addEventListener("message",b.onMessage));function S(){var M=t.getAttribute("data-glass-kind");if(t.hasAttribute("data-adapts-glass")&&M){b.isGlassAdapted=!0,pt(b,{isSmoked:M==="smoked",tint:t.getAttribute("data-glass-tint")||""});return}var Z=t.getAttribute("data-backdrop-still")||(f==="picture"?t.currentSrc||t.src:"");if(!(!t.hasAttribute("data-adapts-glass")||!Z)){var Q=new Image;Q.onload=function(){t.getAttribute("data-backdrop-still")!==Z&&f!=="picture"||(b.still=Q,b.isGlassAdapted=!1,R())},Q.src=Z}}S(),new MutationObserver(S).observe(t,{attributes:!0,attributeFilter:["data-backdrop-still","src","data-glass-kind"]}),window.IntersectionObserver&&new IntersectionObserver(function(M){b.isInView=M[M.length-1].isIntersecting,b.isInView&&R()}).observe(t),R(),z()}function D(t){if(!t.backdropLayer&&!(t.hasAttribute("data-backdrop-stand-in")&&!t.hasAttribute("data-backdrop-shader"))){var f=t.getAttribute("data-backdrop");if(f==="frame"||f==="picture")return X(t,f);var b=t.getAttribute("data-backdrop")==="scene",S=window.matchMedia("(max-width: 760px)").matches,M=Math.min(window.devicePixelRatio||1,b?2:1.5),Z=t.classList.contains("is-framed"),Q=rt&&rt.has(t)?rt.get(t):O(t),G={canvas:t,isInView:Q,isDrawn:!1,isHeld:!1,slowS:0,target:_(t),from:null,scale:b||Z?M:(S?.4:.55)*M};if(!(!b&&(G.drawShader=Ot(t),!G.drawShader))){if(t.backdropLayer=G,G.size=function(){var nt=Math.max(2,Math.round(t.clientWidth*G.scale)),K=Math.max(2,Math.round(t.clientHeight*G.scale));b||(G.drawnWidth=Math.max(2,Math.round(t.clientWidth*G.scale*p)),G.drawnHeight=Math.max(2,Math.round(t.clientHeight*G.scale*p)),nt=Math.round(G.drawnWidth*m),K=Math.round(G.drawnHeight*m)),!(nt===t.width&&K===t.height)&&(t.width=nt,t.height=K,G.isDrawn=!1,G.glass=null,t.backdropLayer&&!x&&G.isInView&&a(G,performance.now()))},G.size(),window.zaismaWatch.size(t,G.size),window.IntersectionObserver&&new IntersectionObserver(function(nt){G.isInView=nt[nt.length-1].isIntersecting,G.onView&&G.onView(),G.isInView&&A()}).observe(t),G.drawShader&&!Q&&window.IntersectionObserver){var j=new IntersectionObserver(function(nt){nt[nt.length-1].isIntersecting&&(j.disconnect(),G.drawShader.prepare())},{rootMargin:"100% 0px"});j.observe(t)}else G.drawShader&&G.drawShader.prepare();new MutationObserver(A).observe(t,{attributes:!0,attributeFilter:["data-backdrop-paused"]}),s.push(G),!x&&G.isInView&&a(G,performance.now()),A()}}}function O(t){var f=t.getBoundingClientRect();return f.bottom>0&&f.right>0&&f.top<window.innerHeight&&f.left<window.innerWidth}var U=document.querySelectorAll("canvas[data-backdrop], iframe[data-backdrop='frame'], img[data-backdrop='picture']"),rt=new Map;U.forEach(function(t){t.tagName==="CANVAS"&&rt.set(t,O(t))}),U.forEach(D),rt.clear(),window.zaismaBackdrop={add:function(t){q=!0,D(t),A()},remove:function(t){var f=t.backdropLayer;f&&(s=s.filter(function(b){return b!==f}),f.onMessage&&window.removeEventListener("message",f.onMessage),t.backdropLayer=null,R(),z())},forgetGlass:function(){document.querySelectorAll(":has(> .backdrop)").forEach(function(t){t.shownGlass=null}),document.querySelectorAll("[data-glass]").forEach(function(t){t.glassPick=null,t.classList.remove("smoke"),t.removeAttribute("data-theme-choice"),t.style.removeProperty("--glass-tint")})}},window.zaismaWatch.scroll(Y),window.zaismaWatch.resize(R);function lt(t){return t.nodeType===1&&(t.hasAttribute("data-glass")||!!t.querySelector("[data-glass]"))}window.zaismaWatch.page(function(t){q||(q=t.some(function(f){return f.type==="attributes"?f.target.hasAttribute("data-glass"):Array.prototype.some.call(f.addedNodes,lt)||Array.prototype.some.call(f.removedNodes,lt)}),q&&A())}),document.addEventListener("toggle",function(){q=!0,A()},!0),document.addEventListener("visibilitychange",function(){document.hidden||A()}),new MutationObserver(F).observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["data-theme-choice"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",F),e.addEventListener("change",F)})(),(function(){var y=getComputedStyle(document.documentElement),u=parseFloat(y.getPropertyValue("--control-slant"))||10;function c(h,v){var o=h.querySelector(".color-mark"),p=Array.prototype.slice.call(h.querySelectorAll(".color-pick")),m=h.querySelector('.color-pick[aria-pressed="true"]');if(!o||!m){o&&(o.hidden=!0);return}o.hidden=!1;var i=m.offsetHeight,d=u/i,l=m.offsetLeft,e=l+m.offsetWidth,s=o.offsetTop,r=s-(m.offsetTop+i),E=o.offsetHeight,w=m===p[0],x=m===p[p.length-1],A=w?[l,l]:[l-d*r,l-d*(r+E)],P=x?[e,e]:[e-u-d*r,e-u-d*(r+E)],_=Math.min(A[0],A[1]),q=Math.max(P[0],P[1]),T=[[A[0]-_,0],[P[0]-_,0],[P[1]-_,E],[A[1]-_,E]];v||(o.style.transition="none"),o.style.width=q-_+"px",o.style.transform="translateX("+_+"px)",o.style.setProperty("--cut-shape","polygon("+T.map(function($){return $[0].toFixed(2)+"px "+$[1].toFixed(2)+"px"}).join(", ")+")"),v||(o.offsetWidth,o.style.transition="")}function n(){document.querySelectorAll(".color-well").forEach(function(h){c(h,!1)})}requestAnimationFrame(n),document.fonts&&document.fonts.ready&&document.fonts.ready.then(n),document.addEventListener("click",function(h){var v=h.target.closest&&h.target.closest(".color-pick");if(v){var o=v.closest(".color-picker");o.querySelectorAll(".color-pick").forEach(function(p){p.setAttribute("aria-pressed",String(p===v))}),c(v.parentElement,!0),o.querySelector(".color-picker-name").textContent=v.getAttribute("aria-label")}})})(),(function(){document.addEventListener("click",function(n){var h=n.target.closest&&n.target.closest(".find > .cut-btn");if(h){var v=h.parentElement.querySelector('input[type="search"]');v&&(v.value="",v.dispatchEvent(new Event("input",{bubbles:!0})),v.focus());return}var o=n.target.closest&&n.target.closest(".field:not(.code) > .cut-btn[aria-controls]");if(o){var p=document.getElementById(o.getAttribute("aria-controls"));if(p){var m=p.type==="password";p.type=m?"text":"password",o.querySelector(".face > span:not(.loader)").textContent=m?"Hide":"Show",o.setAttribute("aria-pressed",String(m))}}});var y=".field > input:not([type='hidden']), .find > input[type='search']";function u(n){var h=n.parentElement,v=n.scrollWidth-n.clientWidth;h.classList.toggle("more-left",v>1&&n.scrollLeft>1),h.classList.toggle("more-right",v>1&&n.scrollLeft<v-1)}function c(n){requestAnimationFrame(function(){u(n)})}["input","focusin","focusout","keyup","click","scroll"].forEach(function(n){document.addEventListener(n,function(h){h.target.matches&&h.target.matches(y)&&c(h.target)},!0)}),document.addEventListener("selectionchange",function(){var n=document.activeElement;n&&n.matches&&n.matches(y)&&c(n)}),window.zaismaWatch.each(y,function(n){u(n),window.zaismaWatch.size(n,function(){u(n)})})})(),(function(){var y=6;function u(o){return typeof o=="string"?document.getElementById(o):o}function c(o){return Array.prototype.slice.call(o.querySelectorAll(".pin-box > input"))}function n(o){return c(o).map(function(p){return p.value}).join("")}function h(o,p){var m=o.querySelector(".field-error");m.textContent=p||"",m.hidden=!p,Array.prototype.forEach.call(o.querySelectorAll(".pin-box"),function(i){i.classList.toggle("is-marked",!!p)}),c(o).forEach(function(i){p?i.setAttribute("aria-invalid","true"):i.removeAttribute("aria-invalid")})}function v(o){o.querySelector('input[type="hidden"]').value=n(o)}window.zaismaPinField={digits:function(o){return n(u(o))},clear:function(o){var p=u(o);c(p).forEach(function(m){m.value=""}),v(p)},focus:function(o){var p=c(u(o))[0];p.focus({preventScroll:!0}),p.select()},setError:function(o,p){h(u(o),p)},setDisabled:function(o,p){var m=u(o);c(m).forEach(function(i){i.disabled=!!p}),p?m.setAttribute("aria-busy","true"):m.removeAttribute("aria-busy")}},window.zaismaWatch.each("[data-pin]",function(o){var p=c(o);function m(l){var e=p[Math.max(0,Math.min(y-1,l))];e.focus({preventScroll:!0}),e.select()}function i(){o.querySelector(".pin-box.is-marked")&&h(o,""),v(o);var l=n(o);l.length===y&&o.dispatchEvent(new CustomEvent("zaisma:pin-complete",{bubbles:!0,detail:{digits:l}}))}function d(l,e){var s=e.replace(/\\D/g,"").slice(0,y-l);s&&(s.split("").forEach(function(r,E){p[l+E].value=r}),m(l+s.length),i())}p.forEach(function(l,e){l.addEventListener("focus",function(){l.select()}),l.addEventListener("keydown",function(s){if(!(s.ctrlKey||s.metaKey||s.altKey)){var r=s.key;if(/^[0-9]$/.test(r)){s.preventDefault(),d(e,r);return}if(r==="Backspace"||r==="Delete"){if(s.preventDefault(),l.value){l.value="",i();return}r==="Backspace"&&e>0&&(p[e-1].value="",m(e-1),i());return}if(r==="ArrowLeft"||r==="ArrowRight"){s.preventDefault(),m(e+(r==="ArrowLeft"?-1:1));return}if(r==="Home"||r==="End"){s.preventDefault(),m(r==="Home"?0:y-1);return}r.length===1&&s.preventDefault()}}),l.addEventListener("input",function(){var s=l.value.replace(/\\D/g,"");if(l.value="",!s)return i();if(s.length===y)return p.forEach(function(r){r.value=""}),d(0,s);d(e,s.slice(-1))}),l.addEventListener("paste",function(s){s.preventDefault();var r=((s.clipboardData||window.clipboardData).getData("text")||"").replace(/\\D/g,"");r&&(p.forEach(function(E){E.value=""}),d(0,r))})})})})(),(function(){window.zaismaWatch.each(".tab-switch",function(y){var u=y.querySelector(".slab"),c=y.querySelector(".ghost"),n=y.querySelectorAll(":scope > a, :scope > button"),h=y.classList.contains("vertical");function v(){return y.querySelector('[aria-current="page"], [aria-pressed="true"]')}var o=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--gap-control-row"))||4;function p(k){return Math.max(0,((Number(k.getAttribute("data-cut-line"))||0)-o)/2)}function m(k,R,Y){if(!R){k.style.width="0px";return}var at={beside:k.getAttribute("data-cut-beside"),ends:k.getAttribute("data-cut-ends")||"",stack:k.getAttribute("data-cut-stack")},ut=Array.prototype.filter.call(n,function(it){return!it.classList.contains("folded")}),et=R===ut[0],st=R===ut[ut.length-1];if(h){k.style.height=R.offsetHeight+"px",k.style.transform="translateY("+R.offsetTop+"px)",k.setAttribute("data-cut-beside",""),k.setAttribute("data-cut-stack",((et?"first ":"")+(st?"last":"")).trim()),k.redrawCut&&k.redrawCut(Y&&at.stack!==null?{from:at,ms:parseFloat(getComputedStyle(k).transitionDuration)*1e3}:void 0);return}var mt=p(k),H=et?0:mt,V=st?0:mt;k.style.width=R.offsetWidth+H+V+"px",k.style.transform="translateX("+(R.offsetLeft-H)+"px)",k.setAttribute("data-cut-beside",((et?"":"start ")+(st?"":"end")).trim());var ct=((et?"start ":"")+(st?"end":"")).trim();ct?k.setAttribute("data-cut-ends",ct):k.removeAttribute("data-cut-ends"),k.redrawCut&&k.redrawCut(Y&&at.beside!==null?{from:at,ms:parseFloat(getComputedStyle(k).transitionDuration)*1e3}:void 0)}var i=6;function d(){if(!(h||y.classList.contains("framed"))){y.style.removeProperty("--tab-room");var k=y.scrollWidth-y.clientWidth,R=Array.prototype.filter.call(n,function(at){return!at.classList.contains("folded")});if(!(k<=.5||!R.length)){var Y=parseFloat(getComputedStyle(y).getPropertyValue("--tab-room"))||i;y.style.setProperty("--tab-room",Math.max(i,Y-k/(2*R.length)).toFixed(2)+"px")}}}var l=!1;function e(){var k=y.querySelector(":scope > .is-pointed"),R=y.querySelector(":scope > .is-focused"),Y=y.querySelector(".focus-ring");k&&(m(c,k),y.classList.add("pointing")),R&&Y&&(m(Y,R),y.classList.add("is-focus-shown"))}function s(){if(!l){d();var k=v(),R=y.querySelector(":scope > :focus-visible"),Y=y.querySelector(".focus-ring");u.style.transition="none",m(u,k),m(c,k),Y&&R&&m(Y,R),e(),u.offsetWidth,u.style.transition="",y.classList.add("is-ready")}}s();var r=window.navigation&&navigation.activation&&navigation.activation.from;if(r&&r.url&&u.animate&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var E=new URL(r.url),w=E.pathname,x=Array.prototype.filter.call(n,function(k){return k.href&&new URL(k.href).pathname===w}),A=x.find(function(k){return new URL(k.href).search===E.search})||(x.length===1?x[0]:void 0),P=v();if(A&&P&&A!==P){var _=function(){var k=h?"translateY("+A.offsetTop+"px)":"translateX("+A.offsetLeft+"px) scaleX("+(A.offsetWidth/Math.max(1,P.offsetWidth)).toFixed(4)+")",R=h?"translateY("+P.offsetTop+"px)":"translateX("+P.offsetLeft+"px) scaleX(1)";return u.animate([{transform:k,transformOrigin:"0 0"},{transform:R,transformOrigin:"0 0"}],{duration:parseFloat(getComputedStyle(u).transitionDuration)*1e3||550,easing:"cubic-bezier(.3, 1.2, .4, 1)"})};u.style.transition="none",m(u,A),u.offsetWidth,u.style.transition="",l=!0;var q=function(){requestAnimationFrame(function(){var k=document.getAnimations?document.getAnimations().filter(function(R){return R.effect&&/^::view-transition/.test(R.effect.pseudoElement||"")}):[];Promise.all(k.map(function(R){return R.finished.catch(function(){})})).then(function(){l=!1,s(),l=!0;var R=function(){l=!1,s()};_().finished.then(R,R)})})};document.fonts&&document.fonts.ready?document.fonts.ready.then(q):q()}}document.fonts&&document.fonts.ready&&document.fonts.ready.then(s),window.zaismaWatch.size(y,s),!h&&!y.classList.contains("framed")&&y.parentElement&&window.zaismaWatch.size(y.parentElement,s),y.pickTab=function(k){y.classList.remove("pointing"),k.tagName==="BUTTON"&&n.forEach(function(Y){Y.setAttribute("aria-pressed",String(Y===k))}),m(u,k,!0),m(c,k,!0);var R=y.closest("[data-fades-sideways]");R&&R.showWhole&&R.showWhole(k,!0)};function T(k){return k.disabled||k.getAttribute("aria-disabled")==="true"}n.forEach(function(k){k.addEventListener("pointerenter",function(R){T(k)||R.pointerType&&R.pointerType!=="mouse"||(k!==v()?(m(c,k),y.classList.add("pointing")):y.classList.remove("pointing"))}),k.addEventListener("click",function(R){if(!T(k)){if(k.href&&k.getAttribute("aria-current")==="page"&&R.button===0&&!R.metaKey&&!R.ctrlKey&&!R.shiftKey&&!R.altKey){R.preventDefault();return}if(k.href&&!R.defaultPrevented){var Y=new URL(k.href,location.href);if(Y.pathname!==location.pathname||Y.search!==location.search)return}y.pickTab(k)}})}),y.addEventListener("pointerleave",function(){y.classList.remove("pointing")});var $=y.querySelector(".focus-ring");y.addEventListener("focusin",function(k){var R=k.target;!$||R.parentElement!==y||!R.matches(":focus-visible")||(m($,R),y.classList.add("is-focus-shown"))}),y.addEventListener("focusout",function(){y.classList.remove("is-focus-shown")})}),window.addEventListener("pageswap",function(y){if(!(!y.viewTransition||!y.activation||!y.activation.entry||!y.activation.entry.url)){var u=new URL(y.activation.entry.url);document.querySelectorAll(".tab-switch").forEach(function(c){var n=c.querySelector(":scope > .slab"),h=Array.prototype.some.call(c.querySelectorAll(":scope > a[href]"),function(v){return new URL(v.href).pathname===u.pathname&&v.getAttribute("aria-current")!=="page"});n&&h&&(n.style.visibility="hidden")})}}),window.addEventListener("pageshow",function(){document.querySelectorAll(".tab-switch > .slab").forEach(function(y){y.style.visibility=""})})})(),(function(){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||!window.matchMedia("(hover: hover)").matches)return;function y(u){if(!u.dataset.lean){u.dataset.lean="1";var c=u.querySelector(".run");c&&(u.addEventListener("pointerenter",function(){u.classList.add("over"),u.style.setProperty("--lift","-1.5px"),c.classList.contains("glint")||c.classList.add("glint")}),c.addEventListener("animationend",function(n){n.animationName==="run-glint"&&c.classList.remove("glint")}),u.addEventListener("pointerleave",function(){u.classList.remove("over"),["--lift","--rx","--ry"].forEach(function(n){u.style.removeProperty(n)}),c.style.removeProperty("--refl")}),u.addEventListener("pointermove",function(n){var h=u.getBoundingClientRect(),v=(n.clientX-h.left)/h.width-.5,o=(n.clientY-h.top)/h.height-.5;u.style.setProperty("--ry",(v*6).toFixed(2)+"deg"),u.style.setProperty("--rx",(-o*9).toFixed(2)+"deg"),c.style.setProperty("--refl",(50-v*70).toFixed(1)+"%")}))}}document.querySelectorAll(".run-wrap").forEach(y),window.zaismaWatch.page(function(u){u.forEach(function(c){c.addedNodes.forEach(function(n){n.querySelectorAll&&n.querySelectorAll(".run-wrap").forEach(y)})})}),document.addEventListener("pointermove",function(u){var c=u.target.closest&&u.target.closest(".glass-btn");if(c){var n=c.getBoundingClientRect();c.style.setProperty("--mx",(u.clientX-n.left).toFixed(0)+"px"),c.style.setProperty("--my",(u.clientY-n.top).toFixed(0)+"px")}},{passive:!0})})(),(function(){function y(c){!c||c.getAttribute("aria-busy")==="true"||(c.setAttribute("aria-busy","true"),c.tagName==="BUTTON"&&setTimeout(function(){c.disabled=!0},0))}function u(c,n){setTimeout(function(){c.defaultPrevented||n()},0)}document.addEventListener("submit",function(c){if(!(c.target.getAttribute("method")==="dialog"||c.submitter&&c.submitter.getAttribute("formmethod")==="dialog")){var n=c.submitter&&c.submitter.closest(".shell")||c.target.querySelector('.shell[type="submit"]');u(c,function(){y(n)})}}),document.addEventListener("click",function(c){var n=c.target.closest&&c.target.closest("a.shell[href]");if(!(!n||c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey||n.target==="_blank")){var h=new URL(n.href,location.href);h.origin===location.origin&&h.pathname===location.pathname&&h.search===location.search||u(c,function(){y(n)})}}),window.addEventListener("pageshow",function(c){c.persisted&&document.querySelectorAll('.shell[aria-busy="true"]').forEach(function(n){n.removeAttribute("aria-busy"),n.disabled=!1})})})(),(function(){for(var y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=40,n=new Date().getFullYear(),h=window.matchMedia("(pointer: coarse)").matches?"Swipe each wheel to pick.":"Scroll or type to pick each one.",v=[],o=n;o>n-100;o--)v.push(String(o));function p(m,i){return m?new Date(i||2e3,m,0).getDate():31}window.zaismaWatch.each("[data-birthday]",function(m){var i=m.querySelector(".bday-field"),d=m.querySelector(".bday-pick"),l=m.querySelector(".bday-value"),e=m.querySelector(".field-error"),s=m.querySelector(".field-hint"),r=m.querySelector(".bday-read"),E=m.querySelector('input[type="hidden"]'),w=E.getAttribute("data-id"),x={month:0,day:0,year:0},A=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(E.value);A&&(x.month=Number(A[2]),x.day=Number(A[3]),x.year=Math.max(0,v.indexOf(A[1])+1)),r.textContent=h;var P={month:{el:m.querySelector('[data-part="month"]'),blank:"Month",items:function(){return u}},day:{el:m.querySelector('[data-part="day"]'),blank:"Day",items:function(){for(var H=p(x.month,x.year?Number(v[x.year-1]):0),V=[],ct=1;ct<=H;ct++)V.push(String(ct));return V}},year:{el:m.querySelector('[data-part="year"]'),blank:"Year",items:function(){return v}}};function _(H){var V=P[H],ct=[V.blank].concat(V.items());V.count=ct.length,V.el.textContent="";var it=document.createDocumentFragment();ct.forEach(function(ot,ft){var pt=document.createElement("div");pt.setAttribute("role","option"),pt.id=w+"-"+H+"-"+ft,pt.textContent=ot,ft===0&&(pt.className="blank"),it.appendChild(pt)}),V.el.appendChild(it),V.isWired||(V.isWired=!0,V.el.addEventListener("click",function(ot){var ft=ot.target.closest('[role="option"]');ft&&ft.parentElement===V.el&&T(H,Array.prototype.indexOf.call(V.el.children,ft),!0)})),q(H)}function q(H){var V=P[H],ct=x[H];Array.prototype.forEach.call(V.el.children,function(it,ot){it.setAttribute("aria-selected",String(ot===ct))}),V.el.setAttribute("aria-activedescendant",w+"-"+H+"-"+ct)}function T(H,V,ct){var it=P[H];V=Math.max(0,Math.min(it.count-1,V)),it.el.scrollTo({top:V*c,behavior:ct&&!y?"smooth":"auto"}),$(H,V)}function $(H,V){x[H]!==V&&(x[H]=V,q(H),H!=="day"&&(_("day"),x.day>P.day.count-1&&(x.day=P.day.count-1,q("day")),P.day.el.scrollTop=x.day*c),at())}function k(){return u[x.month-1]+" "+x.day+", "+v[x.year-1]}function R(){return u[x.month-1].slice(0,3)+" "+x.day+", "+v[x.year-1]}function Y(){return x.month&&x.day&&x.year}function at(){var H=Y();r.textContent=H?k():h,H?(l.textContent=R(),i.classList.add("set"),i.classList.remove("is-marked"),e.hidden=!0,s&&(s.hidden=!1),E.value=v[x.year-1]+"-"+String(x.month).padStart(2,"0")+"-"+String(x.day).padStart(2,"0")):i.classList.contains("is-marked")?(i.classList.remove("set"),E.value=""):(l.textContent="Choose a date",i.classList.remove("set"),E.value="")}Object.keys(P).forEach(function(H){var V=P[H],ct=null,it="",ot=0;_(H),V.el.addEventListener("scroll",function(){clearTimeout(ct),ct=setTimeout(function(){$(H,Math.round(V.el.scrollTop/c))},110)},{passive:!0}),V.el.addEventListener("keydown",function(ft){var pt=x[H],gt=ft.key,At={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[gt];if(At){T(H,pt+At,!0),ft.preventDefault();return}if(gt==="Home"){T(H,1,!0),ft.preventDefault();return}if(gt==="End"){T(H,V.count-1,!0),ft.preventDefault();return}if(gt==="Enter"&&Y()){st(!0),ft.preventDefault();return}if(!(gt.length!==1||ft.metaKey||ft.ctrlKey)){var bt=Date.now();it=bt-ot>900?gt.toLowerCase():it+gt.toLowerCase(),ot=bt;for(var W=[V.blank].concat(V.items()),N=-1,C=1;C<W.length&&N<0;C++)W[C].toLowerCase().indexOf(it)===0&&(N=C);if(H==="year"&&N<0&&/^\\d{2}$/.test(it))for(var B=1;B<W.length&&N<0;B++)W[B].slice(2)===it&&(N=B);N>0&&(T(H,N,!0),ft.preventDefault())}})});function ut(){Object.keys(P).forEach(function(H){P[H].el.scrollTop=x[H]*c})}function et(){d.hidden=!1,i.setAttribute("aria-expanded","true"),ut(),P[Y()?"month":x.month?x.day?"year":"day":"month"].el.focus({preventScroll:!0}),d.scrollIntoView({block:"nearest",behavior:y?"auto":"smooth"})}function st(H){d.hidden=!0,i.setAttribute("aria-expanded","false"),H&&i.focus()}i.addEventListener("click",function(){d.hidden?et():st(!1)}),d.addEventListener("keydown",function(H){H.key==="Escape"&&(st(!0),H.preventDefault())}),d.hidden||requestAnimationFrame(ut),at();var mt=m.closest("form");mt&&m.hasAttribute("data-required")&&mt.addEventListener("submit",function(H){Y()||(H.preventDefault(),i.classList.add("is-marked"),e.textContent="Pick your birthday to go on.",e.hidden=!1,s&&(s.hidden=!0),et())})})})(),(function(){for(var y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,u=40,c=864e5,n=3e5,h=[],v=[],o=0;o<24;o++)h.push((o%12||12)+(o<12?" AM":" PM"));for(var p=0;p<60;p+=5)v.push(String(p).padStart(2,"0"));function m(e){return String(e).padStart(2,"0")}function i(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function d(e){var s=-e.getTimezoneOffset(),r=s<0?"-":"+",E=Math.abs(s);return e.getFullYear()+"-"+m(e.getMonth()+1)+"-"+m(e.getDate())+"T"+m(e.getHours())+":"+m(e.getMinutes())+r+m(Math.floor(E/60))+":"+m(E%60)}function l(e){try{var s=new Intl.DateTimeFormat("en-US",{timeZoneName:"long"}).formatToParts(e).find(function(r){return r.type==="timeZoneName"});return s?s.value:""}catch{return""}}window.zaismaWatch.each("[data-date-time]",function(e){var s=e.querySelector(".bday-field"),r=e.querySelector(".bday-pick"),E=e.querySelector(".bday-value"),w=e.querySelector(".date-time-zone"),x=e.querySelector(".bday-read"),A=e.querySelector('input[type="hidden"]'),P=A.getAttribute("data-id"),_=e.hasAttribute("data-minimum-at")?new Date(e.getAttribute("data-minimum-at")):new Date;isNaN(_)&&(_=new Date),_=new Date(Math.ceil(_.getTime()/n)*n);for(var q=i(_),T=[],$=0;$<366;$++)T.push(new Date(q.getFullYear(),q.getMonth(),q.getDate()+$));var k=i(new Date).getTime(),R=new Date().getFullYear(),Y=new Intl.DateTimeFormat("en-US",{weekday:"short",month:"short",day:"numeric"}),at=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"});function ut(C){var B=Math.round((C.getTime()-k)/c);return B===0?"Today":B===1?"Tomorrow":(C.getFullYear()===R?Y:at).format(C)}var et={day:0,hour:0,minute:0},st=!1;function mt(C){var B=T[C.day];return new Date(B.getFullYear(),B.getMonth(),B.getDate(),C.hour,C.minute*5)}function H(C){var B=Math.max(0,Math.min(T.length-1,Math.round((i(C).getTime()-q.getTime())/c)));return{day:B,hour:C.getHours(),minute:Math.floor(C.getMinutes()/5)}}var V=A.value?new Date(A.value):null,ct=e.querySelector(".field-error"),it=V&&!isNaN(V)&&s.classList.contains("is-marked")?V:null;V&&!isNaN(V)&&(et=H(V<_?_:V),st=!0);var ot={day:{el:e.querySelector('[data-part="day"]'),items:T.map(ut)},hour:{el:e.querySelector('[data-part="hour"]'),items:h},minute:{el:e.querySelector('[data-part="minute"]'),items:v}};function ft(C){var B=ot[C],J=et[C];Array.prototype.forEach.call(B.el.children,function(I,tt){I.setAttribute("aria-selected",String(tt===J))}),B.el.setAttribute("aria-activedescendant",P+"-"+C+"-"+J)}Object.keys(ot).forEach(function(C){var B=ot[C],J=document.createDocumentFragment();B.items.forEach(function(I,tt){var dt=document.createElement("div");dt.setAttribute("role","option"),dt.id=P+"-"+C+"-"+tt,dt.textContent=I,J.appendChild(dt)}),B.el.appendChild(J),B.el.addEventListener("click",function(I){var tt=I.target.closest('[role="option"]');tt&&tt.parentElement===B.el&&gt(C,Array.prototype.indexOf.call(B.el.children,tt),!0)}),ft(C)});function pt(C){Object.keys(ot).forEach(function(B){ot[B].el.scrollTo({top:et[B]*u,behavior:C&&!y?"smooth":"auto"})})}function gt(C,B,J){B=Math.max(0,Math.min(ot[C].items.length-1,B)),ot[C].el.scrollTo({top:B*u,behavior:J&&!y?"smooth":"auto"}),At(C,B)}function At(C,B){et[C]===B&&st||(et[C]=B,st=!0,it&&(it=null,s.classList.remove("is-marked"),ct&&(ct.hidden=!0)),mt(et)<_?(et=H(_),Object.keys(ot).forEach(ft),pt(!0)):ft(C),bt())}function bt(){var C=mt(et);if(w.textContent="Your time"+(l(C)?": "+l(C):""),!st){E.textContent="Choose a time",s.classList.remove("set"),A.value="",x.textContent="";return}it&&(C=it);var B=C.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),J=it?i(it):T[et.day],I=Math.round((J.getTime()-k)/c),tt=I===0?"Today":I===1?"Tomorrow":J.toLocaleDateString("en-US",J.getFullYear()===R?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"});E.textContent=tt+", "+B,s.classList.add("set"),x.textContent=C.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})+" at "+B,A.value=d(C)}Object.keys(ot).forEach(function(C){var B=ot[C],J=null;B.el.addEventListener("scroll",function(){clearTimeout(J),J=setTimeout(function(){r.hidden||At(C,Math.round(B.el.scrollTop/u))},110)},{passive:!0}),B.el.addEventListener("keydown",function(I){var tt=et[C],dt={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[I.key];if(dt){gt(C,tt+dt,!0),I.preventDefault();return}if(I.key==="Home"){gt(C,0,!0),I.preventDefault();return}if(I.key==="End"){gt(C,B.items.length-1,!0),I.preventDefault();return}I.key==="Enter"&&(N(!0),I.preventDefault())})});function W(C){if(!st){var B=new Date;B.setMinutes(60,0,0),et=H(B<_?_:B),st=!0,Object.keys(ot).forEach(ft),bt()}r.hidden=!1,s.setAttribute("aria-expanded","true"),pt(!1),!C&&(ot.day.el.focus({preventScroll:!0}),r.scrollIntoView({block:"nearest",behavior:y?"auto":"smooth"}))}function N(C){r.hidden=!0,s.setAttribute("aria-expanded","false"),C&&s.focus()}s.addEventListener("click",function(){r.hidden?W():N(!1)}),r.addEventListener("keydown",function(C){C.key==="Escape"&&(N(!0),C.preventDefault())}),r.hidden||(st?requestAnimationFrame(function(){pt(!1)}):W(!0)),bt()})})(),(function(){function y(u){return u<1e3?u+"\\xA0bytes":u<1e6?Math.round(u/1e3)+"\\xA0KB":u<1e9?Number((u/1e6).toFixed(1))+"\\xA0MB":Number((u/1e9).toFixed(2))+"\\xA0GB"}document.querySelectorAll("[data-file-drop]").forEach(function(u){var c=u.querySelector(".file-drop"),n=u.querySelector(".file-drop-input"),h=u.querySelector(".file-drop-list"),v=u.querySelector(".field-error"),o=Number(u.getAttribute("data-most-bytes"))||0,p=(n.getAttribute("accept")||"").split(",").map(function(e){return e.trim().toLowerCase()}).filter(Boolean),m=0;function i(){var e=p.map(function(s){var r=s.split("/");return s.charAt(0)==="."?s:r[1]==="*"?r[0]+" file":"."+r[1]});return e.length>1?e.slice(0,-1).join(", ")+" or "+e[e.length-1]:e[0]}function d(e){if(!p.length)return!0;var s=e.name.toLowerCase(),r=(e.type||"").toLowerCase();return p.some(function(E){return E.charAt(0)==="."?s.slice(-E.length)===E:/\\/\\*$/.test(E)?r.indexOf(E.slice(0,-1))===0:r===E})}function l(e){v.textContent=e,v.hidden=!e,c.classList.toggle("is-marked",!!e);var s=(n.getAttribute("aria-describedby")||"").split(" ").filter(function(r){return r&&r!==v.id});e?(s.push(v.id),n.setAttribute("aria-invalid","true")):n.removeAttribute("aria-invalid"),n.setAttribute("aria-describedby",s.join(" "))}n.addEventListener("dragenter",function(){m++,c.classList.add("is-over")}),n.addEventListener("dragleave",function(){m=Math.max(0,m-1),m||c.classList.remove("is-over")}),n.addEventListener("drop",function(){m=0,c.classList.remove("is-over")}),n.addEventListener("change",function(){var e=Array.prototype.slice.call(n.files),s=e.find(function(w){return!d(w)}),r=o?e.find(function(w){return w.size>o}):null,E=s?s.name+" isn't a "+i()+".":r?r.name+" is "+y(r.size)+"; the most is "+y(o)+".":"";E&&(n.value="",e=[]),l(E),h.textContent="",e.forEach(function(w){var x=document.createElement("li"),A=document.createElement("span"),P=document.createElement("span");A.className="file-drop-name",A.textContent=w.name,P.className="file-drop-size",P.textContent=y(w.size),x.appendChild(A),x.appendChild(P),h.appendChild(x)}),h.hidden=!e.length})})})(),(function(){function y(u){var c=document.createRange();c.selectNodeContents(u);var n=window.getSelection();n.removeAllRanges(),n.addRange(c)}document.addEventListener("click",function(u){var c=u.target.closest&&u.target.closest(".field.code > .code-text");if(c){y(c);return}var n=u.target.closest&&u.target.closest(".field.code > .cut-btn[aria-controls]");if(!n)return;var h=document.getElementById(n.getAttribute("aria-controls")),v=n.closest(".code-field"),o=v&&v.querySelector(".code-copied");if(!h||!o)return;function p(i){o.textContent=i,v.classList.add("is-copied"),clearTimeout(o.timer),o.timer=setTimeout(function(){o.textContent="",v.classList.remove("is-copied")},1600)}function m(){y(h);var i=!1;try{i=document.execCommand("copy")}catch{}p(i?"Copied":"Selected")}navigator.clipboard&&navigator.clipboard.writeText?(p("Copied"),navigator.clipboard.writeText(h.getAttribute("data-code")||h.textContent).catch(m)):m()})})(),(function(){document.querySelectorAll("[data-chart-scroll]").forEach(function(c){c.scrollLeft=c.scrollWidth});function y(c,n,h){n.forEach(function(i,d){i.classList.toggle("is-focused",d===h)});var v=c.querySelector("[data-chart-scroll]"),o=n[h];if(!(!v||!o)){var p=v.getBoundingClientRect(),m=o.getBoundingClientRect();m.left<p.left?v.scrollLeft-=p.left-m.left:m.right>p.right&&(v.scrollLeft+=m.right-p.right)}}function u(c){return Array.prototype.slice.call(c.querySelectorAll(".chart-hit"))}document.addEventListener("focusin",function(c){var n=c.target instanceof Element&&c.target.matches("[data-chart-points]")?c.target:null;if(n){var h=u(n);h.length&&!n.querySelector(".chart-hit.is-focused")&&y(n,h,h.length-1)}}),document.addEventListener("keydown",function(c){var n=c.target instanceof Element&&c.target.matches("[data-chart-points]")?c.target:null;if(n){var h=u(n),v=h.indexOf(n.querySelector(".chart-hit.is-focused")),o=v;if(c.key==="ArrowRight"||c.key==="ArrowUp")o=Math.min(h.length-1,v+1);else if(c.key==="ArrowLeft"||c.key==="ArrowDown")o=Math.max(0,v-1);else if(c.key==="Home")o=0;else if(c.key==="End")o=h.length-1;else return;c.preventDefault(),y(n,h,o)}})})(),(function(){var y=12;function u(c){var n=getComputedStyle(c),h=parseFloat(n.lineHeight)||24,v=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);c.style.height="auto",c.classList.remove("is-scrolling");var o=h*(Number(c.getAttribute("rows"))||2)+v,p=h*y+v;c.classList.toggle("is-scrolling",c.scrollHeight>p+1),c.style.height=Math.max(o,Math.min(c.scrollHeight,p))+"px";var m=Number(c.getAttribute("maxlength")),i=document.getElementById(c.id+"-count");!m||!i||(i.hidden=c.value.length<m*.8,i.textContent=c.value.length.toLocaleString("en-US")+" of "+m.toLocaleString("en-US"))}document.querySelectorAll("textarea[data-long-field]").forEach(u),document.addEventListener("input",function(c){c.target.matches&&c.target.matches("textarea[data-long-field]")&&u(c.target)}),document.fonts&&document.fonts.ready&&document.fonts.ready.then(function(){document.querySelectorAll("textarea[data-long-field]").forEach(u)})})(),(function(){function y(u){var c=u.closest(".slider"),n=Number(u.min),h=Number(u.max),v=c.querySelector("output"),o=v.getAttribute("data-unit");c.style.setProperty("--fill",((Number(u.value)-n)/Math.max(1e-9,h-n)).toFixed(4));var p=c.querySelector(".slider-thumb");p&&p.redrawCut&&p.redrawCut(),v.textContent=Number(u.value).toLocaleString("en-US")+(o==="%"?"%":" "+o)}document.addEventListener("input",function(u){u.target.matches&&u.target.matches("input[data-slider]")&&y(u.target)}),window.addEventListener("pageshow",function(){document.querySelectorAll("input[data-slider]").forEach(y)})})(),(function(){window.zaismaPlace=function(y,u,c){var n=c.roomRect||{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight},h=c.gapPx,v=c.edgePx,o=(y.left+y.right)/2>(n.left+n.right)/2,p=Math.max(n.left+v,Math.min(o?y.right-u.width:y.left,n.right-v-u.width)),m=n.bottom-v-y.bottom-h,i=y.top-h-v-n.top,d=u.height<=m,l=u.height<=i,e=(y.top+y.bottom)/2>(n.top+n.bottom)/2,s=!c.isAlwaysBelow&&(d&&l?e:!d&&i>m),r=s?y.top-h-u.height:y.bottom+h;return{leftPx:p,topPx:Math.max(n.top+v,Math.min(r,n.bottom-v-u.height)),isAtEnd:o,isAbove:s}}})(),(function(){var y=6,u=8,c=12,n=new WeakMap;window.zaismaWatch.each("[data-select]",function(h){var v=h.querySelector(".select-button"),o=h.querySelector(".select-list"),p=o.querySelector('[role="listbox"]'),m=h.querySelector('input[type="hidden"]'),i=v.closest(".field"),d=h.querySelector(".select-value");function l(){o.style.maxHeight="";var q=p.scrollHeight-p.clientHeight;q>0&&q<c&&(o.style.maxHeight=Math.floor(o.getBoundingClientRect().height-(c-q))+"px")}if(document.fonts?document.fonts.ready.then(l):l(),window.zaismaWatch.resize(l),!o.hasAttribute("popover"))return;document.querySelectorAll("body > .select-list").forEach(function(q){var T=n.get(q);T&&!T.isConnected&&q.remove()}),h.closest(".smoke")&&o.classList.add("smoke"),n.set(o,h),document.body.appendChild(o);var e=Array.prototype.slice.call(p.querySelectorAll('[role="option"]')),s=-1,r="",E=0;function w(){return e.findIndex(function(q){return q.getAttribute("aria-selected")==="true"})}function x(q){s=Math.max(0,Math.min(e.length-1,q)),e.forEach(function(k,R){k.classList.toggle("is-active",R===s)}),p.setAttribute("aria-activedescendant",e[s].id);var T=e[s],$=T.offsetTop;$<p.scrollTop?p.scrollTop=$:$+T.offsetHeight>p.scrollTop+p.clientHeight&&(p.scrollTop=$+T.offsetHeight-p.clientHeight)}function A(){var q=i.getBoundingClientRect();if(!i.isConnected||q.bottom<0||q.top>window.innerHeight||q.right<0||q.left>document.documentElement.clientWidth){o.hidePopover();return}o.style.width=q.width+"px";var T=window.zaismaPlace(q,{width:q.width,height:o.offsetHeight},{gapPx:y,edgePx:u});o.style.left=Math.round(T.leftPx)+"px",o.style.top=Math.round(T.topPx)+"px",o.classList.toggle("is-above",T.isAbove)}function P(q){e.forEach(function(T,$){T.setAttribute("aria-selected",String($===q))}),d.textContent=e[q].textContent,d.classList.remove("is-placeholder"),(m.value!==e[q].getAttribute("data-choice-value")||!_)&&(m.value=e[q].getAttribute("data-choice-value"),m.dispatchEvent(new Event("change",{bubbles:!0}))),_=!0,o.hidePopover(),v.focus()}var _=w()>=0;o.addEventListener("toggle",function(q){var T=q.newState==="open";if(v.setAttribute("aria-expanded",String(T)),i.classList.toggle("is-open",T),T&&!h.isConnected){o.hidePopover(),o.remove();return}if(T){var $=h.closest("[data-theme-choice]");$&&$!==document.documentElement?o.setAttribute("data-theme-choice",$.getAttribute("data-theme-choice")):o.removeAttribute("data-theme-choice"),o.style.setProperty("--glass-hue",getComputedStyle(h).getPropertyValue("--glass-hue")),l(),A(),x(Math.max(0,w())),p.focus({preventScroll:!0})}}),window.zaismaWatch.resize(function(){o.matches(":popover-open")&&A()}),window.zaismaWatch.scroll(function(){o.matches(":popover-open")&&A()}),v.addEventListener("keydown",function(q){(q.key==="ArrowDown"||q.key==="ArrowUp")&&(q.preventDefault(),v.disabled||o.showPopover())}),p.addEventListener("click",function(q){var T=q.target.closest('[role="option"]');T&&P(e.indexOf(T))}),p.addEventListener("pointermove",function(q){var T=q.target.closest('[role="option"]');T&&e.indexOf(T)!==s&&x(e.indexOf(T))}),p.addEventListener("keydown",function(q){var T=q.key,$={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[T];if($){x(s+$),q.preventDefault();return}if(T==="Home"||T==="End"){x(T==="Home"?0:e.length-1),q.preventDefault();return}if(T==="Enter"||T===" "){P(s),q.preventDefault();return}if(T==="Tab"){o.hidePopover();return}if(!(T.length!==1||q.metaKey||q.ctrlKey)){var k=Date.now();r=k-E>900?T.toLowerCase():r+T.toLowerCase(),E=k;var R=e.findIndex(function(Y){return Y.textContent.toLowerCase().indexOf(r)===0});R>=0&&x(R)}})})})(),(function(){var y=getComputedStyle(document.documentElement);function u(d,l){return parseFloat(y.getPropertyValue(d))||l}function c(d){for(var l=d.parentElement;l&&l!==document.documentElement;l=l.parentElement){var e=getComputedStyle(l);if(e.transform!=="none"||e.filter!=="none"||(e.backdropFilter||"none")!=="none"||(e.containerType||"normal")!=="normal"||/transform|filter/.test(e.willChange||"")||/paint|layout|strict|content/.test(e.contain||""))return l.getBoundingClientRect()}return{left:0,top:0}}function n(d){return document.querySelector('[aria-controls="'+d.id+'"][aria-expanded]')}function h(d){return Array.prototype.slice.call(d.querySelectorAll('[role="menuitem"]')).filter(function(l){return!l.closest("[hidden]")})}function v(d){var l=n(d);if(!(!l||d.classList.contains("shut"))){var e=u("--gap-control-stack",8),s=u("--pad-frame",10),r=c(d),E=l.getBoundingClientRect(),w=l.closest(".top"),x=w?w.getBoundingClientRect().bottom:E.bottom,A=r.width?r.left:0,P=r.width?r.right:document.documentElement.clientWidth,_=r.height?r.top:0,q=r.height?r.bottom:window.innerHeight,T=w?{left:E.left,right:E.right,top:x-1,bottom:x}:E,$={left:A,right:P,top:_,bottom:q};d.style.removeProperty("--menu-room"),d.style.setProperty("--menu-room-width",Math.max(0,P-A-2*s)+"px");var k=window.zaismaPlace(T,{width:d.offsetWidth,height:d.offsetHeight},{roomRect:$,gapPx:e,edgePx:s,isAlwaysBelow:!!w}),R=Math.max(0,k.isAbove?T.top-e-_-s:q-T.bottom-e-s);d.style.setProperty("--menu-room",R+"px");var Y=Array.prototype.find.call(d.querySelectorAll(".dropdown-in"),function(ut){return ut.offsetParent!==null}),at=Y?Y.scrollHeight-Y.clientHeight:0;at>0&&at<12&&d.style.setProperty("--menu-room",Math.ceil(R+at)+"px"),k=window.zaismaPlace(T,{width:d.offsetWidth,height:d.offsetHeight},{roomRect:$,gapPx:e,edgePx:s,isAlwaysBelow:!!w}),d.classList.toggle("from-start",!k.isAtEnd),d.classList.toggle("is-above",k.isAbove),d.style.top=k.topPx-r.top+"px",d.style.left=k.leftPx-r.left+"px"}}function o(d,l,e){var s=n(d);s&&s.setAttribute("aria-expanded",String(l)),d.classList.toggle("shut",!l),d.setAttribute("aria-hidden",String(!l)),l&&(v(d),e&&h(d)[0]&&h(d)[0].focus({preventScroll:!0}))}var p=[];function m(){return p=p.filter(function(d){return d.isConnected}),p}window.zaismaWatch.each('.dropdown[role="menu"]',function(d){p.push(d),d.zaismaPlace=function(){v(d)},d.classList.contains("shut")||requestAnimationFrame(function(){v(d)}),d.addEventListener("keydown",function(l){var e=h(d),s=e.indexOf(document.activeElement);if((l.key==="ArrowDown"||l.key==="ArrowUp")&&(l.preventDefault(),e[(s+(l.key==="ArrowDown"?1:e.length-1))%e.length].focus()),(l.key==="Home"||l.key==="End")&&(l.preventDefault(),e[l.key==="Home"?0:e.length-1].focus()),(l.key==="Escape"||l.key==="Tab")&&(o(d,!1),l.key==="Escape")){var r=n(d);r&&r.focus()}}),d.addEventListener("click",function(l){l.target.closest('[role="menuitem"]:not([aria-haspopup])')&&o(d,!1)})}),document.addEventListener("click",function(d){var l=d.target.closest&&d.target.closest("[aria-controls][aria-expanded]"),e=l&&document.getElementById(l.getAttribute("aria-controls"));!e||!e.matches('.dropdown[role="menu"]')||o(e,l.getAttribute("aria-expanded")!=="true",d.detail===0)}),document.addEventListener("pointerdown",function(d){m().forEach(function(l){var e=n(l);!l.classList.contains("shut")&&!l.contains(d.target)&&!(e&&e.contains(d.target))&&o(l,!1)})});function i(){m().forEach(v)}window.zaismaWatch.resize(i),document.fonts&&document.fonts.ready.then(i),window.zaismaWatch.scroll(i)})(),(function(){function y(u,c,n){var h=null;if(u.querySelectorAll("[data-filter-panel]").forEach(function(p){p.hidden=p.getAttribute("data-filter-panel")!==c,p.hidden||(h=p)}),u.zaismaPlace&&u.zaismaPlace(),n&&h){var v=c===""&&u.lastGroupName?u.querySelector('[data-filter-opens="'+u.lastGroupName+'"]'):null,o=v||h.querySelector('[aria-current="page"]')||h.querySelector('[role="menuitem"]');o&&o.focus({preventScroll:!0})}}window.zaismaWatch.each(".filter-menu",function(u){u.addEventListener("click",function(c){var n=c.target.closest("[data-filter-opens]");if(n){var h=n.getAttribute("data-filter-opens");h&&(u.lastGroupName=h),y(u,h,c.detail===0)}}),u.addEventListener("keydown",function(c){var n=document.activeElement;c.key==="ArrowRight"&&n&&n.matches(".filter-group")&&(c.preventDefault(),u.lastGroupName=n.getAttribute("data-filter-opens"),y(u,u.lastGroupName,!0)),c.key==="ArrowLeft"&&n&&n.closest('[data-filter-panel]:not([data-filter-panel=""])')&&(c.preventDefault(),y(u,"",!0))}),new MutationObserver(function(){u.getAttribute("aria-hidden")==="true"&&y(u,"",!1)}).observe(u,{attributes:!0,attributeFilter:["aria-hidden"]})})})(),(function(){var y=HTMLDialogElement.prototype.close;function u(r){return r.open&&r.matches(".sheet:not(.in-place)")}function c(r,E){if(r.classList.contains("is-leaving"))return;r.classList.add("is-leaving");var w=setTimeout(A,400);function x(P){P.target===r&&P.propertyName==="opacity"&&A()}function A(){clearTimeout(w),r.removeEventListener("transitionend",x),r.classList.contains("is-leaving")&&(r.classList.remove("is-leaving"),y.apply(r,E))}r.addEventListener("transitionend",x)}var n=window.matchMedia("(min-width: 761px)"),h=new Map,v=8,o=16,p=null,m=HTMLDialogElement.prototype.showModal;document.addEventListener("click",function(r){var E=r.target.closest&&r.target.closest("button, a, [role='button']");p=E?{button:E,at:performance.now()}:null},!0),HTMLDialogElement.prototype.showModal=function(){var r=this.open;m.apply(this,arguments),!r&&this.matches(".sheet")&&(d(this),l(this),i(this))};function i(r){window.zaismaInput&&window.zaismaInput.isKeyboard()||(r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))}function d(r){var E=p&&performance.now()-p.at<2e3&&p.button.isConnected?p.button:null;!E||r.matches(".in-place, .placement-side, .placement-middle, .is-picture")||E.closest("[popover]")||r.contains(E)||(h.set(r,{opener:E,rect:E.getBoundingClientRect()}),r.classList.add("is-anchored"),s&&s.observe(r))}function l(r){var E=h.get(r);if(!(!E||!r.open||!n.matches)){var w=E.opener.isConnected?E.opener.getBoundingClientRect():E.rect;w.width||w.height?E.rect=w:w=E.rect;var x=document.documentElement.clientWidth,A=window.innerHeight;if(w.bottom<0||w.top>A||w.right<0||w.left>x){r.close();return}r.style.setProperty("--sheet-max-height",A-2*o+"px");var P=window.zaismaPlace(w,{width:r.offsetWidth,height:r.offsetHeight},{roomRect:{left:0,top:0,right:x,bottom:A},gapPx:v,edgePx:o});r.style.setProperty("--sheet-left",Math.round(P.leftPx)+"px"),r.style.setProperty("--sheet-top",Math.round(P.topPx)+"px"),r.classList.toggle("is-above",P.isAbove),r.classList.toggle("is-at-end",P.isAtEnd)}}function e(){h.forEach(function(r,E){l(E)})}var s=window.ResizeObserver?new ResizeObserver(function(r){r.forEach(function(E){h.has(E.target)&&l(E.target)})}):null;window.addEventListener("resize",e),window.addEventListener("scroll",e,{passive:!0,capture:!0}),document.addEventListener("close",function(r){var E=r.target;h.has(E)&&(h.delete(E),s&&s.unobserve(E),E.classList.remove("is-anchored","is-above","is-at-end"),E.style.removeProperty("--sheet-left"),E.style.removeProperty("--sheet-top"),E.style.removeProperty("--sheet-max-height"))},!0),HTMLDialogElement.prototype.close=function(){u(this)?c(this,arguments):y.apply(this,arguments)},document.addEventListener("cancel",function(r){r.target.matches&&u(r.target)&&(r.preventDefault(),c(r.target,[]))},!0),document.addEventListener("submit",function(r){var E=r.submitter&&r.submitter.getAttribute("formmethod")||r.target.getAttribute("method"),w=r.target.closest("dialog");!E||E.toLowerCase()!=="dialog"||!w||!u(w)||(r.preventDefault(),c(w,r.submitter&&r.submitter.hasAttribute("value")?[r.submitter.value]:[]))}),document.addEventListener("click",function(r){var E=r.target.closest&&r.target.closest("[aria-controls]:not([aria-expanded])"),w=E&&document.getElementById(E.getAttribute("aria-controls"));if(w&&w.matches("dialog.sheet")){r.preventDefault(),w.classList.remove("is-leaving"),w.open||w.showModal();return}var x=r.target.matches&&r.target.matches("dialog.sheet[open]")?r.target:null;if(!(!x||!r.detail)){var A=x.getBoundingClientRect();(r.clientX<A.left||r.clientX>A.right||r.clientY<A.top||r.clientY>A.bottom)&&x.close()}})})(),(function(){function y(u){var c=u.querySelector(".run-wrap"),n=u.querySelector(":scope > .pane-in > .layout-stack")||u.querySelector(":scope > .pane-in"),h=c&&n&&Array.prototype.find.call(n.children,function(o){return o.contains(c)});if(h){var v=parseFloat(getComputedStyle(u).marginTop)||0;u.style.setProperty("--started-low-used",Math.round(h.getBoundingClientRect().bottom+window.scrollY-v)+"px")}}window.zaismaWatch.each(".glass-pane.is-started-low",function(u){y(u),window.zaismaWatch.size(u,function(){y(u)})})})(),(function(){var y=4e3,u=8e3,c=300,n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--gap-control-stack"))||8;function h(){var i=0;document.querySelectorAll("[data-notice]:not(.in-place)").forEach(function(d){d.style.setProperty("--notice-shift",i+"px"),d.classList.contains("is-leaving")||(i+=d.offsetHeight+n)})}function v(i){i.classList.contains("is-leaving")||(i.classList.add("is-leaving"),i.classList.contains("in-place")?setTimeout(function(){i.classList.remove("is-leaving")},1600):setTimeout(function(){i.remove(),h()},c))}function o(i){clearTimeout(i.noticeTimer),i.noticeTimer=setTimeout(function(){v(i)},i.hasAttribute("data-notice-undo")?u:y)}function p(i){i.noticeArrived||i.classList.contains("in-place")||(i.noticeArrived=!0,h(),i.getAttribute("data-notice")==="done"&&(o(i),i.addEventListener("pointerenter",function(){clearTimeout(i.noticeTimer)}),i.addEventListener("pointerleave",function(){o(i)})))}function m(i){i.querySelectorAll&&(i.matches("[data-notice]")&&p(i),i.querySelectorAll("[data-notice]").forEach(p))}m(document.body),window.zaismaWatch.page(function(i){i.forEach(function(d){d.addedNodes.forEach(m)})}),document.addEventListener("click",function(i){var d=i.target.closest&&i.target.closest("[data-notice] > .cut-btn");d&&v(d.closest("[data-notice]"))})})(),(function(){var y=450;window.zaismaWatch.each("form[data-steps]",function(u){var c=Array.prototype.slice.call(u.querySelectorAll(":scope > .step-body")),n=Array.prototype.slice.call(u.closest(".pane-in").querySelectorAll(".step-line > li")),h=u.querySelector(":scope > .layout-row"),v=h.querySelector(".cut-btn"),o=h.querySelector(".run-wrap"),p=o.querySelector(".run-words:not(.label-busy)"),m=Number(u.getAttribute("data-steps"))||0,i=c.length-1,d="Next",l=u.getAttribute("data-finish-label"),e=0;function s(E){n.forEach(function(w,x){w.classList.remove("is-leaving","is-waiting"),w.classList.toggle("is-done",x<E),w.classList.toggle("is-current",x===E),x===E?w.setAttribute("aria-current","step"):w.removeAttribute("aria-current")})}function r(E){var w=m;m=Math.max(0,Math.min(i,E)),c.forEach(function(A,P){A.hidden=P!==m}),clearTimeout(e),m<w&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?(n.forEach(function(A,P){P>m&&(A.classList.contains("is-current")||A.classList.contains("is-done"))&&(A.classList.remove("is-current","is-done"),A.classList.add("is-leaving")),A.removeAttribute("aria-current")}),n[m].classList.remove("is-done"),n[m].classList.add("is-current","is-waiting"),n[m].setAttribute("aria-current","step"),e=setTimeout(function(){s(m)},y)):s(m),v.hidden=m===0,p&&(p.textContent=m===i?l:d);var x=c[m].querySelector("input, select, textarea, button");x&&document.activeElement&&u.contains(document.activeElement)&&x.focus({preventScroll:!0})}u.goToStep=r,v.addEventListener("click",function(){r(m-1)}),u.addEventListener("submit",function(E){if(m!==i){E.preventDefault();for(var w=c[m].querySelectorAll("input, select, textarea"),x=0;x<w.length;x++)if(!w[x].checkValidity()){w[x].reportValidity();return}r(m+1)}})})})(),(function(){var y={passkey:"Use your passkey instead",purchase_pin:"Use your purchase PIN instead",password:"Use your password instead"},u=6,c={purchase_pin:"Enter all "+u+" digits of your purchase PIN.",password:"Enter your password."},n=new WeakMap;function h(l,e){return document.getElementById(l+"-"+e)}function v(l,e){var s=document.getElementById(l).dataset.method==="purchase_pin",r=h(l,"problem");r.hidden=s||!e,r.querySelector("p").textContent=s?"":e||"",window.zaismaPinField.setError(h(l,"pin-field"),s?e:"")}function o(l,e,s){var r=s.method;h(e,"reason").querySelector("p").textContent=s.options.reason||"",h(e,"pin").hidden=r!=="purchase_pin",h(e,"password").hidden=r!=="password";var E=s.methods.filter(function(x){return x!==r})[0]||null;h(e,"switch").hidden=!E,E&&(h(e,"switch").querySelector(".text-label").textContent=y[E]);var w=h(e,"go");w.querySelector(".label-idle").textContent=r==="passkey"?"Use your passkey":"Confirm",s.isBusy?w.setAttribute("aria-busy","true"):w.removeAttribute("aria-busy"),w.hidden=r==="purchase_pin",w.disabled=s.isBusy,window.zaismaPinField.setDisabled(h(e,"pin-field"),s.isBusy&&r==="purchase_pin"),h(e,"cancel").disabled=s.isBusy,l.dataset.method=r}function p(l){window.zaismaPinField.clear(h(l,"pin-field")),h(l,"password-field").value=""}function m(l,e){e.method==="purchase_pin"?window.zaismaPinField.focus(h(l,"pin-field")):e.method==="password"&&h(l,"password-field").focus({preventScroll:!0})}async function i(l,e,s){if(!(s.isBusy||n.get(l)!==s)){var r=s.method,E;if(v(e,""),r==="passkey"){s.isBusy=!0,o(l,e,s);var w=await window.zaismaPasskeyTap(s.options.passkeyPurpose);if(w.error)return s.isBusy=!1,o(l,e,s),v(e,w.error);E={method:"passkey",passkey_tap:w.tap}}else{var x=r==="purchase_pin"?window.zaismaPinField.digits(h(e,"pin-field")):h(e,"password-field").value;if(!x||r==="purchase_pin"&&x.length<u)return v(e,c[r]);E=r==="purchase_pin"?{method:r,purchase_pin:x}:{method:r,password:x},s.isBusy=!0,o(l,e,s)}var A;try{A=await s.options.send(E)}catch{A={ok:!1,message:"Zaisma didn't answer. Check your connection and try again."}}if(s.isBusy=!1,A&&A.ok){s.isDone=!0,p(e),o(l,e,s),l.close(),s.options.onConfirmed();return}var P=A&&A.removed_methods||[];s.methods=s.methods.filter(function(_){return P.indexOf(_)===-1}),s.methods.indexOf(s.method)===-1&&(s.method=s.methods[0]||s.method),p(e),o(l,e,s),v(e,A&&A.message||"That didn't work. Try again."),m(e,s)}}function d(l,e){var s=function(){return n.get(l)};h(e,"go").addEventListener("click",function(){var r=s();r&&i(l,e,r)}),h(e,"switch").querySelector("button").addEventListener("click",function(){var r=s();!r||r.isBusy||(r.method=r.methods.filter(function(E){return E!==r.method})[0]||r.method,p(e),v(e,""),o(l,e,r),m(e,r))}),l.addEventListener("zaisma:pin-complete",function(){var r=s();r&&r.method==="purchase_pin"&&i(l,e,r)}),l.addEventListener("keydown",function(r){if(!(r.key!=="Enter"||!(r.target instanceof HTMLInputElement))){r.preventDefault();var E=s();E&&i(l,e,E)}}),l.addEventListener("cancel",function(r){var E=s();E&&E.isBusy&&r.preventDefault()}),l.addEventListener("close",function(){var r=s();n.delete(l),p(e),r&&!r.isDone&&r.options.onCancelled&&r.options.onCancelled()})}window.zaismaConfirmItsYou=function(l,e){var s=document.getElementById(l);if(!s)return!1;if(s.open)return!0;var r=e.methods.filter(function(x){return x!=="passkey"||window.PublicKeyCredential&&window.zaismaPasskeyTap});if(!r.length)return!1;var E={options:e,methods:r,method:r[0],isBusy:!1,isDone:!1};s.dataset.confirmWired||(s.dataset.confirmWired="1",d(s,l)),n.set(s,E),p(l),v(l,""),o(s,l,E),s.classList.remove("is-leaving");var w=!navigator.userActivation||navigator.userActivation.isActive;return s.showModal(),E.method==="passkey"&&w?i(s,l,E):m(l,E),!0}})(),(function(){var y=new Set,u=!1;function c(o){y.add(o),!u&&(u=!0,requestAnimationFrame(function(){u=!1;var p=Array.from(y);y.clear();var m=p.map(function(d){return d.place()});p.forEach(function(d,l){d.putPlace(m[l])});var i=p.map(function(d,l){return d.measure(m[l])});p.forEach(function(d,l){d.put(m[l],i[l])})}))}function n(o,p){var m=o.map(function(i){var d=i.tagName==="TEXTAREA"||i.tagName==="SELECT"&&(i.multiple||i.size>1);if(/^(SELECT|INPUT)$/.test(i.tagName)&&!d||i.nextElementSibling&&i.nextElementSibling.hasAttribute("data-rail")||getComputedStyle(i).scrollbarWidth==="none"||i.classList.contains("rail-thumb"))return null;var l=i.parentElement;return!l||l===document.body?null:{box:i,isControl:d,isParentStatic:getComputedStyle(l).position==="static"}});m.forEach(function(i){i&&(i.isParentStatic&&(i.box.parentElement.style.position="relative"),i.box.insertAdjacentHTML("afterend",'<div class="rail"'+(i.isControl?" data-rail-follows":"")+' data-rail="box" aria-hidden="true"><div class="rail-line"></div><div class="rail-thumb glass"></div></div>'))}),p.querySelectorAll("[data-side-rail]").forEach(function(i){i.nextElementSibling&&i.nextElementSibling.hasAttribute("data-rail")||i.insertAdjacentHTML("afterend",'<div class="rail sideways" data-rail="side" data-cut-line="0" aria-hidden="true"><div class="rail-line"></div><div class="rail-thumb glass"></div></div>')})}var h=new WeakSet;function v(){document.querySelectorAll("[data-rail]").forEach(function(o){if(h.has(o))return;h.add(o);var p=o.getAttribute("data-rail")==="page",m=o.getAttribute("data-rail")==="side",i=p?null:o.previousElementSibling;if(!p&&!i)return;var d=o.querySelector(".rail-line"),l=o.querySelector(".rail-thumb");p?document.documentElement.classList.add("own-scroll"):i.classList.add("own-scroll");var e=!0;o.classList.add("is-on");var s=function(){return parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||90},r=p?Array.prototype.filter.call(document.querySelectorAll("[data-rail-mark]"),function(W){return!W.closest("[data-rail-marks-own]")}):Array.prototype.filter.call(i.querySelectorAll("[data-rail-mark]"),function(W){var N=W.parentElement.closest("[data-side-rail], [data-rail-marks-own]");return!N||N===i||!i.contains(N)});!p&&r.length&&i.setAttribute("data-rail-marks-own","");function E(W,N){if(p)return W.getBoundingClientRect().top+window.scrollY-(N===void 0?s():N);var C=i.getBoundingClientRect(),B=W.getBoundingClientRect();return m?B.left-C.left+i.scrollLeft:B.top-C.top+i.scrollTop}var w=r.map(function(W){var N=document.createElement("button"),C=document.createElement("span");return N.type="button",N.className="rail-mark",N.tabIndex=-1,C.className="tag glass",C.textContent=W.getAttribute("data-rail-mark"),N.appendChild(C),o.appendChild(N),N.addEventListener("click",function(){var B=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth";p?window.scrollTo({top:E(W),behavior:B}):i.scrollTo(m?{left:E(W),behavior:B}:{top:E(W),behavior:B})}),{part:W,mark:N,name:C}}),x=4;function A(W){if(m){w.forEach(function(I){if(!I.mark.hidden){var tt=parseFloat(I.mark.style.left)||0,dt=I.size/2,Lt=Math.max(dt,Math.min(W-dt,tt));I.name.style.setProperty("--label-shift",(Lt-tt).toFixed(1)+"px")}});return}var N=w.filter(function(I){return!I.mark.hidden}).map(function(I){return{m:I,at:parseFloat(I.mark.style[m?"left":"top"])||0,size:I.size}}).sort(function(I,tt){return I.at-tt.at});N.forEach(function(I,tt){I.center=tt?Math.max(I.at,N[tt-1].center+(N[tt-1].size+I.size)/2+x):I.at});for(var C=N.length-1;C>=0;C--){var B=N[C],J=C===N.length-1?Math.max(B.at,W-B.size/2):N[C+1].center-(N[C+1].size+B.size)/2-x;B.center>J&&(B.center=J)}N.forEach(function(I,tt){var dt=tt?N[tt-1].center+(N[tt-1].size+I.size)/2+x:Math.min(I.at,I.size/2);I.center<dt&&(I.center=dt)}),N.forEach(function(I){I.m.name.style.setProperty("--label-shift",(I.center-I.at).toFixed(1)+"px")})}function P(){return p?window.scrollY:m?i.scrollLeft:i.scrollTop}function _(W){p?window.scrollTo(0,W):m?i.scrollLeft=W:i.scrollTop=W}function q(W){return m?W.clientX:W.clientY}var T={track:0,thumb:0,max:1},$=p?document.querySelector("[data-rail-starts-below]"):null,k=10,R={place:function(){var W={whole:p?document.documentElement.scrollHeight:m?i.scrollWidth:i.scrollHeight,view:p?window.innerHeight:m?i.clientWidth:i.clientHeight};return W.max=W.whole-W.view,$&&(W.top=Math.round($.getBoundingClientRect().bottom+k)+"px"),o.hasAttribute("data-rail-follows")&&(W.follows={top:i.offsetTop+8+"px",height:Math.max(0,i.offsetHeight-16)+"px",left:i.offsetLeft+i.offsetWidth-22+"px"}),W},putPlace:function(W){W.top&&(o.style.top=W.top),W.follows&&(o.style.top=W.follows.top,o.style.bottom="auto",o.style.height=W.follows.height,o.style.right="auto",o.style.left=W.follows.left),e!==W.max>4&&(e=W.max>4,o.classList.toggle("is-on",e)),p||i.classList.toggle("shows-rail",e)},measure:function(){if(!e)return null;var W=p&&w.length?s():0;return{track:m?o.clientWidth:o.clientHeight,at:P(),marks:w.map(function(N){var C=!!N.part.offsetParent;return C?{shown:!0,spot:E(N.part,W),size:m?N.name.offsetWidth:N.name.offsetHeight}:{shown:!1}})}},put:function(W,N){if(N){var C=N.track,B=W.max,J=Math.max(36,Math.round(C*W.view/W.whole));T={track:C,thumb:J,max:B},l.style[m?"width":"height"]=J+"px",ut(N.at),w.forEach(function(I,tt){var dt=N.marks[tt];if(I.mark.hidden=!dt.shown,!!dt.shown){var Lt=Math.max(0,Math.min(B,dt.spot));I.mark.style[m?"left":"top"]=((C-J)*Lt/B+J/2).toFixed(1)+"px",I.size=dt.size||(m?I.name.offsetWidth:I.name.offsetHeight)}}),A(C)}}},Y=!1;function at(){if(H){Y=!0;return}c(R)}function ut(W){e&&(l.style.transform=(m?"translateX(":"translateY(")+((T.track-T.thumb)*Math.min(1,(W===void 0?P():W)/T.max)).toFixed(1)+"px)")}var et=0,st=!1;function mt(){o.classList.contains("awake")||o.classList.add("awake"),clearTimeout(et),et=setTimeout(function(){o.classList.remove("awake")},1100)}(p?window:i).addEventListener("scroll",function(){mt(),!st&&(st=!0,requestAnimationFrame(function(){st=!1,ut()}))},{passive:!0}),window.zaismaWatch.resize(at),window.zaismaWatch.size(p?document.body:i.firstElementChild||i,at),$&&window.zaismaWatch.size($,at),p||window.zaismaWatch.page(function(W){W.some(function(N){return i.contains(N.target)})&&at()});var H=null,V=6,ct=8;function it(W){var N=q(W);if(!H.isTouch||!p)return N;var C=N+window.scrollY,B=N,J=1/0;return H.scrolls.forEach(function(I){var tt=C-I,dt=Math.abs(tt-H.last);dt<J&&(J=dt,B=tt)}),B}function ot(W,N){W.preventDefault();var C=P();if(N){var B=q(W)-(m?o.getBoundingClientRect().left:o.getBoundingClientRect().top)-T.thumb/2;_(Math.max(0,Math.min(1,B/(T.track-T.thumb)))*T.max)}H={y:q(W),last:q(W),from:P(),scrolls:[C,P()],isMoving:W.pointerType==="mouse",isTouch:W.pointerType!=="mouse"},o.classList.add("dragging");try{o.setPointerCapture(W.pointerId)}catch{}}l.addEventListener("pointerdown",function(W){ot(W,!1)}),d.addEventListener("pointerdown",function(W){ot(W,!0)}),o.addEventListener("pointermove",function(W){if(H){var N=it(W);if(H.last=N,!H.isMoving){if(Math.abs(N-H.y)<V)return;H.isMoving=!0,H.y=N,H.from=P()}var C=Math.max(0,Math.min(T.max,H.from+(N-H.y)*T.max/Math.max(1,T.track-T.thumb)));Math.abs(C-P())<1||(_(C),H.scrolls.push(P()),H.scrolls.length>ct&&H.scrolls.shift())}});function ft(){H=null,o.classList.remove("dragging"),Y&&(Y=!1,at())}function pt(W){if(!(!m||!w.length)){var N=H?(T.track-T.thumb)*Math.min(1,P()/T.max)+T.thumb/2:W.clientX-o.getBoundingClientRect().left,C=null,B=1/0;w.forEach(function(J){if(!J.mark.hidden){var I=Math.abs(parseFloat(J.mark.style.left)-N);I<B&&(B=I,C=J)}}),w.forEach(function(J){J.mark.classList.toggle("is-near",J===C)})}}function gt(){w.forEach(function(W){W.mark.classList.remove("is-near")})}o.addEventListener("pointermove",pt),o.addEventListener("pointerdown",pt),o.addEventListener("pointerleave",function(){H||gt()});var At=18;function bt(W){var N=!!(H&&H.isMoving);if(ft(),W.pointerType!=="mouse"&&gt(),!(!N||W.pointerType==="mouse"||!w.length)){var C=(T.track-T.thumb)*Math.min(1,P()/T.max)+T.thumb/2,B=null,J=At;w.forEach(function(I){if(!I.mark.hidden){var tt=Math.abs(parseFloat(I.mark.style[m?"left":"top"])-C);tt<=J&&(J=tt,B=I)}}),B&&B.mark.click()}}o.addEventListener("pointerup",bt),o.addEventListener("pointercancel",ft),at(),mt()})}n(window.zaismaWatch.scrollBoxes(),document),v(),window.zaismaWatch.page(function(o){var p=[],m=!1;o.forEach(function(i){Array.prototype.forEach.call(i.addedNodes||[],function(d){d.nodeType!==1||!d.isConnected||d.closest(".rail, svg, .edge, .cut-line")||(window.zaismaWatch.scrollBoxesIn(d).forEach(function(l){p.indexOf(l)<0&&p.push(l)}),(d.matches("[data-side-rail]")||d.querySelector("[data-side-rail]"))&&(m=!0))})}),!(!p.length&&!m)&&(n(p,document),v())})})(),(function(){var y=window.matchMedia("(prefers-reduced-motion: reduce)").matches;document.querySelectorAll("[data-row-arrows]").forEach(function(u){var c=u.querySelectorAll(".cut-btn"),n=c[0],h=c[1],v=document.getElementById(n.getAttribute("aria-controls"));if(!v)return;var o=u.getAttribute("data-scrolled-to");function p(){var i=v.scrollWidth-v.clientWidth;o&&i>2&&(v.scrollLeft=o==="end"?i:i/2,o=null);var d=v.scrollLeft>2,l=v.scrollLeft<i-2;n.disabled=!d,h.disabled=!l,u.hidden=i<=2}function m(i){v.scrollBy({left:i*v.clientWidth*.8,behavior:y?"auto":"smooth"})}n.addEventListener("click",function(){m(-1)}),h.addEventListener("click",function(){m(1)}),v.addEventListener("scroll",p,{passive:!0}),window.zaismaWatch.size(v,p),p()})})(),(function(){if(!window.zaismaWatch)return;function y(n){var h=Array.prototype.slice.call(n.children);n.classList.add("is-measuring");var v=0;n.classList.contains("widths-equal")&&h.forEach(function(l){l.classList.contains("fills")&&(v=Math.max(v,l.getBoundingClientRect().width))}),n.classList.remove("is-measuring");var o=v?Math.ceil(v)+"px":"";n.style.getPropertyValue("--equal-cell-width")!==o&&n.style.setProperty("--equal-cell-width",o);var p=n.classList.contains("is-wrapped");p&&n.classList.remove("is-wrapped");var m=getComputedStyle(n).direction==="rtl",i=null,d=!1;h.forEach(function(l){var e=l.getBoundingClientRect();if(!(e.width<1)){var s=m?-e.right:e.left;i!==null&&s<=i+.5&&(d=!0),i=s}}),d&&n.classList.add("is-wrapped")}window.zaismaWatch.each(".layout-row",function(n){y(n),window.zaismaWatch.size(n,function(){y(n)})}),document.fonts&&document.fonts.ready.then(function(){document.querySelectorAll(".layout-row").forEach(y)});var u=".stack-cell, .row-cell";function c(n){var h=n.children.length===1&&n.firstElementChild.hidden;n.classList.contains("holds-only-hidden")!==h&&n.classList.toggle("holds-only-hidden",h)}window.zaismaWatch.each(u,c),window.zaismaWatch.page(function(n){n.forEach(function(h){var v=h.type==="attributes"?h.target.parentElement:h.target;v&&v.matches&&v.matches(u)&&(h.type!=="attributes"||h.attributeName==="hidden")&&c(v)})})})(),(function(){var y=28,u=[],c=null;function n(e){var s=e.querySelector(":scope > table > thead");return{scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,headPx:s?s.offsetHeight:null}}function h(e,s){var r=s.scrollHeight>s.clientHeight+1,E=Math.min(y,s.scrollTop),w=Math.min(y,s.scrollHeight-s.clientHeight-s.scrollTop);e.style.setProperty("--fade-top",Math.max(0,E)+"px"),e.style.setProperty("--fade-bottom",Math.max(0,w)+"px"),s.headPx!==null&&e.style.setProperty("--fade-from",s.headPx+"px"),e.classList.toggle("is-fading",r),e.classList.toggle("is-scrollable",r)}function v(e){var s=e.map(n);e.forEach(function(r,E){h(r,s[E])})}function o(e){c=new Set,e();var s=Array.from(c);c=null,v(s)}function p(e){c?c.add(e):v([e])}function m(e){e.classList.toggle("is-scrollable",e.scrollHeight>e.clientHeight+1)}function i(){var e=Array.from(document.querySelectorAll("[data-scroll-box]")),s=e.map(function(r){return r.scrollHeight>r.clientHeight+1});e.forEach(function(r,E){r.classList.toggle("is-scrollable",s[E]),window.zaismaWatch.size(r.firstElementChild||r,function(){m(r)})}),d(window.zaismaWatch.scrollBoxes())}function d(e){var s=e.filter(function(r){return!(r.classList.contains("scroll-fades")||/^(TEXTAREA|SELECT|INPUT)$/.test(r.tagName)||r.hasAttribute("data-scroll-box")||r.hasAttribute("data-own-fade"))});u=u.filter(function(r){return r.isConnected}),s.forEach(function(r){r.classList.add("scroll-fades"),u.push(r);var E=!1;r.addEventListener("scroll",function(){E||(E=!0,requestAnimationFrame(function(){E=!1,p(r)}))},{passive:!0}),window.zaismaWatch.size(r,function(){p(r)},o)}),v(s)}i(),window.zaismaWatch.page(function(e){var s=[];e.forEach(function(r){Array.prototype.forEach.call(r.addedNodes||[],function(E){E.nodeType!==1||!E.isConnected||E.closest(".rail, svg, .edge, .cut-line")||window.zaismaWatch.scrollBoxesIn(E).forEach(function(w){s.indexOf(w)<0&&s.push(w)})})}),s.length&&d(s)}),window.zaismaWatch.resize(function(){v(u)});var l=window.matchMedia("(prefers-reduced-motion: reduce)").matches;document.querySelectorAll("[data-fades-sideways]").forEach(function(e){function s(){return Array.prototype.filter.call(e.querySelectorAll(":scope > *, :scope > * > *"),function(k){return k.classList.contains("folded")||k.hasAttribute("aria-hidden")||k.children.length&&k.parentElement===e&&k.querySelector(":scope > a, :scope > button, :scope > .cover")?!1:k.getBoundingClientRect().width>=1&&!/^(absolute|fixed)$/.test(getComputedStyle(k).position)})}var r=null;function E(){var k=e.getBoundingClientRect(),R=1/0,Y=-1/0,at=e.scrollLeft;s().forEach(function(ut){var et=ut.getBoundingClientRect();R=Math.min(R,et.left),Y=Math.max(Y,et.right)}),r={start:R===1/0?null:R-k.left+at,end:Y-k.left+at,width:e.clientWidth,whole:e.scrollWidth}}function w(){r||E();var k=e.scrollLeft,R=k,Y=r.whole-r.width-k;return r.start===null?{before:R,after:Y}:{before:Math.max(k-r.start,R),after:Math.max(r.end-k-r.width,Y)}}function x(){var k=w();return e.classList.toggle("more-left",k.before>2),e.classList.toggle("more-right",k.after>2),k}var A=e.querySelector('[aria-current="page"], [aria-pressed="true"]'),P=!1;function _(){A&&!P&&e.scrollWidth-e.clientWidth>1&&(P=!0,e.showWhole(A,!1))}function q(){r=null,_();var k=x();e.classList.toggle("is-scrollable-sideways",k.before+k.after>2)}function T(k){var R=k.getBoundingClientRect(),Y=R.left-e.getBoundingClientRect().left+e.scrollLeft;return{start:Y,end:Y+R.width}}e.showWhole=function(k,R){var Y=getComputedStyle(e),at=e.scrollWidth-e.clientWidth,ut=e.scrollLeft,et=T(k),st=parseFloat(Y.scrollPaddingLeft)||0,mt=parseFloat(Y.getPropertyValue("--fade-sideways-px"))||st;if(!(at<=1)){var H=function(ct){return ct<at-1?mt:0},V=ut;if(et.start<ut+(ut>1?st:0)?V=et.start-st:et.end>ut+e.clientWidth-H(ut)&&(V=et.start-st,s().some(function(ct){var it=Math.max(0,Math.min(at,T(ct).start-st));return it>ut&&et.end<=it+e.clientWidth-H(it)?(V=it,!0):!1})),V=Math.max(0,Math.min(at,V)),!(Math.abs(V-ut)<1)){if(!R||l){e.scrollLeft=V;return}e.scrollTo({left:V,behavior:"smooth"}),clearTimeout(e.settleTimer),e.settleTimer=setTimeout(function(){Math.abs(e.scrollLeft-V)>1&&e.scrollTo({left:V,behavior:"smooth"})},450)}}},A&&document.fonts&&document.fonts.ready&&document.fonts.ready.then(function(){P&&e.showWhole(A,!1)});var $=!1;e.addEventListener("scroll",function(){$||($=!0,requestAnimationFrame(function(){$=!1,x()}))},{passive:!0}),window.zaismaWatch.size(e,q),e.firstElementChild&&window.zaismaWatch.size(e.firstElementChild,q),q()})})(),(function(){var y=24;document.querySelectorAll("[data-compacts]").forEach(function(u){if(u.hasAttribute("data-stays-compact")){u.classList.add("is-compact");return}var c=u.parentElement&&u.parentElement.querySelector(":scope > [data-scroll-box]"),n=c||window;function h(){return c?c.scrollTop:window.scrollY}function v(){var o=h();o>y?u.classList.add("is-compact"):o<=0&&u.classList.remove("is-compact")}n.addEventListener("scroll",v,{passive:!0}),v()})})(),(function(){document.addEventListener("click",function(c){var n=c.target.closest&&c.target.closest("[data-load-more] > a.shell[href]");if(!(!n||c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey)){var h=n.parentElement,v=h.getAttribute("data-load-more").split(" "),o=document.getElementById(v[0]),p=h.querySelector(".load-more-words");o&&(c.preventDefault(),n.getAttribute("aria-busy")!=="true"&&(n.setAttribute("aria-busy","true"),fetch(n.href,{headers:{accept:"text/html"},credentials:"same-origin"}).then(function(m){if(!m.ok)throw new Error(String(m.status));return m.text()}).then(function(m){var i=new DOMParser().parseFromString(m,"text/html");if(!i.getElementById(o.id)){location.href=n.href;return}v.forEach(function(e){var s=document.getElementById(e),r=i.getElementById(e);if(!(!s||!r||!r.children.length)){Array.prototype.slice.call(r.children).forEach(function(w){s.appendChild(document.importNode(w,!0))}),s.dispatchEvent(new Event("scroll"));var E=s.closest("[hidden]");E&&(E.hidden=!1)}});var d=i.querySelector("[data-load-more]");if(d){var l=document.importNode(d,!0);h.replaceWith(l),u(l)}else h.remove()}).catch(function(){n.removeAttribute("aria-busy"),h.classList.add("is-failed"),p&&(p.textContent="That didn't load. Check your connection, then try again.",p.hidden=!1)})))}});var y="IntersectionObserver"in window?new IntersectionObserver(function(c){c.forEach(function(n){var h=n.target.querySelector("a.shell[href]");n.isIntersecting&&h&&!n.target.classList.contains("is-failed")&&h.click()})},{rootMargin:"100% 0px"}):null;function u(c){y&&c.hasAttribute("data-loads-on-scroll")&&y.observe(c)}document.querySelectorAll("[data-loads-on-scroll]").forEach(u),window.zaismaLoadMore={watch:u}})(),(function(){var y=56,u=32,c=8,n=null,h=function(){return matchMedia("(prefers-reduced-motion: reduce)").matches},v=function(d){return!d.classList.contains("in-place")&&!d.querySelector("a, button, input, select, textarea")};function o(d){d.classList.remove("is-swiping"),["--swipe-x","--swipe-y","--swipe-opacity"].forEach(function(l){d.style.removeProperty(l)})}function p(d,l,e){d.classList.remove("is-swiping"),!h()&&l==="x"&&d.style.setProperty("--swipe-x",e*d.offsetWidth+"px"),!h()&&l==="y"&&d.style.setProperty("--swipe-y",-d.offsetHeight+"px"),d.hidden=!0}var m=new WeakSet;function i(d){m.has(d)||(m.add(d),new MutationObserver(function(){d.hidden||o(d)}).observe(d,{attributes:!0,attributeFilter:["hidden"]}))}document.querySelectorAll(".playing-card").forEach(i),document.addEventListener("pointerdown",function(d){var l=d.target.closest&&d.target.closest(".playing-card");!l||l.hidden||!v(l)||d.pointerType==="mouse"&&d.button!==0||(i(l),n={card:l,id:d.pointerId,x:d.clientX,y:d.clientY,axis:"",dx:0,dy:0})}),document.addEventListener("pointermove",function(d){if(!(!n||d.pointerId!==n.id)){var l=d.clientX-n.x,e=d.clientY-n.y;if(!n.axis){if(Math.max(Math.abs(l),Math.abs(e))<c)return;if(n.axis=Math.abs(l)>=Math.abs(e)?"x":e<0?"y":"none",n.axis==="none"){n=null;return}try{n.card.setPointerCapture(d.pointerId)}catch{}h()||n.card.classList.add("is-swiping")}if(n.dx=l,n.dy=Math.min(0,e),!h()){var s=n.axis==="x"?Math.abs(n.dx)/n.card.offsetWidth:-n.dy/n.card.offsetHeight;n.card.style.setProperty(n.axis==="x"?"--swipe-x":"--swipe-y",(n.axis==="x"?n.dx:n.dy)+"px"),n.card.style.setProperty("--swipe-opacity",String(Math.max(0,1-s)))}}}),document.addEventListener("pointerup",function(d){if(!(!n||d.pointerId!==n.id)){var l=n.card,e=n.axis,s=n.dx,r=n.dy;n=null,!e||e==="x"&&Math.abs(s)>=y||e==="y"&&-r>=u?p(l,e,s<0?-1:1):o(l)}}),document.addEventListener("pointercancel",function(d){!n||d.pointerId!==n.id||(o(n.card),n=null)}),document.addEventListener("keydown",function(d){d.key==="Escape"&&document.querySelectorAll(".playing-card:not([hidden])").forEach(function(l){v(l)&&p(l,"",1)})})})();
8945
9069
  ` };
8946
9070
 
8947
9071
  // ../../apps/site/src/components/component.ts
@@ -8977,6 +9101,8 @@ var ICONS = {
8977
9101
  clock: stroke("0 0 16 16", '<circle cx="8" cy="8" r="5.8"/><path d="M8 4.8V8l2.2 1.5"/>', ' stroke-width="1.28"'),
8978
9102
  calendar: stroke("0 0 20 20", '<path d="M3.5 5h13v11.5h-13z"/><path d="M3.5 8.6h13M7 3.2v3.4M13 3.2v3.4"/>'),
8979
9103
  // A bank card, for the card a buy is paid with.
9104
+ // Buying: a paid game's Buy.
9105
+ cart: stroke("0 0 20 20", '<path d="M2.5 3.5h2.2l2 9.4h8.7l1.8-6.6H5.5"/><circle cx="8" cy="16.2" r="1.2"/><circle cx="14" cy="16.2" r="1.2"/>'),
8980
9106
  card: stroke("0 0 20 20", '<path d="M2.5 5h15v10h-15z"/><path d="M2.5 8.6h15M5.4 12.2h3"/>'),
8981
9107
  lock: stroke("0 0 20 20", '<path d="M4.5 9h11v8.5h-11z"/><path d="M7 9V6.6a3 3 0 0 1 6 0V9"/><path d="M10 12.4v2"/>'),
8982
9108
  mail: stroke("0 0 20 20", '<path d="M3 5h14v10.5H3z"/><path d="M3.4 5.6 10 11l6.6-5.4"/>'),
@@ -12435,7 +12561,9 @@ component({
12435
12561
  styles: `
12436
12562
  /* Icons: the set, with names. */
12437
12563
  .icon-set { width: 100%; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--gap-block-block); color: var(--ink); }
12438
- .icon-set li { display: flex; align-items: center; gap: var(--gap-words-words); font: var(--type-facts); color: var(--ink-2); }
12564
+ /* A name wraps rather than widen its column: at large text, the longest names would push the set past the page. */
12565
+ .icon-set li { display: flex; align-items: center; gap: var(--gap-words-words); min-width: 0; font: var(--type-facts); color: var(--ink-2); }
12566
+ .icon-set li span { min-width: 0; overflow-wrap: anywhere; }
12439
12567
  .icon-set .ico { width: 20px; height: 20px; color: var(--ink); }
12440
12568
  .icon-set .play { width: 20px; height: 20px; color: var(--ink); }
12441
12569
  `,
@@ -13187,6 +13315,10 @@ component({
13187
13315
  { label: "On no pane: cut as if it were in one", markup: html`<div class="control-row">${runButton("Play", { type: "button", icon: "play" })}${cutButton("Details", { type: "button" })}</div>` }
13188
13316
  ]
13189
13317
  });
13318
+ function rowArrows(options) {
13319
+ const arrow = (way) => cutButton(`Scroll ${options.rowName} ${way}`, { type: "button", icon: way === "back" ? "arrow-back" : "arrow-on", isLabelHidden: true, isInWell: true, controls: options.trackId });
13320
+ return controlMarkup(html`<div class="steps cut-carved" data-row-arrows${options.scrolledTo ? html` data-scrolled-to="${options.scrolledTo}"` : ""} data-cut-line="9">${CUT_LINE}${arrow("back")}${arrow("on")}</div>`, "small", { isPointerOnly: true });
13321
+ }
13190
13322
 
13191
13323
  // ../../apps/site/src/components/example-pane.ts
13192
13324
  var examplePane = (body) => glassPane({ paneWidth: "fit", body });
@@ -13858,13 +13990,13 @@ function tabSwitch(options) {
13858
13990
  const kind = `${options.switchSize}${options.isVertical ? " vertical" : ""}`;
13859
13991
  const classNames = (tab2) => [tab2.isFoldable ? "foldable" : "", tab2.isFoldable && tab2.isFolded ? "folded" : "", tab2.state ?? ""].filter(Boolean).join(" ");
13860
13992
  const folding = (tab2) => html`${classNames(tab2) ? html` class="${classNames(tab2)}"` : ""}${tab2.isFoldable && tab2.isFolded ? raw(' tabindex="-1" aria-hidden="true"') : ""}`;
13861
- const own = options.isFramed ? html`<div class="switch-frame cut-carved ${options.switchSize}" data-cut-line="${isSmall ? 9 : 10}">${CUT_LINE}<div class="switch-frame-row" data-fades-sideways><div class="tab-switch framed ${kind}" role="group" aria-label="${options.label}">` : html`<div class="tab-switch cut-carved ${kind}" role="group" aria-label="${options.label}" data-cut-line="${isSmall ? 9 : 10}">${CUT_LINE}`;
13993
+ const own = options.isFramed ? html`${options.rowId ? raw('<div class="switch-scroll">') : ""}<div class="switch-frame cut-carved ${options.switchSize}" data-cut-line="${isSmall ? 9 : 10}">${CUT_LINE}<div class="switch-frame-row"${options.rowId ? html` id="${options.rowId}"` : ""} data-fades-sideways><div class="tab-switch framed ${kind}" role="group" aria-label="${options.label}">` : html`<div class="tab-switch cut-carved ${kind}" role="group" aria-label="${options.label}" data-cut-line="${isSmall ? 9 : 10}">${CUT_LINE}`;
13862
13994
  return controlMarkup(html`${own}<span class="ghost" aria-hidden="true" data-cut-line="${isSmall ? 7 : 8}"></span><span class="slab cut-raised" aria-hidden="true" data-cut-line="${isSmall ? 7 : 8}">${CUT_LINE}</span><span class="focus-ring" aria-hidden="true" data-cut-line="${isSmall ? 7 : 8}">${CUT_LINE}</span>${options.tabs.map(
13863
13995
  (tab2) => tab2.href ? (
13864
13996
  // A link that can't be followed now has no address, so nothing reaches it; it still says what it is.
13865
13997
  html`<a${tab2.isDisabled ? raw(' aria-disabled="true"') : html` href="${tab2.href}"`}${folding(tab2)}${tab2.extra ?? ""}${tab2.isCurrent ? raw(' aria-current="page"') : ""}>${inside(tab2)}</a>`
13866
13998
  ) : html`<button type="button"${folding(tab2)}${tab2.extra ?? ""}${tab2.tabValue !== void 0 ? html` value="${tab2.tabValue}"` : ""} aria-pressed="${tab2.isCurrent ? "true" : "false"}"${tab2.isDisabled ? raw(" disabled") : ""}>${inside(tab2)}</button>`
13867
- )}</div>${options.isFramed ? raw("</div></div>") : ""}`, isSmall ? "small" : "regular");
13999
+ )}</div>${options.isFramed ? raw("</div></div>") : ""}${options.isFramed && options.rowId ? html`${rowArrows({ rowName: options.label, trackId: options.rowId })}</div>` : ""}`, isSmall ? "small" : "regular");
13868
14000
  }
13869
14001
  var SWITCH_SCRIPT = `/* switches */(function () {
13870
14002
  window.zaismaWatch.each(".tab-switch", function (sw) {
@@ -14043,6 +14175,12 @@ component({
14043
14175
  .switch-frame { position: relative; display: flex; flex: none; min-width: 0; height: var(--switch-height, var(--control-height-regular)); background: var(--well); box-shadow: var(--well-shade); clip-path: var(--cut-shape);
14044
14176
  transition: height 0.45s cubic-bezier(.2,.8,.2,1); }
14045
14177
  .switch-frame.small { height: var(--switch-height, var(--control-height-small)); }
14178
+ /* With Row arrows (rowId): one control, the frame then the arrows a mouse scrolls it with, which show only while its tabs don't fit. */
14179
+ .switch-scroll { display: flex; align-items: center; min-width: 0; max-width: 100%; }
14180
+ /* The room between them goes on the arrows, so the frame reaches the row's end where they're hidden (a touch screen, or tabs that fit);
14181
+ they're as tall as the frame, so a big switch's arrows keep to the pane's edges as it does. */
14182
+ .switch-scroll > .switch-frame { flex: 0 1 auto; margin-inline-end: 0; }
14183
+ .switch-scroll > .steps { align-self: stretch; height: auto; margin-inline-start: var(--gap-control-row-boxes); }
14046
14184
  /* At rest a row of tabs that scrolls shows them whole at its start: it snaps a tab's start to just past the fade there (SCROLL_FADE_SCRIPT
14047
14185
  starts it where the one you're on shows whole). That fade is as wide as a tab's room round its words, so the words of the tab before
14048
14186
  are wholly out of view, never cut, and the slab of the one you're on is never faded; the fade at its end stays the usual one
@@ -14142,6 +14280,10 @@ component({
14142
14280
  label: "Framed: more tabs than fit scroll inside the frame, fading at its ends",
14143
14281
  markup: html`<div style="width:min(300px,100%)">${tabSwitch({ label: "Groups", switchSize: "small", isFramed: true, tabs: ["Foundations", "Actions", "Inputs", "Navigation", "Panes", "Data"].map((label, tabIndex) => ({ label, href: "#switch", isCurrent: tabIndex === 2 })) })}</div>`
14144
14282
  },
14283
+ {
14284
+ label: "Framed, with Row arrows: a mouse scrolls the tabs that don't fit (a touch screen swipes and shows none)",
14285
+ markup: html`<div style="width:min(360px,100%)">${tabSwitch({ label: "Genres", switchSize: "small", isFramed: true, rowId: "example-switch-arrows-row", tabs: ["Action", "Adventure", "Role-playing", "Shooter", "Strategy", "Simulation", "Racing", "Sports"].map((label, tabIndex) => ({ label, href: "#switch", isCurrent: tabIndex === 0 })) })}</div>`
14286
+ },
14145
14287
  {
14146
14288
  label: "Framed, with tabs folded away (the header off a developer page)",
14147
14289
  markup: tabSwitch({ label: "Main", switchSize: "big", isFramed: true, tabs: [{ label: "Home", href: "#switch", isCurrent: true }, { label: "Your games", href: "#switch", isCurrent: false }, { label: "Developer", href: "#switch", isCurrent: false, isFoldable: true, isFolded: true }, { label: "Forum", href: "#switch", isCurrent: false, isFoldable: true, isFolded: true }] })
@@ -15872,8 +16014,9 @@ function coverFacts(facts2, title) {
15872
16014
  const nowMs = Date.now();
15873
16015
  const friends = facts2.friends ?? [];
15874
16016
  const left = facts2.deviceNote ? html`<span class="device-note">${facts2.deviceNote}</span>` : facts2.playedAtMs !== void 0 ? html`<span class="when">${icon("clock")}<span><span class="sr">Played </span>${ago(nowMs - facts2.playedAtMs)}</span></span>${facts2.updatedAtMs !== void 0 ? html`${tag("Updated", "new")}` : ""}` : friends.length ? html`<span class="friends">${pictureRow(friends.map((friend) => friend.username), "xs")}<span>${friends.map((friend) => friend.username).join(", ")}<span class="sr"> playing</span></span></span>` : "";
15875
- if (title !== void 0) return html`<div class="cover-meta has-title"><span class="cover-name">${title}</span>${facts2.playerCount !== void 0 ? html`<span class="count">${icon("people")}<span>${facts2.playerCount.toLocaleString("en-US")}<span class="sr"> playing now</span></span></span>` : ""}${left ? html`<span class="cover-more">${left}</span>` : ""}</div>`;
15876
- return html`<div class="cover-meta">${left}${facts2.playerCount !== void 0 ? html`<span class="count">${icon("people")}<span>${facts2.playerCount.toLocaleString("en-US")}<span class="sr"> playing now</span></span></span>` : ""}</div>`;
16017
+ const priced = facts2.priceText ? html`${tag(facts2.priceText, "plain")}${left}` : left;
16018
+ if (title !== void 0) return html`<div class="cover-meta has-title"><span class="cover-name">${title}</span>${facts2.playerCount !== void 0 ? html`<span class="count">${icon("people")}<span>${facts2.playerCount.toLocaleString("en-US")}<span class="sr"> playing now</span></span></span>` : ""}${priced ? html`<span class="cover-more">${priced}</span>` : ""}</div>`;
16019
+ return html`<div class="cover-meta">${priced}${facts2.playerCount !== void 0 ? html`<span class="count">${icon("people")}<span>${facts2.playerCount.toLocaleString("en-US")}<span class="sr"> playing now</span></span></span>` : ""}</div>`;
15877
16020
  }
15878
16021
  function coverSizes(imageUrl, shownSizes = "(max-width: 760px) 200px, 260px", largestPx = COVER_LARGEST_PX) {
15879
16022
  if (!/^\/img\/[A-Za-z0-9_-]+$/.test(imageUrl)) return raw("");
@@ -15929,7 +16072,13 @@ var DROPDOWN_SCRIPT = `/* menus */(function () {
15929
16072
  menu.style.removeProperty("--menu-room");
15930
16073
  menu.style.setProperty("--menu-room-width", Math.max(0, end - start - 2 * edgePx) + "px");
15931
16074
  var spot = window.zaismaPlace(anchor, { width: menu.offsetWidth, height: menu.offsetHeight }, { roomRect: room, gapPx: gapPx, edgePx: edgePx, isAlwaysBelow: !!slab });
15932
- menu.style.setProperty("--menu-room", Math.max(0, spot.isAbove ? anchor.top - gapPx - top - edgePx : foot - anchor.bottom - gapPx - edgePx) + "px");
16075
+ var roomPx = Math.max(0, spot.isAbove ? anchor.top - gapPx - top - edgePx : foot - anchor.bottom - gapPx - edgePx);
16076
+ menu.style.setProperty("--menu-room", roomPx + "px");
16077
+ // Choices that would scroll by a sliver (a few pixels taller than the room, as a Filter menu's prices on a phone) show them all instead:
16078
+ // a scroll that short only bounces under a finger.
16079
+ var shownChoices = Array.prototype.find.call(menu.querySelectorAll(".dropdown-in"), function (box) { return box.offsetParent !== null; });
16080
+ var extraPx = shownChoices ? shownChoices.scrollHeight - shownChoices.clientHeight : 0;
16081
+ if (extraPx > 0 && extraPx < 12) menu.style.setProperty("--menu-room", Math.ceil(roomPx + extraPx) + "px");
15933
16082
  spot = window.zaismaPlace(anchor, { width: menu.offsetWidth, height: menu.offsetHeight }, { roomRect: room, gapPx: gapPx, edgePx: edgePx, isAlwaysBelow: !!slab });
15934
16083
  menu.classList.toggle("from-start", !spot.isAtEnd); menu.classList.toggle("is-above", spot.isAbove);
15935
16084
  menu.style.top = (spot.topPx - origin.top) + "px";
@@ -15946,6 +16095,8 @@ var DROPDOWN_SCRIPT = `/* menus */(function () {
15946
16095
  function shown() { menus = menus.filter(function (menu) { return menu.isConnected; }); return menus; }
15947
16096
  window.zaismaWatch.each('.dropdown[role="menu"]', function (menu) {
15948
16097
  menus.push(menu);
16098
+ // A menu whose height changes while it's open (a Filter menu turning to a group's choices) is placed again by its own script.
16099
+ menu.zaismaPlace = function () { place(menu); };
15949
16100
  if (!menu.classList.contains("shut")) requestAnimationFrame(function () { place(menu); });
15950
16101
  menu.addEventListener("keydown", function (event) {
15951
16102
  var list = items(menu), at = list.indexOf(document.activeElement);
@@ -15953,7 +16104,8 @@ var DROPDOWN_SCRIPT = `/* menus */(function () {
15953
16104
  if (event.key === "Home" || event.key === "End") { event.preventDefault(); list[event.key === "Home" ? 0 : list.length - 1].focus(); }
15954
16105
  if (event.key === "Escape" || event.key === "Tab") { toggle(menu, false); if (event.key === "Escape") { var button = buttonOf(menu); if (button) button.focus(); } }
15955
16106
  });
15956
- menu.addEventListener("click", function (event) { if (event.target.closest('[role="menuitem"]')) toggle(menu, false); });
16107
+ // A choice that opens more choices in the same menu (aria-haspopup) keeps it open.
16108
+ menu.addEventListener("click", function (event) { if (event.target.closest('[role="menuitem"]:not([aria-haspopup])')) toggle(menu, false); });
15957
16109
  });
15958
16110
  document.addEventListener("click", function (event) {
15959
16111
  var button = event.target.closest && event.target.closest("[aria-controls][aria-expanded]");
@@ -15966,6 +16118,8 @@ var DROPDOWN_SCRIPT = `/* menus */(function () {
15966
16118
  });
15967
16119
  function placeAll() { shown().forEach(place); }
15968
16120
  window.zaismaWatch.resize(placeAll);
16121
+ // An open menu is measured again once the fonts are in, when its choices have their real height.
16122
+ if (document.fonts) document.fonts.ready.then(placeAll);
15969
16123
  window.zaismaWatch.scroll(placeAll);
15970
16124
  })();
15971
16125
  `;
@@ -16205,6 +16359,22 @@ component({
16205
16359
  }
16206
16360
  ]
16207
16361
  });
16362
+ function filterTags(options) {
16363
+ return row({ widths: "fit", label: "Filters in use: each removes itself", items: options.tags.map((filter2) => control(cutButton(filter2.label, { href: filter2.removeHref, icon: "close", isSmall: true }))) });
16364
+ }
16365
+ component({
16366
+ name: "Filter tags",
16367
+ slug: "filter-tags",
16368
+ group: "panes",
16369
+ summary: "The filters in use on a list, under its Filter button: one small button each, with a close mark, that takes it away.",
16370
+ // A Row of its buttons (layout.ts): they wrap onto more lines where they don't fit across.
16371
+ styles: "",
16372
+ render: filterTags,
16373
+ examples: [
16374
+ { label: "Two in use", markup: filterTags({ tags: [{ label: "Adventure", removeHref: "#filter-tags" }, { label: "$15 to $30", removeHref: "#filter-tags" }] }) },
16375
+ { label: "Many, wrapping", markup: html`<div style="width:min(260px,100%)">${filterTags({ tags: [{ label: "Role-playing", removeHref: "#filter-tags" }, { label: "Multiplayer", removeHref: "#filter-tags" }, { label: "$30 and up", removeHref: "#filter-tags" }] })}</div>` }
16376
+ ]
16377
+ });
16208
16378
  component({
16209
16379
  name: "Game cover",
16210
16380
  slug: "game-cover",
@@ -16219,6 +16389,7 @@ component({
16219
16389
  { label: "In focus", markup: html`<div class="cover-sample">${gameCover({ title: "Verdant", imageUrl: "/design/covers/verdant.webp", href: "#verdant", facts: { playerCount: 96 }, isCurrent: true })}</div>`, isStill: true },
16220
16390
  { label: "On a loop", markup: html`<div class="cover-sample" data-state-loop="cover">${standInCovers(["iron-vigil"])}</div>`, isStill: true },
16221
16391
  { label: "Made for another device", markup: html`<div class="cover-sample">${gameCover({ title: "Verdant", imageUrl: "/design/covers/verdant.webp", href: "#verdant", facts: { deviceNote: "Needs a keyboard" } })}</div>` },
16392
+ { label: "A paid game", markup: html`<div class="cover-sample">${gameCover({ title: "Hollow Tide", imageUrl: "/design/covers/hollow-tide.webp", href: "#hollow-tide", facts: { priceText: "$24.99", playerCount: 412 } })}</div>` },
16222
16393
  { label: "No cover yet", markup: html`<div class="cover-sample">${gameCover({ title: "The Last Lighthouse Keeper", imageUrl: null, href: "#game-cover", facts: { playerCount: 38 } })}</div>` },
16223
16394
  { label: "With its title, for another device", markup: html`<div class="cover-sample">${gameCover({ title: "The Last Lighthouse Keeper", imageUrl: null, href: "#game-cover", facts: { playerCount: 38, deviceNote: "Needs a keyboard" }, isTitleShown: true })}</div>` },
16224
16395
  {
@@ -17319,10 +17490,6 @@ var RAIL_SCRIPT = `/* rail */(function () {
17319
17490
  });
17320
17491
  })();
17321
17492
  `;
17322
- function rowArrows(options) {
17323
- const arrow = (way) => cutButton(`Scroll ${options.rowName} ${way}`, { type: "button", icon: way === "back" ? "arrow-back" : "arrow-on", isLabelHidden: true, isInWell: true, controls: options.trackId });
17324
- return controlMarkup(html`<div class="steps cut-carved" data-row-arrows${options.scrolledTo ? html` data-scrolled-to="${options.scrolledTo}"` : ""} data-cut-line="9">${CUT_LINE}${arrow("back")}${arrow("on")}</div>`, "small", { isPointerOnly: true });
17325
- }
17326
17493
  var SCROLL_FADE_SCRIPT = `/* scroll fades */(function () {
17327
17494
  var FADE_PX = 28, boxes = [], dueBoxes = null;
17328
17495
  // Everything is read before anything is written, so a box syncing reads the page's layout once.
@@ -17796,10 +17963,10 @@ component({
17796
17963
  ]
17797
17964
  });
17798
17965
  function sectionTabs(options) {
17799
- return html`<nav class="section-tabs" aria-label="${options.label}">${tabSwitch({ label: options.label, switchSize: "big", isFramed: true, tabs: options.tabs })}</nav>`;
17966
+ return html`<nav class="section-tabs" aria-label="${options.label}">${tabSwitch({ label: options.label, switchSize: "big", isFramed: true, rowId: options.rowId, tabs: options.tabs })}</nav>`;
17800
17967
  }
17801
17968
  function sidePlaces(options) {
17802
- return html`<div class="side-places"><div class="side-places-in"><nav class="side-places-side" aria-label="${options.label}">${glassPane({ paneWidth: "fit", body: tabSwitch({ label: options.label, switchSize: "big", isVertical: true, tabs: options.places }) })}</nav><div class="side-places-top">${sectionTabs({ label: options.label, tabs: options.places.map((place) => ({ label: place.label, href: place.href, isCurrent: place.isCurrent, badgeCount: place.badgeCount, state: place.state })) })}</div><div class="side-places-body">${options.body}</div></div></div>`;
17969
+ return html`<div class="side-places"><div class="side-places-in"><nav class="side-places-side" aria-label="${options.label}">${glassPane({ paneWidth: "fit", body: tabSwitch({ label: options.label, switchSize: "big", isVertical: true, tabs: options.places }) })}</nav><div class="side-places-top">${sectionTabs({ label: options.label, rowId: options.rowId, tabs: options.places.map((place) => ({ label: place.label, href: place.href, isCurrent: place.isCurrent, badgeCount: place.badgeCount, state: place.state })) })}</div><div class="side-places-body">${options.body}</div></div></div>`;
17803
17970
  }
17804
17971
  var SIDE_PLACES_LEAST_PX = 760;
17805
17972
  component({
@@ -17855,7 +18022,7 @@ component({
17855
18022
  /* Section tabs: the header's framed switch for a page's own sections. As wide as its tabs, and never wider than the page: past that
17856
18023
  they scroll sideways inside their frame, fading out over a side with more, and rest on whole tabs, starting where the one you're on shows whole. */
17857
18024
  .section-tabs { display: flex; min-width: 0; max-width: 100%; }
17858
- .section-tabs > .switch-frame { flex: 0 1 auto; }
18025
+ .section-tabs > .switch-frame, .section-tabs > .switch-scroll { flex: 0 1 auto; }
17859
18026
  `,
17860
18027
  render: sectionTabs,
17861
18028
  examples: [
@@ -17875,7 +18042,7 @@ component({
17875
18042
  isStill: true,
17876
18043
  markup: sectionTabs({ label: "Profile sections", tabs: PROFILE_SECTIONS.slice(0, 3).map((label, tabIndex) => ({ label, href: "#section-tabs", isCurrent: tabIndex === 0, state: tabIndex === 1 ? "is-focused" : void 0 })) })
17877
18044
  },
17878
- { label: "In a narrow pane: they scroll to the one you pick", markup: glassPane({ paneWidth: "fit", body: sectionTabs({ label: "Profile sections", tabs: PROFILE_SECTIONS.map((label, tabIndex) => ({ label, href: "#section-tabs", isCurrent: tabIndex === 2 })) }) }) }
18045
+ { label: "In a narrow pane: they scroll to the one you pick, and a mouse has Row arrows", markup: glassPane({ paneWidth: "fit", body: sectionTabs({ label: "Profile sections", rowId: "example-section-tabs-row", tabs: PROFILE_SECTIONS.map((label, tabIndex) => ({ label, href: "#section-tabs", isCurrent: tabIndex === 2 })) }) }) }
17879
18046
  ]
17880
18047
  });
17881
18048
  var LOAD_FAILED_TEXT = "That didn't load. Check your connection, then try again.";
@@ -17958,6 +18125,78 @@ component({
17958
18125
  }
17959
18126
  ]
17960
18127
  });
18128
+ function filterMenu(options) {
18129
+ const choice = (label, href, isCurrent, choiceIcon) => html`<a href="${href}" class="dropdown-choice" role="menuitem" tabindex="-1" data-cut-line="8"${isCurrent ? raw(' aria-current="page"') : ""}>${CUT_LINE}${choiceIcon ? icon(choiceIcon) : ""}<span>${label}</span></a>`;
18130
+ const button = cutButton("Filter", { type: "button", icon: "filter", controls: options.id, isExpanded: Boolean(options.isOpen), reactionCount: options.filterCount || void 0 });
18131
+ const opener = (groupName, inside, className) => html`<button type="button" class="dropdown-choice ${className}" role="menuitem" tabindex="-1" aria-haspopup="menu" data-cut-line="8" data-filter-opens="${groupName}">${CUT_LINE}${inside}</button>`;
18132
+ const main = html`<div class="dropdown-in filter-panel" data-filter-panel=""${options.openGroupName ? raw(" hidden") : ""}>${options.groups.map(
18133
+ (group) => opener(group.groupName, html`<span>${group.label}</span><span class="filter-picked">${group.pickedLabel}</span>${icon("chevron-right")}`, "filter-group")
18134
+ )}${options.clearHref ? html`<hr role="separator">${choice("Clear filters", options.clearHref, false, "close")}` : ""}</div>`;
18135
+ const panels = options.groups.map(
18136
+ (group) => html`<div class="dropdown-in filter-panel" data-filter-panel="${group.groupName}"${options.openGroupName === group.groupName ? "" : raw(" hidden")}>${opener("", html`${icon("arrow-back")}<span>${group.label}</span>`, "filter-back")}<hr role="separator">${group.choices.map((each) => choice(each.label, each.href, each.isCurrent))}</div>`
18137
+ );
18138
+ const menu = html`<div class="dropdown glass filter-menu${options.isOpen ? "" : " shut"}" id="${options.id}" role="menu" aria-label="Filter" aria-hidden="${options.isOpen ? "false" : "true"}" data-glass data-glass-corners="menu">${EDGE}${main}${panels}</div>`;
18139
+ return controlMarkup(html`${button}${menu}`, "regular");
18140
+ }
18141
+ var FILTER_MENU_SCRIPT = `/* filter menus */(function () {
18142
+ function show(menu, groupName, isFocused) {
18143
+ var shown = null;
18144
+ menu.querySelectorAll("[data-filter-panel]").forEach(function (panel) { panel.hidden = panel.getAttribute("data-filter-panel") !== groupName; if (!panel.hidden) shown = panel; });
18145
+ if (menu.zaismaPlace) menu.zaismaPlace();
18146
+ if (isFocused && shown) {
18147
+ // Back from a group, its row in the groups is focused again; into one, its picked choice, or else its first.
18148
+ var back = groupName === "" && menu.lastGroupName ? menu.querySelector('[data-filter-opens="' + menu.lastGroupName + '"]') : null;
18149
+ var target = back || shown.querySelector('[aria-current="page"]') || shown.querySelector('[role="menuitem"]');
18150
+ if (target) target.focus({ preventScroll: true });
18151
+ }
18152
+ }
18153
+ window.zaismaWatch.each(".filter-menu", function (menu) {
18154
+ menu.addEventListener("click", function (event) {
18155
+ var opener = event.target.closest("[data-filter-opens]");
18156
+ if (!opener) return;
18157
+ var groupName = opener.getAttribute("data-filter-opens");
18158
+ if (groupName) menu.lastGroupName = groupName;
18159
+ show(menu, groupName, event.detail === 0);
18160
+ });
18161
+ menu.addEventListener("keydown", function (event) {
18162
+ var item = document.activeElement;
18163
+ if (event.key === "ArrowRight" && item && item.matches(".filter-group")) { event.preventDefault(); menu.lastGroupName = item.getAttribute("data-filter-opens"); show(menu, menu.lastGroupName, true); }
18164
+ if (event.key === "ArrowLeft" && item && item.closest('[data-filter-panel]:not([data-filter-panel=""])')) { event.preventDefault(); show(menu, "", true); }
18165
+ });
18166
+ // Shut, it goes back to its groups for the next time it opens.
18167
+ new MutationObserver(function () { if (menu.getAttribute("aria-hidden") === "true") show(menu, "", false); }).observe(menu, { attributes: true, attributeFilter: ["aria-hidden"] });
18168
+ });
18169
+ })();
18170
+ `;
18171
+ var filterMenuFrame = (options) => html`<div class="dropdown-frame">${filterMenu(options)}</div>`;
18172
+ var EXAMPLE_FILTER_GROUPS = [
18173
+ { groupName: "genre", label: "Genre", pickedLabel: "Adventure", choices: ["Any", "Action", "Adventure", "Role-playing", "Strategy"].map((label) => ({ label, href: "#filter-menu", isCurrent: label === "Adventure" })) },
18174
+ { groupName: "players", label: "Players", pickedLabel: "Any", choices: ["Any", "Single-player", "Multiplayer"].map((label) => ({ label, href: "#filter-menu", isCurrent: label === "Any" })) },
18175
+ { groupName: "price", label: "Price", pickedLabel: "$15 to $30", choices: ["Any price", "Free", "Under $5", "$5 to $15", "$15 to $30", "$30 and up"].map((label) => ({ label, href: "#filter-menu", isCurrent: label === "$15 to $30" })) }
18176
+ ];
18177
+ component({
18178
+ name: "Filter menu",
18179
+ slug: "filter-menu",
18180
+ group: "panes",
18181
+ summary: "The ways to narrow a list, in one menu from a Filter button that counts the ones in use: each way says what's picked, and opens its choices in the same pane, with a way back.",
18182
+ styles: `
18183
+ /* A Filter menu: a Dropdown whose rows each open a group's choices in its place (a group's row ends in what's picked and a chevron),
18184
+ and whose group's choices start with the way back. It's at least wide enough for its longest group and what's picked in it. */
18185
+ /* Until DROPDOWN_SCRIPT places it, it waits shut at the window's corner, not where it sits in the row (past the window's edge). */
18186
+ .filter-menu { top: 0; left: 0; min-width: min(15rem, var(--menu-room-width, calc(100vw - 2 * var(--pad-frame)))); }
18187
+ .filter-panel[hidden] { display: none; }
18188
+ .filter-group > .filter-picked { margin-left: auto; color: var(--muted); font: var(--type-facts); }
18189
+ .filter-group > .ico, .filter-back > .ico { flex: none; width: 12px; height: 12px; }
18190
+ .filter-back { font: var(--type-name); color: var(--ink); }
18191
+ `,
18192
+ render: filterMenu,
18193
+ examples: [
18194
+ { label: "Closed, two filters in use", markup: html`<div style="display:flex;justify-content:flex-end">${filterMenu({ id: "example-filter-closed", groups: EXAMPLE_FILTER_GROUPS, clearHref: "#filter-menu", filterCount: 2 })}</div>` },
18195
+ { label: "Open: the ways to filter, each with what's picked", markup: filterMenuFrame({ id: "example-filter-open", groups: EXAMPLE_FILTER_GROUPS, clearHref: "#filter-menu", filterCount: 2, isOpen: true }) },
18196
+ { label: "On one way's choices, the picked one marked", markup: filterMenuFrame({ id: "example-filter-price", groups: EXAMPLE_FILTER_GROUPS, clearHref: "#filter-menu", filterCount: 2, isOpen: true, openGroupName: "price" }), isStill: true },
18197
+ { label: "Nothing filtered yet: no count, no Clear filters", markup: filterMenuFrame({ id: "example-filter-none", groups: EXAMPLE_FILTER_GROUPS.map((group) => ({ ...group, pickedLabel: group.groupName === "price" ? "Any price" : "Any" })), clearHref: null, filterCount: 0, isOpen: true }) }
18198
+ ]
18199
+ });
17961
18200
 
17962
18201
  // ../../apps/site/src/components/playing.ts
17963
18202
  function playingBar(options) {
@@ -19507,6 +19746,7 @@ var CHECKED_PAGE_LIST = [
19507
19746
  { name: "Home, full", area: "Playing", path: "/", account: "Many_Things", shownStateName: "Home, signed in", mainActionShows: "nowhere", isCoverAboveFold: true },
19508
19747
  { name: "Game page", area: "Playing", path: "/g/cave-crew", mainActionShows: "everywhere" },
19509
19748
  { name: "Game page, no rooms", area: "Playing", path: "/g/shard-dodge", mainActionShows: "everywhere" },
19749
+ { name: "Game page, for sale", area: "Playing", path: "/g/ashfall", mainActionShows: "everywhere" },
19510
19750
  // The longest title and description a game can have, and every name on its page at its longest.
19511
19751
  { name: "Game page, long names", area: "Playing", path: "/g/wandering-lighthouse-keeper", account: "Longest_Names_Here", shownStateName: "Game page, no rooms", mainActionShows: "everywhere" },
19512
19752
  { name: "Tester link", area: "Playing", path: "/t/7e57ed00dcafe0a1b2c3", mainActionShows: "everywhere" },
@@ -19524,11 +19764,13 @@ var CHECKED_PAGE_LIST = [
19524
19764
  { name: "Games", area: "Playing", path: "/games", mainActionShows: "nowhere", isCoverAboveFold: true },
19525
19765
  { name: "Games, signed in", area: "Playing", path: "/games", account: "Moss_Runner", mainActionShows: "nowhere", isCoverAboveFold: true },
19526
19766
  ...STRESS_ACCOUNTS.map(({ account, nameEnding }) => ({ name: `Games, ${nameEnding}`, area: "Playing", path: "/games", account, shownStateName: "Games, signed in", mainActionShows: "nowhere", isCoverAboveFold: true })),
19527
- { name: "Games, one genre", area: "Playing", path: "/games?filter=strategy", mainActionShows: "nowhere", isCoverAboveFold: true },
19528
- { name: "Games, multiplayer", area: "Playing", path: "/games?filter=multiplayer", mainActionShows: "nowhere", isCoverAboveFold: true },
19767
+ { name: "Games, one genre", area: "Playing", path: "/games?genre=strategy", mainActionShows: "nowhere", isCoverAboveFold: true },
19768
+ { name: "Games, multiplayer", area: "Playing", path: "/games?players=multiplayer", mainActionShows: "nowhere", isCoverAboveFold: true },
19529
19769
  { name: "Games, a search", area: "Playing", path: "/games?search_text=farm", mainActionShows: "nowhere", isCoverAboveFold: true },
19530
19770
  { name: "Games, nothing found", area: "Playing", path: "/games?search_text=no%20game%20is%20called%20this", mainActionShows: "nowhere" },
19531
- { name: "Games, an empty genre", area: "Playing", path: "/games?filter=visual_novel", mainActionShows: "nowhere" },
19771
+ { name: "Games, an empty genre", area: "Playing", path: "/games?genre=visual_novel", mainActionShows: "nowhere" },
19772
+ { name: "Games, a price range", area: "Playing", path: "/games?price=free", mainActionShows: "nowhere", isCoverAboveFold: true },
19773
+ { name: "Games, an empty price range", area: "Playing", path: "/games?price=30_and_up", mainActionShows: "nowhere" },
19532
19774
  { name: "Report a game", area: "Playing", path: "/g/cave-crew/report", mainActionShows: "nowhere" },
19533
19775
  { name: "A message", area: "Playing", path: "/oauth/authorize?client_id=nope", mainActionShows: "everywhere" },
19534
19776
  { name: "Sign in", area: "Signing in", path: "/signin", ...CITY },
@@ -22525,7 +22767,7 @@ component({
22525
22767
 
22526
22768
  // ../../apps/site/src/components/index.ts
22527
22769
  var COMPONENT_STYLES = () => TOKEN_STYLES + COMPONENTS().map((each) => each.styles).join("");
22528
- var COMPONENT_SCRIPT_SOURCE = WATCH_SCRIPT + GLASS_SCRIPT + BACKDROP_SCRIPT + COLOR_PICKER_SCRIPT + FIELD_SCRIPT + PIN_FIELD_SCRIPT + SWITCH_SCRIPT + RUNNER_SCRIPT + BUSY_SCRIPT + BIRTHDAY_SCRIPT + DATE_TIME_SCRIPT + FILE_DROP_SCRIPT + COPY_SCRIPT + CHART_SCRIPT + LONG_FIELD_SCRIPT + SLIDER_SCRIPT + PLACE_SCRIPT + SELECT_SCRIPT + DROPDOWN_SCRIPT + SHEET_SCRIPT + STARTED_LOW_SCRIPT + NOTICE_SCRIPT + STEP_FLOW_SCRIPT + CONFIRM_ITS_YOU_SCRIPT + RAIL_SCRIPT + ROW_SCRIPT + ROW_LAYOUT_SCRIPT + SCROLL_FADE_SCRIPT + COMPACT_SCRIPT + LOAD_MORE_SCRIPT + PLAYING_CARD_SCRIPT;
22770
+ var COMPONENT_SCRIPT_SOURCE = WATCH_SCRIPT + GLASS_SCRIPT + BACKDROP_SCRIPT + COLOR_PICKER_SCRIPT + FIELD_SCRIPT + PIN_FIELD_SCRIPT + SWITCH_SCRIPT + RUNNER_SCRIPT + BUSY_SCRIPT + BIRTHDAY_SCRIPT + DATE_TIME_SCRIPT + FILE_DROP_SCRIPT + COPY_SCRIPT + CHART_SCRIPT + LONG_FIELD_SCRIPT + SLIDER_SCRIPT + PLACE_SCRIPT + SELECT_SCRIPT + DROPDOWN_SCRIPT + FILTER_MENU_SCRIPT + SHEET_SCRIPT + STARTED_LOW_SCRIPT + NOTICE_SCRIPT + STEP_FLOW_SCRIPT + CONFIRM_ITS_YOU_SCRIPT + RAIL_SCRIPT + ROW_SCRIPT + ROW_LAYOUT_SCRIPT + SCROLL_FADE_SCRIPT + COMPACT_SCRIPT + LOAD_MORE_SCRIPT + PLAYING_CARD_SCRIPT;
22529
22771
  var COMPONENT_SCRIPT = pageScript(
22530
22772
  "components",
22531
22773
  MINIFIED_COMPONENT_SCRIPT.sourceSha256 === createHash3("sha256").update(COMPONENT_SCRIPT_SOURCE).digest("hex") ? MINIFIED_COMPONENT_SCRIPT.minifiedText : COMPONENT_SCRIPT_SOURCE
@@ -23522,6 +23764,9 @@ return () => {
23522
23764
  };
23523
23765
  })();`);
23524
23766
 
23767
+ // ../../apps/site/src/home.ts
23768
+ var coverPriceText = (game, ownedGameIds) => game.full_game_price && !ownedGameIds.has(game.id) ? priceText(game.full_game_price.currencyCode, game.full_game_price.priceMinorUnits) : void 0;
23769
+
23525
23770
  // ../../apps/site/src/saves-client.ts
23526
23771
  var SAVES_SCRIPT = pageScript("saves", `
23527
23772
  (function () {
@@ -43235,7 +43480,7 @@ var API_ROUTES = [
43235
43480
  call({ method: "GET", path: "/games", reaches: "account", access: needs("game_access", "read") }),
43236
43481
  call({ method: "POST", path: "/games", reaches: "account", access: needs("game_access", "write"), isAccountWide: true, isPublishing: true, body: { inputs: plainInputs("slug", ...GAME_DETAIL_INPUTS) } }),
43237
43482
  call({ method: "GET", path: "/games/:slug", reaches: "game", access: needs("game_access", "read"), pathParts: atGame }),
43238
- call({ method: "PATCH", path: "/games/:slug", reaches: "game", access: needs("game_access", "write"), pathParts: atGame, body: { inputs: { ...plainInputs("visibility", ...GAME_DETAIL_INPUTS), monthly_budget_cents: needsToo("credit_access", "write", "the game's budget stays as it is") } } }),
43483
+ call({ method: "PATCH", path: "/games/:slug", reaches: "game", access: needs("game_access", "write"), pathParts: atGame, body: { inputs: { ...plainInputs("visibility", "demo_game_slug", ...GAME_DETAIL_INPUTS), monthly_budget_cents: needsToo("credit_access", "write", "the game's budget stays as it is"), full_game_item_name: needsToo("purchase_access", "write", "the game's price to play stays as it is") } } }),
43239
43484
  call({ method: "POST", path: "/games/:slug/images", reaches: "game", access: needs("game_access", "write"), pathParts: atGame, query: plainInputs("kind"), body: "bytes" }),
43240
43485
  call({ method: "DELETE", path: "/games/:slug/images/:image_id", reaches: "game", access: needs("game_access", "write"), pathParts: { slug: "game", image_id: "in_game" } }),
43241
43486
  call({ method: "POST", path: "/games/:slug/shaders", reaches: "game", access: needs("game_access", "write"), pathParts: atGame, body: { inputs: plainInputs(...SHADER_INPUTS), maximumSizeBytes: MAXIMUM_SHADER_BODY_SIZE_BYTES } }),
@@ -44172,7 +44417,7 @@ function roomsPanel(game, list, picked = {}, ticketPlayerCount = 0) {
44172
44417
  { label: "All", isCurrent: !list.region, extra: html` data-region=""` },
44173
44418
  ...list.regions.map((entry) => ({ label: entry.name, badgeCount: entry.roomCount, isCurrent: list.region === entry.region, extra: html` data-region="${entry.region}"` }))
44174
44419
  ];
44175
- items.push({ kind: "control", markup: tabSwitch({ label: "Region", switchSize: "small", isFramed: true, tabs }) });
44420
+ items.push({ kind: "control", markup: tabSwitch({ label: "Region", switchSize: "small", isFramed: true, rowId: "rooms-region-row", tabs }) });
44176
44421
  }
44177
44422
  const filters = list.filters.filter((labelFilter) => fine(labelFilter.label)).map((labelFilter) => ({ label: labelFilter.label, values: labelFilter.values.filter(fine) })).filter((labelFilter) => labelFilter.values.length > 1 || picked[labelFilter.label]);
44178
44423
  if (filters.length) {
@@ -44884,6 +45129,15 @@ if (buyData.place === "game_page") {
44884
45129
  if (!hasPlayerTap()) return tell(request, "error", { code: "needs_player_tap", message: "The buy sheet opens only right after the player taps or presses a key in the game: call Zaisma.items.buy from that tap's handler." });
44885
45130
  open(request);
44886
45131
  };
45132
+ // The page's own buttons (a paid game's Buy, each add-on's price) open the sheet for their item. Once it's bought the page is drawn
45133
+ // again, since the server draws what the viewer owns: Buy turns into Play, an add-on into Owned.
45134
+ const pageTell = (message) => { if (message.status === "bought") location.reload(); };
45135
+ const openForPage = (itemName) => open({ requestNumber: 0, itemName: itemName, itemCount: 1, gameAccountId: null, tell: pageTell });
45136
+ document.addEventListener("click", (event) => {
45137
+ const button = event.target.closest && event.target.closest("[data-buy-item]");
45138
+ if (button && !button.disabled) openForPage(button.dataset.buyItem);
45139
+ });
45140
+ if (buyData.opened_item_name) openForPage(buyData.opened_item_name);
44887
45141
  } else {
44888
45142
  // The window answers only the game's own site the server named (opener_origin); any other opener hears nothing, and the game sees the
44889
45143
  // purchase in its next pass.
@@ -45151,6 +45405,7 @@ function purchaseWords(purchaseLabel) {
45151
45405
  return `${sold.charAt(0).toUpperCase()}${sold.slice(1)}${purchaseLabel.has_own_payments ? "; some handled by the developer, not Zaisma" : ""}`;
45152
45406
  }
45153
45407
  var isClosedTo = (viewer, game) => Boolean(viewer.account && !isOldEnoughFor(viewer.account.age_band, game.minimum_player_age_years));
45408
+ var isForSaleTo = (game, isFullGameOwner, isClosed) => game.full_game_item_name !== null && !isFullGameOwner && !isClosed;
45154
45409
  function roomCodeOf2(url, isClosed) {
45155
45410
  const code = url.searchParams.get("room")?.toUpperCase() ?? "";
45156
45411
  return ROOM_CODE.test(code) && !isClosed ? code : "";
@@ -45161,8 +45416,9 @@ function gamePageResponse(env2, view) {
45161
45416
  const here = tester ? `/t/${tester.token}` : `/g/${game.slug}`;
45162
45417
  const hidden = game.visibility === "draft" || game.visibility === "private";
45163
45418
  const isClosed = isClosedTo(viewer, game);
45419
+ const isForSale = isForSaleTo(game, view.isFullGameOwner, isClosed);
45164
45420
  const ownServerUrls = ownServerUrlsOf(game);
45165
- const code = roomCodeOf2(url, isClosed);
45421
+ const code = roomCodeOf2(url, isClosed || isForSale);
45166
45422
  const inRoom = code !== "";
45167
45423
  const roomQuery = inRoom ? `?room=${code}${ownServerParameter(url.searchParams.get("server"), ownServerUrls)}${url.searchParams.get("watch") === "1" ? "&watch=1" : ""}` : "";
45168
45424
  const frameUrl = tester ? gameUrl(env2, gameAddress(game.slug, "tester")) : gameUrl(env2, game.slug) + roomQuery;
@@ -45173,7 +45429,7 @@ function gamePageResponse(env2, view) {
45173
45429
  const multiplayer = (game.multiplayer_mode !== "none" || ownServerUrls.length > 0) && !isTestBuild;
45174
45430
  const hasRoomCodes = game.multiplayer_mode !== "none" && !isTestBuild && !isClosed;
45175
45431
  const ownServers = ownServerUrls.map((server) => new URL(server).host);
45176
- const autoplay = !isClosed && (inRoom || url.searchParams.has("play"));
45432
+ const autoplay = !isClosed && !isForSale && (inRoom || url.searchParams.has("play"));
45177
45433
  const accountRequirement = authConfigured(env2) ? game.account_requirement : "none";
45178
45434
  const isAccountsOnly = accountRequirement === "whole_game" && !tester;
45179
45435
  const accountNext = encodeURIComponent(`${here}${inRoom ? roomQuery : "?play"}`);
@@ -45204,16 +45460,24 @@ function gamePageResponse(env2, view) {
45204
45460
  const gameOrigin = new URL(frameUrl).origin;
45205
45461
  const testerWords = tester ? `You're testing this game with a link from its developer.${isTestBuild ? ` It opens a version players don't have yet${game.multiplayer_mode !== "none" || ownServers.length ? ", so online play is off: it works only on the version players have" : ""}.` : ""}${hidden ? " It isn't public yet: anyone with this link can play, so only share it with other testers." : ""} Your progress stays in this browser.${tester.ends_at_ms ? ` The link works until ${day(tester.ends_at_ms)}.` : ""}` : "";
45206
45462
  const reportHref = `/g/${game.slug}/report`;
45463
+ const fullGameItem = view.items.find((gameItem) => gameItem.item_name === game.full_game_item_name) ?? null;
45464
+ const fullGamePrice = fullGameItem ? priceFor(fullGameItem, view.countryCode) : null;
45465
+ const isOwned = (gameItem) => gameItem.item_kind === "permanent" && view.ownedItemNames.includes(gameItem.item_name);
45466
+ const addOns = view.items.filter((gameItem) => gameItem.is_on_game_page && gameItem.item_name !== game.full_game_item_name && (gameItem.price_minor_units !== null || isOwned(gameItem)));
45467
+ const mainAction = isClosed ? [] : !isForSale ? [{ kind: "control", markup: runButton("Play", { id: "play", type: "button", isBig: true, isFullWidth: true, icon: "play" }) }] : fullGamePrice ? [{ kind: "control", markup: runButton("Buy", { id: "buy-game", type: "button", isBig: true, isFullWidth: true, icon: "cart", trailingText: priceText(fullGamePrice.currencyCode, fullGamePrice.priceMinorUnits), dataAttributes: { "buy-item": game.full_game_item_name } }) }] : [{ kind: "control", markup: runButton("Not on sale right now", { id: "buy-game", type: "button", isBig: true, isFullWidth: true, isDisabled: true }) }];
45468
+ const demoSlug = isForSale ? view.demoGameSlug : null;
45469
+ const otherGameLink = demoSlug ? cutButton("Play the demo", { href: `/g/${demoSlug}?play`, isBig: true }) : view.fullGameSlug ? cutButton("Full game", { href: `/g/${view.fullGameSlug}?buy`, isBig: true }) : null;
45207
45470
  const paneActions = stack({
45208
45471
  items: [
45209
- ...isClosed ? [] : [{ kind: "control", markup: runButton("Play", { id: "play", type: "button", isBig: true, isFullWidth: true, icon: "play" }) }],
45472
+ ...mainAction,
45210
45473
  {
45211
45474
  kind: "block",
45212
45475
  markup: row({
45213
45476
  widths: "lead-fills",
45214
- label: "Details, Share and Report",
45477
+ label: otherGameLink ? demoSlug ? "Details, Play the demo, Share and Report" : "Details, Full game, Share and Report" : "Details, Share and Report",
45215
45478
  items: [
45216
45479
  { kind: "control", markup: cutButton("Details", { href: "#about", isBig: true }) },
45480
+ ...otherGameLink ? [{ kind: "control", markup: otherGameLink }] : [],
45217
45481
  { kind: "control", markup: cutButton("Share", { id: "share-page", type: "button", icon: "share", isLabelHidden: true, isBig: true, controls: "share-dialog" }) },
45218
45482
  { kind: "control", markup: cutButton("Report", { href: reportHref, icon: "flag", isLabelHidden: true, isBig: true, dataAttributes: { report: "" } }) }
45219
45483
  ]
@@ -45221,7 +45485,7 @@ function gamePageResponse(env2, view) {
45221
45485
  }
45222
45486
  ]
45223
45487
  });
45224
- const accountNote = accountRequirement !== "none" && !isClosed ? html`<p id="account-note">${accountRequirement === "whole_game" ? "Needs a Zaisma account" : "Playing online needs a Zaisma account"}<span id="account-ask" hidden>. ${textLink("Make one free", `/join?next=${accountNext}`)} or ${textLink("sign in", `/signin?next=${accountNext}`)}${accountRequirement === "whole_game" ? " to play" : " to play with others"}</span>.</p>` : null;
45488
+ const accountNote = accountRequirement !== "none" && !isClosed && game.full_game_item_name === null ? html`<p id="account-note">${accountRequirement === "whole_game" ? "Needs a Zaisma account" : "Playing online needs a Zaisma account"}<span id="account-ask" hidden>. ${textLink("Make one free", `/join?next=${accountNext}`)} or ${textLink("sign in", `/signin?next=${accountNext}`)}${accountRequirement === "whole_game" ? " to play" : " to play with others"}</span>.</p>` : null;
45225
45489
  const gamePane2 = glassPane({
45226
45490
  paneWidth: "fit",
45227
45491
  isStartedLow: true,
@@ -45251,6 +45515,19 @@ function gamePageResponse(env2, view) {
45251
45515
  const sections = [
45252
45516
  ...rooms ? [section("rooms", "Rooms", [{ kind: "block", markup: codeBox(game.slug) }, { kind: "block", id: "rooms-list", markup: roomsPanel(game, rooms) }])] : [],
45253
45517
  ...shots.length ? [section("screenshots", "Screenshots", [{ kind: "block", markup: track({ whenEmpty: emptyState({ title: "No screenshots yet", text: "The developer hasn't added any screenshots." }), id: "screenshots-track", itemSize: "cover", label: "Screenshots", items: shots.map((shot, shotIndex) => ({ kind: "block", markup: screenshot({ imageUrl: shot, label: `Screenshot ${shotIndex + 1} of ${shots.length}`, sheetId: `screenshot-${shotIndex + 1}` }) })) }) }])] : [],
45518
+ ...addOns.length ? [section("add-ons", "Add-ons", [{
45519
+ kind: "block",
45520
+ markup: listRows({
45521
+ label: "Add-ons",
45522
+ // The part shows only with an add-on in it.
45523
+ whenEmpty: emptyState({ title: "No add-ons yet", text: "The developer sells nothing on this page." }),
45524
+ rows: addOns.map((gameItem) => {
45525
+ const price = priceFor(gameItem, view.countryCode);
45526
+ const detail = gameItem.description.split("\n")[0]?.trim() || void 0;
45527
+ return isOwned(gameItem) || !price ? { title: gameItem.title, detail, end: tag("Owned", "plain") } : { title: gameItem.title, detail, action: cutButton(priceText(price.currencyCode, price.priceMinorUnits), { type: "button", isSmall: true, dataAttributes: { "buy-item": gameItem.item_name } }) };
45528
+ })
45529
+ })
45530
+ }])] : [],
45254
45531
  section("about", "About", [
45255
45532
  { kind: "block", markup: readingText({ markup: description ? paragraphs(description) : html`<p>The developer hasn't written about this game yet.</p>` }) },
45256
45533
  { kind: "words", markup: facts({ facts: purchaseFacts, arrangement: "down", label: "Purchases and refunds" }) },
@@ -45258,7 +45535,7 @@ function gamePageResponse(env2, view) {
45258
45535
  ...pageLinks.length ? [{ kind: "block", markup: html`${developerLinks(pageLinks)}` }] : []
45259
45536
  ]),
45260
45537
  ...view.updates.length ? [section("updates", "Updates", [{ kind: "block", markup: readingText({ markup: html`${view.updates.map((update) => html`<h3>${day(update.published_at_ms)}</h3>${paragraphs(update.patch_notes)}`)}` }) }])] : [],
45261
- ...developerGames.length && developer ? [section("more", `More from ${developer.name}`, [{ kind: "block", markup: grid({ whenEmpty: emptyState({ title: "No other games yet", text: "This is the developer's only game so far." }), itemSize: "cover", items: developerGames.map((otherGame) => ({ kind: "block", markup: gameCard({ title: otherGame.title, imageUrl: otherGame.cover ?? null, href: `/g/${otherGame.slug}`, facts: { playerCount: otherGame.playing_now_player_count >= MINIMUM_PLAYING_NOW_PLAYER_COUNT ? otherGame.playing_now_player_count : void 0 } }) })) }) }])] : []
45538
+ ...developerGames.length && developer ? [section("more", `More from ${developer.name}`, [{ kind: "block", markup: grid({ whenEmpty: emptyState({ title: "No other games yet", text: "This is the developer's only game so far." }), itemSize: "cover", items: developerGames.map((otherGame) => ({ kind: "block", markup: gameCard({ title: otherGame.title, imageUrl: otherGame.cover ?? null, href: `/g/${otherGame.slug}`, facts: { playerCount: otherGame.playing_now_player_count >= MINIMUM_PLAYING_NOW_PLAYER_COUNT ? otherGame.playing_now_player_count : void 0, priceText: coverPriceText(otherGame, view.ownedPaidGameIds) } }) })) }) }])] : []
45262
45539
  ];
45263
45540
  const screenshotSheets = shots.map((shot, shotIndex) => sheet({ id: `screenshot-${shotIndex + 1}`, title: `${game.title}, screenshot ${shotIndex + 1} of ${shots.length}`, body: screenshotLarge(shot, `${game.title}, screenshot ${shotIndex + 1}`), closeLabel: "Close", isPicture: true }));
45264
45541
  const barControls = [
@@ -45323,7 +45600,7 @@ function gamePageResponse(env2, view) {
45323
45600
  const response = layout(env2, {
45324
45601
  title: `${game.title} on Zaisma`,
45325
45602
  head: view.head,
45326
- checkedPage: tester ? "Tester link" : rooms ? "Game page" : "Game page, no rooms",
45603
+ checkedPage: tester ? "Tester link" : isForSale ? "Game page, for sale" : rooms ? "Game page" : "Game page, no rooms",
45327
45604
  pageShape: "full",
45328
45605
  // The game's own world behind the glass, the same the home shows while its cover is pointed at.
45329
45606
  stage: backgroundMarkup(background),
@@ -45332,7 +45609,7 @@ function gamePageResponse(env2, view) {
45332
45609
  // Cloudflare's invisible check from when the page opens, for play counts and multiplayer (tester links: only for multiplayer).
45333
45610
  hasTurnstileCheck: (!tester || multiplayer) && !isClosed && Boolean(env2.TURNSTILE_SITE_KEY),
45334
45611
  // What a page for older players shows depends on who's looking, so no cache keeps it.
45335
- isPrivate: game.minimum_player_age_years > 13,
45612
+ isPrivate: game.minimum_player_age_years > 13 || game.full_game_item_name !== null || addOns.length > 0,
45336
45613
  hasStripeFrame: !isClosed,
45337
45614
  body: html`${stack({ items: [{ kind: "block", markup: gamePane2 }, ...sections] })}
45338
45615
  ${screenshotSheets}
@@ -45381,13 +45658,13 @@ ${pageData("game-page-data", {
45381
45658
  // A room link is an invitation into a match already underway, and ?play comes from a Play button elsewhere: both skip the details.
45382
45659
  autoplay: autoplay ? accountRequirement === "whole_game" || accountRequirement === "multiplayer" && inRoom ? "when_signed_in" : "always" : "never"
45383
45660
  })}
45384
- ${isClosed ? "" : buySheetData({ slug: game.slug, tester_token: tester?.token ?? null, place: "game_page", ...buySheetStripe(env2), asked: null, opener_origin: null })}
45661
+ ${isClosed ? "" : buySheetData({ slug: game.slug, tester_token: tester?.token ?? null, place: "game_page", ...buySheetStripe(env2), asked: null, opener_origin: null, opened_item_name: isForSale && fullGamePrice && url.searchParams.has("buy") ? game.full_game_item_name : null })}
45385
45662
  ${saves && !isClosed ? pageData("saves-data", { api: `/api/saves/${game.slug}`, root: gameUrl(env2, game.slug), query: roomQuery, frameOrigin: gameOrigin, slug: game.slug, offerAfter: (Number(env2.KEEP_OFFER_SECONDS) || 300) * 1e3, isAccountOfferEnabled: Boolean(game.account_offer_enabled) }) : ""}
45386
45663
  ${isClosed ? scriptTags(GAME_PAGE_SCRIPT, GAME_EMBEDDED_SCRIPT) : scriptTags(
45387
45664
  GAME_PAGE_SCRIPT,
45388
45665
  ...tester && !multiplayer ? [] : [PLAY_COUNTER_SCRIPT],
45389
45666
  ...saves ? [SAVES_SCRIPT] : [],
45390
- ...accountRequirement !== "none" ? [ACCOUNT_GATE_SCRIPT] : [],
45667
+ ...accountRequirement !== "none" && !isForSale ? [ACCOUNT_GATE_SCRIPT] : [],
45391
45668
  ...canSignIn ? [SIGN_IN_WHILE_PLAYING_SCRIPT] : [],
45392
45669
  ...multiplayer ? [STILL_THERE_SCRIPT] : [],
45393
45670
  GAME_LINKS_SCRIPT,
@@ -45867,7 +46144,9 @@ addEventListener("pagehide", () => {
45867
46144
  var ACCOUNT_GATE_SCRIPT = pageScript("account-gate", `// Guests are asked to sign in first, and come back to the same page or match.
45868
46145
  const needsSignIn = !/(^|; )(__Host-)?zaisma_in=1/.test(document.cookie);
45869
46146
  if (needsSignIn) {
45870
- document.getElementById("account-ask").hidden = false;
46147
+ // A paid game says no "Needs a Zaisma account" (its Buy makes one), so a tester link to it has no ask to show.
46148
+ const accountAsk = document.getElementById("account-ask");
46149
+ if (accountAsk) accountAsk.hidden = false;
45871
46150
  if (gamePage.account_requirement === "whole_game" || gamePage.room_code) {
45872
46151
  const playButton = document.getElementById("play");
45873
46152
  playButton.querySelector(".face > span:not([class])").textContent = "Sign in to play";
@@ -46226,6 +46505,8 @@ function benchGame(input) {
46226
46505
  refund_policy_text: null,
46227
46506
  own_payment_categories: "[]",
46228
46507
  purchase_delivery: input.purchaseDelivery,
46508
+ full_game_item_name: null,
46509
+ demo_game_id: null,
46229
46510
  live_version_match_update_mode: "next_match",
46230
46511
  live_version_published_at_ms: null,
46231
46512
  has_live_version_game_file_changes: 0,
@@ -46252,7 +46533,15 @@ async function playerPage(input) {
46252
46533
  background: { source: "zaisma", glassTintColor: null },
46253
46534
  head: void 0,
46254
46535
  isFramedBySelf: true,
46255
- isShownInLists: false
46536
+ isShownInLists: false,
46537
+ // The bench plays the game free, with nothing on its page to buy: items are bought inside the game.
46538
+ isFullGameOwner: true,
46539
+ items: [],
46540
+ ownedItemNames: [],
46541
+ countryCode: null,
46542
+ demoGameSlug: null,
46543
+ fullGameSlug: null,
46544
+ ownedPaidGameIds: /* @__PURE__ */ new Set()
46256
46545
  }));
46257
46546
  }
46258
46547
  function friendsHereHtml(gameSlug, friends) {