@zaisma/game-server 1.17.0 → 1.19.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.
- package/bench/glass.js +87 -32
- package/bin/local-play.js +1 -1
- package/package.json +1 -1
package/bench/glass.js
CHANGED
|
@@ -6169,6 +6169,7 @@ var ERROR_CODES = {
|
|
|
6169
6169
|
account_banned: { httpStatus: 403, meaning: "Zaisma banned the account's developer side, or the whole account: only get_access, list_games and export_game work, and for a whole-account ban nothing does.", messageForPeople: "Zaisma banned this account's developer side for breaking Zaisma's rules. Export your games to keep them." },
|
|
6170
6170
|
publishing_not_open: { httpStatus: 403, meaning: "Until the beta, only accounts Zaisma adds can make, upload and publish games.", messageForPeople: "Until the beta, only accounts Zaisma adds can make, upload and publish games." },
|
|
6171
6171
|
bad_title: { httpStatus: 400, meaning: "A game's, topic's or precedent's title is empty or too long.", messageForPeople: "A title can't be empty or longer than the field allows. Write a shorter one." },
|
|
6172
|
+
title_names_zaisma: { httpStatus: 400, meaning: "A game's title holds the whole word Zaisma, which only Zaisma's own games can use.", messageForPeople: "A game's title can't use the word Zaisma. Name the game something of its own." },
|
|
6172
6173
|
bad_description: { httpStatus: 400, meaning: "The description isn't text of up to 500 characters.", messageForPeople: "A description is up to 500 characters. Shorten it." },
|
|
6173
6174
|
bad_visibility: { httpStatus: 400, meaning: "visibility isn't draft, listed, unlisted or private.", messageForPeople: "Pick who can find the game: listed, unlisted, private or draft." },
|
|
6174
6175
|
bad_devices: { httpStatus: 400, meaning: "devices isn't a list of phone, tablet and computer.", messageForPeople: "Pick the devices from phone, tablet and computer." },
|
|
@@ -6238,7 +6239,10 @@ var ERROR_CODES = {
|
|
|
6238
6239
|
too_big_for_mcp: { httpStatus: 413, meaning: "upload_files and check_game take up to 5 MB; bigger builds go through the upload command.", messageForPeople: "Builds over 5 MB go up through the upload command, not the MCP." },
|
|
6239
6240
|
bad_base64: { httpStatus: 400, meaning: "Something sent as base64 isn't valid base64.", messageForPeople: "Something sent as base64 isn't valid. Send it again." },
|
|
6240
6241
|
files_missing: { httpStatus: 409, meaning: "Some of the version's files haven't been sent yet.", messageForPeople: "Some of the version's files haven't arrived yet. Finish the upload." },
|
|
6241
|
-
bad_patch_notes: { httpStatus: 400, meaning: "patch_notes isn't text of up to 2,000 characters.", messageForPeople: "Patch notes are up to 2,000 characters." },
|
|
6242
|
+
bad_patch_notes: { httpStatus: 400, meaning: "patch_notes isn't text of up to 2,000 characters, or a publish changed them on a version that has been live.", messageForPeople: "Patch notes are up to 2,000 characters, and a version that has been live keeps its own." },
|
|
6243
|
+
bad_is_big_update: { httpStatus: 400, meaning: "is_big_update isn't true or false, or an upload sent it without publish_when_approved.", messageForPeople: "Mark a big update when you publish, or together with Publish when it passes." },
|
|
6244
|
+
big_update_needs_patch_notes: { httpStatus: 400, meaning: "A big update has no patch_notes, and a big update must say what's new.", messageForPeople: "A big update says what's new. Write it in What changed." },
|
|
6245
|
+
big_update_already_live: { httpStatus: 400, meaning: "The version has been live already, and only a version going live for the first time can be a big update.", messageForPeople: "This version has been live already, so it can't be a big update. Roll back to it without the mark." },
|
|
6242
6246
|
bad_publish_when_approved: { httpStatus: 400, meaning: "publish_when_approved isn't true or false.", messageForPeople: "Publishing when it passes is on or off." },
|
|
6243
6247
|
bad_match_update_mode: { httpStatus: 400, meaning: "match_update_mode isn't next_match or now, or it came without publish_when_approved.", messageForPeople: "Running matches update at the next match or now, and only when the version publishes as it passes." },
|
|
6244
6248
|
version_limit: { httpStatus: 429, meaning: "The game has had 20 versions in the last day (100 with Zaisma Pro).", messageForPeople: "The game had 20 versions in the last day, or 100 with Zaisma Pro. More free up through the day." },
|
|
@@ -6571,13 +6575,18 @@ async function versionsForGame(database, gameId) {
|
|
|
6571
6575
|
async function saveScan(database, versionId2, scanStatus, report) {
|
|
6572
6576
|
await database.prepare("UPDATE versions SET scan_status = ?, scan_report = COALESCE(?, scan_report) WHERE id = ?").bind(scanStatus, report ? JSON.stringify(report) : null, versionId2).run();
|
|
6573
6577
|
}
|
|
6578
|
+
var RECENTLY_UPDATED_MOVE_DAYS = 30;
|
|
6574
6579
|
async function publishVersion(database, version, matchUpdateMode = version.match_update_mode ?? "next_match") {
|
|
6575
6580
|
const publishedAtMs = now();
|
|
6581
|
+
const isNews = "first_published_at_ms IS NOT NULL AND (SELECT is_big_update = 1 AND published_at_ms IS NULL FROM versions WHERE id = ?2)";
|
|
6576
6582
|
await database.batch([
|
|
6577
|
-
database.prepare("UPDATE versions SET scan_status = 'approved', published_at_ms = ?, scheduled_publish_at_ms = NULL, match_update_mode = 'next_match' WHERE id = ?").bind(publishedAtMs, version.id),
|
|
6578
6583
|
database.prepare(
|
|
6579
|
-
|
|
6580
|
-
|
|
6584
|
+
`UPDATE games SET live_version_id = ?2, live_version_match_update_mode = ?3, live_version_published_at_ms = ?1, first_published_at_ms = COALESCE(first_published_at_ms, ?1),
|
|
6585
|
+
big_update_at_ms = CASE WHEN ${isNews} THEN ?1 ELSE big_update_at_ms END,
|
|
6586
|
+
recently_updated_at_ms = CASE WHEN ${isNews} AND COALESCE(recently_updated_at_ms, first_published_at_ms) <= ?1 - ?4 THEN ?1 ELSE recently_updated_at_ms END,
|
|
6587
|
+
review_status = CASE WHEN review_status IN ('removed', 'held') THEN review_status ELSE 'live' END, updated_at_ms = ?1 WHERE id = ?5`
|
|
6588
|
+
).bind(publishedAtMs, version.id, matchUpdateMode, RECENTLY_UPDATED_MOVE_DAYS * 864e5, version.game_id),
|
|
6589
|
+
database.prepare("UPDATE versions SET scan_status = 'approved', published_at_ms = ?1, first_published_at_ms = COALESCE(first_published_at_ms, ?1), scheduled_publish_at_ms = NULL, match_update_mode = 'next_match' WHERE id = ?2").bind(publishedAtMs, version.id)
|
|
6581
6590
|
]);
|
|
6582
6591
|
}
|
|
6583
6592
|
async function clearVersion(database, versionId2) {
|
|
@@ -7119,6 +7128,13 @@ var REVIEW_CODES = {
|
|
|
7119
7128
|
fix: `Send a cover built around something players meet in the game with add_image, or add a screenshot that shows it. ${BACK_ON_LISTS} ${COVER_GUIDE} ${IF_THE_CHECK_IS_WRONG}`,
|
|
7120
7129
|
hasOwnMessage: true
|
|
7121
7130
|
},
|
|
7131
|
+
search_words_in_title: {
|
|
7132
|
+
meaning: 'The title lists what the game is instead of naming it: "Neon Rush: Racing Drift Car Driving Simulator". A name that says what its game is, however long, is fine: "Car Mechanic Simulator".',
|
|
7133
|
+
messageForPeople: "The title lists what the game is instead of naming it. Write the name alone in the game's details; the description and genres say what it is.",
|
|
7134
|
+
contentRule: null,
|
|
7135
|
+
fix: `Send the game's name alone with update_game; the description and genres say what it is, and search finds those too. ${BACK_ON_LISTS} ${IF_THE_CHECK_IS_WRONG}`,
|
|
7136
|
+
hasOwnMessage: true
|
|
7137
|
+
},
|
|
7122
7138
|
tag_in_title: {
|
|
7123
7139
|
meaning: 'The title carries a tag instead of only naming the game: a bracketed tag like [UPDATE], an emoji, or NEW, UPDATE or FREE used as a tag. "+1" and "2x" are fine.',
|
|
7124
7140
|
messageForPeople: "The title carries a tag, like [UPDATE], an emoji or FREE, instead of only the game's name. Write the name alone in the game's details; patch notes say what's new.",
|
|
@@ -9750,7 +9766,9 @@ var PERFORMANCE_CHECK_LIMITS = {
|
|
|
9750
9766
|
/** How much a game page downloads before Play (Game files start before Play). */
|
|
9751
9767
|
maximumWarmUpSizeBytes: 100 * 1024 ** 2,
|
|
9752
9768
|
/** On an iPhone, a game page downloads before Play only a game whose start files come to this or less, all of them or none. */
|
|
9753
|
-
maximumPhoneWarmUpSizeBytes: 10 * 1e3 ** 2
|
|
9769
|
+
maximumPhoneWarmUpSizeBytes: 10 * 1e3 ** 2,
|
|
9770
|
+
/** How many of a version's redirects to content addresses the warm-up keeps ahead of time in browsers that need it (warm.js). */
|
|
9771
|
+
maximumWarmUpRedirectCount: 5e3
|
|
9754
9772
|
};
|
|
9755
9773
|
var RUN_NOTE_CODES = {
|
|
9756
9774
|
error_at_start: { meaning: "The game threw an error while starting.", fix: "Open the version's preview in Chrome with the console open; fix the error, then upload again." },
|
|
@@ -11178,7 +11196,7 @@ void main() {
|
|
|
11178
11196
|
out vec4 zaismaFragColor;
|
|
11179
11197
|
void main() { vec4 color = vec4(0.0); mainImage(color, gl_FragCoord.xy + zaismaViewOffset); zaismaFragColor = vec4(color.rgb, 1.0); }\`};return se(m,c+d),t.programs[i]=m,m}function Ae(t,i,c){var m=t.gl,p=t.drawn;return(p.widthPx<i||p.heightPx<c)&&(p.widthPx=Math.max(p.widthPx,i),p.heightPx=Math.max(p.heightPx,c),m.bindTexture(m.TEXTURE_2D,p.texture),m.texImage2D(m.TEXTURE_2D,0,m.RGBA8,p.widthPx,p.heightPx,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.bindFramebuffer(m.FRAMEBUFFER,p.framebuffer),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,p.texture,0)),p}function Ee(t){var i=t.getAttribute("data-backdrop-shader")||h,c=oe(),m=null;if(!c)return null;function p($,re,R){var _=oe(),X=_&&xe(_,i);if(!X||!ge(X)||!ge(_.upscale))return X&&(X.status==="failed"||_.upscale.status==="failed")&&(R.isLost=!0),!1;if(m=m||t.getContext("2d",{alpha:!1}),!m)return!1;var O=_.gl,ue=_.board,me=t.width,de=t.height,ye=R.drawnWidth,be=R.drawnHeight,fe=X.at;(ue.width<me||ue.height<de)&&(ue.width=Math.max(ue.width,me),ue.height=Math.max(ue.height,de));var _e=Ae(_,ye,be);O.bindFramebuffer(O.FRAMEBUFFER,_e.framebuffer),O.useProgram(X.program),O.viewport(0,0,ye,be);var Je=t.classList.contains("is-framed"),Ne=Je?1.8:1,Ue=ye*Ne,Ge=be*Ne;O.uniform3f(fe.iResolution,Ue,Ge,1),O.uniform1f(fe.iTime,$),O.uniform1f(fe.iDark,re.darkShare),O.uniform2f(fe.zaismaViewOffset,(Ue-ye)/2,(Ge-be)/2);var Ve=!1;if(X.hasPass){var Se=R.glass||{rects:new Float32Array(s*4),cuts:new Float32Array(s*4),count:0,scale:1,box:t.getBoundingClientRect()};O.uniform4fv(fe.iGlassPanes,Se.rects),O.uniform4fv(fe.zaismaPaneCuts,Se.cuts),O.uniform1i(fe.iGlassPaneCount,Se.count),O.uniform1f(fe.zaismaPixel,Se.scale),Ve=t.hasAttribute("data-adapts-glass")&&!R.isGlassAdapted&&Se.count>0}O.drawArrays(O.TRIANGLES,0,3);var ze=_.upscale;return O.bindFramebuffer(O.FRAMEBUFFER,null),O.useProgram(ze.program),O.viewport(0,0,me,de),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,_e.texture),O.uniform1i(ze.at.zaismaDrawn,0),O.uniform2f(ze.at.zaismaDrawnSize,ye,be),O.uniform2f(ze.at.zaismaCanvasSize,me,de),O.drawArrays(O.TRIANGLES,0,3),Ve&&(R.isGlassAdapted=!0,G(O,R,me,de)),m.drawImage(ue,0,ue.height-de,me,de,0,0,me,de),t.classList.contains("is-drawn")||t.classList.add("is-drawn"),!0}return p.prepare=function(){var $=oe();$&&xe($,i)},p}var Le=500;function he(t,i,c){return t.map(function(m,p){return m+(i[p]-m)*c})}function Te(t,i){var c=S.matches||!t.from?1:Math.min(1,(i-t.fadeStartMs)/Le);if(c>=1)return t.from=null,Object.assign({},t.target,{darkShare:t.target.isDark?1:0});var m=c*c*(3-2*c),p=t.from,$=t.target;return{base:he(p.base,$.base,m),a:he(p.a,$.a,m),b:he(p.b,$.b,m),c:he(p.c,$.c,m),isDark:m<.5?p.isDark:$.isDark,darkShare:(p.darkShare!==void 0?p.darkShare:p.isDark?1:0)+(($.isDark?1:0)-(p.darkShare!==void 0?p.darkShare:p.isDark?1:0))*m}}var qe=1e3,Ie="zaisma:backdrop-lag-s",Ce=performance.now(),pe=1,Me=performance.now(),we=!1,ke=Date.now()/1e3;try{ke-=Number(sessionStorage.getItem(Ie))||0}catch{}function Xe(t){var i=Math.max(0,t-Me);Me=t,pe=t-Ce>l?Math.max(0,pe-i/qe):Math.min(1,pe+i/qe),ke+=pe*i/1e3,we=pe===0}function Ye(){Ce=performance.now(),clearTimeout(ie),ie=setTimeout(ne,l),V&&(V=!1,ce()),we&&(we=!1,Me=Ce,x.forEach(function(t){t.isDrawn=!1}),v())}["pointerdown","pointermove","keydown","wheel","touchstart","scroll"].forEach(function(t){window.addEventListener(t,Ye,{passive:!0,capture:!0})}),ie=setTimeout(ne,l),window.addEventListener("pagehide",function(){try{sessionStorage.setItem(Ie,String(Date.now()/1e3-ke))}catch{}});function Pe(t,i){if(!t.isOuter){var c=S.matches?20:ke%3600;t.colors=Te(t,i);var m=!0;if(t.drawShader){if(m=t.drawShader(c,t.colors,t),t.isLost){t.canvas.classList.remove("is-drawn");return}}else t.canvas.dispatchEvent(new CustomEvent("backdrop-frame",{detail:{timeS:c,colors:t.colors,widthPx:t.canvas.width,heightPx:t.canvas.height}}));t.isDrawn=m&&!t.from}}function Ke(t){return t.isOuter||!t.isInView||t.isLost||t.canvas.hasAttribute("data-backdrop-paused")?!1:!((t.isHeld||S.matches||we)&&t.isDrawn)}function De(t){if(T=!1,!document.hidden){var i=V?y:E;if(t-z<i&&!H){T=!0,requestAnimationFrame(De);return}var c=W?E:t-z;z=t,W=!1,k=g,g=!1,Xe(t),L&&te();var m=H;H=!1,x.forEach(function(p){if(!(!p.isInView||p.canvas.hasAttribute("data-backdrop-paused"))){if(p.isOuter){p.kind==="frame"&&!p.isTold&&(p.isTold=!0,ae(p)),p.canvas.hasAttribute("data-adapts-glass")&&!p.isGlassAdapted&&Q(p);return}p.drawShader&&(m||!p.glass)&&w(p),!((p.isHeld||S.matches||we)&&p.isDrawn)&&(p.drawShader&&c<1e3&&(p.slowS=c>i*1.5?p.slowS+c/1e3:Math.max(0,p.slowS-c/2e3),p.slowS>1.5&&(p.slowS=0,p.scale>.26?(p.scale*=.75,p.size()):p.isHeld=!0)),Pe(p,t))}}),k=!1,(H||L||x.some(Ke))&&(T=!0,requestAnimationFrame(De))}}function Re(){var t=performance.now();L=!0,x.forEach(function(i){var c=P(i.canvas);JSON.stringify(c)!==JSON.stringify(i.target)&&(i.from=i.colors,i.target=c,i.fadeStartMs=t,i.isDrawn=!1,i.isGlassAdapted=!1,i.isInView&&Pe(i,t))}),v()}function Fe(){var t="";x.forEach(function(i){var c=i.isOuter&&i.canvas.getAttribute("data-backdrop-color");c&&/^#[0-9a-fA-F]{6}$/.test(c)&&(t=c)}),t?document.documentElement.style.setProperty("--backdrop-edge",t):document.documentElement.style.removeProperty("--backdrop-edge")}function $e(t,i){var c={canvas:t,kind:i,isOuter:!0,isInView:!0,isTold:!1,isGlassAdapted:!1,target:P(t),from:null};t.backdropLayer=c,x.push(c),i==="frame"&&(c.onMessage=function(p){p.source===t.contentWindow&&p.data&&p.data.zaismaBackground&&(c.isTold=!1,q())},window.addEventListener("message",c.onMessage));function m(){var p=t.getAttribute("data-glass-kind");if(t.hasAttribute("data-adapts-glass")&&p){c.isGlassAdapted=!0,b(c,{isSmoked:p==="smoked",tint:t.getAttribute("data-glass-tint")||""});return}var $=t.getAttribute("data-backdrop-still")||(i==="picture"?t.currentSrc||t.src:"");if(!(!t.hasAttribute("data-adapts-glass")||!$)){var re=new Image;re.onload=function(){t.getAttribute("data-backdrop-still")!==$&&i!=="picture"||(c.still=re,c.isGlassAdapted=!1,q())},re.src=$}}m(),new MutationObserver(m).observe(t,{attributes:!0,attributeFilter:["data-backdrop-still","src","data-glass-kind"]}),window.IntersectionObserver&&new IntersectionObserver(function(p){c.isInView=p[p.length-1].isIntersecting,c.isInView&&q()}).observe(t),q(),Fe()}function We(t){if(!t.backdropLayer&&!(t.hasAttribute("data-backdrop-stand-in")&&!t.hasAttribute("data-backdrop-shader"))){var i=t.getAttribute("data-backdrop");if(i==="frame"||i==="picture")return $e(t,i);var c=t.getAttribute("data-backdrop")==="scene",m=window.matchMedia("(max-width: 760px)").matches,p=Math.min(window.devicePixelRatio||1,c?2:1.5),$=t.classList.contains("is-framed"),re=ve&&ve.has(t)?ve.get(t):He(t),R={canvas:t,isInView:re,isDrawn:!1,isHeld:!1,slowS:0,target:P(t),from:null,scale:c||$?p:(m?.4:.55)*p};if(!(!c&&(R.drawShader=Ee(t),!R.drawShader))){if(t.backdropLayer=R,R.size=function(){var X=Math.max(2,Math.round(t.clientWidth*R.scale)),O=Math.max(2,Math.round(t.clientHeight*R.scale));c||(R.drawnWidth=Math.max(2,Math.round(t.clientWidth*R.scale*o)),R.drawnHeight=Math.max(2,Math.round(t.clientHeight*R.scale*o)),X=Math.round(R.drawnWidth*n),O=Math.round(R.drawnHeight*n)),!(X===t.width&&O===t.height)&&(t.width=X,t.height=O,R.isDrawn=!1,R.glass=null,t.backdropLayer&&!g&&R.isInView&&Pe(R,performance.now()))},R.size(),window.zaismaWatch.size(t,R.size),window.IntersectionObserver&&new IntersectionObserver(function(X){R.isInView=X[X.length-1].isIntersecting,R.onView&&R.onView(),R.isInView&&v()}).observe(t),R.drawShader&&!re&&window.IntersectionObserver){var _=new IntersectionObserver(function(X){X[X.length-1].isIntersecting&&(_.disconnect(),R.drawShader.prepare())},{rootMargin:"100% 0px"});_.observe(t)}else R.drawShader&&R.drawShader.prepare();new MutationObserver(v).observe(t,{attributes:!0,attributeFilter:["data-backdrop-paused"]}),x.push(R),!g&&R.isInView&&Pe(R,performance.now()),v()}}}function He(t){var i=t.getBoundingClientRect();return i.bottom>0&&i.right>0&&i.top<window.innerHeight&&i.left<window.innerWidth}var Oe=document.querySelectorAll("canvas[data-backdrop], iframe[data-backdrop='frame'], img[data-backdrop='picture']"),ve=new Map;Oe.forEach(function(t){t.tagName==="CANVAS"&&ve.set(t,He(t))}),Oe.forEach(We),ve.clear(),window.zaismaWatch.each("canvas[data-backdrop], iframe[data-backdrop='frame'], img[data-backdrop='picture']",We),window.zaismaBackdrop={add:function(t){L=!0,We(t),v()},remove:function(t){var i=t.backdropLayer;i&&(x=x.filter(function(c){return c!==i}),i.onMessage&&window.removeEventListener("message",i.onMessage),t.backdropLayer=null,q(),Fe())},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(B),window.zaismaWatch.resize(q);function Be(t){return t.nodeType===1&&(t.hasAttribute("data-glass")||!!t.querySelector("[data-glass]"))}window.zaismaWatch.page(function(t){L||(L=t.some(function(i){return i.type==="attributes"?i.target.hasAttribute("data-glass"):Array.prototype.some.call(i.addedNodes,Be)||Array.prototype.some.call(i.removedNodes,Be)}),L&&v())}),document.addEventListener("toggle",function(){L=!0,v()},!0),document.addEventListener("visibilitychange",function(){document.hidden||v()}),new MutationObserver(Re).observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["data-theme-choice"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Re),S.addEventListener("change",Re)})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["shown-once-drawn"]||(C["shown-once-drawn"]=!0,(function(){var f="iframe[data-shows-once-drawn]";function h(d){window.zaismaWatch.afterSettling(function(){d.classList.add("is-shown")})}window.addEventListener("message",function(d){!d.data||!d.data.zaismaBackground||document.querySelectorAll(f).forEach(function(s){d.source===s.contentWindow&&(s.hasSaid=!0,h(s))})}),window.zaismaWatch.eachArriving(f,function(d){d.addEventListener("load",function(){setTimeout(function(){d.hasSaid||h(d)},4e3)})})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C.switches||(C.switches=!0,(function(){window.zaismaWatch.each(".tab-switch",function(f){var h=f.querySelector(".switch-slab"),d=f.querySelectorAll(":scope > a, :scope > button"),s=f.classList.contains("vertical");function e(){return f.querySelector('[aria-current="page"], [aria-pressed="true"]')}var a=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--gap-control-row"))||4;function r(u){return Math.max(0,((Number(u.getAttribute("data-cut-line"))||0)-a)/2)}var o=window.matchMedia("(prefers-reduced-motion: reduce)").matches;function n(u){var w=window.devicePixelRatio||1;return Math.round(u*w)/w}function l(u,w,M,U){return function(Y){for(var I=Y,K=0;K<8;K++){var Z=3*(1-I)*(1-I)*I*u+3*(1-I)*I*I*M+I*I*I-Y,D=3*(1-I)*(1-I)*u+6*(1-I)*I*(M-u)+3*I*I*(1-M);if(Math.abs(D)<1e-6)break;I=Math.min(1,Math.max(0,I-Z/D))}return 3*(1-I)*(1-I)*I*w+3*(1-I)*I*I*U+I*I*I}}var E=l(.4,0,.2,1);function y(u,w){u.slideAt=w;var M=Math.round(w.size)+"px";s?(u.style.height=M,u.style.transform="translateY("+w.pos+"px)"):(u.style.width=M,u.style.transform="translateX("+w.pos+"px)")}function S(u,w,M){var U=u.slideAt||w,Y=performance.now(),I=(u.slideId||0)+1;u.slideId=I,u.slideTarget=w,(function K(){if(u.slideId===I){var Z=Math.min(1,(performance.now()-Y)/M),D=E(Z);if(w=u.slideTarget,u.redrawCut&&u.redrawCut({isFrame:!0}),y(u,{pos:Z<1?U.pos+(w.pos-U.pos)*D:w.pos,size:w.size}),Z<1){requestAnimationFrame(K);return}u.slideTarget=null,u.redrawCut&&u.redrawCut()}})()}function x(u,w,M){var U=!M&&u.slideTarget&&u.pickedTab===w;if(u.pickedTab=w,!w){u.style.width="0px";return}var Y={beside:u.getAttribute("data-cut-beside"),ends:u.getAttribute("data-cut-ends")||"",stack:u.getAttribute("data-cut-stack")},I=Array.prototype.filter.call(d,function(Te){return!Te.classList.contains("folded")}),K=w===I[0],Z=w===I[I.length-1];if(s){var D={pos:w.offsetTop,size:w.offsetHeight},b=M&&!o?T(u):0;if(u.classList.contains("focus-ring")){var F=K?0:w.offsetTop,G=Z?f.getBoundingClientRect().height:w.offsetTop+w.offsetHeight,Q=Math.round(G-F);D={pos:Z?G-Q:F,size:Q}}u.setAttribute("data-cut-beside",""),u.setAttribute("data-cut-stack",((K?"first ":"")+(Z?"last":"")).trim()),z(u,D,b,Y.stack!==null?Y:null,U);return}var ae=r(u),V=K?0:ae,ie=Z?0:ae,ne=f.closest("[data-cut-line]"),ce=ne&&ne.getAttribute("data-slanted")||"";if(!u.classList.contains("focus-ring")&&(K&&/start/.test(ce)||Z&&/end/.test(ce))){var j=w.offsetTop,Q=f.offsetHeight,le=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--control-slant"))||10,oe=Math.min(Number(u.getAttribute("data-cut-line"))||0,(w.offsetWidth+V+ie)/3),se=le/2-oe/2+j*Math.sqrt(1+le/Q*(le/Q))-j;K&&/start/.test(ce)&&(V=-se),Z&&/end/.test(ce)&&(ie=-se)}var ge={pos:n(w.offsetLeft-V),size:w.offsetWidth+V+ie},xe=M&&!o?T(u):0;if(u.classList.contains("focus-ring")){var Ae=K?0:w.offsetLeft-V,Ee=Z?f.getBoundingClientRect().width:w.offsetLeft+w.offsetWidth+ie,Le=Math.round(Ee-Ae);ge={pos:Z?Ee-Le:Ae,size:Le}}u.setAttribute("data-cut-beside",((K?"":"start ")+(Z?"":"end")).trim());var he=((K?"start ":"")+(Z?"end":"")).trim();he?u.setAttribute("data-cut-ends",he):u.removeAttribute("data-cut-ends"),z(u,ge,xe,Y.beside!==null?Y:null,U)}function z(u,w,M,U,Y){if(Y){u.slideTarget=w;return}if(M&&u.redrawCut){var I=u.slideAt;y(u,w),u.redrawCut(U?{from:U,ms:M,ease:E,isDriven:!0}:void 0),I&&y(u,I),S(u,w,M);return}u.slideId=(u.slideId||0)+1,u.slideTarget=null,y(u,w),u.redrawCut&&u.redrawCut()}function T(u){return parseFloat(getComputedStyle(u).getPropertyValue("--slide-ms"))||550}var W=!1;function g(){var u=f.querySelector(":scope > .is-focused"),w=f.querySelector(".focus-ring");u&&w&&(x(w,u),f.classList.add("is-focus-shown"))}function k(){if(!(W||!f.getClientRects().length)){var u=e(),w=f.querySelector(":scope > :focus-visible"),M=f.querySelector(".focus-ring");h.style.transition="none",x(h,u),M&&w&&x(M,w),g(),h.offsetWidth,h.style.transition="",f.classList.add("is-ready")}}k();var v=window.navigation&&navigation.activation&&navigation.activation.from;if(v&&v.url&&h.animate&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var A=new URL(v.url),P=A.pathname,L=P===location.pathname&&A.search===location.search,H=Array.prototype.filter.call(d,function(u){return u.href&&new URL(u.href).pathname===P}),N=H.find(function(u){return new URL(u.href).search===A.search})||(H.length===1?H[0]:void 0),ee=e();if(N&&ee&&N!==ee&&!L){var q=function(){var u=s?"translateY("+N.offsetTop+"px)":"translateX("+N.offsetLeft+"px) scaleX("+(N.offsetWidth/Math.max(1,ee.offsetWidth)).toFixed(4)+")",w=s?"translateY("+ee.offsetTop+"px)":"translateX("+ee.offsetLeft+"px) scaleX(1)";return h.animate([{transform:u,transformOrigin:"0 0"},{transform:w,transformOrigin:"0 0"}],{duration:T(h),easing:"cubic-bezier(.3, 1.2, .4, 1)"})};h.style.transition="none",x(h,N),h.offsetWidth,h.style.transition="",W=!0;var B=function(){requestAnimationFrame(function(){W=!1,k(),W=!0;var u=function(){W=!1,k()};q().finished.then(u,u)})};window.zaismaWatch.fontsIn(B)}}window.zaismaWatch.fontsIn(k),window.zaismaWatch.size(f,k),!s&&f.parentElement&&window.zaismaWatch.size(f.parentElement,k),f.pickTab=function(u){u.tagName==="BUTTON"?d.forEach(function(M){M.setAttribute("aria-pressed",String(M===u))}):d.forEach(function(M){M===u?M.setAttribute("aria-current","page"):M.removeAttribute("aria-current")}),h.pickedTab!==u&&x(h,u,!0);var w=f.closest("[data-fades-sideways]");w&&w.showWhole&&w.showWhole(u,!0)};function J(u){return u.disabled||u.getAttribute("aria-disabled")==="true"}d.forEach(function(u){u.addEventListener("click",function(w){if(!J(u)){if(u.href&&u.getAttribute("aria-current")==="page"&&w.button===0&&!w.metaKey&&!w.ctrlKey&&!w.shiftKey&&!w.altKey){w.preventDefault();return}if(u.href&&!w.defaultPrevented){var M=new URL(u.href,location.href);if(M.pathname!==location.pathname||M.search!==location.search)return}f.pickTab(u)}})});var te=f.querySelector(".focus-ring");f.addEventListener("focusin",function(u){var w=u.target;!te||w.parentElement!==f||!w.matches(":focus-visible")||(x(te,w),f.classList.add("is-focus-shown"))}),f.addEventListener("focusout",function(){f.classList.remove("is-focus-shown")})})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["row-arrows"]||(C["row-arrows"]=!0,(function(){var f=window.matchMedia("(prefers-reduced-motion: reduce)").matches;window.zaismaWatch.each("[data-row-arrows]",function(d){var s=d.querySelectorAll(".cut-btn")[0];document.getElementById(s.getAttribute("aria-controls"))?h(d):window.zaismaWatch.whenRead(function(){h(d)})});function h(d){var s=d.querySelectorAll(".cut-btn"),e=s[0],a=s[1],r=document.getElementById(e.getAttribute("aria-controls"));if(!r)return;var o=d.getAttribute("data-scrolled-to");function n(){var E=r.scrollWidth-r.clientWidth;o&&E>2&&(r.scrollLeft=o==="end"?E:E/2,o=null);var y=r.scrollLeft>2,S=r.scrollLeft<E-2;e.disabled=!y,a.disabled=!S,d.hidden=E<=2}function l(E){r.scrollBy({left:E*r.clientWidth*.8,behavior:f?"auto":"smooth"})}e.addEventListener("click",function(){l(-1)}),a.addEventListener("click",function(){l(1)}),r.addEventListener("scroll",n,{passive:!0}),window.zaismaWatch.size(r,n),n()}})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C.sidebar||(C.sidebar=!0,(function(){function f(n){return getComputedStyle(n).getPropertyValue("--sidebar-is-sheet").trim()==="1"}var h=function(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches};function d(n){return"zaisma-sidebar:"+n.getAttribute("data-sidebar-remember")}function s(n){return document.querySelectorAll('[data-sidebar-button][aria-controls="'+n.id+'"], [data-sidebar-button][aria-controls="'+n.id+'-sheet"]')}function e(n){var l=n.closest(".sidebar-layout"),E=document.getElementById(n.id+"-sheet");s(n).forEach(function(y){y.setAttribute("aria-controls",f(n)?n.id+"-sheet":n.id),y.setAttribute("aria-expanded",String(f(n)?!!(E&&E.open):!!(l&&!l.classList.contains("is-collapsed"))))})}function a(n,l,E){var y=n.closest(".sidebar-layout");if(y){if(E)try{localStorage.setItem(d(n),l?"hidden":"shown")}catch{}var S=y.querySelector(".sidebar-main"),x=E&&!h()&&S,z=x?S.getBoundingClientRect():null,T=x&&l?n.getBoundingClientRect():null;if(T&&(n.style.setProperty("--sidebar-left",T.left+"px"),n.style.setProperty("--sidebar-top",T.top+"px"),n.style.setProperty("--sidebar-width",T.width+"px"),n.style.setProperty("--sidebar-height",T.height+"px"),y.classList.add("is-folding")),y.classList.toggle("is-collapsed",l),e(n),T&&(requestAnimationFrame(function(){n.classList.add("is-leaving")}),setTimeout(function(){y.classList.remove("is-folding"),n.classList.remove("is-leaving"),["--sidebar-left","--sidebar-top","--sidebar-width","--sidebar-height"].forEach(function(g){n.style.removeProperty(g)})},350)),!!x){var W=z.left-S.getBoundingClientRect().left;Math.abs(W)<1||(S.style.transition="none",S.style.transform="translateX("+W+"px)",S.offsetWidth,S.style.transition="transform 0.45s cubic-bezier(.2,.8,.2,1)",S.style.transform="",setTimeout(function(){S.style.removeProperty("transition"),S.style.removeProperty("transform")},500))}}}window.zaismaWatch.each("nav.sidebar[data-sidebar-remember]",function(n){try{var l=localStorage.getItem(d(n));(l==="shown"||l==="hidden")&&a(n,l==="hidden",!1)}catch{}window.zaismaWatch.whenRead(function(){r(n)}),e(n)});function r(n){var l=document.getElementById(n.id+"-sheet");l&&(l.addEventListener("close",function(){e(n);var E=s(n)[0];E&&(!document.activeElement||document.activeElement===document.body||l.contains(document.activeElement))&&E.focus({preventScroll:!0})}),l.addEventListener("click",function(E){E.target.closest&&E.target.closest("a[href]")&&l.close()})),e(n)}document.addEventListener("click",function(n){var l=n.target.closest&&n.target.closest(".sidebar-group");if(l){var E=l.getAttribute("aria-expanded")!=="true",y=l.nextElementSibling;l.setAttribute("aria-expanded",String(E)),y&&(y.hidden=!E);return}var S=n.target.closest&&n.target.closest("[data-sidebar-button]");if(S){var x=S.getAttribute("aria-controls").replace(/-sheet$/,""),z=document.getElementById(x),T=document.getElementById(x+"-sheet");if(z){if(f(z)){T&&!T.open&&(T.showModal(),e(z));return}a(z,!z.closest(".sidebar-layout").classList.contains("is-collapsed"),!0)}}});var o=!1;window.addEventListener("resize",function(){o||(o=!0,requestAnimationFrame(function(){o=!1,document.querySelectorAll("nav.sidebar[data-sidebar-remember]").forEach(function(n){var l=document.getElementById(n.id+"-sheet");!f(n)&&l&&l.open&&l.close(),e(n)})}))})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["started-low"]||(C["started-low"]=!0,(function(){function f(h){var d=h.querySelector(".run-wrap"),s=h.querySelector(":scope > .pane-in > .layout-stack")||h.querySelector(":scope > .pane-in"),e=d&&s&&Array.prototype.find.call(s.children,function(r){return r.contains(d)});if(e){var a=parseFloat(getComputedStyle(h).marginTop)||0;h.style.setProperty("--started-low-used",Math.round(e.getBoundingClientRect().bottom+window.scrollY-a)+"px")}}window.zaismaWatch.each(".glass-pane.is-started-low",function(h){f(h),window.zaismaWatch.size(h,function(){f(h)})})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C.placing||(C.placing=!0,(function(){window.zaismaIsOnPage=function(e,a){var r=function(o){for(var n=o;n&&n!==document.documentElement;n=n.parentElement){var l=getComputedStyle(n).position;if(l==="fixed"||l==="sticky")return!0}return!1};return!r(e)&&!(a.parentElement&&r(a.parentElement))},window.zaismaPageRoom=function(e){var a={left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight};return document.querySelectorAll("header, nav.sidebar").forEach(function(r){if(!(e&&r.contains(e))){var o=getComputedStyle(r).position,n=r.getBoundingClientRect();o!=="fixed"&&o!=="sticky"||n.width<1||n.height<1||n.bottom<=0||n.top>=a.bottom||o==="fixed"&&r.offsetParent||(n.width>=a.right/2?a.top=Math.max(a.top,n.bottom):(n.left+n.right)/2<a.right/2?a.left=Math.max(a.left,n.right):a.right=Math.min(a.right,n.left))}}),a},window.zaismaPlace=function(e,a,r){var o=r.roomRect||{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight},n=r.gapPx,l=r.edgePx,E=(e.left+e.right)/2>(o.left+o.right)/2,y=Math.max(o.left+l,Math.min(E?e.right-a.width:e.left,o.right-l-a.width)),S=o.bottom-l-e.bottom-n,x=e.top-n-l-o.top,z=a.height<=S,T=a.height<=x,W=(e.top+e.bottom)/2>(o.top+o.bottom)/2,g=!r.isAlwaysBelow&&(z&&T?W:!z&&x>S),k=g?e.top-n-a.height:e.bottom+n;return{leftPx:y,topPx:Math.max(o.top+l,Math.min(k,o.bottom-l-a.height)),isAtEnd:E,isAbove:g}};var f=64;window.zaismaCast=function(e){var a=e.floatCast;if(a||(a=e.floatCast=document.createElement("div"),a.className="floating-cast",a.setAttribute("aria-hidden","true"),a.appendChild(document.createElement("div")).appendChild(document.createElement("span")),(e.parentElement||document.body).appendChild(a)),!e.isConnected||!e.matches(":popover-open")){a.hidden=!0;return}var r=e.getBoundingClientRect(),o=new DOMMatrix(getComputedStyle(e).transform==="none"?void 0:getComputedStyle(e).transform),n={width:e.offsetWidth,height:e.offsetHeight};n.left=r.left+r.width/2-n.width/2-o.e,n.top=r.top+r.height/2-n.height/2-o.f;var l=e.classList.contains("is-on-page"),E=getComputedStyle(e),y=E.getPropertyValue("--glass-clip").trim()||E.clipPath,S=/^polygon\\((.*)\\)$/.exec(y),x="calc(100% + "+f+"px)",z=-f+"px";if(!S){a.hidden=!0,e.castTries=(e.castTries||0)+1,e.castTries<60&&requestAnimationFrame(function(){window.zaismaCast(e)});return}e.castTries=0;var T=S?S[1].replace(/^(nonzero|evenodd),\\s*/,""):"0px 0px, 100% 0px, 100% 100%, 0px 100%";a.firstChild.firstChild.style.clipPath=S?y:"",a.style.clipPath="polygon(evenodd, "+z+" "+z+", "+x+" "+z+", "+x+" "+x+", "+z+" "+x+", "+z+" "+z+", "+T+", "+T.split(",")[0]+", "+z+" "+z+")",a.hidden&&a.classList.contains("is-arriving")&&requestAnimationFrame(function(){a.offsetWidth,a.classList.remove("is-arriving")}),a.hidden=!1,a.classList.toggle("is-on-page",l);var W=e.getAttribute("data-theme-choice");W?a.setAttribute("data-theme-choice",W):a.removeAttribute("data-theme-choice"),a.classList.toggle("smoke",e.classList.contains("smoke")),a.style.left=n.left+(l?window.scrollX:0)+"px",a.style.top=n.top+(l?window.scrollY:0)+"px",a.style.width=n.width+"px",a.style.height=n.height+"px"},["toggle","transitionend"].forEach(function(e){document.addEventListener(e,function(a){a.target.classList&&a.target.classList.contains("floating-pane")&&!a.target.classList.contains("in-place")&&window.zaismaCast(a.target)},!0)});var h=6,d=8,s=4;window.zaismaFloat=function(e,a){var r=e.classList.contains("in-place"),o=e.classList.contains("placed-over"),n=null;function l(){return typeof a.anchor=="function"?a.anchor():a.anchor}r||(document.querySelectorAll("body > .floating-pane, dialog > .floating-pane").forEach(function(g){g.floatingHome&&!g.floatingHome.isConnected&&(g.floatCast&&g.floatCast.remove(),g.remove())}),e.floatingHome=a.home||l(),e.floatingHome&&e.floatingHome.closest(".smoke")&&e.classList.add("smoke"),(l()&&l().closest("dialog")||document.body).appendChild(e));function E(){return r||e.matches(":popover-open")}function y(){var g=l(),k=e.offsetParent;if(!(!g||!k)){var v=a.anchorRect?a.anchorRect(g):g.getBoundingClientRect(),A=k.getBoundingClientRect(),P=window.zaismaPlace(v,{width:e.offsetWidth,height:e.offsetHeight},{roomRect:{left:A.left,top:A.top,right:A.right,bottom:A.bottom},gapPx:a.gapPx||h,edgePx:a.edgePx||d,isAlwaysBelow:!0});e.style.left=Math.round(P.leftPx-A.left-k.clientLeft)+"px",e.style.top=Math.round(P.topPx-A.top-k.clientTop)+"px",e.classList.toggle("from-start",!P.isAtEnd),a.onPlaced&&a.onPlaced()}}r&&!o&&!a.isAnchorWidth&&(e.classList.add("is-hanging"),y(),window.zaismaWatch.resize(y),window.zaismaWatch.fontsIn(y));function S(){var g=l();if(!(r||!e.matches(":popover-open")||!g)){var k=a.anchorRect?a.anchorRect(g):g.getBoundingClientRect(),v=document.documentElement.clientWidth,A=window.innerHeight,P=window.zaismaPageRoom(g),L=k.bottom<0||k.top>A,H=L?k.top+k.height/2-A/2+P.top:P.top,N=L?H+P.bottom-P.top:P.bottom,ee=window.zaismaIsOnPage(g,e);if(!g.isConnected||!ee&&(k.bottom<0||k.top>A||k.right<0||k.left>v)){W(!1);return}a.isAnchorWidth&&(e.style.width=k.width+"px",e.scrollWidth>e.clientWidth&&(e.style.width=e.scrollWidth+"px"));var q=a.gapPx||h,B=a.edgePx||d,J,te;if(e.style.setProperty("--floating-room",Math.max(0,N-H-2*B)+"px"),o)te=k.top+k.height/2-a.lineOf(),J=k.left;else{var u=function(){return window.zaismaPlace(k,{width:e.offsetWidth,height:e.offsetHeight},{roomRect:{left:P.left,top:H,right:P.right,bottom:N},gapPx:q,edgePx:B,isAlwaysBelow:typeof a.isAlwaysBelow=="function"?a.isAlwaysBelow(g):a.isAlwaysBelow})},w=u();if(a.fitsRoom){var M=Math.max(0,w.isAbove?k.top-H-q-B:N-k.bottom-q-B);e.style.setProperty("--floating-room",M+"px");var U=a.scrollBox&&a.scrollBox(),Y=U?U.scrollHeight-U.clientHeight:0;Y>0&&Y<12&&e.style.setProperty("--floating-room",Math.ceil(M+Y)+"px"),w=u()}te=w.topPx,J=w.leftPx,e.classList.toggle("is-above",w.isAbove),e.classList.toggle("from-start",!w.isAtEnd)}var I=e.offsetWidth,K=e.offsetHeight;te=Math.max(H+B,Math.min(N-K-B,te)),J=Math.max(P.left+B,Math.min(P.right-I-B,J)),e.classList.toggle("is-on-page",ee),e.style.top=Math.round(te+(ee?window.scrollY:0))+"px",e.style.left=Math.round(J+(ee?window.scrollX:0))+"px",window.zaismaFit&&e.querySelectorAll(".scrolls").forEach(window.zaismaFit),a.onPlaced&&a.onPlaced(),window.zaismaCast(e)}}function x(){if(!r){if(!e.matches(":popover-open")){var g=a.home||l()||document.body,k=g.closest("[data-theme-choice]");k&&k!==document.documentElement?e.setAttribute("data-theme-choice",k.getAttribute("data-theme-choice")):e.removeAttribute("data-theme-choice"),e.classList.toggle("smoke",!!g.closest(".smoke")),e.style.setProperty("--glass-hue",getComputedStyle(g).getPropertyValue("--glass-hue")),z&&(window.zaismaCast(e),clearTimeout(e.leaveTimer),[e,e.floatCast].forEach(function(A){A.classList.remove("is-leaving"),A.classList.add("is-arriving")})),e.showPopover(),z&&(function A(P,L){requestAnimationFrame(function(H){var N=getComputedStyle(e).getPropertyValue("--glass-clip").trim()&&L&&H-L<25;if(!N&&P<30)return A(P+1,H);e.classList.remove("is-arriving")})})(0,0)}var v=l();n=v?v.getBoundingClientRect():null,a.onShown&&a.onShown(),S(),a.onToggle&&a.onToggle(!0)}}var z=!(window.CSS&&CSS.supports("overlay","auto"))&&!matchMedia("(prefers-reduced-motion: reduce)").matches,T=(parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--motion-arrive"))||.3)*1e3;function W(g){if(!(r||!e.matches(":popover-open")||e.classList.contains("is-leaving"))){z?(e.classList.add("is-leaving"),e.floatCast&&e.floatCast.classList.add("is-leaving"),e.leaveTimer=setTimeout(function(){e.classList.remove("is-leaving"),e.hidePopover(),e.floatCast&&e.floatCast.classList.remove("is-leaving")},T)):e.hidePopover(),a.onToggle&&a.onToggle(!1);var k=a.focusOnClose||l();g&&k&&k.focus()}}return r||(document.addEventListener("pointerdown",function(g){var k=l();e.matches(":popover-open")&&!e.contains(g.target)&&!(k&&k.contains(g.target))&&!(a.isInside&&a.isInside(g.target))&&W(!1)}),e.addEventListener("keydown",function(g){g.key==="Escape"&&e.matches(":popover-open")&&(g.preventDefault(),W(!0))}),window.zaismaWatch.resize(S),document.addEventListener("scroll",function(g){var k=l();if(!(!e.matches(":popover-open")||!n||!k||g.target.nodeType===1&&e.contains(g.target))){var v=k.getBoundingClientRect();(Math.abs(v.top-n.top)>s||Math.abs(v.left-n.left)>s)&&W(!1)}},{capture:!0,passive:!0}),window.zaismaWatch.scroll(S),window.zaismaWatch.fontsIn(S)),e.floating={open:x,close:W,isOpen:E,place:S}}})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C.wheels||(C.wheels=!0,(function(){var f=window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=36,d=864e5,s=3e5,e=["January","February","March","April","May","June","July","August","September","October","November","December"],a=window.matchMedia("(pointer: coarse)").matches?"Swipe each wheel to pick.":"Scroll or type to pick each one.";function r(y){return String(y).padStart(2,"0")}function o(y){return new Date(y.getFullYear(),y.getMonth(),y.getDate())}function n(y,S){for(var x=new Date().getFullYear(),z=[],T=x;T>x-100;T--)z.push(String(T));function W(A,P){return A?new Date(P||2e3,A,0).getDate():31}var g={month:0,day:0,year:0},k=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(S.value);k&&(g.month=Number(k[2]),g.day=Number(k[3]),g.year=Math.max(0,z.indexOf(k[1])+1));function v(){return!!(g.month&&g.day&&g.year)}return{parts:["month","day","year"],at:g,hasBlank:!0,rows:function(A){if(A==="month")return["Month"].concat(e);if(A==="year")return["Year"].concat(z);for(var P=["Day"],L=1;L<=W(g.month,g.year?Number(z[g.year-1]):0);L++)P.push(String(L));return P},set:function(A,P){return g[A]=P,A==="day"?[]:["day"]},isComplete:v,typed:function(A,P,L){if(A!=="year"||!/^\\d{2}$/.test(P))return-1;for(var H=1;H<L.length;H++)if(L[H].slice(2)===P)return H;return-1},firstPart:function(){return v()||!g.month?"month":g.day?"year":"day"},words:function(){if(!v())return{shown:null,read:a,sent:""};var A=e[g.month-1],P=z[g.year-1];return{shown:A.slice(0,3)+" "+g.day+", "+P,read:A+" "+g.day+", "+P,sent:P+"-"+r(g.month)+"-"+r(g.day)}}}}function l(y,S,x){for(var z=[],T=[],W=["AM","PM"],g=1;g<=12;g++)z.push(String(g));for(var k=0;k<60;k+=5)T.push(r(k));var v=y.hasAttribute("data-minimum-at")?new Date(y.getAttribute("data-minimum-at")):new Date;isNaN(v)&&(v=new Date),v=new Date(Math.ceil(v.getTime()/s)*s);for(var A=o(v),P=[],L=0;L<366;L++)P.push(new Date(A.getFullYear(),A.getMonth(),A.getDate()+L));var H=o(new Date).getTime(),N=new Date().getFullYear(),ee=new Intl.DateTimeFormat("en-US",{weekday:"short",month:"short",day:"numeric"}),q=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"});function B(D){var b=Math.round((D.getTime()-H)/d);return b===0?"Today":b===1?"Tomorrow":(D.getFullYear()===N?ee:q).format(D)}var J=P.map(B);function te(D,b){try{var F=new Intl.DateTimeFormat("en-US",{timeZoneName:b}).formatToParts(D).find(function(G){return G.type==="timeZoneName"});return F?F.value:""}catch{return""}}function u(D){var b=-D.getTimezoneOffset(),F=b<0?"-":"+",G=Math.abs(b);return D.getFullYear()+"-"+r(D.getMonth()+1)+"-"+r(D.getDate())+"T"+r(D.getHours())+":"+r(D.getMinutes())+F+r(Math.floor(G/60))+":"+r(G%60)}var w={day:0,hour:0,minute:0,half:0},M=!1;function U(D){var b=P[D.day];return new Date(b.getFullYear(),b.getMonth(),b.getDate(),(D.hour+1)%12+D.half*12,D.minute*5)}function Y(D){var b=Math.max(0,Math.min(P.length-1,Math.round((o(D).getTime()-A.getTime())/d)));return{day:b,hour:(D.getHours()%12||12)-1,minute:Math.floor(D.getMinutes()/5),half:D.getHours()<12?0:1}}function I(D){Object.keys(D).forEach(function(b){w[b]=D[b]})}var K=S.value?new Date(S.value):null,Z=K&&!isNaN(K)&&x.classList.contains("is-marked")?K:null;return K&&!isNaN(K)&&(I(Y(K<v?v:K)),M=!0),{parts:["day","hour","minute","half"],at:w,hasBlank:!1,rows:function(D){return D==="day"?J:D==="hour"?z:D==="minute"?T:W},set:function(D,b){return w[D]=b,M=!0,Z=null,U(w)<v?(I(Y(v)),"all"):[]},isComplete:function(){return M},opening:function(){if(M)return!1;var D=new Date;return D.setMinutes(60,0,0),I(Y(D<v?v:D)),M=!0,!0},firstPart:function(){return"day"},words:function(){var D=Z||U(w);if(!M)return{shown:null,read:"",sent:""};var b=D.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),F=o(D),G=Math.round((F.getTime()-H)/d),Q=G===0?"Today":G===1?"Tomorrow":F.toLocaleDateString("en-US",F.getFullYear()===N?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"}),ae=te(D,"short"),V=te(D,"long");return{shown:Q+", "+b+(ae?" "+ae:""),read:D.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})+" at "+b+(V?", "+V:""),sent:u(D)}}}}function E(y){var S=[],x={},z={};return Array.prototype.forEach.call(y.querySelectorAll(".wheel[data-part]"),function(T){var W=T.getAttribute("data-part");S.push(W);try{x[W]=JSON.parse(T.getAttribute("data-rows"))||[]}catch{x[W]=[]}z[W]=Math.max(0,Number(T.getAttribute("data-picked"))||0)}),{parts:S,at:z,hasBlank:!1,rows:function(T){return x[T].map(function(W){return W[0]})},set:function(T,W){return z[T]=W,[]},isComplete:function(){return!0},firstPart:function(){return S[0]},words:function(){var T=S.map(function(g){return(x[g][z[g]]||[""])[0]}).join(" "),W={};return S.forEach(function(g){W[g]=(x[g][z[g]]||["",""])[1]}),{shown:T,read:T,sent:W}}}}window.zaismaWatch.each("[data-wheels]",function(y){var S=y.getAttribute("data-wheels"),x=y.id,z=y.querySelector(".wheel-button"),T=y.querySelector(".wheel-pick"),W=y.querySelector(".wheel-value"),g=T.classList.contains("in-place"),k=y.querySelector(".field-error"),v=y.querySelector(".field-hint"),A=y.querySelector(".wheel-read"),P=y.querySelector('input[type="hidden"]:not([data-part])'),L=S==="birthday"?n(y,P):S==="date-time"?l(y,P,z):E(y),H=W.textContent,N={};L.parts.forEach(function(b){N[b]={el:y.querySelector('.wheel[data-part="'+b+'"]'),count:0}});var ee=T.querySelector(".wheels"),q=window.zaismaFloat(T,{anchor:z,home:y,lineOf:function(){return ee.offsetTop+1.5*h},onToggle:function(b){z.setAttribute("aria-expanded",String(b))}});function B(){return q.isOpen()}function J(b){var F=N[b],G=L.at[b];Array.prototype.forEach.call(F.el.children,function(Q,ae){Q.setAttribute("aria-selected",String(ae===G))}),F.el.setAttribute("aria-activedescendant",x+"-"+b+"-"+G)}function te(b){var F=N[b],G=L.rows(b),Q=document.createDocumentFragment();F.count=G.length,F.el.textContent="",G.forEach(function(ae,V){var ie=document.createElement("div");ie.className="flush-row compact quiet",ie.setAttribute("role","option"),ie.id=x+"-"+b+"-"+V,ie.textContent=ae,ie.setAttribute("data-label",ae),L.hasBlank&&V===0&&ie.classList.add("blank"),Q.appendChild(ie)}),F.el.appendChild(Q),F.isWired||(F.isWired=!0,F.el.addEventListener("click",function(ae){var V=ae.target.closest('[role="option"]');V&&V.parentElement===F.el&&M(b,Array.prototype.indexOf.call(F.el.children,V),!0)})),L.at[b]>F.count-1&&(L.at[b]=F.count-1),J(b)}function u(b){var F=N[b].el.firstElementChild;return F&&F.offsetHeight||h}function w(b){L.parts.forEach(function(F){N[F].el.scrollTo({top:L.at[F]*u(F),behavior:b&&!f?"smooth":"auto"})})}function M(b,F,G){F=Math.max(0,Math.min(N[b].count-1,F)),N[b].el.scrollTo({top:F*u(b),behavior:G&&!f?"smooth":"auto"}),Y(b,F)}var U=L.isComplete();function Y(b,F){if(!(L.at[b]===F&&U)){var G=L.set(b,F);U=!0,z.classList.contains("is-marked")&&L.isComplete()&&(z.classList.remove("is-marked"),k.hidden=!0,v&&(v.hidden=!1)),G==="all"?(L.parts.forEach(J),w(!0)):(J(b),G.forEach(function(Q){te(Q),N[Q].el.scrollTop=L.at[Q]*u(Q)})),I()}}function I(){var b=L.words();A.textContent=b.read,W.textContent=b.shown===null?H:b.shown,z.classList.toggle("set",b.shown!==null),P&&(P.value=typeof b.sent=="string"?b.sent:""),typeof b.sent=="object"&&Object.keys(b.sent).forEach(function(F){var G=y.querySelector('input[type="hidden"][data-part="'+F+'"]');G&&(G.value=b.sent[F])})}L.parts.forEach(function(b){var F=N[b],G=null,Q="",ae=0;te(b),F.el.addEventListener("scroll",function(){clearTimeout(G),G=setTimeout(function(){B()&&Y(b,Math.round(F.el.scrollTop/u(b)))},110)},{passive:!0}),F.el.addEventListener("keydown",function(V){var ie=L.at[b],ne=V.key,ce={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[ne];if(ce){M(b,ie+ce,!0),V.preventDefault();return}if(ne==="Home"){M(b,L.hasBlank?1:0,!0),V.preventDefault();return}if(ne==="End"){M(b,F.count-1,!0),V.preventDefault();return}if(ne==="Enter"&&L.isComplete()){Z(!0),V.preventDefault();return}if(!(ne.length!==1||V.metaKey||V.ctrlKey)){var j=Date.now();Q=j-ae>900?ne.toLowerCase():Q+ne.toLowerCase(),ae=j;for(var le=L.rows(b),oe=-1,se=L.hasBlank?1:0;se<le.length&&oe<0;se++)le[se].toLowerCase().indexOf(Q)===0&&(oe=se);oe<0&&L.typed&&(oe=L.typed(b,Q,le)),oe>=0&&(M(b,oe,!0),V.preventDefault())}})});function K(b){L.opening&&L.opening()&&(U=!0,L.parts.forEach(J),I()),q.open(),w(!1),!b&&N[L.firstPart()].el.focus({preventScroll:!0})}function Z(b){q.close(b)}z.addEventListener("click",function(){B()?Z(!1):K()}),g&&(L.opening&&!L.isComplete()?K(!0):requestAnimationFrame(function(){w(!1)})),I();var D=y.closest("form");D&&y.hasAttribute("data-required")&&D.addEventListener("submit",function(b){L.isComplete()||(b.preventDefault(),z.classList.add("is-marked"),k.hidden=!1,v&&(v.hidden=!0),K())})})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C.charts||(C.charts=!0,(function(){window.zaismaWatch.each("[data-chart-scroll]",function(s){s.scrollLeft=s.scrollWidth});function f(s,e,a){e.forEach(function(E,y){E.classList.toggle("is-focused",y===a)});var r=s.querySelector("[data-chart-scroll]"),o=e[a];if(!(!r||!o)){var n=r.getBoundingClientRect(),l=o.getBoundingClientRect();l.left<n.left?r.scrollLeft-=n.left-l.left:l.right>n.right&&(r.scrollLeft+=l.right-n.right),s.matches(":focus-visible")&&requestAnimationFrame(function(){d(s,o)})}}function h(s){return Array.prototype.slice.call(s.querySelectorAll(".chart-hit"))}function d(s,e){var a=s.querySelector(":scope > .chart-tip");if(a){if(s.classList.toggle("shows-tip",!!e),!e){a.classList.remove("is-shown");return}a.querySelector("b").textContent=e.getAttribute("data-tip-amount"),a.querySelector("span").textContent=e.getAttribute("data-tip-label");var r=s.getBoundingClientRect(),o=e.getBoundingClientRect(),n=getComputedStyle(e),l=!!e.closest(".is-bars");a.style.setProperty("--tip-left",o.left-r.left+o.width*parseFloat(n.getPropertyValue("--point-left"))/100+"px"),a.style.setProperty("--tip-top",o.top-r.top+o.height*parseFloat(n.getPropertyValue("--point-top"))/100+"px"),a.classList.toggle("is-end",e.classList.contains("is-end")),a.classList.toggle("is-middle",l&&!e.classList.contains("is-end")&&!e.classList.contains("is-start")),a.classList.toggle("is-high",e.classList.contains("is-high")),a.classList.add("is-shown")}}document.addEventListener("pointerover",function(s){var e=s.target instanceof Element?s.target.closest(".chart-hit"):null;e&&d(e.closest(".chart"),e)}),document.addEventListener("pointerout",function(s){var e=s.target instanceof Element?s.target.closest(".chart-hit"):null;if(e&&!(s.relatedTarget instanceof Element&&s.relatedTarget.closest(".chart-hit"))){var a=e.closest(".chart"),r=a.querySelector(".chart-hit.is-pointed")||(a.matches(":focus-visible")?a.querySelector(".chart-hit.is-focused"):null);d(a,r)}}),document.querySelectorAll("[data-chart-scroll]").forEach(function(s){s.addEventListener("scroll",function(){var e=s.closest(".chart");d(e,e.querySelector(".chart-hit.is-pointed"))},{passive:!0})}),document.addEventListener("focusout",function(s){var e=s.target instanceof Element&&s.target.matches("[data-chart-points]")?s.target:null;e&&d(e,e.querySelector(".chart-hit.is-pointed"))}),document.querySelectorAll(".chart-hit.is-pointed").forEach(function(s){d(s.closest(".chart"),s)}),document.addEventListener("focusin",function(s){var e=s.target instanceof Element&&s.target.matches("[data-chart-points]")?s.target:null;if(e){var a=h(e);a.length&&!e.querySelector(".chart-hit.is-focused")&&f(e,a,a.length-1)}}),document.addEventListener("keydown",function(s){var e=s.target instanceof Element&&s.target.matches("[data-chart-points]")?s.target:null;if(e){var a=h(e),r=a.indexOf(e.querySelector(".chart-hit.is-focused")),o=r;if(s.key==="ArrowRight"||s.key==="ArrowUp")o=Math.min(a.length-1,r+1);else if(s.key==="ArrowLeft"||s.key==="ArrowDown")o=Math.max(0,r-1);else if(s.key==="Home")o=0;else if(s.key==="End")o=a.length-1;else return;s.preventDefault(),f(e,a,o)}})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["long-fields"]||(C["long-fields"]=!0,(function(){var f=12;function h(d){var s=getComputedStyle(d),e=parseFloat(s.lineHeight)||24,a=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom);d.style.height="auto",d.classList.remove("is-scrolling");var r=e*(Number(d.getAttribute("rows"))||2)+a,o=e*f+a;d.classList.toggle("is-scrolling",d.scrollHeight>o+1),d.style.height=Math.max(r,Math.min(d.scrollHeight,o))+"px";var n=Number(d.getAttribute("maxlength")),l=document.getElementById(d.id+"-count");!n||!l||(l.hidden=d.value.length<n*.8,l.textContent=d.value.length.toLocaleString("en-US")+" of "+n.toLocaleString("en-US"))}window.zaismaWatch.each("textarea[data-long-field]",h),window.zaismaWatch.whenRead(function(){document.querySelectorAll("textarea[data-long-field]").forEach(h)}),document.addEventListener("input",function(d){d.target.matches&&d.target.matches("textarea[data-long-field]")&&h(d.target)}),window.zaismaWatch.fontsIn(function(){document.querySelectorAll("textarea[data-long-field]").forEach(h)})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C.sliders||(C.sliders=!0,(function(){function f(h){var d=h.closest(".slider"),s=Number(h.min),e=Number(h.max),a=d.querySelector("output"),r=a.getAttribute("data-unit");d.style.setProperty("--fill",((Number(h.value)-s)/Math.max(1e-9,e-s)).toFixed(4));var o=d.querySelector(".slider-slab");o&&o.redrawCut&&o.redrawCut(),a.textContent=Number(h.value).toLocaleString("en-US")+(r==="%"?"%":" "+r)}document.addEventListener("input",function(h){h.target.matches&&h.target.matches("input[data-slider]")&&f(h.target)}),window.addEventListener("pageshow",function(){document.querySelectorAll("input[data-slider]").forEach(f)})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["color-fields"]||(C["color-fields"]=!0,(function(){function f(r){return"#"+r.map(function(o){return o.toString(16).padStart(2,"0")}).join("").toUpperCase()}function h(r,o,n){function l(E){var y=(E+r/60)%6;return Math.round((n-n*o*Math.max(0,Math.min(y,4-y,1)))*255)}return[l(5),l(3),l(1)]}function d(r){var o=parseInt(r.slice(1),16),n=(o>>16)/255,l=(o>>8&255)/255,E=(o&255)/255,y=Math.max(n,l,E),S=y-Math.min(n,l,E),x=0;return S&&(x=y===n?(l-E)/S%6:y===l?(E-n)/S+2:(n-l)/S+4,x*=60,x<0&&(x+=360)),[x,y?S/y:0,y]}function s(r){var o=String(r||"").replace(/[^0-9a-f]/gi,"");return o.length===3&&(o=o.replace(/./g,"$&$&")),o.length===6?"#"+o.toUpperCase():null}function e(r){var o=/^\\s*(#[0-9a-f]{6})\\s*$/i.exec(r||"");return o?o[1].toUpperCase():null}var a=10;window.zaismaWatch.each("[data-color-field]",function(r){var o=r.querySelector(".color-button"),n=r.querySelector(".color-pick"),l=r.querySelector(".color-square"),E=r.querySelector(".color-knob"),y=r.querySelector(".color-side .cut-field input"),S=r.querySelector(".color-side .slider-input"),x=r.querySelector(':scope > input[type="hidden"]'),z=o.querySelector(".color-value"),T=o.querySelector(".color-chip"),W=r.querySelector(".color-none button"),g=d(e(x.value)||r.getAttribute("data-color-hex")),k=!!W&&!e(x.value),v=!1,A=window.zaismaFloat(n,{anchor:o,home:r,isAnchorWidth:n.classList.contains("in-place"),onToggle:function(q){o.setAttribute("aria-expanded",String(q)),q&&P()}});function P(q){var B=f(h(g[0],g[1],g[2])),J=k?"var(--clear-swatch)":B;[r,n].forEach(function(U){U.style.setProperty("--color-picked",J),U.style.setProperty("--color-full",f(h(g[0],g[1],1))),U.style.setProperty("--color-brightness",String(g[2]))});var te=l.clientWidth-2*a,u=l.clientHeight-2*a,w=N(a+g[0]/360*te,a+(1-g[1])*u);E.style.left=w[0]+"px",E.style.top=w[1]+"px",l.setAttribute("aria-valuetext",B),T.style.setProperty("--swatch",J),z.textContent=k?"None":B,x.value=k?"":B,q||(y.value=B);var M=Math.round(g[2]*100);Number(S.value)!==M&&(S.value=String(M),v=!0,S.dispatchEvent(new Event("input",{bubbles:!0})),v=!1)}function L(){r.dispatchEvent(new CustomEvent("zaisma:color",{bubbles:!0,detail:{colorValue:x.value}}))}function H(q){return Math.max(0,Math.min(1,q))}function N(q,B){var J=l.cutCorners||[0,0,0,0],te=(E.firstElementChild.cutCorners||[5])[0],u=[l.clientWidth,l.clientHeight];return[[1,1],[-1,1],[-1,-1],[1,-1]].forEach(function(w,M){var U=w[0]>0?q-a:u[0]-q-a,Y=w[1]>0?B-a:u[1]-B-a,I=J[M]-te-(U+Y);J[M]>te&&I>0&&(q+=w[0]*I/2,B+=w[1]*I/2)}),[q,B]}function ee(q){var B=l.getBoundingClientRect();g[0]=H((q.clientX-B.left-a)/(B.width-2*a))*359.99,g[1]=1-H((q.clientY-B.top-a)/(B.height-2*a)),k=!1,P(),L()}l.addEventListener("pointerdown",function(q){l.setPointerCapture(q.pointerId),l.classList.add("is-held"),ee(q),l.focus({preventScroll:!0}),q.preventDefault()}),l.addEventListener("pointermove",function(q){l.hasPointerCapture(q.pointerId)&&ee(q)}),l.addEventListener("pointerup",function(){l.classList.remove("is-held")}),l.addEventListener("pointercancel",function(){l.classList.remove("is-held")}),l.addEventListener("keydown",function(q){var B=q.shiftKey?30:5,J=q.shiftKey?.2:.05;if(q.key==="ArrowLeft")g[0]=Math.max(0,g[0]-B);else if(q.key==="ArrowRight")g[0]=Math.min(359.99,g[0]+B);else if(q.key==="ArrowUp")g[1]=Math.min(1,g[1]+J);else if(q.key==="ArrowDown")g[1]=Math.max(0,g[1]-J);else return;q.preventDefault(),k=!1,P(),L()}),S.addEventListener("input",function(){v||(g[2]=Number(S.value)/100,k=!1,P(),L())}),y.addEventListener("input",function(){var q=s(y.value);q&&(g=d(q),k=!1,P(!0),L())}),y.addEventListener("blur",function(){P()}),W&&W.addEventListener("click",function(){k=!0,P(),L()}),o.addEventListener("click",function(){A.isOpen()?A.close(!1):A.open()}),n.classList.contains("in-place")&&A.open(),P()})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["city-pane"]||(C["city-pane"]=!0,(function(){var f=0;function h(d){var s=document.querySelector("[data-city-pane]"),e=document.querySelector(".city-stage");if(!(!s||!e||e.classList.contains("is-framed")||window.innerWidth===f&&!d)){if(f=window.innerWidth,window.innerWidth>760){s.style.marginTop="";return}var a=Array.prototype.find.call(s.querySelectorAll("h1, h2"),function(l){return l.getClientRects().length>0}),r=s.parentElement.querySelector("header.top");s.style.marginTop="0px";var o=(a?a.getBoundingClientRect().bottom:s.getBoundingClientRect().top+120)-s.getBoundingClientRect().top+24,n=r?r.offsetTop+r.offsetHeight+12:12;s.style.marginTop=Math.round(Math.max(n,window.innerHeight-o))+"px"}}window.zaismaPlaceCityPane=h,window.zaismaWatch.each("[data-city-pane]",function(d){h(!0),window.zaismaWatch.size(d,function(){h(!0)})}),window.zaismaWatch.whenRead(function(){h(!0)}),window.addEventListener("resize",function(){h()}),window.zaismaWatch.fontsIn(function(){h(!0)})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["account-link"]||(C["account-link"]=!0,(function(){/(^|; )(__Host-)?zaisma_in=1/.test(document.cookie)&&window.zaismaWatch.each("header.top[data-account-from-cookie] .end > a:is(.run-wrap,.cut-btn)",function(f){f.href="/account";var h=f.querySelector(".face > span:not([class])");h&&(h.textContent="Account")})})())})(),(function(){var C=window.zaismaPieces=window.zaismaPieces||{};C["hidden-amounts"]||(C["hidden-amounts"]=!0,(function(){var f="zaisma.payments_amounts_hidden",h=!1;try{h=localStorage.getItem(f)==="yes"}catch{}var d="#payments .number-amount, [data-amount]",s="[data-amounts-toggle]";function e(o){o.hasAttribute("data-amount")||o.setAttribute("data-amount",o.textContent),o.textContent=h?"\\u2022\\u2022\\u2022":o.getAttribute("data-amount")}function a(o){o.setAttribute("aria-pressed",String(h));var n=o.querySelector("span:not([class])");n&&(n.textContent=h?"Show amounts":"Hide amounts")}function r(){document.querySelectorAll(d).forEach(e),document.querySelectorAll(s).forEach(a)}window.zaismaWatch.each(d,e),window.zaismaWatch.each(s,a),document.addEventListener("click",function(o){var n=o.target.closest&&o.target.closest("[data-amounts-toggle]");if(n){h=!h;try{localStorage.setItem(f,h?"yes":"no")}catch{}r()}})})())})(),(function(){function C(f){return!!f&&!f.matches('[aria-current="page"], [aria-pressed="true"], :disabled, [aria-disabled="true"], :has(> input:checked), :has(> input:disabled)')}window.zaismaWatch.each("[data-edge-light]",function(f){var h=f.querySelector(":scope > .edge-light");if(!h)return;var d=f.getAttribute("data-edge-light"),s=d==="bottom"||d==="top",e=null,a=null,r=250;function o(S,x){var z=f.getBoundingClientRect(),T=S.getBoundingClientRect();x||(h.style.transition="none"),h.style.setProperty("--light-at",(s?T.left+T.width/2-z.left:T.top+T.height/2-z.top)+"px"),h.style.setProperty("--light-span",(s?T.width:T.height)+"px"),x||(h.offsetWidth,h.style.transition="")}function n(S){clearTimeout(a),a=null,o(S,f.classList.contains("is-lit")),e=S,f.classList.add("is-awake","is-lit")}function l(){clearTimeout(a),a=null,e=null,f.classList.remove("is-lit")}function E(){!a&&e&&(a=setTimeout(l,r))}f.addEventListener("pointerover",function(S){if(!(S.pointerType&&S.pointerType!=="mouse")){f.classList.add("is-awake");var x=S.target.closest("[data-lights]");x&&f.contains(x)&&C(x)?n(x):E()}}),f.addEventListener("pointerleave",function(){l(),f.classList.remove("is-awake")}),f.addEventListener("focusin",function(S){var x=S.target.closest("[data-lights]");x&&f.contains(x)&&C(x)&&x.matches(":focus-visible")&&(f.classList.add("is-awake"),n(x))}),f.addEventListener("focusout",function(S){f.contains(S.relatedTarget)||(l(),f.classList.remove("is-awake"))}),f.addEventListener("click",function(){setTimeout(function(){e&&!C(e)&&l()},0)}),f.addEventListener("scroll",function(){e&&o(e,!1)},!0);var y=f.matches("[data-lights].is-pointed")?f:f.querySelector("[data-lights].is-pointed");y&&n(y)})})(),(function(){var C=getComputedStyle(document.documentElement);function f(e,a){return parseFloat(C.getPropertyValue(e))||a}function h(e){return document.querySelector('[aria-controls="'+e.id+'"][aria-expanded]')}function d(e){return Array.prototype.slice.call(e.querySelectorAll('[role="menuitem"]')).filter(function(a){return!a.closest("[hidden]")})}var s=new WeakMap;window.zaismaWatch.each('.dropdown[role="menu"]',function(e){var a=window.zaismaFloat(e,{anchor:function(){return s.get(e)||h(e)},anchorRect:function(r){var o=r.getBoundingClientRect(),n=r.closest(".top");if(!n)return o;var l=n.getBoundingClientRect().bottom;return{left:o.left,right:o.right,top:l-1,bottom:l,width:o.width,height:1}},isAlwaysBelow:function(r){var o=r.closest(".top");return!!o&&!(getComputedStyle(o).position==="fixed"&&o.offsetParent)},fitsRoom:!0,gapPx:f("--gap-control-stack",8),edgePx:f("--pad-frame",10),scrollBox:function(){return e.querySelector(".floating-body")},onToggle:function(r){var o=s.get(e)||h(e);o&&o.setAttribute("aria-expanded",String(r))},onPlaced:function(){var r=["menu-large","menu-small","menu-large","menu-small"],o=e.classList.contains("from-start");r[e.classList.contains("is-above")?o?3:2:o?0:1]="0",e.getAttribute("data-glass-corners")!==r.join(" ")&&(e.setAttribute("data-glass-corners",r.join(" ")),e.redrawGlass&&e.redrawGlass())}});e.zaismaPlace=a.place,e.addEventListener("keydown",function(r){var o=d(e),n=o.indexOf(document.activeElement);(r.key==="ArrowDown"||r.key==="ArrowUp")&&(r.preventDefault(),o[(n+(r.key==="ArrowDown"?1:o.length-1))%o.length].focus()),(r.key==="Home"||r.key==="End")&&(r.preventDefault(),o[r.key==="Home"?0:o.length-1].focus()),r.key==="Tab"&&a.close(!1)}),e.addEventListener("click",function(r){r.target.closest('[role="menuitem"]:not([aria-haspopup], [data-keeps-open])')&&a.close(!1)})}),document.addEventListener("click",function(e){var a=e.target.closest&&e.target.closest("[aria-controls][aria-expanded]"),r=a&&document.getElementById(a.getAttribute("aria-controls"));if(!(!r||!r.matches('.dropdown[role="menu"]')||!r.floating)){if(r.floating.isOpen()&&s.get(r)===a){r.floating.close(!1);return}s.set(r,a),r.floating.open();var o=d(r)[0];e.detail===0&&o?o.focus({preventScroll:!0}):(r.tabIndex=-1,r.focus({preventScroll:!0}))}})})(),(function(){var C=12;window.zaismaWatch.each("[data-select]",function(f){var h=f.querySelector(".select-button"),d=f.querySelector(".select-list"),s=d.querySelector('[role="listbox"]'),e=d.querySelector(".floating-body"),a=f.querySelector('input[type="hidden"]'),r=h.closest(".field"),o=f.querySelector(".select-value");function n(){d.style.maxHeight="";var v=e.scrollHeight-e.clientHeight;v>0&&v<C&&(d.style.maxHeight=Math.floor(d.getBoundingClientRect().height-(C-v))+"px")}if(document.fonts?document.fonts.ready.then(n):n(),window.zaismaWatch.resize(n),d.classList.contains("in-place")){var l=d.querySelector('[aria-selected="true"]')||d.querySelector('[role="option"]');l&&e.scrollHeight>e.clientHeight&&(e.scrollTop=l.offsetTop-(e.clientHeight-l.offsetHeight)/2,d.style.setProperty("--line-from-top",e.offsetTop+l.offsetTop-e.scrollTop+l.offsetHeight/2+"px"));return}var E=Array.prototype.slice.call(s.querySelectorAll('[role="option"]')),y=-1,S="",x=0;function z(){return E.findIndex(function(v){return v.getAttribute("aria-selected")==="true"})}function T(v){y=Math.max(0,Math.min(E.length-1,v)),E.forEach(function(L,H){L.classList.toggle("is-active",H===y)}),s.setAttribute("aria-activedescendant",E[y].id);var A=E[y],P=A.offsetTop;P<e.scrollTop?e.scrollTop=P:P+A.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=P+A.offsetHeight-e.clientHeight)}var W=window.zaismaFloat(d,{anchor:r,home:f,focusOnClose:h,lineOf:function(){var v=E[Math.max(0,z())];return e.offsetTop+v.offsetTop-e.scrollTop+v.offsetHeight/2},onShown:function(){n();var v=E[Math.max(0,z())];e.scrollHeight>e.clientHeight&&(e.scrollTop=v.offsetTop-(e.clientHeight-v.offsetHeight)/2)},onToggle:function(v){h.setAttribute("aria-expanded",String(v)),r.classList.toggle("is-open",v),v&&(T(Math.max(0,z())),s.focus({preventScroll:!0}))}});function g(v){E.forEach(function(A,P){A.setAttribute("aria-selected",String(P===v))}),o.textContent=E[v].textContent,o.classList.remove("is-placeholder"),(a.value!==E[v].getAttribute("data-choice-value")||!k)&&(a.value=E[v].getAttribute("data-choice-value"),a.dispatchEvent(new Event("change",{bubbles:!0}))),k=!0,W.close(!0)}var k=z()>=0;h.addEventListener("click",function(){h.disabled||(W.isOpen()?W.close(!1):W.open())}),h.addEventListener("keydown",function(v){(v.key==="ArrowDown"||v.key==="ArrowUp")&&(v.preventDefault(),h.disabled||W.open())}),s.addEventListener("click",function(v){var A=v.target.closest('[role="option"]');A&&g(E.indexOf(A))}),s.addEventListener("pointermove",function(v){var A=v.target.closest('[role="option"]');A&&E.indexOf(A)!==y&&T(E.indexOf(A))}),s.addEventListener("keydown",function(v){var A=v.key,P={ArrowDown:1,ArrowUp:-1,PageDown:5,PageUp:-5}[A];if(P){T(y+P),v.preventDefault();return}if(A==="Home"||A==="End"){T(A==="Home"?0:E.length-1),v.preventDefault();return}if(A==="Enter"||A===" "){g(y),v.preventDefault();return}if(A==="Tab"){W.close(!1);return}if(!(A.length!==1||v.metaKey||v.ctrlKey)){var L=Date.now();S=L-x>900?A.toLowerCase():S+A.toLowerCase(),x=L;var H=E.findIndex(function(N){return N.textContent.toLowerCase().indexOf(S)===0});H>=0&&T(H)}})})})();
|
|
11180
11198
|
` };
|
|
11181
|
-
var MINIFIED_COMPONENT_SCRIPT = { sourceSha256: "317a9449a6cd45039ecba48d9a9489f4cf11489dc768585aeb24a01277c97de0", minifiedText: `(function(){document.addEventListener("click",function(c){var d=c.target.closest&&c.target.closest(".find > .tertiary-btn");if(d){var L=d.parentElement.querySelector('input[type="search"]');L&&(L.value="",L.dispatchEvent(new Event("input",{bubbles:!0})),L.focus());return}var v=c.target.closest&&c.target.closest(".field:not(.code) > .cut-btn[aria-controls]");if(v){var n=document.getElementById(v.getAttribute("aria-controls"));if(n){var r=n.type==="password";n.type=r?"text":"password",v.querySelector(".face > span:not(.loader)").textContent=r?"Hide":"Show",v.setAttribute("aria-pressed",String(r))}}});var S="input[data-characters]";function f(c,d){var L=new RegExp("^"+c.getAttribute("data-characters")+"$");return c.hasAttribute("data-uppercase")&&(d=d.toUpperCase()),Array.from(d).filter(function(v){return L.test(v)}).join("")}function l(c,d,L){var v=f(c,d);if(!(v===d&&L.type!=="paste")){L.preventDefault();var n=c.selectionStart,r=c.selectionEnd,t=c.maxLength>=0?c.maxLength-c.value.length+r-n:v.length;v=v.slice(0,Math.max(0,t)),v&&(c.setRangeText(v,n,r,"end"),c.dispatchEvent(new Event("input",{bubbles:!0})))}}document.addEventListener("paste",function(c){var d=c.target;d.matches&&d.matches(S)&&c.clipboardData&&l(d,c.clipboardData.getData("text/plain"),c)}),document.addEventListener("beforeinput",function(c){var d=c.target;!d.matches||!d.matches(S)||c.inputType!=="insertText"||c.isComposing||typeof c.data!="string"||l(d,c.data,c)});function i(c){var d=f(c,c.value);if(c.maxLength>=0&&(d=d.slice(0,c.maxLength)),d!==c.value){var L=f(c,c.value.slice(0,c.selectionStart||0)).length;c.value=d,c.setSelectionRange(Math.min(L,d.length),Math.min(L,d.length))}}document.addEventListener("input",function(c){c.target.matches&&c.target.matches(S)&&!c.isComposing&&i(c.target)},!0),document.addEventListener("compositionend",function(c){c.target.matches&&c.target.matches(S)&&i(c.target)},!0);var a=".field > input:not([type='hidden']), .find > input[type='search']";function u(c){var d=c.parentElement,L=c.scrollWidth-c.clientWidth;d.classList.toggle("more-left",L>1&&c.scrollLeft>1),d.classList.toggle("more-right",L>1&&c.scrollLeft<L-1)}function p(c){requestAnimationFrame(function(){u(c)})}["input","focusin","focusout","keyup","click","scroll"].forEach(function(c){document.addEventListener(c,function(d){d.target.matches&&d.target.matches(a)&&p(d.target)},!0)}),document.addEventListener("selectionchange",function(){var c=document.activeElement;c&&c.matches&&c.matches(a)&&p(c)}),window.zaismaWatch.each(a,function(c){u(c),window.zaismaWatch.size(c,function(){u(c)})})})(),(function(){var S=6;function f(u){return typeof u=="string"?document.getElementById(u):u}function l(u){return u.querySelector(".pin-input")}function i(u){var p=l(u).value.length;Array.prototype.forEach.call(u.querySelectorAll(".pin-mark"),function(c,d){c.classList.toggle("is-filled",d<p),c.classList.toggle("is-next",d===Math.min(p,S-1))})}function a(u,p){var c=u.querySelector(".field-error");c.textContent=p||"",c.hidden=!p,Array.prototype.forEach.call(u.querySelectorAll(".pin-mark"),function(L){L.classList.toggle("is-marked",!!p)});var d=u.querySelector(".pin-marks");p&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(d.classList.remove("is-shaking"),d.offsetWidth,d.classList.add("is-shaking")),p?l(u).setAttribute("aria-invalid","true"):l(u).removeAttribute("aria-invalid")}window.zaismaPinField={digits:function(u){return l(f(u)).value},clear:function(u){var p=f(u);l(p).value="",i(p)},focus:function(u){l(f(u)).focus({preventScroll:!0})},setError:function(u,p){a(f(u),p)},setDisabled:function(u,p){var c=f(u);l(c).disabled=!!p,p?c.setAttribute("aria-busy","true"):c.removeAttribute("aria-busy")}},window.zaismaWatch.each("[data-pin]",function(u){var p=l(u);u.querySelector(".pin-marks").addEventListener("animationend",function(d){d.animationName==="pin-shake"&&d.currentTarget.classList.remove("is-shaking")}),p.addEventListener("input",function(){var d=p.value.replace(/\\D/g,"").slice(0,S);d!==p.value&&(p.value=d),u.querySelector(".pin-mark.is-marked")&&a(u,""),i(u),d.length===S&&u.dispatchEvent(new CustomEvent("zaisma:pin-complete",{bubbles:!0,detail:{digits:d}}))});function c(){var d=p.value.length;try{p.setSelectionRange(d,d)}catch{}}p.addEventListener("focus",c),p.addEventListener("keydown",function(d){/^(ArrowLeft|ArrowRight|Home|End|ArrowUp|ArrowDown)$/.test(d.key)&&(d.preventDefault(),c())}),i(u)})})(),(function(){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;var S=window.matchMedia("(hover: hover)").matches;function f(a){a.classList.remove("is-flaring"),a.offsetWidth,a.classList.add("is-flaring")}function l(a){return a.getAttribute("aria-busy")==="true"}document.addEventListener("click",function(a){var u=a.target.closest&&a.target.closest(".run-wrap");!u||u.disabled||l(u)||setTimeout(function(){l(u)?u.flaresWhenDone=!0:f(u)},0)}),document.addEventListener("animationend",function(a){a.animationName==="run-flare"&&a.target.classList&&a.target.classList.remove("is-flaring")});function i(a){if(a.dataset.rise)return;a.dataset.rise="1";var u=a.querySelector(".run");if(!u)return;function p(){a.classList.add("over"),a.style.setProperty("--lift","-1.5px"),u.classList.contains("glint")||u.classList.add("glint")}function c(){a.classList.remove("over"),a.style.removeProperty("--lift"),u.style.removeProperty("--refl"),u.classList.remove("glint")}new MutationObserver(function(){if(l(a)){c();return}a.flaresWhenDone&&(a.flaresWhenDone=!1,f(a)),S&&a.matches(":hover")&&p()}).observe(a,{attributes:!0,attributeFilter:["aria-busy"]}),S&&(a.addEventListener("pointerenter",function(){l(a)||p()}),u.addEventListener("animationend",function(d){d.animationName==="slab-glint"&&u.classList.remove("glint")}),a.addEventListener("pointerleave",c),a.addEventListener("pointermove",function(d){if(!l(a)){var L=a.getBoundingClientRect(),v=(d.clientX-L.left)/L.width-.5;u.style.setProperty("--refl",(50-v*70).toFixed(1)+"%")}}))}document.querySelectorAll(".run-wrap").forEach(i),window.zaismaWatch.page(function(a){a.forEach(function(u){u.addedNodes.forEach(function(p){p.querySelectorAll&&p.querySelectorAll(".run-wrap").forEach(i)})})})})(),(function(){var S=[];function f(i){!i||i.getAttribute("aria-busy")==="true"||(window.zaismaWait(i,new Promise(function(a){S.push(a)})),i.tagName==="BUTTON"&&setTimeout(function(){i.disabled=!0},0))}function l(i,a){setTimeout(function(){i.defaultPrevented||a()},0)}document.addEventListener("submit",function(i){if(!(i.target.getAttribute("method")==="dialog"||i.submitter&&i.submitter.getAttribute("formmethod")==="dialog")){var a=i.submitter&&i.submitter.closest(".shell")||i.target.querySelector('.shell[type="submit"]');l(i,function(){f(a)})}}),window.addEventListener("pageshow",function(i){i.persisted&&(S.splice(0).forEach(function(a){a()}),document.querySelectorAll('.shell[aria-busy="true"]').forEach(function(a){a.disabled=!1}))})})(),(function(){function S(l){var i=/polygon\\(([^)]*)\\)/.exec(l||"");return i?i[1].split(",").map(function(a){var u=a.trim().split(/\\s+/);return[parseFloat(u[0]),parseFloat(u[1])]}):null}function f(l,i){var a=l.length,u=l.map(function(E){return E[0]}),p=Math.min.apply(null,u),c=Math.max.apply(null,u);function d(E,C){var _=-1;return l.forEach(function(N,R){Math.abs(N[0]-E)<.01&&(_<0||(C?N[1]<l[_][1]:N[1]>l[_][1]))&&(_=R)}),_}for(var L=d(p,!0),v=d(p,!1),n=d(c,!0),r=d(c,!1),t=1,s=L,m=0;m<a&&s!==n;m++,s=(s+1)%a)if(s===r&&r!==n){t=-1;break}function b(E,C){for(var _=[],N=E,R=0;R<=a&&(_.push(l[N]),N!==C);R++)N=(N+t+a)%a;return _}var y=b(n,L),g=y.map(function(E){return E[0].toFixed(2)+"px calc("+(E[1]+i).toFixed(2)+"px - max(var(--toggle-rise), 0px))"}),x=y.slice().reverse().map(function(E){return E[0].toFixed(2)+"px "+(E[1]+i).toFixed(2)+"px"});return"polygon("+g.concat(x).join(", ")+")"}window.zaismaWatch.each(".toggle-btn",function(l){var i=l.querySelector(":scope > .face"),a=l.querySelector(":scope > .toggle-front");if(!i||!a)return;function u(){var p=S(i.style.getPropertyValue("--cut-shape")),c=parseFloat(getComputedStyle(l).getPropertyValue("--toggle-lift"))||0;p&&p.length>=3&&a.style.setProperty("--front-shape",f(p,c))}u(),new MutationObserver(u).observe(i,{attributes:!0,attributeFilter:["style"]})})})(),(function(){document.addEventListener("change",function(S){var f=S.target;if(!(!f.classList||!f.classList.contains("check-input"))){var l=f.closest(".check");!l||!f.checked||(l.classList.add("is-just-ticked"),l.addEventListener("pointerleave",function(){l.classList.remove("is-just-ticked")},{once:!0}))}})})(),(function(){window.zaismaWatch.each(".choice-cards",function(S){function f(){var l=S.children,i=l.length>1&&l[1].offsetTop>l[0].offsetTop+1;S.classList.toggle("is-stacked",i),Array.prototype.forEach.call(l,function(a){a.setAttribute("data-edge-light",i?"left":"bottom")})}f(),window.zaismaWatch.size(S,f)})})(),(function(){function S(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"),i=f.querySelector(".file-drop-input"),a=f.querySelector(".file-drop-list"),u=f.querySelector(".field-error"),p=Number(f.getAttribute("data-most-bytes"))||0,c=(i.getAttribute("accept")||"").split(",").map(function(y){return y.trim().toLowerCase()}).filter(Boolean),d=0;function L(){var y=c.map(function(g){var x=g.split("/");return g.charAt(0)==="."?g:x[1]==="*"?x[0]+" file":"."+x[1]});return y.length>1?y.slice(0,-1).join(", ")+" or "+y[y.length-1]:y[0]}function v(y){if(!c.length)return!0;var g=y.name.toLowerCase(),x=(y.type||"").toLowerCase();return c.some(function(E){return E.charAt(0)==="."?g.slice(-E.length)===E:/\\/\\*$/.test(E)?x.indexOf(E.slice(0,-1))===0:x===E})}function n(y){u.textContent=y,u.hidden=!y,l.classList.toggle("is-marked",!!y);var g=(i.getAttribute("aria-describedby")||"").split(" ").filter(function(x){return x&&x!==u.id});y?(g.push(u.id),i.setAttribute("aria-invalid","true")):i.removeAttribute("aria-invalid"),i.setAttribute("aria-describedby",g.join(" "))}i.addEventListener("dragenter",function(){d++,l.classList.add("is-over")}),i.addEventListener("dragleave",function(){d=Math.max(0,d-1),d||l.classList.remove("is-over")}),i.addEventListener("drop",function(){d=0,l.classList.remove("is-over")}),i.addEventListener("change",function(){var y=Array.prototype.slice.call(i.files),g=y.find(function(C){return!v(C)}),x=p?y.find(function(C){return C.size>p}):null,E=g?g.name+" isn't a "+L()+".":x?x.name+" is "+S(x.size)+"; the most is "+S(p)+".":"";E&&(i.value="",y=[]),n(E),m(y)});var r=f.querySelector(".file-drop-row-template"),t=[],s=f.querySelector(".file-drop-zoom-template").innerHTML;function m(y){t.forEach(function(g){g.url&&URL.revokeObjectURL(g.url)}),a.textContent="",t=[],y.forEach(function(g){var x=r.content.firstElementChild.cloneNode(!0),E=x.querySelector(".file-drop-preview"),C=(g.type||"").indexOf("image/")===0?URL.createObjectURL(g):"";C&&(E.style.setProperty("--picture","url("+JSON.stringify(C)+")"),E.setAttribute("data-picture",C),E.disabled=!1,E.querySelector(".ico").outerHTML=s),E.setAttribute("aria-label","View "+g.name),x.querySelector(".file-drop-name").textContent=g.name,x.querySelector(".file-drop-size").textContent=S(g.size);var _=x.querySelector(".file-drop-remove button");_.setAttribute("aria-label","Remove "+g.name),a.appendChild(x),t.push({file:g,url:C})}),a.hidden=!y.length}var b=f.querySelector(".file-drop-view");a.addEventListener("click",function(y){var g=y.target.closest&&y.target.closest(".file-drop-preview[data-picture]");g&&(b.src=g.getAttribute("data-picture"),b.alt=g.getAttribute("aria-label").replace(/^View /,""))}),a.addEventListener("click",function(y){var g=y.target.closest&&y.target.closest(".file-drop-remove button");if(g){var x=g.closest(".file-drop-row"),E=Array.prototype.indexOf.call(a.children,x),C=x.querySelector(".file-drop-name, .progress-words > span").textContent;if(t[E]){var _=new DataTransfer;t.forEach(function(N,R){R!==E&&_.items.add(N.file)}),t[E].url&&URL.revokeObjectURL(t[E].url),i.files=_.files,t.splice(E,1)}x.remove(),a.hidden=!a.children.length,f.dispatchEvent(new CustomEvent("zaisma:file-remove",{bubbles:!0,detail:{fileName:C}})),a.children.length?a.children[Math.min(E,a.children.length-1)].querySelector(".file-drop-remove button").focus():i.focus()}})})})(),(function(){function S(f){var l=document.createRange();l.selectNodeContents(f);var i=window.getSelection();i.removeAllRanges(),i.addRange(l)}document.addEventListener("click",function(f){var l=f.target.closest&&f.target.closest(".copy-field");if(!l||!f.target.closest(".well"))return;var i=l.querySelector(".copy-field-text"),a=l.querySelector(".copy-said");if(!f.target.closest(".well-end > .tertiary-btn")&&l.classList.contains("is-code")){S(i);return}function u(c){a.textContent=c,l.classList.add("is-copied"),clearTimeout(a.timer),a.timer=setTimeout(function(){a.textContent="",l.classList.remove("is-copied")},1600)}function p(){S(i);var c=!1;try{c=document.execCommand("copy")}catch{}c&&u("Copied")}navigator.clipboard&&navigator.clipboard.writeText?(u("Copied"),navigator.clipboard.writeText(i.getAttribute("data-copy")||i.textContent).catch(p)):p()})})(),(function(){function S(l){var i=l.querySelector("[data-code-wrap]"),a=l.querySelector(".code-scroll"),u=l.querySelector(".code-lines");!i||!a||!u||(i.hidden=!l.classList.contains("is-wrapped")&&u.scrollWidth<=a.clientWidth+1)}var f=typeof ResizeObserver=="function"?new ResizeObserver(function(l){l.forEach(function(i){var a=i.target.closest(".code-block");a&&S(a)})}):null;window.zaismaWatch.each(".code-block",function(l){S(l),f&&f.observe(l.querySelector(".code-scroll"))}),document.addEventListener("click",function(l){var i=l.target.closest&&l.target.closest("[data-code-wrap], [data-code-copy]"),a=i&&i.closest(".code-block");if(!a)return;if(i.hasAttribute("data-code-wrap")){var u=!a.classList.contains("is-wrapped");a.classList.toggle("is-wrapped",u),i.setAttribute("aria-pressed",String(u)),S(a);return}var p=a.querySelector(".code-lines"),c=a.querySelector(".code-said");function d(){c.textContent="Copied",a.classList.add("is-copied"),clearTimeout(c.timer),c.timer=setTimeout(function(){c.textContent="",a.classList.remove("is-copied")},1600)}function L(){var v=document.createRange();v.selectNodeContents(p);var n=window.getSelection();n.removeAllRanges(),n.addRange(v);var r=!1;try{r=document.execCommand("copy")}catch{}r&&d()}navigator.clipboard&&navigator.clipboard.writeText?(d(),navigator.clipboard.writeText(p.textContent).catch(L)):L()})})(),(function(){document.addEventListener("click",function(S){var f=S.target.closest&&S.target.closest("[data-qr-png]");if(f){var l=new Image;l.onload=function(){var i=Object.assign(document.createElement("canvas"),{width:1024,height:1024}),a=i.getContext("2d");a.imageSmoothingEnabled=!1,a.drawImage(l,0,0,1024,1024),i.toBlob(function(u){var p=Object.assign(document.createElement("a"),{href:URL.createObjectURL(u),download:f.getAttribute("data-qr-png")});p.click(),setTimeout(function(){URL.revokeObjectURL(p.href)},1e3)},"image/png")},l.src=f.getAttribute("data-qr-svg")}})})(),(function(){function S(n){return Array.prototype.slice.call(n.querySelectorAll("[data-media-slide]"))}function f(n){var r=n.querySelector("[data-media-slide]:not([hidden])");return r?Number(r.getAttribute("data-media-slide")):0}function l(n){var r=n.querySelector("video:not(.video-stand-in)");r&&r.pause();var t=n.querySelector("iframe");t&&t.remove()}var i=32;function a(n,r,t){var s=S(n);if(s.length){r=(r+s.length)%s.length;var m=f(n),b=r===m||!n.open?0:r>m?1:-1;s.forEach(function(E,C){C!==r?(l(E),E.hidden=!0):E.hidden=!1});var y=s[r],g=y.querySelector("video:not(.video-stand-in)");y.shownMs=0,y.youtubeShare=0,b&&y.animate&&!c&&y.animate([{opacity:0,transform:"translateX("+b*i+"px)"},{opacity:1,transform:"none"}],{duration:300,easing:"cubic-bezier(0.2, 0, 0, 1)"}),y.hasAttribute("data-youtube-video-id")?u(y,t):g&&t&&g.play().catch(function(){});var x=n.querySelector("[data-media-at]");x&&(x.textContent=String(r+1)),n.querySelectorAll(".media-thumb").forEach(function(E){var C=Number(E.getAttribute("data-media-to"))===r;E.querySelector(".media-thumb-time").style.setProperty("--groove-filled","0"),C?(E.setAttribute("aria-current","true"),E.scrollIntoView({block:"nearest",inline:"nearest"})):E.removeAttribute("aria-current")})}}function u(n,r){if(!n.querySelector("iframe")){var t=document.createElement("iframe");t.className="media-youtube",t.src="https://www.youtube-nocookie.com/embed/"+encodeURIComponent(n.getAttribute("data-youtube-video-id"))+"?rel=0&modestbranding=1&enablejsapi=1"+(r?"&autoplay=1":""),t.title=n.getAttribute("data-youtube-title")||"YouTube video",t.allow="autoplay; encrypted-media; fullscreen; picture-in-picture",t.setAttribute("allowfullscreen",""),t.referrerPolicy="strict-origin-when-cross-origin",t.addEventListener("load",function(){t.contentWindow.postMessage(JSON.stringify({event:"listening",id:1,channel:"widget"}),"https://www.youtube-nocookie.com")}),n.querySelector(".media-frame").appendChild(t)}}window.addEventListener("message",function(n){if(!(n.origin!=="https://www.youtube-nocookie.com"||typeof n.data!="string")){var r;try{r=JSON.parse(n.data)}catch{return}var t=Array.prototype.slice.call(document.querySelectorAll("iframe.media-youtube")).filter(function(b){return b.contentWindow===n.source})[0];if(!(!t||!r||!r.info)){var s=t.closest("[data-media-slide]"),m=s.closest("[data-media-viewer]");r.info.duration&&(s.youtubeLengthSec=r.info.duration),typeof r.info.currentTime=="number"&&(s.youtubeShare=r.info.currentTime/(s.youtubeLengthSec||Number(s.getAttribute("data-media-length"))||1)),r.info.playerState===0&&m.isAuto&&d(m)}}});var p=6e3,c=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function d(n){var r=f(n)+1;if(r>=S(n).length){n.isAuto=!1;return}a(n,r,!0)}function L(n){if(!n.isRunning){n.isRunning=!0;var r=performance.now();requestAnimationFrame(function t(s){if(!n.open||n.classList.contains("is-leaving")){n.isRunning=!1;return}var m=s-r;r=s;var b=n.querySelector("[data-media-slide]:not([hidden])"),y=b&&b.querySelector("video:not(.video-stand-in)"),g=0;y?g=y.currentTime/(isFinite(y.duration)&&y.duration>0?y.duration:1):b&&b.hasAttribute("data-youtube-video-id")?g=b.youtubeShare||0:b&&n.isAuto&&(document.hidden||(b.shownMs=(b.shownMs||0)+m),g=b.shownMs/p,g>=1&&(d(n),g=1));var x=n.querySelector('.media-thumb[aria-current="true"] .media-thumb-time');x&&x.style.setProperty("--groove-filled",Math.max(0,Math.min(1,g)).toFixed(4)),requestAnimationFrame(t)})}}document.addEventListener("ended",function(n){var r=n.target instanceof HTMLVideoElement?n.target.closest("[data-media-viewer]"):null;r&&r.isAuto&&d(r)},!0),document.addEventListener("click",function(n){var r=n.target instanceof Element?n.target:null;if(r){var t=r.closest("[data-media-to]");if(t){var s=t.closest("[data-media-viewer]"),m=s||document.getElementById(t.getAttribute("aria-controls")||"");if(!m)return;m.isAuto=!s&&!c,a(m,Number(t.getAttribute("data-media-to")),!0),L(m)}}}),document.addEventListener("keydown",function(n){if(!(n.key!=="ArrowLeft"&&n.key!=="ArrowRight")){var r=document.querySelector("dialog[data-media-viewer][open]");!r||n.target instanceof Element&&n.target.closest("input")||(n.preventDefault(),r.isAuto=!1,a(r,f(r)+(n.key==="ArrowRight"?1:-1)))}});var v=null;document.addEventListener("pointerdown",function(n){var r=n.target instanceof Element?n.target.closest(".media-shown"):null;v=r&&n.pointerType!=="mouse"?{x:n.clientX,y:n.clientY,viewer:r.closest("[data-media-viewer]")}:null}),document.addEventListener("pointerup",function(n){if(v){var r=n.clientX-v.x,t=n.clientY-v.y,s=v.viewer;v=null,Math.abs(r)>48&&Math.abs(r)>2*Math.abs(t)&&(s.isAuto=!1,a(s,f(s)+(r<0?1:-1)))}}),document.querySelectorAll("[data-media-viewer]").forEach(function(n){new MutationObserver(function(){(n.classList.contains("is-leaving")||!n.open)&&S(n).forEach(l)}).observe(n,{attributes:!0,attributeFilter:["class","open"]})})})(),(function(){function S(r){return r instanceof Element?r.closest("[data-video-player]"):null}document.addEventListener("click",function(r){var t=S(r.target);if(t){var s=r.target,m=t.querySelector("video:not(.video-stand-in)"),b=s===m||!!s.closest("[data-video-press]");if(b&&t.isWakeTouch){t.isWakeTouch=!1;return}s.closest("[data-video-play]")||b?m.paused?m.play().catch(function(){}):m.pause():s.closest("[data-video-sound]")?m.muted||m.volume===0?(m.muted=!1,m.volume===0&&(m.volume=.5)):m.muted=!0:s.closest("[data-video-full-screen]")&&(document.fullscreenElement?document.exitFullscreen():t.requestFullscreen?t.requestFullscreen():m.webkitEnterFullscreen&&m.webkitEnterFullscreen())}}),document.addEventListener("fullscreenchange",function(){document.querySelectorAll("[data-video-player] [data-video-full-screen]").forEach(function(r){var t=document.fullscreenElement===r.closest("[data-video-player]");r.setAttribute("data-is-on",String(t)),r.setAttribute("aria-label",t?"Exit full screen":"Full screen")})});function f(r,t){return isFinite(t.duration)&&t.duration>0?t.duration:Number(r.getAttribute("data-video-length"))||1}function l(r){var t=r.target;if(t instanceof HTMLVideoElement){var s=t.closest("[data-video-player]");if(s){var m=Math.min(1,t.currentTime/f(s,t)),b=Math.floor(t.currentTime/60),y=Math.floor(t.currentTime%60);s.querySelector(".video-seek-input[data-is-dragged]")||i(s,t,t.currentTime);var g=s.querySelector(".video-seek-input");g.hasAttribute("data-is-dragged")||(g.value=String(t.currentTime)),s.querySelector("[data-video-time]").textContent=b+":"+String(y).padStart(2,"0");var x=s.querySelector("[data-video-play]");x.setAttribute("aria-label",t.paused?"Play":"Pause"),x.setAttribute("data-is-on",String(!t.paused));var E=t.muted?0:t.volume,C=s.querySelector("[data-video-sound]");C.setAttribute("data-sound-at",E===0?"off":E<=.5?"low":"high"),C.setAttribute("aria-label",E===0?"Sound on":"Mute"),s.querySelector(".video-level-groove").style.setProperty("--groove-filled",E.toFixed(4));var _=s.querySelector(".video-level-input");_.hasAttribute("data-is-dragged")||(_.value=String(E)),(r.type==="play"||r.type==="pause"||r.type==="ended")&&n(s),r.type==="play"&&a(s,t)}}}function i(r,t,s){for(var m=f(r,t),b=Math.min(1,s/m),y=s,g=0;g<t.buffered.length;g++)t.buffered.start(g)<=s+.5&&t.buffered.end(g)>=s&&(y=t.buffered.end(g));r.querySelector(".video-progress").style.setProperty("--groove-filled",b.toFixed(4));var x=r.querySelector(".video-seek");x.style.setProperty("--played",b.toFixed(4)),x.style.setProperty("--loaded",Math.min(1,y/m).toFixed(4))}function a(r,t){r.isGliding||(r.isGliding=!0,(function s(){if(t.paused||t.ended||!r.isConnected){r.isGliding=!1;return}r.querySelector(".video-seek-input[data-is-dragged]")||i(r,t,t.currentTime),requestAnimationFrame(s)})())}["timeupdate","play","pause","volumechange","ended","progress"].forEach(function(r){document.addEventListener(r,l,!0)}),document.addEventListener("durationchange",function(r){var t=r.target;if(!(!(t instanceof HTMLVideoElement)||!isFinite(t.duration)||!(t.duration>0))){var s=t.closest("[data-video-player]");s&&(s.querySelector(".video-seek-input").max=String(t.duration))}},!0);var u=500;function p(r,t){if(clearTimeout(r.bufferingTimer),!t){r.classList.remove("is-buffering"),r.setAttribute("aria-busy","false"),r.querySelector(".video-status").textContent="";return}r.bufferingTimer=setTimeout(function(){var s=r.querySelector("video:not(.video-stand-in)");s.paused||s.readyState>=3||(r.classList.add("is-buffering"),r.setAttribute("aria-busy","true"),r.querySelector(".video-status").textContent="Loading",n(r))},u)}["waiting","stalled"].forEach(function(r){document.addEventListener(r,function(t){var s=t.target instanceof HTMLVideoElement&&!t.target.classList.contains("video-stand-in")?t.target.closest("[data-video-player]"):null;s&&p(s,!0)},!0)}),["playing","canplay","pause","ended","emptied"].forEach(function(r){document.addEventListener(r,function(t){var s=t.target instanceof HTMLVideoElement&&!t.target.classList.contains("video-stand-in")?t.target.closest("[data-video-player]"):null;s&&p(s,!1)},!0)});function c(r){var t=r.target instanceof Element?r.target.closest(".video-seek-input"):null;if(t){var s=t.closest("[data-video-player]"),m=s.querySelector("video:not(.video-stand-in)");i(s,m,Number(t.value)),m.currentTime=Number(t.value)}}document.addEventListener("input",c),document.addEventListener("change",c),document.addEventListener("input",function(r){var t=r.target instanceof Element?r.target.closest(".video-level-input"):null;if(t){var s=t.closest("[data-video-player]"),m=s.querySelector("video:not(.video-stand-in)");s.querySelector(".video-level-groove").style.setProperty("--groove-filled",Number(t.value).toFixed(4)),m.volume=Number(t.value),m.muted=m.volume===0}}),document.addEventListener("pointerdown",function(r){var t=r.target instanceof Element?r.target.closest(".video-seek-input, .video-level-input"):null;t&&t.setAttribute("data-is-dragged","")});function d(r){var t=r.target instanceof Element?r.target.closest(".video-seek-input"):null;if(t){var s=t.closest("[data-video-player]").querySelector("video:not(.video-stand-in)");s.preload==="none"&&(s.preload="auto",s.load(),s.currentTime=Number(t.value))}}document.addEventListener("pointerdown",d),document.addEventListener("keydown",d),["pointerup","pointercancel"].forEach(function(r){document.addEventListener(r,function(){document.querySelectorAll(".video-controls [data-is-dragged]").forEach(function(t){t.removeAttribute("data-is-dragged")})})});var L=2500;function v(r){var t=r.querySelector("video:not(.video-stand-in)");t.paused||r.classList.contains("is-buffering")||r.querySelector(".video-controls [data-is-dragged], .video-controls :focus-visible")||r.classList.add("is-quiet")}function n(r){r.classList.remove("is-quiet"),clearTimeout(r.quietTimer),r.quietTimer=setTimeout(function(){v(r)},L)}document.addEventListener("pointermove",function(r){var t=S(r.target);t&&n(t)}),document.addEventListener("pointerdown",function(r){var t=S(r.target);t&&(t.isWakeTouch=r.pointerType!=="mouse"&&t.classList.contains("is-quiet"),n(t))}),document.addEventListener("pointerout",function(r){var t=S(r.target);t&&r.pointerType==="mouse"&&!(r.relatedTarget instanceof Element&&t.contains(r.relatedTarget))&&(clearTimeout(t.quietTimer),v(t))}),document.addEventListener("focusin",function(r){var t=S(r.target);t&&n(t)})})(),(function(){var S=200;window.zaismaWatch.each("form.find[data-suggest]",function(f){var l=f.querySelector('input[type="search"]'),i=f.querySelector(".find-list"),a=i.querySelector('[role="listbox"]'),u=i.querySelector(".floating-body"),p=f.querySelector(".find-finish"),c=p.firstElementChild,d=p.lastElementChild,L=f.querySelector("template.find-icon"),v=f.querySelector("template.find-cover"),n=i.id.replace(/-list$/,""),r=f.getAttribute("data-suggest"),t=[],s=-1,m=0,b=null,y=new Map,g=window.zaismaFloat(i,{anchor:f,focusOnClose:l,isAnchorWidth:!0,onToggle:function(w){l.setAttribute("aria-expanded",String(w)),f.classList.toggle("is-open",w),E()}});function x(){return g.isOpen()}function E(){var w=x()&&t[s],q=l.value,T=w&&w.getAttribute("data-finish"),M=T&&q&&T.length>q.length&&T.toLowerCase().indexOf(q.toLowerCase())===0&&l.scrollLeft<1;c.textContent=M?q:"",d.textContent=M?T.slice(q.length):""}function C(w){if(s=w,t.forEach(function(T,M){T.classList.toggle("is-active",M===w)}),w>=0){l.setAttribute("aria-activedescendant",t[w].id);var q=t[w];q.offsetTop<u.scrollTop?u.scrollTop=q.offsetTop:q.offsetTop+q.offsetHeight>u.scrollTop+u.clientHeight&&(u.scrollTop=q.offsetTop+q.offsetHeight-u.clientHeight)}else l.removeAttribute("aria-activedescendant");E()}function _(){x()?g.place():g.open(),E()}function N(){g.close(!1),E()}function R(w,q){var T=document.createElement("span"),M=q?w.toLowerCase().indexOf(q.toLowerCase()):-1;if(M<0)return T.textContent=w,T;var B=document.createElement("b");return B.textContent=w.slice(M,M+q.length),T.append(w.slice(0,M),B,w.slice(M+q.length)),T}function H(w,q){var T=document.createElement(w);return T.className="select-option flush-row compact find-"+q,T.setAttribute("role","option"),T.id=n+"-row-"+t.length,T.setAttribute("data-cut-line","8"),T}function se(w,q,T){var M=T.get("finish "+w);return M?(M.replaceChild(R(w,q),M.lastChild),M):(M=H("div","finish-row"),M.setAttribute("data-finish",w),M.findKey="finish "+w,M.append(L.content.cloneNode(!0),R(w,q)),M)}function ee(w,q,T){var M=T.get("game "+w.page_url);if(M){var B=M.querySelector(".find-game-words");return B.replaceChild(R(w.title,q),B.firstChild),B.lastChild.textContent=w.fact,M}M=H("a","game"),M.href=w.page_url,M.tabIndex=-1,M.findKey="game "+w.page_url;var U=v.content.firstElementChild.cloneNode(!0),j=U.querySelector(".cover-picture");if(w.cover_url){var D=j.querySelector("img");/^\\/img\\/[A-Za-z0-9_-]+$/.test(w.cover_url)?D.srcset=[320,480].map(function(Y){return w.cover_url+"/w"+Y+".webp "+Y+"w"}).join(", "):D.removeAttribute("srcset"),D.src=w.cover_url,w.cover_placeholder_data_url&&/^data:image\\/(webp|png|jpeg);base64,[A-Za-z0-9+\\/=]+$/.test(w.cover_placeholder_data_url)&&D.parentElement.style.setProperty("--placeholder","url("+w.cover_placeholder_data_url+")")}else j.remove(),U.classList.add("is-placeholder");var F=document.createElement("span"),G=document.createElement("span");return F.className="find-game-words",G.className="find-game-fact",G.textContent=w.fact,F.append(R(w.title,q),G),M.append(U,F),M}function te(w,q){var T=new Map;t.forEach(function(F){F.findKey&&T.set(F.findKey,F)});var M=(w.games||[]).slice(0,3),B=(w.finishes||[]).slice(0,3).map(function(F){return se(F,q,T)}),U=M.map(function(F){return ee(F,q,T)}),j=B.length+U.length===t.length&&B.concat(U).every(function(F,G){return t[G]===F});if(!j){var D=a.querySelector(".find-head");D||(D=document.createElement("div"),D.className="find-head words-margin",D.setAttribute("role","presentation"),D.textContent="Games"),a.replaceChildren.apply(a,B.concat(U.length?[D]:[],U)),B.concat(U).forEach(function(F,G){F.id=n+"-row-"+G})}t=B.concat(U),t.length&&document.activeElement===l?(_(),C(0)):(C(-1),N())}function $(){var w=l.value.trim();if(b&&(b.abort(),b=null),!w){t=[],a.textContent="",C(-1),N();return}if(y.has(w)){te(y.get(w),w);return}b=new AbortController,fetch(r+(r.indexOf("?")<0?"?":"&")+"search_text="+encodeURIComponent(w),{signal:b.signal,headers:{Accept:"application/json"}}).then(function(q){return q.ok?q.json():{finishes:[],games:[]}}).then(function(q){y.set(w,q),l.value.trim()===w&&te(q,w)}).catch(function(){})}function re(){var w=t[s];!w||!w.hasAttribute("data-finish")||(l.value=w.getAttribute("data-finish"),l.dispatchEvent(new Event("input",{bubbles:!0})))}function J(){var w=t[s];if(w&&w.tagName==="A"){location.href=w.href;return}w&&(l.value=w.getAttribute("data-finish"),l.dispatchEvent(new Event("input",{bubbles:!0}))),clearTimeout(m),b&&b.abort(),N(),f.requestSubmit()}l.addEventListener("input",function(){clearTimeout(m),E(),m=setTimeout($,S)}),l.addEventListener("scroll",E);function Z(){!x()&&l.value.trim()&&(clearTimeout(m),$())}l.addEventListener("focus",Z),l.addEventListener("click",Z),l.addEventListener("keydown",function(w){var q=w.key;if(q==="ArrowDown"||q==="ArrowUp"){if(w.preventDefault(),!x()){t.length?(_(),C(0)):$();return}C((s+(q==="ArrowDown"?1:-1)+t.length)%t.length)}else q==="Tab"&&!w.shiftKey&&x()&&d.textContent?(w.preventDefault(),re()):q==="Enter"&&x()&&s>=0?(w.preventDefault(),J()):q==="Escape"&&x()&&(w.preventDefault(),N())}),l.addEventListener("focusout",function(){setTimeout(function(){document.activeElement!==l&&N()},0)}),i.addEventListener("pointerdown",function(w){w.preventDefault()}),i.addEventListener("pointermove",function(w){var q=w.target.closest(".select-option"),T=t.indexOf(q);T>=0&&T!==s&&C(T)}),i.addEventListener("click",function(w){var q=w.target.closest(".select-option"),T=t.indexOf(q);T<0||(w.preventDefault(),C(T),J())})})})(),(function(){var S=matchMedia("(prefers-reduced-motion: reduce)").matches;function f(i){var a=0;i.querySelectorAll('[data-filter-panel]:not([data-filter-panel=""])').forEach(function(v){var n=v.querySelector('a[role="menuitem"]');n&&n.getAttribute("aria-current")!=="page"&&a++});var u=document.querySelector('[aria-controls="'+i.id+'"]'),p=u&&u.querySelector(".slab"),c=u&&u.querySelector(".cut-count");a&&!c&&p&&(c=document.createElement("span"),c.className="cut-count",p.appendChild(c)),c&&(a?c.textContent=String(a):c.remove());var d=i.querySelector('[data-filter-panel=""] a[role="menuitem"][data-keeps-open]'),L=d&&d.previousElementSibling;d&&(d.hidden=!a),L&&L.matches("hr")&&(L.hidden=!a),i.zaismaPlace&&i.zaismaPlace()}function l(i,a,u){var p=null,c=i.querySelector("[data-filter-panel]:not([hidden])");if(i.querySelectorAll("[data-filter-panel]").forEach(function(v){v.hidden=v.getAttribute("data-filter-panel")!==a,v.hidden||(p=v)}),i.zaismaPlace&&i.zaismaPlace(),p&&c&&p!==c&&!S&&p.animate&&p.animate([{transform:"translateX("+(a?12:-12)+"px)",opacity:0},{transform:"none",opacity:1}],{duration:180,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"}),u&&p){var d=a===""&&i.lastGroupName?i.querySelector('[data-filter-opens="'+i.lastGroupName+'"]'):null,L=d||p.querySelector('[aria-current="page"]')||p.querySelector('[role="menuitem"]');L&&L.focus({preventScroll:!0})}}window.zaismaWatch.each(".filter-menu",function(i){i.addEventListener("click",function(a){var u=a.target.closest('[data-filter-panel=""] a[role="menuitem"][data-keeps-open]');if(u){i.querySelectorAll('[data-filter-panel]:not([data-filter-panel=""])').forEach(function(s){var m=s.querySelector('a[role="menuitem"]'),b=i.querySelector(".dropdown-tick");if(!(!m||m.getAttribute("aria-current")==="page")){b=b&&b.cloneNode(!0),s.querySelectorAll('[aria-current="page"]').forEach(function(x){x.removeAttribute("aria-current");var E=x.querySelector(".dropdown-tick");E&&E.remove()}),m.setAttribute("aria-current","page"),b&&m.appendChild(b);var y=i.querySelector('[data-filter-opens="'+s.getAttribute("data-filter-panel")+'"] .filter-picked'),g=m.querySelector("span");y&&g&&(y.textContent=g.textContent)}}),f(i);var p=i.querySelector(".filter-group");p&&p.focus({preventScroll:!0}),i.zaismaPlace&&i.zaismaPlace();return}var c=a.target.closest('[data-filter-panel]:not([data-filter-panel=""]) [role="menuitem"][data-keeps-open]');if(c){var d=c.closest("[data-filter-panel]"),t=d.getAttribute("data-filter-panel"),L=i.querySelector(".dropdown-tick");L=L&&L.cloneNode(!0),d.querySelectorAll('[aria-current="page"]').forEach(function(m){m.removeAttribute("aria-current");var b=m.querySelector(".dropdown-tick");b&&b.remove()}),c.setAttribute("aria-current","page"),L&&c.appendChild(L);var v=i.querySelector('[data-filter-opens="'+t+'"]'),n=c.querySelector("span");v&&n&&v.querySelector(".filter-picked")&&(v.querySelector(".filter-picked").textContent=n.textContent),i.lastGroupName=t,f(i),l(i,"",!0);return}var r=a.target.closest("[data-filter-opens]");if(r){var t=r.getAttribute("data-filter-opens");t&&(i.lastGroupName=t),l(i,t,a.detail===0)}}),i.addEventListener("keydown",function(a){var u=document.activeElement;a.key==="ArrowRight"&&u&&u.matches(".filter-group")&&(a.preventDefault(),i.lastGroupName=u.getAttribute("data-filter-opens"),l(i,i.lastGroupName,!0)),a.key==="ArrowLeft"&&u&&u.closest('[data-filter-panel]:not([data-filter-panel=""])')&&(a.preventDefault(),l(i,"",!0))}),i.addEventListener("beforetoggle",function(a){a.newState==="open"&&l(i,"",!1)})})})(),(function(){var S=4e3,f=8e3,l=1e4,i=3,a=300,u=2,p=300,c={done:'<div class="notice glass glass-bar done" role="status" data-notice="done" data-notice-urgency="information" data-glass data-glass-corners="strip"><svg class="edge" aria-hidden="true"></svg><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="2.2"><path d="M4.2 10.4l3.9 3.9 7.7-8.6"/></svg><span class="notice-text words-margin beside-controls compact"></span></div>',undo:'<div class="notice glass glass-bar done" role="status" data-notice="done" data-notice-urgency="information" data-notice-undo data-glass data-glass-corners="strip"><svg class="edge" aria-hidden="true"></svg><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="2.2"><path d="M4.2 10.4l3.9 3.9 7.7-8.6"/></svg><span class="notice-text words-margin beside-controls"></span><form class="notice-undo" method="post" action="#"><button class="shell tertiary-btn" type="submit"><span class="face flush-row" data-cut-line="10"><svg class="cut-line" aria-hidden="true"><polygon/></svg><span class="tertiary-words"><span class="tertiary-label one-line">Undo</span></span><span class="tertiary-line light-fill across light-line light-glint" aria-hidden="true"></span></span></button></form></div>',problem:'<div class="notice glass glass-bar problem" role="alert" data-notice="problem" data-notice-urgency="information" data-glass data-glass-corners="strip"><svg class="edge" aria-hidden="true"></svg><svg class="ico" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.8 18.2 17H1.8z"/><path d="M10 8v4.2M10 14.6v.1"/></svg><span class="notice-text words-margin beside-controls compact"></span><button class="shell tertiary-btn icon-only small" data-layer-close="" type="button" aria-label="Close"><span class="face flush-row" data-cut-line="9"><svg class="cut-line" aria-hidden="true"><polygon/></svg><span class="tertiary-words"><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="1.8"><path d="M5 5l10 10M15 5 5 15"/></svg></span></span></button></div>',card:'<aside class="playing-card glass" id="layer-card" role="status" data-glass data-glass-corners="pane" hidden><svg class="edge" aria-hidden="true"></svg><div class="playing-card-in"><div class="layout-stack"><div class="stack-cell is-words"><p></p></div></div></div></aside>',urgent:'<aside class="playing-card glass urgent-card" id="layer-urgent" role="alert" data-notice-urgency="urgent" popover="manual" data-glass data-glass-corners="pane"><svg class="edge" aria-hidden="true"></svg><div class="playing-card-in"><div class="pane-parts"><div class="pane-head" data-control-height="small"><div class="pane-head-words"><h2 class="playing-card-title"></h2></div><div class="pane-head-end"><button class="shell tertiary-btn icon-only small" data-layer-close="" type="button" aria-label="Close"><span class="face flush-row" data-cut-line="9"><svg class="cut-line" aria-hidden="true"><polygon/></svg><span class="tertiary-words"><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="1.8"><path d="M5 5l10 10M15 5 5 15"/></svg></span></span></button></div></div><div class="pane-body"><p class="urgent-card-text words-margin"></p></div></div></div></aside>'},d={urgent:0,ask:1,information:2},L=document.documentElement,v=function(){return L.classList.contains("is-playing")},n=function(){return window.matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches},r=parseFloat(getComputedStyle(L).getPropertyValue("--gap-control-stack"))||8,t=[],s=0,m=-1/0,b=null,y=null,g=[];function x(e){var o=e.getAttribute("data-notice-urgency");return o==="information"||o==="ask"||o==="urgent"?o:e.querySelector("a, button, input, select, textarea")?"ask":"information"}function E(e){for(var o=0;o<t.length;o++)if(t[o].el===e)return t[o];return null}function C(e){return{element:e.el,leave:function(){q(e)}}}function _(e){return e.order=s++,e.queuedAtMs=Date.now(),e.isShown=!1,t.push(e),H(),C(e)}var N=function(e,o){return d[e.noticeUrgency]-d[o.noticeUrgency]||e.order-o.order},R=function(e){return e.noticeUrgency==="information"&&e.tone!=="problem"};function H(){clearTimeout(b),b=null;var e=Date.now(),o=v(),h=g.length>0||!!document.fullscreenElement,A=t.filter(function(W){return!W.isShown}).sort(N);A.forEach(function(W){W.noticeUrgency==="urgent"&&$(W)}),A=A.filter(function(W){return W.noticeUrgency!=="urgent"});var k=t.filter(function(W){return W.isShown&&W.noticeUrgency!=="urgent"&&W.isOverGame===o}).length,O=o?h?0:1:i,P=e-m;if(o&&O&&!k&&A.length&&P<a)return b=setTimeout(H,a-P),M();for(var z=0;z<A.length&&k<O;z++){var I=A[z];if(o&&R(I)&&e-I.queuedAtMs>l){se(I);continue}te(I),k++}M()}function se(e){var o=t.indexOf(e);o!==-1&&t.splice(o,1),e.el&&!e.isMade&&e.el.matches(".notice")&&e.el.remove()}function ee(e){var o=document.createElement("template"),h=e.noticeUrgency==="urgent"?"urgent":v()?"card":e.undoAction?"undo":e.tone==="problem"?"problem":"done";o.innerHTML=c[h];var A=o.content.firstElementChild;if(A.id="layer-"+e.order,A.setAttribute("data-notice-urgency",e.noticeUrgency),h==="urgent"){var k=A.querySelector(".playing-card-title");k&&k.remove(),A.querySelector(".urgent-card-text").textContent=e.text}else h==="card"?A.querySelector("p").textContent=e.text:(A.querySelector(".notice-text").textContent=e.text,h==="undo"&&A.querySelector("form").setAttribute("action",e.undoAction));return A.zaismaLayer=e,(document.querySelector("main")||document.body).appendChild(A),A}function te(e){e.el||(e.el=ee(e)),e.isShown=!0,e.isOverGame=v();var o=e.el;o.classList.remove("is-leaving"),o.hidden=!1,w(e),R(e)&&Z(e),o.matches(".notice")&&T()}function $(e){(e.sheetsToClose||[]).forEach(function(o){var h=document.getElementById(o);h&&h.open&&h.close()}),e.el||(e.el=ee(e)),e.isShown=!0,e.isOverGame=v(),e.el.hidden=!1,re(e.el)}function re(e){e.showPopover&&(e.matches(":popover-open")&&e.hidePopover(),e.showPopover())}function J(){t.forEach(function(e){e.isShown&&e.noticeUrgency==="urgent"&&re(e.el)})}function Z(e){clearTimeout(e.timer),e.timer=setTimeout(function(){q(e)},e.undoAction||e.el.hasAttribute("data-notice-undo")?f:S)}function w(e){var o=e.el;if(!o.zaismaHeld){o.zaismaHeld=!0;var h=function(){var A=E(o);A&&clearTimeout(A.timer)};o.addEventListener("pointerenter",h),o.addEventListener("pointerdown",h),o.addEventListener("pointerleave",function(){var A=E(o);A&&A.isShown&&R(A)&&Z(A)})}}function q(e){var o=t.indexOf(e);if(o!==-1){if(t.splice(o,1),clearTimeout(e.timer),e.isShown){var h=e.el;e.isShown=!1,h.hidePopover&&h.matches(":popover-open")&&h.hidePopover(),h.matches(".notice")?(h.classList.add("is-leaving"),setTimeout(function(){h.remove(),T()},p)):(h.hidden=!0,e.isMade&&setTimeout(function(){h.remove()},p)),e.isOverGame&&e.noticeUrgency!=="urgent"&&(m=Date.now())}H()}}function T(){var e=0;t.filter(function(o){return o.isShown&&o.el.matches(".notice")}).sort(function(o,h){return o.order-h.order}).forEach(function(o){o.el.style.setProperty("--notice-shift",e+"px"),e+=o.el.offsetHeight+r})}function M(){var e=g.length?"sheet":t.some(function(o){return o.isShown&&o.el.matches(".playing-card")})?"card":null;e!==y&&(y=e,ue.coveredBy=e,window.dispatchEvent(new CustomEvent("zaisma:covered",{detail:{coveredBy:e}})))}function B(e){if(!(e.zaismaLayer||e.classList.contains("in-place"))){var o={el:e,noticeUrgency:x(e),tone:e.getAttribute("data-notice")==="problem"?"problem":"done"};e.zaismaLayer=o,e.hidden=!0,_(o)}}function U(e){e.querySelectorAll&&(e.matches("[data-notice]")&&B(e),e.querySelectorAll("[data-notice]").forEach(B))}U(document.body),window.zaismaWatch&&window.zaismaWatch.page(function(e){e.forEach(function(o){o.addedNodes.forEach(U)})});var j=window.MutationObserver?new MutationObserver(function(e){e.forEach(function(o){var h=E(o.target);h&&h.isShown&&o.target.hidden&&q(h)})}):null;document.addEventListener("click",function(e){var o=e.target;if(o.closest){var h=o.closest("[data-layer-close]"),A=h&&h.closest("[data-notice], .urgent-card");if(!A){var k=o.closest("a, button");A=k&&k.closest(".urgent-card")}var O=A&&E(A);O&&q(O)}}),document.addEventListener("fullscreenchange",function(){J(),H()});var D=HTMLDialogElement.prototype.close,F=HTMLDialogElement.prototype.showModal;function G(e){return e.open&&e.matches(".sheet")&&!e.classList.contains("in-place")}function Y(e){var o=g.indexOf(e);o!==-1&&(g.splice(o,1),H())}function ce(e,o){if(e.classList.contains("is-leaving"))return;e.classList.add("is-leaving"),Y(e);var h=setTimeout(k,400);function A(O){O.target===e&&O.propertyName==="opacity"&&k()}function k(){clearTimeout(h),e.removeEventListener("transitionend",A),e.classList.contains("is-leaving")&&(e.classList.remove("is-leaving"),D.apply(e,o))}e.addEventListener("transitionend",A)}var de=window.matchMedia?window.matchMedia("(min-width: 761px)"):{matches:!1},V=new Map,fe=8,le=16,Q=null,he=!(window.CSS&&CSS.supports("overlay","auto"));document.addEventListener("click",function(e){var o=e.target.closest&&e.target.closest("button, a, [role='button']");Q=o?{button:o,at:performance.now()}:null},!0),HTMLDialogElement.prototype.showModal=function(){var e=this.open,o=this.matches(".sheet")&&!this.classList.contains("in-place");if(!e&&o){if(g.length>=u){var h=g[g.length-1];console.warn("Sheets go two deep at most: #"+this.id+" replaces #"+h.id+"."),Y(h),h.classList.remove("is-leaving"),D.apply(h)}this.zaismaOpener=document.activeElement}!e&&o&&this.classList.toggle("is-over-sheet",g.length>0);var A=!e&&o&&he&&!n();if(A&&this.classList.add("is-arriving"),F.apply(this,arguments),A){var k=this;(function O(P,z){requestAnimationFrame(function(I){if(!(z&&I-z<25)&&P<30)return O(P+1,I);k.classList.remove("is-arriving")})})(0,0)}e||!o||(g.push(this),we(this),ie(this),ye(this),J(),H())};function ye(e){window.zaismaInput&&window.zaismaInput.isKeyboard()||(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}function we(e){var o=Q&&performance.now()-Q.at<2e3&&Q.button.isConnected?Q.button:null;!o||!e.classList.contains("is-compact")||e.matches(".in-place, .store-panel, .placement-middle, .is-picture")||o.closest("[popover]")||e.contains(o)||o.closest("dialog[open]")||(V.set(e,{opener:o,rect:o.getBoundingClientRect(),isOnPage:!!(window.zaismaIsOnPage&&window.zaismaIsOnPage(o,e))}),e.classList.add("is-anchored"),e.classList.toggle("is-on-page",V.get(e).isOnPage),ae&&ae.observe(e))}function ie(e){var o=V.get(e);if(!(!o||!e.open)){if(!e.classList.contains("is-compact")){e.classList.remove("is-anchored","is-above","is-at-end","is-on-page"),e.style.removeProperty("--sheet-left"),e.style.removeProperty("--sheet-top");return}e.classList.toggle("is-on-page",o.isOnPage);var h=o.opener.isConnected?o.opener.getBoundingClientRect():o.rect;h.width||h.height?o.rect=h:h=o.rect;var A=document.documentElement.clientWidth,k=window.innerHeight;if(h.bottom<0||h.top>k||h.right<0||h.left>A){e.close();return}e.style.setProperty("--sheet-max-height",k-2*le+"px");var O=Math.max(h.top,k-h.bottom)-fe-le;if(e.classList.toggle("is-anchored",de.matches||e.offsetHeight<=O),!!e.classList.contains("is-anchored")){var P=window.zaismaPlace(h,{width:e.offsetWidth,height:e.offsetHeight},{roomRect:{left:0,top:0,right:A,bottom:k},gapPx:fe,edgePx:le}),z=e.classList.contains("is-on-page");e.style.setProperty("--sheet-left",Math.round(P.leftPx+(z?window.scrollX:0))+"px"),e.style.setProperty("--sheet-top",Math.round(P.topPx+(z?window.scrollY:0))+"px"),e.classList.toggle("is-above",P.isAbove),e.classList.toggle("is-at-end",P.isAtEnd)}}}function pe(){V.forEach(function(e,o){ie(o)})}var ae=window.ResizeObserver?new ResizeObserver(function(e){e.forEach(function(o){V.has(o.target)&&ie(o.target)})}):null;window.addEventListener("resize",pe),window.addEventListener("scroll",pe,{passive:!0,capture:!0}),document.addEventListener("close",function(e){var o=e.target;if(!(!o.matches||!o.matches(".sheet"))){Y(o),Ee(o);var h=o.zaismaOpener,A=g[g.length-1];o.zaismaOpener=null,A&&(h&&h.isConnected&&A.contains(h)?h:A).focus({preventScroll:!0}),V.has(o)&&(V.delete(o),ae&&ae.unobserve(o),o.classList.remove("is-anchored","is-above","is-at-end","is-on-page"),o.style.removeProperty("--sheet-left"),o.style.removeProperty("--sheet-top"),o.style.removeProperty("--sheet-max-height"))}},!0),HTMLDialogElement.prototype.close=function(){G(this)?ce(this,arguments):D.apply(this,arguments)},document.addEventListener("cancel",function(e){e.target.matches&&G(e.target)&&(e.preventDefault(),ce(e.target,[]))},!0),document.addEventListener("submit",function(e){if(!e.defaultPrevented){var o=e.submitter&&e.submitter.getAttribute("formmethod")||e.target.getAttribute("method"),h=e.target.closest("dialog");!o||o.toLowerCase()!=="dialog"||!h||!G(h)||(e.preventDefault(),ce(h,e.submitter&&e.submitter.hasAttribute("value")?[e.submitter.value]:[]))}}),document.addEventListener("click",function(e){if(e.target.closest){var o=e.target.closest("[aria-controls]:not([aria-expanded])"),h=o&&document.getElementById(o.getAttribute("aria-controls"));if(h&&h.matches("dialog.sheet")){e.preventDefault(),h.classList.contains("is-leaving")&&(h.classList.remove("is-leaving"),g.indexOf(h)===-1&&g.push(h),H()),h.open||h.showModal();return}var A=e.target.closest("[data-sheet-step-to]"),k=A&&A.closest("dialog");if(k){e.preventDefault(),ne(k,A.getAttribute("data-sheet-step-to"));return}var O=e.target.closest("[data-layer-show]");if(O){e.preventDefault(),ue.say({cardId:O.getAttribute("data-layer-show")});return}var P=e.target.closest("[data-sheet-back]");if(P){var z=P.closest("dialog");z&&z.zaismaSteps&&z.zaismaSteps.length>1&&ne(z,z.zaismaSteps[z.zaismaSteps.length-2]);return}var I=e.target.closest("[data-sheet-tab-to]"),W=I&&I.closest("dialog");if(W){ge(W,I.getAttribute("data-sheet-tab-to"));return}var K=e.target.closest("dialog.light-box[open]");if(K&&g[g.length-1]===K&&!e.target.closest("a, button, input, video, .floating-pane, .light-box.on-pane .glass-pane")){K.close();return}var X=e.target.matches("dialog.sheet[open]")?e.target:null;if(!(!X||!e.detail||g[g.length-1]!==X)){var oe=X.getBoundingClientRect();(e.clientX<oe.left||e.clientX>oe.right||e.clientY<oe.top||e.clientY>oe.bottom)&&X.close()}}});function be(e){if(!(!de.matches||!e.open||e.classList.contains("in-place"))){var o=e.offsetHeight;o>(parseFloat(e.style.minHeight)||0)&&(e.style.minHeight=o+"px")}}function me(e,o,h,A){o==="data-sheet-tab"&&be(e);var k=null;if(e.querySelectorAll("["+o+"]").forEach(function(P){var z=P.getAttribute(o)===h;P.hidden=!z,z&&(k=P)}),k){k.classList.remove("is-from-end","is-from-start"),A&&!n()&&(k.offsetWidth,k.classList.add(A>0?"is-from-end":"is-from-start"));var O=function(){k.querySelectorAll("[data-cut-line]").forEach(function(P){P.redrawCut&&P.redrawCut()})};k.classList.contains("is-from-end")||k.classList.contains("is-from-start")?k.addEventListener("animationend",O,{once:!0}):window.requestAnimationFrame&&requestAnimationFrame(O)}return k}function ve(e,o){var h=e.querySelector("["+o+"]");return h?h.getAttribute(o):null}function ne(e,o,h){var A=h&&h.isBackShown===!1?[]:e.zaismaSteps||[ve(e,"data-sheet-step")],k=A.indexOf(o);k===-1?A.push(o):A.length=k+1,e.zaismaSteps=A;var O=e.open?e.getBoundingClientRect():null,P=me(e,"data-sheet-step",o,e.open?k===-1?1:-1:0);if(P){if(e.querySelector("[data-sheet-step-compact]")){var z=P.hasAttribute("data-sheet-step-compact");if(z!==e.classList.contains("is-compact")&&(e.classList.toggle("is-compact",z),e.classList.toggle("is-task-step",!z),ie(e),O&&!n()&&e.animate)){var I=e.getBoundingClientRect(),W=Math.round(O.left+O.width/2-I.left-I.width/2)+"px "+Math.round(O.top+O.height/2-I.top-I.height/2)+"px";e.animate([{translate:W},{translate:"0 0"}],{duration:300,easing:"cubic-bezier(.2, .8, .2, 1)"})}}var K=P.querySelector("[data-sheet-back]");K&&(K.hidden=A.length<2);var X=P.querySelector(".sheet-title");X&&X.id&&e.setAttribute("aria-labelledby",X.id)}}function Ee(e){if(e.style.minHeight="",e.zaismaSteps){e.zaismaSteps=null;var o=ve(e,"data-sheet-step");ne(e,o),e.zaismaSteps=null}var h=e.querySelector("[data-sheet-tab-to]");h&&ge(e,h.getAttribute("data-sheet-tab-to"))}function ge(e,o){me(e,"data-sheet-tab",o,0);var h=e.querySelector('[data-sheet-tab-to="'+o+'"]'),A=h&&h.closest(".tab-switch");A&&A.pickTab&&A.pickTab(h)}var ue=window.zaismaLayers={coveredBy:null,openSheets:g,say:function(e){var o=e.cardId?document.getElementById(e.cardId):null;if(e.cardId&&!o)return null;var h=o?E(o):t.filter(function(P){return P.isMade&&P.text===e.text})[0];if(h)return C(h);var A=e.noticeUrgency||(o?x(o):"information"),k=e.sheetsToClose||(o&&o.getAttribute("data-sheets-to-close")?o.getAttribute("data-sheets-to-close").split(" "):[]),O={el:o,text:e.text||"",noticeUrgency:A,tone:e.tone==="problem"?"problem":"done",undoAction:e.undoAction||null,sheetsToClose:k,isMade:!o};return o&&(o.zaismaLayer=O,j&&j.observe(o,{attributes:!0,attributeFilter:["hidden"]})),_(O)},show:function(e){return e?ue.say({cardId:e.id}):null},leave:function(e){var o=e&&E(e.element||e);o&&q(o)},step:ne};H()})(),(function(){var S=450;window.zaismaWatch.each("form[data-steps]",function(f){var l=Array.prototype.slice.call(f.querySelectorAll(":scope > .step-bodies > .step-body")),i=Array.prototype.slice.call(f.closest(".pane-in").querySelectorAll(".step-line > li")),a=f.querySelector(":scope > .layout-row"),u=a.querySelector(".cut-btn"),p=a.querySelector(".run-wrap"),c=p.querySelector(".run-words:not(.label-busy)"),d=Number(f.getAttribute("data-steps"))||0,L=l.length-1,v="Next",n=f.getAttribute("data-finish-label"),r=0;function t(m){i.forEach(function(b,y){b.classList.remove("is-leaving","is-waiting"),b.classList.toggle("is-done",y<m),b.classList.toggle("is-current",y===m),y===m?b.setAttribute("aria-current","step"):b.removeAttribute("aria-current")})}function s(m){var b=d;d=Math.max(0,Math.min(L,m)),l.forEach(function(g,x){g.classList.toggle("is-away",x!==d)}),clearTimeout(r),d<b&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?(i.forEach(function(g,x){x>d&&(g.classList.contains("is-current")||g.classList.contains("is-done"))&&(g.classList.remove("is-current","is-done"),g.classList.add("is-leaving")),g.removeAttribute("aria-current")}),i[d].classList.remove("is-done"),i[d].classList.add("is-current","is-waiting"),i[d].setAttribute("aria-current","step"),r=setTimeout(function(){t(d)},S)):t(d),u.hidden=d===0,c&&(c.textContent=d===L?n:v);var y=l[d].querySelector("input, select, textarea, button");y&&document.activeElement&&f.contains(document.activeElement)&&y.focus({preventScroll:!0})}f.goToStep=s,u.addEventListener("click",function(){s(d-1)}),f.addEventListener("submit",function(m){if(d!==L){m.preventDefault();for(var b=l[d].querySelectorAll("input, select, textarea"),y=0;y<b.length;y++)if(!b[y].checkValidity()){b[y].reportValidity();return}s(d+1)}})})})(),(function(){var S=["purchase_pin","password","passkey"],f=6,l={purchase_pin:"Enter all "+f+" digits of your purchase PIN.",password:"Enter your password."},i=new WeakMap;function a(n,r){return document.getElementById(n+"-"+r)}function u(n,r){var t=document.getElementById(n).dataset.method==="purchase_pin",s=a(n,"problem");s.hidden=t||!r,s.querySelector("p").textContent=t?"":r||"",window.zaismaPinField.setError(a(n,"pin-field"),t?r:"")}function p(n,r,t){var s=t.method;a(r,"reason").querySelector("p").textContent=t.options.reason||"",a(r,"pin").hidden=s!=="purchase_pin",a(r,"password").hidden=s!=="password",S.forEach(function(b){var y=a(r,"way-"+b);y.hidden=b===s||t.methods.indexOf(b)===-1,y.disabled=t.isBusy}),a(r,"go-cell").hidden=s==="purchase_pin";var m=a(r,"go");m.querySelector(".label-idle").textContent=s==="passkey"?"Use your passkey":"Confirm",t.isBusy?m.setAttribute("aria-busy","true"):m.removeAttribute("aria-busy"),m.disabled=t.isBusy,window.zaismaPinField.setDisabled(a(r,"pin-field"),t.isBusy&&s==="purchase_pin"),n.dataset.method=s,a(r,"face").dataset.method=s}function c(n){window.zaismaPinField.clear(a(n,"pin-field")),a(n,"password-field").value=""}function d(n,r){r.method==="purchase_pin"?window.zaismaPinField.focus(a(n,"pin-field")):r.method==="password"&&a(n,"password-field").focus({preventScroll:!0})}async function L(n,r,t){if(!(t.isBusy||i.get(n)!==t)){var s=t.method,m;if(u(r,""),s==="passkey"){t.isBusy=!0,p(n,r,t);var b=await window.zaismaPasskeyTap(t.options.passkeyPurpose);if(b.error)return t.isBusy=!1,p(n,r,t),u(r,b.error);m={method:"passkey",passkey_tap:b.tap}}else{var y=s==="purchase_pin"?window.zaismaPinField.digits(a(r,"pin-field")):a(r,"password-field").value;if(!y||s==="purchase_pin"&&y.length<f)return u(r,l[s]);m=s==="purchase_pin"?{method:s,purchase_pin:y}:{method:s,password:y},t.isBusy=!0,p(n,r,t)}var g;try{g=await t.options.send(m)}catch{g={ok:!1,message:"Zaisma didn't answer. Check your connection and try again."}}if(t.isBusy=!1,g&&g.ok){t.isDone=!0,c(r),p(n,r,t),n.close(),t.options.onConfirmed();return}var x=g&&g.removed_methods||[];t.methods=t.methods.filter(function(E){return x.indexOf(E)===-1}),t.methods.indexOf(t.method)===-1&&(t.method=t.methods[0]||t.method),c(r),p(n,r,t),u(r,g&&g.message||"That didn't work. Try again."),d(r,t)}}function v(n,r){var t=function(){return i.get(n)};a(r,"go").addEventListener("click",function(){var s=t();s&&L(n,r,s)}),S.forEach(function(s){a(r,"way-"+s).addEventListener("click",function(){var m=t();!m||m.isBusy||m.methods.indexOf(s)===-1||(m.method=s,c(r),u(r,""),p(n,r,m),d(r,m))})}),n.addEventListener("zaisma:pin-complete",function(){var s=t();s&&s.method==="purchase_pin"&&L(n,r,s)}),n.addEventListener("keydown",function(s){if(!(s.key!=="Enter"||!(s.target instanceof HTMLInputElement))){s.preventDefault();var m=t();m&&L(n,r,m)}}),n.addEventListener("cancel",function(s){var m=t();m&&m.isBusy&&s.preventDefault()}),n.addEventListener("close",function(){var s=t();i.delete(n),c(r),s&&!s.isDone&&s.options.onCancelled&&s.options.onCancelled()})}window.zaismaConfirmItsYou=function(n,r){var t=document.getElementById(n);if(!t)return!1;if(t.open)return!0;var s=r.methods.filter(function(y){return y!=="passkey"||window.PublicKeyCredential&&window.zaismaPasskeyTap});if(!s.length)return!1;var m={options:r,methods:s,method:s[0],isBusy:!1,isDone:!1};t.dataset.confirmWired||(t.dataset.confirmWired="1",v(t,n)),i.set(t,m),c(n),u(n,""),p(t,n,m),t.classList.remove("is-leaving");var b=!navigator.userActivation||navigator.userActivation.isActive;return t.showModal(),m.method==="passkey"&&b?L(t,n,m):d(n,m),!0}})(),(function(){document.addEventListener("click",function(l){var i=l.target.closest&&l.target.closest("[data-load-more] > a.shell[href]");if(!(!i||l.button!==0||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey)){var a=i.parentElement,u=a.getAttribute("data-load-more").split(" "),p=document.getElementById(u[0]),c=a.querySelector(".load-more-words");p&&(l.preventDefault(),i.getAttribute("aria-busy")!=="true"&&window.zaismaWait(i,fetch(i.href,{headers:{accept:"text/html"},credentials:"same-origin"}).then(function(d){if(!d.ok)throw new Error(String(d.status));return d.text()}).then(function(d){var L=new DOMParser().parseFromString(d,"text/html");if(!L.getElementById(p.id)){location.href=i.href;return}u.forEach(function(r){var t=document.getElementById(r),s=L.getElementById(r);if(!(!t||!s||!s.children.length)){Array.prototype.slice.call(s.children).forEach(function(b){t.appendChild(document.importNode(b,!0))}),t.dispatchEvent(new Event("scroll"));var m=t.closest("[hidden]");m&&(m.hidden=!1)}});var v=L.querySelector("[data-load-more]");if(v){var n=document.importNode(v,!0);a.replaceWith(n),f(n)}else a.remove()}).catch(function(){a.classList.add("is-failed"),c&&(c.textContent="That didn't load. Check your connection, then try again.",c.hidden=!1)})))}});var S="IntersectionObserver"in window?new IntersectionObserver(function(l){l.forEach(function(i){var a=i.target.querySelector("a.shell[href]");i.isIntersecting&&a&&!i.target.classList.contains("is-failed")&&a.click()})},{rootMargin:"100% 0px"}):null;function f(l){S&&l.hasAttribute("data-loads-on-scroll")&&S.observe(l)}document.querySelectorAll("[data-loads-on-scroll]").forEach(f),window.zaismaLoadMore={watch:f}})(),(function(){var S=56,f=32,l=8,i=null,a=function(){return matchMedia("(prefers-reduced-motion: reduce)").matches},u=function(v){return!v.classList.contains("in-place")&&!v.classList.contains("urgent-card")&&!v.querySelector("a, button, input, select, textarea")};function p(v){v.classList.remove("is-swiping"),["--swipe-x","--swipe-y","--swipe-opacity"].forEach(function(n){v.style.removeProperty(n)})}function c(v,n,r){v.classList.remove("is-swiping"),!a()&&n==="x"&&v.style.setProperty("--swipe-x",r*v.offsetWidth+"px"),!a()&&n==="y"&&v.style.setProperty("--swipe-y",-v.offsetHeight+"px"),window.zaismaLayers&&window.zaismaLayers.leave(v),v.hidden=!0}var d=new WeakSet;function L(v){d.has(v)||(d.add(v),new MutationObserver(function(){v.hidden||p(v)}).observe(v,{attributes:!0,attributeFilter:["hidden"]}))}document.querySelectorAll(".playing-card").forEach(L),document.addEventListener("pointerdown",function(v){var n=v.target.closest&&v.target.closest(".playing-card");!n||n.hidden||!u(n)||v.pointerType==="mouse"&&v.button!==0||(L(n),i={card:n,id:v.pointerId,x:v.clientX,y:v.clientY,axis:"",dx:0,dy:0})}),document.addEventListener("pointermove",function(v){if(!(!i||v.pointerId!==i.id)){var n=v.clientX-i.x,r=v.clientY-i.y;if(!i.axis){if(Math.max(Math.abs(n),Math.abs(r))<l)return;if(i.axis=Math.abs(n)>=Math.abs(r)?"x":r<0?"y":"none",i.axis==="none"){i=null;return}try{i.card.setPointerCapture(v.pointerId)}catch{}a()||i.card.classList.add("is-swiping")}if(i.dx=n,i.dy=Math.min(0,r),!a()){var t=i.axis==="x"?Math.abs(i.dx)/i.card.offsetWidth:-i.dy/i.card.offsetHeight;i.card.style.setProperty(i.axis==="x"?"--swipe-x":"--swipe-y",(i.axis==="x"?i.dx:i.dy)+"px"),i.card.style.setProperty("--swipe-opacity",String(Math.max(0,1-t)))}}}),document.addEventListener("pointerup",function(v){if(!(!i||v.pointerId!==i.id)){var n=i.card,r=i.axis,t=i.dx,s=i.dy;i=null,!r||r==="x"&&Math.abs(t)>=S||r==="y"&&-s>=f?c(n,r,t<0?-1:1):p(n)}}),document.addEventListener("pointercancel",function(v){!i||v.pointerId!==i.id||(p(i.card),i=null)}),document.addEventListener("keydown",function(v){v.key==="Escape"&&document.querySelectorAll(".playing-card:not([hidden])").forEach(function(n){u(n)&&c(n,"",1)})})})(),(()=>{const S=()=>{const f=decodeURIComponent(location.hash.slice(1)),l=f?document.getElementById(f):null;l&&l.matches("details.list-row-fold")&&(l.open=!0)};S(),addEventListener("hashchange",S),document.addEventListener("click",f=>{const l=f.target instanceof Element?f.target.closest("details.list-row-fold > summary"):null,i=l?l.parentElement:null;if(!i||!i.open)return;if(f.preventDefault(),i.classList.contains("is-closing")){i.classList.remove("is-closing"),clearTimeout(i.closeLater);return}if(matchMedia("(prefers-reduced-motion: reduce)").matches){i.open=!1;return}i.classList.add("is-closing");const a=()=>{i.classList.contains("is-closing")&&(i.classList.remove("is-closing"),i.open=!1)},u=parseFloat(getComputedStyle(i,"::details-content").transitionDuration)||.4;i.closeLater=setTimeout(a,u*1e3+20)})})();
|
|
11199
|
+
var MINIFIED_COMPONENT_SCRIPT = { sourceSha256: "75f39210c7ae0714ea15fe70b5171441fe4d6b4cac77e649139111c1bef8563a", minifiedText: `(function(){document.addEventListener("click",function(c){var d=c.target.closest&&c.target.closest(".find > .tertiary-btn");if(d){var L=d.parentElement.querySelector('input[type="search"]');L&&(L.value="",L.dispatchEvent(new Event("input",{bubbles:!0})),L.focus());return}var v=c.target.closest&&c.target.closest(".field:not(.code) > .cut-btn[aria-controls]");if(v){var n=document.getElementById(v.getAttribute("aria-controls"));if(n){var r=n.type==="password";n.type=r?"text":"password",v.querySelector(".face > span:not(.loader)").textContent=r?"Hide":"Show",v.setAttribute("aria-pressed",String(r))}}});var S="input[data-characters]";function f(c,d){var L=new RegExp("^"+c.getAttribute("data-characters")+"$");return c.hasAttribute("data-uppercase")&&(d=d.toUpperCase()),Array.from(d).filter(function(v){return L.test(v)}).join("")}function l(c,d,L){var v=f(c,d);if(!(v===d&&L.type!=="paste")){L.preventDefault();var n=c.selectionStart,r=c.selectionEnd,t=c.maxLength>=0?c.maxLength-c.value.length+r-n:v.length;v=v.slice(0,Math.max(0,t)),v&&(c.setRangeText(v,n,r,"end"),c.dispatchEvent(new Event("input",{bubbles:!0})))}}document.addEventListener("paste",function(c){var d=c.target;d.matches&&d.matches(S)&&c.clipboardData&&l(d,c.clipboardData.getData("text/plain"),c)}),document.addEventListener("beforeinput",function(c){var d=c.target;!d.matches||!d.matches(S)||c.inputType!=="insertText"||c.isComposing||typeof c.data!="string"||l(d,c.data,c)});function i(c){var d=f(c,c.value);if(c.maxLength>=0&&(d=d.slice(0,c.maxLength)),d!==c.value){var L=f(c,c.value.slice(0,c.selectionStart||0)).length;c.value=d,c.setSelectionRange(Math.min(L,d.length),Math.min(L,d.length))}}document.addEventListener("input",function(c){c.target.matches&&c.target.matches(S)&&!c.isComposing&&i(c.target)},!0),document.addEventListener("compositionend",function(c){c.target.matches&&c.target.matches(S)&&i(c.target)},!0);var a=".field > input:not([type='hidden']), .find > input[type='search']";function u(c){var d=c.parentElement,L=c.scrollWidth-c.clientWidth;d.classList.toggle("more-left",L>1&&c.scrollLeft>1),d.classList.toggle("more-right",L>1&&c.scrollLeft<L-1)}function p(c){requestAnimationFrame(function(){u(c)})}["input","focusin","focusout","keyup","click","scroll"].forEach(function(c){document.addEventListener(c,function(d){d.target.matches&&d.target.matches(a)&&p(d.target)},!0)}),document.addEventListener("selectionchange",function(){var c=document.activeElement;c&&c.matches&&c.matches(a)&&p(c)}),window.zaismaWatch.each(a,function(c){u(c),window.zaismaWatch.size(c,function(){u(c)})})})(),(function(){var S=6;function f(u){return typeof u=="string"?document.getElementById(u):u}function l(u){return u.querySelector(".pin-input")}function i(u){var p=l(u).value.length;Array.prototype.forEach.call(u.querySelectorAll(".pin-mark"),function(c,d){c.classList.toggle("is-filled",d<p),c.classList.toggle("is-next",d===Math.min(p,S-1))})}function a(u,p){var c=u.querySelector(".field-error");c.textContent=p||"",c.hidden=!p,Array.prototype.forEach.call(u.querySelectorAll(".pin-mark"),function(L){L.classList.toggle("is-marked",!!p)});var d=u.querySelector(".pin-marks");p&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(d.classList.remove("is-shaking"),d.offsetWidth,d.classList.add("is-shaking")),p?l(u).setAttribute("aria-invalid","true"):l(u).removeAttribute("aria-invalid")}window.zaismaPinField={digits:function(u){return l(f(u)).value},clear:function(u){var p=f(u);l(p).value="",i(p)},focus:function(u){l(f(u)).focus({preventScroll:!0})},setError:function(u,p){a(f(u),p)},setDisabled:function(u,p){var c=f(u);l(c).disabled=!!p,p?c.setAttribute("aria-busy","true"):c.removeAttribute("aria-busy")}},window.zaismaWatch.each("[data-pin]",function(u){var p=l(u);u.querySelector(".pin-marks").addEventListener("animationend",function(d){d.animationName==="pin-shake"&&d.currentTarget.classList.remove("is-shaking")}),p.addEventListener("input",function(){var d=p.value.replace(/\\D/g,"").slice(0,S);d!==p.value&&(p.value=d),u.querySelector(".pin-mark.is-marked")&&a(u,""),i(u),d.length===S&&u.dispatchEvent(new CustomEvent("zaisma:pin-complete",{bubbles:!0,detail:{digits:d}}))});function c(){var d=p.value.length;try{p.setSelectionRange(d,d)}catch{}}p.addEventListener("focus",c),p.addEventListener("keydown",function(d){/^(ArrowLeft|ArrowRight|Home|End|ArrowUp|ArrowDown)$/.test(d.key)&&(d.preventDefault(),c())}),i(u)})})(),(function(){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;var S=window.matchMedia("(hover: hover)").matches;function f(a){a.classList.remove("is-flaring"),a.offsetWidth,a.classList.add("is-flaring")}function l(a){return a.getAttribute("aria-busy")==="true"}document.addEventListener("click",function(a){var u=a.target.closest&&a.target.closest(".run-wrap");!u||u.disabled||l(u)||setTimeout(function(){l(u)?u.flaresWhenDone=!0:f(u)},0)}),document.addEventListener("animationend",function(a){a.animationName==="run-flare"&&a.target.classList&&a.target.classList.remove("is-flaring")});function i(a){if(a.dataset.rise)return;a.dataset.rise="1";var u=a.querySelector(".run");if(!u)return;function p(){a.classList.add("over"),a.style.setProperty("--lift","-1.5px"),u.classList.contains("glint")||u.classList.add("glint")}function c(){a.classList.remove("over"),a.style.removeProperty("--lift"),u.style.removeProperty("--refl"),u.classList.remove("glint")}new MutationObserver(function(){if(l(a)){c();return}a.flaresWhenDone&&(a.flaresWhenDone=!1,f(a)),S&&a.matches(":hover")&&p()}).observe(a,{attributes:!0,attributeFilter:["aria-busy"]}),S&&(a.addEventListener("pointerenter",function(){l(a)||p()}),u.addEventListener("animationend",function(d){d.animationName==="slab-glint"&&u.classList.remove("glint")}),a.addEventListener("pointerleave",c),a.addEventListener("pointermove",function(d){if(!l(a)){var L=a.getBoundingClientRect(),v=(d.clientX-L.left)/L.width-.5;u.style.setProperty("--refl",(50-v*70).toFixed(1)+"%")}}))}document.querySelectorAll(".run-wrap").forEach(i),window.zaismaWatch.page(function(a){a.forEach(function(u){u.addedNodes.forEach(function(p){p.querySelectorAll&&p.querySelectorAll(".run-wrap").forEach(i)})})})})(),(function(){var S=[];function f(i){!i||i.getAttribute("aria-busy")==="true"||(window.zaismaWait(i,new Promise(function(a){S.push(a)})),i.tagName==="BUTTON"&&setTimeout(function(){i.disabled=!0},0))}function l(i,a){setTimeout(function(){i.defaultPrevented||a()},0)}document.addEventListener("submit",function(i){if(!(i.target.getAttribute("method")==="dialog"||i.submitter&&i.submitter.getAttribute("formmethod")==="dialog")){var a=i.submitter&&i.submitter.closest(".shell")||i.target.querySelector('.shell[type="submit"]');l(i,function(){f(a)})}}),window.addEventListener("pageshow",function(i){i.persisted&&(S.splice(0).forEach(function(a){a()}),document.querySelectorAll('.shell[aria-busy="true"]').forEach(function(a){a.disabled=!1}))})})(),(function(){function S(l){var i=/polygon\\(([^)]*)\\)/.exec(l||"");return i?i[1].split(",").map(function(a){var u=a.trim().split(/\\s+/);return[parseFloat(u[0]),parseFloat(u[1])]}):null}function f(l,i){var a=l.length,u=l.map(function(E){return E[0]}),p=Math.min.apply(null,u),c=Math.max.apply(null,u);function d(E,C){var _=-1;return l.forEach(function(N,I){Math.abs(N[0]-E)<.01&&(_<0||(C?N[1]<l[_][1]:N[1]>l[_][1]))&&(_=I)}),_}for(var L=d(p,!0),v=d(p,!1),n=d(c,!0),r=d(c,!1),t=1,s=L,m=0;m<a&&s!==n;m++,s=(s+1)%a)if(s===r&&r!==n){t=-1;break}function b(E,C){for(var _=[],N=E,I=0;I<=a&&(_.push(l[N]),N!==C);I++)N=(N+t+a)%a;return _}var y=b(n,L),g=y.map(function(E){return E[0].toFixed(2)+"px calc("+(E[1]+i).toFixed(2)+"px - max(var(--toggle-rise), 0px))"}),x=y.slice().reverse().map(function(E){return E[0].toFixed(2)+"px "+(E[1]+i).toFixed(2)+"px"});return"polygon("+g.concat(x).join(", ")+")"}window.zaismaWatch.each(".toggle-btn",function(l){var i=l.querySelector(":scope > .face"),a=l.querySelector(":scope > .toggle-front");if(!i||!a)return;function u(){var p=S(i.style.getPropertyValue("--cut-shape")),c=parseFloat(getComputedStyle(l).getPropertyValue("--toggle-lift"))||0;p&&p.length>=3&&a.style.setProperty("--front-shape",f(p,c))}u(),new MutationObserver(u).observe(i,{attributes:!0,attributeFilter:["style"]})})})(),(function(){document.addEventListener("change",function(S){var f=S.target;if(!(!f.classList||!f.classList.contains("check-input"))){var l=f.closest(".check");!l||!f.checked||(l.classList.add("is-just-ticked"),l.addEventListener("pointerleave",function(){l.classList.remove("is-just-ticked")},{once:!0}))}})})(),(function(){window.zaismaWatch.each(".choice-cards",function(S){function f(){var l=S.children,i=l.length>1&&l[1].offsetTop>l[0].offsetTop+1;S.classList.toggle("is-stacked",i),Array.prototype.forEach.call(l,function(a){a.setAttribute("data-edge-light",i?"left":"bottom")})}f(),window.zaismaWatch.size(S,f)})})(),(function(){function S(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"),i=f.querySelector(".file-drop-input"),a=f.querySelector(".file-drop-list"),u=f.querySelector(".field-error"),p=Number(f.getAttribute("data-most-bytes"))||0,c=(i.getAttribute("accept")||"").split(",").map(function(y){return y.trim().toLowerCase()}).filter(Boolean),d=0;function L(){var y=c.map(function(g){var x=g.split("/");return g.charAt(0)==="."?g:x[1]==="*"?x[0]+" file":"."+x[1]});return y.length>1?y.slice(0,-1).join(", ")+" or "+y[y.length-1]:y[0]}function v(y){if(!c.length)return!0;var g=y.name.toLowerCase(),x=(y.type||"").toLowerCase();return c.some(function(E){return E.charAt(0)==="."?g.slice(-E.length)===E:/\\/\\*$/.test(E)?x.indexOf(E.slice(0,-1))===0:x===E})}function n(y){u.textContent=y,u.hidden=!y,l.classList.toggle("is-marked",!!y);var g=(i.getAttribute("aria-describedby")||"").split(" ").filter(function(x){return x&&x!==u.id});y?(g.push(u.id),i.setAttribute("aria-invalid","true")):i.removeAttribute("aria-invalid"),i.setAttribute("aria-describedby",g.join(" "))}i.addEventListener("dragenter",function(){d++,l.classList.add("is-over")}),i.addEventListener("dragleave",function(){d=Math.max(0,d-1),d||l.classList.remove("is-over")}),i.addEventListener("drop",function(){d=0,l.classList.remove("is-over")}),i.addEventListener("change",function(){var y=Array.prototype.slice.call(i.files),g=y.find(function(C){return!v(C)}),x=p?y.find(function(C){return C.size>p}):null,E=g?g.name+" isn't a "+L()+".":x?x.name+" is "+S(x.size)+"; the most is "+S(p)+".":"";E&&(i.value="",y=[]),n(E),m(y)});var r=f.querySelector(".file-drop-row-template"),t=[],s=f.querySelector(".file-drop-zoom-template").innerHTML;function m(y){t.forEach(function(g){g.url&&URL.revokeObjectURL(g.url)}),a.textContent="",t=[],y.forEach(function(g){var x=r.content.firstElementChild.cloneNode(!0),E=x.querySelector(".file-drop-preview"),C=(g.type||"").indexOf("image/")===0?URL.createObjectURL(g):"";C&&(E.style.setProperty("--picture","url("+JSON.stringify(C)+")"),E.setAttribute("data-picture",C),E.disabled=!1,E.querySelector(".ico").outerHTML=s),E.setAttribute("aria-label","View "+g.name),x.querySelector(".file-drop-name").textContent=g.name,x.querySelector(".file-drop-size").textContent=S(g.size);var _=x.querySelector(".file-drop-remove button");_.setAttribute("aria-label","Remove "+g.name),a.appendChild(x),t.push({file:g,url:C})}),a.hidden=!y.length}var b=f.querySelector(".file-drop-view");a.addEventListener("click",function(y){var g=y.target.closest&&y.target.closest(".file-drop-preview[data-picture]");g&&(b.src=g.getAttribute("data-picture"),b.alt=g.getAttribute("aria-label").replace(/^View /,""))}),a.addEventListener("click",function(y){var g=y.target.closest&&y.target.closest(".file-drop-remove button");if(g){var x=g.closest(".file-drop-row"),E=Array.prototype.indexOf.call(a.children,x),C=x.querySelector(".file-drop-name, .progress-words > span").textContent;if(t[E]){var _=new DataTransfer;t.forEach(function(N,I){I!==E&&_.items.add(N.file)}),t[E].url&&URL.revokeObjectURL(t[E].url),i.files=_.files,t.splice(E,1)}x.remove(),a.hidden=!a.children.length,f.dispatchEvent(new CustomEvent("zaisma:file-remove",{bubbles:!0,detail:{fileName:C}})),a.children.length?a.children[Math.min(E,a.children.length-1)].querySelector(".file-drop-remove button").focus():i.focus()}})})})(),(function(){function S(f){var l=document.createRange();l.selectNodeContents(f);var i=window.getSelection();i.removeAllRanges(),i.addRange(l)}document.addEventListener("click",function(f){var l=f.target.closest&&f.target.closest(".copy-field");if(!l||!f.target.closest(".well"))return;var i=l.querySelector(".copy-field-text"),a=l.querySelector(".copy-said");if(!f.target.closest(".well-end > .tertiary-btn")&&l.classList.contains("is-code")){S(i);return}function u(c){a.textContent=c,l.classList.add("is-copied"),clearTimeout(a.timer),a.timer=setTimeout(function(){a.textContent="",l.classList.remove("is-copied")},1600)}function p(){S(i);var c=!1;try{c=document.execCommand("copy")}catch{}c&&u("Copied")}navigator.clipboard&&navigator.clipboard.writeText?(u("Copied"),navigator.clipboard.writeText(i.getAttribute("data-copy")||i.textContent).catch(p)):p()})})(),(function(){function S(l){var i=l.querySelector("[data-code-wrap]"),a=l.querySelector(".code-scroll"),u=l.querySelector(".code-lines");!i||!a||!u||(i.hidden=!l.classList.contains("is-wrapped")&&u.scrollWidth<=a.clientWidth+1)}var f=typeof ResizeObserver=="function"?new ResizeObserver(function(l){l.forEach(function(i){var a=i.target.closest(".code-block");a&&S(a)})}):null;window.zaismaWatch.each(".code-block",function(l){S(l),f&&f.observe(l.querySelector(".code-scroll"))}),document.addEventListener("click",function(l){var i=l.target.closest&&l.target.closest("[data-code-wrap], [data-code-copy]"),a=i&&i.closest(".code-block");if(!a)return;if(i.hasAttribute("data-code-wrap")){var u=!a.classList.contains("is-wrapped");a.classList.toggle("is-wrapped",u),i.setAttribute("aria-pressed",String(u)),S(a);return}var p=a.querySelector(".code-lines"),c=a.querySelector(".code-said");function d(){c.textContent="Copied",a.classList.add("is-copied"),clearTimeout(c.timer),c.timer=setTimeout(function(){c.textContent="",a.classList.remove("is-copied")},1600)}function L(){var v=document.createRange();v.selectNodeContents(p);var n=window.getSelection();n.removeAllRanges(),n.addRange(v);var r=!1;try{r=document.execCommand("copy")}catch{}r&&d()}navigator.clipboard&&navigator.clipboard.writeText?(d(),navigator.clipboard.writeText(p.textContent).catch(L)):L()})})(),(function(){document.addEventListener("click",function(S){var f=S.target.closest&&S.target.closest("[data-qr-png]");if(f){var l=new Image;l.onload=function(){var i=Object.assign(document.createElement("canvas"),{width:1024,height:1024}),a=i.getContext("2d");a.imageSmoothingEnabled=!1,a.drawImage(l,0,0,1024,1024),i.toBlob(function(u){var p=Object.assign(document.createElement("a"),{href:URL.createObjectURL(u),download:f.getAttribute("data-qr-png")});p.click(),setTimeout(function(){URL.revokeObjectURL(p.href)},1e3)},"image/png")},l.src=f.getAttribute("data-qr-svg")}})})(),(function(){function S(n){return Array.prototype.slice.call(n.querySelectorAll("[data-media-slide]"))}function f(n){var r=n.querySelector("[data-media-slide]:not([hidden])");return r?Number(r.getAttribute("data-media-slide")):0}function l(n){var r=n.querySelector("video:not(.video-stand-in)");r&&r.pause();var t=n.querySelector("iframe");t&&t.remove()}var i=32;function a(n,r,t){var s=S(n);if(s.length){r=(r+s.length)%s.length;var m=f(n),b=r===m||!n.open?0:r>m?1:-1;s.forEach(function(E,C){C!==r?(l(E),E.hidden=!0):E.hidden=!1});var y=s[r],g=y.querySelector("video:not(.video-stand-in)");y.shownMs=0,y.youtubeShare=0,b&&y.animate&&!c&&y.animate([{opacity:0,transform:"translateX("+b*i+"px)"},{opacity:1,transform:"none"}],{duration:300,easing:"cubic-bezier(0.2, 0, 0, 1)"}),y.hasAttribute("data-youtube-video-id")?u(y,t):g&&t&&g.play().catch(function(){});var x=n.querySelector("[data-media-at]");x&&(x.textContent=String(r+1)),n.querySelectorAll(".media-thumb").forEach(function(E){var C=Number(E.getAttribute("data-media-to"))===r;E.querySelector(".media-thumb-time").style.setProperty("--groove-filled","0"),C?(E.setAttribute("aria-current","true"),E.scrollIntoView({block:"nearest",inline:"nearest"})):E.removeAttribute("aria-current")})}}function u(n,r){if(!n.querySelector("iframe")){var t=document.createElement("iframe");t.className="media-youtube",t.src="https://www.youtube-nocookie.com/embed/"+encodeURIComponent(n.getAttribute("data-youtube-video-id"))+"?rel=0&modestbranding=1&enablejsapi=1"+(r?"&autoplay=1":""),t.title=n.getAttribute("data-youtube-title")||"YouTube video",t.allow="autoplay; encrypted-media; fullscreen; picture-in-picture",t.setAttribute("allowfullscreen",""),t.referrerPolicy="strict-origin-when-cross-origin",t.addEventListener("load",function(){t.contentWindow.postMessage(JSON.stringify({event:"listening",id:1,channel:"widget"}),"https://www.youtube-nocookie.com")}),n.querySelector(".media-frame").appendChild(t)}}window.addEventListener("message",function(n){if(!(n.origin!=="https://www.youtube-nocookie.com"||typeof n.data!="string")){var r;try{r=JSON.parse(n.data)}catch{return}var t=Array.prototype.slice.call(document.querySelectorAll("iframe.media-youtube")).filter(function(b){return b.contentWindow===n.source})[0];if(!(!t||!r||!r.info)){var s=t.closest("[data-media-slide]"),m=s.closest("[data-media-viewer]");r.info.duration&&(s.youtubeLengthSec=r.info.duration),typeof r.info.currentTime=="number"&&(s.youtubeShare=r.info.currentTime/(s.youtubeLengthSec||Number(s.getAttribute("data-media-length"))||1)),r.info.playerState===0&&m.isAuto&&d(m)}}});var p=6e3,c=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function d(n){var r=f(n)+1;if(r>=S(n).length){n.isAuto=!1;return}a(n,r,!0)}function L(n){if(!n.isRunning){n.isRunning=!0;var r=performance.now();requestAnimationFrame(function t(s){if(!n.open||n.classList.contains("is-leaving")){n.isRunning=!1;return}var m=s-r;r=s;var b=n.querySelector("[data-media-slide]:not([hidden])"),y=b&&b.querySelector("video:not(.video-stand-in)"),g=0;y?g=y.currentTime/(isFinite(y.duration)&&y.duration>0?y.duration:1):b&&b.hasAttribute("data-youtube-video-id")?g=b.youtubeShare||0:b&&n.isAuto&&(document.hidden||(b.shownMs=(b.shownMs||0)+m),g=b.shownMs/p,g>=1&&(d(n),g=1));var x=n.querySelector('.media-thumb[aria-current="true"] .media-thumb-time');x&&x.style.setProperty("--groove-filled",Math.max(0,Math.min(1,g)).toFixed(4)),requestAnimationFrame(t)})}}document.addEventListener("ended",function(n){var r=n.target instanceof HTMLVideoElement?n.target.closest("[data-media-viewer]"):null;r&&r.isAuto&&d(r)},!0),document.addEventListener("click",function(n){var r=n.target instanceof Element?n.target:null;if(r){var t=r.closest("[data-media-to]");if(t){var s=t.closest("[data-media-viewer]"),m=s||document.getElementById(t.getAttribute("aria-controls")||"");if(!m)return;m.isAuto=!s&&!c,a(m,Number(t.getAttribute("data-media-to")),!0),L(m)}}}),document.addEventListener("keydown",function(n){if(!(n.key!=="ArrowLeft"&&n.key!=="ArrowRight")){var r=document.querySelector("dialog[data-media-viewer][open]");!r||n.target instanceof Element&&n.target.closest("input")||(n.preventDefault(),r.isAuto=!1,a(r,f(r)+(n.key==="ArrowRight"?1:-1)))}});var v=null;document.addEventListener("pointerdown",function(n){var r=n.target instanceof Element?n.target.closest(".media-shown"):null;v=r&&n.pointerType!=="mouse"?{x:n.clientX,y:n.clientY,viewer:r.closest("[data-media-viewer]")}:null}),document.addEventListener("pointerup",function(n){if(v){var r=n.clientX-v.x,t=n.clientY-v.y,s=v.viewer;v=null,Math.abs(r)>48&&Math.abs(r)>2*Math.abs(t)&&(s.isAuto=!1,a(s,f(s)+(r<0?1:-1)))}}),document.querySelectorAll("[data-media-viewer]").forEach(function(n){new MutationObserver(function(){(n.classList.contains("is-leaving")||!n.open)&&S(n).forEach(l)}).observe(n,{attributes:!0,attributeFilter:["class","open"]})})})(),(function(){function S(r){return r instanceof Element?r.closest("[data-video-player]"):null}document.addEventListener("click",function(r){var t=S(r.target);if(t){var s=r.target,m=t.querySelector("video:not(.video-stand-in)"),b=s===m||!!s.closest("[data-video-press]");if(b&&t.isWakeTouch){t.isWakeTouch=!1;return}s.closest("[data-video-play]")||b?m.paused?m.play().catch(function(){}):m.pause():s.closest("[data-video-sound]")?m.muted||m.volume===0?(m.muted=!1,m.volume===0&&(m.volume=.5)):m.muted=!0:s.closest("[data-video-full-screen]")&&(document.fullscreenElement?document.exitFullscreen():t.requestFullscreen?t.requestFullscreen():m.webkitEnterFullscreen&&m.webkitEnterFullscreen())}}),document.addEventListener("fullscreenchange",function(){document.querySelectorAll("[data-video-player] [data-video-full-screen]").forEach(function(r){var t=document.fullscreenElement===r.closest("[data-video-player]");r.setAttribute("data-is-on",String(t)),r.setAttribute("aria-label",t?"Exit full screen":"Full screen")})});function f(r,t){return isFinite(t.duration)&&t.duration>0?t.duration:Number(r.getAttribute("data-video-length"))||1}function l(r){var t=r.target;if(t instanceof HTMLVideoElement){var s=t.closest("[data-video-player]");if(s){var m=Math.min(1,t.currentTime/f(s,t)),b=Math.floor(t.currentTime/60),y=Math.floor(t.currentTime%60);s.querySelector(".video-seek-input[data-is-dragged]")||i(s,t,t.currentTime);var g=s.querySelector(".video-seek-input");g.hasAttribute("data-is-dragged")||(g.value=String(t.currentTime)),s.querySelector("[data-video-time]").textContent=b+":"+String(y).padStart(2,"0");var x=s.querySelector("[data-video-play]");x.setAttribute("aria-label",t.paused?"Play":"Pause"),x.setAttribute("data-is-on",String(!t.paused));var E=t.muted?0:t.volume,C=s.querySelector("[data-video-sound]");C.setAttribute("data-sound-at",E===0?"off":E<=.5?"low":"high"),C.setAttribute("aria-label",E===0?"Sound on":"Mute"),s.querySelector(".video-level-groove").style.setProperty("--groove-filled",E.toFixed(4));var _=s.querySelector(".video-level-input");_.hasAttribute("data-is-dragged")||(_.value=String(E)),(r.type==="play"||r.type==="pause"||r.type==="ended")&&n(s),r.type==="play"&&a(s,t)}}}function i(r,t,s){for(var m=f(r,t),b=Math.min(1,s/m),y=s,g=0;g<t.buffered.length;g++)t.buffered.start(g)<=s+.5&&t.buffered.end(g)>=s&&(y=t.buffered.end(g));r.querySelector(".video-progress").style.setProperty("--groove-filled",b.toFixed(4));var x=r.querySelector(".video-seek");x.style.setProperty("--played",b.toFixed(4)),x.style.setProperty("--loaded",Math.min(1,y/m).toFixed(4))}function a(r,t){r.isGliding||(r.isGliding=!0,(function s(){if(t.paused||t.ended||!r.isConnected){r.isGliding=!1;return}r.querySelector(".video-seek-input[data-is-dragged]")||i(r,t,t.currentTime),requestAnimationFrame(s)})())}["timeupdate","play","pause","volumechange","ended","progress"].forEach(function(r){document.addEventListener(r,l,!0)}),document.addEventListener("durationchange",function(r){var t=r.target;if(!(!(t instanceof HTMLVideoElement)||!isFinite(t.duration)||!(t.duration>0))){var s=t.closest("[data-video-player]");s&&(s.querySelector(".video-seek-input").max=String(t.duration))}},!0);var u=500;function p(r,t){if(clearTimeout(r.bufferingTimer),!t){r.classList.remove("is-buffering"),r.setAttribute("aria-busy","false"),r.querySelector(".video-status").textContent="";return}r.bufferingTimer=setTimeout(function(){var s=r.querySelector("video:not(.video-stand-in)");s.paused||s.readyState>=3||(r.classList.add("is-buffering"),r.setAttribute("aria-busy","true"),r.querySelector(".video-status").textContent="Loading",n(r))},u)}["waiting","stalled"].forEach(function(r){document.addEventListener(r,function(t){var s=t.target instanceof HTMLVideoElement&&!t.target.classList.contains("video-stand-in")?t.target.closest("[data-video-player]"):null;s&&p(s,!0)},!0)}),["playing","canplay","pause","ended","emptied"].forEach(function(r){document.addEventListener(r,function(t){var s=t.target instanceof HTMLVideoElement&&!t.target.classList.contains("video-stand-in")?t.target.closest("[data-video-player]"):null;s&&p(s,!1)},!0)});function c(r){var t=r.target instanceof Element?r.target.closest(".video-seek-input"):null;if(t){var s=t.closest("[data-video-player]"),m=s.querySelector("video:not(.video-stand-in)");i(s,m,Number(t.value)),m.currentTime=Number(t.value)}}document.addEventListener("input",c),document.addEventListener("change",c),document.addEventListener("input",function(r){var t=r.target instanceof Element?r.target.closest(".video-level-input"):null;if(t){var s=t.closest("[data-video-player]"),m=s.querySelector("video:not(.video-stand-in)");s.querySelector(".video-level-groove").style.setProperty("--groove-filled",Number(t.value).toFixed(4)),m.volume=Number(t.value),m.muted=m.volume===0}}),document.addEventListener("pointerdown",function(r){var t=r.target instanceof Element?r.target.closest(".video-seek-input, .video-level-input"):null;t&&t.setAttribute("data-is-dragged","")});function d(r){var t=r.target instanceof Element?r.target.closest(".video-seek-input"):null;if(t){var s=t.closest("[data-video-player]").querySelector("video:not(.video-stand-in)");s.preload==="none"&&(s.preload="auto",s.load(),s.currentTime=Number(t.value))}}document.addEventListener("pointerdown",d),document.addEventListener("keydown",d),["pointerup","pointercancel"].forEach(function(r){document.addEventListener(r,function(){document.querySelectorAll(".video-controls [data-is-dragged]").forEach(function(t){t.removeAttribute("data-is-dragged")})})});var L=2500;function v(r){var t=r.querySelector("video:not(.video-stand-in)");t.paused||r.classList.contains("is-buffering")||r.querySelector(".video-controls [data-is-dragged], .video-controls :focus-visible")||r.classList.add("is-quiet")}function n(r){r.classList.remove("is-quiet"),clearTimeout(r.quietTimer),r.quietTimer=setTimeout(function(){v(r)},L)}document.addEventListener("pointermove",function(r){var t=S(r.target);t&&n(t)}),document.addEventListener("pointerdown",function(r){var t=S(r.target);t&&(t.isWakeTouch=r.pointerType!=="mouse"&&t.classList.contains("is-quiet"),n(t))}),document.addEventListener("pointerout",function(r){var t=S(r.target);t&&r.pointerType==="mouse"&&!(r.relatedTarget instanceof Element&&t.contains(r.relatedTarget))&&(clearTimeout(t.quietTimer),v(t))}),document.addEventListener("focusin",function(r){var t=S(r.target);t&&n(t)})})(),(function(){var S=200;window.zaismaWatch.each("form.find[data-suggest]",function(f){var l=f.querySelector('input[type="search"]'),i=f.querySelector(".find-list"),a=i.querySelector('[role="listbox"]'),u=i.querySelector(".floating-body"),p=f.querySelector(".find-finish"),c=p.firstElementChild,d=p.lastElementChild,L=f.querySelector("template.find-icon"),v=f.querySelector("template.find-cover"),n=i.id.replace(/-list$/,""),r=f.getAttribute("data-suggest"),t=[],s=-1,m=0,b=null,y=new Map,g=window.zaismaFloat(i,{anchor:f,focusOnClose:l,isAnchorWidth:!0,onToggle:function(w){l.setAttribute("aria-expanded",String(w)),f.classList.toggle("is-open",w),E()}});function x(){return g.isOpen()}function E(){var w=x()&&(t[s]||t[0]),q=l.value,T=w&&w.getAttribute("data-finish"),M=T&&q&&T.length>q.length&&T.toLowerCase().indexOf(q.toLowerCase())===0&&l.scrollLeft<1;c.textContent=M?q:"",d.textContent=M?T.slice(q.length):""}function C(w){if(s=w,t.forEach(function(T,M){T.classList.toggle("is-active",M===w)}),w>=0){l.setAttribute("aria-activedescendant",t[w].id);var q=t[w];q.offsetTop<u.scrollTop?u.scrollTop=q.offsetTop:q.offsetTop+q.offsetHeight>u.scrollTop+u.clientHeight&&(u.scrollTop=q.offsetTop+q.offsetHeight-u.clientHeight)}else l.removeAttribute("aria-activedescendant");E()}function _(){x()?g.place():g.open(),E()}function N(){g.close(!1),E()}function I(w,q){var T=document.createElement("span"),M=q?w.toLowerCase().indexOf(q.toLowerCase()):-1;if(M<0)return T.textContent=w,T;var R=document.createElement("b");return R.textContent=w.slice(M,M+q.length),T.append(w.slice(0,M),R,w.slice(M+q.length)),T}function H(w,q){var T=document.createElement(w);return T.className="select-option flush-row compact find-"+q,T.setAttribute("role","option"),T.id=n+"-row-"+t.length,T.setAttribute("data-cut-line","8"),T}function se(w,q,T){var M=T.get("finish "+w);return M?(M.replaceChild(I(w,q),M.lastChild),M):(M=H("div","finish-row"),M.setAttribute("data-finish",w),M.findKey="finish "+w,M.append(L.content.cloneNode(!0),I(w,q)),M)}function ee(w,q,T){var M=T.get("game "+w.page_url);if(M){var R=M.querySelector(".find-game-words");return R.replaceChild(I(w.title,q),R.firstChild),R.lastChild.textContent=w.fact,M}M=H("a","game"),M.href=w.page_url,M.tabIndex=-1,M.findKey="game "+w.page_url;var U=v.content.firstElementChild.cloneNode(!0),j=U.querySelector(".cover-picture");if(w.cover_url){var B=j.querySelector("img");/^\\/img\\/[A-Za-z0-9_-]+$/.test(w.cover_url)?B.srcset=[320,480].map(function(Y){return w.cover_url+"/w"+Y+".webp "+Y+"w"}).join(", "):B.removeAttribute("srcset"),B.src=w.cover_url,w.cover_placeholder_data_url&&/^data:image\\/(webp|png|jpeg);base64,[A-Za-z0-9+\\/=]+$/.test(w.cover_placeholder_data_url)&&B.parentElement.style.setProperty("--placeholder","url("+w.cover_placeholder_data_url+")")}else j.remove(),U.classList.add("is-placeholder");var F=document.createElement("span"),G=document.createElement("span");return F.className="find-game-words",G.className="find-game-fact",G.textContent=w.fact,F.append(I(w.title,q),G),M.append(U,F),M}function te(w,q){var T=new Map;t.forEach(function(F){F.findKey&&T.set(F.findKey,F)});var M=(w.games||[]).slice(0,3),R=(w.finishes||[]).slice(0,3).map(function(F){return se(F,q,T)}),U=M.map(function(F){return ee(F,q,T)}),j=R.length+U.length===t.length&&R.concat(U).every(function(F,G){return t[G]===F});if(!j){var B=a.querySelector(".find-head");B||(B=document.createElement("div"),B.className="find-head words-margin",B.setAttribute("role","presentation"),B.textContent="Games"),a.replaceChildren.apply(a,R.concat(U.length?[B]:[],U)),R.concat(U).forEach(function(F,G){F.id=n+"-row-"+G})}t=R.concat(U),t.length&&document.activeElement===l?(_(),C(-1)):(C(-1),N())}function $(){var w=l.value.trim();if(b&&(b.abort(),b=null),!w){t=[],a.textContent="",C(-1),N();return}if(y.has(w)){te(y.get(w),w);return}b=new AbortController,fetch(r+(r.indexOf("?")<0?"?":"&")+"search_text="+encodeURIComponent(w),{signal:b.signal,headers:{Accept:"application/json"}}).then(function(q){return q.ok?q.json():{finishes:[],games:[]}}).then(function(q){y.set(w,q),l.value.trim()===w&&te(q,w)}).catch(function(){})}function re(){var w=t[s]||t[0];!w||!w.hasAttribute("data-finish")||(l.value=w.getAttribute("data-finish"),l.dispatchEvent(new Event("input",{bubbles:!0})))}function J(){var w=x()&&t[s];if(w&&w.tagName==="A"){location.href=w.href;return}w&&(l.value=w.getAttribute("data-finish"),l.dispatchEvent(new Event("input",{bubbles:!0}))),clearTimeout(m),b&&b.abort(),N(),f.requestSubmit()}l.addEventListener("input",function(){clearTimeout(m),E(),m=setTimeout($,S)}),l.addEventListener("scroll",E);function Z(){!x()&&l.value.trim()&&(clearTimeout(m),$())}l.addEventListener("focus",Z),l.addEventListener("click",Z),l.addEventListener("keydown",function(w){var q=w.key;if(q==="ArrowDown"||q==="ArrowUp"){if(w.preventDefault(),!x()){t.length?(_(),C(0)):$();return}C(s<0?q==="ArrowDown"?0:t.length-1:(s+(q==="ArrowDown"?1:-1)+t.length)%t.length)}else q==="Tab"&&!w.shiftKey&&x()&&d.textContent?(w.preventDefault(),re()):q==="Enter"?(w.preventDefault(),J()):q==="Escape"&&x()&&(w.preventDefault(),N())}),l.addEventListener("focusout",function(){setTimeout(function(){document.activeElement!==l&&N()},0)}),i.addEventListener("pointerdown",function(w){w.preventDefault()}),i.addEventListener("pointermove",function(w){var q=w.target.closest(".select-option"),T=t.indexOf(q);T>=0&&T!==s&&C(T)}),i.addEventListener("click",function(w){var q=w.target.closest(".select-option"),T=t.indexOf(q);T<0||(w.preventDefault(),C(T),J())})})})(),(function(){var S=matchMedia("(prefers-reduced-motion: reduce)").matches;function f(i){var a=0;i.querySelectorAll('[data-filter-panel]:not([data-filter-panel=""])').forEach(function(v){var n=v.querySelector('a[role="menuitem"]');n&&n.getAttribute("aria-current")!=="page"&&a++});var u=document.querySelector('[aria-controls="'+i.id+'"]'),p=u&&u.querySelector(".slab"),c=u&&u.querySelector(".cut-count");a&&!c&&p&&(c=document.createElement("span"),c.className="cut-count",p.appendChild(c)),c&&(a?c.textContent=String(a):c.remove());var d=i.querySelector('[data-filter-panel=""] a[role="menuitem"][data-keeps-open]'),L=d&&d.previousElementSibling;d&&(d.hidden=!a),L&&L.matches("hr")&&(L.hidden=!a),i.zaismaPlace&&i.zaismaPlace()}function l(i,a,u){var p=null,c=i.querySelector("[data-filter-panel]:not([hidden])");if(i.querySelectorAll("[data-filter-panel]").forEach(function(v){v.hidden=v.getAttribute("data-filter-panel")!==a,v.hidden||(p=v)}),i.zaismaPlace&&i.zaismaPlace(),p&&c&&p!==c&&!S&&p.animate&&p.animate([{transform:"translateX("+(a?12:-12)+"px)",opacity:0},{transform:"none",opacity:1}],{duration:180,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"}),u&&p){var d=a===""&&i.lastGroupName?i.querySelector('[data-filter-opens="'+i.lastGroupName+'"]'):null,L=d||p.querySelector('[aria-current="page"]')||p.querySelector('[role="menuitem"]');L&&L.focus({preventScroll:!0})}}window.zaismaWatch.each(".filter-menu",function(i){i.addEventListener("click",function(a){var u=a.target.closest('[data-filter-panel=""] a[role="menuitem"][data-keeps-open]');if(u){i.querySelectorAll('[data-filter-panel]:not([data-filter-panel=""])').forEach(function(s){var m=s.querySelector('a[role="menuitem"]'),b=i.querySelector(".dropdown-tick");if(!(!m||m.getAttribute("aria-current")==="page")){b=b&&b.cloneNode(!0),s.querySelectorAll('[aria-current="page"]').forEach(function(x){x.removeAttribute("aria-current");var E=x.querySelector(".dropdown-tick");E&&E.remove()}),m.setAttribute("aria-current","page"),b&&m.appendChild(b);var y=i.querySelector('[data-filter-opens="'+s.getAttribute("data-filter-panel")+'"] .filter-picked'),g=m.querySelector("span");y&&g&&(y.textContent=g.textContent)}}),f(i);var p=i.querySelector(".filter-group");p&&p.focus({preventScroll:!0}),i.zaismaPlace&&i.zaismaPlace();return}var c=a.target.closest('[data-filter-panel]:not([data-filter-panel=""]) [role="menuitem"][data-keeps-open]');if(c){var d=c.closest("[data-filter-panel]"),t=d.getAttribute("data-filter-panel"),L=i.querySelector(".dropdown-tick");L=L&&L.cloneNode(!0),d.querySelectorAll('[aria-current="page"]').forEach(function(m){m.removeAttribute("aria-current");var b=m.querySelector(".dropdown-tick");b&&b.remove()}),c.setAttribute("aria-current","page"),L&&c.appendChild(L);var v=i.querySelector('[data-filter-opens="'+t+'"]'),n=c.querySelector("span");v&&n&&v.querySelector(".filter-picked")&&(v.querySelector(".filter-picked").textContent=n.textContent),i.lastGroupName=t,f(i),l(i,"",!0);return}var r=a.target.closest("[data-filter-opens]");if(r){var t=r.getAttribute("data-filter-opens");t&&(i.lastGroupName=t),l(i,t,a.detail===0)}}),i.addEventListener("keydown",function(a){var u=document.activeElement;a.key==="ArrowRight"&&u&&u.matches(".filter-group")&&(a.preventDefault(),i.lastGroupName=u.getAttribute("data-filter-opens"),l(i,i.lastGroupName,!0)),a.key==="ArrowLeft"&&u&&u.closest('[data-filter-panel]:not([data-filter-panel=""])')&&(a.preventDefault(),l(i,"",!0))}),i.addEventListener("beforetoggle",function(a){a.newState==="open"&&l(i,"",!1)})})})(),(function(){var S=4e3,f=8e3,l=1e4,i=3,a=300,u=2,p=300,c={done:'<div class="notice glass glass-bar done" role="status" data-notice="done" data-notice-urgency="information" data-glass data-glass-corners="strip"><svg class="edge" aria-hidden="true"></svg><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="2.2"><path d="M4.2 10.4l3.9 3.9 7.7-8.6"/></svg><span class="notice-text words-margin beside-controls compact"></span></div>',undo:'<div class="notice glass glass-bar done" role="status" data-notice="done" data-notice-urgency="information" data-notice-undo data-glass data-glass-corners="strip"><svg class="edge" aria-hidden="true"></svg><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="2.2"><path d="M4.2 10.4l3.9 3.9 7.7-8.6"/></svg><span class="notice-text words-margin beside-controls"></span><form class="notice-undo" method="post" action="#"><button class="shell tertiary-btn" type="submit"><span class="face flush-row" data-cut-line="10"><svg class="cut-line" aria-hidden="true"><polygon/></svg><span class="tertiary-words"><span class="tertiary-label one-line">Undo</span></span><span class="tertiary-line light-fill across light-line light-glint" aria-hidden="true"></span></span></button></form></div>',problem:'<div class="notice glass glass-bar problem" role="alert" data-notice="problem" data-notice-urgency="information" data-glass data-glass-corners="strip"><svg class="edge" aria-hidden="true"></svg><svg class="ico" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.8 18.2 17H1.8z"/><path d="M10 8v4.2M10 14.6v.1"/></svg><span class="notice-text words-margin beside-controls compact"></span><button class="shell tertiary-btn icon-only small" data-layer-close="" type="button" aria-label="Close"><span class="face flush-row" data-cut-line="9"><svg class="cut-line" aria-hidden="true"><polygon/></svg><span class="tertiary-words"><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="1.8"><path d="M5 5l10 10M15 5 5 15"/></svg></span></span></button></div>',card:'<aside class="playing-card glass" id="layer-card" role="status" data-glass data-glass-corners="pane" hidden><svg class="edge" aria-hidden="true"></svg><div class="playing-card-in"><div class="layout-stack"><div class="stack-cell is-words"><p></p></div></div></div></aside>',urgent:'<aside class="playing-card glass urgent-card" id="layer-urgent" role="alert" data-notice-urgency="urgent" popover="manual" data-glass data-glass-corners="pane"><svg class="edge" aria-hidden="true"></svg><div class="playing-card-in"><div class="pane-parts"><div class="pane-head" data-control-height="small"><div class="pane-head-words"><h2 class="playing-card-title"></h2></div><div class="pane-head-end"><button class="shell tertiary-btn icon-only small" data-layer-close="" type="button" aria-label="Close"><span class="face flush-row" data-cut-line="9"><svg class="cut-line" aria-hidden="true"><polygon/></svg><span class="tertiary-words"><svg class="ico" viewBox="0 0 20 20" aria-hidden="true" stroke-width="1.8"><path d="M5 5l10 10M15 5 5 15"/></svg></span></span></button></div></div><div class="pane-body"><p class="urgent-card-text words-margin"></p></div></div></div></aside>'},d={urgent:0,ask:1,information:2},L=document.documentElement,v=function(){return L.classList.contains("is-playing")},n=function(){return window.matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches},r=parseFloat(getComputedStyle(L).getPropertyValue("--gap-control-stack"))||8,t=[],s=0,m=-1/0,b=null,y=null,g=[];function x(e){var o=e.getAttribute("data-notice-urgency");return o==="information"||o==="ask"||o==="urgent"?o:e.querySelector("a, button, input, select, textarea")?"ask":"information"}function E(e){for(var o=0;o<t.length;o++)if(t[o].el===e)return t[o];return null}function C(e){return{element:e.el,leave:function(){q(e)}}}function _(e){return e.order=s++,e.queuedAtMs=Date.now(),e.isShown=!1,t.push(e),H(),C(e)}var N=function(e,o){return d[e.noticeUrgency]-d[o.noticeUrgency]||e.order-o.order},I=function(e){return e.noticeUrgency==="information"&&e.tone!=="problem"};function H(){clearTimeout(b),b=null;var e=Date.now(),o=v(),h=g.length>0||!!document.fullscreenElement,A=t.filter(function(W){return!W.isShown}).sort(N);A.forEach(function(W){W.noticeUrgency==="urgent"&&$(W)}),A=A.filter(function(W){return W.noticeUrgency!=="urgent"});var k=t.filter(function(W){return W.isShown&&W.noticeUrgency!=="urgent"&&W.isOverGame===o}).length,O=o?h?0:1:i,P=e-m;if(o&&O&&!k&&A.length&&P<a)return b=setTimeout(H,a-P),M();for(var z=0;z<A.length&&k<O;z++){var D=A[z];if(o&&I(D)&&e-D.queuedAtMs>l){se(D);continue}te(D),k++}M()}function se(e){var o=t.indexOf(e);o!==-1&&t.splice(o,1),e.el&&!e.isMade&&e.el.matches(".notice")&&e.el.remove()}function ee(e){var o=document.createElement("template"),h=e.noticeUrgency==="urgent"?"urgent":v()?"card":e.undoAction?"undo":e.tone==="problem"?"problem":"done";o.innerHTML=c[h];var A=o.content.firstElementChild;if(A.id="layer-"+e.order,A.setAttribute("data-notice-urgency",e.noticeUrgency),h==="urgent"){var k=A.querySelector(".playing-card-title");k&&k.remove(),A.querySelector(".urgent-card-text").textContent=e.text}else h==="card"?A.querySelector("p").textContent=e.text:(A.querySelector(".notice-text").textContent=e.text,h==="undo"&&A.querySelector("form").setAttribute("action",e.undoAction));return A.zaismaLayer=e,(document.querySelector("main")||document.body).appendChild(A),A}function te(e){e.el||(e.el=ee(e)),e.isShown=!0,e.isOverGame=v();var o=e.el;o.classList.remove("is-leaving"),o.hidden=!1,w(e),I(e)&&Z(e),o.matches(".notice")&&T()}function $(e){(e.sheetsToClose||[]).forEach(function(o){var h=document.getElementById(o);h&&h.open&&h.close()}),e.el||(e.el=ee(e)),e.isShown=!0,e.isOverGame=v(),e.el.hidden=!1,re(e.el)}function re(e){e.showPopover&&(e.matches(":popover-open")&&e.hidePopover(),e.showPopover())}function J(){t.forEach(function(e){e.isShown&&e.noticeUrgency==="urgent"&&re(e.el)})}function Z(e){clearTimeout(e.timer),e.timer=setTimeout(function(){q(e)},e.undoAction||e.el.hasAttribute("data-notice-undo")?f:S)}function w(e){var o=e.el;if(!o.zaismaHeld){o.zaismaHeld=!0;var h=function(){var A=E(o);A&&clearTimeout(A.timer)};o.addEventListener("pointerenter",h),o.addEventListener("pointerdown",h),o.addEventListener("pointerleave",function(){var A=E(o);A&&A.isShown&&I(A)&&Z(A)})}}function q(e){var o=t.indexOf(e);if(o!==-1){if(t.splice(o,1),clearTimeout(e.timer),e.isShown){var h=e.el;e.isShown=!1,h.hidePopover&&h.matches(":popover-open")&&h.hidePopover(),h.matches(".notice")?(h.classList.add("is-leaving"),setTimeout(function(){h.remove(),T()},p)):(h.hidden=!0,e.isMade&&setTimeout(function(){h.remove()},p)),e.isOverGame&&e.noticeUrgency!=="urgent"&&(m=Date.now())}H()}}function T(){var e=0;t.filter(function(o){return o.isShown&&o.el.matches(".notice")}).sort(function(o,h){return o.order-h.order}).forEach(function(o){o.el.style.setProperty("--notice-shift",e+"px"),e+=o.el.offsetHeight+r})}function M(){var e=g.length?"sheet":t.some(function(o){return o.isShown&&o.el.matches(".playing-card")})?"card":null;e!==y&&(y=e,ue.coveredBy=e,window.dispatchEvent(new CustomEvent("zaisma:covered",{detail:{coveredBy:e}})))}function R(e){if(!(e.zaismaLayer||e.classList.contains("in-place"))){var o={el:e,noticeUrgency:x(e),tone:e.getAttribute("data-notice")==="problem"?"problem":"done"};e.zaismaLayer=o,e.hidden=!0,_(o)}}function U(e){e.querySelectorAll&&(e.matches("[data-notice]")&&R(e),e.querySelectorAll("[data-notice]").forEach(R))}U(document.body),window.zaismaWatch&&window.zaismaWatch.page(function(e){e.forEach(function(o){o.addedNodes.forEach(U)})});var j=window.MutationObserver?new MutationObserver(function(e){e.forEach(function(o){var h=E(o.target);h&&h.isShown&&o.target.hidden&&q(h)})}):null;document.addEventListener("click",function(e){var o=e.target;if(o.closest){var h=o.closest("[data-layer-close]"),A=h&&h.closest("[data-notice], .urgent-card");if(!A){var k=o.closest("a, button");A=k&&k.closest(".urgent-card")}var O=A&&E(A);O&&q(O)}}),document.addEventListener("fullscreenchange",function(){J(),H()});var B=HTMLDialogElement.prototype.close,F=HTMLDialogElement.prototype.showModal;function G(e){return e.open&&e.matches(".sheet")&&!e.classList.contains("in-place")}function Y(e){var o=g.indexOf(e);o!==-1&&(g.splice(o,1),H())}function ce(e,o){if(e.classList.contains("is-leaving"))return;e.classList.add("is-leaving"),Y(e);var h=setTimeout(k,400);function A(O){O.target===e&&O.propertyName==="opacity"&&k()}function k(){clearTimeout(h),e.removeEventListener("transitionend",A),e.classList.contains("is-leaving")&&(e.classList.remove("is-leaving"),B.apply(e,o))}e.addEventListener("transitionend",A)}var de=window.matchMedia?window.matchMedia("(min-width: 761px)"):{matches:!1},V=new Map,fe=8,le=16,Q=null,he=!(window.CSS&&CSS.supports("overlay","auto"));document.addEventListener("click",function(e){var o=e.target.closest&&e.target.closest("button, a, [role='button']");Q=o?{button:o,at:performance.now()}:null},!0),HTMLDialogElement.prototype.showModal=function(){var e=this.open,o=this.matches(".sheet")&&!this.classList.contains("in-place");if(!e&&o){if(g.length>=u){var h=g[g.length-1];console.warn("Sheets go two deep at most: #"+this.id+" replaces #"+h.id+"."),Y(h),h.classList.remove("is-leaving"),B.apply(h)}this.zaismaOpener=document.activeElement}!e&&o&&this.classList.toggle("is-over-sheet",g.length>0);var A=!e&&o&&he&&!n();if(A&&this.classList.add("is-arriving"),F.apply(this,arguments),A){var k=this;(function O(P,z){requestAnimationFrame(function(D){if(!(z&&D-z<25)&&P<30)return O(P+1,D);k.classList.remove("is-arriving")})})(0,0)}e||!o||(g.push(this),we(this),ie(this),ye(this),J(),H())};function ye(e){window.zaismaInput&&window.zaismaInput.isKeyboard()||(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}function we(e){var o=Q&&performance.now()-Q.at<2e3&&Q.button.isConnected?Q.button:null;!o||!e.classList.contains("is-compact")||e.matches(".in-place, .store-panel, .placement-middle, .is-picture")||o.closest("[popover]")||e.contains(o)||o.closest("dialog[open]")||(V.set(e,{opener:o,rect:o.getBoundingClientRect(),isOnPage:!!(window.zaismaIsOnPage&&window.zaismaIsOnPage(o,e))}),e.classList.add("is-anchored"),e.classList.toggle("is-on-page",V.get(e).isOnPage),ae&&ae.observe(e))}function ie(e){var o=V.get(e);if(!(!o||!e.open)){if(!e.classList.contains("is-compact")){e.classList.remove("is-anchored","is-above","is-at-end","is-on-page"),e.style.removeProperty("--sheet-left"),e.style.removeProperty("--sheet-top");return}e.classList.toggle("is-on-page",o.isOnPage);var h=o.opener.isConnected?o.opener.getBoundingClientRect():o.rect;h.width||h.height?o.rect=h:h=o.rect;var A=document.documentElement.clientWidth,k=window.innerHeight;if(h.bottom<0||h.top>k||h.right<0||h.left>A){e.close();return}e.style.setProperty("--sheet-max-height",k-2*le+"px");var O=Math.max(h.top,k-h.bottom)-fe-le;if(e.classList.toggle("is-anchored",de.matches||e.offsetHeight<=O),!!e.classList.contains("is-anchored")){var P=window.zaismaPlace(h,{width:e.offsetWidth,height:e.offsetHeight},{roomRect:{left:0,top:0,right:A,bottom:k},gapPx:fe,edgePx:le}),z=e.classList.contains("is-on-page");e.style.setProperty("--sheet-left",Math.round(P.leftPx+(z?window.scrollX:0))+"px"),e.style.setProperty("--sheet-top",Math.round(P.topPx+(z?window.scrollY:0))+"px"),e.classList.toggle("is-above",P.isAbove),e.classList.toggle("is-at-end",P.isAtEnd)}}}function pe(){V.forEach(function(e,o){ie(o)})}var ae=window.ResizeObserver?new ResizeObserver(function(e){e.forEach(function(o){V.has(o.target)&&ie(o.target)})}):null;window.addEventListener("resize",pe),window.addEventListener("scroll",pe,{passive:!0,capture:!0}),document.addEventListener("close",function(e){var o=e.target;if(!(!o.matches||!o.matches(".sheet"))){Y(o),Ee(o);var h=o.zaismaOpener,A=g[g.length-1];o.zaismaOpener=null,A&&(h&&h.isConnected&&A.contains(h)?h:A).focus({preventScroll:!0}),V.has(o)&&(V.delete(o),ae&&ae.unobserve(o),o.classList.remove("is-anchored","is-above","is-at-end","is-on-page"),o.style.removeProperty("--sheet-left"),o.style.removeProperty("--sheet-top"),o.style.removeProperty("--sheet-max-height"))}},!0),HTMLDialogElement.prototype.close=function(){G(this)?ce(this,arguments):B.apply(this,arguments)},document.addEventListener("cancel",function(e){e.target.matches&&G(e.target)&&(e.preventDefault(),ce(e.target,[]))},!0),document.addEventListener("submit",function(e){if(!e.defaultPrevented){var o=e.submitter&&e.submitter.getAttribute("formmethod")||e.target.getAttribute("method"),h=e.target.closest("dialog");!o||o.toLowerCase()!=="dialog"||!h||!G(h)||(e.preventDefault(),ce(h,e.submitter&&e.submitter.hasAttribute("value")?[e.submitter.value]:[]))}}),document.addEventListener("click",function(e){if(e.target.closest){var o=e.target.closest("[aria-controls]:not([aria-expanded])"),h=o&&document.getElementById(o.getAttribute("aria-controls"));if(h&&h.matches("dialog.sheet")){e.preventDefault(),h.classList.contains("is-leaving")&&(h.classList.remove("is-leaving"),g.indexOf(h)===-1&&g.push(h),H()),h.open||h.showModal();return}var A=e.target.closest("[data-sheet-step-to]"),k=A&&A.closest("dialog");if(k){e.preventDefault(),ne(k,A.getAttribute("data-sheet-step-to"));return}var O=e.target.closest("[data-layer-show]");if(O){e.preventDefault(),ue.say({cardId:O.getAttribute("data-layer-show")});return}var P=e.target.closest("[data-sheet-back]");if(P){var z=P.closest("dialog");z&&z.zaismaSteps&&z.zaismaSteps.length>1&&ne(z,z.zaismaSteps[z.zaismaSteps.length-2]);return}var D=e.target.closest("[data-sheet-tab-to]"),W=D&&D.closest("dialog");if(W){ge(W,D.getAttribute("data-sheet-tab-to"));return}var K=e.target.closest("dialog.light-box[open]");if(K&&g[g.length-1]===K&&!e.target.closest("a, button, input, video, .floating-pane, .light-box.on-pane .glass-pane")){K.close();return}var X=e.target.matches("dialog.sheet[open]")?e.target:null;if(!(!X||!e.detail||g[g.length-1]!==X)){var oe=X.getBoundingClientRect();(e.clientX<oe.left||e.clientX>oe.right||e.clientY<oe.top||e.clientY>oe.bottom)&&X.close()}}});function be(e){if(!(!de.matches||!e.open||e.classList.contains("in-place"))){var o=e.offsetHeight;o>(parseFloat(e.style.minHeight)||0)&&(e.style.minHeight=o+"px")}}function me(e,o,h,A){o==="data-sheet-tab"&&be(e);var k=null;if(e.querySelectorAll("["+o+"]").forEach(function(P){var z=P.getAttribute(o)===h;P.hidden=!z,z&&(k=P)}),k){k.classList.remove("is-from-end","is-from-start"),A&&!n()&&(k.offsetWidth,k.classList.add(A>0?"is-from-end":"is-from-start"));var O=function(){k.querySelectorAll("[data-cut-line]").forEach(function(P){P.redrawCut&&P.redrawCut()})};k.classList.contains("is-from-end")||k.classList.contains("is-from-start")?k.addEventListener("animationend",O,{once:!0}):window.requestAnimationFrame&&requestAnimationFrame(O)}return k}function ve(e,o){var h=e.querySelector("["+o+"]");return h?h.getAttribute(o):null}function ne(e,o,h){var A=h&&h.isBackShown===!1?[]:e.zaismaSteps||[ve(e,"data-sheet-step")],k=A.indexOf(o);k===-1?A.push(o):A.length=k+1,e.zaismaSteps=A;var O=e.open?e.getBoundingClientRect():null,P=me(e,"data-sheet-step",o,e.open?k===-1?1:-1:0);if(P){if(e.querySelector("[data-sheet-step-compact]")){var z=P.hasAttribute("data-sheet-step-compact");if(z!==e.classList.contains("is-compact")&&(e.classList.toggle("is-compact",z),e.classList.toggle("is-task-step",!z),ie(e),O&&!n()&&e.animate)){var D=e.getBoundingClientRect(),W=Math.round(O.left+O.width/2-D.left-D.width/2)+"px "+Math.round(O.top+O.height/2-D.top-D.height/2)+"px";e.animate([{translate:W},{translate:"0 0"}],{duration:300,easing:"cubic-bezier(.2, .8, .2, 1)"})}}var K=P.querySelector("[data-sheet-back]");K&&(K.hidden=A.length<2);var X=P.querySelector(".sheet-title");X&&X.id&&e.setAttribute("aria-labelledby",X.id)}}function Ee(e){if(e.style.minHeight="",e.zaismaSteps){e.zaismaSteps=null;var o=ve(e,"data-sheet-step");ne(e,o),e.zaismaSteps=null}var h=e.querySelector("[data-sheet-tab-to]");h&&ge(e,h.getAttribute("data-sheet-tab-to"))}function ge(e,o){me(e,"data-sheet-tab",o,0);var h=e.querySelector('[data-sheet-tab-to="'+o+'"]'),A=h&&h.closest(".tab-switch");A&&A.pickTab&&A.pickTab(h)}var ue=window.zaismaLayers={coveredBy:null,openSheets:g,say:function(e){var o=e.cardId?document.getElementById(e.cardId):null;if(e.cardId&&!o)return null;var h=o?E(o):t.filter(function(P){return P.isMade&&P.text===e.text})[0];if(h)return C(h);var A=e.noticeUrgency||(o?x(o):"information"),k=e.sheetsToClose||(o&&o.getAttribute("data-sheets-to-close")?o.getAttribute("data-sheets-to-close").split(" "):[]),O={el:o,text:e.text||"",noticeUrgency:A,tone:e.tone==="problem"?"problem":"done",undoAction:e.undoAction||null,sheetsToClose:k,isMade:!o};return o&&(o.zaismaLayer=O,j&&j.observe(o,{attributes:!0,attributeFilter:["hidden"]})),_(O)},show:function(e){return e?ue.say({cardId:e.id}):null},leave:function(e){var o=e&&E(e.element||e);o&&q(o)},step:ne};H()})(),(function(){var S=450;window.zaismaWatch.each("form[data-steps]",function(f){var l=Array.prototype.slice.call(f.querySelectorAll(":scope > .step-bodies > .step-body")),i=Array.prototype.slice.call(f.closest(".pane-in").querySelectorAll(".step-line > li")),a=f.querySelector(":scope > .layout-row"),u=a.querySelector(".cut-btn"),p=a.querySelector(".run-wrap"),c=p.querySelector(".run-words:not(.label-busy)"),d=Number(f.getAttribute("data-steps"))||0,L=l.length-1,v="Next",n=f.getAttribute("data-finish-label"),r=0;function t(m){i.forEach(function(b,y){b.classList.remove("is-leaving","is-waiting"),b.classList.toggle("is-done",y<m),b.classList.toggle("is-current",y===m),y===m?b.setAttribute("aria-current","step"):b.removeAttribute("aria-current")})}function s(m){var b=d;d=Math.max(0,Math.min(L,m)),l.forEach(function(g,x){g.classList.toggle("is-away",x!==d)}),clearTimeout(r),d<b&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?(i.forEach(function(g,x){x>d&&(g.classList.contains("is-current")||g.classList.contains("is-done"))&&(g.classList.remove("is-current","is-done"),g.classList.add("is-leaving")),g.removeAttribute("aria-current")}),i[d].classList.remove("is-done"),i[d].classList.add("is-current","is-waiting"),i[d].setAttribute("aria-current","step"),r=setTimeout(function(){t(d)},S)):t(d),u.hidden=d===0,c&&(c.textContent=d===L?n:v);var y=l[d].querySelector("input, select, textarea, button");y&&document.activeElement&&f.contains(document.activeElement)&&y.focus({preventScroll:!0})}f.goToStep=s,u.addEventListener("click",function(){s(d-1)}),f.addEventListener("submit",function(m){if(d!==L){m.preventDefault();for(var b=l[d].querySelectorAll("input, select, textarea"),y=0;y<b.length;y++)if(!b[y].checkValidity()){b[y].reportValidity();return}s(d+1)}})})})(),(function(){var S=["purchase_pin","password","passkey"],f=6,l={purchase_pin:"Enter all "+f+" digits of your purchase PIN.",password:"Enter your password."},i=new WeakMap;function a(n,r){return document.getElementById(n+"-"+r)}function u(n,r){var t=document.getElementById(n).dataset.method==="purchase_pin",s=a(n,"problem");s.hidden=t||!r,s.querySelector("p").textContent=t?"":r||"",window.zaismaPinField.setError(a(n,"pin-field"),t?r:"")}function p(n,r,t){var s=t.method;a(r,"reason").querySelector("p").textContent=t.options.reason||"",a(r,"pin").hidden=s!=="purchase_pin",a(r,"password").hidden=s!=="password",S.forEach(function(b){var y=a(r,"way-"+b);y.hidden=b===s||t.methods.indexOf(b)===-1,y.disabled=t.isBusy}),a(r,"go-cell").hidden=s==="purchase_pin";var m=a(r,"go");m.querySelector(".label-idle").textContent=s==="passkey"?"Use your passkey":"Confirm",t.isBusy?m.setAttribute("aria-busy","true"):m.removeAttribute("aria-busy"),m.disabled=t.isBusy,window.zaismaPinField.setDisabled(a(r,"pin-field"),t.isBusy&&s==="purchase_pin"),n.dataset.method=s,a(r,"face").dataset.method=s}function c(n){window.zaismaPinField.clear(a(n,"pin-field")),a(n,"password-field").value=""}function d(n,r){r.method==="purchase_pin"?window.zaismaPinField.focus(a(n,"pin-field")):r.method==="password"&&a(n,"password-field").focus({preventScroll:!0})}async function L(n,r,t){if(!(t.isBusy||i.get(n)!==t)){var s=t.method,m;if(u(r,""),s==="passkey"){t.isBusy=!0,p(n,r,t);var b=await window.zaismaPasskeyTap(t.options.passkeyPurpose);if(b.error)return t.isBusy=!1,p(n,r,t),u(r,b.error);m={method:"passkey",passkey_tap:b.tap}}else{var y=s==="purchase_pin"?window.zaismaPinField.digits(a(r,"pin-field")):a(r,"password-field").value;if(!y||s==="purchase_pin"&&y.length<f)return u(r,l[s]);m=s==="purchase_pin"?{method:s,purchase_pin:y}:{method:s,password:y},t.isBusy=!0,p(n,r,t)}var g;try{g=await t.options.send(m)}catch{g={ok:!1,message:"Zaisma didn't answer. Check your connection and try again."}}if(t.isBusy=!1,g&&g.ok){t.isDone=!0,c(r),p(n,r,t),n.close(),t.options.onConfirmed();return}var x=g&&g.removed_methods||[];t.methods=t.methods.filter(function(E){return x.indexOf(E)===-1}),t.methods.indexOf(t.method)===-1&&(t.method=t.methods[0]||t.method),c(r),p(n,r,t),u(r,g&&g.message||"That didn't work. Try again."),d(r,t)}}function v(n,r){var t=function(){return i.get(n)};a(r,"go").addEventListener("click",function(){var s=t();s&&L(n,r,s)}),S.forEach(function(s){a(r,"way-"+s).addEventListener("click",function(){var m=t();!m||m.isBusy||m.methods.indexOf(s)===-1||(m.method=s,c(r),u(r,""),p(n,r,m),d(r,m))})}),n.addEventListener("zaisma:pin-complete",function(){var s=t();s&&s.method==="purchase_pin"&&L(n,r,s)}),n.addEventListener("keydown",function(s){if(!(s.key!=="Enter"||!(s.target instanceof HTMLInputElement))){s.preventDefault();var m=t();m&&L(n,r,m)}}),n.addEventListener("cancel",function(s){var m=t();m&&m.isBusy&&s.preventDefault()}),n.addEventListener("close",function(){var s=t();i.delete(n),c(r),s&&!s.isDone&&s.options.onCancelled&&s.options.onCancelled()})}window.zaismaConfirmItsYou=function(n,r){var t=document.getElementById(n);if(!t)return!1;if(t.open)return!0;var s=r.methods.filter(function(y){return y!=="passkey"||window.PublicKeyCredential&&window.zaismaPasskeyTap});if(!s.length)return!1;var m={options:r,methods:s,method:s[0],isBusy:!1,isDone:!1};t.dataset.confirmWired||(t.dataset.confirmWired="1",v(t,n)),i.set(t,m),c(n),u(n,""),p(t,n,m),t.classList.remove("is-leaving");var b=!navigator.userActivation||navigator.userActivation.isActive;return t.showModal(),m.method==="passkey"&&b?L(t,n,m):d(n,m),!0}})(),(function(){document.addEventListener("click",function(l){var i=l.target.closest&&l.target.closest("[data-load-more] > a.shell[href]");if(!(!i||l.button!==0||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey)){var a=i.parentElement,u=a.getAttribute("data-load-more").split(" "),p=document.getElementById(u[0]),c=a.querySelector(".load-more-words");p&&(l.preventDefault(),i.getAttribute("aria-busy")!=="true"&&window.zaismaWait(i,fetch(i.href,{headers:{accept:"text/html"},credentials:"same-origin"}).then(function(d){if(!d.ok)throw new Error(String(d.status));return d.text()}).then(function(d){var L=new DOMParser().parseFromString(d,"text/html");if(!L.getElementById(p.id)){location.href=i.href;return}u.forEach(function(r){var t=document.getElementById(r),s=L.getElementById(r);if(!(!t||!s||!s.children.length)){Array.prototype.slice.call(s.children).forEach(function(b){t.appendChild(document.importNode(b,!0))}),t.dispatchEvent(new Event("scroll"));var m=t.closest("[hidden]");m&&(m.hidden=!1)}});var v=L.querySelector("[data-load-more]");if(v){var n=document.importNode(v,!0);a.replaceWith(n),f(n)}else a.remove()}).catch(function(){a.classList.add("is-failed"),c&&(c.textContent="That didn't load. Check your connection, then try again.",c.hidden=!1)})))}});var S="IntersectionObserver"in window?new IntersectionObserver(function(l){l.forEach(function(i){var a=i.target.querySelector("a.shell[href]");i.isIntersecting&&a&&!i.target.classList.contains("is-failed")&&a.click()})},{rootMargin:"100% 0px"}):null;function f(l){S&&l.hasAttribute("data-loads-on-scroll")&&S.observe(l)}document.querySelectorAll("[data-loads-on-scroll]").forEach(f),window.zaismaLoadMore={watch:f}})(),(function(){var S=56,f=32,l=8,i=null,a=function(){return matchMedia("(prefers-reduced-motion: reduce)").matches},u=function(v){return!v.classList.contains("in-place")&&!v.classList.contains("urgent-card")&&!v.querySelector("a, button, input, select, textarea")};function p(v){v.classList.remove("is-swiping"),["--swipe-x","--swipe-y","--swipe-opacity"].forEach(function(n){v.style.removeProperty(n)})}function c(v,n,r){v.classList.remove("is-swiping"),!a()&&n==="x"&&v.style.setProperty("--swipe-x",r*v.offsetWidth+"px"),!a()&&n==="y"&&v.style.setProperty("--swipe-y",-v.offsetHeight+"px"),window.zaismaLayers&&window.zaismaLayers.leave(v),v.hidden=!0}var d=new WeakSet;function L(v){d.has(v)||(d.add(v),new MutationObserver(function(){v.hidden||p(v)}).observe(v,{attributes:!0,attributeFilter:["hidden"]}))}document.querySelectorAll(".playing-card").forEach(L),document.addEventListener("pointerdown",function(v){var n=v.target.closest&&v.target.closest(".playing-card");!n||n.hidden||!u(n)||v.pointerType==="mouse"&&v.button!==0||(L(n),i={card:n,id:v.pointerId,x:v.clientX,y:v.clientY,axis:"",dx:0,dy:0})}),document.addEventListener("pointermove",function(v){if(!(!i||v.pointerId!==i.id)){var n=v.clientX-i.x,r=v.clientY-i.y;if(!i.axis){if(Math.max(Math.abs(n),Math.abs(r))<l)return;if(i.axis=Math.abs(n)>=Math.abs(r)?"x":r<0?"y":"none",i.axis==="none"){i=null;return}try{i.card.setPointerCapture(v.pointerId)}catch{}a()||i.card.classList.add("is-swiping")}if(i.dx=n,i.dy=Math.min(0,r),!a()){var t=i.axis==="x"?Math.abs(i.dx)/i.card.offsetWidth:-i.dy/i.card.offsetHeight;i.card.style.setProperty(i.axis==="x"?"--swipe-x":"--swipe-y",(i.axis==="x"?i.dx:i.dy)+"px"),i.card.style.setProperty("--swipe-opacity",String(Math.max(0,1-t)))}}}),document.addEventListener("pointerup",function(v){if(!(!i||v.pointerId!==i.id)){var n=i.card,r=i.axis,t=i.dx,s=i.dy;i=null,!r||r==="x"&&Math.abs(t)>=S||r==="y"&&-s>=f?c(n,r,t<0?-1:1):p(n)}}),document.addEventListener("pointercancel",function(v){!i||v.pointerId!==i.id||(p(i.card),i=null)}),document.addEventListener("keydown",function(v){v.key==="Escape"&&document.querySelectorAll(".playing-card:not([hidden])").forEach(function(n){u(n)&&c(n,"",1)})})})(),(()=>{const S=()=>{const f=decodeURIComponent(location.hash.slice(1)),l=f?document.getElementById(f):null;l&&l.matches("details.list-row-fold")&&(l.open=!0)};S(),addEventListener("hashchange",S),document.addEventListener("click",f=>{const l=f.target instanceof Element?f.target.closest("details.list-row-fold > summary"):null,i=l?l.parentElement:null;if(!i||!i.open)return;if(f.preventDefault(),i.classList.contains("is-closing")){i.classList.remove("is-closing"),clearTimeout(i.closeLater);return}if(matchMedia("(prefers-reduced-motion: reduce)").matches){i.open=!1;return}i.classList.add("is-closing");const a=()=>{i.classList.contains("is-closing")&&(i.classList.remove("is-closing"),i.open=!1)},u=parseFloat(getComputedStyle(i,"::details-content").transitionDuration)||.4;i.closeLater=setTimeout(a,u*1e3+20)})})();
|
|
11182
11200
|
` };
|
|
11183
11201
|
|
|
11184
11202
|
// ../../apps/site/src/components/first-paint-script.ts
|
|
@@ -15313,11 +15331,12 @@ var suggestionRows = (id, typed, suggestions, activeIndex) => {
|
|
|
15313
15331
|
function searchField(options) {
|
|
15314
15332
|
const id = options.id ?? `find-${options.name}`;
|
|
15315
15333
|
const isOpen = options.state === "is-open" && Boolean(options.shownSuggestions);
|
|
15316
|
-
const
|
|
15334
|
+
const activeRowIndex = options.shownActiveRowIndex ?? -1;
|
|
15335
|
+
const firstFinish = isOpen ? options.shownSuggestions?.finishes[Math.max(activeRowIndex, 0)] : void 0;
|
|
15317
15336
|
const typedFinish = firstFinish && options.searchText && firstFinish.toLowerCase().startsWith(options.searchText.toLowerCase()) ? firstFinish.slice(options.searchText.length) : "";
|
|
15318
15337
|
const suggests = options.suggestionsUrl !== void 0 || isOpen;
|
|
15319
|
-
const combobox = suggests ? html` role="combobox" aria-autocomplete="both" aria-expanded="${isOpen ? "true" : "false"}" aria-controls="${id}-choices"${isOpen ? html` aria-activedescendant="${id}-row
|
|
15320
|
-
const list2 = suggests ? html`<span class="find-finish" aria-hidden="true"><span class="find-typed">${typedFinish ? options.searchText : ""}</span><span>${typedFinish}</span></span>${floatingPane({ id: `${id}-list`, placement: "under", kind: "select-list find-list", isShownInPlace: isOpen, body: html`<div class="select-options" id="${id}-choices" role="listbox" aria-label="${options.label}" data-own-fade>${isOpen && options.shownSuggestions ? suggestionRows(id, options.searchText, options.shownSuggestions,
|
|
15338
|
+
const combobox = suggests ? html` role="combobox" aria-autocomplete="both" aria-expanded="${isOpen ? "true" : "false"}" aria-controls="${id}-choices"${isOpen && activeRowIndex >= 0 ? html` aria-activedescendant="${id}-row-${activeRowIndex}"` : ""}` : "";
|
|
15339
|
+
const list2 = suggests ? html`<span class="find-finish" aria-hidden="true"><span class="find-typed">${typedFinish ? options.searchText : ""}</span><span>${typedFinish}</span></span>${floatingPane({ id: `${id}-list`, placement: "under", kind: "select-list find-list", isShownInPlace: isOpen, body: html`<div class="select-options" id="${id}-choices" role="listbox" aria-label="${options.label}" data-own-fade>${isOpen && options.shownSuggestions ? suggestionRows(id, options.searchText, options.shownSuggestions, activeRowIndex) : ""}</div>` })}<template class="find-icon"><span class="find-row-icon">${icon("search")}</span></template><template class="find-cover">${smallGameCard({ imageUrl: "" })}</template>` : "";
|
|
15321
15340
|
const className = ["find", "carving", "layered", "is-used", "sized", options.state === "is-open" ? "is-focused is-open" : options.state ?? ""].filter(Boolean).join(" ");
|
|
15322
15341
|
return controlMarkup(html`<form class="${className}" method="get" action="${options.action}" role="search" data-cut-line="10"${options.suggestionsUrl !== void 0 ? html` data-suggest="${options.suggestionsUrl}"` : ""}>${CUT_LINE}${Object.entries(options.keep ?? {}).map(([name, keptValue]) => html`<input type="hidden" name="${name}" value="${keptValue}">`)}${icon("search")}<input type="search" name="${options.name}" value="${options.searchText}" maxlength="200" placeholder="${options.placeholder}" aria-label="${options.label}" autocomplete="off"${combobox}>${tertiaryButton("Clear the search", { type: "button", icon: "close", isLabelHidden: true, isSmall: true })}${list2}</form>`, "regular");
|
|
15323
15342
|
}
|
|
@@ -15510,7 +15529,7 @@ var SEARCH_SCRIPT = `/* search finishes */(function () {
|
|
|
15510
15529
|
function isOpen() { return float.isOpen(); }
|
|
15511
15530
|
// The rest of the finish you're on, after what's typed, while what's typed is all in view.
|
|
15512
15531
|
function showFinish() {
|
|
15513
|
-
var row = isOpen() && rows[active], typed = input.value, finish = row && row.getAttribute("data-finish");
|
|
15532
|
+
var row = isOpen() && (rows[active] || rows[0]), typed = input.value, finish = row && row.getAttribute("data-finish");
|
|
15514
15533
|
var fits = finish && typed && finish.length > typed.length && finish.toLowerCase().indexOf(typed.toLowerCase()) === 0 && input.scrollLeft < 1;
|
|
15515
15534
|
typedPart.textContent = fits ? typed : ""; restPart.textContent = fits ? finish.slice(typed.length) : "";
|
|
15516
15535
|
}
|
|
@@ -15574,7 +15593,7 @@ var SEARCH_SCRIPT = `/* search finishes */(function () {
|
|
|
15574
15593
|
next.concat(nextGames).forEach(function (row, rowIndex) { row.id = id + "-row-" + rowIndex; });
|
|
15575
15594
|
}
|
|
15576
15595
|
rows = next.concat(nextGames);
|
|
15577
|
-
if (rows.length && document.activeElement === input) { show(); setActive(
|
|
15596
|
+
if (rows.length && document.activeElement === input) { show(); setActive(-1); } else { setActive(-1); hide(); }
|
|
15578
15597
|
}
|
|
15579
15598
|
function ask() {
|
|
15580
15599
|
var typed = input.value.trim();
|
|
@@ -15588,9 +15607,9 @@ var SEARCH_SCRIPT = `/* search finishes */(function () {
|
|
|
15588
15607
|
.catch(function () {});
|
|
15589
15608
|
}
|
|
15590
15609
|
// A finish taken goes in as if typed, so whatever follows what's typed (its finishes, the Clear button) follows it too.
|
|
15591
|
-
function take() { var row = rows[active]; if (!row || !row.hasAttribute("data-finish")) return; input.value = row.getAttribute("data-finish"); input.dispatchEvent(new Event("input", { bubbles: true })); }
|
|
15610
|
+
function take() { var row = rows[active] || rows[0]; if (!row || !row.hasAttribute("data-finish")) return; input.value = row.getAttribute("data-finish"); input.dispatchEvent(new Event("input", { bubbles: true })); }
|
|
15592
15611
|
function go() {
|
|
15593
|
-
var row = rows[active];
|
|
15612
|
+
var row = isOpen() && rows[active];
|
|
15594
15613
|
if (row && row.tagName === "A") { location.href = row.href; return; }
|
|
15595
15614
|
if (row) { input.value = row.getAttribute("data-finish"); input.dispatchEvent(new Event("input", { bubbles: true })); }
|
|
15596
15615
|
clearTimeout(timer); if (asking) asking.abort(); hide();
|
|
@@ -15607,9 +15626,9 @@ var SEARCH_SCRIPT = `/* search finishes */(function () {
|
|
|
15607
15626
|
if (key === "ArrowDown" || key === "ArrowUp") {
|
|
15608
15627
|
event.preventDefault();
|
|
15609
15628
|
if (!isOpen()) { if (rows.length) { show(); setActive(0); } else ask(); return; }
|
|
15610
|
-
setActive((active + (key === "ArrowDown" ? 1 : -1) + rows.length) % rows.length);
|
|
15629
|
+
setActive(active < 0 ? (key === "ArrowDown" ? 0 : rows.length - 1) : (active + (key === "ArrowDown" ? 1 : -1) + rows.length) % rows.length);
|
|
15611
15630
|
} else if (key === "Tab" && !event.shiftKey && isOpen() && restPart.textContent) { event.preventDefault(); take(); }
|
|
15612
|
-
else if (key === "Enter"
|
|
15631
|
+
else if (key === "Enter") { event.preventDefault(); go(); }
|
|
15613
15632
|
else if (key === "Escape" && isOpen()) { event.preventDefault(); hide(); }
|
|
15614
15633
|
});
|
|
15615
15634
|
input.addEventListener("focusout", function () { setTimeout(function () { if (document.activeElement !== input) hide(); }, 0); });
|
|
@@ -16010,8 +16029,8 @@ component({
|
|
|
16010
16029
|
.find:has(input:placeholder-shown) > .tertiary-btn { display: none; }
|
|
16011
16030
|
.find:not(:has(input:placeholder-shown)) { --search-end-room: var(--control-height); }
|
|
16012
16031
|
/* Finishes and games as you type (suggestionsUrl, SEARCH_SCRIPT): a select field's list hangs under it. The row you're on catches the
|
|
16013
|
-
light, and
|
|
16014
|
-
|
|
16032
|
+
light, and the rest of its finish, or of the first while you're on none, shows after what's typed, quieter, in the field itself: Tab takes
|
|
16033
|
+
it. Enter searches what's typed, or on a row takes its finish and searches, or opens its game. */
|
|
16015
16034
|
.find-finish { position: absolute; z-index: 2; inset: 0 var(--search-end-room) 0 calc(var(--pad-inside-words) + 34px); display: flex; align-items: center; overflow: hidden; white-space: pre; pointer-events: none;
|
|
16016
16035
|
font: 500 1.125rem var(--display); color: var(--muted); }
|
|
16017
16036
|
.find-finish > .find-typed { visibility: hidden; }
|
|
@@ -16041,9 +16060,14 @@ component({
|
|
|
16041
16060
|
markup: html`<div style="width:min(460px,100%)">${searchField({ id: "example-find-try", action: "#search-field", name: "search_text", searchText: "", placeholder: "Search games", label: "Search games", suggestionsUrl: "/design/examples/search-suggestions" })}</div>`
|
|
16042
16061
|
},
|
|
16043
16062
|
{
|
|
16044
|
-
label: "Open: the first finish in the field",
|
|
16063
|
+
label: "Open: nothing picked, the first finish waiting in the field",
|
|
16045
16064
|
markup: html`<div style="width:min(460px,100%);min-height:22rem">${searchField({ id: "example-find-open", action: "#search-field", name: "search_text", searchText: "ash", placeholder: "Search games", label: "Search games", state: "is-open", shownSuggestions: SEARCH_STAND_IN.suggestionsFor("ash") })}</div>`,
|
|
16046
16065
|
isStill: true
|
|
16066
|
+
},
|
|
16067
|
+
{
|
|
16068
|
+
label: "Open: a row picked with the arrows or the pointer",
|
|
16069
|
+
markup: html`<div style="width:min(460px,100%);min-height:22rem">${searchField({ id: "example-find-picked", action: "#search-field", name: "search_text", searchText: "ash", placeholder: "Search games", label: "Search games", state: "is-open", shownSuggestions: SEARCH_STAND_IN.suggestionsFor("ash"), shownActiveRowIndex: 0 })}</div>`,
|
|
16070
|
+
isStill: true
|
|
16047
16071
|
}
|
|
16048
16072
|
]
|
|
16049
16073
|
});
|
|
@@ -29219,10 +29243,10 @@ function setFocus(slug) {
|
|
|
29219
29243
|
|
|
29220
29244
|
/* ---- Covers ---- */
|
|
29221
29245
|
// The same markup as components/panes.ts's gameCard: the art in its well, its foot's edge light in the game's tint, Updated in its top left
|
|
29222
|
-
// corner (a game played before its last update, in Continue playing), and its line: its title and players now.
|
|
29246
|
+
// corner (a game played before its last big update, in Continue playing), and its line: its title and players now.
|
|
29223
29247
|
function coverFor(game, list, at) {
|
|
29224
29248
|
const cover = make("div", "cover"), art = make("a", "cover-art carving holds-art");
|
|
29225
|
-
const isUpdated = list === "continue" && game.
|
|
29249
|
+
const isUpdated = list === "continue" && game.big_update_at_ms && game.big_update_at_ms > at;
|
|
29226
29250
|
cover.dataset.slug = game.slug;
|
|
29227
29251
|
if (/^#[0-9a-fA-F]{6}$/.test(game.glass_tint_color || "")) { cover.classList.add("has-tint"); cover.style.setProperty("--card-tint", game.glass_tint_color); }
|
|
29228
29252
|
art.href = "/g/" + game.slug; art.setAttribute("data-cut-line", "0"); art.setAttribute("data-edge-light", "bottom"); art.setAttribute("data-lights", ""); art.setAttribute("aria-label", game.title + (isUpdated ? ", updated" : "")); art.append(iconNode(DATA.parts.cut_line));
|
|
@@ -29249,9 +29273,10 @@ function coverFor(game, list, at) {
|
|
|
29249
29273
|
let sort = "played";
|
|
29250
29274
|
function fillContinue() {
|
|
29251
29275
|
const row = $("home-continue"), list = playedList();
|
|
29252
|
-
|
|
29276
|
+
// An account's covers from the server stay while its list is on its way.
|
|
29277
|
+
row.hidden = !list.length && !$("track-continue").querySelector(".cover");
|
|
29253
29278
|
if (!list.length) return;
|
|
29254
|
-
if (sort === "updated") list.sort((a, b) => (bySlug[b.slug].
|
|
29279
|
+
if (sort === "updated") list.sort((a, b) => (bySlug[b.slug].big_update_at_ms || 0) - (bySlug[a.slug].big_update_at_ms || 0));
|
|
29255
29280
|
// What the page already shows (an account's, from the server) stays as it is.
|
|
29256
29281
|
const shown = Array.from($("track-continue").querySelectorAll(".cover")).map((cover) => cover.dataset.slug || (cover.querySelector(".cover-art") || { getAttribute: () => "" }).getAttribute("href").slice(3));
|
|
29257
29282
|
if (shown.join(" ") === list.map((entry) => entry.slug).join(" ")) return;
|
|
@@ -49780,7 +49805,7 @@ var PICTURE_FIELDS = {
|
|
|
49780
49805
|
var SCHEMA2 = {
|
|
49781
49806
|
type: "object",
|
|
49782
49807
|
additionalProperties: false,
|
|
49783
|
-
required: ["pictures", "title_fake_reward", "title_famous_name", "title_tag", "description_fake_reward", "has_words_safety_concern"],
|
|
49808
|
+
required: ["pictures", "title_fake_reward", "title_famous_name", "title_tag", "title_search_words", "description_fake_reward", "has_words_safety_concern"],
|
|
49784
49809
|
properties: {
|
|
49785
49810
|
pictures: {
|
|
49786
49811
|
type: "array",
|
|
@@ -49796,6 +49821,10 @@ var SCHEMA2 = {
|
|
|
49796
49821
|
type: "string",
|
|
49797
49822
|
description: `A tag in the title instead of the game's name: a bracketed tag ([UPDATE], (NEW), [EVENT]), any emoji, or the words NEW, UPDATE or FREE used as a tag rather than as part of the name. Quote it. "Free Fall", "+1 Speed Run" and "Wrangler 2x" are names, not tags. "" when none or when the title isn't judged.`
|
|
49798
49823
|
},
|
|
49824
|
+
title_search_words: {
|
|
49825
|
+
type: "string",
|
|
49826
|
+
description: `A title that lists what kind of game it is instead of naming it: a run of genre, mode or feature words with no point but being searched for, on their own or after a name ("Neon Rush: Racing Drift Car Driving Simulator", "Zombie Shooter FPS Survival Multiplayer Online", "Monster Truck Stunt Racing Game 3D"). Quote the list. The test: would players say all of it as the game's name? A name that says what its game is, however long, is a name ("Car Mechanic Simulator", "Euro Truck Driver", "Cat Cafe Manager"), and so is a subtitle that names a part or story ("Tomb of Emperors: The Second Age", "The Last Lighthouse Keeper on the Drowned Sea"). "" when none or when the title isn't judged. Obvious lists only: when unsure, it's a name.`
|
|
49827
|
+
},
|
|
49799
49828
|
description_fake_reward: { type: "string", description: `Words in the description promising something of real value or another platform's currency, quoted; "" when none or when it isn't judged.` },
|
|
49800
49829
|
has_words_safety_concern: { type: "boolean", description: "true when the judged title or description is sexual, shares a real person's private details or makes a real threat." }
|
|
49801
49830
|
}
|
|
@@ -50181,13 +50210,14 @@ var API_ROUTES = [
|
|
|
50181
50210
|
patch_notes: plain,
|
|
50182
50211
|
// Going live by itself is publishing, so it needs what publishing needs, not just upload.
|
|
50183
50212
|
publish_when_approved: needsToo("version_access", "publish", "the version waits as a draft with a preview link, and the developer publishes it"),
|
|
50184
|
-
match_update_mode: plain
|
|
50213
|
+
match_update_mode: plain,
|
|
50214
|
+
is_big_update: plain
|
|
50185
50215
|
},
|
|
50186
50216
|
maximumSizeBytes: 4 * 1024 * 1024
|
|
50187
50217
|
}
|
|
50188
50218
|
}),
|
|
50189
50219
|
call({ method: "GET", path: "/games/:slug/versions/:version_id", reaches: "game", access: needs("version_access", "read"), pathParts: { slug: "game", version_id: "in_game" } }),
|
|
50190
|
-
call({ method: "POST", path: "/games/:slug/versions/:version_id/publish", reaches: "game", access: needs("version_access", "publish"), isPublishing: true, pathParts: { slug: "game", version_id: "in_game" }, body: { inputs: plainInputs("scheduled_publish_at", "match_update_mode"), isOptional: true } }),
|
|
50220
|
+
call({ method: "POST", path: "/games/:slug/versions/:version_id/publish", reaches: "game", access: needs("version_access", "publish"), isPublishing: true, pathParts: { slug: "game", version_id: "in_game" }, body: { inputs: plainInputs("scheduled_publish_at", "match_update_mode", "is_big_update", "patch_notes"), isOptional: true } }),
|
|
50191
50221
|
call({ method: "DELETE", path: "/games/:slug/versions/:version_id/publish", reaches: "game", access: needs("version_access", "publish"), pathParts: { slug: "game", version_id: "in_game" } }),
|
|
50192
50222
|
call({ method: "DELETE", path: "/games/:slug/versions/:version_id/preview-links", reaches: "game", access: needs("version_access", "upload"), pathParts: { slug: "game", version_id: "in_game" } }),
|
|
50193
50223
|
call({ method: "GET", path: "/games/:slug/reports", reaches: "game", access: needs("stats_access", "read"), pathParts: atGame, query: plainInputs("cursor") }),
|
|
@@ -50380,6 +50410,8 @@ function versionJson(env2, game, version, performanceCheck) {
|
|
|
50380
50410
|
preview_url: preview ? `${env2.SITE_ORIGIN}/p/${preview.token}` : null,
|
|
50381
50411
|
preview_url_expires_at: preview ? iso(preview.expiresAtMs) : null,
|
|
50382
50412
|
published_at: iso(version.published_at_ms),
|
|
50413
|
+
first_published_at: iso(version.first_published_at_ms),
|
|
50414
|
+
is_big_update: version.is_big_update === 1,
|
|
50383
50415
|
scheduled_publish_at: iso(version.scheduled_publish_at_ms),
|
|
50384
50416
|
// How running matches get it when it goes live by itself (publish later, or publish when approved).
|
|
50385
50417
|
match_update_mode: version.match_update_mode ?? "next_match",
|
|
@@ -50451,6 +50483,10 @@ async function gameJson(env2, game) {
|
|
|
50451
50483
|
demo_game_slug: game.demo_game_id ? (await env2.DB.prepare("SELECT slug FROM games WHERE id = ?").bind(game.demo_game_id).first())?.slug ?? null : null,
|
|
50452
50484
|
refund_policy: game.refund_policy,
|
|
50453
50485
|
refund_policy_text: game.refund_policy_text,
|
|
50486
|
+
first_published_at: iso(game.first_published_at_ms),
|
|
50487
|
+
big_update_at: iso(game.big_update_at_ms),
|
|
50488
|
+
// Where Browse's Recently updated places it: a marked big update moves it at most once every 30 days.
|
|
50489
|
+
recently_updated_at: iso(game.recently_updated_at_ms ?? game.first_published_at_ms),
|
|
50454
50490
|
updated_at: iso(game.updated_at_ms)
|
|
50455
50491
|
};
|
|
50456
50492
|
}
|
|
@@ -52738,7 +52774,9 @@ function gamePageResponse(env2, view) {
|
|
|
52738
52774
|
const describedModes = playModes ? describePlayModes(playModes) : game.multiplayer_mode !== "none" ? [{ mode: "online", label: "Online multiplayer", playerCount: null }] : [];
|
|
52739
52775
|
const gameFacts = [
|
|
52740
52776
|
...describedModes.length ? [{ label: "Players", entries: describedModes.map((playMode) => ({ text: playMode.playerCount ? `${playMode.label}, ${playMode.playerCount}` : playMode.label, icon: MODE_ICON_NAMES[playMode.mode] })) }] : [],
|
|
52741
|
-
...devices.length ? [{ label: "Works on", entries: devices.map((device) => ({ text: DEVICE_LABELS[device] ?? device, icon: DEVICE_ICON_NAMES[device] ?? "computer" })) }] : []
|
|
52777
|
+
...devices.length ? [{ label: "Works on", entries: devices.map((device) => ({ text: DEVICE_LABELS[device] ?? device, icon: DEVICE_ICON_NAMES[device] ?? "computer" })) }] : [],
|
|
52778
|
+
// Only a marked big update: a quiet patch, a rollback or a title change never says so.
|
|
52779
|
+
...game.big_update_at_ms ? [{ label: "Updated", text: day(game.big_update_at_ms) }] : []
|
|
52742
52780
|
];
|
|
52743
52781
|
const purchaseFacts = [
|
|
52744
52782
|
{ label: "Purchases", text: purchaseWords(purchaseLabel) },
|
|
@@ -52826,7 +52864,7 @@ function gamePageResponse(env2, view) {
|
|
|
52826
52864
|
...developer ? [{ kind: "block", markup: person({ username: developer.name, href: profilePath(developer.name), note: developer.game_count === 1 ? "1 game on Zaisma" : `${developer.game_count} games on Zaisma` }) }] : [],
|
|
52827
52865
|
...pageLinks.length ? [{ kind: "block", markup: html`${developerLinks(pageLinks)}` }] : []
|
|
52828
52866
|
]),
|
|
52829
|
-
...view.updates.length ? [section("updates", "Updates", [{ kind: "block", markup: readingText({ markup: html`${view.updates.map((update) => html`<h3>${day(update.
|
|
52867
|
+
...view.updates.length ? [section("updates", "Updates", [{ kind: "block", markup: readingText({ markup: html`${view.updates.map((update) => html`<h3>${day(update.first_published_at_ms)}</h3>${paragraphs(update.patch_notes)}`)}` }) }])] : [],
|
|
52830
52868
|
...developerGames.length && developer ? [section("more", `More from ${developer.name}`, [{ kind: "block", markup: grid({ whenEmpty: stateNote({ stateKind: "empty", 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, picture: otherGame.cover_picture, href: `/g/${otherGame.slug}`, tintColor: otherGame.glass_tint_color, facts: { playerCount: otherGame.playing_now_player_count >= MINIMUM_PLAYING_NOW_PLAYER_COUNT ? otherGame.playing_now_player_count : void 0, priceText: coverPriceText(otherGame, view.ownedPaidGameIds) } }) })) }) }])] : []
|
|
52831
52869
|
];
|
|
52832
52870
|
const barControls = [
|
|
@@ -53067,9 +53105,11 @@ function warmUp() {
|
|
|
53067
53105
|
const isComputer = !matchMedia("(pointer: coarse)").matches;
|
|
53068
53106
|
const isAndroidOnWifi = /Android/.test(navigator.userAgent) && connection && (connection.type === "wifi" || connection.type === "ethernet");
|
|
53069
53107
|
const isIPhone = /iPhone/.test(navigator.userAgent);
|
|
53070
|
-
|
|
53108
|
+
// An iPad downloads nothing ahead of time: its warm-up only keeps redirects (warm.js), so an update there downloads only what changed.
|
|
53109
|
+
const isIPad = !isComputer && (/iPad/.test(navigator.userAgent) || navigator.platform === "MacIntel");
|
|
53110
|
+
if (frame || !gamePage.warm_url || (connection && connection.saveData === true) || !(isComputer || isAndroidOnWifi || isIPhone || isIPad)) return;
|
|
53071
53111
|
warming = document.createElement("iframe");
|
|
53072
|
-
warming.src = gamePage.warm_url + (isComputer || isAndroidOnWifi ? "" : "?maximum_start_size_bytes
|
|
53112
|
+
warming.src = gamePage.warm_url + (isComputer || isAndroidOnWifi ? "" : "?maximum_start_size_bytes=" + (isIPad ? 0 : ${PERFORMANCE_CHECK_LIMITS.maximumPhoneWarmUpSizeBytes}));
|
|
53073
53113
|
warming.setAttribute("sandbox", "allow-scripts allow-same-origin");
|
|
53074
53114
|
warming.hidden = true;
|
|
53075
53115
|
warming.setAttribute("aria-hidden", "true");
|
|
@@ -54472,6 +54512,9 @@ var GAME = object({
|
|
|
54472
54512
|
refund_policy_text: nullable(text2("The refund policy in the developer's own words, with refund_policy own_words; null otherwise.")),
|
|
54473
54513
|
full_game_item_name: nullable(text2("The permanent content item a player must own to play; null: free to play.")),
|
|
54474
54514
|
demo_game_slug: nullable(text2("Another of the developer's games, free to play, that the page links as Play the demo; null: none.")),
|
|
54515
|
+
first_published_at: nullable(isoTime("When the game first went live; it never moves. null until then.")),
|
|
54516
|
+
big_update_at: nullable(isoTime("The last marked big update (is_big_update on a publish): the Updated tag and the game page's Updated fact. null for none.")),
|
|
54517
|
+
recently_updated_at: nullable(isoTime("Where Browse's Recently updated places the game: its first release, moved by a marked big update at most once every 30 days. null until it's live.")),
|
|
54475
54518
|
updated_at: isoTime()
|
|
54476
54519
|
});
|
|
54477
54520
|
var GAME_ALERT = object({
|
|
@@ -54557,6 +54600,8 @@ var VERSION = object({
|
|
|
54557
54600
|
preview_url: nullable(url("A private link to play this version, for the developer and their AI, once it's approved. A fresh one comes every time; each works for a day.")),
|
|
54558
54601
|
preview_url_expires_at: nullable(isoTime("When this preview_url stops working: at least a day from now.")),
|
|
54559
54602
|
published_at: nullable(isoTime("When it last went live.")),
|
|
54603
|
+
first_published_at: nullable(isoTime("When it first went live; a rollback doesn't move it. The game page's Updates tab shows its notes under this date.")),
|
|
54604
|
+
is_big_update: yes("The developer marked it a big update. It counts as news only when it goes live for the first time, on a game already released."),
|
|
54560
54605
|
scheduled_publish_at: nullable(isoTime("When it goes live by itself, if it's scheduled.")),
|
|
54561
54606
|
match_update_mode: MATCH_UPDATE_MODE,
|
|
54562
54607
|
created_at: isoTime(),
|
|
@@ -56514,6 +56559,7 @@ Not: a build over ${MAXIMUM_MCP_UPLOAD_SIZE_BYTES / 1048576} MB (run npx @zaisma
|
|
|
56514
56559
|
},
|
|
56515
56560
|
patch_notes: { type: "string", maxLength: 2e3, description: "What changed, shown to players" },
|
|
56516
56561
|
publish_when_approved: { type: "boolean", description: "Go live as soon as it passes the scan; that's publishing, so it needs a key with version_access publish" },
|
|
56562
|
+
is_big_update: { type: "boolean", description: "With publish_when_approved true: mark it a big update, with patch_notes saying what's new. Left out, it goes live as a quiet patch." },
|
|
56517
56563
|
match_update_mode: { ...{ type: "string", enum: ["next_match", "now"], description: "When running matches get it: next_match (they finish on the version they started; the default) or now (every live match switches within seconds, in the same room, and players' games reload into it when its files changed; the game server can hold it until a good moment with onVersionUpdate, up to 5 minutes). Games not in a match get it when the game or the player says, never forced" }, description: "With publish_when_approved: when running matches get it, next_match (the default) or now" }
|
|
56518
56564
|
},
|
|
56519
56565
|
["slug", "files"]
|
|
@@ -56589,14 +56635,19 @@ Not: { "files": [{ "path": "index.html", "content": "<!doctype html>\u2026" }] }
|
|
|
56589
56635
|
{
|
|
56590
56636
|
name: "publish_version",
|
|
56591
56637
|
title: "Publish or roll back",
|
|
56592
|
-
description:
|
|
56638
|
+
description: `Make a version that passed review live now, or later at scheduled_publish_at (from a few minutes to 90 days ahead). Publishing an older version rolls back to it. The live version and the last 5 are kept.
|
|
56639
|
+
|
|
56640
|
+
Not: { "scheduled_publish_at": 1792012345678 } (an ISO time like "2026-11-01T17:00:00Z", not a number)
|
|
56641
|
+
Not: { "scheduled_publish_at": "2026-11-01 17:00" } (ISO with T and Z or an offset: "2026-11-01T17:00:00Z")
|
|
56642
|
+
A fix live matches need at once (an exploit, a crash): { "match_update_mode": "now" }. Not: { "match_update_mode": true } (give "now" or "next_match")
|
|
56643
|
+
A publish is a quiet patch: its notes show in the game page's Updates tab and nothing else changes. Only for an update players should come back for, mark it: { "is_big_update": true, "patch_notes": "Three new worlds and online co-op." }. That shows the Updated tag to players who have played, and moves the game up Recently updated at most once every 30 days. Not: { "is_big_update": true } on a version with no notes (a big update says what's new), or on a rollback (only a version going live for the first time counts).`,
|
|
56593
56644
|
inputSchema: object2(
|
|
56594
56645
|
{ slug, version_id: versionId, scheduled_publish_at: { type: "string", format: "date-time", description: "Publish later instead, at this ISO time", examples: ["2026-11-01T17:00:00Z"] }, match_update_mode: { type: "string", enum: ["next_match", "now"], description: "When running matches get it: next_match (they finish on the version they started; the default) or now (every live match switches within seconds, in the same room, and players' games reload into it when its files changed; the game server can hold it until a good moment with onVersionUpdate, up to 5 minutes). Games not in a match get it when the game or the player says, never forced" } },
|
|
56595
56646
|
["slug", "version_id"]
|
|
56596
56647
|
),
|
|
56597
56648
|
outputSchema: object({ game: GAME, version: VERSION, next_steps: NEXT }),
|
|
56598
56649
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
56599
|
-
run: (toolArguments, call3) => call3("POST", `/games/${pathPart(toolArguments.slug)}/versions/${pathPart(toolArguments.version_id)}/publish`, pick(toolArguments, ["scheduled_publish_at", "match_update_mode"]))
|
|
56650
|
+
run: (toolArguments, call3) => call3("POST", `/games/${pathPart(toolArguments.slug)}/versions/${pathPart(toolArguments.version_id)}/publish`, pick(toolArguments, ["scheduled_publish_at", "match_update_mode", "is_big_update", "patch_notes"]))
|
|
56600
56651
|
},
|
|
56601
56652
|
{
|
|
56602
56653
|
name: "cancel_scheduled_publish",
|
|
@@ -58097,7 +58148,8 @@ async function uploadFiles(toolArguments, call3) {
|
|
|
58097
58148
|
files: list2,
|
|
58098
58149
|
patch_notes: typeof toolArguments.patch_notes === "string" ? toolArguments.patch_notes : "",
|
|
58099
58150
|
publish_when_approved: toolArguments.publish_when_approved === true,
|
|
58100
|
-
...toolArguments.match_update_mode !== void 0 ? { match_update_mode: toolArguments.match_update_mode } : {}
|
|
58151
|
+
...toolArguments.match_update_mode !== void 0 ? { match_update_mode: toolArguments.match_update_mode } : {},
|
|
58152
|
+
...toolArguments.is_big_update !== void 0 ? { is_big_update: toolArguments.is_big_update } : {}
|
|
58101
58153
|
});
|
|
58102
58154
|
return { version, sent_file_count: sent.size, next_steps: nextSteps };
|
|
58103
58155
|
}
|
|
@@ -60161,6 +60213,9 @@ function benchGame(input) {
|
|
|
60161
60213
|
demo_game_id: null,
|
|
60162
60214
|
live_version_match_update_mode: "next_match",
|
|
60163
60215
|
live_version_published_at_ms: null,
|
|
60216
|
+
first_published_at_ms: null,
|
|
60217
|
+
big_update_at_ms: null,
|
|
60218
|
+
recently_updated_at_ms: null,
|
|
60164
60219
|
has_live_version_game_file_changes: 0,
|
|
60165
60220
|
created_at_ms: 0,
|
|
60166
60221
|
updated_at_ms: 0
|
package/bin/local-play.js
CHANGED
|
@@ -36,7 +36,7 @@ export const LOCAL_VERSION_ID = "version_local";
|
|
|
36
36
|
export const LOCAL_FOLDER = ".zaisma-local";
|
|
37
37
|
/** Every _zaisma/ file the games Worker serves, split by whether it works here or only loads and does nothing (test/node/local-play-parity.test.ts holds this to apps/games/src/index.ts). */
|
|
38
38
|
export const SERVED_ZAISMA_PATHS = ["_zaisma/v1.js", "_zaisma/v1.d.ts", "_zaisma/relay.js", "_zaisma/picture.js", "_zaisma/saves.js", "_zaisma/restore"];
|
|
39
|
-
export const ONLY_ON_ZAISMA_PATHS = ["_zaisma/performance.js", "_zaisma/warm", "_zaisma/warm.json", "_zaisma/warm.js"];
|
|
39
|
+
export const ONLY_ON_ZAISMA_PATHS = ["_zaisma/performance.js", "_zaisma/warm", "_zaisma/warm.json", "_zaisma/warm-redirects.json", "_zaisma/warm.js"];
|
|
40
40
|
const OPTION_NAMES = ["gameFolder", "port", "isOnNetwork", "gameSlug", "zaismaKey", "developerApiUrl", "log"];
|
|
41
41
|
const SAVE_LIMIT_BYTES = 5 * 1024 * 1024;
|
|
42
42
|
const PASS_DURATION_SEC = 24 * 3600;
|