@playpilot/tpi 1.4.2 → 1.4.3

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.
@@ -1,7 +1,7 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css?family=Poppins:400,600,700";.popover.svelte-8w8waf{--offset: 8px;position:absolute;top:calc((var(--offset) - 1px) * -1);left:0;width:calc(100vw - 32px);max-width:320px;padding:var(--offset) 0;transform:translateY(calc(-100% + var(--offset)));z-index:2147483647}.popover.flip.svelte-8w8waf{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-8w8waf{cursor:default;position:relative;border-radius:var(--playpilot-popover-border-radius, 16px);background:var(--playpilot-popover-background, var(--playpilot-light));box-shadow:var(--playpilot-popover-shadow, var(--playpilot-shadow-large));max-height:min(var(--max-height),560px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden}.genre.svelte-13nhocm{display:flex;flex-wrap:wrap;background:var(--playpilot-genre-background, var(--playpilot-content));border:0;border-radius:var(--playpilot-genre-border-radius, 16px);padding:4px 8px;font-family:var(--playpilot-genre-font-family, inherit);font-weight:var(--playpilot-playlink-font-weight, inherit);text-transform:var(--playpilot-genre-text-transform, none);color:var(--playpilot-genre-text-color, var(--playpilot-text-color-alt));line-height:1;font-size:inherit}.genre.svelte-13nhocm:is(button:where(.svelte-13nhocm)):hover{cursor:pointer;filter:var(--playpilot-genre-hover-filter, brightness(1.1));background:var(--playpilot-genre-hover-background, var(--playpilot-genre-background, var(--playpilot-content)))}h2.svelte-1f6ryh6{margin:0;color:var(--playpilot-playlinks-title-color, var(--playpilot-text-color-alt));font-family:var(--playpilot-playlinks-title-font-family, inherit);font-weight:var(--playpilot-playlinks-title-font-weight, lighter);font-size:var(--playpilot-playlinks-title-font-size, 14px);line-height:normal}img.svelte-1f6ryh6{border-radius:8px;background:#00000040}@media (min-width: 640px){img.svelte-1f6ryh6{height:40px;width:40px}}.playlinks.svelte-1f6ryh6{box-sizing:border-box;display:flex;gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px;overflow:auto;scrollbar-width:none}.playlinks.svelte-1f6ryh6::-webkit-scrollbar{display:none}.list.svelte-1f6ryh6{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}@media (min-width: 640px){.list.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){height:32px;width:32px}}.playlink.svelte-1f6ryh6{display:flex;align-items:center;gap:12px;padding:12px;background:var(--playpilot-playlink-background, var(--playpilot-lighter));box-shadow:var(--playpilot-playlink-shadow, var(--playpilot-shadow));border-radius:var(--playpilot-playlink-border-radius, 8px);color:var(--playpilot-playlink-text-color, var(--playpilot-text-color-alt))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal);text-decoration:none!important;white-space:nowrap;font-size:12px;line-height:1}.playlink.svelte-1f6ryh6:hover,.playlink.svelte-1f6ryh6:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)));text-decoration:none!important}.playlink.svelte-1f6ryh6 img:where(.svelte-1f6ryh6){margin:0}.list.svelte-1f6ryh6 .playlink:where(.svelte-1f6ryh6){padding:8px;gap:8px}.name.svelte-1f6ryh6{font-weight:var(--playpilot-playlink-font-weight, inherit);font-family:var(--playpilot-playlink-font-family, inherit)}.category.svelte-1f6ryh6{margin-top:8px;font-size:10px;color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.empty.svelte-1f6ryh6{white-space:initial;line-height:1.35}.arrow.svelte-1f6ryh6{margin-left:auto;padding:0 8px}p.svelte-fluzit,.paragraph.svelte-fluzit{display:block;margin:16px 0 0}.show-more.svelte-fluzit{display:inline;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;background:transparent;border:0;color:var(--playpilot-read-more-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-read-more-font-weight, inherit);font-family:inherit;font-size:inherit}.show-more.svelte-fluzit:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}h2.svelte-15oguej{margin:24px 0 16px;font-size:var(--playpilot-cast-title-font-size, 18px);line-height:normal;font-weight:inherit;color:var(--playpilot-cast-title-text-color, var(--playpilot-text-color))}.participants.svelte-15oguej{display:flex;gap:16px;width:calc(100% + 32px);padding:0 16px;margin:0 -16px;overflow:auto;white-space:nowrap;scrollbar-width:none}.participants.svelte-15oguej::-webkit-scrollbar{display:none}.character.svelte-15oguej{color:var(--playpilot-cast-character-text-color, var(--playpilot-text-color-alt));font-style:italic}h1.svelte-zq2qln{margin:8px 0;color:var(--playpilot-detail-title-text-color, #fff);font-family:var(--playpilot-detail-title-font-family, inherit);font-weight:var(--playpilot-detail-title-font-weight, lighter);font-size:var(--playpilot-detail-title-font-size, 24px);line-height:normal;font-style:var(--playpilot-detail-title-font-style, normal)}.small.svelte-zq2qln h1:where(.svelte-zq2qln){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-zq2qln h1:where(.svelte-zq2qln){margin-top:0}.content.svelte-zq2qln{z-index:1;position:relative;padding:16px;color:var(--playpilot-detail-text-color, var(--playpilot-text-color));font-family:var(--playpilot-detail-font-family, var(--playpilot-font-family));font-weight:var(--playpilot-detail-font-weight, normal);font-size:var(--playpilot-detail-font-size, 14px);line-height:normal;font-style:normal}.content.small.svelte-zq2qln{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-zq2qln{padding:32px 0 16px}.small.svelte-zq2qln .header:where(.svelte-zq2qln){padding-top:16px}.compact.svelte-zq2qln .header:where(.svelte-zq2qln){padding:0 0 16px}.top.svelte-zq2qln{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-zq2qln{display:block;width:72px;margin:0;aspect-ratio:2/3;border-radius:var(--playpilot-detail-image-border-radius, 8px);background:var(--playpilot-detail-image-background, var(--playpilot-content));box-shadow:var(--playpilot-detail-image-shadow, var(--playpilot-shadow))}.info.svelte-zq2qln{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-zq2qln .info:where(.svelte-zq2qln){gap:8px 12px}.imdb.svelte-zq2qln{display:flex;align-items:center;gap:4px}.imdb.svelte-zq2qln svg{margin-top:-2px}.small.svelte-zq2qln .imdb:where(.svelte-zq2qln) svg{margin-top:0;width:12px;height:12px}.background.svelte-zq2qln{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter))}.background.svelte-zq2qln:before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,var(--playpilot-detail-background, var(--playpilot-light)),transparent 40%)}.background.svelte-zq2qln img:where(.svelte-zq2qln){width:100%;height:100%;object-fit:cover;object-position:center;margin:0}.faded.svelte-zq2qln{opacity:.15}.capitalize.svelte-zq2qln{text-transform:capitalize}span.svelte-6p0hvs{display:block}button.svelte-6p0hvs{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--playpilot-after-article-button-padding, 4px 12px);margin:var(--playpilot-after-article-button-margin, 4px 0 0);background:var(--playpilot-after-article-button-background, transparent);border:var(--playpilot-after-article-button-border, 2px solid currentColor);border-radius:var(--playpilot-after-article-button-border-radius, 16px);color:var(--playpilot-after-article-button-text-color, inherit);font-weight:var(--playpilot-after-article-button-font-weight, bold);font-size:var(--playpilot-after-article-button-font-size, 16px);cursor:pointer;transition:all 50ms}button.svelte-6p0hvs:hover{background:var(--playpilot-after-article-button-background-hover, transparent);border:var(--playpilot-after-article-button-border-hover, 2px solid currentColor);color:var(--playpilot-after-article-button-text-color-hover, inherit);transform:var(--playpilot-after-article-button-transform-hover, scale(1.02))}.button.svelte-1qqv88o{display:flex;align-items:center;justify-content:center;flex:0 0 var(--size);width:var(--size);height:var(--size);border-radius:50%;border:0;padding:var(--playpilot-button-padding, 0);background:var(--playpilot-button-background, var(--playpilot-content));box-shadow:var(--playpilot-button-shadow, var(--playpilot-shadow));color:var(--playpilot-button-text-color, var(--playpilot-text-color-alt));cursor:pointer;transition:transform 50ms}.button.svelte-1qqv88o:hover{filter:brightness(1.2);transform:scale(1.05)}.modal.svelte-1riopfw{z-index:2147483647;position:fixed;display:flex;justify-content:center;align-items:flex-start;top:0;left:0;width:100%;height:100%;background:var(--playpilot-detail-backdrop, rgba(0, 0, 0, .65))}@media (min-width: 600px){.modal.svelte-1riopfw{padding:32px}}.dialog.svelte-1riopfw{position:relative;width:100%;max-width:600px;max-height:80vh;overflow:auto;margin-top:auto;border-radius:var(--playpilot-detail-border-radius, 16px 16px 0 0);background:var(--playpilot-detail-background, var(--playpilot-light))}@media (min-width: 600px){.dialog.svelte-1riopfw{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-1riopfw{position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-1riopfw{--playpilot-button-background: var(--playpilot-modal-close-button-background, var(--playpilot-content));--playpilot-button-shadow: var(--playpilot-modal-close-button-shadow, var(--playpilot-shadow));--playpilot-button-padding: var(--playpilot-modal-close-button-padding, .5rem);--playpilot-button-text-color: var(--playpilot-modal-close-button-text-color, var(--playpilot-text-color-alt));z-index:5;position:absolute;top:16px;right:16px}.close.svelte-1riopfw:hover{filter:brightness(1.1)}svg.svelte-by11ix{transition:transform .1s}.expanded.svelte-by11ix{transform:rotate(180deg)}.switch.svelte-91s87b{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;border:0;padding:0;background:transparent;cursor:pointer}.fullwidth.svelte-91s87b{width:100%;justify-content:space-between}.label.svelte-91s87b{display:flex;align-items:center;gap:8px;margin-right:8px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color-alt);font-size:12px}.switch.svelte-91s87b:hover .label:where(.svelte-91s87b){color:var(--playpilot-text-color)}.track.svelte-91s87b{position:relative;width:32px;height:20px;border-radius:16px;background:var(--playpilot-content);transition:background-color .1s}.active.svelte-91s87b .track:where(.svelte-91s87b){background:var(--playpilot-green)}.knob.svelte-91s87b{position:absolute;top:2px;left:2px;height:16px;width:16px;border-radius:50%;background:#fff;transition:left .1s}.active.svelte-91s87b .knob:where(.svelte-91s87b){left:14px}input.svelte-1vrer3i{width:100%;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}input.svelte-1vrer3i:focus{background:var(--playpilot-lighter);outline:1px solid white}input.svelte-1vrer3i::placeholder{color:var(--playpilot-text-color-alt);opacity:.75}.switches.svelte-14krcvc{display:flex;flex-direction:column;gap:12px}button.svelte-14krcvc{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:32px;padding:8px;background:transparent;font-family:var(--playpilot-font-family);font-size:10.4px;color:var(--playpilot-text-color-alt);cursor:pointer}button.svelte-14krcvc:hover,button.active.svelte-14krcvc{color:var(--playpilot-text-color)}.group.svelte-14krcvc{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:4px;border:0;border-radius:32px;background:var(--playpilot-light);color:var(--playpilot-text-color-alt);font-size:12px;font-family:var(--playpilot-font-family)}.active-marker.svelte-14krcvc{z-index:0;position:absolute;width:calc(50% - 8px);height:calc(100% - 8px);left:4px;top:4px;border-radius:32px;background:var(--playpilot-content);transition:left .1s}.right.svelte-14krcvc{left:calc(50% + 4px)}.label.svelte-14krcvc{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1tq7qhv{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px}button.svelte-1fmy0wh{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-1fmy0wh:hover{cursor:pointer;color:#fff}.context-menu.svelte-1fmy0wh{position:relative}.content.svelte-1fmy0wh{z-index:1;position:absolute;top:100%;right:0;max-height:80px;max-width:160px;border-radius:8px;background:var(--playpilot-lighter)}.item.svelte-1bz02u6{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-1bz02u6:hover,.item.highlighted.svelte-1bz02u6{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-1bz02u6{outline:2px solid var(--playpilot-primary)}.header.svelte-1bz02u6{display:flex;gap:16px;width:100%}.poster.svelte-1bz02u6{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.title.svelte-1bz02u6{font-size:14px;word-break:break-word}.meta.svelte-1bz02u6{display:flex;gap:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.meta.svelte-1bz02u6 span:where(.svelte-1bz02u6){display:flex;align-items:center}.meta.svelte-1bz02u6 svg{display:block;margin:-2px 2px 0 0;height:1em}.content.svelte-1bz02u6{padding-top:16px}.context-menu.svelte-1bz02u6{margin:0 -4px 0 auto}.context-menu-action.svelte-1bz02u6{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:16px;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-1bz02u6:hover{color:var(--playpilot-text-color)}.actions.svelte-1bz02u6{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-1bz02u6{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:50%;background:var(--playpilot-content);color:var(--playpilot-text-color);box-shadow:var(--playpilot-shadow);cursor:pointer}.expand.svelte-1bz02u6:hover{filter:brightness(1.2)}.expanded.svelte-1bz02u6{padding-top:16px}.type-select.svelte-1bz02u6{margin-top:8px}.label.svelte-1bz02u6{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-1bz02u6{margin-top:12px}.drag-handle.svelte-bwc0q8{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-bwc0q8:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-bwc0q8:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-bwc0q8:active{cursor:grabbing}.drag-handle.svelte-bwc0q8:before{display:block;content:"";position:absolute;top:40%;right:0;bottom:40%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.search.svelte-15ml41d{position:relative}.results.svelte-15ml41d{z-index:1;position:absolute;top:calc(100% + 8px);left:0;right:0;height:30vh;max-height:160px;border-radius:8px;background:var(--playpilot-light);scrollbar-width:thin;overflow:auto}.item.svelte-15ml41d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;align-items:flex-start;gap:16px;width:100%;background:transparent;border:0;padding:8px;border-bottom:1px solid var(--playpilot-content);color:var(--playpilot-text-color-alt);font-family:inherit;text-align:left}.item.svelte-15ml41d:hover{background:var(--playpilot-lighter)}.item.svelte-15ml41d:last-child{border-bottom:0}.poster.svelte-15ml41d{width:28px;border-radius:4px;height:auto;background:var(--playpilot-dark)}.name.svelte-15ml41d{color:var(--playpilot-text-color)}.meta.svelte-15ml41d{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-15ml41d{display:flex;align-items:center;gap:4px}.empty.svelte-15ml41d{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-15ml41d:hover{color:vaR(--playpilot-text-color)}h2.svelte-c3phlu{margin:0;font-size:16px;font-weight:400}p.svelte-c3phlu,label.svelte-c3phlu{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-c3phlu{display:block;margin-top:16px}.layout.svelte-c3phlu{height:100%;display:flex;flex-direction:column}.header.svelte-c3phlu{display:flex;align-items:center;gap:8px;margin-bottom:16px}.error.svelte-c3phlu{margin-top:8px}.save.svelte-c3phlu{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;margin-top:auto;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt)}.save.svelte-c3phlu:not([disabled]):hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-c3phlu{cursor:default;opacity:.5}h1.svelte-1xio91e{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.editor.svelte-1xio91e{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:320px;max-height:min(50vh,800px);min-height:400px;padding:16px;border-radius:24px;background:var(--playpilot-dark);box-shadow:var(--playpilot-shadow-large);color:var(--playpilot-text-color);font-family:var(--playpilot-font-family);transition:border-radius .1s;overflow-y:auto;overflow-x:hidden;line-height:normal}.panel-open.svelte-1xio91e{overflow:hidden}.loading.svelte-1xio91e{min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.drag-handle.svelte-1xio91e{opacity:0;transition:opacity .15s}.editor.svelte-1xio91e:hover .drag-handle:where(.svelte-1xio91e){opacity:1}.header.svelte-1xio91e{z-index:5;position:sticky;top:-16px;margin:-16px -16px 0;padding:16px 16px 16px 24px;background:var(--playpilot-dark);display:flex;align-items:center}.loading.svelte-1xio91e .header:where(.svelte-1xio91e){margin:-16px}.bubble.svelte-1xio91e{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:24px;height:24px;border:0;padding:0;margin-right:auto;border-radius:50%;background:var(--playpilot-green);line-height:24px;text-align:center;font-size:13.6px}.items.svelte-1xio91e{padding-top:8px;margin-bottom:auto}.empty.svelte-1xio91e{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-1xio91e{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:sticky;bottom:0;left:0;width:100%;margin-top:16px;padding:8px;border:0;border-radius:32px;background:var(--playpilot-content);box-shadow:0 0 16px 16px var(--playpilot-dark);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color-alt);cursor:pointer}.save.svelte-1xio91e:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-1xio91e{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-1xio91e{margin-top:8px}.panel.svelte-1xio91e{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}:root{--playpilot-primary: #fa548a;--playpilot-dark: #101426;--playpilot-light: #1b2743;--playpilot-lighter: #233257;--playpilot-content: #354367;--playpilot-content-light: #4b5b82;--playpilot-green: #53bca0;--playpilot-font-family: "Poppins", sans-serif;--playpilot-text-color: #fff;--playpilot-text-color-alt: #c8d4de;--playpilot-shadow: 3.2px 2.4px 2.4px rgba(0, 0, 0, .2);--playpilot-shadow-large: 2.4px 2.4px 3.2px rgba(0, 0, 0, .05), 3.2px 5.6px 5.6px rgba(0, 0, 0, .1), 1.6px 1.6px 12px rgba(0, 0, 0, .25);--playpilot-error: #ea5a5a;--playpilot-error-dark: #442533}[data-playpilot-injection-key]{position:relative}[data-playpilot-injection-key].injection-highlight{outline:4px solid var(--playpilot-primary)!important;outline-offset:8px!important;border-radius:.8px;scroll-margin:80px}.playpilot-styled-scrollbar{scrollbar-color:var(--playpilot-content-light) var(--playpilot-lighter);scrollbar-width:thin}.playpilot-styled-scrollbed::-webkit-scrollbar{width:12px}.playpilot-styled-scrollbed::-webkit-scrollbar-track{background:var(--playpilot-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb{border:2px solid var(--playpilot-light);border-radius:16px;background:var(--playpilot-lighter)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:hover{background:var(--playpilot-content-light)}.playpilot-styled-scrollbed::-webkit-scrollbar-thumb:active{background:var(--playpilot-text-color-alt)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight]{font-weight:var(--playpilot-injection-font-weight)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color]{color:var(--playpilot-injection-text-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-color-hover]:hover{color:var(--playpilot-injection-text-color-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration]{text-decoration:var(--playpilot-injection-text-decoration)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-text-decoration-hover]:hover{text-decoration:var(--playpilot-injection-text-decoration-hover)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color]{background-color:var(--playpilot-injection-background-color)}[data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-background-color-hover]:hover{background-color:var(--playpilot-injection-background-color-hover)}.playpilot-link-injections.svelte-1ogu7vd *{box-sizing:border-box}.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections button,.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections input{transition:outline-offset .1s}.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections button:focus-visible,.playpilot-link-injections.svelte-1ogu7vd .playpilot-link-injections input:focus-visible{outline:2px solid white;outline-offset:2px}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const Kt=!1;var rn=Array.isArray,Fr=Array.prototype.indexOf,an=Array.from,Dr=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Br=Object.getOwnPropertyDescriptors,Vr=Object.prototype,zr=Array.prototype,Bn=Object.getPrototypeOf;function $r(e){return typeof e=="function"}const He=()=>{};function Ur(e){for(var t=0;t<e.length;t++)e[t]()}const ye=2,Vn=4,ht=8,Mt=16,we=32,mt=64,Yt=128,Ue=256,Et=512,me=1024,je=2048,Nt=4096,ke=8192,et=16384,zn=32768,tt=65536,Wr=1<<17,Kr=1<<19,$n=1<<20,lt=Symbol("$state"),Yr=Symbol("legacy props"),Gr=Symbol("");function Un(e){return e===this.v}function Zr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function on(e){return!Zr(e,this.v)}function Jr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Qr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ei(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ti(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ni(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ri(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ii(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function ai(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let nt=!1,oi=!1;function li(){nt=!0}const ln=1,sn=2,Wn=4,si=8,ci=16,ui=1,di=2,fi=4,vi=8,_i=16,hi=1,mi=2,gi=4,pi=1,yi=2,de=Symbol(),Kn="http://www.w3.org/2000/svg";function _e(e,t){var n={f:0,v:e,reactions:null,equals:Un,rv:0,wv:0};return n}function $(e){return wi(_e(e))}function Yn(e,t=!1){var r;const n=_e(e);return t||(n.equals=on),nt&&U!==null&&U.l!==null&&((r=U.l).s??(r.s=[])).push(n),n}function wi(e){return B!==null&&B.f&ye&&(be===null?Ni([e]):be.push(e)),e}function L(e,t){return B!==null&&qt()&&B.f&(ye|Mt)&&(be===null||!be.includes(e))&&ai(),Gt(e,t)}function Gt(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=fr(),Gn(e,je),qt()&&N!==null&&N.f&me&&!(N.f&we)&&(se!==null&&se.includes(e)?(Te(N,je),Dt(N)):Ne===null?ji([e]):Ne.push(e))),t}function Gn(e,t){var n=e.reactions;if(n!==null)for(var r=qt(),i=n.length,a=0;a<i;a++){var o=n[a],d=o.f;d&je||!r&&o===N||(Te(o,t),d&(me|Ue)&&(d&ye?Gn(o,Nt):Dt(o)))}}let ki=!1;function Y(e,t=null,n){if(typeof e!="object"||e===null||lt in e)return e;const r=Bn(e);if(r!==Vr&&r!==zr)return e;var i=new Map,a=rn(e),o=_e(0);a&&i.set("length",_e(e.length));var d;return new Proxy(e,{defineProperty(s,f,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&ni();var u=i.get(f);return u===void 0?(u=_e(l.value),i.set(f,u)):L(u,Y(l.value,d)),!0},deleteProperty(s,f){var l=i.get(f);if(l===void 0)f in s&&i.set(f,_e(de));else{if(a&&typeof f=="string"){var u=i.get("length"),c=Number(f);Number.isInteger(c)&&c<u.v&&L(u,c)}L(l,de),En(o)}return!0},get(s,f,l){var g;if(f===lt)return e;var u=i.get(f),c=f in s;if(u===void 0&&(!c||(g=Ye(s,f))!=null&&g.writable)&&(u=_e(Y(c?s[f]:de,d)),i.set(f,u)),u!==void 0){var h=_(u);return h===de?void 0:h}return Reflect.get(s,f,l)},getOwnPropertyDescriptor(s,f){var l=Reflect.getOwnPropertyDescriptor(s,f);if(l&&"value"in l){var u=i.get(f);u&&(l.value=_(u))}else if(l===void 0){var c=i.get(f),h=c==null?void 0:c.v;if(c!==void 0&&h!==de)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(s,f){var h;if(f===lt)return!0;var l=i.get(f),u=l!==void 0&&l.v!==de||Reflect.has(s,f);if(l!==void 0||N!==null&&(!u||(h=Ye(s,f))!=null&&h.writable)){l===void 0&&(l=_e(u?Y(s[f],d):de),i.set(f,l));var c=_(l);if(c===de)return!1}return u},set(s,f,l,u){var p;var c=i.get(f),h=f in s;if(a&&f==="length")for(var g=l;g<c.v;g+=1){var v=i.get(g+"");v!==void 0?L(v,de):g in s&&(v=_e(de),i.set(g+"",v))}c===void 0?(!h||(p=Ye(s,f))!=null&&p.writable)&&(c=_e(void 0),L(c,Y(l,d)),i.set(f,c)):(h=c.v!==de,L(c,Y(l,d)));var y=Reflect.getOwnPropertyDescriptor(s,f);if(y!=null&&y.set&&y.set.call(u,l),!h){if(a&&typeof f=="string"){var k=i.get("length"),w=Number(f);Number.isInteger(w)&&w>=k.v&&L(k,w+1)}En(o)}return!0},ownKeys(s){_(o);var f=Reflect.ownKeys(s).filter(c=>{var h=i.get(c);return h===void 0||h.v!==de});for(var[l,u]of i)u.v!==de&&!(l in s)&&f.push(l);return f},setPrototypeOf(){ri()}})}function En(e,t=1){L(e,e.v+t)}var pe,Zn,Jn;function bi(){if(pe===void 0){pe=window;var e=Element.prototype,t=Node.prototype;Zn=Ye(t,"firstChild").get,Jn=Ye(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function gt(e=""){return document.createTextNode(e)}function Je(e){return Zn.call(e)}function jt(e){return Jn.call(e)}function b(e,t){return Je(e)}function ne(e,t){{var n=Je(e);return n instanceof Comment&&n.data===""?jt(n):n}}function T(e,t=1,n=!1){let r=e;for(;t--;)r=jt(r);return r}function Si(e){e.textContent=""}function X(e){var t=ye|je;N===null?t|=Ue:N.f|=$n;var n=B!==null&&B.f&ye?B:null;const r={children:null,ctx:U,deps:null,equals:Un,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??N};return n!==null&&(n.children??(n.children=[])).push(r),r}function xi(e){const t=X(e);return t.equals=on,t}function Xn(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&ye?cn(r):xe(r)}}}function Ei(e){for(var t=e.parent;t!==null;){if(!(t.f&ye))return t;t=t.parent}return null}function Qn(e){var t,n=N;ge(Ei(e));try{Xn(e),t=vr(e)}finally{ge(n)}return t}function er(e){var t=Qn(e),n=(De||e.f&Ue)&&e.deps!==null?Nt:me;Te(e,n),e.equals(t)||(e.v=t,e.wv=fr())}function cn(e){Xn(e),ft(e,0),Te(e,et),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ti(e){N===null&&B===null&&Qr(),B!==null&&B.f&Ue&&Xr(),dn&&Jr()}function Ci(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function rt(e,t,n,r=!0){var i=(e&mt)!==0,a=N,o={ctx:U,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|je,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var d=Ge;try{Tn(!0),Ft(o),o.f|=zn}catch(l){throw xe(o),l}finally{Tn(d)}}else t!==null&&Dt(o);var s=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&$n)===0;if(!s&&!i&&r&&(a!==null&&Ci(o,a),B!==null&&B.f&ye)){var f=B;(f.children??(f.children=[])).push(o)}return o}function Ai(e){const t=rt(ht,null,!1);return Te(t,me),t.teardown=e,t}function Ot(e){Ti();var t=N!==null&&(N.f&we)!==0&&U!==null&&!U.m;if(t){var n=U;(n.e??(n.e=[])).push({fn:e,effect:N,reaction:B})}else{var r=Rt(e);return r}}function Pi(e){const t=rt(mt,e,!0);return(n={})=>new Promise(r=>{n.outro?st(t,()=>{xe(t),r(void 0)}):(xe(t),r(void 0))})}function Rt(e){return rt(Vn,e,!1)}function tr(e){return rt(ht,e,!0)}function M(e){return pt(e)}function pt(e,t=0){return rt(ht|Mt|t,e,!0)}function Ve(e,t=!0){return rt(ht|we,e,!0,t)}function nr(e){var t=e.teardown;if(t!==null){const n=dn,r=B;Cn(!0),Ee(null);try{t.call(null)}finally{Cn(n),Ee(r)}}}function rr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)cn(t[n])}}function ir(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;xe(n,t),n=r}}function Ii(e){for(var t=e.first;t!==null;){var n=t.next;t.f&we||xe(t),t=n}}function xe(e,t=!0){var n=!1;if((t||e.f&Kr)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:jt(r);r.remove(),r=a}n=!0}ir(e,t&&!n),rr(e),ft(e,0),Te(e,et);var o=e.transitions;if(o!==null)for(const s of o)s.stop();nr(e);var d=e.parent;d!==null&&d.first!==null&&ar(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function ar(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function st(e,t){var n=[];un(e,n,!0),or(n,()=>{xe(e),t&&t()})}function or(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function un(e,t,n){if(!(e.f&ke)){if(e.f^=ke,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&tt)!==0||(r.f&we)!==0;un(r,t,a?n:!1),r=i}}}function ct(e){lr(e,!0)}function lr(e,t){if(e.f&ke){wt(e)&&Ft(e),e.f^=ke;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&tt)!==0||(n.f&we)!==0;lr(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Tt=!1,Zt=[];function sr(){Tt=!1;const e=Zt.slice();Zt=[],Ur(e)}function yt(e){Tt||(Tt=!0,queueMicrotask(sr)),Zt.push(e)}function Li(){Tt&&sr()}function cr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const ur=0,Mi=1;let St=!1,xt=ur,ut=!1,dt=null,Ge=!1,dn=!1;function Tn(e){Ge=e}function Cn(e){dn=e}let Fe=[],Ze=0;let B=null;function Ee(e){B=e}let N=null;function ge(e){N=e}let be=null;function Ni(e){be=e}let se=null,ve=0,Ne=null;function ji(e){Ne=e}let dr=1,Jt=0,De=!1,U=null;function fr(){return++dr}function qt(){return!nt||U!==null&&U.l===null}function wt(e){var f;var t=e.f;if(t&je)return!0;if(t&Nt){var n=e.deps,r=(t&Ue)!==0;if(n!==null){var i,a,o=(t&Et)!==0,d=r&&N!==null&&!De,s=n.length;if(o||d){for(i=0;i<s;i++)a=n[i],(o||!((f=a==null?void 0:a.reactions)!=null&&f.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Et)}for(i=0;i<s;i++)if(a=n[i],wt(a)&&er(a),a.wv>e.wv)return!0}(!r||N!==null&&!De)&&Te(e,me)}return!1}function Oi(e,t){for(var n=t;n!==null;){if(n.f&Yt)try{n.fn(e);return}catch{n.f^=Yt}n=n.parent}throw St=!1,e}function Ri(e){return(e.f&et)===0&&(e.parent===null||(e.parent.f&Yt)===0)}function Ht(e,t,n,r){if(St){if(n===null&&(St=!1),Ri(t))throw e;return}n!==null&&(St=!0);{Oi(e,t);return}}function vr(e){var c;var t=se,n=ve,r=Ne,i=B,a=De,o=be,d=U,s=e.f;se=null,ve=0,Ne=null,B=s&(we|mt)?null:e,De=!Ge&&(s&Ue)!==0,be=null,U=e.ctx,Jt++;try{var f=(0,e.fn)(),l=e.deps;if(se!==null){var u;if(ft(e,ve),l!==null&&ve>0)for(l.length=ve+se.length,u=0;u<se.length;u++)l[ve+u]=se[u];else e.deps=l=se;if(!De)for(u=ve;u<l.length;u++)((c=l[u]).reactions??(c.reactions=[])).push(e)}else l!==null&&ve<l.length&&(ft(e,ve),l.length=ve);return f}finally{se=t,ve=n,Ne=r,B=i,De=a,be=o,U=d}}function qi(e,t){let n=t.reactions;if(n!==null){var r=Fr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&ye&&(se===null||!se.includes(t))&&(Te(t,Nt),t.f&(Ue|Et)||(t.f^=Et),ft(t,0))}function ft(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)qi(e,n[r])}function Ft(e){var t=e.f;if(!(t&et)){Te(e,me);var n=N,r=U;N=e;try{t&Mt?Ii(e):ir(e),rr(e),nr(e);var i=vr(e);e.teardown=typeof i=="function"?i:null,e.wv=dr;var a=e.deps,o;Kt&&oi&&e.f&je}catch(d){Ht(d,e,n,r||e.ctx)}finally{N=n}}}function _r(){if(Ze>1e3){Ze=0;try{ei()}catch(e){if(dt!==null)Ht(e,dt,null);else throw e}}Ze++}function hr(e){var t=e.length;if(t!==0){_r();var n=Ge;Ge=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&me||(i.f^=me);var a=[];mr(i,a),Hi(a)}}finally{Ge=n}}}function Hi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(et|ke)))try{wt(r)&&(Ft(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?ar(r):r.fn=null))}catch(i){Ht(i,r,null,r.ctx)}}}function Fi(){if(ut=!1,Ze>1001)return;const e=Fe;Fe=[],hr(e),ut||(Ze=0,dt=null)}function Dt(e){xt===ur&&(ut||(ut=!0,queueMicrotask(Fi))),dt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(mt|we)){if(!(n&me))return;t.f^=me}}Fe.push(t)}function mr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&we)!==0,o=a&&(i&me)!==0,d=n.next;if(!o&&!(i&ke))if(i&ht){if(a)n.f^=me;else try{wt(n)&&Ft(n)}catch(u){Ht(u,n,null,n.ctx)}var s=n.first;if(s!==null){n=s;continue}}else i&Vn&&r.push(n);if(d===null){let u=n.parent;for(;u!==null;){if(e===u)break e;var f=u.next;if(f!==null){n=f;continue e}u=u.parent}}n=d}for(var l=0;l<r.length;l++)s=r[l],t.push(s),mr(s,t)}function gr(e){var t=xt,n=Fe;try{_r();const i=[];xt=Mi,Fe=i,ut=!1,hr(n);var r=e==null?void 0:e();return Li(),(Fe.length>0||i.length>0)&&gr(),Ze=0,dt=null,r}finally{xt=t,Fe=n}}async function An(){await Promise.resolve(),gr()}function _(e){var l;var t=e.f,n=(t&ye)!==0;if(n&&t&et){var r=Qn(e);return cn(e),r}if(B!==null){be!==null&&be.includes(e)&&ii();var i=B.deps;e.rv<Jt&&(e.rv=Jt,se===null&&i!==null&&i[ve]===e?ve++:se===null?se=[e]:se.push(e),Ne!==null&&N!==null&&N.f&me&&!(N.f&we)&&Ne.includes(e)&&(Te(N,je),Dt(N)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,d=a;o!==null;)if(o.f&ye){var s=o;d=s,o=s.parent}else{var f=o;(l=f.deriveds)!=null&&l.includes(d)||(f.deriveds??(f.deriveds=[])).push(d);break}return n&&(a=e,wt(a)&&er(a)),e.v}function ze(e){const t=B;try{return B=null,e()}finally{B=t}}const Di=-7169;function Te(e,t){e.f=e.f&Di|t}function Bi(e){return yr().get(e)}function pr(e,t){return yr().set(e,t),t}function yr(e){return U===null&&cr(),U.c??(U.c=new Map(Vi(U)||void 0))}function Vi(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){U={p:U,c:null,e:null,m:!1,s:e,x:null,l:null},nt&&!t&&(U.l={s:null,u:null,r1:[],r2:_e(!1)})}function ie(e){const t=U;if(t!==null){const o=t.e;if(o!==null){var n=N,r=B;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];ge(a.effect),Ee(a.reaction),Rt(a.fn)}}finally{ge(n),Ee(r)}}U=t.p,t.m=!0}return{}}function zi(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const $i=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ui(e){return $i.includes(e)}const Wi={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Ki(e){return e=e.toLowerCase(),Wi[e]??e}const Yi=["touchstart","touchmove"];function Gi(e){return Yi.includes(e)}function Zi(e,t){if(t){const n=document.body;e.autofocus=!0,yt(()=>{document.activeElement===n&&e.focus()})}}let Pn=!1;function Ji(){Pn||(Pn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function wr(e){var t=B,n=N;Ee(null),ge(null);try{return e()}finally{Ee(t),ge(n)}}function Xi(e,t,n,r=n){e.addEventListener(t,()=>wr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ji()}const kr=new Set,Xt=new Set;function br(e,t,n,r){function i(a){if(r.capture||ot.call(t,a),!a.cancelBubble)return wr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?yt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function he(e,t,n,r,i){var a={capture:r,passive:i},o=br(e,t,n,a);(t===document.body||t===window||t===document)&&Ai(()=>{t.removeEventListener(e,o,a)})}function ue(e){for(var t=0;t<e.length;t++)kr.add(e[t]);for(var n of Xt)n(e)}function ot(e){var w;var t=this,n=t.ownerDocument,r=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],a=i[0]||e.target,o=0,d=e.__root;if(d){var s=i.indexOf(d);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;s<=f&&(o=s)}if(a=i[o]||e.target,a!==t){Dr(e,"currentTarget",{configurable:!0,get(){return a||n}});var l=B,u=N;Ee(null),ge(null);try{for(var c,h=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+r];if(v!==void 0&&!a.disabled)if(rn(v)){var[y,...k]=v;y.apply(a,[e,...k])}else v.call(a,e)}catch(p){c?h.push(p):c=p}if(e.cancelBubble||g===t||g===null)break;a=g}if(c){for(let p of h)queueMicrotask(()=>{throw p});throw c}}finally{e.__root=t,delete e.currentTarget,Ee(l),ge(u)}}}function Sr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Xe(e,t){var n=N;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&pi)!==0,r=(t&yi)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Sr(a?e:"<!>"+e),n||(i=Je(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var d=Je(o),s=o.lastChild;Xe(d,s)}else Xe(o,o);return o}}function Ce(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=Sr(i),d=Je(o);a=Je(d)}var s=a.cloneNode(!0);return Xe(s,s),s}}function Oe(e=""){{var t=gt(e+"");return Xe(t,t),t}}function Qe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=gt();return e.append(t,n),Xe(t,n),e}function S(e,t){e!==null&&e.before(t)}let Ct=!0;function In(e){Ct=e}function D(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function fn(e,t){return Qi(e,t)}const Ke=new Map;function Qi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){bi();var d=new Set,s=u=>{for(var c=0;c<u.length;c++){var h=u[c];if(!d.has(h)){d.add(h);var g=Gi(h);t.addEventListener(h,ot,{passive:g});var v=Ke.get(h);v===void 0?(document.addEventListener(h,ot,{passive:g}),Ke.set(h,1)):Ke.set(h,v+1)}}};s(an(kr)),Xt.add(s);var f=void 0,l=Pi(()=>{var u=n??t.appendChild(gt());return Ve(()=>{if(a){re({});var c=U;c.c=a}i&&(r.$$events=i),Ct=o,f=e(u,r)||{},Ct=!0,a&&ie()}),()=>{var g;for(var c of d){t.removeEventListener(c,ot);var h=Ke.get(c);--h===0?(document.removeEventListener(c,ot),Ke.delete(c)):Ke.set(c,h)}Xt.delete(s),u!==n&&((g=u.parentNode)==null||g.removeChild(u))}});return Qt.set(f,l),f}let Qt=new WeakMap;function xr(e,t){const n=Qt.get(e);return n?(Qt.delete(e),n(t)):Promise.resolve()}function q(e,t,n=!1){var r=e,i=null,a=null,o=de,d=n?tt:0,s=!1;const f=(u,c=!0)=>{s=!0,l(c,u)},l=(u,c)=>{o!==(o=u)&&(o?(i?ct(i):c&&(i=Ve(()=>c(r))),a&&st(a,()=>{a=null})):(a?ct(a):c&&(a=Ve(()=>c(r))),i&&st(i,()=>{i=null})))};pt(()=>{s=!1,t(f),s||l(null,null)},d)}let Be=null;function Ln(e){Be=e}function vt(e,t){return t}function ea(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)un(t[o].e,i,!0);var d=a>0&&i.length===0&&n!==null;if(d){var s=n.parentNode;Si(s),s.append(n),r.clear(),Me(e,t[0].prev,t[a-1].next)}or(i,()=>{for(var f=0;f<a;f++){var l=t[f];d||(r.delete(l.k),Me(e,l.prev,l.next)),xe(l.e,!d)}})}function $e(e,t,n,r,i,a=null){var o=e,d={flags:t,items:new Map,first:null},s=(t&Wn)!==0;if(s){var f=e;o=f.appendChild(gt())}var l=null,u=!1;pt(()=>{var c=n(),h=rn(c)?c:c==null?[]:an(c),g=h.length;if(!(u&&g===0)){u=g===0;{var v=B;ta(h,d,o,i,t,(v.f&ke)!==0,r)}a!==null&&(g===0?l?ct(l):l=Ve(()=>a(o)):l!==null&&st(l,()=>{l=null})),n()}})}function ta(e,t,n,r,i,a,o,d){var O,V,Q,ae;var s=(i&si)!==0,f=(i&(ln|sn))!==0,l=e.length,u=t.items,c=t.first,h=c,g,v=null,y,k=[],w=[],p,E,x,C;if(s)for(C=0;C<l;C+=1)p=e[C],E=o(p,C),x=u.get(E),x!==void 0&&((O=x.a)==null||O.measure(),(y??(y=new Set)).add(x));for(C=0;C<l;C+=1){if(p=e[C],E=o(p,C),x=u.get(E),x===void 0){var R=h?h.e.nodes_start:n;v=ra(R,t,v,v===null?t.first:v.next,p,E,C,r,i),u.set(E,v),k=[],w=[],h=v.next;continue}if(f&&na(x,p,C,i),x.e.f&ke&&(ct(x.e),s&&((V=x.a)==null||V.unfix(),(y??(y=new Set)).delete(x))),x!==h){if(g!==void 0&&g.has(x)){if(k.length<w.length){var P=w[0],H;v=P.prev;var W=k[0],ee=k[k.length-1];for(H=0;H<k.length;H+=1)Mn(k[H],P,n);for(H=0;H<w.length;H+=1)g.delete(w[H]);Me(t,W.prev,ee.next),Me(t,v,W),Me(t,ee,P),h=P,v=ee,C-=1,k=[],w=[]}else g.delete(x),Mn(x,h,n),Me(t,x.prev,x.next),Me(t,x,v===null?t.first:v.next),Me(t,v,x),v=x;continue}for(k=[],w=[];h!==null&&h.k!==E;)(a||!(h.e.f&ke))&&(g??(g=new Set)).add(h),w.push(h),h=h.next;if(h===null)continue;x=h}k.push(x),v=x,h=x.next}if(h!==null||g!==void 0){for(var F=g===void 0?[]:an(g);h!==null;)(a||!(h.e.f&ke))&&F.push(h),h=h.next;var G=F.length;if(G>0){var I=i&Wn&&l===0?n:null;if(s){for(C=0;C<G;C+=1)(Q=F[C].a)==null||Q.measure();for(C=0;C<G;C+=1)(ae=F[C].a)==null||ae.fix()}ea(t,F,I,u)}}s&&yt(()=>{var le;if(y!==void 0)for(x of y)(le=x.a)==null||le.apply()}),N.first=t.first&&t.first.e,N.last=v&&v.e}function na(e,t,n,r){r&ln&&Gt(e.v,t),r&sn?Gt(e.i,n):e.i=n}function ra(e,t,n,r,i,a,o,d,s,f){var l=Be,u=(s&ln)!==0,c=(s&ci)===0,h=u?c?Yn(i):_e(i):i,g=s&sn?_e(o):o,v={i:g,v:h,k:a,a:null,e:null,prev:n,next:r};Be=v;try{return v.e=Ve(()=>d(e,h,g),ki),v.e.prev=n&&n.e,v.e.next=r&&r.e,n===null?t.first=v:(n.next=v,n.e.next=v.e),r!==null&&(r.prev=v,r.e.prev=v.e),v}finally{Be=l}}function Mn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var o=jt(a);i.before(a),a=o}}function Me(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function it(e,t,...n){var r=e,i=He,a;pt(()=>{i!==(i=t())&&(a&&(xe(a),a=null),a=Ve(()=>i(r,...n)))},tt)}function ia(e,t,n,r,i,a){var o,d,s=null,f=e,l,u=Be;pt(()=>{const c=t()||null;var h=c==="svg"?Kn:null;if(c!==o){var g=Be;Ln(u),l&&(c===null?st(l,()=>{l=null,d=null}):c===d?ct(l):(xe(l),In(!1))),c&&c!==d&&(l=Ve(()=>{s=h?document.createElementNS(h,c):document.createElement(c),Xe(s,s);{var v=s.appendChild(gt());r(s,v)}N.nodes_end=s,f.before(s)})),o=c,o&&(d=o),In(!0),Ln(g)}},tt)}function Er(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Er(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function aa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Er(e))&&(r&&(r+=" "),r+=t);return r}function oa(e){return typeof e=="object"?aa(e):e??""}function la(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Z(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Gr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Tr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function sa(e,t,n,r,i=!1,a=!1,o=!1){var d=t||{},s=e.tagName==="OPTION";for(var f in t)f in n||(n[f]=null);n.class&&(n.class=oa(n.class)),n.class=n.class?n.class+" "+r:r;var l=Tr(e),u=e.__attributes??(e.__attributes={});for(const w in n){let p=n[w];if(s&&w==="value"&&p==null){e.value=e.__value="",d[w]=p;continue}var c=d[w];if(p!==c){d[w]=p;var h=w[0]+w[1];if(h!=="$$"){if(h==="on"){const E={},x="$$"+w;let C=w.slice(2);var g=Ui(C);if(zi(C)&&(C=C.slice(0,-7),E.capture=!0),!g&&c){if(p!=null)continue;e.removeEventListener(C,d[x],E),d[x]=null}if(p!=null)if(g)e[`__${C}`]=p,ue([C]);else{let R=function(P){d[w].call(this,P)};var k=R;d[x]=br(C,e,R,E)}else g&&(e[`__${C}`]=void 0)}else if(w==="style"&&p!=null)e.style.cssText=p+"";else if(w==="autofocus")Zi(e,!!p);else if(w==="__value"||w==="value"&&p!=null)e.value=e[w]=e.__value=p;else if(w==="selected"&&s)la(e,p);else{var v=w;i||(v=Ki(v));var y=v==="defaultValue"||v==="defaultChecked";if(p==null&&!a&&!y)if(u[w]=null,v==="value"||v==="checked"){let E=e;if(v==="value"){let x=E.defaultValue;E.removeAttribute(v),E.defaultValue=x}else{let x=E.defaultChecked;E.removeAttribute(v),E.defaultChecked=x}}else e.removeAttribute(w);else y||l.includes(v)&&(a||typeof p!="string")?e[v]=p:typeof p!="function"&&Z(e,v,p)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return d}var Nn=new Map;function Tr(e){var t=Nn.get(e.nodeName);if(t)return t;Nn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=Br(r);for(var a in n)n[a].set&&t.push(a);r=Bn(r)}return t}function fe(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function vn(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const ca=()=>performance.now(),Ae={tick:e=>requestAnimationFrame(e),now:()=>ca(),tasks:new Set};function Cr(){const e=Ae.now();Ae.tasks.forEach(t=>{t.c(e)||(Ae.tasks.delete(t),t.f())}),Ae.tasks.size!==0&&Ae.tick(Cr)}function ua(e){let t;return Ae.tasks.size===0&&Ae.tick(Cr),{promise:new Promise(n=>{Ae.tasks.add(t={c:e,f:n})}),abort(){Ae.tasks.delete(t)}}}function kt(e,t){e.dispatchEvent(new CustomEvent(t))}function da(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function jn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=da(i.trim());t[o]=a.trim()}return t}const fa=e=>e;function va(e,t,n){var r=Be,i,a,o,d=null;r.a??(r.a={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){const s=t()(this.element,{from:i,to:a},n==null?void 0:n());o=At(this.element,s,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:s,width:f,height:l}=getComputedStyle(e);if(s!=="absolute"&&s!=="fixed"){var u=e.style;d={position:u.position,width:u.width,height:u.height,transform:u.transform},u.position="absolute",u.width=f,u.height=l;var c=e.getBoundingClientRect();if(i.left!==c.left||i.top!==c.top){var h=`translate(${i.left-c.left}px, ${i.top-c.top}px)`;u.transform=u.transform?`${u.transform} ${h}`:h}}}},unfix(){if(d){var s=e.style;s.position=d.position,s.width=d.width,s.height=d.height,s.transform=d.transform}}}),r.a.element=e}function Se(e,t,n,r){var i=(e&hi)!==0,a=(e&mi)!==0,o=i&&a,d=(e&gi)!==0,s=o?"both":i?"in":"out",f,l=t.inert,u,c;function h(){var w=B,p=N;Ee(null),ge(null);try{return f??(f=n()(t,(r==null?void 0:r())??{},{direction:s}))}finally{Ee(w),ge(p)}}var g={is_global:d,in(){var w;if(t.inert=l,!i){c==null||c.abort(),(w=c==null?void 0:c.reset)==null||w.call(c);return}a||u==null||u.abort(),kt(t,"introstart"),u=At(t,h(),c,1,()=>{kt(t,"introend"),u==null||u.abort(),u=f=void 0})},out(w){if(!a){w==null||w(),f=void 0;return}t.inert=!0,kt(t,"outrostart"),c=At(t,h(),u,0,()=>{kt(t,"outroend"),w==null||w()})},stop:()=>{u==null||u.abort(),c==null||c.abort()}},v=N;if((v.transitions??(v.transitions=[])).push(g),i&&Ct){var y=d;if(!y){for(var k=v.parent;k&&k.f&tt;)for(;(k=k.parent)&&!(k.f&Mt););y=!k||(k.f&zn)!==0}y&&Rt(()=>{ze(()=>g.in())})}}function At(e,t,n,r,i){var a=r===1;if($r(t)){var o,d=!1;return yt(()=>{if(!d){var y=t({direction:a?"in":"out"});o=At(e,y,n,r,i)}}),{abort:()=>{d=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:He,deactivate:He,reset:He,t:()=>r};const{delay:s=0,css:f,tick:l,easing:u=fa}=t;var c=[];if(a&&n===void 0&&(l&&l(0,1),f)){var h=jn(f(0,1));c.push(h,h)}var g=()=>1-r,v=e.animate(c,{duration:s});return v.onfinish=()=>{var y=(n==null?void 0:n.t())??1-r;n==null||n.abort();var k=r-y,w=t.duration*Math.abs(k),p=[];if(w>0){if(f)for(var E=Math.ceil(w/16.666666666666668),x=0;x<=E;x+=1){var C=y+k*u(x/E),R=f(C,1-C);p.push(jn(R))}g=()=>{var P=v.currentTime;return y+k*u(P/w)},l&&ua(()=>{if(v.playState!=="running")return!1;var P=g();return l(P,1-P),!0})}v=e.animate(p,{duration:w,fill:"forwards"}),v.onfinish=()=>{g=()=>r,l==null||l(r,1-r),i()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=He)},deactivate:()=>{i=He},reset:()=>{r===0&&(l==null||l(1,0))},t:()=>g()}}function _a(e,t,n=t){var r=qt();Xi(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=$t(e)?Ut(a):a,n(a),r&&a!==(a=t())){var o=e.selectionStart,d=e.selectionEnd;e.value=a??"",d!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(d,e.value.length))}}),ze(t)==null&&e.value&&n($t(e)?Ut(e.value):e.value),tr(()=>{var i=t();$t(e)&&i===Ut(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function $t(e){var t=e.type;return t==="number"||t==="range"}function Ut(e){return e===""?null:+e}function On(e,t){return e===t||(e==null?void 0:e[lt])===t}function Bt(e={},t,n,r){return Rt(()=>{var i,a;return tr(()=>{i=a,a=[],ze(()=>{e!==n(...a)&&(t(e,...a),i&&On(n(...i),e)&&t(null,...i))})}),()=>{yt(()=>{a&&On(n(...a),e)&&t(null,...a)})}}),e}let bt=!1;function ha(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}const ma={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function ga(e,t,n){return new Proxy({props:e,exclude:t},ma)}function Rn(e){for(var t=N,n=N;t!==null&&!(t.f&(we|mt));)t=t.parent;try{return ge(t),e()}finally{ge(n)}}function j(e,t,n,r){var R;var i=(n&ui)!==0,a=!nt||(n&di)!==0,o=(n&vi)!==0,d=(n&_i)!==0,s=!1,f;o?[f,s]=ha(()=>e[t]):f=e[t];var l=lt in e||Yr in e,u=o&&(((R=Ye(e,t))==null?void 0:R.set)??(l&&t in e&&(P=>e[t]=P)))||void 0,c=r,h=!0,g=!1,v=()=>(g=!0,h&&(h=!1,d?c=ze(r):c=r),c);f===void 0&&r!==void 0&&(u&&a&&ti(),f=v(),u&&u(f));var y;if(a)y=()=>{var P=e[t];return P===void 0?v():(h=!0,g=!1,P)};else{var k=Rn(()=>(i?X:xi)(()=>e[t]));k.f|=Wr,y=()=>{var P=_(k);return P!==void 0&&(c=void 0),P===void 0?c:P}}if(!(n&fi))return y;if(u){var w=e.$$legacy;return function(P,H){return arguments.length>0?((!a||!H||w||s)&&u(H?y():P),P):y()}}var p=!1,E=!1,x=Yn(f),C=Rn(()=>X(()=>{var P=y(),H=_(x);return p?(p=!1,E=!0,H):(E=!1,x.v=P)}));return i||(C.equals=on),function(P,H){if(arguments.length>0){const W=H?_(C):a&&o?Y(P):P;return C.equals(W)||(p=!0,L(x,W),g&&c!==void 0&&(c=W),ze(()=>_(C))),P}return _(C)}}function at(e){U===null&&cr(),nt&&U.l!==null?pa(U).m.push(e):Ot(()=>{const t=ze(e);if(typeof t=="function")return t})}function pa(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const ya="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ya);const Ar="https://www.playpilot.com",_n="https://partner-api.playpilot.tech/1.0.0",Pr="EncryptedToken",wa="articleReplacementEditToken";async function Ir(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=kn();if(!n)throw new Error("No token was provided");const r=Lr(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(_n+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return ka(r),!0}catch(n){console.error(n)}return!1}function Lr(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(wa);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Pr}=`).pop())==null?void 0:i.split(";")[0])||""}function ka(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Pr+"="+e+";"+r+";path=/"}function hn(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Mr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const Pe=Object.freeze({ArticlePageView:"ali_article_page_view",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed"}),ba="https://insights.playpilot.net";async function Re(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(ba,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const Sa=e=>e;function mn(e){const t=e-1;return t*t*t+1}function qn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function xa(e,{delay:t=0,duration:n=400,easing:r=Sa}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function _t(e,{delay:t=0,duration:n=400,easing:r=mn,x:i=0,y:a=0,opacity:o=0}={}){const d=getComputedStyle(e),s=+d.opacity,f=d.transform==="none"?"":d.transform,l=s*(1-o),[u,c]=qn(i),[h,g]=qn(a);return{delay:t,duration:n,easing:r,css:(v,y)=>`
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const Kt=!1;var rn=Array.isArray,Fr=Array.prototype.indexOf,an=Array.from,Dr=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Br=Object.getOwnPropertyDescriptors,Vr=Object.prototype,zr=Array.prototype,Dn=Object.getPrototypeOf;function $r(e){return typeof e=="function"}const He=()=>{};function Ur(e){for(var t=0;t<e.length;t++)e[t]()}const ye=2,Bn=4,ht=8,Mt=16,we=32,mt=64,Yt=128,Ue=256,Et=512,me=1024,je=2048,Nt=4096,ke=8192,et=16384,Vn=32768,tt=65536,Wr=1<<17,Kr=1<<19,zn=1<<20,lt=Symbol("$state"),Yr=Symbol("legacy props"),Gr=Symbol("");function $n(e){return e===this.v}function Zr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function on(e){return!Zr(e,this.v)}function Jr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Qr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ei(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ti(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ni(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ri(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ii(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function ai(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let nt=!1,oi=!1;function li(){nt=!0}const ln=1,sn=2,Un=4,si=8,ci=16,ui=1,di=2,fi=4,vi=8,_i=16,hi=1,mi=2,gi=4,pi=1,yi=2,de=Symbol(),Wn="http://www.w3.org/2000/svg";function _e(e,t){var n={f:0,v:e,reactions:null,equals:$n,rv:0,wv:0};return n}function $(e){return wi(_e(e))}function Kn(e,t=!1){var r;const n=_e(e);return t||(n.equals=on),nt&&U!==null&&U.l!==null&&((r=U.l).s??(r.s=[])).push(n),n}function wi(e){return B!==null&&B.f&ye&&(be===null?Ni([e]):be.push(e)),e}function L(e,t){return B!==null&&Rt()&&B.f&(ye|Mt)&&(be===null||!be.includes(e))&&ai(),Gt(e,t)}function Gt(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=dr(),Yn(e,je),Rt()&&N!==null&&N.f&me&&!(N.f&we)&&(se!==null&&se.includes(e)?(Te(N,je),Dt(N)):Ne===null?ji([e]):Ne.push(e))),t}function Yn(e,t){var n=e.reactions;if(n!==null)for(var r=Rt(),i=n.length,a=0;a<i;a++){var o=n[a],d=o.f;d&je||!r&&o===N||(Te(o,t),d&(me|Ue)&&(d&ye?Yn(o,Nt):Dt(o)))}}let ki=!1;function Y(e,t=null,n){if(typeof e!="object"||e===null||lt in e)return e;const r=Dn(e);if(r!==Vr&&r!==zr)return e;var i=new Map,a=rn(e),o=_e(0);a&&i.set("length",_e(e.length));var d;return new Proxy(e,{defineProperty(s,f,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&ni();var u=i.get(f);return u===void 0?(u=_e(l.value),i.set(f,u)):L(u,Y(l.value,d)),!0},deleteProperty(s,f){var l=i.get(f);if(l===void 0)f in s&&i.set(f,_e(de));else{if(a&&typeof f=="string"){var u=i.get("length"),c=Number(f);Number.isInteger(c)&&c<u.v&&L(u,c)}L(l,de),En(o)}return!0},get(s,f,l){var g;if(f===lt)return e;var u=i.get(f),c=f in s;if(u===void 0&&(!c||(g=Ye(s,f))!=null&&g.writable)&&(u=_e(Y(c?s[f]:de,d)),i.set(f,u)),u!==void 0){var h=_(u);return h===de?void 0:h}return Reflect.get(s,f,l)},getOwnPropertyDescriptor(s,f){var l=Reflect.getOwnPropertyDescriptor(s,f);if(l&&"value"in l){var u=i.get(f);u&&(l.value=_(u))}else if(l===void 0){var c=i.get(f),h=c==null?void 0:c.v;if(c!==void 0&&h!==de)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(s,f){var h;if(f===lt)return!0;var l=i.get(f),u=l!==void 0&&l.v!==de||Reflect.has(s,f);if(l!==void 0||N!==null&&(!u||(h=Ye(s,f))!=null&&h.writable)){l===void 0&&(l=_e(u?Y(s[f],d):de),i.set(f,l));var c=_(l);if(c===de)return!1}return u},set(s,f,l,u){var p;var c=i.get(f),h=f in s;if(a&&f==="length")for(var g=l;g<c.v;g+=1){var v=i.get(g+"");v!==void 0?L(v,de):g in s&&(v=_e(de),i.set(g+"",v))}c===void 0?(!h||(p=Ye(s,f))!=null&&p.writable)&&(c=_e(void 0),L(c,Y(l,d)),i.set(f,c)):(h=c.v!==de,L(c,Y(l,d)));var y=Reflect.getOwnPropertyDescriptor(s,f);if(y!=null&&y.set&&y.set.call(u,l),!h){if(a&&typeof f=="string"){var k=i.get("length"),w=Number(f);Number.isInteger(w)&&w>=k.v&&L(k,w+1)}En(o)}return!0},ownKeys(s){_(o);var f=Reflect.ownKeys(s).filter(c=>{var h=i.get(c);return h===void 0||h.v!==de});for(var[l,u]of i)u.v!==de&&!(l in s)&&f.push(l);return f},setPrototypeOf(){ri()}})}function En(e,t=1){L(e,e.v+t)}var pe,Gn,Zn;function bi(){if(pe===void 0){pe=window;var e=Element.prototype,t=Node.prototype;Gn=Ye(t,"firstChild").get,Zn=Ye(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function gt(e=""){return document.createTextNode(e)}function Je(e){return Gn.call(e)}function jt(e){return Zn.call(e)}function b(e,t){return Je(e)}function ne(e,t){{var n=Je(e);return n instanceof Comment&&n.data===""?jt(n):n}}function T(e,t=1,n=!1){let r=e;for(;t--;)r=jt(r);return r}function Si(e){e.textContent=""}function X(e){var t=ye|je;N===null?t|=Ue:N.f|=zn;var n=B!==null&&B.f&ye?B:null;const r={children:null,ctx:U,deps:null,equals:$n,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??N};return n!==null&&(n.children??(n.children=[])).push(r),r}function xi(e){const t=X(e);return t.equals=on,t}function Jn(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var r=t[n];r.f&ye?cn(r):xe(r)}}}function Ei(e){for(var t=e.parent;t!==null;){if(!(t.f&ye))return t;t=t.parent}return null}function Xn(e){var t,n=N;ge(Ei(e));try{Jn(e),t=fr(e)}finally{ge(n)}return t}function Qn(e){var t=Xn(e),n=(De||e.f&Ue)&&e.deps!==null?Nt:me;Te(e,n),e.equals(t)||(e.v=t,e.wv=dr())}function cn(e){Jn(e),ft(e,0),Te(e,et),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Ti(e){N===null&&B===null&&Qr(),B!==null&&B.f&Ue&&Xr(),dn&&Jr()}function Ci(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function rt(e,t,n,r=!0){var i=(e&mt)!==0,a=N,o={ctx:U,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|je,first:null,fn:t,last:null,next:null,parent:i?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var d=Ge;try{Tn(!0),Ft(o),o.f|=Vn}catch(l){throw xe(o),l}finally{Tn(d)}}else t!==null&&Dt(o);var s=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&zn)===0;if(!s&&!i&&r&&(a!==null&&Ci(o,a),B!==null&&B.f&ye)){var f=B;(f.children??(f.children=[])).push(o)}return o}function Ai(e){const t=rt(ht,null,!1);return Te(t,me),t.teardown=e,t}function Ot(e){Ti();var t=N!==null&&(N.f&we)!==0&&U!==null&&!U.m;if(t){var n=U;(n.e??(n.e=[])).push({fn:e,effect:N,reaction:B})}else{var r=qt(e);return r}}function Pi(e){const t=rt(mt,e,!0);return(n={})=>new Promise(r=>{n.outro?st(t,()=>{xe(t),r(void 0)}):(xe(t),r(void 0))})}function qt(e){return rt(Bn,e,!1)}function er(e){return rt(ht,e,!0)}function M(e){return pt(e)}function pt(e,t=0){return rt(ht|Mt|t,e,!0)}function Ve(e,t=!0){return rt(ht|we,e,!0,t)}function tr(e){var t=e.teardown;if(t!==null){const n=dn,r=B;Cn(!0),Ee(null);try{t.call(null)}finally{Cn(n),Ee(r)}}}function nr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)cn(t[n])}}function rr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var r=n.next;xe(n,t),n=r}}function Ii(e){for(var t=e.first;t!==null;){var n=t.next;t.f&we||xe(t),t=n}}function xe(e,t=!0){var n=!1;if((t||e.f&Kr)&&e.nodes_start!==null){for(var r=e.nodes_start,i=e.nodes_end;r!==null;){var a=r===i?null:jt(r);r.remove(),r=a}n=!0}rr(e,t&&!n),nr(e),ft(e,0),Te(e,et);var o=e.transitions;if(o!==null)for(const s of o)s.stop();tr(e);var d=e.parent;d!==null&&d.first!==null&&ir(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function ir(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function st(e,t){var n=[];un(e,n,!0),ar(n,()=>{xe(e),t&&t()})}function ar(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function un(e,t,n){if(!(e.f&ke)){if(e.f^=ke,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&tt)!==0||(r.f&we)!==0;un(r,t,a?n:!1),r=i}}}function ct(e){or(e,!0)}function or(e,t){if(e.f&ke){wt(e)&&Ft(e),e.f^=ke;for(var n=e.first;n!==null;){var r=n.next,i=(n.f&tt)!==0||(n.f&we)!==0;or(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let Tt=!1,Zt=[];function lr(){Tt=!1;const e=Zt.slice();Zt=[],Ur(e)}function yt(e){Tt||(Tt=!0,queueMicrotask(lr)),Zt.push(e)}function Li(){Tt&&lr()}function sr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const cr=0,Mi=1;let St=!1,xt=cr,ut=!1,dt=null,Ge=!1,dn=!1;function Tn(e){Ge=e}function Cn(e){dn=e}let Fe=[],Ze=0;let B=null;function Ee(e){B=e}let N=null;function ge(e){N=e}let be=null;function Ni(e){be=e}let se=null,ve=0,Ne=null;function ji(e){Ne=e}let ur=1,Jt=0,De=!1,U=null;function dr(){return++ur}function Rt(){return!nt||U!==null&&U.l===null}function wt(e){var f;var t=e.f;if(t&je)return!0;if(t&Nt){var n=e.deps,r=(t&Ue)!==0;if(n!==null){var i,a,o=(t&Et)!==0,d=r&&N!==null&&!De,s=n.length;if(o||d){for(i=0;i<s;i++)a=n[i],(o||!((f=a==null?void 0:a.reactions)!=null&&f.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=Et)}for(i=0;i<s;i++)if(a=n[i],wt(a)&&Qn(a),a.wv>e.wv)return!0}(!r||N!==null&&!De)&&Te(e,me)}return!1}function Oi(e,t){for(var n=t;n!==null;){if(n.f&Yt)try{n.fn(e);return}catch{n.f^=Yt}n=n.parent}throw St=!1,e}function qi(e){return(e.f&et)===0&&(e.parent===null||(e.parent.f&Yt)===0)}function Ht(e,t,n,r){if(St){if(n===null&&(St=!1),qi(t))throw e;return}n!==null&&(St=!0);{Oi(e,t);return}}function fr(e){var c;var t=se,n=ve,r=Ne,i=B,a=De,o=be,d=U,s=e.f;se=null,ve=0,Ne=null,B=s&(we|mt)?null:e,De=!Ge&&(s&Ue)!==0,be=null,U=e.ctx,Jt++;try{var f=(0,e.fn)(),l=e.deps;if(se!==null){var u;if(ft(e,ve),l!==null&&ve>0)for(l.length=ve+se.length,u=0;u<se.length;u++)l[ve+u]=se[u];else e.deps=l=se;if(!De)for(u=ve;u<l.length;u++)((c=l[u]).reactions??(c.reactions=[])).push(e)}else l!==null&&ve<l.length&&(ft(e,ve),l.length=ve);return f}finally{se=t,ve=n,Ne=r,B=i,De=a,be=o,U=d}}function Ri(e,t){let n=t.reactions;if(n!==null){var r=Fr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&t.f&ye&&(se===null||!se.includes(t))&&(Te(t,Nt),t.f&(Ue|Et)||(t.f^=Et),ft(t,0))}function ft(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ri(e,n[r])}function Ft(e){var t=e.f;if(!(t&et)){Te(e,me);var n=N,r=U;N=e;try{t&Mt?Ii(e):rr(e),nr(e),tr(e);var i=fr(e);e.teardown=typeof i=="function"?i:null,e.wv=ur;var a=e.deps,o;Kt&&oi&&e.f&je}catch(d){Ht(d,e,n,r||e.ctx)}finally{N=n}}}function vr(){if(Ze>1e3){Ze=0;try{ei()}catch(e){if(dt!==null)Ht(e,dt,null);else throw e}}Ze++}function _r(e){var t=e.length;if(t!==0){vr();var n=Ge;Ge=!0;try{for(var r=0;r<t;r++){var i=e[r];i.f&me||(i.f^=me);var a=[];hr(i,a),Hi(a)}}finally{Ge=n}}}function Hi(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var r=e[n];if(!(r.f&(et|ke)))try{wt(r)&&(Ft(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?ir(r):r.fn=null))}catch(i){Ht(i,r,null,r.ctx)}}}function Fi(){if(ut=!1,Ze>1001)return;const e=Fe;Fe=[],_r(e),ut||(Ze=0,dt=null)}function Dt(e){xt===cr&&(ut||(ut=!0,queueMicrotask(Fi))),dt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&(mt|we)){if(!(n&me))return;t.f^=me}}Fe.push(t)}function hr(e,t){var n=e.first,r=[];e:for(;n!==null;){var i=n.f,a=(i&we)!==0,o=a&&(i&me)!==0,d=n.next;if(!o&&!(i&ke))if(i&ht){if(a)n.f^=me;else try{wt(n)&&Ft(n)}catch(u){Ht(u,n,null,n.ctx)}var s=n.first;if(s!==null){n=s;continue}}else i&Bn&&r.push(n);if(d===null){let u=n.parent;for(;u!==null;){if(e===u)break e;var f=u.next;if(f!==null){n=f;continue e}u=u.parent}}n=d}for(var l=0;l<r.length;l++)s=r[l],t.push(s),hr(s,t)}function mr(e){var t=xt,n=Fe;try{vr();const i=[];xt=Mi,Fe=i,ut=!1,_r(n);var r=e==null?void 0:e();return Li(),(Fe.length>0||i.length>0)&&mr(),Ze=0,dt=null,r}finally{xt=t,Fe=n}}async function An(){await Promise.resolve(),mr()}function _(e){var l;var t=e.f,n=(t&ye)!==0;if(n&&t&et){var r=Xn(e);return cn(e),r}if(B!==null){be!==null&&be.includes(e)&&ii();var i=B.deps;e.rv<Jt&&(e.rv=Jt,se===null&&i!==null&&i[ve]===e?ve++:se===null?se=[e]:se.push(e),Ne!==null&&N!==null&&N.f&me&&!(N.f&we)&&Ne.includes(e)&&(Te(N,je),Dt(N)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,d=a;o!==null;)if(o.f&ye){var s=o;d=s,o=s.parent}else{var f=o;(l=f.deriveds)!=null&&l.includes(d)||(f.deriveds??(f.deriveds=[])).push(d);break}return n&&(a=e,wt(a)&&Qn(a)),e.v}function ze(e){const t=B;try{return B=null,e()}finally{B=t}}const Di=-7169;function Te(e,t){e.f=e.f&Di|t}function Bi(e){return pr().get(e)}function gr(e,t){return pr().set(e,t),t}function pr(e){return U===null&&sr(),U.c??(U.c=new Map(Vi(U)||void 0))}function Vi(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function re(e,t=!1,n){U={p:U,c:null,e:null,m:!1,s:e,x:null,l:null},nt&&!t&&(U.l={s:null,u:null,r1:[],r2:_e(!1)})}function ie(e){const t=U;if(t!==null){const o=t.e;if(o!==null){var n=N,r=B;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];ge(a.effect),Ee(a.reaction),qt(a.fn)}}finally{ge(n),Ee(r)}}U=t.p,t.m=!0}return{}}function zi(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const $i=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ui(e){return $i.includes(e)}const Wi={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Ki(e){return e=e.toLowerCase(),Wi[e]??e}const Yi=["touchstart","touchmove"];function Gi(e){return Yi.includes(e)}function Zi(e,t){if(t){const n=document.body;e.autofocus=!0,yt(()=>{document.activeElement===n&&e.focus()})}}let Pn=!1;function Ji(){Pn||(Pn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function yr(e){var t=B,n=N;Ee(null),ge(null);try{return e()}finally{Ee(t),ge(n)}}function Xi(e,t,n,r=n){e.addEventListener(t,()=>yr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Ji()}const wr=new Set,Xt=new Set;function kr(e,t,n,r){function i(a){if(r.capture||ot.call(t,a),!a.cancelBubble)return yr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?yt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function he(e,t,n,r,i){var a={capture:r,passive:i},o=kr(e,t,n,a);(t===document.body||t===window||t===document)&&Ai(()=>{t.removeEventListener(e,o,a)})}function ue(e){for(var t=0;t<e.length;t++)wr.add(e[t]);for(var n of Xt)n(e)}function ot(e){var w;var t=this,n=t.ownerDocument,r=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],a=i[0]||e.target,o=0,d=e.__root;if(d){var s=i.indexOf(d);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;s<=f&&(o=s)}if(a=i[o]||e.target,a!==t){Dr(e,"currentTarget",{configurable:!0,get(){return a||n}});var l=B,u=N;Ee(null),ge(null);try{for(var c,h=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var v=a["__"+r];if(v!==void 0&&!a.disabled)if(rn(v)){var[y,...k]=v;y.apply(a,[e,...k])}else v.call(a,e)}catch(p){c?h.push(p):c=p}if(e.cancelBubble||g===t||g===null)break;a=g}if(c){for(let p of h)queueMicrotask(()=>{throw p});throw c}}finally{e.__root=t,delete e.currentTarget,Ee(l),ge(u)}}}function br(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Xe(e,t){var n=N;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function A(e,t){var n=(t&pi)!==0,r=(t&yi)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=br(a?e:"<!>"+e),n||(i=Je(i)));var o=r?document.importNode(i,!0):i.cloneNode(!0);if(n){var d=Je(o),s=o.lastChild;Xe(d,s)}else Xe(o,o);return o}}function Ce(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=br(i),d=Je(o);a=Je(d)}var s=a.cloneNode(!0);return Xe(s,s),s}}function Oe(e=""){{var t=gt(e+"");return Xe(t,t),t}}function Qe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=gt();return e.append(t,n),Xe(t,n),e}function S(e,t){e!==null&&e.before(t)}let Ct=!0;function In(e){Ct=e}function D(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n==null?"":n+"")}function fn(e,t){return Qi(e,t)}const Ke=new Map;function Qi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){bi();var d=new Set,s=u=>{for(var c=0;c<u.length;c++){var h=u[c];if(!d.has(h)){d.add(h);var g=Gi(h);t.addEventListener(h,ot,{passive:g});var v=Ke.get(h);v===void 0?(document.addEventListener(h,ot,{passive:g}),Ke.set(h,1)):Ke.set(h,v+1)}}};s(an(wr)),Xt.add(s);var f=void 0,l=Pi(()=>{var u=n??t.appendChild(gt());return Ve(()=>{if(a){re({});var c=U;c.c=a}i&&(r.$$events=i),Ct=o,f=e(u,r)||{},Ct=!0,a&&ie()}),()=>{var g;for(var c of d){t.removeEventListener(c,ot);var h=Ke.get(c);--h===0?(document.removeEventListener(c,ot),Ke.delete(c)):Ke.set(c,h)}Xt.delete(s),u!==n&&((g=u.parentNode)==null||g.removeChild(u))}});return Qt.set(f,l),f}let Qt=new WeakMap;function Sr(e,t){const n=Qt.get(e);return n?(Qt.delete(e),n(t)):Promise.resolve()}function R(e,t,n=!1){var r=e,i=null,a=null,o=de,d=n?tt:0,s=!1;const f=(u,c=!0)=>{s=!0,l(c,u)},l=(u,c)=>{o!==(o=u)&&(o?(i?ct(i):c&&(i=Ve(()=>c(r))),a&&st(a,()=>{a=null})):(a?ct(a):c&&(a=Ve(()=>c(r))),i&&st(i,()=>{i=null})))};pt(()=>{s=!1,t(f),s||l(null,null)},d)}let Be=null;function Ln(e){Be=e}function vt(e,t){return t}function ea(e,t,n,r){for(var i=[],a=t.length,o=0;o<a;o++)un(t[o].e,i,!0);var d=a>0&&i.length===0&&n!==null;if(d){var s=n.parentNode;Si(s),s.append(n),r.clear(),Me(e,t[0].prev,t[a-1].next)}ar(i,()=>{for(var f=0;f<a;f++){var l=t[f];d||(r.delete(l.k),Me(e,l.prev,l.next)),xe(l.e,!d)}})}function $e(e,t,n,r,i,a=null){var o=e,d={flags:t,items:new Map,first:null},s=(t&Un)!==0;if(s){var f=e;o=f.appendChild(gt())}var l=null,u=!1;pt(()=>{var c=n(),h=rn(c)?c:c==null?[]:an(c),g=h.length;if(!(u&&g===0)){u=g===0;{var v=B;ta(h,d,o,i,t,(v.f&ke)!==0,r)}a!==null&&(g===0?l?ct(l):l=Ve(()=>a(o)):l!==null&&st(l,()=>{l=null})),n()}})}function ta(e,t,n,r,i,a,o,d){var O,V,Q,ae;var s=(i&si)!==0,f=(i&(ln|sn))!==0,l=e.length,u=t.items,c=t.first,h=c,g,v=null,y,k=[],w=[],p,E,x,C;if(s)for(C=0;C<l;C+=1)p=e[C],E=o(p,C),x=u.get(E),x!==void 0&&((O=x.a)==null||O.measure(),(y??(y=new Set)).add(x));for(C=0;C<l;C+=1){if(p=e[C],E=o(p,C),x=u.get(E),x===void 0){var q=h?h.e.nodes_start:n;v=ra(q,t,v,v===null?t.first:v.next,p,E,C,r,i),u.set(E,v),k=[],w=[],h=v.next;continue}if(f&&na(x,p,C,i),x.e.f&ke&&(ct(x.e),s&&((V=x.a)==null||V.unfix(),(y??(y=new Set)).delete(x))),x!==h){if(g!==void 0&&g.has(x)){if(k.length<w.length){var P=w[0],H;v=P.prev;var W=k[0],ee=k[k.length-1];for(H=0;H<k.length;H+=1)Mn(k[H],P,n);for(H=0;H<w.length;H+=1)g.delete(w[H]);Me(t,W.prev,ee.next),Me(t,v,W),Me(t,ee,P),h=P,v=ee,C-=1,k=[],w=[]}else g.delete(x),Mn(x,h,n),Me(t,x.prev,x.next),Me(t,x,v===null?t.first:v.next),Me(t,v,x),v=x;continue}for(k=[],w=[];h!==null&&h.k!==E;)(a||!(h.e.f&ke))&&(g??(g=new Set)).add(h),w.push(h),h=h.next;if(h===null)continue;x=h}k.push(x),v=x,h=x.next}if(h!==null||g!==void 0){for(var F=g===void 0?[]:an(g);h!==null;)(a||!(h.e.f&ke))&&F.push(h),h=h.next;var G=F.length;if(G>0){var I=i&Un&&l===0?n:null;if(s){for(C=0;C<G;C+=1)(Q=F[C].a)==null||Q.measure();for(C=0;C<G;C+=1)(ae=F[C].a)==null||ae.fix()}ea(t,F,I,u)}}s&&yt(()=>{var le;if(y!==void 0)for(x of y)(le=x.a)==null||le.apply()}),N.first=t.first&&t.first.e,N.last=v&&v.e}function na(e,t,n,r){r&ln&&Gt(e.v,t),r&sn?Gt(e.i,n):e.i=n}function ra(e,t,n,r,i,a,o,d,s,f){var l=Be,u=(s&ln)!==0,c=(s&ci)===0,h=u?c?Kn(i):_e(i):i,g=s&sn?_e(o):o,v={i:g,v:h,k:a,a:null,e:null,prev:n,next:r};Be=v;try{return v.e=Ve(()=>d(e,h,g),ki),v.e.prev=n&&n.e,v.e.next=r&&r.e,n===null?t.first=v:(n.next=v,n.e.next=v.e),r!==null&&(r.prev=v,r.e.prev=v.e),v}finally{Be=l}}function Mn(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==r;){var o=jt(a);i.before(a),a=o}}function Me(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function it(e,t,...n){var r=e,i=He,a;pt(()=>{i!==(i=t())&&(a&&(xe(a),a=null),a=Ve(()=>i(r,...n)))},tt)}function ia(e,t,n,r,i,a){var o,d,s=null,f=e,l,u=Be;pt(()=>{const c=t()||null;var h=c==="svg"?Wn:null;if(c!==o){var g=Be;Ln(u),l&&(c===null?st(l,()=>{l=null,d=null}):c===d?ct(l):(xe(l),In(!1))),c&&c!==d&&(l=Ve(()=>{s=h?document.createElementNS(h,c):document.createElement(c),Xe(s,s);{var v=s.appendChild(gt());r(s,v)}N.nodes_end=s,f.before(s)})),o=c,o&&(d=o),In(!0),Ln(g)}},tt)}function xr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function aa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xr(e))&&(r&&(r+=" "),r+=t);return r}function oa(e){return typeof e=="object"?aa(e):e??""}function la(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Z(e,t,n,r){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Gr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Er(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function sa(e,t,n,r,i=!1,a=!1,o=!1){var d=t||{},s=e.tagName==="OPTION";for(var f in t)f in n||(n[f]=null);n.class&&(n.class=oa(n.class)),n.class=n.class?n.class+" "+r:r;var l=Er(e),u=e.__attributes??(e.__attributes={});for(const w in n){let p=n[w];if(s&&w==="value"&&p==null){e.value=e.__value="",d[w]=p;continue}var c=d[w];if(p!==c){d[w]=p;var h=w[0]+w[1];if(h!=="$$"){if(h==="on"){const E={},x="$$"+w;let C=w.slice(2);var g=Ui(C);if(zi(C)&&(C=C.slice(0,-7),E.capture=!0),!g&&c){if(p!=null)continue;e.removeEventListener(C,d[x],E),d[x]=null}if(p!=null)if(g)e[`__${C}`]=p,ue([C]);else{let q=function(P){d[w].call(this,P)};var k=q;d[x]=kr(C,e,q,E)}else g&&(e[`__${C}`]=void 0)}else if(w==="style"&&p!=null)e.style.cssText=p+"";else if(w==="autofocus")Zi(e,!!p);else if(w==="__value"||w==="value"&&p!=null)e.value=e[w]=e.__value=p;else if(w==="selected"&&s)la(e,p);else{var v=w;i||(v=Ki(v));var y=v==="defaultValue"||v==="defaultChecked";if(p==null&&!a&&!y)if(u[w]=null,v==="value"||v==="checked"){let E=e;if(v==="value"){let x=E.defaultValue;E.removeAttribute(v),E.defaultValue=x}else{let x=E.defaultChecked;E.removeAttribute(v),E.defaultChecked=x}}else e.removeAttribute(w);else y||l.includes(v)&&(a||typeof p!="string")?e[v]=p:typeof p!="function"&&Z(e,v,p)}w==="style"&&"__styles"in e&&(e.__styles={})}}}return d}var Nn=new Map;function Er(e){var t=Nn.get(e.nodeName);if(t)return t;Nn.set(e.nodeName,t=[]);for(var n,r=e,i=Element.prototype;i!==r;){n=Br(r);for(var a in n)n[a].set&&t.push(a);r=Dn(r)}return t}function fe(e,t,n){if(n){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function vn(e,t,n,r){var i=e.__styles??(e.__styles={});i[t]!==n&&(i[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const ca=()=>performance.now(),Ae={tick:e=>requestAnimationFrame(e),now:()=>ca(),tasks:new Set};function Tr(){const e=Ae.now();Ae.tasks.forEach(t=>{t.c(e)||(Ae.tasks.delete(t),t.f())}),Ae.tasks.size!==0&&Ae.tick(Tr)}function ua(e){let t;return Ae.tasks.size===0&&Ae.tick(Tr),{promise:new Promise(n=>{Ae.tasks.add(t={c:e,f:n})}),abort(){Ae.tasks.delete(t)}}}function kt(e,t){e.dispatchEvent(new CustomEvent(t))}function da(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function jn(e){const t={},n=e.split(";");for(const r of n){const[i,a]=r.split(":");if(!i||a===void 0)break;const o=da(i.trim());t[o]=a.trim()}return t}const fa=e=>e;function va(e,t,n){var r=Be,i,a,o,d=null;r.a??(r.a={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){const s=t()(this.element,{from:i,to:a},n==null?void 0:n());o=At(this.element,s,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:s,width:f,height:l}=getComputedStyle(e);if(s!=="absolute"&&s!=="fixed"){var u=e.style;d={position:u.position,width:u.width,height:u.height,transform:u.transform},u.position="absolute",u.width=f,u.height=l;var c=e.getBoundingClientRect();if(i.left!==c.left||i.top!==c.top){var h=`translate(${i.left-c.left}px, ${i.top-c.top}px)`;u.transform=u.transform?`${u.transform} ${h}`:h}}}},unfix(){if(d){var s=e.style;s.position=d.position,s.width=d.width,s.height=d.height,s.transform=d.transform}}}),r.a.element=e}function Se(e,t,n,r){var i=(e&hi)!==0,a=(e&mi)!==0,o=i&&a,d=(e&gi)!==0,s=o?"both":i?"in":"out",f,l=t.inert,u,c;function h(){var w=B,p=N;Ee(null),ge(null);try{return f??(f=n()(t,(r==null?void 0:r())??{},{direction:s}))}finally{Ee(w),ge(p)}}var g={is_global:d,in(){var w;if(t.inert=l,!i){c==null||c.abort(),(w=c==null?void 0:c.reset)==null||w.call(c);return}a||u==null||u.abort(),kt(t,"introstart"),u=At(t,h(),c,1,()=>{kt(t,"introend"),u==null||u.abort(),u=f=void 0})},out(w){if(!a){w==null||w(),f=void 0;return}t.inert=!0,kt(t,"outrostart"),c=At(t,h(),u,0,()=>{kt(t,"outroend"),w==null||w()})},stop:()=>{u==null||u.abort(),c==null||c.abort()}},v=N;if((v.transitions??(v.transitions=[])).push(g),i&&Ct){var y=d;if(!y){for(var k=v.parent;k&&k.f&tt;)for(;(k=k.parent)&&!(k.f&Mt););y=!k||(k.f&Vn)!==0}y&&qt(()=>{ze(()=>g.in())})}}function At(e,t,n,r,i){var a=r===1;if($r(t)){var o,d=!1;return yt(()=>{if(!d){var y=t({direction:a?"in":"out"});o=At(e,y,n,r,i)}}),{abort:()=>{d=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return i(),{abort:He,deactivate:He,reset:He,t:()=>r};const{delay:s=0,css:f,tick:l,easing:u=fa}=t;var c=[];if(a&&n===void 0&&(l&&l(0,1),f)){var h=jn(f(0,1));c.push(h,h)}var g=()=>1-r,v=e.animate(c,{duration:s});return v.onfinish=()=>{var y=(n==null?void 0:n.t())??1-r;n==null||n.abort();var k=r-y,w=t.duration*Math.abs(k),p=[];if(w>0){if(f)for(var E=Math.ceil(w/16.666666666666668),x=0;x<=E;x+=1){var C=y+k*u(x/E),q=f(C,1-C);p.push(jn(q))}g=()=>{var P=v.currentTime;return y+k*u(P/w)},l&&ua(()=>{if(v.playState!=="running")return!1;var P=g();return l(P,1-P),!0})}v=e.animate(p,{duration:w,fill:"forwards"}),v.onfinish=()=>{g=()=>r,l==null||l(r,1-r),i()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=He)},deactivate:()=>{i=He},reset:()=>{r===0&&(l==null||l(1,0))},t:()=>g()}}function _a(e,t,n=t){var r=Rt();Xi(e,"input",i=>{var a=i?e.defaultValue:e.value;if(a=$t(e)?Ut(a):a,n(a),r&&a!==(a=t())){var o=e.selectionStart,d=e.selectionEnd;e.value=a??"",d!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(d,e.value.length))}}),ze(t)==null&&e.value&&n($t(e)?Ut(e.value):e.value),er(()=>{var i=t();$t(e)&&i===Ut(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function $t(e){var t=e.type;return t==="number"||t==="range"}function Ut(e){return e===""?null:+e}function On(e,t){return e===t||(e==null?void 0:e[lt])===t}function Bt(e={},t,n,r){return qt(()=>{var i,a;return er(()=>{i=a,a=[],ze(()=>{e!==n(...a)&&(t(e,...a),i&&On(n(...i),e)&&t(null,...i))})}),()=>{yt(()=>{a&&On(n(...a),e)&&t(null,...a)})}}),e}let bt=!1;function ha(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}const ma={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function ga(e,t,n){return new Proxy({props:e,exclude:t},ma)}function qn(e){for(var t=N,n=N;t!==null&&!(t.f&(we|mt));)t=t.parent;try{return ge(t),e()}finally{ge(n)}}function j(e,t,n,r){var q;var i=(n&ui)!==0,a=!nt||(n&di)!==0,o=(n&vi)!==0,d=(n&_i)!==0,s=!1,f;o?[f,s]=ha(()=>e[t]):f=e[t];var l=lt in e||Yr in e,u=o&&(((q=Ye(e,t))==null?void 0:q.set)??(l&&t in e&&(P=>e[t]=P)))||void 0,c=r,h=!0,g=!1,v=()=>(g=!0,h&&(h=!1,d?c=ze(r):c=r),c);f===void 0&&r!==void 0&&(u&&a&&ti(),f=v(),u&&u(f));var y;if(a)y=()=>{var P=e[t];return P===void 0?v():(h=!0,g=!1,P)};else{var k=qn(()=>(i?X:xi)(()=>e[t]));k.f|=Wr,y=()=>{var P=_(k);return P!==void 0&&(c=void 0),P===void 0?c:P}}if(!(n&fi))return y;if(u){var w=e.$$legacy;return function(P,H){return arguments.length>0?((!a||!H||w||s)&&u(H?y():P),P):y()}}var p=!1,E=!1,x=Kn(f),C=qn(()=>X(()=>{var P=y(),H=_(x);return p?(p=!1,E=!0,H):(E=!1,x.v=P)}));return i||(C.equals=on),function(P,H){if(arguments.length>0){const W=H?_(C):a&&o?Y(P):P;return C.equals(W)||(p=!0,L(x,W),g&&c!==void 0&&(c=W),ze(()=>_(C))),P}return _(C)}}function at(e){U===null&&sr(),nt&&U.l!==null?pa(U).m.push(e):Ot(()=>{const t=ze(e);if(typeof t=="function")return t})}function pa(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const ya="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ya);const Cr="https://www.playpilot.com",_n="https://partner-api.playpilot.tech/1.0.0",Ar="EncryptedToken",wa="articleReplacementEditToken";async function Pr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=kn();if(!n)throw new Error("No token was provided");const r=Ir(e);if(!r)throw new Error("Could not be authenticated");const i=await fetch(_n+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:r})});if(!i.ok)throw i;return ka(r),!0}catch(n){console.error(n)}return!1}function Ir(e=""){var r,i;const t=(r=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:r.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(wa);if(a)return decodeURI(a)}return((i=("; "+document.cookie).split(`; ${Ar}=`).pop())==null?void 0:i.split(";")[0])||""}function ka(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const r="expires="+t.toUTCString();document.cookie=Ar+"="+e+";"+r+";path=/"}function hn(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get("playpilot-editorial-mode")==="true"||!!e}function Lr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t*31+r>>>0}return t.toString(16)}const Pe=Object.freeze({ArticlePageView:"ali_article_page_view",TitleModalView:"ali_title_modal_view",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed"}),ba="https://insights.playpilot.net";async function qe(e,t=null,n={}){const r=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,...n}),n.url=window.location.href,fetch(ba,{headers:r,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})})}const Sa=e=>e;function mn(e){const t=e-1;return t*t*t+1}function Rn(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function xa(e,{delay:t=0,duration:n=400,easing:r=Sa}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:a=>`opacity: ${a*i}`}}function _t(e,{delay:t=0,duration:n=400,easing:r=mn,x:i=0,y:a=0,opacity:o=0}={}){const d=getComputedStyle(e),s=+d.opacity,f=d.transform==="none"?"":d.transform,l=s*(1-o),[u,c]=Rn(i),[h,g]=Rn(a);return{delay:t,duration:n,easing:r,css:(v,y)=>`
3
3
  transform: ${f} translate(${(1-v)*u}${c}, ${(1-v)*h}${g});
4
4
  opacity: ${s-l*y}`}}function Pt(e,{delay:t=0,duration:n=400,easing:r=mn,axis:i="y"}={}){const a=getComputedStyle(e),o=+a.opacity,d=i==="y"?"height":"width",s=parseFloat(a[d]),f=i==="y"?["top","bottom"]:["left","right"],l=f.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),u=parseFloat(a[`padding${l[0]}`]),c=parseFloat(a[`padding${l[1]}`]),h=parseFloat(a[`margin${l[0]}`]),g=parseFloat(a[`margin${l[1]}`]),v=parseFloat(a[`border${l[0]}Width`]),y=parseFloat(a[`border${l[1]}Width`]);return{delay:t,duration:n,easing:r,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${d}: ${k*s}px;padding-${f[0]}: ${k*u}px;padding-${f[1]}: ${k*c}px;margin-${f[0]}: ${k*h}px;margin-${f[1]}: ${k*g}px;border-${f[0]}-width: ${k*v}px;border-${f[1]}-width: ${k*y}px;min-${d}: 0`}}function Ea(e,{delay:t=0,duration:n=400,easing:r=mn,start:i=0,opacity:a=0}={}){const o=getComputedStyle(e),d=+o.opacity,s=o.transform==="none"?"":o.transform,f=1-i,l=d*(1-a);return{delay:t,duration:n,easing:r,css:(u,c)=>`
5
5
  transform: ${s} scale(${1-f*c});
6
6
  opacity: ${d-l*c}
7
- `}}var Ta=A('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ca(e,t){re(t,!0);let n=j(t,"maxHeight",15);pr("scope","popover");let r=$(null),i=$(!1);at(async()=>{await An(),a(),await An(),o()});function a(){if(!_(r))return;const{top:u,right:c,bottom:h,height:g}=_(r).getBoundingClientRect(),v=d();L(i,Y(u-v<0&&window.innerHeight-h>u+g));const y=window.innerWidth-c-v;c+v>window.innerWidth&&(_(r).style.left=`${y}px`)}function o(){if(!_(r))return;const{top:u,height:c}=_(r).getBoundingClientRect(),h=d(),g=_(i)?window.innerHeight-u-h:u+c-h;n(Math.min(g,window.innerHeight*.8))}function d(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var s=Ta(),f=b(s),l=b(f);it(l,()=>t.children),Bt(s,u=>L(r,u),()=>_(r)),M(()=>{fe(s,"flip",_(i)),vn(s,"--max-height",n()?n()+"px":null)}),Se(3,f,()=>_t,()=>({duration:100,y:10})),S(e,s),ie()}const Aa=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}],m=Object.freeze({English:"en-US",Swedish:"sv-SE"}),Pa={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med"},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ"},And:{[m.English]:"and",[m.Swedish]:"och"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Strömma"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyra"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyra"},All:{[m.English]:"All",[m.Swedish]:"Alla"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal"},Western:{[m.English]:"Western",[m.Swedish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj"}};function ce(e,t=Ia()){var n;return((n=Pa[e])==null?void 0:n[t])||e}function Ia(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(m);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:m.English}var La=A('<div class="genre svelte-13nhocm"> </div>'),Ma=(e,t)=>L(t,!0),Na=A('<button class="genre expand svelte-13nhocm"> </button>'),ja=A("<!> <!>",1);function Oa(e,t){re(t,!0);let n=$(!1),r=X(()=>_(n)?t.genres:[t.genres[0]]);var i=ja(),a=ne(i);$e(a,17,()=>_(r),vt,(s,f)=>{var l=Qe();const u=X(()=>{var g;return(g=Aa.find(v=>v.slug===_(f)))==null?void 0:g.name});var c=ne(l);{var h=g=>{var v=La(),y=b(v);M(()=>D(y,ce(_(u)))),S(g,v)};q(c,g=>{_(u)&&g(h)})}S(s,l)});var o=T(a,2);{var d=s=>{var f=Na();f.__click=[Ma,n];var l=b(f);M(()=>D(l,`+${t.genres.length-1}`)),S(s,f)};q(o,s=>{!_(n)&&t.genres.length>1&&s(d)})}S(e,i),ie()}ue(["click"]);function Ra(e){let t=[];for(const n of e){let r=n;const i=t.find(d=>d.name===r.name),a=i==null?void 0:i.extra_info.category,o=r.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(d=>d.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}li();var qa=Ce('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ha(e){var t=qa();S(e,t)}var Fa=(e,t,n)=>t(n()),Da=A('<div class="arrow svelte-1f6ryh6"><!></div>'),Ba=A('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),Va=A('<div class="playlink empty svelte-1f6ryh6"> </div>'),za=A('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function $a(e,t){re(t,!0);const n=j(t,"list",3,!1),r=Bi("scope")==="modal",i=X(()=>t.playlinks.filter(v=>!!v.logo_url)),a=X(()=>Ra(_(i))),o={SVOD:ce("Stream"),BUY:ce("Buy"),RENT:ce("Rent"),TVOD:ce("Rent Or Buy")};function d(v){Re(r?Pe.TitleModalPlaylinkClick:Pe.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var s=za(),f=ne(s),l=b(f);M(()=>D(l,ce("Where To Stream Online")));var u=T(f,2),c=b(u);$e(c,17,()=>_(a),vt,(v,y)=>{let k=()=>_(y).name,w=()=>_(y).url,p=()=>_(y).logo_url,E=()=>_(y).extra_info.category;var x=Ba();x.__click=[Fa,d,k];var C=b(x),R=T(C,2),P=b(R),H=b(P),W=T(P,2),ee=b(W);M(()=>D(ee,o[E()]||ce("Stream")));var F=T(R,2);{var G=I=>{var O=Da(),V=b(O);Ha(V),S(I,O)};q(F,I=>{n()&&I(G)})}M(()=>{Z(x,"href",w()),Z(x,"data-playlink",k()),Z(C,"src",p()),D(H,k())}),S(v,x)});var h=T(c,2);{var g=v=>{var y=Va(),k=b(y);M(()=>D(k,ce("Title Unavailable"))),S(v,y)};q(h,v=>{t.playlinks.length||v(g)})}M(()=>fe(u,"list",n())),S(e,s),ie()}ue(["click"]);var Ua=(e,t)=>L(t,!0),Wa=A('<button class="show-more svelte-fluzit">Show more</button>'),Ka=A('<p class="svelte-fluzit"> </p>'),Ya=A('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function Ga(e,t){re(t,!0);const n=j(t,"blurb",3,""),r=j(t,"limit",3,200);let i=$(!1),a=X(()=>t.text.slice(0,r()));var o=Ya(),d=b(o),s=b(d),f=T(s);{var l=v=>{var y=Oe("...");S(v,y)};q(f,v=>{!_(i)&&t.text.length>r()&&v(l)})}var u=T(f,2);{var c=v=>{var y=Wa();y.__click=[Ua,i],S(v,y)};q(u,v=>{!_(i)&&(t.text.length>r()||n())&&v(c)})}var h=T(d,2);{var g=v=>{var y=Ka(),k=b(y);M(()=>D(k,n())),S(v,y)};q(h,v=>{_(i)&&v(g)})}M(()=>D(s,_(i)?t.text:_(a))),S(e,o),ie()}ue(["click"]);var Za=A('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Ja=A('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Xa(e,t){var n=Ja(),r=T(ne(n),2);$e(r,21,()=>t.participants,vt,(i,a)=>{var o=Za(),d=b(o),s=T(d),f=b(s);M(()=>{var c;return D(f,((c=_(a).character)==null?void 0:c.slice(0,20))||"")});var l=T(f);{var u=c=>{var h=Oe("...");S(c,h)};q(l,c=>{var h;(h=_(a).character)!=null&&h.length&&c(u)})}M(()=>D(d,`${_(a).name??""} `)),S(i,o)}),S(e,n)}var Qa=Ce('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function gn(e){var t=Qa();S(e,t)}var eo=A('<div class="top svelte-zq2qln"><img class="poster svelte-zq2qln"></div>'),to=A("<div> </div>"),no=A("<!> <!>",1),ro=A('<div class="content svelte-zq2qln" data-playpilot-link-injections-title=""><header class="header svelte-zq2qln"><!> <h1 class="svelte-zq2qln"> </h1> <div class="info svelte-zq2qln"><div class="imdb svelte-zq2qln"><!> </div> <!> <div> </div> <div class="capitalize svelte-zq2qln"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-zq2qln"><img alt="" class="svelte-zq2qln"></div>',1);function Nr(e,t){re(t,!0);const n=j(t,"small",3,!1),r=j(t,"compact",3,!1);var i=ro(),a=ne(i),o=b(a),d=b(o);{var s=F=>{var G=eo(),I=b(G);M(()=>{Z(I,"src",t.title.standing_poster),Z(I,"alt",`Movie poster for '${t.title.title??""}'`)}),S(F,G)};q(d,F=>{r()||F(s)})}var f=T(d,2),l=b(f),u=T(f,2),c=b(u),h=b(c);gn(h);var g=T(h),v=T(c,2);Oa(v,{get genres(){return t.title.genres}});var y=T(v,2),k=b(y),w=T(y,2),p=b(w);M(()=>D(p,ce(`Type: ${t.title.type}`)));var E=T(w,2);{var x=F=>{var G=to(),I=b(G);M(()=>D(I,`${t.title.length??""} ${ce("Minutes")??""}`)),S(F,G)};q(E,F=>{t.title.length&&F(x)})}var C=T(o,2),R=b(C);$a(R,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var P=T(R,2);{var H=F=>{var G=no(),I=ne(G);Ga(I,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var O=T(I,2);{var V=Q=>{Xa(Q,{get participants(){return t.title.participants}})};q(O,Q=>{var ae;(ae=t.title.participants)!=null&&ae.length&&Q(V)})}S(F,G)};q(P,F=>{n()||F(H)})}var W=T(a,2),ee=b(W);M(()=>{Z(a,"data-playpilot-original-title",t.title.original_title),fe(a,"small",n()),fe(a,"compact",r()),D(l,t.title.title),D(g,` ${t.title.imdb_score??""}`),D(k,t.title.year),fe(W,"faded",r()),Z(ee,"src",t.title.medium_poster)}),S(e,i),ie()}function io(e,t){re(t,!0);let n=$(0);Re(Pe.TitlePopoverView,t.title),Ca(e,{get maxHeight(){return _(n)},set maxHeight(r){L(n,Y(r))},children:(r,i)=>{var a=X(()=>_(n)<250);Nr(r,{get title(){return t.title},small:!0,get compact(){return _(a)}})},$$slots:{default:!0}}),ie()}var ao=(e,t,n,r)=>t(_(n).title_details,_(r)),oo=A(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),lo=(e,t,n,r)=>t(_(n).title_details,r()),so=A('<!> <a target="_blank"> </a>',1),co=A(" <!>.",1),uo=A("<!> <br>",1),fo=A(" <br>",1),vo=A('<span class="svelte-6p0hvs"><!></span>'),_o=A("<p></p>");function ho(e,t){re(t,!0);const n=j(t,"onclickmodal",3,s=>null);function r(s,f){Re(Pe.AfterArticlePlaylinkClick,s,{playlink:f})}function i(s,f){Re(Pe.AfterArticleModalButtonClick,s),n()(f)}var a=Qe(),o=ne(a);{var d=s=>{var f=_o();$e(f,21,()=>t.linkInjections,vt,(l,u)=>{var c=vo();const h=X(()=>{const{key:w,title:p,title_details:E,after_article_style:x}=_(u);return{key:w,title:p,title_details:E,after_article_style:x}}),g=X(()=>{var w;return((w=_(h).title_details)==null?void 0:w.providers)||[]});var v=b(c);{var y=w=>{var p=uo(),E=ne(p);{var x=R=>{var P=oo(),H=ne(P);M(()=>D(H,`"${_(h).title??""}" ${ce("Is Available To Stream")??""} `));var W=T(H),ee=b(W);ee.__click=[ao,i,h,u];var F=b(ee);M(()=>D(F,ce("View Streaming Options"))),S(R,P)},C=R=>{var P=co(),H=ne(P);M(()=>D(H,`"${_(h).title??""}" ${ce("Is Available To Stream On")??""} `));var W=T(H);$e(W,17,()=>_(g),vt,(ee,F,G)=>{let I=()=>_(F).name,O=()=>_(F).url;var V=so(),Q=ne(V);{var ae=te=>{var oe=Oe();M(()=>D(oe,G===_(g).length-1?`, ${ce("And")}`:",")),S(te,oe)};q(Q,te=>{G&&te(ae)})}var le=T(Q,2);le.__click=[lo,r,h,I];var Ie=b(le);M(()=>{Z(le,"href",O()),D(Ie,I())}),S(ee,V)}),S(R,P)};q(E,R=>{_(h).after_article_style==="modal_button"?R(x):R(C,!1)})}S(w,p)},k=w=>{var p=fo(),E=ne(p);M(()=>D(E,`"${_(h).title??""}" ${ce("Title Unavailable Suffix")??""} `)),S(w,p)};q(v,w=>{_(g).length?w(y):w(k,!1)})}M(()=>Z(c,"data-playpilot-injection-key",_(h).key)),S(l,c)}),S(s,f)};q(o,s=>{t.linkInjections.length&&s(d)})}S(e,a),ie()}ue(["click"]);function mo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function jr(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function go(e,t,n=[]){var a,o;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=i.parentNode)==null?void 0:o.nodeName)||"")););return i}function po(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function yo(e,t,n,r){const i=mo(t),a=jr(t),o=e.slice(0,r),d=e.slice(r),s=/[-/\\^$*+?.()|[\]{}]/g,f=new RegExp(`${a.replace(s,"\\$&")}|${i.replace(s,"\\$&")}`),l=d.replace(f,n);return o+l}function wo(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const pn="data-playpilot-injection-key",yn=`[${pn}]`,It={};let en=null;function ko(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(o=>{var d;return o.nodeType===Node.TEXT_NODE&&((d=o.nodeValue)==null?void 0:d.trim())!==""})){t.push(r);continue}const a=Array.from(r.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function wn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function bo(e,t,n){var f;const r=e.map(l=>l.innerText).join(" "),i=t.filter(l=>l.in_text!==!1&&!l.inactive),a=i.filter(l=>r.includes(l.sentence)),o={};for(const l of a){const u=e.findIndex(w=>w.innerText.includes(l.sentence)),c=e[u];if(!c)continue;const h=go(l.title,c,["A"]);if(!h||po(h))continue;const g=document.createElement("span");g.dataset.playpilotInjectionKey=l.key;const v=document.createElement("a");v.innerText=l.title,v.href=l.playpilot_url,v.dataset.playpilotOriginalTitle=(f=l.title_details)==null?void 0:f.original_title,v.target="_blank",v.rel="noopener nofollow noreferrer",g.insertAdjacentElement("beforeend",v);const y=wo(Object.values(o).filter(w=>w.elementIndex===u).map(w=>w.to));c.innerHTML=yo(c.innerHTML,l.title,g.outerHTML,y);const k=c.innerHTML.indexOf(g.outerHTML);o[l.key]={elementIndex:u,from:k,to:k+g.outerHTML.length}}xo(i,n),So();const d=t.filter(l=>l.after_article&&!l.inactive);return d.length&&Co(e,d,n),Po(t,o).map(l=>{const u=!l.inactive&&!l.after_article&&!document.querySelector(`[${pn}="${l.key}"]`);return{...l,inactive:!!l.inactive,failed:u}})}function So(){const e=Array.from(document.querySelectorAll(`${yn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function xo(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(pn);if(!a)return;const o=e.find(d=>a===d.key);o&&Eo(r,o,t)}),document.querySelectorAll(yn).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("mouseenter",o=>To(o,a)),r.addEventListener("mouseleave",()=>Lt(a)))})}function Eo(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Lt(t))}function To(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=fn(io,{target:n,props:{title:t.title_details}});It[t.key]={injection:t,component:r}}function Lt(e,t=!0){const n=It[e.key];n&&xr(n.component,{outro:t})}function Co(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),en=fn(ho,{target:r,props:{linkInjections:t,onclickmodal:n}})}function Ao(){var e;en&&(xr(en),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove())}function tn(){Object.values(It).forEach(t=>Lt(t.injection)),document.querySelectorAll(yn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(It).forEach(({injection:t})=>Lt(t,!1)),Ao()}function Po(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Io(){const e=wn();return{heading:Lo(e),modified_time:Hn(e),published_time:Hn(e)}}function Lo(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Hn(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?Mo(n):null}function Mo(e){try{return new Date(e).toISOString()}catch{return null}}function Or(){return location.protocol+"//"+location.host+location.pathname}let Wt=null;async function Rr(e,t,{hash:n=Mr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=kn(),o=hn()?await Ir():!1,d=Io();if(!a)throw new Error("No token was provided");const s=await fetch(_n+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...r})});if(!s.ok)throw s;return await s.json()}async function No(e,t,n=3e3,r=600){let i=Mr(t),a=0;Wt&&clearTimeout(Wt);const o=async(d,s)=>{var f;try{const l=await Rr(e,t,{hash:i});if(l.injections_enabled===!1&&!hn()){d([]);return}if(l.injections_ready===!1&&((f=l.link_injections)!=null&&f.length)){l.link_injections=Fn(l.link_injections),d(l.link_injections||[]);return}if(l.injections_ready){l.link_injections&&(l.link_injections=Fn(l.link_injections)),d(l.link_injections||[]);return}throw new Error}catch{if(a++,a>=r){console.error("Max poll limit exceeded. Please return later."),d();return}Wt=setTimeout(()=>o(d),n)}};return new Promise(o)}async function jo(e,t){var a;const n=(a=window.PlayPilotLinkInjections)==null?void 0:a.selector,r=e.map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive}));if(!await Rr(Or(),t,{params:{private_token:Lr(),automation_enabled:!1,link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}function Fn(e){return e.map(t=>({...t,key:qr(t.sid)}))}function qr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function kn(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var Oo=Ce('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ro(e){var t=Oo();S(e,t)}function bn(e,t){re(t,!0);const n=j(t,"children",3,null),r=j(t,"size",3,"margin(2)"),i=j(t,"onclick",3,()=>null),a=ga(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var o=Qe(),d=ne(o);ia(d,()=>t.href?"a":"button",!1,(s,f)=>{let l;M(()=>{l=sa(s,l,{role:t.href?"link":"button",onclick:i(),class:"button",...a},"svelte-1qqv88o",s.namespaceURI===Kn,s.nodeName.includes("-")),vn(s,"--size",r())});var u=Qe(),c=ne(u);it(c,()=>n()??He),S(f,u)}),S(e,o),ie()}var qo=(e,t)=>t()(),Ho=A('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function Fo(e,t){re(t,!0);const n=j(t,"onclose",3,()=>null),r=j(t,"onscroll",3,()=>null);pr("scope","modal"),at(()=>{const u=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=u||""});function i(u){return window.innerWidth<600?_t(u,{duration:250,y:window.innerHeight}):Ea(u,{duration:150,start:.85})}var a=Ho();he("keydown",pe,({key:u})=>{u==="Escape"&&n()()});var o=b(a),d=b(o),s=b(d);bn(s,{onclick:()=>n()(),children:(u,c)=>{Ro(u)},$$slots:{default:!0}});var f=T(d,2);it(f,()=>t.children);var l=T(o,2);l.__click=[qo,n],he("scroll",o,function(...u){var c;(c=r())==null||c.apply(this,u)}),Se(3,o,()=>i),Se(3,a,()=>xa,()=>({duration:150})),S(e,a),ie()}ue(["click"]);function Do(e,t){re(t,!0),Re(Pe.TitleModalView,t.title);let n=!1;function r(){n||(Re(Pe.TitleModalScroll,t.title),n=!0)}Fo(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Nr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ie()}function Bo(e){const t=e-1;return t*t*t+1}function Vo(e,{from:t,to:n},r={}){var i=getComputedStyle(e),a=zo(e),o=i.transform==="none"?"":i.transform,[d,s]=i.transformOrigin.split(" ").map(parseFloat),f=t.width/n.width,l=t.height/n.height,u=(t.left+f*d-(n.left+d))/a,c=(t.top+l*s-(n.top+s))/a,{delay:h=0,duration:g=y=>Math.sqrt(y)*120,easing:v=Bo}=r;return{delay:h,duration:typeof g=="function"?g(Math.sqrt(u*u+c*c)):g,easing:v,css:(y,k)=>{var w=k*u,p=k*c,E=y+k*f,x=y+k*l;return`transform: ${o} scale(${E}, ${x}) translate(${w}px, ${p}px);`}}}function zo(e){if("currentCSSZoom"in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var $o=Ce('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Uo(e,t){const n=j(t,"expanded",3,!1);var r=$o();M(()=>fe(r,"expanded",n())),S(e,r)}function Wo(e,t,n){t(!t()),n()(t())}var Ko=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function nn(e,t){re(t,!0);let n=j(t,"active",15),r=j(t,"fullwidth",3,!1),i=j(t,"label",3,""),a=j(t,"onclick",3,()=>null);var o=Ko();o.__click=[Wo,n,a];var d=b(o),s=b(d);it(s,()=>t.children),M(()=>{Z(o,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),fe(o,"active",n()),fe(o,"fullwidth",r())}),S(e,o),ie()}ue(["click"]);var Yo=A('<input type="text" class="svelte-1vrer3i">');function Sn(e,t){let n=j(t,"value",15),r=j(t,"label",3,""),i=j(t,"name",3,""),a=j(t,"readonly",3,!1),o=j(t,"oninput",3,()=>null);var d=Yo();d.__input=function(...s){var f;(f=o())==null||f.apply(this,s)},M(()=>{Z(d,"name",i()),Z(d,"aria-label",r()),Z(d,"placeholder",r()),d.readOnly=a()}),_a(d,n),S(e,d)}ue(["input"]);var Go=Ce('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Zo=Ce('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Jo=Ce('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Dn(e,t){let n=j(t,"align",3,"bottom");var r=Jo(),i=b(r);{var a=d=>{var s=Go();S(d,s)},o=d=>{var s=Qe(),f=ne(s);{var l=u=>{var c=Zo();S(u,c)};q(f,u=>{n()==="center"&&u(l)},!0)}S(d,s)};q(i,d=>{n()==="bottom"?d(a):d(o,!1)})}S(e,r)}var Xo=A("<!> In-text Playlink",1),Qo=A("<!> Bottom Playlink",1),el=(e,t)=>t().after_article_style="playlinks",tl=(e,t)=>t().after_article_style="modal_button",nl=A('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),rl=A('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function il(e,t){re(t,!0);let n=j(t,"linkInjection",7),r=X(()=>n().after_article_style==="modal_button");var i=rl(),a=ne(i),o=b(a),d=X(()=>n().in_text??!0);nn(o,{fullwidth:!0,get active(){return _(d)},onclick:c=>n().in_text=c,label:"In-text Playlink",children:(c,h)=>{var g=Xo(),v=ne(g);Dn(v,{align:"center"}),S(c,g)},$$slots:{default:!0}});var s=T(o,2),f=X(()=>n().after_article??!1);nn(s,{fullwidth:!0,get active(){return _(f)},onclick:c=>n().after_article=c,label:"Bottom Playlink",children:(c,h)=>{var g=Qo(),v=ne(g);Dn(v,{align:"bottom"}),S(c,g)},$$slots:{default:!0}});var l=T(a,2);{var u=c=>{var h=nl(),g=T(b(h),2),v=b(g);v.__click=[el,n];var y=T(v,2);y.__click=[tl,n];var k=T(y,2);M(()=>{Z(g,"aria-activedescendant",`playlinks-${(_(r)?"after-article":"in-text")??""}`),Z(v,"aria-selected",!_(r)||null),fe(v,"active",!_(r)),Z(y,"aria-selected",_(r)||null),fe(y,"active",_(r)),fe(k,"right",_(r))}),Se(3,h,()=>Pt,()=>({duration:100})),S(c,h)};q(l,c=>{n().after_article&&c(u)})}S(e,i),ie()}ue(["click"]);var al=A('<div class="alert svelte-1tq7qhv"><!></div>');function xn(e,t){re(t,!0);var n=al(),r=b(n);it(r,()=>t.children),S(e,n),ie()}var ol=Ce('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ll(e){var t=ol();S(e,t)}var sl=(e,t)=>L(t,!_(t)),cl=A('<div class="content svelte-1fmy0wh"><!></div>'),ul=A('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function dl(e,t){re(t,!0);let n=$(!1),r=$(null);function i(l){var c;const u=l.target;u===_(r)||(c=_(r))!=null&&c.contains(u)||L(n,!1)}var a=ul();he("click",pe,i);var o=b(a);o.__click=[sl,n];var d=b(o);ll(d),Bt(o,l=>L(r,l),()=>_(r));var s=T(o,2);{var f=l=>{var u=cl(),c=b(u);it(c,()=>t.children),Se(1,u,()=>_t,()=>({duration:150,y:5})),S(l,u)};q(s,l=>{_(n)&&l(f)})}M(()=>{Z(o,"aria-label",t.ariaLabel),Z(o,"aria-expanded",_(n))}),S(e,a),ie()}ue(["click"]);function fl(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var vl=A('<span data-testid="length" class="svelte-1bz02u6"> </span>'),_l=A('<button class="context-menu-action svelte-1bz02u6">Remove</button>'),hl=(e,t)=>L(t,!_(t)),ml=A('<div class="actions svelte-1bz02u6"><button class="expand svelte-1bz02u6" aria-label="Expand"><!></button> <!></div>'),gl=A('<div class="expanded svelte-1bz02u6"><div class="label svelte-1bz02u6">Link URL</div> <!> <div class="label offset svelte-1bz02u6">Layout options</div> <div class="type-select svelte-1bz02u6"><!></div></div>'),pl=A('<div class="item svelte-1bz02u6"><div class="header svelte-1bz02u6"><img class="poster svelte-1bz02u6" alt=""> <div class="info"><div class="title svelte-1bz02u6"> </div> <div class="meta svelte-1bz02u6"><span class="svelte-1bz02u6"><!> 7.1</span> <span class="svelte-1bz02u6"> </span> <span class="svelte-1bz02u6"> </span> <!></div></div> <div class="context-menu svelte-1bz02u6"><!></div></div> <div class="content svelte-1bz02u6"><!> <!></div></div>');function yl(e,t){re(t,!0);const n=j(t,"linkInjection",15),r=j(t,"onremove",3,()=>null),i=j(t,"onhighlight",3,()=>null),a=X(()=>n()||{}),o=X(()=>_(a).key),d=X(()=>_(a).sentence),s=X(()=>_(a).title_details),f=X(()=>_(a).failed),l=X(()=>_(s));let u=$(!1),c=$(!1),h=$(null);at(()=>{_(f)&&Re(Pe.InjectionFailed,_(l),{phrase:n().title,sentence:_(d)})});function g(z=!0){y().forEach(J=>{J.classList.toggle("injection-highlight",z)})}function v(z){let K=z.target,J=K==null?void 0:K.dataset.playpilotInjectionKey;K&&!J&&(K=K.closest(`[data-playpilot-injection-key="${_(o)}"]`),J=K==null?void 0:K.dataset.playpilotInjectionKey),L(c,J===_(o)),_(h)&&_(c)&&i()(_(h))}function y(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${_(o)}"]`))}var k=pl();he("mouseover",pe,v),k.__click=[fl,g,y];var w=b(k),p=b(w),E=T(p,2),x=b(E),C=b(x),R=T(x,2),P=b(R),H=b(P);gn(H);var W=T(P,2),ee=b(W),F=T(W,2),G=b(F),I=T(F,2);{var O=z=>{var K=vl(),J=b(K);M(()=>D(J,`${_(l).length??""}m`)),S(z,K)};q(I,z=>{_(l).length&&z(O)})}var V=T(E,2),Q=b(V);dl(Q,{ariaLabel:"More options",children:(z,K)=>{var J=_l();J.__click=function(...qe){var We;(We=r())==null||We.apply(this,qe)},S(z,J)},$$slots:{default:!0}});var ae=T(w,2),le=b(ae);{var Ie=z=>{xn(z,{children:(K,J)=>{var qe=Oe("A match was found, but the link could not be injected.");S(K,qe)},$$slots:{default:!0}})},te=z=>{var K=ml(),J=b(K);J.__click=[hl,u];var qe=b(J);Uo(qe,{get expanded(){return _(u)}});var We=T(J,2),Vt=X(()=>!n().inactive);nn(We,{label:"Visible",get active(){return _(Vt)},onclick:zt=>n(n().inactive=!zt,!0),children:(zt,Ql)=>{var Hr=Oe("Visible");S(zt,Hr)},$$slots:{default:!0}}),M(()=>Z(J,"aria-expanded",_(u))),S(z,K)};q(le,z=>{_(f)?z(Ie):z(te,!1)})}var oe=T(le,2);{var Le=z=>{var K=gl(),J=T(b(K),2);Sn(J,{label:"Playlink URL",get value(){return n().playpilot_url},set value(Vt){n(n().playpilot_url=Vt,!0)}});var qe=T(J,4),We=b(qe);il(We,{get linkInjection(){return n()}}),Se(3,K,()=>Pt,()=>({duration:100})),S(z,K)};q(oe,z=>{_(u)&&z(Le)})}Bt(k,z=>L(h,z),()=>_(h)),M(()=>{fe(k,"highlighted",_(c)),Z(p,"src",_(l).standing_poster),D(C,_(l).title),D(ee,_(l).year),D(G,_(l).type)}),he("mouseenter",k,()=>g(!0)),he("mouseleave",k,()=>g(!1)),Se(6,k,()=>Pt,()=>({duration:200})),S(e,k),ie()}ue(["click"]);var wl=A('<button class="drag-handle svelte-bwc0q8" aria-label="Move editor"></button>');function kl(e,t){re(t,!0);let n=j(t,"element",7),r=j(t,"position",23,()=>({x:0,y:0})),i=j(t,"limit",19,()=>({x:0,y:0})),a=j(t,"onchange",3,()=>null),o=!1,d={x:0,y:0},s=r();at(()=>{f(r().x,r().y)});function f(v,y){const k=window.innerWidth,w=window.innerHeight,p=n().clientWidth,E=n().clientHeight;v=Math.min(Math.max(v,i().x),k-p-i().x),y=Math.min(Math.max(y,i().y),w-E-i().y),n().style.right=v+"px",n().style.bottom=Math.max(y,i().y)+"px",r({x:v,y}),a()(r())}function l(v){var y,k;return{x:v.pageX||((y=v.touches)==null?void 0:y[0].pageX)||0,y:v.pageY||((k=v.touches)==null?void 0:k[0].pageY)||0}}function u(v){o=!0,d=l(v),s=r()}function c(v){if(!o)return;const y=l(v),k=y.x-d.x,w=y.y-d.y,p=s.x-k,E=s.y-w;f(p,E)}function h(){o&&(o=!1)}var g=wl();he("mousemove",pe,c),he("touchmove",pe,c,void 0,!0),he("mouseup",pe,h),he("touchend",pe,h),he("resize",pe,()=>f(r().x,r().y)),g.__mousedown=u,g.__touchstart=u,S(e,g),ie()}ue(["mousedown","touchstart"]);var bl=Ce('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Sl(e){var t=bl();S(e,t)}async function xl(e){const t=new Headers({"Content-Type":"application/json"}),n=kn();if(!n)throw new Error("No token was provided");const r=await fetch(_n+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var El=Ce('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Tl(e){var t=El();S(e,t)}var Cl=(e,t,n)=>t(_(n)),Al=A("<div> </div>"),Pl=e=>e.stopImmediatePropagation(),Il=A('<button class="item svelte-15ml41d"><img class="poster svelte-15ml41d" alt="" width="28" height="42"> <div class="content"><div class="name svelte-15ml41d"> </div> <div class="meta svelte-15ml41d"><div class="imdb svelte-15ml41d"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-15ml41d"><!></a></button>'),Ll=A('<em class="empty svelte-15ml41d">No results found</em>'),Ml=A('<div class="results svelte-15ml41d"></div>'),Nl=A('<div class="search svelte-15ml41d"><!> <!></div>');function jl(e,t){re(t,!0);let n=j(t,"onselect",3,()=>null),r=j(t,"query",15),i=$(Y([])),a=$(null),o=$(!1);Ot(()=>{r()&&d(r())});async function d(h){L(o,!0),L(a,null);try{L(i,Y(await xl(h)))}finally{L(o,!1)}}function s(h){r(h.title),L(a,Y(h)),n()(h)}var f=Nl(),l=b(f);Sn(l,{name:"search",label:"Search...",get value(){return r()},set value(h){r(h)}});var u=T(l,2);{var c=h=>{var g=Ml();$e(g,21,()=>_(i),v=>v.sid,(v,y)=>{var k=Il();k.__click=[Cl,s,y];var w=b(k),p=T(w,2),E=b(p),x=b(E),C=T(E,2),R=b(C),P=b(R);gn(P);var H=T(P),W=T(R,2),ee=b(W),F=T(W,2),G=b(F),I=T(F,2);{var O=ae=>{var le=Al(),Ie=b(le);M(()=>D(Ie,`${_(y).length??""} min`)),S(ae,le)};q(I,ae=>{_(y).length&&ae(O)})}var V=T(p,2);V.__click=[Pl];var Q=b(V);Tl(Q),M(()=>{Z(w,"src",_(y).standing_poster),D(x,_(y).title),D(H,` ${_(y).imdb_score??""}`),D(ee,_(y).year),D(G,_(y).type),Z(V,"href",`${Ar}/${_(y).type??""}/${_(y).slug??""}`)}),S(v,k)},v=>{var y=Qe(),k=ne(y);{var w=p=>{var E=Ll();S(p,E)};q(k,p=>{_(o)||p(w)})}S(v,y)}),S(h,g)};q(u,h=>{r()&&!_(a)&&h(c)})}S(e,f),ie()}ue(["click"]);function Ol(e,t,n,r,i,a){if(!_(t)||!_(n))return;const o=_(n).type==="movie"?"movie":"show",d=Ar+`/${o}/${_(n).slug}`,s={sid:_(n).sid,title:_(t),sentence:_(r),playpilot_url:d,key:qr(_(n).sid),title_details:_(n)};i.onsave(s),a()()}var Rl=A('<div class="error svelte-c3phlu"><!></div>'),ql=A('<section class="layout svelte-c3phlu"><div class="header svelte-c3phlu"><!> <h2 class="svelte-c3phlu">Add Playlink manually</h2></div> <p class="svelte-c3phlu">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-c3phlu">Selected text</label> <!> <!> <label for="text" class="svelte-c3phlu">Paired title</label> <!> <button class="save svelte-c3phlu">Add playlink</button></section>');function Hl(e,t){re(t,!0);let n=j(t,"htmlString",3,""),r=j(t,"onclose",3,()=>null),i=$(""),a=$(""),o=$(null),d=$(""),s=$("");at(f);function f(){const p=window.getSelection();if(!(p!=null&&p.anchorNode)||!wn().contains(p.anchorNode.parentElement))return;const E=p.toString().trim();if(!E)return;L(d,""),L(i,Y(E)),L(s,Y(_(i))),L(a,Y(l(p,E)));const x=p.getRangeAt(0).commonAncestorContainer.textContent,C=jr(n());(!x||!C.includes(x))&&L(d,"Selection was not inside of given content")}function l(p,E){const x=p.getRangeAt(0);let C=x.startContainer;if((C.textContent||"").length<=E.length*2&&x.startContainer.parentNode&&(C=x.startContainer.parentNode),!C)return"";const R=C.textContent||"",P=x.startOffset,H=x.endOffset,W=R.slice(0,P).lastIndexOf("."),ee=R.slice(H).search(/[.!?]/),F=W===-1?0:W+1,G=ee===-1?R.length:H+ee+1;return R.slice(F,G).trim()}var u=ql();he("mouseup",pe,f);var c=b(u),h=b(c);bn(h,{get onclick(){return r()},size:"24px",children:(p,E)=>{Sl(p)},$$slots:{default:!0}});var g=T(c,6);Sn(g,{get value(){return _(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var v=T(g,2);{var y=p=>{var E=Rl(),x=b(E);xn(x,{children:(C,R)=>{var P=Oe();M(()=>D(P,_(d))),S(C,P)},$$slots:{default:!0}}),S(p,E)};q(v,p=>{_(d)&&p(y)})}var k=T(v,4);jl(k,{onselect:p=>L(o,Y(p)),get query(){return _(s)},set query(p){L(s,Y(p))}});var w=T(k,2);w.__click=[Ol,i,o,a,t,r],M(()=>w.disabled=!_(i)||!_(o)),S(e,u),ie()}ue(["click"]);async function Fl(e,t,n,r,i,a,o){try{L(t,!0),L(n,!1),r(await jo(r(),i())),L(a,Y(_(o)))}catch{L(n,!0)}finally{L(t,!1)}}var Dl=A('<div class="drag-handle svelte-1xio91e"><!></div>'),Bl=A('<div class="loading svelte-1xio91e">Loading...</div>'),Vl=A('<div class="bubble svelte-1xio91e"> </div> <!>',1),zl=A('<div class="error svelte-1xio91e"><!></div>'),$l=A("<div><!></div>"),Ul=A('<div class="empty svelte-1xio91e">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Wl=A('<button class="save svelte-1xio91e"> </button>'),Kl=A('<!> <div class="items svelte-1xio91e"></div> <!>',1),Yl=A('<div class="panel svelte-1xio91e"><!></div>'),Gl=A('<section class="editor playpilot-styled-scrollbar svelte-1xio91e"><!> <header class="header svelte-1xio91e"><h1 class="svelte-1xio91e">Playlinks</h1> <!></header> <!> <!></section>');function Zl(e,t){re(t,!0);let n=j(t,"linkInjections",15),r=j(t,"htmlString",3,""),i=j(t,"loading",3,!1);const a="editor-position";let o=$(null),d=Y(JSON.parse(localStorage.getItem(a)||'{ "x": 0, "y": 0 }')),s=$(!1),f=$(!1),l=$(!1),u=$(0),c=$("");const h=X(()=>JSON.stringify(n())),g=X(()=>_(c)!==_(h));Ot(()=>{i()||ze(()=>L(c,Y(_(h))))});function v(I){localStorage.setItem(a,JSON.stringify(I))}function y(I){n(n().filter(O=>O.key!==I))}function k(I){if(!_(o))return;const O=I.offsetTop,V=O+I.offsetHeight,Q=_(o).scrollTop,ae=Q+_(o).clientHeight;O>=Q&&V<=ae||_(o).scrollTo({top:O-_(o).clientHeight/2,behavior:"smooth"})}function w(I){const O=I.target;L(u,Y(O.scrollTop))}var p=Gl(),E=b(p);{var x=I=>{var O=Dl(),V=b(O);kl(V,{get element(){return _(o)},get position(){return d},limit:{x:16,y:16},onchange:v}),S(I,O)};q(E,I=>{_(o)&&I(x)})}var C=T(E,2),R=T(b(C),2);{var P=I=>{var O=Bl();S(I,O)},H=I=>{var O=Vl(),V=ne(O),Q=b(V),ae=T(V,2);bn(ae,{onclick:()=>L(s,!0),size:"24px","aria-label":"Add manual injection",children:(le,Ie)=>{var te=Oe("+");S(le,te)},$$slots:{default:!0}}),M(()=>{Z(V,"aria-label",`${n().length??""} found playlinks`),D(Q,n().length)}),S(I,O)};q(R,I=>{i()?I(P):I(H,!1)})}var W=T(C,2);{var ee=I=>{var O=Kl(),V=ne(O);{var Q=te=>{var oe=zl(),Le=b(oe);xn(Le,{children:(z,K)=>{var J=Oe("Something went wrong, check your links below.");S(z,J)},$$slots:{default:!0}}),Se(7,oe,()=>Pt,()=>({duration:150})),S(te,oe)};q(V,te=>{_(l)&&te(Q)})}var ae=T(V,2);$e(ae,31,n,te=>te.key,(te,oe,Le)=>{var z=$l(),K=b(z);yl(K,{onremove:()=>y(_(oe).key),onhighlight:k,get linkInjection(){return n()[_(Le)]},set linkInjection(J){n(n()[_(Le)]=J,!0)}}),va(z,()=>Vo,()=>({duration:300})),S(te,z)},te=>{var oe=Ul();S(te,oe)});var le=T(ae,2);{var Ie=te=>{var oe=Wl();oe.__click=[Fl,f,l,n,r,c,h];var Le=b(oe);M(()=>{oe.disabled=_(f),D(Le,_(f)?"Saving...":"Save links")}),Se(3,oe,()=>_t,()=>({y:70,opacity:1,duration:200})),S(te,oe)};q(le,te=>{_(g)&&n().length&&te(Ie)})}S(I,O)};q(W,I=>{i()||I(ee)})}var F=T(W,2);{var G=I=>{var O=Yl(),V=b(O);Hl(V,{get htmlString(){return r()},onclose:()=>L(s,!1),onsave:Q=>n().push(Q)}),M(()=>vn(O,"top",`${_(u)??""}px`)),Se(3,O,()=>_t,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),S(I,O)};q(F,I=>{_(s)&&I(G)})}Bt(p,I=>L(o,I),()=>_(o)),M(()=>{fe(p,"panel-open",_(s)),fe(p,"loading",i())}),he("scroll",p,w),S(e,p),ie()}ue(["click"]);var Jl=A('<div class="playpilot-link-injections svelte-1ogu7vd"><!> <!></div>');function Xl(e,t){re(t,!0);const n=wn(),r=ko(n),i=r.map(p=>p.outerHTML).join(""),a=hn();let o=$(Y([])),d=$(null),s=$(!1),f=$(!0);Ot(()=>{a&&u()}),at(()=>(Re(Pe.ArticlePageView),l(),()=>tn()));async function l(){a&&L(s,Y(await Ir()));const p=await No(Or(),i)||[];L(o,Y(p.filter(E=>E.title_details))),c(),L(f,!1)}function u(){tn(),c()}function c(){if(!_(o).length)return;const p=bo(r,_(o),h);JSON.stringify(_(o))!==JSON.stringify(p)&&L(o,Y(p))}function h(p){L(d,Y(p))}var g=Jl(),v=b(g);{var y=p=>{Zl(p,{htmlString:i,get loading(){return _(f)},get linkInjections(){return _(o)},set linkInjections(E){L(o,Y(E))}})};q(v,p=>{a&&_(s)&&p(y)})}var k=T(v,2);{var w=p=>{Do(p,{get title(){return _(d).title_details},onclose:()=>L(d,null)})};q(k,p=>{_(d)&&_(d).title_details&&p(w)})}S(e,g),ie()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=fn(Xl,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),tn()}};
7
+ `}}var Ta=A('<div class="popover svelte-8w8waf" tabindex="-1" aria-hidden="true"><div class="dialog svelte-8w8waf"><!></div></div>');function Ca(e,t){re(t,!0);let n=j(t,"maxHeight",15);gr("scope","popover");let r=$(null),i=$(!1);at(async()=>{await An(),a(),await An(),o()});function a(){if(!_(r))return;const{top:u,right:c,bottom:h,height:g}=_(r).getBoundingClientRect(),v=d();L(i,Y(u-v<0&&window.innerHeight-h>u+g));const y=window.innerWidth-c-v;c+v>window.innerWidth&&(_(r).style.left=`${y}px`)}function o(){if(!_(r))return;const{top:u,height:c}=_(r).getBoundingClientRect(),h=d(),g=_(i)?window.innerHeight-u-h:u+c-h;n(Math.min(g,window.innerHeight*.8))}function d(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var s=Ta(),f=b(s),l=b(f);it(l,()=>t.children),Bt(s,u=>L(r,u),()=>_(r)),M(()=>{fe(s,"flip",_(i)),vn(s,"--max-height",n()?n()+"px":null)}),Se(3,f,()=>_t,()=>({duration:100,y:10})),S(e,s),ie()}const Aa=[{slug:"100",name:"All",categories:{movie:100,series:100,documentary:100,kids:100,cinema:100,podcasts:100}},{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}],m=Object.freeze({English:"en-US",Swedish:"sv-SE"}),Pa={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med"},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ"},And:{[m.English]:"and",[m.Swedish]:"och"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Strömma"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyra"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyra"},All:{[m.English]:"All",[m.Swedish]:"Alla"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal"},Western:{[m.English]:"Western",[m.Swedish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj"}};function ce(e,t=Ia()){var n;return((n=Pa[e])==null?void 0:n[t])||e}function Ia(){var r,i;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.language,t=Object.values(m);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(i=document.querySelector("html"))==null?void 0:i.getAttribute("lang");return n&&t.includes(n)?n:m.English}var La=A('<div class="genre svelte-13nhocm"> </div>'),Ma=(e,t)=>L(t,!0),Na=A('<button class="genre expand svelte-13nhocm"> </button>'),ja=A("<!> <!>",1);function Oa(e,t){re(t,!0);let n=$(!1),r=X(()=>_(n)?t.genres:[t.genres[0]]);var i=ja(),a=ne(i);$e(a,17,()=>_(r),vt,(s,f)=>{var l=Qe();const u=X(()=>{var g;return(g=Aa.find(v=>v.slug===_(f)))==null?void 0:g.name});var c=ne(l);{var h=g=>{var v=La(),y=b(v);M(()=>D(y,ce(_(u)))),S(g,v)};R(c,g=>{_(u)&&g(h)})}S(s,l)});var o=T(a,2);{var d=s=>{var f=Na();f.__click=[Ma,n];var l=b(f);M(()=>D(l,`+${t.genres.length-1}`)),S(s,f)};R(o,s=>{!_(n)&&t.genres.length>1&&s(d)})}S(e,i),ie()}ue(["click"]);function qa(e){let t=[];for(const n of e){let r=n;const i=t.find(d=>d.name===r.name),a=i==null?void 0:i.extra_info.category,o=r.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(d=>d.name!==r.name),r={...r,extra_info:{...r.extra_info,category:"TVOD"}}),t.push(r)}return t}li();var Ra=Ce('<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 11L5 6L0 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ha(e){var t=Ra();S(e,t)}var Fa=(e,t,n)=>t(n()),Da=A('<div class="arrow svelte-1f6ryh6"><!></div>'),Ba=A('<a target="_blank" class="playlink svelte-1f6ryh6" rel="sponsored"><img alt="" height="32" width="32" class="svelte-1f6ryh6"> <div><span class="name svelte-1f6ryh6"> </span> <div class="category svelte-1f6ryh6"> </div></div> <!></a>'),Va=A('<div class="playlink empty svelte-1f6ryh6"> </div>'),za=A('<h2 class="svelte-1f6ryh6"> </h2> <div class="playlinks svelte-1f6ryh6"><!> <!></div>',1);function $a(e,t){re(t,!0);const n=j(t,"list",3,!1),r=Bi("scope")==="modal",i=X(()=>t.playlinks.filter(v=>!!v.logo_url)),a=X(()=>qa(_(i))),o={SVOD:ce("Stream"),BUY:ce("Buy"),RENT:ce("Rent"),TVOD:ce("Rent Or Buy")};function d(v){qe(r?Pe.TitleModalPlaylinkClick:Pe.TitlePopoverPlaylinkClick,t.title,{playlink:v})}var s=za(),f=ne(s),l=b(f);M(()=>D(l,ce("Where To Stream Online")));var u=T(f,2),c=b(u);$e(c,17,()=>_(a),vt,(v,y)=>{let k=()=>_(y).name,w=()=>_(y).url,p=()=>_(y).logo_url,E=()=>_(y).extra_info.category;var x=Ba();x.__click=[Fa,d,k];var C=b(x),q=T(C,2),P=b(q),H=b(P),W=T(P,2),ee=b(W);M(()=>D(ee,o[E()]||ce("Stream")));var F=T(q,2);{var G=I=>{var O=Da(),V=b(O);Ha(V),S(I,O)};R(F,I=>{n()&&I(G)})}M(()=>{Z(x,"href",w()),Z(x,"data-playlink",k()),Z(C,"src",p()),D(H,k())}),S(v,x)});var h=T(c,2);{var g=v=>{var y=Va(),k=b(y);M(()=>D(k,ce("Title Unavailable"))),S(v,y)};R(h,v=>{t.playlinks.length||v(g)})}M(()=>fe(u,"list",n())),S(e,s),ie()}ue(["click"]);var Ua=(e,t)=>L(t,!0),Wa=A('<button class="show-more svelte-fluzit">Show more</button>'),Ka=A('<p class="svelte-fluzit"> </p>'),Ya=A('<div><span class="paragraph svelte-fluzit"> <!> <!></span> <!></div>');function Ga(e,t){re(t,!0);const n=j(t,"blurb",3,""),r=j(t,"limit",3,200);let i=$(!1),a=X(()=>t.text.slice(0,r()));var o=Ya(),d=b(o),s=b(d),f=T(s);{var l=v=>{var y=Oe("...");S(v,y)};R(f,v=>{!_(i)&&t.text.length>r()&&v(l)})}var u=T(f,2);{var c=v=>{var y=Wa();y.__click=[Ua,i],S(v,y)};R(u,v=>{!_(i)&&(t.text.length>r()||n())&&v(c)})}var h=T(d,2);{var g=v=>{var y=Ka(),k=b(y);M(()=>D(k,n())),S(v,y)};R(h,v=>{_(i)&&v(g)})}M(()=>D(s,_(i)?t.text:_(a))),S(e,o),ie()}ue(["click"]);var Za=A('<div class="participant"> <div class="character svelte-15oguej"> <!></div></div>'),Ja=A('<h2 class="svelte-15oguej">Cast</h2> <div class="participants svelte-15oguej"></div>',1);function Xa(e,t){var n=Ja(),r=T(ne(n),2);$e(r,21,()=>t.participants,vt,(i,a)=>{var o=Za(),d=b(o),s=T(d),f=b(s);M(()=>{var c;return D(f,((c=_(a).character)==null?void 0:c.slice(0,20))||"")});var l=T(f);{var u=c=>{var h=Oe("...");S(c,h)};R(l,c=>{var h;(h=_(a).character)!=null&&h.length&&c(u)})}M(()=>D(d,`${_(a).name??""} `)),S(i,o)}),S(e,n)}var Qa=Ce('<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function gn(e){var t=Qa();S(e,t)}var eo=A('<div class="top svelte-zq2qln"><img class="poster svelte-zq2qln"></div>'),to=A("<div> </div>"),no=A("<!> <!>",1),ro=A('<div class="content svelte-zq2qln" data-playpilot-link-injections-title=""><header class="header svelte-zq2qln"><!> <h1 class="svelte-zq2qln"> </h1> <div class="info svelte-zq2qln"><div class="imdb svelte-zq2qln"><!> </div> <!> <div> </div> <div class="capitalize svelte-zq2qln"> </div> <!></div></header> <main class="main"><!> <!></main></div> <div class="background svelte-zq2qln"><img alt="" class="svelte-zq2qln"></div>',1);function Mr(e,t){re(t,!0);const n=j(t,"small",3,!1),r=j(t,"compact",3,!1);var i=ro(),a=ne(i),o=b(a),d=b(o);{var s=F=>{var G=eo(),I=b(G);M(()=>{Z(I,"src",t.title.standing_poster),Z(I,"alt",`Movie poster for '${t.title.title??""}'`)}),S(F,G)};R(d,F=>{r()||F(s)})}var f=T(d,2),l=b(f),u=T(f,2),c=b(u),h=b(c);gn(h);var g=T(h),v=T(c,2);Oa(v,{get genres(){return t.title.genres}});var y=T(v,2),k=b(y),w=T(y,2),p=b(w);M(()=>D(p,ce(`Type: ${t.title.type}`)));var E=T(w,2);{var x=F=>{var G=to(),I=b(G);M(()=>D(I,`${t.title.length??""} ${ce("Minutes")??""}`)),S(F,G)};R(E,F=>{t.title.length&&F(x)})}var C=T(o,2),q=b(C);$a(q,{get playlinks(){return t.title.providers},get title(){return t.title},list:!0});var P=T(q,2);{var H=F=>{var G=no(),I=ne(G);Ga(I,{get text(){return t.title.description},get blurb(){return t.title.blurb}});var O=T(I,2);{var V=Q=>{Xa(Q,{get participants(){return t.title.participants}})};R(O,Q=>{var ae;(ae=t.title.participants)!=null&&ae.length&&Q(V)})}S(F,G)};R(P,F=>{n()||F(H)})}var W=T(a,2),ee=b(W);M(()=>{Z(a,"data-playpilot-original-title",t.title.original_title),fe(a,"small",n()),fe(a,"compact",r()),D(l,t.title.title),D(g,` ${t.title.imdb_score??""}`),D(k,t.title.year),fe(W,"faded",r()),Z(ee,"src",t.title.medium_poster)}),S(e,i),ie()}function io(e,t){re(t,!0);let n=$(0);qe(Pe.TitlePopoverView,t.title),Ca(e,{get maxHeight(){return _(n)},set maxHeight(r){L(n,Y(r))},children:(r,i)=>{var a=X(()=>_(n)<250);Mr(r,{get title(){return t.title},small:!0,get compact(){return _(a)}})},$$slots:{default:!0}}),ie()}var ao=(e,t,n,r)=>t(_(n).title_details,_(r)),oo=A(' <span class="svelte-6p0hvs"><button class="svelte-6p0hvs"> </button></span>',1),lo=(e,t,n,r)=>t(_(n).title_details,r()),so=A('<!> <a target="_blank"> </a>',1),co=A(" <!>.",1),uo=A("<!> <br>",1),fo=A(" <br>",1),vo=A('<span class="svelte-6p0hvs"><!></span>'),_o=A("<p></p>");function ho(e,t){re(t,!0);const n=j(t,"onclickmodal",3,s=>null);function r(s,f){qe(Pe.AfterArticlePlaylinkClick,s,{playlink:f})}function i(s,f){qe(Pe.AfterArticleModalButtonClick,s),n()(f)}var a=Qe(),o=ne(a);{var d=s=>{var f=_o();$e(f,21,()=>t.linkInjections,vt,(l,u)=>{var c=vo();const h=X(()=>{const{key:w,title:p,title_details:E,after_article_style:x}=_(u);return{key:w,title:p,title_details:E,after_article_style:x}}),g=X(()=>{var w;return((w=_(h).title_details)==null?void 0:w.providers)||[]});var v=b(c);{var y=w=>{var p=uo(),E=ne(p);{var x=q=>{var P=oo(),H=ne(P);M(()=>D(H,`"${_(h).title??""}" ${ce("Is Available To Stream")??""} `));var W=T(H),ee=b(W);ee.__click=[ao,i,h,u];var F=b(ee);M(()=>D(F,ce("View Streaming Options"))),S(q,P)},C=q=>{var P=co(),H=ne(P);M(()=>D(H,`"${_(h).title??""}" ${ce("Is Available To Stream On")??""} `));var W=T(H);$e(W,17,()=>_(g),vt,(ee,F,G)=>{let I=()=>_(F).name,O=()=>_(F).url;var V=so(),Q=ne(V);{var ae=te=>{var oe=Oe();M(()=>D(oe,G===_(g).length-1?`, ${ce("And")}`:",")),S(te,oe)};R(Q,te=>{G&&te(ae)})}var le=T(Q,2);le.__click=[lo,r,h,I];var Ie=b(le);M(()=>{Z(le,"href",O()),D(Ie,I())}),S(ee,V)}),S(q,P)};R(E,q=>{_(h).after_article_style==="modal_button"?q(x):q(C,!1)})}S(w,p)},k=w=>{var p=fo(),E=ne(p);M(()=>D(E,`"${_(h).title??""}" ${ce("Title Unavailable Suffix")??""} `)),S(w,p)};R(v,w=>{_(g).length?w(y):w(k,!1)})}M(()=>Z(c,"data-playpilot-injection-key",_(h).key)),S(l,c)}),S(s,f)};R(o,s=>{t.linkInjections.length&&s(d)})}S(e,a),ie()}ue(["click"]);function mo(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Nr(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function go(e,t,n=[]){var a,o;const r=document.createTreeWalker(t);let i;for(;(i=r.nextNode())&&!((a=i.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=i.parentNode)==null?void 0:o.nodeName)||"")););return i}function po(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function yo(e,t,n,r){const i=mo(t),a=Nr(t),o=e.slice(0,r),d=e.slice(r),s=/[-/\\^$*+?.()|[\]{}]/g,f=new RegExp(`${a.replace(s,"\\$&")}|${i.replace(s,"\\$&")}`),l=d.replace(f,n);return o+l}function wo(e){let t=0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return t}const pn="data-playpilot-injection-key",yn=`[${pn}]`,It={};let en=null;function ko(e){let t=[],n=[e];for(;n.length>0;){const r=n.pop();if(/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|H[1-6])$/.test(r.tagName))continue;if(Array.from(r.childNodes).some(o=>{var d;return o.nodeType===Node.TEXT_NODE&&((d=o.nodeValue)==null?void 0:d.trim())!==""})){t.push(r);continue}const a=Array.from(r.children);for(let o=a.length-1;o>=0;o--)n.push(a[o])}return t}function wn(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),r=document.querySelector(n);if(r)return r}return document.querySelector("article")||document.querySelector("main")||document.body}function bo(e,t,n){var f;const r=e.map(l=>l.innerText).join(" "),i=t.filter(l=>l.in_text!==!1&&!l.inactive),a=i.filter(l=>r.includes(l.sentence)),o={};for(const l of a){const u=e.findIndex(w=>w.innerText.includes(l.sentence)),c=e[u];if(!c)continue;const h=go(l.title,c,["A"]);if(!h||po(h))continue;const g=document.createElement("span");g.dataset.playpilotInjectionKey=l.key;const v=document.createElement("a");v.innerText=l.title,v.href=l.playpilot_url,v.dataset.playpilotOriginalTitle=(f=l.title_details)==null?void 0:f.original_title,v.target="_blank",v.rel="noopener nofollow noreferrer",g.insertAdjacentElement("beforeend",v);const y=wo(Object.values(o).filter(w=>w.elementIndex===u).map(w=>w.to));c.innerHTML=yo(c.innerHTML,l.title,g.outerHTML,y);const k=c.innerHTML.indexOf(g.outerHTML);o[l.key]={elementIndex:u,from:k,to:k+g.outerHTML.length}}xo(i,n),So();const d=t.filter(l=>l.after_article&&!l.inactive);return d.length&&Co(e,d,n),Po(t,o).map(l=>{const u=!l.inactive&&!l.after_article&&!document.querySelector(`[${pn}="${l.key}"]`);return{...l,inactive:!!l.inactive,failed:u}})}function So(){const e=Array.from(document.querySelectorAll(`${yn} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(r=>{getComputedStyle(n).getPropertyValue(r)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${r}`)})})}function xo(e,t){window.addEventListener("click",r=>{const i=r.target;if(!(i!=null&&i.parentElement))return;const a=i.parentElement.getAttribute(pn);if(!a)return;const o=e.find(d=>a===d.key);o&&Eo(r,o,t)}),document.querySelectorAll(yn).forEach(r=>{const i=r.dataset.playpilotInjectionKey,a=e.find(o=>i===o.key);a&&(r.addEventListener("mouseenter",o=>To(o,a)),r.addEventListener("mouseleave",()=>Lt(a)))})}function Eo(e,t,n){e.ctrlKey||e.metaKey||e.button!==0||(e.preventDefault(),n(t),Lt(t))}function To(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;const n=e.currentTarget,r=fn(io,{target:n,props:{title:t.title_details}});It[t.key]={injection:t,component:r}}function Lt(e,t=!0){const n=It[e.key];n&&Sr(n.component,{outro:t})}function Co(e,t,n){if(!t.length)return;const r=document.createElement("div");r.dataset.playpilotAfterArticlePlaylinks="true",e[e.length-1].insertAdjacentElement("afterend",r),en=fn(ho,{target:r,props:{linkInjections:t,onclickmodal:n}})}function Ao(){var e;en&&(Sr(en),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove())}function tn(){Object.values(It).forEach(t=>Lt(t.injection)),document.querySelectorAll(yn).forEach(t=>t.outerHTML=t.textContent||""),Object.values(It).forEach(({injection:t})=>Lt(t,!1)),Ao()}function Po(e,t){return e.sort((n,r)=>{const i=t[n.key],a=t[r.key];return!i&&a?1:i&&!a?-1:!i&&!a?0:(i==null?void 0:i.elementIndex)!==(a==null?void 0:a.elementIndex)?((i==null?void 0:i.elementIndex)||0)-((a==null?void 0:a.elementIndex)||0):((i==null?void 0:i.from)||0)-((a==null?void 0:a.from)||0)})}function Io(){const e=wn();return{heading:Lo(e),modified_time:Mo(e),published_time:No(e)}}function Lo(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Mo(e){const t=document.querySelector('meta[property*="modified_time"]')||e.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?jr(n):null}function No(e){const t=document.querySelector('meta[property*="published_time"]')||e.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||e.querySelector("time")||document.querySelector("time")||e.querySelector("[datetime]")||document.querySelector("[datetime]")||null,n=(t==null?void 0:t.getAttribute("content"))||(t==null?void 0:t.getAttribute("datetime"))||(t==null?void 0:t.innerText);return n?jr(n):null}function jr(e){try{return new Date(e).toISOString()}catch{return null}}function Or(){return location.protocol+"//"+location.host+location.pathname}let Wt=null;async function qr(e,t,{hash:n=Lr(t),params:r={}}={}){const i=new Headers({"Content-Type":"application/json"}),a=kn(),o=hn()?await Pr():!1,d=Io();if(!a)throw new Error("No token was provided");const s=await fetch(_n+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}`,{headers:i,method:"POST",body:JSON.stringify({hash:n,url:e,metadata:d,page_text:t,...r})});if(!s.ok)throw s;return await s.json()}async function jo(e,t,n=3e3,r=600){let i=Lr(t),a=0;Wt&&clearTimeout(Wt);const o=async(d,s)=>{var f;try{const l=await qr(e,t,{hash:i});if(l.injections_enabled===!1&&!hn()){d([]);return}if(l.injections_ready===!1&&((f=l.link_injections)!=null&&f.length)){l.link_injections=Hn(l.link_injections),d(l.link_injections||[]);return}if(l.injections_ready){l.link_injections&&(l.link_injections=Hn(l.link_injections)),d(l.link_injections||[]);return}throw new Error}catch{if(a++,a>=r){console.error("Max poll limit exceeded. Please return later."),d();return}Wt=setTimeout(()=>o(d),n)}};return new Promise(o)}async function Oo(e,t){var a;const n=(a=window.PlayPilotLinkInjections)==null?void 0:a.selector,r=e.map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive}));if(!await qr(Or(),t,{params:{private_token:Ir(),automation_enabled:!1,link_injections:r,text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}function Hn(e){return e.map(t=>({...t,key:Rr(t.sid)}))}function Rr(e){return e+"-"+(Math.random()+1).toString(36).substring(7)}function kn(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}var qo=Ce('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ro(e){var t=qo();S(e,t)}function bn(e,t){re(t,!0);const n=j(t,"children",3,null),r=j(t,"size",3,"margin(2)"),i=j(t,"onclick",3,()=>null),a=ga(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var o=Qe(),d=ne(o);ia(d,()=>t.href?"a":"button",!1,(s,f)=>{let l;M(()=>{l=sa(s,l,{role:t.href?"link":"button",onclick:i(),class:"button",...a},"svelte-1qqv88o",s.namespaceURI===Wn,s.nodeName.includes("-")),vn(s,"--size",r())});var u=Qe(),c=ne(u);it(c,()=>n()??He),S(f,u)}),S(e,o),ie()}var Ho=(e,t)=>t()(),Fo=A('<div class="modal svelte-1riopfw"><div class="dialog svelte-1riopfw" role="dialog"><div class="close svelte-1riopfw"><!></div> <!></div> <div class="backdrop svelte-1riopfw"></div></div>');function Do(e,t){re(t,!0);const n=j(t,"onclose",3,()=>null),r=j(t,"onscroll",3,()=>null);gr("scope","modal"),at(()=>{const u=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=u||""});function i(u){return window.innerWidth<600?_t(u,{duration:250,y:window.innerHeight}):Ea(u,{duration:150,start:.85})}var a=Fo();he("keydown",pe,({key:u})=>{u==="Escape"&&n()()});var o=b(a),d=b(o),s=b(d);bn(s,{onclick:()=>n()(),children:(u,c)=>{Ro(u)},$$slots:{default:!0}});var f=T(d,2);it(f,()=>t.children);var l=T(o,2);l.__click=[Ho,n],he("scroll",o,function(...u){var c;(c=r())==null||c.apply(this,u)}),Se(3,o,()=>i),Se(3,a,()=>xa,()=>({duration:150})),S(e,a),ie()}ue(["click"]);function Bo(e,t){re(t,!0),qe(Pe.TitleModalView,t.title);let n=!1;function r(){n||(qe(Pe.TitleModalScroll,t.title),n=!0)}Do(e,{get onclose(){return t.onclose},onscroll:r,children:(i,a)=>{Mr(i,{get title(){return t.title}})},$$slots:{default:!0}}),ie()}function Vo(e){const t=e-1;return t*t*t+1}function zo(e,{from:t,to:n},r={}){var i=getComputedStyle(e),a=$o(e),o=i.transform==="none"?"":i.transform,[d,s]=i.transformOrigin.split(" ").map(parseFloat),f=t.width/n.width,l=t.height/n.height,u=(t.left+f*d-(n.left+d))/a,c=(t.top+l*s-(n.top+s))/a,{delay:h=0,duration:g=y=>Math.sqrt(y)*120,easing:v=Vo}=r;return{delay:h,duration:typeof g=="function"?g(Math.sqrt(u*u+c*c)):g,easing:v,css:(y,k)=>{var w=k*u,p=k*c,E=y+k*f,x=y+k*l;return`transform: ${o} scale(${E}, ${x}) translate(${w}px, ${p}px);`}}}function $o(e){if("currentCSSZoom"in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var Uo=Ce('<svg width="8" height="4" viewBox="0 0 8 4" fill="none" class="svelte-by11ix"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Wo(e,t){const n=j(t,"expanded",3,!1);var r=Uo();M(()=>fe(r,"expanded",n())),S(e,r)}function Ko(e,t,n){t(!t()),n()(t())}var Yo=A('<button class="switch svelte-91s87b"><div class="label svelte-91s87b"><!></div> <div class="track svelte-91s87b"><div class="knob svelte-91s87b"></div></div></button>');function nn(e,t){re(t,!0);let n=j(t,"active",15),r=j(t,"fullwidth",3,!1),i=j(t,"label",3,""),a=j(t,"onclick",3,()=>null);var o=Yo();o.__click=[Ko,n,a];var d=b(o),s=b(d);it(s,()=>t.children),M(()=>{Z(o,"aria-label",`Toggle ${i()??""} ${(n()?"off":"on")??""}`),fe(o,"active",n()),fe(o,"fullwidth",r())}),S(e,o),ie()}ue(["click"]);var Go=A('<input type="text" class="svelte-1vrer3i">');function Sn(e,t){let n=j(t,"value",15),r=j(t,"label",3,""),i=j(t,"name",3,""),a=j(t,"readonly",3,!1),o=j(t,"oninput",3,()=>null);var d=Go();d.__input=function(...s){var f;(f=o())==null||f.apply(this,s)},M(()=>{Z(d,"name",i()),Z(d,"aria-label",r()),Z(d,"placeholder",r()),d.readOnly=a()}),_a(d,n),S(e,d)}ue(["input"]);var Zo=Ce('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Jo=Ce('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Xo=Ce('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Fn(e,t){let n=j(t,"align",3,"bottom");var r=Xo(),i=b(r);{var a=d=>{var s=Zo();S(d,s)},o=d=>{var s=Qe(),f=ne(s);{var l=u=>{var c=Jo();S(u,c)};R(f,u=>{n()==="center"&&u(l)},!0)}S(d,s)};R(i,d=>{n()==="bottom"?d(a):d(o,!1)})}S(e,r)}var Qo=A("<!> In-text Playlink",1),el=A("<!> Bottom Playlink",1),tl=(e,t)=>t().after_article_style="playlinks",nl=(e,t)=>t().after_article_style="modal_button",rl=A('<div><div class="label svelte-14krcvc">Bottom playlinks style</div> <div class="group svelte-14krcvc" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-14krcvc">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-14krcvc">Modal button</button> <div class="active-marker svelte-14krcvc"></div></div></div>'),il=A('<div class="switches svelte-14krcvc"><!> <!></div> <!>',1);function al(e,t){re(t,!0);let n=j(t,"linkInjection",7),r=X(()=>n().after_article_style==="modal_button");var i=il(),a=ne(i),o=b(a),d=X(()=>n().in_text??!0);nn(o,{fullwidth:!0,get active(){return _(d)},onclick:c=>n().in_text=c,label:"In-text Playlink",children:(c,h)=>{var g=Qo(),v=ne(g);Fn(v,{align:"center"}),S(c,g)},$$slots:{default:!0}});var s=T(o,2),f=X(()=>n().after_article??!1);nn(s,{fullwidth:!0,get active(){return _(f)},onclick:c=>n().after_article=c,label:"Bottom Playlink",children:(c,h)=>{var g=el(),v=ne(g);Fn(v,{align:"bottom"}),S(c,g)},$$slots:{default:!0}});var l=T(a,2);{var u=c=>{var h=rl(),g=T(b(h),2),v=b(g);v.__click=[tl,n];var y=T(v,2);y.__click=[nl,n];var k=T(y,2);M(()=>{Z(g,"aria-activedescendant",`playlinks-${(_(r)?"after-article":"in-text")??""}`),Z(v,"aria-selected",!_(r)||null),fe(v,"active",!_(r)),Z(y,"aria-selected",_(r)||null),fe(y,"active",_(r)),fe(k,"right",_(r))}),Se(3,h,()=>Pt,()=>({duration:100})),S(c,h)};R(l,c=>{n().after_article&&c(u)})}S(e,i),ie()}ue(["click"]);var ol=A('<div class="alert svelte-1tq7qhv"><!></div>');function xn(e,t){re(t,!0);var n=ol(),r=b(n);it(r,()=>t.children),S(e,n),ie()}var ll=Ce('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function sl(e){var t=ll();S(e,t)}var cl=(e,t)=>L(t,!_(t)),ul=A('<div class="content svelte-1fmy0wh"><!></div>'),dl=A('<div class="context-menu svelte-1fmy0wh"><button class="svelte-1fmy0wh"><!></button> <!></div>');function fl(e,t){re(t,!0);let n=$(!1),r=$(null);function i(l){var c;const u=l.target;u===_(r)||(c=_(r))!=null&&c.contains(u)||L(n,!1)}var a=dl();he("click",pe,i);var o=b(a);o.__click=[cl,n];var d=b(o);sl(d),Bt(o,l=>L(r,l),()=>_(r));var s=T(o,2);{var f=l=>{var u=ul(),c=b(u);it(c,()=>t.children),Se(1,u,()=>_t,()=>({duration:150,y:5})),S(l,u)};R(s,l=>{_(n)&&l(f)})}M(()=>{Z(o,"aria-label",t.ariaLabel),Z(o,"aria-expanded",_(n))}),S(e,a),ie()}ue(["click"]);function vl(e,t,n){requestAnimationFrame(()=>t());const r=e.target;if(["BUTTON","INPUT"].includes(r.nodeName)||r.closest("button")||r.closest("input"))return;const i=n()[0];i&&i.scrollIntoView({behavior:"smooth"})}var _l=A('<span data-testid="length" class="svelte-1bz02u6"> </span>'),hl=A('<button class="context-menu-action svelte-1bz02u6">Remove</button>'),ml=(e,t)=>L(t,!_(t)),gl=A('<div class="actions svelte-1bz02u6"><button class="expand svelte-1bz02u6" aria-label="Expand"><!></button> <!></div>'),pl=A('<div class="expanded svelte-1bz02u6"><div class="label svelte-1bz02u6">Link URL</div> <!> <div class="label offset svelte-1bz02u6">Layout options</div> <div class="type-select svelte-1bz02u6"><!></div></div>'),yl=A('<div class="item svelte-1bz02u6"><div class="header svelte-1bz02u6"><img class="poster svelte-1bz02u6" alt=""> <div class="info"><div class="title svelte-1bz02u6"> </div> <div class="meta svelte-1bz02u6"><span class="svelte-1bz02u6"><!> 7.1</span> <span class="svelte-1bz02u6"> </span> <span class="svelte-1bz02u6"> </span> <!></div></div> <div class="context-menu svelte-1bz02u6"><!></div></div> <div class="content svelte-1bz02u6"><!> <!></div></div>');function wl(e,t){re(t,!0);const n=j(t,"linkInjection",15),r=j(t,"onremove",3,()=>null),i=j(t,"onhighlight",3,()=>null),a=X(()=>n()||{}),o=X(()=>_(a).key),d=X(()=>_(a).sentence),s=X(()=>_(a).title_details),f=X(()=>_(a).failed),l=X(()=>_(s));let u=$(!1),c=$(!1),h=$(null);at(()=>{_(f)&&qe(Pe.InjectionFailed,_(l),{phrase:n().title,sentence:_(d)})});function g(z=!0){y().forEach(J=>{J.classList.toggle("injection-highlight",z)})}function v(z){let K=z.target,J=K==null?void 0:K.dataset.playpilotInjectionKey;K&&!J&&(K=K.closest(`[data-playpilot-injection-key="${_(o)}"]`),J=K==null?void 0:K.dataset.playpilotInjectionKey),L(c,J===_(o)),_(h)&&_(c)&&i()(_(h))}function y(){return Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${_(o)}"]`))}var k=yl();he("mouseover",pe,v),k.__click=[vl,g,y];var w=b(k),p=b(w),E=T(p,2),x=b(E),C=b(x),q=T(x,2),P=b(q),H=b(P);gn(H);var W=T(P,2),ee=b(W),F=T(W,2),G=b(F),I=T(F,2);{var O=z=>{var K=_l(),J=b(K);M(()=>D(J,`${_(l).length??""}m`)),S(z,K)};R(I,z=>{_(l).length&&z(O)})}var V=T(E,2),Q=b(V);fl(Q,{ariaLabel:"More options",children:(z,K)=>{var J=hl();J.__click=function(...Re){var We;(We=r())==null||We.apply(this,Re)},S(z,J)},$$slots:{default:!0}});var ae=T(w,2),le=b(ae);{var Ie=z=>{xn(z,{children:(K,J)=>{var Re=Oe("A match was found, but the link could not be injected.");S(K,Re)},$$slots:{default:!0}})},te=z=>{var K=gl(),J=b(K);J.__click=[ml,u];var Re=b(J);Wo(Re,{get expanded(){return _(u)}});var We=T(J,2),Vt=X(()=>!n().inactive);nn(We,{label:"Visible",get active(){return _(Vt)},onclick:zt=>n(n().inactive=!zt,!0),children:(zt,es)=>{var Hr=Oe("Visible");S(zt,Hr)},$$slots:{default:!0}}),M(()=>Z(J,"aria-expanded",_(u))),S(z,K)};R(le,z=>{_(f)?z(Ie):z(te,!1)})}var oe=T(le,2);{var Le=z=>{var K=pl(),J=T(b(K),2);Sn(J,{label:"Playlink URL",get value(){return n().playpilot_url},set value(Vt){n(n().playpilot_url=Vt,!0)}});var Re=T(J,4),We=b(Re);al(We,{get linkInjection(){return n()}}),Se(3,K,()=>Pt,()=>({duration:100})),S(z,K)};R(oe,z=>{_(u)&&z(Le)})}Bt(k,z=>L(h,z),()=>_(h)),M(()=>{fe(k,"highlighted",_(c)),Z(p,"src",_(l).standing_poster),D(C,_(l).title),D(ee,_(l).year),D(G,_(l).type)}),he("mouseenter",k,()=>g(!0)),he("mouseleave",k,()=>g(!1)),Se(6,k,()=>Pt,()=>({duration:200})),S(e,k),ie()}ue(["click"]);var kl=A('<button class="drag-handle svelte-bwc0q8" aria-label="Move editor"></button>');function bl(e,t){re(t,!0);let n=j(t,"element",7),r=j(t,"position",23,()=>({x:0,y:0})),i=j(t,"limit",19,()=>({x:0,y:0})),a=j(t,"onchange",3,()=>null),o=!1,d={x:0,y:0},s=r();at(()=>{f(r().x,r().y)});function f(v,y){const k=window.innerWidth,w=window.innerHeight,p=n().clientWidth,E=n().clientHeight;v=Math.min(Math.max(v,i().x),k-p-i().x),y=Math.min(Math.max(y,i().y),w-E-i().y),n().style.right=v+"px",n().style.bottom=Math.max(y,i().y)+"px",r({x:v,y}),a()(r())}function l(v){var y,k;return{x:v.pageX||((y=v.touches)==null?void 0:y[0].pageX)||0,y:v.pageY||((k=v.touches)==null?void 0:k[0].pageY)||0}}function u(v){o=!0,d=l(v),s=r()}function c(v){if(!o)return;const y=l(v),k=y.x-d.x,w=y.y-d.y,p=s.x-k,E=s.y-w;f(p,E)}function h(){o&&(o=!1)}var g=kl();he("mousemove",pe,c),he("touchmove",pe,c,void 0,!0),he("mouseup",pe,h),he("touchend",pe,h),he("resize",pe,()=>f(r().x,r().y)),g.__mousedown=u,g.__touchstart=u,S(e,g),ie()}ue(["mousedown","touchstart"]);var Sl=Ce('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function xl(e){var t=Sl();S(e,t)}async function El(e){const t=new Headers({"Content-Type":"application/json"}),n=kn();if(!n)throw new Error("No token was provided");const r=await fetch(_n+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!r.ok)throw r;return await r.json()}var Tl=Ce('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Cl(e){var t=Tl();S(e,t)}var Al=(e,t,n)=>t(_(n)),Pl=A("<div> </div>"),Il=e=>e.stopImmediatePropagation(),Ll=A('<button class="item svelte-15ml41d"><img class="poster svelte-15ml41d" alt="" width="28" height="42"> <div class="content"><div class="name svelte-15ml41d"> </div> <div class="meta svelte-15ml41d"><div class="imdb svelte-15ml41d"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-15ml41d"><!></a></button>'),Ml=A('<em class="empty svelte-15ml41d">No results found</em>'),Nl=A('<div class="results svelte-15ml41d"></div>'),jl=A('<div class="search svelte-15ml41d"><!> <!></div>');function Ol(e,t){re(t,!0);let n=j(t,"onselect",3,()=>null),r=j(t,"query",15),i=$(Y([])),a=$(null),o=$(!1);Ot(()=>{r()&&d(r())});async function d(h){L(o,!0),L(a,null);try{L(i,Y(await El(h)))}finally{L(o,!1)}}function s(h){r(h.title),L(a,Y(h)),n()(h)}var f=jl(),l=b(f);Sn(l,{name:"search",label:"Search...",get value(){return r()},set value(h){r(h)}});var u=T(l,2);{var c=h=>{var g=Nl();$e(g,21,()=>_(i),v=>v.sid,(v,y)=>{var k=Ll();k.__click=[Al,s,y];var w=b(k),p=T(w,2),E=b(p),x=b(E),C=T(E,2),q=b(C),P=b(q);gn(P);var H=T(P),W=T(q,2),ee=b(W),F=T(W,2),G=b(F),I=T(F,2);{var O=ae=>{var le=Pl(),Ie=b(le);M(()=>D(Ie,`${_(y).length??""} min`)),S(ae,le)};R(I,ae=>{_(y).length&&ae(O)})}var V=T(p,2);V.__click=[Il];var Q=b(V);Cl(Q),M(()=>{Z(w,"src",_(y).standing_poster),D(x,_(y).title),D(H,` ${_(y).imdb_score??""}`),D(ee,_(y).year),D(G,_(y).type),Z(V,"href",`${Cr}/${_(y).type??""}/${_(y).slug??""}`)}),S(v,k)},v=>{var y=Qe(),k=ne(y);{var w=p=>{var E=Ml();S(p,E)};R(k,p=>{_(o)||p(w)})}S(v,y)}),S(h,g)};R(u,h=>{r()&&!_(a)&&h(c)})}S(e,f),ie()}ue(["click"]);function ql(e,t,n,r,i,a){if(!_(t)||!_(n))return;const o=_(n).type==="movie"?"movie":"show",d=Cr+`/${o}/${_(n).slug}`,s={sid:_(n).sid,title:_(t),sentence:_(r),playpilot_url:d,key:Rr(_(n).sid),title_details:_(n)};i.onsave(s),a()()}var Rl=A('<div class="error svelte-c3phlu"><!></div>'),Hl=A('<section class="layout svelte-c3phlu"><div class="header svelte-c3phlu"><!> <h2 class="svelte-c3phlu">Add Playlink manually</h2></div> <p class="svelte-c3phlu">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-c3phlu">Selected text</label> <!> <!> <label for="text" class="svelte-c3phlu">Paired title</label> <!> <button class="save svelte-c3phlu">Add playlink</button></section>');function Fl(e,t){re(t,!0);let n=j(t,"htmlString",3,""),r=j(t,"onclose",3,()=>null),i=$(""),a=$(""),o=$(null),d=$(""),s=$("");at(f);function f(){const p=window.getSelection();if(!(p!=null&&p.anchorNode)||!wn().contains(p.anchorNode.parentElement))return;const E=p.toString().trim();if(!E)return;L(d,""),L(i,Y(E)),L(s,Y(_(i))),L(a,Y(l(p,E)));const x=p.getRangeAt(0).commonAncestorContainer.textContent,C=Nr(n());(!x||!C.includes(x))&&L(d,"Selection was not inside of given content")}function l(p,E){const x=p.getRangeAt(0);let C=x.startContainer;if((C.textContent||"").length<=E.length*2&&x.startContainer.parentNode&&(C=x.startContainer.parentNode),!C)return"";const q=C.textContent||"",P=x.startOffset,H=x.endOffset,W=q.slice(0,P).lastIndexOf("."),ee=q.slice(H).search(/[.!?]/),F=W===-1?0:W+1,G=ee===-1?q.length:H+ee+1;return q.slice(F,G).trim()}var u=Hl();he("mouseup",pe,f);var c=b(u),h=b(c);bn(h,{get onclick(){return r()},size:"24px",children:(p,E)=>{xl(p)},$$slots:{default:!0}});var g=T(c,6);Sn(g,{get value(){return _(i)},label:"Select text on the page",name:"selected-text",readonly:!0});var v=T(g,2);{var y=p=>{var E=Rl(),x=b(E);xn(x,{children:(C,q)=>{var P=Oe();M(()=>D(P,_(d))),S(C,P)},$$slots:{default:!0}}),S(p,E)};R(v,p=>{_(d)&&p(y)})}var k=T(v,4);Ol(k,{onselect:p=>L(o,Y(p)),get query(){return _(s)},set query(p){L(s,Y(p))}});var w=T(k,2);w.__click=[ql,i,o,a,t,r],M(()=>w.disabled=!_(i)||!_(o)),S(e,u),ie()}ue(["click"]);async function Dl(e,t,n,r,i,a,o){try{L(t,!0),L(n,!1),r(await Oo(r(),i())),L(a,Y(_(o)))}catch{L(n,!0)}finally{L(t,!1)}}var Bl=A('<div class="drag-handle svelte-1xio91e"><!></div>'),Vl=A('<div class="loading svelte-1xio91e">Loading...</div>'),zl=A('<div class="bubble svelte-1xio91e"> </div> <!>',1),$l=A('<div class="error svelte-1xio91e"><!></div>'),Ul=A("<div><!></div>"),Wl=A('<div class="empty svelte-1xio91e">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Kl=A('<button class="save svelte-1xio91e"> </button>'),Yl=A('<!> <div class="items svelte-1xio91e"></div> <!>',1),Gl=A('<div class="panel svelte-1xio91e"><!></div>'),Zl=A('<section class="editor playpilot-styled-scrollbar svelte-1xio91e"><!> <header class="header svelte-1xio91e"><h1 class="svelte-1xio91e">Playlinks</h1> <!></header> <!> <!></section>');function Jl(e,t){re(t,!0);let n=j(t,"linkInjections",15),r=j(t,"htmlString",3,""),i=j(t,"loading",3,!1);const a="editor-position";let o=$(null),d=Y(JSON.parse(localStorage.getItem(a)||'{ "x": 0, "y": 0 }')),s=$(!1),f=$(!1),l=$(!1),u=$(0),c=$("");const h=X(()=>JSON.stringify(n())),g=X(()=>_(c)!==_(h));Ot(()=>{i()||ze(()=>L(c,Y(_(h))))});function v(I){localStorage.setItem(a,JSON.stringify(I))}function y(I){n(n().filter(O=>O.key!==I))}function k(I){if(!_(o))return;const O=I.offsetTop,V=O+I.offsetHeight,Q=_(o).scrollTop,ae=Q+_(o).clientHeight;O>=Q&&V<=ae||_(o).scrollTo({top:O-_(o).clientHeight/2,behavior:"smooth"})}function w(I){const O=I.target;L(u,Y(O.scrollTop))}var p=Zl(),E=b(p);{var x=I=>{var O=Bl(),V=b(O);bl(V,{get element(){return _(o)},get position(){return d},limit:{x:16,y:16},onchange:v}),S(I,O)};R(E,I=>{_(o)&&I(x)})}var C=T(E,2),q=T(b(C),2);{var P=I=>{var O=Vl();S(I,O)},H=I=>{var O=zl(),V=ne(O),Q=b(V),ae=T(V,2);bn(ae,{onclick:()=>L(s,!0),size:"24px","aria-label":"Add manual injection",children:(le,Ie)=>{var te=Oe("+");S(le,te)},$$slots:{default:!0}}),M(()=>{Z(V,"aria-label",`${n().length??""} found playlinks`),D(Q,n().length)}),S(I,O)};R(q,I=>{i()?I(P):I(H,!1)})}var W=T(C,2);{var ee=I=>{var O=Yl(),V=ne(O);{var Q=te=>{var oe=$l(),Le=b(oe);xn(Le,{children:(z,K)=>{var J=Oe("Something went wrong, check your links below.");S(z,J)},$$slots:{default:!0}}),Se(7,oe,()=>Pt,()=>({duration:150})),S(te,oe)};R(V,te=>{_(l)&&te(Q)})}var ae=T(V,2);$e(ae,31,n,te=>te.key,(te,oe,Le)=>{var z=Ul(),K=b(z);wl(K,{onremove:()=>y(_(oe).key),onhighlight:k,get linkInjection(){return n()[_(Le)]},set linkInjection(J){n(n()[_(Le)]=J,!0)}}),va(z,()=>zo,()=>({duration:300})),S(te,z)},te=>{var oe=Wl();S(te,oe)});var le=T(ae,2);{var Ie=te=>{var oe=Kl();oe.__click=[Dl,f,l,n,r,c,h];var Le=b(oe);M(()=>{oe.disabled=_(f),D(Le,_(f)?"Saving...":"Save links")}),Se(3,oe,()=>_t,()=>({y:70,opacity:1,duration:200})),S(te,oe)};R(le,te=>{_(g)&&n().length&&te(Ie)})}S(I,O)};R(W,I=>{i()||I(ee)})}var F=T(W,2);{var G=I=>{var O=Gl(),V=b(O);Fl(V,{get htmlString(){return r()},onclose:()=>L(s,!1),onsave:Q=>n().push(Q)}),M(()=>vn(O,"top",`${_(u)??""}px`)),Se(3,O,()=>_t,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),S(I,O)};R(F,I=>{_(s)&&I(G)})}Bt(p,I=>L(o,I),()=>_(o)),M(()=>{fe(p,"panel-open",_(s)),fe(p,"loading",i())}),he("scroll",p,w),S(e,p),ie()}ue(["click"]);var Xl=A('<div class="playpilot-link-injections svelte-1ogu7vd"><!> <!></div>');function Ql(e,t){re(t,!0);const n=wn(),r=ko(n),i=r.map(p=>p.outerHTML).join(""),a=hn();let o=$(Y([])),d=$(null),s=$(!1),f=$(!0);Ot(()=>{a&&u()}),at(()=>(qe(Pe.ArticlePageView),l(),()=>tn()));async function l(){a&&L(s,Y(await Pr()));const p=await jo(Or(),i)||[];L(o,Y(p.filter(E=>E.title_details))),c(),L(f,!1)}function u(){tn(),c()}function c(){if(!_(o).length)return;const p=bo(r,_(o),h);JSON.stringify(_(o))!==JSON.stringify(p)&&L(o,Y(p))}function h(p){L(d,Y(p))}var g=Xl(),v=b(g);{var y=p=>{Jl(p,{htmlString:i,get loading(){return _(f)},get linkInjections(){return _(o)},set linkInjections(E){L(o,Y(E))}})};R(v,p=>{a&&_(s)&&p(y)})}var k=T(v,2);{var w=p=>{Bo(p,{get title(){return _(d).title_details},onclose:()=>L(d,null)})};R(k,p=>{_(d)&&_(d).title_details&&p(w)})}S(e,g),ie()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",language:null,app:null,initialize(e={token:"",selector:"",language:null,editorial_token:""}){if(!e.token){console.error("An API token is required.");return}this.token=e.token,this.editorial_token=e.editorial_token,this.selector=e.selector,this.language=e.language,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=fn(Ql,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),tn()}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
package/src/lib/meta.js CHANGED
@@ -10,7 +10,7 @@ export function getPageMetaData() {
10
10
  return {
11
11
  heading: getPageHeading(parent),
12
12
  modified_time: getPageModifiedTime(parent),
13
- published_time: getPageModifiedTime(parent),
13
+ published_time: getPagePublishedTime(parent),
14
14
  }
15
15
  }
16
16