@playpilot/tpi 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/link-injections.js +5 -5
- package/package.json +1 -1
- package/src/lib/types/script.d.ts +3 -0
- package/src/main.ts +5 -0
- package/src/routes/+page.svelte +8 -1
package/dist/link-injections.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.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-aqwna4{z-index:2147483647;box-sizing:border-box;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-aqwna4{padding:32px}}.dialog.svelte-aqwna4{z-index:1;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-aqwna4{margin-top:0;border-radius:var(--playpilot-detail-border-radius, 16px);max-height:100%}}.backdrop.svelte-aqwna4{z-index:0;position:absolute;top:0;right:0;bottom:0;left:0}.close.svelte-aqwna4{--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-aqwna4:hover{filter:brightness(1.1)}.genre.svelte-1ebula3{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-genre-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-1ebula3:is(button:where(.svelte-1ebula3)):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)))}img.svelte-1gro5q8{height:36px;width:36px;border-radius:8px;background:#00000040}.heading.svelte-1gro5q8{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}.playlinks.svelte-1gro5q8{box-sizing:border-box;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px;width:calc(100% + 32px);padding:8px 16px;margin:0 -16px}.playlinks.list.svelte-1gro5q8{grid-template-columns:1fr}@keyframes svelte-1gro5q8-sheen{0%,20%,60%,80.01%,to{background-position:-100% 0}80%{background-position:100% 0}}.playlink.svelte-1gro5q8{position:relative;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))!important;font-weight:var(--playpilot-playlink-font-weight, inherit);font-style:var(--playpilot-playlink-font-style, normal)!important;text-decoration:none!important;white-space:nowrap;font-size:var(--playpilot-playlinks-font-size, 12px);line-height:1}.playlink.svelte-1gro5q8:hover,.playlink.svelte-1gro5q8:active{filter:var(--playpilot-playlink-hover-filter, brightness(1.1));background:var(--playpilot-playlink-hover-background, var(--playpilot-playlink-background, var(--playpilot-lighter)))!important;text-decoration:none!important}.playlink.highlighted.svelte-1gro5q8{grid-column:span 2}.list.svelte-1gro5q8 .playlink.highlighted:where(.svelte-1gro5q8){grid-column:1}.playlink.highlighted.svelte-1gro5q8:before{content:"";z-index:1;display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(to left,currentColor 20%,transparent 50%,currentColor 80%);background-size:200% 100%;background-position:-100% 0;opacity:.35;pointer-events:none}@media (prefers-reduced-motion: no-preference){.playlink.highlighted.svelte-1gro5q8:before{animation:svelte-1gro5q8-sheen 4s ease-in-out infinite}}.playlink.highlighted.svelte-1gro5q8:after{content:"";z-index:2;display:block;position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:inherit;background:var(--playpilot-playlink-background, var(--playpilot-lighter))}.playlink.svelte-1gro5q8 img:where(.svelte-1gro5q8){grid-area:image;margin:0}.playlink-content.svelte-1gro5q8{position:relative;z-index:5;display:grid;grid-template-areas:"image name action" "image category action";grid-template-columns:36px auto 64px;align-items:center;gap:0 12px;padding:12px}.highlighted.svelte-1gro5q8 .playlink-content:where(.svelte-1gro5q8){grid-template-areas:"image name action" "image category action" "image cta action";gap:4px 12px}.name.svelte-1gro5q8{grid-area:name;width:100%;overflow:hidden;font-weight:var(--playpilot-playlink-font-weight, 500);font-family:var(--playpilot-playlink-font-family, inherit);text-overflow:ellipsis;white-space:nowrap}.category.svelte-1gro5q8{grid-area:category;width:100%;font-size:var(--playpilot-playlinks-category-font-size, 10px);color:var(--playpilot-playlink-category-text-color, var(--playpilot-text-color-alt));font-weight:var(--playpilot-playlink-category-font-weight, inherit);font-family:var(--playpilot-playlink-category-font-family, inherit)}.cta.svelte-1gro5q8{grid-area:cta;width:100%;font-size:var(--playpilot-playlinks-cta-font-size, var(--playpilot-playlinks-category-font-size, 10px));color:var(--playpilot-playlink-cta-text-color, var(--playpilot-playlink-category-text-color, var(--playpilot-text-color)));font-weight:var(--playpilot-playlink-cta-font-weight, var(--playpilot-playlink-category-font-weight, inherit));font-family:var(--playpilot-playlink-cta-font-family, var(--playpilot-playlink-category-font-family, inherit))}.disclaimer.svelte-1gro5q8{margin-top:var(--playpilot-playlinks-disclaimer-margin-top, 8px);opacity:var(--playpilot-playlinks-disclaimer-opacity, .65);color:var(--playpilot-playlinks-disclaimer-text-color, var(--playpilot-text-color-alt));font-size:var(--playpilot-playlinks-disclaimer-font-size, 10px);font-style:var(--playpilot-playlinks-disclaimer-font-style, normal)}.disclaimer.svelte-1gro5q8 a:where(.svelte-1gro5q8){color:inherit;font-size:inherit;font-style:inherit}.disclaimer.svelte-1gro5q8 a:where(.svelte-1gro5q8):hover{color:var(--playpilot-playlinks-disclaimer-text-color-hover, var(--playpilot-text-color))}.empty.svelte-1gro5q8{white-space:initial;line-height:1.35}.action.svelte-1gro5q8{grid-area:action;margin-left:auto;padding:8px;font-weight:var(--playpilot-playlinks-action-font-weight, 500);color:var(--playpilot-playlinks-action-text-color, var(--playpilot-text-color));border:var(--playpilot-playlinks-action-border, 1px solid currentColor);border-radius:var(--playpilot-playlinks-action-border-radius, 32px)}.paragraph.svelte-1u3je71{display:block;margin:16px 0 0}.show-more.svelte-1u3je71{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-1u3je71:hover{text-decoration:underline;text-decoration-thickness:2px;cursor:pointer}.heading.svelte-1026zg0{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-1026zg0 .heading:where(.svelte-1026zg0){font-size:var(--playpilot-detail-title-font-size-small, 18px)}.compact.svelte-1026zg0 .heading:where(.svelte-1026zg0){margin-top:0}.content.svelte-1026zg0{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.svelte-1026zg0 ::view-transition-old(content),.content.svelte-1026zg0 ::view-transition-new(content){height:100%}.content.small.svelte-1026zg0{font-size:var(--playpilot-detail-font-size, 12px);line-height:1.45;padding-bottom:8px}.header.svelte-1026zg0{padding:32px 0 16px;background:transparent}.small.svelte-1026zg0 .header:where(.svelte-1026zg0){padding-top:16px}.compact.svelte-1026zg0 .header:where(.svelte-1026zg0){padding:0 0 16px}.top.svelte-1026zg0{display:flex;justify-content:space-between;align-items:flex-end}.poster.svelte-1026zg0{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));opacity:0}.poster.loaded.svelte-1026zg0{opacity:1}.info.svelte-1026zg0{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.small.svelte-1026zg0 .info:where(.svelte-1026zg0){gap:8px 12px}.imdb.svelte-1026zg0{display:flex;align-items:center;gap:4px}.imdb.svelte-1026zg0 svg{margin-top:-2px}.small.svelte-1026zg0 .imdb:where(.svelte-1026zg0) svg{margin-top:0;width:12px;height:12px}.background.svelte-1026zg0{position:absolute;top:0;left:0;width:100%;height:192px;overflow:hidden;background:var(--playpilot-detail-background, var(--playpilot-lighter));z-index:0}.background.svelte-1026zg0: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%);z-index:1}.background.svelte-1026zg0 img:where(.svelte-1026zg0){width:100%;height:100%;object-fit:cover;object-position:center;margin:0;opacity:0;z-index:0}.background.svelte-1026zg0 img.loaded:where(.svelte-1026zg0){opacity:1}.background.svelte-1026zg0 img.blur:where(.svelte-1026zg0){opacity:.5;transform:scale(1.1);filter:blur(.75rem)}.faded.svelte-1026zg0{opacity:.15}.capitalize.svelte-1026zg0{text-transform:capitalize}.truncate.svelte-1026zg0{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover.svelte-1us1507{--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-1us1507{top:auto;bottom:calc(var(--offset) + 1px);transform:translateY(calc(100% + var(--offset)))}.dialog.svelte-1us1507{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),576px);scrollbar-width:thin;overflow-y:overlay;overflow-x:hidden;view-transition-name:playpilot-title-content}.title-popover.svelte-d86q0q{position:absolute}p.svelte-pfvkex{font-weight:var(--playpilot-after-article-text-font-weight, normal)}span.svelte-pfvkex{display:block}button.svelte-pfvkex{-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-pfvkex: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))}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}.alert.svelte-df5n87{padding:8px;border-radius:8px;border:1px solid var(--playpilot-error);background:var(--playpilot-error-dark);font-size:12px;font-family:var(--playpilot-font-family)}.alert.warning.svelte-df5n87{border-color:var(--playpilot-warning);background:var(--playpilot-warning-dark)}.alert.fixed.svelte-df5n87{position:fixed;bottom:1rem;right:1rem;width:80%;max-width:25rem}.alert.svelte-df5n87 a{color:currentColor}.switches.svelte-1shw34x{display:flex;flex-direction:column;gap:12px}button.svelte-1shw34x{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-1shw34x:hover,button.active.svelte-1shw34x{color:var(--playpilot-text-color)}.group.svelte-1shw34x{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-1shw34x{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-1shw34x{left:calc(50% + 4px)}.label.svelte-1shw34x{margin:10.8px 0 4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.alert.svelte-1shw34x{margin-top:8px}button.svelte-zpsd2z{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:4px;background:transparent;color:var(--playpilot-text-color-alt)}button.svelte-zpsd2z:hover{cursor:pointer;color:#fff}.context-menu.svelte-zpsd2z{position:relative}.content.svelte-zpsd2z{z-index:1;position:absolute;top:100%;right:0;max-width:240px;border-radius:8px;background:var(--playpilot-lighter)}select.svelte-o5qkco{background:var(--playpilot-content);padding:8px 16px;width:100%;border:0;border-radius:8px;color:var(--playpilot-text-color);font-family:inherit;font-size:13.6px}option.svelte-o5qkco:hover,option.svelte-o5qkco:active,option.svelte-o5qkco:checked{background-color:var(--playpilot-content-light);font-weight:700}.form.svelte-o5qkco{padding:32px;font-family:var(--playpilot-font-family);color:var(--playpilot-text-color)}.heading.svelte-o5qkco{font-size:20px}.info.svelte-o5qkco{margin:16px 0;font-size:13.6px;color:var(--playpilot-text-color-alt)}.info.svelte-o5qkco strong:where(.svelte-o5qkco){color:var(--playpilot-text-color)}.submit.svelte-o5qkco{margin-top:16px;padding:8px 16px;border:0;border-radius:32px;background:var(--playpilot-green);box-shadow:var(--playpilot-shadow);font-family:inherit;color:var(--playpilot-text-color);font-size:13.6px;cursor:pointer}.submit[disabled].svelte-o5qkco{background:var(--playpilot-content);color:var(--playpilot-text-color-alt);box-shadow:none;opacity:.5;cursor:default}.sent.svelte-o5qkco{margin-top:16px;padding:8px 0;color:var(--playpilot-green);font-size:13.6px}.item.svelte-lo6h85{padding:16px 8px;border-bottom:1px solid var(--playpilot-lighter);transition:outline-offset .1s}.item.svelte-lo6h85:hover,.item.highlighted.svelte-lo6h85{border-radius:8px;border-color:transparent;outline:2px solid var(--playpilot-content);outline-offset:1px}.item.highlighted.svelte-lo6h85{outline:2px solid var(--playpilot-primary)}.header.svelte-lo6h85{display:flex;gap:16px;width:100%}.poster.svelte-lo6h85{display:block;width:32px;height:48px;border-radius:4px;background:var(--playpilot-content)}.inactive.svelte-lo6h85 .poster:where(.svelte-lo6h85){opacity:.35}.title.svelte-lo6h85{font-size:14px;word-break:break-word}.sentence.svelte-lo6h85{font-size:.7em;line-height:150%;margin-right:-8px;color:var(--playpilot-text-color-alt);opacity:.75}.sentence.svelte-lo6h85 em{color:var(--playpilot-text-color);font-weight:700}.expand-sentence.svelte-lo6h85{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;margin:0;background:transparent;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;font-style:italic;text-decoration:underline}.expand-sentence.svelte-lo6h85:hover{color:var(--playpilot-text-color)}.content.svelte-lo6h85{padding-top:8px}.inactive.svelte-lo6h85 .info:where(.svelte-lo6h85){opacity:.35}.context-menu.svelte-lo6h85{margin:0 -4px 0 auto}.context-menu-action.svelte-lo6h85{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:8px 16px;width:100%;text-align:left;font-family:inherit;white-space:nowrap;color:var(--playpilot-text-color-alt);cursor:pointer}.context-menu-action.svelte-lo6h85:hover{color:var(--playpilot-text-color);background-color:var(--playpilot-content-light)}.context-menu-action.svelte-lo6h85:first-child{margin-top:8px}.context-menu-action.svelte-lo6h85:last-child{margin-bottom:8px}.actions.svelte-lo6h85{display:flex;align-items:center;justify-content:space-between;width:100%}.expand.svelte-lo6h85{-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-lo6h85:hover{filter:brightness(1.2)}.expanded.svelte-lo6h85{padding-top:16px}.type-select.svelte-lo6h85{margin-top:8px}.label.svelte-lo6h85{margin-bottom:4px;opacity:.75;font-size:10.8px;color:var(--playpilot-text-color-alt)}.offset.svelte-lo6h85{margin-top:12px}.warning.svelte-lo6h85{margin:0 auto 0 8px}.warning.svelte-lo6h85 svg{display:block}.drag-handle.svelte-19mcc5g{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:8px;left:30%;width:40%;height:16px;background:transparent;border:0;cursor:grab}.drag-handle.svelte-19mcc5g:hover:before{opacity:.65;transform:scale(1.05)}.drag-handle.svelte-19mcc5g:active:before{opacity:.9;transform:scale(.95)}.drag-handle.svelte-19mcc5g:active{cursor:grabbing}.drag-handle.svelte-19mcc5g:before{display:block;content:"";position:absolute;top:20%;right:0;bottom:60%;left:0;border-radius:16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.resize-handle.svelte-sxkuxk{z-index:10;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;top:0;left:0;width:100%;height:8px;background:transparent;border:0;cursor:ns-resize}.resize-handle.svelte-sxkuxk:hover:before{opacity:.65;transform:scale(1.05)}.resize-handle.svelte-sxkuxk:active:before{opacity:.9;transform:scale(.95)}.resize-handle.svelte-sxkuxk:active{cursor:grabbing}.resize-handle.svelte-sxkuxk:before{display:block;content:"";position:absolute;top:0;right:20%;left:20%;bottom:80%;border-radius:0 0 16px 16px;background:var(--playpilot-text-color);opacity:.15;transition:opacity .1s,transform 50ms}.item.svelte-rjq94e{-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;font-size:13.6px}.item.hoverable.svelte-rjq94e{cursor:pointer}.item.hoverable.svelte-rjq94e:hover{background:var(--playpilot-lighter)}.item.svelte-rjq94e:last-child{border-bottom:0}.poster.svelte-rjq94e{flex:0 0 auto;height:auto;width:28px;aspect-ratio:28/42;border-radius:4px;background:var(--playpilot-content)}.name.svelte-rjq94e{color:var(--playpilot-text-color)}.meta.svelte-rjq94e{display:flex;flex-wrap:wrap;gap:0 8px;font-size:12px}.imdb.svelte-rjq94e{display:flex;align-items:center;gap:4px}.open-in-new-tab.svelte-rjq94e{margin-left:auto;color:var(--playpilot-text-color-alt)}.open-in-new-tab.svelte-rjq94e:hover{color:vaR(--playpilot-text-color)}.search.svelte-1olb8n0{position:relative}.results.svelte-1olb8n0{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}.empty.svelte-1olb8n0{padding:8px;font-size:12px;color:var(--playpilot-text-color-alt)}.selected.svelte-1olb8n0{margin:8px 0;border-radius:.5rem;border:2px solid var(--playpilot-green)}p.svelte-1i8p6op,label.svelte-1i8p6op{font-size:12px;max-width:240px;color:var(--playpilot-text-color-alt)}label.svelte-1i8p6op{display:block;margin-top:16px}.layout.svelte-1i8p6op{height:100%;display:flex;flex-direction:column;margin:0}.header.svelte-1i8p6op{display:flex;align-items:center;gap:8px;margin-bottom:16px}.heading.svelte-1i8p6op{margin:0;color:var(--playpilot-text-color);font-size:16px;line-height:normal;font-weight:400}.error.svelte-1i8p6op{margin-top:8px}.save.svelte-1i8p6op{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-green);transition:opacity .1s;font-family:inherit;color:var(--playpilot-text-color)}.save.svelte-1i8p6op:not([disabled]):hover{outline:2px solid currentColor}.save[disabled].svelte-1i8p6op{cursor:default;background:var(--playpilot-light);opacity:.5;color:var(--playpilot-text-color-alt)}p.svelte-2m2urs{margin:0 0 8px}.alert.svelte-2m2urs{margin:0 8px}.button.svelte-2m2urs{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;padding:4px;border:0;border-radius:4px;background:var(--playpilot-warning);transition:opacity .1s;font-family:inherit;color:var(--playpilot-dark);font-size:.85rem;cursor:pointer}.button.svelte-2m2urs:hover{background:#fff}a.svelte-1kpafo0{color:currentColor}p.svelte-1kpafo0{margin:0}.ai-indicator.svelte-1kpafo0{position:relative;margin:0 8px}.content.svelte-1kpafo0{position:relative;display:flex;gap:8px;background:var(--playpilot-light);padding:8px;margin:2px;border-radius:.5rem;font-size:12px;line-height:1.5;z-index:1;color:var(--playpilot-text-color-alt);overflow:hidden}.message.svelte-1kpafo0{display:flex;margin-top:4px;font-style:italic}.icon.svelte-1kpafo0{color:var(--playpilot-green)}.border.svelte-1kpafo0{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.5rem;background:var(--playpilot-green);overflow:hidden;transition:background-color .5s}.running.svelte-1kpafo0 .border:where(.svelte-1kpafo0){background:var(--playpilot-light)}@keyframes svelte-1kpafo0-rotate{to{rotate:360deg}}.animator.svelte-1kpafo0{position:absolute;left:50%;top:50%;transform:translateY(-50%);width:100%;height:20rem;background:var(--playpilot-green);transform-origin:left 50%;animation:svelte-1kpafo0-rotate 2s infinite linear;filter:blur(5rem)}.loading-bar.svelte-1kpafo0{display:grid;grid-template-columns:auto 3em;align-items:center}.loading-bar-progress.svelte-1kpafo0{height:.5em;border-radius:.25rem;background:var(--playpilot-dark)}.loading-bar-fill.svelte-1kpafo0{height:100%;border-radius:.25rem;background:var(--playpilot-green);transition:width .2s}.loading-bar-label.svelte-1kpafo0{text-align:right}@keyframes svelte-1kpafo0-fade{0%,to{opacity:0}25%,75%{opacity:1}}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0){animation:svelte-1kpafo0-fade 2s infinite}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(1){animation-delay:.2s}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(2){animation-delay:.4s}.ellipses.svelte-1kpafo0 span:where(.svelte-1kpafo0):nth-child(3){animation-delay:.6s}.dismiss.svelte-1kpafo0{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-top:4px;padding:4px;border:2px solid var(--playpilot-content-light);border-radius:4px;background:var(--playpilot-light);font-family:inherit;color:var(--playpilot-text-color-alt);font-size:12px;line-height:1;cursor:pointer}.dismiss.svelte-1kpafo0:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.editor.svelte-11aj6xq{z-index:2147483646;display:flex;flex-direction:column;position:fixed;bottom:16px;right:16px;width:100%;max-width:352px;height:min(70vh,640px);min-height:min(25rem,80vh);margin:0;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-11aj6xq{overflow:hidden}.loading.svelte-11aj6xq{height:auto;min-height:0;border-radius:32px;margin-left:auto;padding-right:8px;color:var(--playpilot-text-color-alt);font-size:13.6px}.handles.svelte-11aj6xq,.header.svelte-11aj6xq{z-index:20;position:sticky;top:-16px;margin:-16px -16px 0}.handle.svelte-11aj6xq{opacity:0;transition:opacity .15s}.editor.svelte-11aj6xq:hover .handle:where(.svelte-11aj6xq){opacity:1}.header.svelte-11aj6xq{z-index:5;display:flex;align-items:center;padding:16px 16px 16px 24px;margin:0 -16px;border:0;background:var(--playpilot-dark)}.loading.svelte-11aj6xq .header:where(.svelte-11aj6xq){margin:-16px}.heading.svelte-11aj6xq{margin:0 12px 0 0;color:var(--playpilot-text-color);font-size:20px;font-weight:400;line-height:normal}.bubble.svelte-11aj6xq{-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-11aj6xq{padding-top:8px;margin-bottom:auto}.empty.svelte-11aj6xq{padding:8px;font-size:13.6px;font-style:italic;color:var(--playpilot-text-color-alt)}.save.svelte-11aj6xq{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);font-size:13.6px;cursor:pointer}.save.svelte-11aj6xq:hover{background:var(--playpilot-content-light);color:var(--playpilot-text-color)}.save[disabled].svelte-11aj6xq{opacity:.75;background:var(--playpilot-light);color:var(--playpilot-content-light)}.error.svelte-11aj6xq{margin-top:8px}.alert.svelte-11aj6xq{margin:8px 8px 0}.panel.svelte-11aj6xq{z-index:10;position:absolute;top:0;left:0;width:100%;height:100%;padding:24px;background:var(--playpilot-dark);overflow-y:auto}.trigger.svelte-qee95d{position:fixed;bottom:16px;right:16px}.button.svelte-qee95d{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:48px;height:48px;border:0;padding:12px;border-radius:50%;background:var(--playpilot-light);box-shadow:var(--playpilot-shadow-large);transition:transform 50ms;line-height:24px;text-align:center;font-size:13.6px}.button.svelte-qee95d:hover{filter:brightness(1.1);transform:scale(1.05)}.button.svelte-qee95d svg{width:100%}.close.svelte-qee95d{display:flex;text-align:center;justify-content:center;position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:4px;background:var(--playpilot-content);color:#fff}.close.svelte-qee95d svg{width:12px}img.svelte-j7f9xl{position:absolute;width:1px;height:1px;border:0;opacity:0}: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", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", 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;--playpilot-warning: #f7c74e;--playpilot-warning-dark: #413c23}[data-playpilot-injection-key]{position:relative}.playpilot-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)}h1 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h2 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h3 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h4 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]),h5 [data-playpilot-injection-key] a:not([data-used-css-variables*=--playpilot-injection-font-weight-headings]){font-weight:inherit}h1 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h2 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h3 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h4 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings],h5 [data-playpilot-injection-key] a[data-used-css-variables*=--playpilot-injection-font-weight-headings]{font-weight:var(--playpilot-injection-font-weight-headings)}::view-transition-old(playpilot-title-content),::view-transition-new(playpilot-title-content){height:100%}.playpilot-link-injections.svelte-13rmd3g *{box-sizing:border-box}.playpilot-link-injections.svelte-13rmd3g svg{fill:none}.playpilot-link-injections.svelte-13rmd3g a,.playpilot-link-injections.svelte-13rmd3g button,.playpilot-link-injections.svelte-13rmd3g input{transition:outline-offset .1s}.playpilot-link-injections.svelte-13rmd3g a:focus-visible,.playpilot-link-injections.svelte-13rmd3g button:focus-visible,.playpilot-link-injections.svelte-13rmd3g 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)}})();
|
|
3
|
-
var ya=Object.defineProperty;var Ti=e=>{throw TypeError(e)};var wa=(e,t,n)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ii=(e,t,n)=>wa(e,typeof t!="symbol"?t+"":t,n),Rn=(e,t,n)=>t.has(e)||Ti("Cannot "+n);var Fe=(e,t,n)=>(Rn(e,t,"read from private field"),n?n.call(e):t.get(e)),dt=(e,t,n)=>t.has(e)?Ti("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ot=(e,t,n,i)=>(Rn(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ai=(e,t,n)=>(Rn(e,t,"access private method"),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const Vn=!1;var ei=Array.isArray,ka=Array.prototype.indexOf,ti=Array.from,ba=Object.defineProperty,at=Object.getOwnPropertyDescriptor,Ji=Object.getOwnPropertyDescriptors,xa=Object.prototype,Sa=Array.prototype,ni=Object.getPrototypeOf;function St(e){return typeof e=="function"}const ft=()=>{};function Ea(e){for(var t=0;t<e.length;t++)e[t]()}function _n(e,t,n=!1){return e===void 0?n?t():t:e}const Be=2,Qi=4,Qt=8,xn=16,ze=32,$t=64,hn=128,kt=256,gn=512,je=1024,lt=2048,Sn=4096,We=8192,Pt=16384,$i=32768,bt=65536,Ta=1<<17,er=1<<19,tr=1<<20,Ke=Symbol("$state"),nr=Symbol("legacy props"),Ia=Symbol("");function ir(e){return e===this.v}function ii(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Aa(e,t){return e!==t}function ri(e){return!ii(e,this.v)}function Pa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ca(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ja(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ma(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function La(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Oa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ra(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ct=!1,qa=!1;function Ha(){Ct=!0}const ai=1,oi=2,rr=4,Fa=8,Ba=16,Va=1,Ua=2,za=4,Wa=8,Ka=16,Ya=1,Za=2,Ga=4,Xa=1,Ja=2,xe=Symbol(),ar="http://www.w3.org/2000/svg";function Te(e,t){var n={f:0,v:e,reactions:null,equals:ir,rv:0,wv:0};return n}function V(e){return Qa(Te(e))}function or(e,t=!1){var i;const n=Te(e);return t||(n.equals=ri),Ct&&ie!==null&&ie.l!==null&&((i=ie.l).s??(i.s=[])).push(n),n}function Qa(e){return ne!==null&&ne.f&Be&&(Ye===null?vo([e]):Ye.push(e)),e}function C(e,t){return ne!==null&&en()&&ne.f&(Be|xn)&&(Ye===null||!Ye.includes(e))&&Ra(),Un(e,t)}function Un(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Sr(),lr(e,lt),en()&&Y!==null&&Y.f&je&&!(Y.f&ze)&&(ke!==null&&ke.includes(e)?(Ze(Y,lt),Pn(Y)):ot===null?_o([e]):ot.push(e))),t}function lr(e,t){var n=e.reactions;if(n!==null)for(var i=en(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l<||!i&&o===Y||(Ze(o,t),l&(je|kt)&&(l&Be?lr(o,Sn):Pn(o)))}}let sr=!1;function J(e,t=null,n){if(typeof e!="object"||e===null||Ke in e)return e;const i=ni(e);if(i!==xa&&i!==Sa)return e;var r=new Map,a=ei(e),o=Te(0);a&&r.set("length",Te(e.length));var l;return new Proxy(e,{defineProperty(c,u,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Na();var f=r.get(u);return f===void 0?(f=Te(d.value),r.set(u,f)):C(f,J(d.value,l)),!0},deleteProperty(c,u){var d=r.get(u);if(d===void 0)u in c&&r.set(u,Te(xe));else{if(a&&typeof u=="string"){var f=r.get("length"),v=Number(u);Number.isInteger(v)&&v<f.v&&C(f,v)}C(d,xe),Pi(o)}return!0},get(c,u,d){var g;if(u===Ke)return e;var f=r.get(u),v=u in c;if(f===void 0&&(!v||(g=at(c,u))!=null&&g.writable)&&(f=Te(J(v?c[u]:xe,l)),r.set(u,f)),f!==void 0){var m=s(f);return m===xe?void 0:m}return Reflect.get(c,u,d)},getOwnPropertyDescriptor(c,u){var d=Reflect.getOwnPropertyDescriptor(c,u);if(d&&"value"in d){var f=r.get(u);f&&(d.value=s(f))}else if(d===void 0){var v=r.get(u),m=v==null?void 0:v.v;if(v!==void 0&&m!==xe)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(c,u){var m;if(u===Ke)return!0;var d=r.get(u),f=d!==void 0&&d.v!==xe||Reflect.has(c,u);if(d!==void 0||Y!==null&&(!f||(m=at(c,u))!=null&&m.writable)){d===void 0&&(d=Te(f?J(c[u],l):xe),r.set(u,d));var v=s(d);if(v===xe)return!1}return f},set(c,u,d,f){var S;var v=r.get(u),m=u in c;if(a&&u==="length")for(var g=d;g<v.v;g+=1){var h=r.get(g+"");h!==void 0?C(h,xe):g in c&&(h=Te(xe),r.set(g+"",h))}v===void 0?(!m||(S=at(c,u))!=null&&S.writable)&&(v=Te(void 0),C(v,J(d,l)),r.set(u,v)):(m=v.v!==xe,C(v,J(d,l)));var y=Reflect.getOwnPropertyDescriptor(c,u);if(y!=null&&y.set&&y.set.call(f,d),!m){if(a&&typeof u=="string"){var w=r.get("length"),p=Number(u);Number.isInteger(p)&&p>=w.v&&C(w,p+1)}Pi(o)}return!0},ownKeys(c){s(o);var u=Reflect.ownKeys(c).filter(v=>{var m=r.get(v);return m===void 0||m.v!==xe});for(var[d,f]of r)f.v!==xe&&!(d in c)&&u.push(d);return u},setPrototypeOf(){Oa()}})}function Pi(e,t=1){C(e,e.v+t)}function Ci(e){return e!==null&&typeof e=="object"&&Ke in e?e[Ke]:e}function $a(e,t){return Object.is(Ci(e),Ci(t))}var be,cr,ur;function eo(){if(be===void 0){be=window;var e=Element.prototype,t=Node.prototype;cr=at(t,"firstChild").get,ur=at(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 jt(e=""){return document.createTextNode(e)}function gt(e){return cr.call(e)}function En(e){return ur.call(e)}function x(e,t){return gt(e)}function ee(e,t){{var n=gt(e);return n instanceof Comment&&n.data===""?En(n):n}}function E(e,t=1,n=!1){let i=e;for(;t--;)i=En(i);return i}function to(e){e.textContent=""}function z(e){var t=Be|lt;Y===null?t|=kt:Y.f|=tr;var n=ne!==null&&ne.f&Be?ne:null;const i={children:null,ctx:ie,deps:null,equals:ir,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??Y};return n!==null&&(n.children??(n.children=[])).push(i),i}function no(e){const t=z(e);return t.equals=ri,t}function dr(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Be?li(i):De(i)}}}function io(e){for(var t=e.parent;t!==null;){if(!(t.f&Be))return t;t=t.parent}return null}function fr(e){var t,n=Y;Ie(io(e));try{dr(e),t=Er(e)}finally{Ie(n)}return t}function vr(e){var t=fr(e),n=(rt||e.f&kt)&&e.deps!==null?Sn:je;Ze(e,n),e.equals(t)||(e.v=t,e.wv=Sr())}function li(e){dr(e),Wt(e,0),Ze(e,Pt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function ro(e){Y===null&&ne===null&&ja(),ne!==null&&ne.f&kt&&Ca(),ci&&Pa()}function ao(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Mt(e,t,n,i=!0){var r=(e&$t)!==0,a=Y,o={ctx:ie,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|lt,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=Et;try{ji(!0),An(o),o.f|=$i}catch(d){throw De(o),d}finally{ji(l)}}else t!==null&&Pn(o);var c=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&tr)===0;if(!c&&!r&&i&&(a!==null&&ao(o,a),ne!==null&&ne.f&Be)){var u=ne;(u.children??(u.children=[])).push(o)}return o}function oo(){return ne===null?!1:!rt}function lo(e){const t=Mt(Qt,null,!1);return Ze(t,je),t.teardown=e,t}function Tn(e){ro();var t=Y!==null&&(Y.f&ze)!==0&&ie!==null&&!ie.m;if(t){var n=ie;(n.e??(n.e=[])).push({fn:e,effect:Y,reaction:ne})}else{var i=st(e);return i}}function so(e){const t=Mt($t,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{De(t),i(void 0)}):(De(t),i(void 0))})}function st(e){return Mt(Qi,e,!1)}function In(e){return Mt(Qt,e,!0)}function L(e){return $e(e)}function $e(e,t=0){return Mt(Qt|xn|t,e,!0)}function Oe(e,t=!0){return Mt(Qt|ze,e,!0,t)}function _r(e){var t=e.teardown;if(t!==null){const n=ci,i=ne;Mi(!0),Re(null);try{t.call(null)}finally{Mi(n),Re(i)}}}function hr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)li(t[n])}}function gr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;De(n,t),n=i}}function co(e){for(var t=e.first;t!==null;){var n=t.next;t.f&ze||De(t),t=n}}function De(e,t=!0){var n=!1;if((t||e.f&er)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:En(i);i.remove(),i=a}n=!0}gr(e,t&&!n),hr(e),Wt(e,0),Ze(e,Pt);var o=e.transitions;if(o!==null)for(const c of o)c.stop();_r(e);var l=e.parent;l!==null&&l.first!==null&&mr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function mr(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function mt(e,t){var n=[];si(e,n,!0),pr(n,()=>{De(e),t&&t()})}function pr(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function si(e,t,n){if(!(e.f&We)){if(e.f^=We,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&bt)!==0||(i.f&ze)!==0;si(i,t,a?n:!1),i=r}}}function Vt(e){yr(e,!0)}function yr(e,t){if(e.f&We){tn(e)&&An(e),e.f^=We;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&bt)!==0||(n.f&ze)!==0;yr(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let mn=!1,zn=[];function wr(){mn=!1;const e=zn.slice();zn=[],Ea(e)}function Lt(e){mn||(mn=!0,queueMicrotask(wr)),zn.push(e)}function uo(){mn&&wr()}function kr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const br=0,fo=1;let Rt=!1,vn=br,Ut=!1,zt=null,Et=!1,ci=!1;function ji(e){Et=e}function Mi(e){ci=e}let vt=[],Tt=0;let ne=null;function Re(e){ne=e}let Y=null;function Ie(e){Y=e}let Ye=null;function vo(e){Ye=e}let ke=null,Pe=0,ot=null;function _o(e){ot=e}let xr=1,Wn=0,rt=!1,ie=null;function Li(e){ie=e}function Sr(){return++xr}function en(){return!Ct||ie!==null&&ie.l===null}function tn(e){var u;var t=e.f;if(t<)return!0;if(t&Sn){var n=e.deps,i=(t&kt)!==0;if(n!==null){var r,a,o=(t&gn)!==0,l=i&&Y!==null&&!rt,c=n.length;if(o||l){for(r=0;r<c;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=gn)}for(r=0;r<c;r++)if(a=n[r],tn(a)&&vr(a),a.wv>e.wv)return!0}(!i||Y!==null&&!rt)&&Ze(e,je)}return!1}function ho(e,t){for(var n=t;n!==null;){if(n.f&hn)try{n.fn(e);return}catch{n.f^=hn}n=n.parent}throw Rt=!1,e}function go(e){return(e.f&Pt)===0&&(e.parent===null||(e.parent.f&hn)===0)}function qn(){Rt=!1}function nn(e,t,n,i){if(Rt){if(n===null&&(Rt=!1),go(t))throw e;return}n!==null&&(Rt=!0);{ho(e,t);return}}function Er(e){var v;var t=ke,n=Pe,i=ot,r=ne,a=rt,o=Ye,l=ie,c=e.f;ke=null,Pe=0,ot=null,ne=c&(ze|$t)?null:e,rt=!Et&&(c&kt)!==0,Ye=null,ie=e.ctx,Wn++;try{var u=(0,e.fn)(),d=e.deps;if(ke!==null){var f;if(Wt(e,Pe),d!==null&&Pe>0)for(d.length=Pe+ke.length,f=0;f<ke.length;f++)d[Pe+f]=ke[f];else e.deps=d=ke;if(!rt)for(f=Pe;f<d.length;f++)((v=d[f]).reactions??(v.reactions=[])).push(e)}else d!==null&&Pe<d.length&&(Wt(e,Pe),d.length=Pe);return u}finally{ke=t,Pe=n,ot=i,ne=r,rt=a,Ye=o,ie=l}}function mo(e,t){let n=t.reactions;if(n!==null){var i=ka.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Be&&(ke===null||!ke.includes(t))&&(Ze(t,Sn),t.f&(kt|gn)||(t.f^=gn),Wt(t,0))}function Wt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)mo(e,n[i])}function An(e){var t=e.f;if(!(t&Pt)){Ze(e,je);var n=Y,i=ie;Y=e;try{t&xn?co(e):gr(e),hr(e),_r(e);var r=Er(e);e.teardown=typeof r=="function"?r:null,e.wv=xr;var a=e.deps,o;Vn&&qa&&e.f<}catch(l){nn(l,e,n,i||e.ctx)}finally{Y=n}}}function Tr(){if(Tt>1e3){Tt=0;try{Ma()}catch(e){if(zt!==null)nn(e,zt,null);else throw e}}Tt++}function Ir(e){var t=e.length;if(t!==0){Tr();var n=Et;Et=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&je||(r.f^=je);var a=[];Ar(r,a),po(a)}}finally{Et=n}}}function po(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(Pt|We)))try{tn(i)&&(An(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?mr(i):i.fn=null))}catch(r){nn(r,i,null,i.ctx)}}}function yo(){if(Ut=!1,Tt>1001)return;const e=vt;vt=[],Ir(e),Ut||(Tt=0,zt=null)}function Pn(e){vn===br&&(Ut||(Ut=!0,queueMicrotask(yo))),zt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&($t|ze)){if(!(n&je))return;t.f^=je}}vt.push(t)}function Ar(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&ze)!==0,o=a&&(r&je)!==0,l=n.next;if(!o&&!(r&We))if(r&Qt){if(a)n.f^=je;else try{tn(n)&&An(n)}catch(f){nn(f,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else r&Qi&&i.push(n);if(l===null){let f=n.parent;for(;f!==null;){if(e===f)break e;var u=f.next;if(u!==null){n=u;continue e}f=f.parent}}n=l}for(var d=0;d<i.length;d++)c=i[d],t.push(c),Ar(c,t)}function Pr(e){var t=vn,n=vt;try{Tr();const r=[];vn=fo,vt=r,Ut=!1,Ir(n);var i=e==null?void 0:e();return uo(),(vt.length>0||r.length>0)&&Pr(),Tt=0,zt=null,i}finally{vn=t,vt=n}}async function Kn(){await Promise.resolve(),Pr()}function s(e){var d;var t=e.f,n=(t&Be)!==0;if(n&&t&Pt){var i=fr(e);return li(e),i}if(ne!==null){Ye!==null&&Ye.includes(e)&&Da();var r=ne.deps;e.rv<Wn&&(e.rv=Wn,ke===null&&r!==null&&r[Pe]===e?Pe++:ke===null?ke=[e]:ke.push(e),ot!==null&&Y!==null&&Y.f&je&&!(Y.f&ze)&&ot.includes(e)&&(Ze(Y,lt),Pn(Y)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Be){var c=o;l=c,o=c.parent}else{var u=o;(d=u.deriveds)!=null&&d.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,tn(a)&&vr(a)),e.v}function Ve(e){const t=ne;try{return ne=null,e()}finally{ne=t}}const wo=-7169;function Ze(e,t){e.f=e.f&wo|t}function ko(e){return jr().get(e)}function Cr(e,t){return jr().set(e,t),t}function jr(e){return ie===null&&kr(),ie.c??(ie.c=new Map(bo(ie)||void 0))}function bo(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function le(e,t=!1,n){ie={p:ie,c:null,e:null,m:!1,s:e,x:null,l:null},Ct&&!t&&(ie.l={s:null,u:null,r1:[],r2:Te(!1)})}function se(e){const t=ie;if(t!==null){const o=t.e;if(o!==null){var n=Y,i=ne;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),Re(a.reaction),st(a.fn)}}finally{Ie(n),Re(i)}}ie=t.p,t.m=!0}return{}}function xo(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)Yn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Ke in n&&Yn(n)}}}function Yn(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Yn(e[i],t)}catch{}const n=ni(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Ji(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function So(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Eo=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function To(e){return Eo.includes(e)}const Io={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Ao(e){return e=e.toLowerCase(),Io[e]??e}const Po=["touchstart","touchmove"];function Co(e){return Po.includes(e)}function jo(e,t){if(t){const n=document.body;e.autofocus=!0,Lt(()=>{document.activeElement===n&&e.focus()})}}let Ni=!1;function Mo(){Ni||(Ni=!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 Mr(e){var t=ne,n=Y;Re(null),Ie(null);try{return e()}finally{Re(t),Ie(n)}}function Lr(e,t,n,i=n){e.addEventListener(t,()=>Mr(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Mo()}const Nr=new Set,Zn=new Set;function ui(e,t,n,i){function r(a){if(i.capture||Dt.call(t,a),!a.cancelBubble)return Mr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Lt(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function Lo(e,t,n,i={}){var r=ui(t,e,n,i);return()=>{e.removeEventListener(t,r,i)}}function de(e,t,n,i,r){var a={capture:i,passive:r},o=ui(e,t,n,a);(t===document.body||t===window||t===document)&&lo(()=>{t.removeEventListener(e,o,a)})}function ve(e){for(var t=0;t<e.length;t++)Nr.add(e[t]);for(var n of Zn)n(e)}function Dt(e){var p;var t=this,n=t.ownerDocument,i=e.type,r=((p=e.composedPath)==null?void 0:p.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var c=r.indexOf(l);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;c<=u&&(o=c)}if(a=r[o]||e.target,a!==t){ba(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=ne,f=Y;Re(null),Ie(null);try{for(var v,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+i];if(h!==void 0&&!a.disabled)if(ei(h)){var[y,...w]=h;y.apply(a,[e,...w])}else h.call(a,e)}catch(S){v?m.push(S):v=S}if(e.cancelBubble||g===t||g===null)break;a=g}if(v){for(let S of m)queueMicrotask(()=>{throw S});throw v}}finally{e.__root=t,delete e.currentTarget,Re(d),Ie(f)}}}function No(e){var t;t=document.head.appendChild(jt());try{$e(()=>e(t),er)}finally{}}function di(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function pt(e,t){var n=Y;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&Xa)!==0,i=(t&Ja)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=di(a?e:"<!>"+e),n||(r=gt(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=gt(o),c=o.lastChild;pt(l,c)}else pt(o,o);return o}}function He(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=di(r),l=gt(o);a=gt(l)}var c=a.cloneNode(!0);return pt(c,c),c}}function Ue(e=""){{var t=jt(e+"");return pt(t,t),t}}function qe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=jt();return e.append(t,n),pt(t,n),e}function k(e,t){e!==null&&e.before(t)}let pn=!0;function Oi(e){pn=e}function K(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 rn(e,t){return Oo(e,t)}const xt=new Map;function Oo(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){eo();var l=new Set,c=f=>{for(var v=0;v<f.length;v++){var m=f[v];if(!l.has(m)){l.add(m);var g=Co(m);t.addEventListener(m,Dt,{passive:g});var h=xt.get(m);h===void 0?(document.addEventListener(m,Dt,{passive:g}),xt.set(m,1)):xt.set(m,h+1)}}};c(ti(Nr)),Zn.add(c);var u=void 0,d=so(()=>{var f=n??t.appendChild(jt());return Oe(()=>{if(a){le({});var v=ie;v.c=a}r&&(i.$$events=r),pn=o,u=e(f,i)||{},pn=!0,a&&se()}),()=>{var g;for(var v of l){t.removeEventListener(v,Dt);var m=xt.get(v);--m===0?(document.removeEventListener(v,Dt),xt.delete(v)):xt.set(v,m)}Zn.delete(c),f!==n&&((g=f.parentNode)==null||g.removeChild(f))}});return Gn.set(u,d),u}let Gn=new WeakMap;function Cn(e,t){const n=Gn.get(e);return n?(Gn.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var i=e,r=null,a=null,o=xe,l=n?bt:0,c=!1;const u=(f,v=!0)=>{c=!0,d(v,f)},d=(f,v)=>{o!==(o=f)&&(o?(r?Vt(r):v&&(r=Oe(()=>v(i))),a&&mt(a,()=>{a=null})):(a?Vt(a):v&&(a=Oe(()=>v(i))),r&&mt(r,()=>{r=null})))};$e(()=>{c=!1,t(u),c||d(null,null)},l)}function Or(e,t,n){var i=e,r=xe,a,o=en()?Aa:ii;$e(()=>{o(r,r=t())&&(a&&mt(a),a=Oe(()=>n(i)))})}function yt(e,t){return t}function Do(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)si(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var c=n.parentNode;to(c),c.append(n),i.clear(),nt(e,t[0].prev,t[a-1].next)}pr(r,()=>{for(var u=0;u<a;u++){var d=t[u];l||(i.delete(d.k),nt(e,d.prev,d.next)),De(d.e,!l)}})}function Qe(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},c=(t&rr)!==0;if(c){var u=e;o=u.appendChild(jt())}var d=null,f=!1;$e(()=>{var v=n(),m=ei(v)?v:v==null?[]:ti(v),g=m.length;if(!(f&&g===0)){f=g===0;{var h=ne;Ro(m,l,o,r,t,(h.f&We)!==0,i)}a!==null&&(g===0?d?Vt(d):d=Oe(()=>a(o)):d!==null&&mt(d,()=>{d=null})),n()}})}function Ro(e,t,n,i,r,a,o,l){var N,R,q,ae;var c=(r&Fa)!==0,u=(r&(ai|oi))!==0,d=e.length,f=t.items,v=t.first,m=v,g,h=null,y,w=[],p=[],S,A,b,T;if(c)for(T=0;T<d;T+=1)S=e[T],A=o(S,T),b=f.get(A),b!==void 0&&((N=b.a)==null||N.measure(),(y??(y=new Set)).add(b));for(T=0;T<d;T+=1){if(S=e[T],A=o(S,T),b=f.get(A),b===void 0){var U=m?m.e.nodes_start:n;h=Ho(U,t,h,h===null?t.first:h.next,S,A,T,i,r),f.set(A,h),w=[],p=[],m=h.next;continue}if(u&&qo(b,S,T,r),b.e.f&We&&(Vt(b.e),c&&((R=b.a)==null||R.unfix(),(y??(y=new Set)).delete(b))),b!==m){if(g!==void 0&&g.has(b)){if(w.length<p.length){var M=p[0],P;h=M.prev;var D=w[0],Z=w[w.length-1];for(P=0;P<w.length;P+=1)Di(w[P],M,n);for(P=0;P<p.length;P+=1)g.delete(p[P]);nt(t,D.prev,Z.next),nt(t,h,D),nt(t,Z,M),m=M,h=Z,T-=1,w=[],p=[]}else g.delete(b),Di(b,m,n),nt(t,b.prev,b.next),nt(t,b,h===null?t.first:h.next),nt(t,h,b),h=b;continue}for(w=[],p=[];m!==null&&m.k!==A;)(a||!(m.e.f&We))&&(g??(g=new Set)).add(m),p.push(m),m=m.next;if(m===null)continue;b=m}w.push(b),h=b,m=b.next}if(m!==null||g!==void 0){for(var G=g===void 0?[]:ti(g);m!==null;)(a||!(m.e.f&We))&&G.push(m),m=m.next;var B=G.length;if(B>0){var j=r&rr&&d===0?n:null;if(c){for(T=0;T<B;T+=1)(q=G[T].a)==null||q.measure();for(T=0;T<B;T+=1)(ae=G[T].a)==null||ae.fix()}Do(t,G,j,f)}}c&&Lt(()=>{var Q;if(y!==void 0)for(b of y)(Q=b.a)==null||Q.apply()}),Y.first=t.first&&t.first.e,Y.last=h&&h.e}function qo(e,t,n,i){i&ai&&Un(e.v,t),i&oi?Un(e.i,n):e.i=n}function Ho(e,t,n,i,r,a,o,l,c,u){var d=(c&ai)!==0,f=(c&Ba)===0,v=d?f?or(r):Te(r):r,m=c&oi?Te(o):o,g={i:m,v,k:a,a:null,e:null,prev:n,next:i};try{return g.e=Oe(()=>l(e,v,m),sr),g.e.prev=n&&n.e,g.e.next=i&&i.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),i!==null&&(i.prev=g,i.e.prev=g.e),g}finally{}}function Di(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=En(a);r.before(a),a=o}}function nt(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 Fo(e,t,n,i,r){var a=e,o="",l;$e(()=>{o!==(o=t()??"")&&(l!==void 0&&(De(l),l=void 0),o!==""&&(l=Oe(()=>{var c=o+"",u=di(c);pt(gt(u),u.lastChild),a.before(u)})))})}function Nt(e,t,...n){var i=e,r=ft,a;$e(()=>{r!==(r=t())&&(a&&(De(a),a=null),a=Oe(()=>r(i,...n)))},bt)}function Bo(e,t,n,i,r,a){var o,l,c=null,u=e,d;$e(()=>{const f=t()||null;var v=f==="svg"?ar:null;f!==o&&(d&&(f===null?mt(d,()=>{d=null,l=null}):f===l?Vt(d):(De(d),Oi(!1))),f&&f!==l&&(d=Oe(()=>{c=v?document.createElementNS(v,f):document.createElement(f),pt(c,c);{var m=c.appendChild(jt());i(c,m)}Y.nodes_end=c,u.before(c)})),o=f,o&&(l=o),Oi(!0))},bt)}function an(e,t,n){st(()=>{var i=Ve(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};In(()=>{var o=n();xo(o),r&&ii(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function Dr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Dr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Vo(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Dr(e))&&(i&&(i+=" "),i+=t);return i}function Uo(e){return typeof e=="object"?Vo(e):e??""}function zo(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ce(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Ia]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Wo(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},c=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=Uo(n.class)),n.class=n.class?n.class+" "+i:i;var d=Rr(e),f=e.__attributes??(e.__attributes={});for(const p in n){let S=n[p];if(c&&p==="value"&&S==null){e.value=e.__value="",l[p]=S;continue}var v=l[p];if(S!==v){l[p]=S;var m=p[0]+p[1];if(m!=="$$"){if(m==="on"){const A={},b="$$"+p;let T=p.slice(2);var g=To(T);if(So(T)&&(T=T.slice(0,-7),A.capture=!0),!g&&v){if(S!=null)continue;e.removeEventListener(T,l[b],A),l[b]=null}if(S!=null)if(g)e[`__${T}`]=S,ve([T]);else{let U=function(M){l[p].call(this,M)};var w=U;l[b]=ui(T,e,U,A)}else g&&(e[`__${T}`]=void 0)}else if(p==="style"&&S!=null)e.style.cssText=S+"";else if(p==="autofocus")jo(e,!!S);else if(p==="__value"||p==="value"&&S!=null)e.value=e[p]=e.__value=S;else if(p==="selected"&&c)zo(e,S);else{var h=p;r||(h=Ao(h));var y=h==="defaultValue"||h==="defaultChecked";if(S==null&&!a&&!y)if(f[p]=null,h==="value"||h==="checked"){let A=e;if(h==="value"){let b=A.defaultValue;A.removeAttribute(h),A.defaultValue=b}else{let b=A.defaultChecked;A.removeAttribute(h),A.defaultChecked=b}}else e.removeAttribute(p);else y||d.includes(h)&&(a||typeof S!="string")?e[h]=S:typeof S!="function"&&ce(e,h,S)}p==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var Ri=new Map;function Rr(e){var t=Ri.get(e.nodeName);if(t)return t;Ri.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=Ji(i);for(var a in n)n[a].set&&t.push(a);i=ni(i)}return t}function Ko(e,t,n){var i=e.__className,r=Yo(t);(i!==r||sr)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Yo(e,t){return(e??"")+""}function ue(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 jn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Zo=()=>performance.now(),Je={tick:e=>requestAnimationFrame(e),now:()=>Zo(),tasks:new Set};function qr(){const e=Je.now();Je.tasks.forEach(t=>{t.c(e)||(Je.tasks.delete(t),t.f())}),Je.tasks.size!==0&&Je.tick(qr)}function Go(e){let t;return Je.tasks.size===0&&Je.tick(qr),{promise:new Promise(n=>{Je.tasks.add(t={c:e,f:n})}),abort(){Je.tasks.delete(t)}}}function dn(e,t){e.dispatchEvent(new CustomEvent(t))}function Xo(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 qi(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Xo(r.trim());t[o]=a.trim()}return t}const Jo=e=>e;function Ce(e,t,n,i){var r=(e&Ya)!==0,a=(e&Za)!==0,o=r&&a,l=(e&Ga)!==0,c=o?"both":r?"in":"out",u,d=t.inert,f,v;function m(){var p=ne,S=Y;Re(null),Ie(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:c}))}finally{Re(p),Ie(S)}}var g={is_global:l,in(){var p;if(t.inert=d,!r){v==null||v.abort(),(p=v==null?void 0:v.reset)==null||p.call(v);return}a||f==null||f.abort(),dn(t,"introstart"),f=Xn(t,m(),v,1,()=>{dn(t,"introend"),f==null||f.abort(),f=u=void 0})},out(p){if(!a){p==null||p(),u=void 0;return}t.inert=!0,dn(t,"outrostart"),v=Xn(t,m(),f,0,()=>{dn(t,"outroend"),p==null||p()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},h=Y;if((h.transitions??(h.transitions=[])).push(g),r&&pn){var y=l;if(!y){for(var w=h.parent;w&&w.f&bt;)for(;(w=w.parent)&&!(w.f&xn););y=!w||(w.f&$i)!==0}y&&st(()=>{Ve(()=>g.in())})}}function Xn(e,t,n,i,r){var a=i===1;if(St(t)){var o,l=!1;return Lt(()=>{if(!l){var y=t({direction:a?"in":"out"});o=Xn(e,y,n,i,r)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:ft,deactivate:ft,reset:ft,t:()=>i};const{delay:c=0,css:u,tick:d,easing:f=Jo}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),u)){var m=qi(u(0,1));v.push(m,m)}var g=()=>1-i,h=e.animate(v,{duration:c});return h.onfinish=()=>{var y=(n==null?void 0:n.t())??1-i;n==null||n.abort();var w=i-y,p=t.duration*Math.abs(w),S=[];if(p>0){if(u)for(var A=Math.ceil(p/16.666666666666668),b=0;b<=A;b+=1){var T=y+w*f(b/A),U=u(T,1-T);S.push(qi(U))}g=()=>{var M=h.currentTime;return y+w*f(M/p)},d&&Go(()=>{if(h.playState!=="running")return!1;var M=g();return d(M,1-M),!0})}h=e.animate(S,{duration:p,fill:"forwards"}),h.onfinish=()=>{g=()=>i,d==null||d(i,1-i),r()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ft)},deactivate:()=>{r=ft},reset:()=>{i===0&&(d==null||d(1,0))},t:()=>g()}}function Qo(e,t,n=t){var i=en();Lr(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Hn(e)?Fn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),Ve(t)==null&&e.value&&n(Hn(e)?Fn(e.value):e.value),In(()=>{var r=t();Hn(e)&&r===Fn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Hn(e){var t=e.type;return t==="number"||t==="range"}function Fn(e){return e===""?null:+e}function Hr(e,t,n){if(e.multiple)return tl(e,t);for(var i of e.options){var r=qt(i);if($a(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function $o(e,t){st(()=>{var n=new MutationObserver(()=>{var i=e.__value;Hr(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function el(e,t,n=t){var i=!0;Lr(e,"change",r=>{var a=r?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),qt);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&qt(l)}n(o)}),st(()=>{var r=t();if(Hr(e,r,i),i&&r===void 0){var a=e.querySelector(":checked");a!==null&&(r=qt(a),n(r))}e.__value=r,i=!1}),$o(e)}function tl(e,t){for(var n of e.options)n.selected=~t.indexOf(qt(n))}function qt(e){return"__value"in e?e.__value:e.value}var it,It,Gt,kn,Fr;const bn=class bn{constructor(t){dt(this,kn);dt(this,it,new WeakMap);dt(this,It);dt(this,Gt);Ot(this,Gt,t)}observe(t,n){var i=Fe(this,it).get(t)||new Set;return i.add(n),Fe(this,it).set(t,i),Ai(this,kn,Fr).call(this).observe(t,Fe(this,Gt)),()=>{var r=Fe(this,it).get(t);r.delete(n),r.size===0&&(Fe(this,it).delete(t),Fe(this,It).unobserve(t))}}};it=new WeakMap,It=new WeakMap,Gt=new WeakMap,kn=new WeakSet,Fr=function(){return Fe(this,It)??Ot(this,It,new ResizeObserver(t=>{for(var n of t){bn.entries.set(n.target,n);for(var i of Fe(this,it).get(n.target)||[])i(n)}}))},Ii(bn,"entries",new WeakMap);let Jn=bn;var nl=new Jn({box:"border-box"});function il(e,t,n){var i=nl.observe(e,()=>n(e[t]));st(()=>(Ve(()=>n(e[t])),i))}function Hi(e,t){return e===t||(e==null?void 0:e[Ke])===t}function on(e={},t,n,i){return st(()=>{var r,a;return In(()=>{r=a,a=[],Ve(()=>{e!==n(...a)&&(t(e,...a),r&&Hi(n(...r),e)&&t(null,...r))})}),()=>{Lt(()=>{a&&Hi(n(...a),e)&&t(null,...a)})}}),e}let fn=!1;function rl(e){var t=fn;try{return fn=!1,[e(),fn]}finally{fn=t}}const al={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 ol(e,t,n){return new Proxy({props:e,exclude:t},al)}const ll={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(St(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];St(r)&&(r=r());const a=at(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(St(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=at(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===Ke||t===nr)return!1;for(let n of e.props)if(St(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){St(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function sl(...e){return new Proxy({props:e},ll)}function Fi(e){for(var t=Y,n=Y;t!==null&&!(t.f&(ze|$t));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function O(e,t,n,i){var U;var r=(n&Va)!==0,a=!Ct||(n&Ua)!==0,o=(n&Wa)!==0,l=(n&Ka)!==0,c=!1,u;o?[u,c]=rl(()=>e[t]):u=e[t];var d=Ke in e||nr in e,f=o&&(((U=at(e,t))==null?void 0:U.set)??(d&&t in e&&(M=>e[t]=M)))||void 0,v=i,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,l?v=Ve(i):v=i),v);u===void 0&&i!==void 0&&(f&&a&&La(),u=h(),f&&f(u));var y;if(a)y=()=>{var M=e[t];return M===void 0?h():(m=!0,g=!1,M)};else{var w=Fi(()=>(r?z:no)(()=>e[t]));w.f|=Ta,y=()=>{var M=s(w);return M!==void 0&&(v=void 0),M===void 0?v:M}}if(!(n&za))return y;if(f){var p=e.$$legacy;return function(M,P){return arguments.length>0?((!a||!P||p||c)&&f(P?y():M),M):y()}}var S=!1,A=!1,b=or(u),T=Fi(()=>z(()=>{var M=y(),P=s(b);return S?(S=!1,A=!0,P):(A=!1,b.v=M)}));return r||(T.equals=ri),function(M,P){if(arguments.length>0){const D=P?s(T):a&&o?J(M):M;return T.equals(D)||(S=!0,C(b,D),g&&v!==void 0&&(v=D),Ve(()=>s(T))),M}return s(T)}}function Bi(e,t){var n=Y,i=ne,r=ie;Ie(e),Re(e),Li(e.ctx);try{t()}finally{Ie(n),Re(i),Li(r)}}function cl(e,t,n){var i=e,r;$e(()=>{var a=Y,o=!1;a.fn=l=>{var c=t.onerror;let u=t.failed;if(!c&&!u||o)throw l;var d=()=>{mt(r),Bi(a,()=>{o=!1,r=Oe(()=>n(i)),qn()})};c==null||c(l,d),r&&De(r),Lt(()=>{Bi(a,()=>{o=!0;try{r=Oe(()=>{u(i,()=>l,()=>d)})}catch(f){nn(f,a,null,a.ctx)}qn(),o=!1})})},r=Oe(()=>n(i)),qn()},bt|hn)}function Ge(e){ie===null&&kr(),Ct&&ie.l!==null?ul(ie).m.push(e):Tn(()=>{const t=Ve(e);if(typeof t=="function")return t})}function ul(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const dl="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(dl);const Br="https://www.playpilot.com",Mn="https://partner-api.playpilot.tech/1.0.0",Vr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",fe=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",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",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action"});function fi(){const e=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+e}const fl="https://insights.playpilot.net";async function he(e,t=null,n={}){var r,a,o;const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,title_type:t.type,providers:[...new Set(((r=t.providers)==null?void 0:r.map(l=>l.name))||[])],...n}),n.url=fi(),n.organization_sid=(a=window.PlayPilotLinkInjections)==null?void 0:a.organization_sid,n.domain_sid=(o=window.PlayPilotLinkInjections)==null?void 0:o.domain_sid,fetch(fl,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})}),vl({event:e,payload:n})}function vl(e){var t;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(t=window.PlayPilotLinkInjections.tracked_events)==null||t.push(e)}function _l({organizationSid:e=null,domainSid:t=null}){window.PlayPilotLinkInjections.organization_sid=e||null,window.PlayPilotLinkInjections.domain_sid=t||null}const vi="EncryptedToken",Ur="articleReplacementEditToken",zr="playpilot-editorial-mode";async function Wr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=On();if(!n)throw new Error("No token was provided");const i=_i(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(Mn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return hl(i),!0}catch(n){console.error(n),he(fe.AuthFailed)}finally{pl()}return!1}function _i(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(Ur);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${vi}=`).pop())==null?void 0:r.split(";")[0])||""}function hl(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=vi+"="+e+";"+i+";path=/"}function gl(){document.cookie=vi+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Kr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(zr)==="true"||!!e}function ml(){const e=new URL(window.location.href);e.searchParams.set(zr,"true"),window.history.replaceState({},"",e)}function pl(){const e=new URL(window.location.href);e.searchParams.delete(Ur),window.history.replaceState({},"",e)}function yl(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}function Yr(){return(Math.random()+1).toString(36).substring(7)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),wl={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},Watch:{[_.English]:"Watch",[_.Swedish]:"Se",[_.Danish]:"Se"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function ye(e,t=Zr()){var n;return((n=wl[e])==null?void 0:n[t])||e}function Zr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");if(n){if(t.includes(n))return n;const a=t.find(o=>o.toLowerCase().startsWith(n+"-"));if(a)return a}return _.English}function kl(e){var i,r,a;const t=(r=(i=window.PlayPilotLinkInjections)==null?void 0:i.split_test_identifiers)==null?void 0:r[e];if(t)return t;(a=window.PlayPilotLinkInjections)!=null&&a.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});const n=Math.random();return window.PlayPilotLinkInjections.split_test_identifiers[e]=n,n}function Gr(e){return kl(e)>.5}function bl(e){const t=Gr(e)?1:0;he(fe.SplitTestView,null,{key:e,variant:t})}function xl(e,t){const n=Gr(e)?1:0;he(fe.SplitTestAction,null,{key:e,variant:n,action:t})}const Sl=e=>e;function hi(e){const t=e-1;return t*t*t+1}function Vi(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Kt(e,{delay:t=0,duration:n=400,easing:i=Sl}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function Ln(e,{delay:t=0,duration:n=400,easing:i=hi,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),c=+l.opacity,u=l.transform==="none"?"":l.transform,d=c*(1-o),[f,v]=Vi(r),[m,g]=Vi(a);return{delay:t,duration:n,easing:i,css:(h,y)=>`
|
|
3
|
+
var ya=Object.defineProperty;var Ti=e=>{throw TypeError(e)};var wa=(e,t,n)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ii=(e,t,n)=>wa(e,typeof t!="symbol"?t+"":t,n),Rn=(e,t,n)=>t.has(e)||Ti("Cannot "+n);var Fe=(e,t,n)=>(Rn(e,t,"read from private field"),n?n.call(e):t.get(e)),dt=(e,t,n)=>t.has(e)?Ti("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ot=(e,t,n,i)=>(Rn(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ai=(e,t,n)=>(Rn(e,t,"access private method"),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const Vn=!1;var ei=Array.isArray,ka=Array.prototype.indexOf,ti=Array.from,ba=Object.defineProperty,at=Object.getOwnPropertyDescriptor,Ji=Object.getOwnPropertyDescriptors,xa=Object.prototype,Sa=Array.prototype,ni=Object.getPrototypeOf;function St(e){return typeof e=="function"}const ft=()=>{};function Ea(e){for(var t=0;t<e.length;t++)e[t]()}function _n(e,t,n=!1){return e===void 0?n?t():t:e}const Be=2,Qi=4,Qt=8,xn=16,ze=32,$t=64,hn=128,kt=256,gn=512,je=1024,lt=2048,Sn=4096,We=8192,Pt=16384,$i=32768,bt=65536,Ta=1<<17,er=1<<19,tr=1<<20,Ke=Symbol("$state"),nr=Symbol("legacy props"),Ia=Symbol("");function ir(e){return e===this.v}function ii(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Aa(e,t){return e!==t}function ri(e){return!ii(e,this.v)}function Pa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ca(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ja(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ma(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function La(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Oa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Ra(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ct=!1,qa=!1;function Ha(){Ct=!0}const ai=1,oi=2,rr=4,Fa=8,Ba=16,Va=1,Ua=2,za=4,Wa=8,Ka=16,Ya=1,Za=2,Ga=4,Xa=1,Ja=2,xe=Symbol(),ar="http://www.w3.org/2000/svg";function Te(e,t){var n={f:0,v:e,reactions:null,equals:ir,rv:0,wv:0};return n}function V(e){return Qa(Te(e))}function or(e,t=!1){var i;const n=Te(e);return t||(n.equals=ri),Ct&&ie!==null&&ie.l!==null&&((i=ie.l).s??(i.s=[])).push(n),n}function Qa(e){return ne!==null&&ne.f&Be&&(Ye===null?vo([e]):Ye.push(e)),e}function C(e,t){return ne!==null&&en()&&ne.f&(Be|xn)&&(Ye===null||!Ye.includes(e))&&Ra(),Un(e,t)}function Un(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Sr(),lr(e,lt),en()&&Y!==null&&Y.f&je&&!(Y.f&ze)&&(ke!==null&&ke.includes(e)?(Ze(Y,lt),Pn(Y)):ot===null?_o([e]):ot.push(e))),t}function lr(e,t){var n=e.reactions;if(n!==null)for(var i=en(),r=n.length,a=0;a<r;a++){var o=n[a],l=o.f;l<||!i&&o===Y||(Ze(o,t),l&(je|kt)&&(l&Be?lr(o,Sn):Pn(o)))}}let sr=!1;function J(e,t=null,n){if(typeof e!="object"||e===null||Ke in e)return e;const i=ni(e);if(i!==xa&&i!==Sa)return e;var r=new Map,a=ei(e),o=Te(0);a&&r.set("length",Te(e.length));var l;return new Proxy(e,{defineProperty(c,u,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Na();var f=r.get(u);return f===void 0?(f=Te(d.value),r.set(u,f)):C(f,J(d.value,l)),!0},deleteProperty(c,u){var d=r.get(u);if(d===void 0)u in c&&r.set(u,Te(xe));else{if(a&&typeof u=="string"){var f=r.get("length"),v=Number(u);Number.isInteger(v)&&v<f.v&&C(f,v)}C(d,xe),Pi(o)}return!0},get(c,u,d){var g;if(u===Ke)return e;var f=r.get(u),v=u in c;if(f===void 0&&(!v||(g=at(c,u))!=null&&g.writable)&&(f=Te(J(v?c[u]:xe,l)),r.set(u,f)),f!==void 0){var m=s(f);return m===xe?void 0:m}return Reflect.get(c,u,d)},getOwnPropertyDescriptor(c,u){var d=Reflect.getOwnPropertyDescriptor(c,u);if(d&&"value"in d){var f=r.get(u);f&&(d.value=s(f))}else if(d===void 0){var v=r.get(u),m=v==null?void 0:v.v;if(v!==void 0&&m!==xe)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(c,u){var m;if(u===Ke)return!0;var d=r.get(u),f=d!==void 0&&d.v!==xe||Reflect.has(c,u);if(d!==void 0||Y!==null&&(!f||(m=at(c,u))!=null&&m.writable)){d===void 0&&(d=Te(f?J(c[u],l):xe),r.set(u,d));var v=s(d);if(v===xe)return!1}return f},set(c,u,d,f){var S;var v=r.get(u),m=u in c;if(a&&u==="length")for(var g=d;g<v.v;g+=1){var h=r.get(g+"");h!==void 0?C(h,xe):g in c&&(h=Te(xe),r.set(g+"",h))}v===void 0?(!m||(S=at(c,u))!=null&&S.writable)&&(v=Te(void 0),C(v,J(d,l)),r.set(u,v)):(m=v.v!==xe,C(v,J(d,l)));var y=Reflect.getOwnPropertyDescriptor(c,u);if(y!=null&&y.set&&y.set.call(f,d),!m){if(a&&typeof u=="string"){var w=r.get("length"),p=Number(u);Number.isInteger(p)&&p>=w.v&&C(w,p+1)}Pi(o)}return!0},ownKeys(c){s(o);var u=Reflect.ownKeys(c).filter(v=>{var m=r.get(v);return m===void 0||m.v!==xe});for(var[d,f]of r)f.v!==xe&&!(d in c)&&u.push(d);return u},setPrototypeOf(){Oa()}})}function Pi(e,t=1){C(e,e.v+t)}function Ci(e){return e!==null&&typeof e=="object"&&Ke in e?e[Ke]:e}function $a(e,t){return Object.is(Ci(e),Ci(t))}var be,cr,ur;function eo(){if(be===void 0){be=window;var e=Element.prototype,t=Node.prototype;cr=at(t,"firstChild").get,ur=at(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 jt(e=""){return document.createTextNode(e)}function gt(e){return cr.call(e)}function En(e){return ur.call(e)}function x(e,t){return gt(e)}function ee(e,t){{var n=gt(e);return n instanceof Comment&&n.data===""?En(n):n}}function E(e,t=1,n=!1){let i=e;for(;t--;)i=En(i);return i}function to(e){e.textContent=""}function z(e){var t=Be|lt;Y===null?t|=kt:Y.f|=tr;var n=ne!==null&&ne.f&Be?ne:null;const i={children:null,ctx:ie,deps:null,equals:ir,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??Y};return n!==null&&(n.children??(n.children=[])).push(i),i}function no(e){const t=z(e);return t.equals=ri,t}function dr(e){var t=e.children;if(t!==null){e.children=null;for(var n=0;n<t.length;n+=1){var i=t[n];i.f&Be?li(i):De(i)}}}function io(e){for(var t=e.parent;t!==null;){if(!(t.f&Be))return t;t=t.parent}return null}function fr(e){var t,n=Y;Ie(io(e));try{dr(e),t=Er(e)}finally{Ie(n)}return t}function vr(e){var t=fr(e),n=(rt||e.f&kt)&&e.deps!==null?Sn:je;Ze(e,n),e.equals(t)||(e.v=t,e.wv=Sr())}function li(e){dr(e),Wt(e,0),Ze(e,Pt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function ro(e){Y===null&&ne===null&&ja(),ne!==null&&ne.f&kt&&Ca(),ci&&Pa()}function ao(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Mt(e,t,n,i=!0){var r=(e&$t)!==0,a=Y,o={ctx:ie,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|lt,first:null,fn:t,last:null,next:null,parent:r?null:a,prev:null,teardown:null,transitions:null,wv:0};if(n){var l=Et;try{ji(!0),An(o),o.f|=$i}catch(d){throw De(o),d}finally{ji(l)}}else t!==null&&Pn(o);var c=n&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&tr)===0;if(!c&&!r&&i&&(a!==null&&ao(o,a),ne!==null&&ne.f&Be)){var u=ne;(u.children??(u.children=[])).push(o)}return o}function oo(){return ne===null?!1:!rt}function lo(e){const t=Mt(Qt,null,!1);return Ze(t,je),t.teardown=e,t}function Tn(e){ro();var t=Y!==null&&(Y.f&ze)!==0&&ie!==null&&!ie.m;if(t){var n=ie;(n.e??(n.e=[])).push({fn:e,effect:Y,reaction:ne})}else{var i=st(e);return i}}function so(e){const t=Mt($t,e,!0);return(n={})=>new Promise(i=>{n.outro?mt(t,()=>{De(t),i(void 0)}):(De(t),i(void 0))})}function st(e){return Mt(Qi,e,!1)}function In(e){return Mt(Qt,e,!0)}function N(e){return $e(e)}function $e(e,t=0){return Mt(Qt|xn|t,e,!0)}function Oe(e,t=!0){return Mt(Qt|ze,e,!0,t)}function _r(e){var t=e.teardown;if(t!==null){const n=ci,i=ne;Mi(!0),Re(null);try{t.call(null)}finally{Mi(n),Re(i)}}}function hr(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var n=0;n<t.length;n+=1)li(t[n])}}function gr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;De(n,t),n=i}}function co(e){for(var t=e.first;t!==null;){var n=t.next;t.f&ze||De(t),t=n}}function De(e,t=!0){var n=!1;if((t||e.f&er)&&e.nodes_start!==null){for(var i=e.nodes_start,r=e.nodes_end;i!==null;){var a=i===r?null:En(i);i.remove(),i=a}n=!0}gr(e,t&&!n),hr(e),Wt(e,0),Ze(e,Pt);var o=e.transitions;if(o!==null)for(const c of o)c.stop();_r(e);var l=e.parent;l!==null&&l.first!==null&&mr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function mr(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function mt(e,t){var n=[];si(e,n,!0),pr(n,()=>{De(e),t&&t()})}function pr(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function si(e,t,n){if(!(e.f&We)){if(e.f^=We,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var r=i.next,a=(i.f&bt)!==0||(i.f&ze)!==0;si(i,t,a?n:!1),i=r}}}function Vt(e){yr(e,!0)}function yr(e,t){if(e.f&We){tn(e)&&An(e),e.f^=We;for(var n=e.first;n!==null;){var i=n.next,r=(n.f&bt)!==0||(n.f&ze)!==0;yr(n,r?t:!1),n=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let mn=!1,zn=[];function wr(){mn=!1;const e=zn.slice();zn=[],Ea(e)}function Lt(e){mn||(mn=!0,queueMicrotask(wr)),zn.push(e)}function uo(){mn&&wr()}function kr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}const br=0,fo=1;let Rt=!1,vn=br,Ut=!1,zt=null,Et=!1,ci=!1;function ji(e){Et=e}function Mi(e){ci=e}let vt=[],Tt=0;let ne=null;function Re(e){ne=e}let Y=null;function Ie(e){Y=e}let Ye=null;function vo(e){Ye=e}let ke=null,Pe=0,ot=null;function _o(e){ot=e}let xr=1,Wn=0,rt=!1,ie=null;function Li(e){ie=e}function Sr(){return++xr}function en(){return!Ct||ie!==null&&ie.l===null}function tn(e){var u;var t=e.f;if(t<)return!0;if(t&Sn){var n=e.deps,i=(t&kt)!==0;if(n!==null){var r,a,o=(t&gn)!==0,l=i&&Y!==null&&!rt,c=n.length;if(o||l){for(r=0;r<c;r++)a=n[r],(o||!((u=a==null?void 0:a.reactions)!=null&&u.includes(e)))&&(a.reactions??(a.reactions=[])).push(e);o&&(e.f^=gn)}for(r=0;r<c;r++)if(a=n[r],tn(a)&&vr(a),a.wv>e.wv)return!0}(!i||Y!==null&&!rt)&&Ze(e,je)}return!1}function ho(e,t){for(var n=t;n!==null;){if(n.f&hn)try{n.fn(e);return}catch{n.f^=hn}n=n.parent}throw Rt=!1,e}function go(e){return(e.f&Pt)===0&&(e.parent===null||(e.parent.f&hn)===0)}function qn(){Rt=!1}function nn(e,t,n,i){if(Rt){if(n===null&&(Rt=!1),go(t))throw e;return}n!==null&&(Rt=!0);{ho(e,t);return}}function Er(e){var v;var t=ke,n=Pe,i=ot,r=ne,a=rt,o=Ye,l=ie,c=e.f;ke=null,Pe=0,ot=null,ne=c&(ze|$t)?null:e,rt=!Et&&(c&kt)!==0,Ye=null,ie=e.ctx,Wn++;try{var u=(0,e.fn)(),d=e.deps;if(ke!==null){var f;if(Wt(e,Pe),d!==null&&Pe>0)for(d.length=Pe+ke.length,f=0;f<ke.length;f++)d[Pe+f]=ke[f];else e.deps=d=ke;if(!rt)for(f=Pe;f<d.length;f++)((v=d[f]).reactions??(v.reactions=[])).push(e)}else d!==null&&Pe<d.length&&(Wt(e,Pe),d.length=Pe);return u}finally{ke=t,Pe=n,ot=i,ne=r,rt=a,Ye=o,ie=l}}function mo(e,t){let n=t.reactions;if(n!==null){var i=ka.call(n,e);if(i!==-1){var r=n.length-1;r===0?n=t.reactions=null:(n[i]=n[r],n.pop())}}n===null&&t.f&Be&&(ke===null||!ke.includes(t))&&(Ze(t,Sn),t.f&(kt|gn)||(t.f^=gn),Wt(t,0))}function Wt(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)mo(e,n[i])}function An(e){var t=e.f;if(!(t&Pt)){Ze(e,je);var n=Y,i=ie;Y=e;try{t&xn?co(e):gr(e),hr(e),_r(e);var r=Er(e);e.teardown=typeof r=="function"?r:null,e.wv=xr;var a=e.deps,o;Vn&&qa&&e.f<}catch(l){nn(l,e,n,i||e.ctx)}finally{Y=n}}}function Tr(){if(Tt>1e3){Tt=0;try{Ma()}catch(e){if(zt!==null)nn(e,zt,null);else throw e}}Tt++}function Ir(e){var t=e.length;if(t!==0){Tr();var n=Et;Et=!0;try{for(var i=0;i<t;i++){var r=e[i];r.f&je||(r.f^=je);var a=[];Ar(r,a),po(a)}}finally{Et=n}}}function po(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if(!(i.f&(Pt|We)))try{tn(i)&&(An(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?mr(i):i.fn=null))}catch(r){nn(r,i,null,i.ctx)}}}function yo(){if(Ut=!1,Tt>1001)return;const e=vt;vt=[],Ir(e),Ut||(Tt=0,zt=null)}function Pn(e){vn===br&&(Ut||(Ut=!0,queueMicrotask(yo))),zt=e;for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(n&($t|ze)){if(!(n&je))return;t.f^=je}}vt.push(t)}function Ar(e,t){var n=e.first,i=[];e:for(;n!==null;){var r=n.f,a=(r&ze)!==0,o=a&&(r&je)!==0,l=n.next;if(!o&&!(r&We))if(r&Qt){if(a)n.f^=je;else try{tn(n)&&An(n)}catch(f){nn(f,n,null,n.ctx)}var c=n.first;if(c!==null){n=c;continue}}else r&Qi&&i.push(n);if(l===null){let f=n.parent;for(;f!==null;){if(e===f)break e;var u=f.next;if(u!==null){n=u;continue e}f=f.parent}}n=l}for(var d=0;d<i.length;d++)c=i[d],t.push(c),Ar(c,t)}function Pr(e){var t=vn,n=vt;try{Tr();const r=[];vn=fo,vt=r,Ut=!1,Ir(n);var i=e==null?void 0:e();return uo(),(vt.length>0||r.length>0)&&Pr(),Tt=0,zt=null,i}finally{vn=t,vt=n}}async function Kn(){await Promise.resolve(),Pr()}function s(e){var d;var t=e.f,n=(t&Be)!==0;if(n&&t&Pt){var i=fr(e);return li(e),i}if(ne!==null){Ye!==null&&Ye.includes(e)&&Da();var r=ne.deps;e.rv<Wn&&(e.rv=Wn,ke===null&&r!==null&&r[Pe]===e?Pe++:ke===null?ke=[e]:ke.push(e),ot!==null&&Y!==null&&Y.f&je&&!(Y.f&ze)&&ot.includes(e)&&(Ze(Y,lt),Pn(Y)))}else if(n&&e.deps===null)for(var a=e,o=a.parent,l=a;o!==null;)if(o.f&Be){var c=o;l=c,o=c.parent}else{var u=o;(d=u.deriveds)!=null&&d.includes(l)||(u.deriveds??(u.deriveds=[])).push(l);break}return n&&(a=e,tn(a)&&vr(a)),e.v}function Ve(e){const t=ne;try{return ne=null,e()}finally{ne=t}}const wo=-7169;function Ze(e,t){e.f=e.f&wo|t}function ko(e){return jr().get(e)}function Cr(e,t){return jr().set(e,t),t}function jr(e){return ie===null&&kr(),ie.c??(ie.c=new Map(bo(ie)||void 0))}function bo(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}function le(e,t=!1,n){ie={p:ie,c:null,e:null,m:!1,s:e,x:null,l:null},Ct&&!t&&(ie.l={s:null,u:null,r1:[],r2:Te(!1)})}function se(e){const t=ie;if(t!==null){const o=t.e;if(o!==null){var n=Y,i=ne;t.e=null;try{for(var r=0;r<o.length;r++){var a=o[r];Ie(a.effect),Re(a.reaction),st(a.fn)}}finally{Ie(n),Re(i)}}ie=t.p,t.m=!0}return{}}function xo(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ke in e)Yn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Ke in n&&Yn(n)}}}function Yn(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Yn(e[i],t)}catch{}const n=ni(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Ji(n);for(let r in i){const a=i[r].get;if(a)try{a.call(e)}catch{}}}}}function So(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Eo=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function To(e){return Eo.includes(e)}const Io={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Ao(e){return e=e.toLowerCase(),Io[e]??e}const Po=["touchstart","touchmove"];function Co(e){return Po.includes(e)}function jo(e,t){if(t){const n=document.body;e.autofocus=!0,Lt(()=>{document.activeElement===n&&e.focus()})}}let Ni=!1;function Mo(){Ni||(Ni=!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 Mr(e){var t=ne,n=Y;Re(null),Ie(null);try{return e()}finally{Re(t),Ie(n)}}function Lr(e,t,n,i=n){e.addEventListener(t,()=>Mr(n));const r=e.__on_r;r?e.__on_r=()=>{r(),i(!0)}:e.__on_r=()=>i(!0),Mo()}const Nr=new Set,Zn=new Set;function ui(e,t,n,i){function r(a){if(i.capture||Dt.call(t,a),!a.cancelBubble)return Mr(()=>n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Lt(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function Lo(e,t,n,i={}){var r=ui(t,e,n,i);return()=>{e.removeEventListener(t,r,i)}}function de(e,t,n,i,r){var a={capture:i,passive:r},o=ui(e,t,n,a);(t===document.body||t===window||t===document)&&lo(()=>{t.removeEventListener(e,o,a)})}function ve(e){for(var t=0;t<e.length;t++)Nr.add(e[t]);for(var n of Zn)n(e)}function Dt(e){var p;var t=this,n=t.ownerDocument,i=e.type,r=((p=e.composedPath)==null?void 0:p.call(e))||[],a=r[0]||e.target,o=0,l=e.__root;if(l){var c=r.indexOf(l);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var u=r.indexOf(t);if(u===-1)return;c<=u&&(o=c)}if(a=r[o]||e.target,a!==t){ba(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=ne,f=Y;Re(null),Ie(null);try{for(var v,m=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+i];if(h!==void 0&&!a.disabled)if(ei(h)){var[y,...w]=h;y.apply(a,[e,...w])}else h.call(a,e)}catch(S){v?m.push(S):v=S}if(e.cancelBubble||g===t||g===null)break;a=g}if(v){for(let S of m)queueMicrotask(()=>{throw S});throw v}}finally{e.__root=t,delete e.currentTarget,Re(d),Ie(f)}}}function No(e){var t;t=document.head.appendChild(jt());try{$e(()=>e(t),er)}finally{}}function di(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function pt(e,t){var n=Y;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function I(e,t){var n=(t&Xa)!==0,i=(t&Ja)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=di(a?e:"<!>"+e),n||(r=gt(r)));var o=i?document.importNode(r,!0):r.cloneNode(!0);if(n){var l=gt(o),c=o.lastChild;pt(l,c)}else pt(o,o);return o}}function He(e,t,n="svg"){var i=!e.startsWith("<!>"),r=`<${n}>${i?e:"<!>"+e}</${n}>`,a;return()=>{if(!a){var o=di(r),l=gt(o);a=gt(l)}var c=a.cloneNode(!0);return pt(c,c),c}}function Ue(e=""){{var t=jt(e+"");return pt(t,t),t}}function qe(){var e=document.createDocumentFragment(),t=document.createComment(""),n=jt();return e.append(t,n),pt(t,n),e}function k(e,t){e!==null&&e.before(t)}let pn=!0;function Oi(e){pn=e}function K(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 rn(e,t){return Oo(e,t)}const xt=new Map;function Oo(e,{target:t,anchor:n,props:i={},events:r,context:a,intro:o=!0}){eo();var l=new Set,c=f=>{for(var v=0;v<f.length;v++){var m=f[v];if(!l.has(m)){l.add(m);var g=Co(m);t.addEventListener(m,Dt,{passive:g});var h=xt.get(m);h===void 0?(document.addEventListener(m,Dt,{passive:g}),xt.set(m,1)):xt.set(m,h+1)}}};c(ti(Nr)),Zn.add(c);var u=void 0,d=so(()=>{var f=n??t.appendChild(jt());return Oe(()=>{if(a){le({});var v=ie;v.c=a}r&&(i.$$events=r),pn=o,u=e(f,i)||{},pn=!0,a&&se()}),()=>{var g;for(var v of l){t.removeEventListener(v,Dt);var m=xt.get(v);--m===0?(document.removeEventListener(v,Dt),xt.delete(v)):xt.set(v,m)}Zn.delete(c),f!==n&&((g=f.parentNode)==null||g.removeChild(f))}});return Gn.set(u,d),u}let Gn=new WeakMap;function Cn(e,t){const n=Gn.get(e);return n?(Gn.delete(e),n(t)):Promise.resolve()}function H(e,t,n=!1){var i=e,r=null,a=null,o=xe,l=n?bt:0,c=!1;const u=(f,v=!0)=>{c=!0,d(v,f)},d=(f,v)=>{o!==(o=f)&&(o?(r?Vt(r):v&&(r=Oe(()=>v(i))),a&&mt(a,()=>{a=null})):(a?Vt(a):v&&(a=Oe(()=>v(i))),r&&mt(r,()=>{r=null})))};$e(()=>{c=!1,t(u),c||d(null,null)},l)}function Or(e,t,n){var i=e,r=xe,a,o=en()?Aa:ii;$e(()=>{o(r,r=t())&&(a&&mt(a),a=Oe(()=>n(i)))})}function yt(e,t){return t}function Do(e,t,n,i){for(var r=[],a=t.length,o=0;o<a;o++)si(t[o].e,r,!0);var l=a>0&&r.length===0&&n!==null;if(l){var c=n.parentNode;to(c),c.append(n),i.clear(),nt(e,t[0].prev,t[a-1].next)}pr(r,()=>{for(var u=0;u<a;u++){var d=t[u];l||(i.delete(d.k),nt(e,d.prev,d.next)),De(d.e,!l)}})}function Qe(e,t,n,i,r,a=null){var o=e,l={flags:t,items:new Map,first:null},c=(t&rr)!==0;if(c){var u=e;o=u.appendChild(jt())}var d=null,f=!1;$e(()=>{var v=n(),m=ei(v)?v:v==null?[]:ti(v),g=m.length;if(!(f&&g===0)){f=g===0;{var h=ne;Ro(m,l,o,r,t,(h.f&We)!==0,i)}a!==null&&(g===0?d?Vt(d):d=Oe(()=>a(o)):d!==null&&mt(d,()=>{d=null})),n()}})}function Ro(e,t,n,i,r,a,o,l){var L,R,q,ae;var c=(r&Fa)!==0,u=(r&(ai|oi))!==0,d=e.length,f=t.items,v=t.first,m=v,g,h=null,y,w=[],p=[],S,A,b,T;if(c)for(T=0;T<d;T+=1)S=e[T],A=o(S,T),b=f.get(A),b!==void 0&&((L=b.a)==null||L.measure(),(y??(y=new Set)).add(b));for(T=0;T<d;T+=1){if(S=e[T],A=o(S,T),b=f.get(A),b===void 0){var U=m?m.e.nodes_start:n;h=Ho(U,t,h,h===null?t.first:h.next,S,A,T,i,r),f.set(A,h),w=[],p=[],m=h.next;continue}if(u&&qo(b,S,T,r),b.e.f&We&&(Vt(b.e),c&&((R=b.a)==null||R.unfix(),(y??(y=new Set)).delete(b))),b!==m){if(g!==void 0&&g.has(b)){if(w.length<p.length){var M=p[0],P;h=M.prev;var D=w[0],Z=w[w.length-1];for(P=0;P<w.length;P+=1)Di(w[P],M,n);for(P=0;P<p.length;P+=1)g.delete(p[P]);nt(t,D.prev,Z.next),nt(t,h,D),nt(t,Z,M),m=M,h=Z,T-=1,w=[],p=[]}else g.delete(b),Di(b,m,n),nt(t,b.prev,b.next),nt(t,b,h===null?t.first:h.next),nt(t,h,b),h=b;continue}for(w=[],p=[];m!==null&&m.k!==A;)(a||!(m.e.f&We))&&(g??(g=new Set)).add(m),p.push(m),m=m.next;if(m===null)continue;b=m}w.push(b),h=b,m=b.next}if(m!==null||g!==void 0){for(var G=g===void 0?[]:ti(g);m!==null;)(a||!(m.e.f&We))&&G.push(m),m=m.next;var B=G.length;if(B>0){var j=r&rr&&d===0?n:null;if(c){for(T=0;T<B;T+=1)(q=G[T].a)==null||q.measure();for(T=0;T<B;T+=1)(ae=G[T].a)==null||ae.fix()}Do(t,G,j,f)}}c&&Lt(()=>{var Q;if(y!==void 0)for(b of y)(Q=b.a)==null||Q.apply()}),Y.first=t.first&&t.first.e,Y.last=h&&h.e}function qo(e,t,n,i){i&ai&&Un(e.v,t),i&oi?Un(e.i,n):e.i=n}function Ho(e,t,n,i,r,a,o,l,c,u){var d=(c&ai)!==0,f=(c&Ba)===0,v=d?f?or(r):Te(r):r,m=c&oi?Te(o):o,g={i:m,v,k:a,a:null,e:null,prev:n,next:i};try{return g.e=Oe(()=>l(e,v,m),sr),g.e.prev=n&&n.e,g.e.next=i&&i.e,n===null?t.first=g:(n.next=g,n.e.next=g.e),i!==null&&(i.prev=g,i.e.prev=g.e),g}finally{}}function Di(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var o=En(a);r.before(a),a=o}}function nt(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 Fo(e,t,n,i,r){var a=e,o="",l;$e(()=>{o!==(o=t()??"")&&(l!==void 0&&(De(l),l=void 0),o!==""&&(l=Oe(()=>{var c=o+"",u=di(c);pt(gt(u),u.lastChild),a.before(u)})))})}function Nt(e,t,...n){var i=e,r=ft,a;$e(()=>{r!==(r=t())&&(a&&(De(a),a=null),a=Oe(()=>r(i,...n)))},bt)}function Bo(e,t,n,i,r,a){var o,l,c=null,u=e,d;$e(()=>{const f=t()||null;var v=f==="svg"?ar:null;f!==o&&(d&&(f===null?mt(d,()=>{d=null,l=null}):f===l?Vt(d):(De(d),Oi(!1))),f&&f!==l&&(d=Oe(()=>{c=v?document.createElementNS(v,f):document.createElement(f),pt(c,c);{var m=c.appendChild(jt());i(c,m)}Y.nodes_end=c,u.before(c)})),o=f,o&&(l=o),Oi(!0))},bt)}function an(e,t,n){st(()=>{var i=Ve(()=>t(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var r=!1,a={};In(()=>{var o=n();xo(o),r&&ii(a,o)&&(a=o,i.update(o))}),r=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function Dr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Dr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Vo(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Dr(e))&&(i&&(i+=" "),i+=t);return i}function Uo(e){return typeof e=="object"?Vo(e):e??""}function zo(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ce(e,t,n,i){var r=e.__attributes??(e.__attributes={});r[t]!==(r[t]=n)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[Ia]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Wo(e,t,n,i,r=!1,a=!1,o=!1){var l=t||{},c=e.tagName==="OPTION";for(var u in t)u in n||(n[u]=null);n.class&&(n.class=Uo(n.class)),n.class=n.class?n.class+" "+i:i;var d=Rr(e),f=e.__attributes??(e.__attributes={});for(const p in n){let S=n[p];if(c&&p==="value"&&S==null){e.value=e.__value="",l[p]=S;continue}var v=l[p];if(S!==v){l[p]=S;var m=p[0]+p[1];if(m!=="$$"){if(m==="on"){const A={},b="$$"+p;let T=p.slice(2);var g=To(T);if(So(T)&&(T=T.slice(0,-7),A.capture=!0),!g&&v){if(S!=null)continue;e.removeEventListener(T,l[b],A),l[b]=null}if(S!=null)if(g)e[`__${T}`]=S,ve([T]);else{let U=function(M){l[p].call(this,M)};var w=U;l[b]=ui(T,e,U,A)}else g&&(e[`__${T}`]=void 0)}else if(p==="style"&&S!=null)e.style.cssText=S+"";else if(p==="autofocus")jo(e,!!S);else if(p==="__value"||p==="value"&&S!=null)e.value=e[p]=e.__value=S;else if(p==="selected"&&c)zo(e,S);else{var h=p;r||(h=Ao(h));var y=h==="defaultValue"||h==="defaultChecked";if(S==null&&!a&&!y)if(f[p]=null,h==="value"||h==="checked"){let A=e;if(h==="value"){let b=A.defaultValue;A.removeAttribute(h),A.defaultValue=b}else{let b=A.defaultChecked;A.removeAttribute(h),A.defaultChecked=b}}else e.removeAttribute(p);else y||d.includes(h)&&(a||typeof S!="string")?e[h]=S:typeof S!="function"&&ce(e,h,S)}p==="style"&&"__styles"in e&&(e.__styles={})}}}return l}var Ri=new Map;function Rr(e){var t=Ri.get(e.nodeName);if(t)return t;Ri.set(e.nodeName,t=[]);for(var n,i=e,r=Element.prototype;r!==i;){n=Ji(i);for(var a in n)n[a].set&&t.push(a);i=ni(i)}return t}function Ko(e,t,n){var i=e.__className,r=Yo(t);(i!==r||sr)&&(t==null?e.removeAttribute("class"):e.className=r,e.__className=r)}function Yo(e,t){return(e??"")+""}function ue(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 jn(e,t,n,i){var r=e.__styles??(e.__styles={});r[t]!==n&&(r[t]=n,n==null?e.style.removeProperty(t):e.style.setProperty(t,n,""))}const Zo=()=>performance.now(),Je={tick:e=>requestAnimationFrame(e),now:()=>Zo(),tasks:new Set};function qr(){const e=Je.now();Je.tasks.forEach(t=>{t.c(e)||(Je.tasks.delete(t),t.f())}),Je.tasks.size!==0&&Je.tick(qr)}function Go(e){let t;return Je.tasks.size===0&&Je.tick(qr),{promise:new Promise(n=>{Je.tasks.add(t={c:e,f:n})}),abort(){Je.tasks.delete(t)}}}function dn(e,t){e.dispatchEvent(new CustomEvent(t))}function Xo(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 qi(e){const t={},n=e.split(";");for(const i of n){const[r,a]=i.split(":");if(!r||a===void 0)break;const o=Xo(r.trim());t[o]=a.trim()}return t}const Jo=e=>e;function Ce(e,t,n,i){var r=(e&Ya)!==0,a=(e&Za)!==0,o=r&&a,l=(e&Ga)!==0,c=o?"both":r?"in":"out",u,d=t.inert,f,v;function m(){var p=ne,S=Y;Re(null),Ie(null);try{return u??(u=n()(t,(i==null?void 0:i())??{},{direction:c}))}finally{Re(p),Ie(S)}}var g={is_global:l,in(){var p;if(t.inert=d,!r){v==null||v.abort(),(p=v==null?void 0:v.reset)==null||p.call(v);return}a||f==null||f.abort(),dn(t,"introstart"),f=Xn(t,m(),v,1,()=>{dn(t,"introend"),f==null||f.abort(),f=u=void 0})},out(p){if(!a){p==null||p(),u=void 0;return}t.inert=!0,dn(t,"outrostart"),v=Xn(t,m(),f,0,()=>{dn(t,"outroend"),p==null||p()})},stop:()=>{f==null||f.abort(),v==null||v.abort()}},h=Y;if((h.transitions??(h.transitions=[])).push(g),r&&pn){var y=l;if(!y){for(var w=h.parent;w&&w.f&bt;)for(;(w=w.parent)&&!(w.f&xn););y=!w||(w.f&$i)!==0}y&&st(()=>{Ve(()=>g.in())})}}function Xn(e,t,n,i,r){var a=i===1;if(St(t)){var o,l=!1;return Lt(()=>{if(!l){var y=t({direction:a?"in":"out"});o=Xn(e,y,n,i,r)}}),{abort:()=>{l=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return r(),{abort:ft,deactivate:ft,reset:ft,t:()=>i};const{delay:c=0,css:u,tick:d,easing:f=Jo}=t;var v=[];if(a&&n===void 0&&(d&&d(0,1),u)){var m=qi(u(0,1));v.push(m,m)}var g=()=>1-i,h=e.animate(v,{duration:c});return h.onfinish=()=>{var y=(n==null?void 0:n.t())??1-i;n==null||n.abort();var w=i-y,p=t.duration*Math.abs(w),S=[];if(p>0){if(u)for(var A=Math.ceil(p/16.666666666666668),b=0;b<=A;b+=1){var T=y+w*f(b/A),U=u(T,1-T);S.push(qi(U))}g=()=>{var M=h.currentTime;return y+w*f(M/p)},d&&Go(()=>{if(h.playState!=="running")return!1;var M=g();return d(M,1-M),!0})}h=e.animate(S,{duration:p,fill:"forwards"}),h.onfinish=()=>{g=()=>i,d==null||d(i,1-i),r()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=ft)},deactivate:()=>{r=ft},reset:()=>{i===0&&(d==null||d(1,0))},t:()=>g()}}function Qo(e,t,n=t){var i=en();Lr(e,"input",r=>{var a=r?e.defaultValue:e.value;if(a=Hn(e)?Fn(a):a,n(a),i&&a!==(a=t())){var o=e.selectionStart,l=e.selectionEnd;e.value=a??"",l!==null&&(e.selectionStart=o,e.selectionEnd=Math.min(l,e.value.length))}}),Ve(t)==null&&e.value&&n(Hn(e)?Fn(e.value):e.value),In(()=>{var r=t();Hn(e)&&r===Fn(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function Hn(e){var t=e.type;return t==="number"||t==="range"}function Fn(e){return e===""?null:+e}function Hr(e,t,n){if(e.multiple)return tl(e,t);for(var i of e.options){var r=qt(i);if($a(r,t)){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function $o(e,t){st(()=>{var n=new MutationObserver(()=>{var i=e.__value;Hr(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function el(e,t,n=t){var i=!0;Lr(e,"change",r=>{var a=r?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),qt);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&qt(l)}n(o)}),st(()=>{var r=t();if(Hr(e,r,i),i&&r===void 0){var a=e.querySelector(":checked");a!==null&&(r=qt(a),n(r))}e.__value=r,i=!1}),$o(e)}function tl(e,t){for(var n of e.options)n.selected=~t.indexOf(qt(n))}function qt(e){return"__value"in e?e.__value:e.value}var it,It,Gt,kn,Fr;const bn=class bn{constructor(t){dt(this,kn);dt(this,it,new WeakMap);dt(this,It);dt(this,Gt);Ot(this,Gt,t)}observe(t,n){var i=Fe(this,it).get(t)||new Set;return i.add(n),Fe(this,it).set(t,i),Ai(this,kn,Fr).call(this).observe(t,Fe(this,Gt)),()=>{var r=Fe(this,it).get(t);r.delete(n),r.size===0&&(Fe(this,it).delete(t),Fe(this,It).unobserve(t))}}};it=new WeakMap,It=new WeakMap,Gt=new WeakMap,kn=new WeakSet,Fr=function(){return Fe(this,It)??Ot(this,It,new ResizeObserver(t=>{for(var n of t){bn.entries.set(n.target,n);for(var i of Fe(this,it).get(n.target)||[])i(n)}}))},Ii(bn,"entries",new WeakMap);let Jn=bn;var nl=new Jn({box:"border-box"});function il(e,t,n){var i=nl.observe(e,()=>n(e[t]));st(()=>(Ve(()=>n(e[t])),i))}function Hi(e,t){return e===t||(e==null?void 0:e[Ke])===t}function on(e={},t,n,i){return st(()=>{var r,a;return In(()=>{r=a,a=[],Ve(()=>{e!==n(...a)&&(t(e,...a),r&&Hi(n(...r),e)&&t(null,...r))})}),()=>{Lt(()=>{a&&Hi(n(...a),e)&&t(null,...a)})}}),e}let fn=!1;function rl(e){var t=fn;try{return fn=!1,[e(),fn]}finally{fn=t}}const al={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 ol(e,t,n){return new Proxy({props:e,exclude:t},al)}const ll={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(St(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];St(r)&&(r=r());const a=at(r,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(St(i)&&(i=i()),typeof i=="object"&&i!==null&&t in i){const r=at(i,t);return r&&!r.configurable&&(r.configurable=!0),r}}},has(e,t){if(t===Ke||t===nr)return!1;for(let n of e.props)if(St(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props){St(n)&&(n=n());for(const i in n)t.includes(i)||t.push(i)}return t}};function sl(...e){return new Proxy({props:e},ll)}function Fi(e){for(var t=Y,n=Y;t!==null&&!(t.f&(ze|$t));)t=t.parent;try{return Ie(t),e()}finally{Ie(n)}}function O(e,t,n,i){var U;var r=(n&Va)!==0,a=!Ct||(n&Ua)!==0,o=(n&Wa)!==0,l=(n&Ka)!==0,c=!1,u;o?[u,c]=rl(()=>e[t]):u=e[t];var d=Ke in e||nr in e,f=o&&(((U=at(e,t))==null?void 0:U.set)??(d&&t in e&&(M=>e[t]=M)))||void 0,v=i,m=!0,g=!1,h=()=>(g=!0,m&&(m=!1,l?v=Ve(i):v=i),v);u===void 0&&i!==void 0&&(f&&a&&La(),u=h(),f&&f(u));var y;if(a)y=()=>{var M=e[t];return M===void 0?h():(m=!0,g=!1,M)};else{var w=Fi(()=>(r?z:no)(()=>e[t]));w.f|=Ta,y=()=>{var M=s(w);return M!==void 0&&(v=void 0),M===void 0?v:M}}if(!(n&za))return y;if(f){var p=e.$$legacy;return function(M,P){return arguments.length>0?((!a||!P||p||c)&&f(P?y():M),M):y()}}var S=!1,A=!1,b=or(u),T=Fi(()=>z(()=>{var M=y(),P=s(b);return S?(S=!1,A=!0,P):(A=!1,b.v=M)}));return r||(T.equals=ri),function(M,P){if(arguments.length>0){const D=P?s(T):a&&o?J(M):M;return T.equals(D)||(S=!0,C(b,D),g&&v!==void 0&&(v=D),Ve(()=>s(T))),M}return s(T)}}function Bi(e,t){var n=Y,i=ne,r=ie;Ie(e),Re(e),Li(e.ctx);try{t()}finally{Ie(n),Re(i),Li(r)}}function cl(e,t,n){var i=e,r;$e(()=>{var a=Y,o=!1;a.fn=l=>{var c=t.onerror;let u=t.failed;if(!c&&!u||o)throw l;var d=()=>{mt(r),Bi(a,()=>{o=!1,r=Oe(()=>n(i)),qn()})};c==null||c(l,d),r&&De(r),Lt(()=>{Bi(a,()=>{o=!0;try{r=Oe(()=>{u(i,()=>l,()=>d)})}catch(f){nn(f,a,null,a.ctx)}qn(),o=!1})})},r=Oe(()=>n(i)),qn()},bt|hn)}function Ge(e){ie===null&&kr(),Ct&&ie.l!==null?ul(ie).m.push(e):Tn(()=>{const t=Ve(e);if(typeof t=="function")return t})}function ul(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const dl="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(dl);const Br="https://www.playpilot.com",Mn="https://partner-api.playpilot.tech/1.0.0",Vr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",fe=Object.freeze({ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",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",TotalInjectionsCount:"ali_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action"});function fi(){const e=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+e}const fl="https://insights.playpilot.net";async function he(e,t=null,n={}){var r,a,o;const i=new Headers({"Content-Type":"application/json"});t&&(n={original_title:t.original_title,title_sid:t.sid,title_type:t.type,providers:[...new Set(((r=t.providers)==null?void 0:r.map(l=>l.name))||[])],...n}),n.url=fi(),n.organization_sid=(a=window.PlayPilotLinkInjections)==null?void 0:a.organization_sid,n.domain_sid=(o=window.PlayPilotLinkInjections)==null?void 0:o.domain_sid,fetch(fl,{headers:i,method:"POST",body:JSON.stringify({event:e,payload:n,source:"ali"})}),vl({event:e,payload:n})}function vl(e){var t;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(t=window.PlayPilotLinkInjections.tracked_events)==null||t.push(e)}function _l({organizationSid:e=null,domainSid:t=null}){window.PlayPilotLinkInjections.organization_sid=e||null,window.PlayPilotLinkInjections.domain_sid=t||null}const vi="EncryptedToken",Ur="articleReplacementEditToken",zr="playpilot-editorial-mode";async function Wr(e=window.location.href){const t=new Headers({"Content-Type":"application/json"});try{const n=On();if(!n)throw new Error("No token was provided");const i=_i(e);if(!i)throw new Error("Could not be authenticated");const r=await fetch(Mn+`/external-pages/edit-authorization?api-token=${n}`,{headers:t,method:"POST",body:JSON.stringify({private_token:i})});if(!r.ok)throw r;return hl(i),!0}catch(n){console.error(n),he(fe.AuthFailed)}finally{pl()}return!1}function _i(e=""){var i,r;const t=(i=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:i.editorial_token;if(t)return t;if(e){const a=new URL(e).searchParams.get(Ur);if(a)return decodeURI(a)}return((r=("; "+document.cookie).split(`; ${vi}=`).pop())==null?void 0:r.split(";")[0])||""}function hl(e){const t=new Date;t.setTime(t.getTime()+30*24*60*60*1e3);const i="expires="+t.toUTCString();document.cookie=vi+"="+e+";"+i+";path=/"}function gl(){document.cookie=vi+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function Kr(){var t;const e=(t=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:t.editorial_token;return new URLSearchParams(window.location.search).get(zr)==="true"||!!e}function ml(){const e=new URL(window.location.href);e.searchParams.set(zr,"true"),window.history.replaceState({},"",e)}function pl(){const e=new URL(window.location.href);e.searchParams.delete(Ur),window.history.replaceState({},"",e)}function yl(e){let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=t*31+i>>>0}return t.toString(16)}function Yr(){return(Math.random()+1).toString(36).substring(7)}const _=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"}),wl={"Where To Stream Online":{[_.English]:"Where to stream online",[_.Swedish]:"Var kan man streama online",[_.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"An Error Occurred":{[_.English]:"An error occurred",[_.Swedish]:"Ett fel inträffade",[_.Danish]:"Der opstod en fejl"},"Title Unavailable":{[_.English]:"This title is not currently available to stream.",[_.Swedish]:"Den här titeln går inte att streama just nu.",[_.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[_.English]:"is not currently available to stream.",[_.Swedish]:"går inte att streama just nu.",[_.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[_.English]:"is available to stream on",[_.Swedish]:"finns att streama på",[_.Danish]:"kan streames på"},"Is Available To Stream":{[_.English]:"is available to stream.",[_.Swedish]:"finns att streama.",[_.Danish]:"kan streames."},"View Streaming Options":{[_.English]:"View streaming options",[_.Swedish]:"Se streamingalternativ",[_.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[_.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[_.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[_.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[_.English]:"and",[_.Swedish]:"och",[_.Danish]:"og"},Minutes:{[_.English]:"minutes",[_.Swedish]:"minuter",[_.Danish]:"minutter"},"Type: movie":{[_.English]:"Movie",[_.Swedish]:"Film",[_.Danish]:"Film"},"Type: series":{[_.English]:"Series",[_.Swedish]:"Serie",[_.Danish]:"Serie"},Stream:{[_.English]:"Stream",[_.Swedish]:"Streama",[_.Danish]:"Stream"},Buy:{[_.English]:"Buy",[_.Swedish]:"Köp",[_.Danish]:"Køb"},Rent:{[_.English]:"Rent",[_.Swedish]:"Hyra",[_.Danish]:"Lej"},"Rent Or Buy":{[_.English]:"Rent or Buy",[_.Swedish]:"Hyra",[_.Danish]:"Lej eller køb"},Watch:{[_.English]:"Watch",[_.Swedish]:"Se",[_.Danish]:"Se"},All:{[_.English]:"All",[_.Swedish]:"Alla",[_.Danish]:"Alle"},Unscripted:{[_.English]:"Unscripted",[_.Swedish]:"Oscripterat",[_.Danish]:"Umanuskriptet"},Independent:{[_.English]:"Independent",[_.Swedish]:"Indie",[_.Danish]:"Indie"},"Game Show":{[_.English]:"Game Show",[_.Swedish]:"Gameshow",[_.Danish]:"Quizshow"},"Film Noir":{[_.English]:"Film Noir",[_.Swedish]:"Film noir",[_.Danish]:"Film noir"},Entertainment:{[_.English]:"Entertainment",[_.Swedish]:"Underhållning",[_.Danish]:"Underholdning"},News:{[_.English]:"News",[_.Swedish]:"Nyheter",[_.Danish]:"Nyheder"},Short:{[_.English]:"Short",[_.Swedish]:"Kortfilm",[_.Danish]:"Kortfilm"},Bollywood:{[_.English]:"Bollywood",[_.Swedish]:"Bollywood",[_.Danish]:"Bollywood"},Concert:{[_.English]:"Concert",[_.Swedish]:"Konsert",[_.Danish]:"Koncert"},Arthouse:{[_.English]:"Arthouse",[_.Swedish]:"Arthouse",[_.Danish]:"Arthouse"},"Alternate Version":{[_.English]:"Alternate Version",[_.Swedish]:"Alternativ version",[_.Danish]:"Alternativ version"},"Reality TV":{[_.English]:"Reality TV",[_.Swedish]:"Reality-TV",[_.Danish]:"Reality-TV"},Culture:{[_.English]:"Culture",[_.Swedish]:"Kultur",[_.Danish]:"Kultur"},Drama:{[_.English]:"Drama",[_.Swedish]:"Drama",[_.Danish]:"Drama"},Crime:{[_.English]:"Crime",[_.Swedish]:"Kriminal",[_.Danish]:"Krimi"},Western:{[_.English]:"Western",[_.Swedish]:"Western",[_.Danish]:"Western"},Thriller:{[_.English]:"Thriller",[_.Swedish]:"Thriller",[_.Danish]:"Thriller"},Animation:{[_.English]:"Animation",[_.Swedish]:"Animerat",[_.Danish]:"Animation"},Mystery:{[_.English]:"Mystery",[_.Swedish]:"Mysterium",[_.Danish]:"Mysterium"},Science:{[_.English]:"Science",[_.Swedish]:"Vetenskap",[_.Danish]:"Videnskab"},Nature:{[_.English]:"Nature",[_.Swedish]:"Natur",[_.Danish]:"Natur"},War:{[_.English]:"War",[_.Swedish]:"Krig",[_.Danish]:"Krig"},"Sci-Fi":{[_.English]:"Sci-Fi",[_.Swedish]:"Sci-fi",[_.Danish]:"Sci-fi"},Documentary:{[_.English]:"Documentary",[_.Swedish]:"Dokumentär",[_.Danish]:"Dokumentar"},"Stand-up":{[_.English]:"Stand-up",[_.Swedish]:"Standup",[_.Danish]:"Stand-up"},"Talk Show":{[_.English]:"Talk Show",[_.Swedish]:"Talkshow",[_.Danish]:"Talkshow"},Fantasy:{[_.English]:"Fantasy",[_.Swedish]:"Fantasy",[_.Danish]:"Fantasy"},History:{[_.English]:"History",[_.Swedish]:"Historia",[_.Danish]:"Historie"},Adventure:{[_.English]:"Adventure",[_.Swedish]:"Äventyr",[_.Danish]:"Eventyr"},Action:{[_.English]:"Action",[_.Swedish]:"Action",[_.Danish]:"Action"},Horror:{[_.English]:"Horror",[_.Swedish]:"Skräck",[_.Danish]:"Gyser"},Comedy:{[_.English]:"Comedy",[_.Swedish]:"Komedi",[_.Danish]:"Komedie"},Biography:{[_.English]:"Biography",[_.Swedish]:"Biografi",[_.Danish]:"Biografi"},Music:{[_.English]:"Music",[_.Swedish]:"Musik",[_.Danish]:"Musik"},Sport:{[_.English]:"Sport",[_.Swedish]:"Sport",[_.Danish]:"Sport"},Romance:{[_.English]:"Romance",[_.Swedish]:"Romantik",[_.Danish]:"Romantik"},Kids:{[_.English]:"Kids",[_.Swedish]:"Barn",[_.Danish]:"Børn"},Lifestyle:{[_.English]:"Lifestyle",[_.Swedish]:"Livsstil",[_.Danish]:"Livsstil"},Musical:{[_.English]:"Musical",[_.Swedish]:"Musikal",[_.Danish]:"Musical"},Anime:{[_.English]:"Anime",[_.Swedish]:"Anime",[_.Danish]:"Anime"},Family:{[_.English]:"Family",[_.Swedish]:"Familj",[_.Danish]:"Familie"}};function ye(e,t=Zr()){var n;return((n=wl[e])==null?void 0:n[t])||e}function Zr(){var i,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.language,t=Object.values(_);if(e){if(t.includes(e))return e;console.warn(`PlayPilot Link Injections: ${e} is not an accepted language`)}const n=(r=document.querySelector("html"))==null?void 0:r.getAttribute("lang");if(n){if(t.includes(n))return n;const a=t.find(o=>o.toLowerCase().startsWith(n+"-"));if(a)return a}return _.English}function kl(e){var i,r,a;const t=(r=(i=window.PlayPilotLinkInjections)==null?void 0:i.split_test_identifiers)==null?void 0:r[e];if(t)return t;(a=window.PlayPilotLinkInjections)!=null&&a.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});const n=Math.random();return window.PlayPilotLinkInjections.split_test_identifiers[e]=n,n}function Gr(e){return kl(e)>.5}function bl(e){const t=Gr(e)?1:0;he(fe.SplitTestView,null,{key:e,variant:t})}function xl(e,t){const n=Gr(e)?1:0;he(fe.SplitTestAction,null,{key:e,variant:n,action:t})}const Sl=e=>e;function hi(e){const t=e-1;return t*t*t+1}function Vi(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function Kt(e,{delay:t=0,duration:n=400,easing:i=Sl}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*r}`}}function Ln(e,{delay:t=0,duration:n=400,easing:i=hi,x:r=0,y:a=0,opacity:o=0}={}){const l=getComputedStyle(e),c=+l.opacity,u=l.transform==="none"?"":l.transform,d=c*(1-o),[f,v]=Vi(r),[m,g]=Vi(a);return{delay:t,duration:n,easing:i,css:(h,y)=>`
|
|
4
4
|
transform: ${u} translate(${(1-h)*f}${v}, ${(1-h)*m}${g});
|
|
5
5
|
opacity: ${c-d*y}`}}function Yt(e,{delay:t=0,duration:n=400,easing:i=hi,axis:r="y"}={}){const a=getComputedStyle(e),o=+a.opacity,l=r==="y"?"height":"width",c=parseFloat(a[l]),u=r==="y"?["top","bottom"]:["left","right"],d=u.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),f=parseFloat(a[`padding${d[0]}`]),v=parseFloat(a[`padding${d[1]}`]),m=parseFloat(a[`margin${d[0]}`]),g=parseFloat(a[`margin${d[1]}`]),h=parseFloat(a[`border${d[0]}Width`]),y=parseFloat(a[`border${d[1]}Width`]);return{delay:t,duration:n,easing:i,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};${l}: ${w*c}px;padding-${u[0]}: ${w*f}px;padding-${u[1]}: ${w*v}px;margin-${u[0]}: ${w*m}px;margin-${u[1]}: ${w*g}px;border-${u[0]}-width: ${w*h}px;border-${u[1]}-width: ${w*y}px;min-${l}: 0`}}function El(e,{delay:t=0,duration:n=400,easing:i=hi,start:r=0,opacity:a=0}={}){const o=getComputedStyle(e),l=+o.opacity,c=o.transform==="none"?"":o.transform,u=1-r,d=l*(1-a);return{delay:t,duration:n,easing:i,css:(f,v)=>`
|
|
6
6
|
transform: ${c} scale(${1-u*v});
|
|
7
7
|
opacity: ${l-d*v}
|
|
8
|
-
`}}Ha();var Tl=He('<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 Xr(e){var t=Tl();k(e,t)}function gi(e,t){le(t,!0);const n=O(t,"size",3,"margin(2)"),i=O(t,"onclick",3,()=>null),r=ol(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=qe(),o=ee(a);Bo(o,()=>t.href?"a":"button",!1,(l,c)=>{let u;L(()=>{u=Wo(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===ar,l.nodeName.includes("-")),jn(l,"--size",n())});var d=qe(),f=ee(d);Nt(f,()=>t.children??ft),k(c,d)}),k(e,a),se()}function Il(e){C(e,e.v+1)}function Al(e){let t=0,n=Te(0),i;return()=>{oo()&&(s(n),In(()=>(t===0&&(i=Ve(()=>e(()=>Il(n)))),t+=1,()=>{Kn().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}var Xt,Jt;class Pl{constructor(t,n){dt(this,Xt);dt(this,Jt);Ot(this,Xt,t),Ot(this,Jt,Al(n))}get current(){return Fe(this,Jt).call(this),Fe(this,Xt).call(this)}}Xt=new WeakMap,Jt=new WeakMap;const Cl=/\(.+\)/;class jl extends Pl{constructor(t,n){let i=Cl.test(t)?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,a=>Lo(r,"change",a))}}const mi=new jl("(prefers-reduced-motion: reduce)");var Ml=(e,t)=>t()(),Ll=I('<div class="modal svelte-aqwna4"><div class="dialog svelte-aqwna4" role="dialog" aria-labelledby="title" data-view-transition-new=""><div class="close svelte-aqwna4"><!></div> <!></div> <div class="backdrop svelte-aqwna4"></div></div>');function Jr(e,t){le(t,!0);const n=O(t,"onclose",3,()=>null),i=O(t,"onscroll",3,()=>null);Cr("scope","modal"),Ge(()=>{const f=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=f||""});function r(f){return mi.current?Kt(f,{duration:0}):window.innerWidth<600?Ln(f,{duration:250,y:window.innerHeight}):El(f,{duration:150,start:.85})}var a=Ll();de("keydown",be,({key:f})=>{f==="Escape"&&n()()});var o=x(a),l=x(o),c=x(l);gi(c,{onclick:()=>n()(),children:(f,v)=>{Xr(f)},$$slots:{default:!0}});var u=E(l,2);Nt(u,()=>t.children);var d=E(o,2);d.__click=[Ml,n],de("scroll",o,function(...f){var v;(v=i())==null||v.apply(this,f)}),Ce(7,o,()=>r),Ce(7,a,()=>Kt,()=>({duration:150})),k(e,a),se()}ve(["click"]);const Nl=[{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"}];var Ol=I('<div class="genre svelte-1ebula3"> </div>'),Dl=(e,t)=>C(t,!0),Rl=I('<button class="genre expand svelte-1ebula3"> </button>'),ql=I("<!> <!>",1);function Hl(e,t){le(t,!0);let n=V(!1);const i=z(()=>s(n)?t.genres:[t.genres[0]]);var r=ql(),a=ee(r);Qe(a,17,()=>s(i),yt,(c,u)=>{var d=qe();const f=z(()=>{var g;return(g=Nl.find(h=>h.slug===s(u)))==null?void 0:g.name});var v=ee(d);{var m=g=>{var h=Ol(),y=x(h);L(()=>K(y,ye(s(f)))),k(g,h)};H(v,g=>{s(f)&&g(m)})}k(c,d)});var o=E(a,2);{var l=c=>{var u=Rl();u.__click=[Dl,n];var d=x(u);L(()=>K(d,`+${t.genres.length-1}`)),k(c,u)};H(o,c=>{!s(n)&&t.genres.length>1&&c(l)})}k(e,r),se()}ve(["click"]);function Fl(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Se(e,t=1){e.role="heading",e.ariaLevel=t.toString()}function Zt(e){return e?e.replace("/src/img",""):null}var Bl=I('<div class="disclaimer svelte-1gro5q8" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1gro5q8">PlayPilot.com</a></div>'),Vl=(e,t,n)=>t(n()),Ul=I('<span class="cta svelte-1gro5q8"> </span>'),zl=I('<a target="_blank" class="playlink svelte-1gro5q8" rel="sponsored"><div class="playlink-content svelte-1gro5q8"><img alt="" height="36" width="36" class="svelte-1gro5q8"> <span class="name svelte-1gro5q8"> </span> <span class="category svelte-1gro5q8"> </span> <!> <div class="action svelte-1gro5q8"> </div></div></a>'),Wl=I('<div class="playlink empty svelte-1gro5q8" data-testid="playlinks-empty"> </div>'),Kl=I('<div class="heading svelte-1gro5q8"> </div> <!> <div class="playlinks svelte-1gro5q8"><!> <!></div>',1);function Yl(e,t){le(t,!0);const n=ko("scope")==="modal";let i=V(0);const r=z(()=>s(i)<500),a=z(()=>t.playlinks.filter(p=>!!p.logo_url)),o=z(()=>Fl(s(a))),l={SVOD:ye("Stream"),BUY:ye("Buy"),RENT:ye("Rent"),TVOD:ye("Rent Or Buy")};function c(p){he(n?fe.TitleModalPlaylinkClick:fe.TitlePopoverPlaylinkClick,t.title,{playlink:p})}var u=Kl(),d=ee(u),f=x(d);L(()=>K(f,ye("Where To Stream Online"))),an(d,(p,S)=>Se==null?void 0:Se(p,S),()=>3);var v=E(d,2);{var m=p=>{var S=Bl(),A=x(S);L(()=>K(A,`${ye("Commission Disclaimer")??""} `)),k(p,S)};H(v,p=>{t.playlinks.length&&p(m)})}var g=E(v,2),h=x(g);Qe(h,17,()=>s(o),yt,(p,S)=>{let A=()=>s(S).name,b=()=>s(S).url,T=()=>s(S).logo_url,U=()=>s(S).highlighted,M=()=>s(S).cta_text,P=()=>s(S).extra_info.category;var D=zl();D.__click=[Vl,c,A];var Z=x(D),G=x(Z);L(()=>ce(G,"src",Zt(T())));var B=E(G,2),j=x(B),N=E(B,2),R=x(N);L(()=>K(R,l[P()]||ye("Stream")));var q=E(N,2);{var ae=te=>{var we=Ul(),X=x(we);L(()=>K(X,M())),k(te,we)};H(q,te=>{M()&&te(ae)})}var Q=E(q,2),re=x(Q);L(()=>K(re,ye("Watch"))),L(()=>{ce(D,"href",b()),ce(D,"data-playlink",A()),ue(D,"highlighted",U()&&M()),K(j,A())}),k(p,D)});var y=E(h,2);{var w=p=>{var S=Wl(),A=x(S);L(()=>K(A,ye("Title Unavailable"))),k(p,S)};H(y,p=>{t.playlinks.length||p(w)})}L(()=>ue(g,"list",s(r))),il(g,"clientWidth",p=>C(i,p)),k(e,u),se()}ve(["click"]);var Zl=(e,t)=>C(t,!0),Gl=I('<button class="show-more svelte-1u3je71">Show more</button>'),Xl=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Jl=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Ql(e,t){le(t,!0);const n=O(t,"blurb",3,""),i=O(t,"limit",3,200);let r=V(!1);const a=z(()=>t.text.slice(0,i()));var o=Jl(),l=x(o),c=x(l),u=E(c);{var d=h=>{var y=Ue("...");k(h,y)};H(u,h=>{!s(r)&&t.text.length>i()&&h(d)})}var f=E(u,2);{var v=h=>{var y=Gl();y.__click=[Zl,r],k(h,y)};H(f,h=>{!s(r)&&(t.text.length>i()||n())&&h(v)})}var m=E(l,2);{var g=h=>{var y=Xl(),w=x(y);L(()=>K(w,n())),k(h,y)};H(m,h=>{s(r)&&h(g)})}L(()=>K(c,s(r)?t.text:s(a))),k(e,o),se()}ve(["click"]);var $l=He('<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 Qr(e){var t=$l();k(e,t)}var es=I('<div class="top svelte-1026zg0"><img class="poster svelte-1026zg0"></div>'),ts=I("<div> </div>"),ns=I('<img alt="" class="svelte-1026zg0">'),is=I('<div class="content svelte-1026zg0" data-playpilot-link-injections-title=""><div class="header svelte-1026zg0"><!> <div class="heading svelte-1026zg0" id="title"> </div> <div class="info svelte-1026zg0"><div class="imdb svelte-1026zg0"><!> </div> <!> <div> </div> <div class="capitalize svelte-1026zg0"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-1026zg0"><!></div>',1);function $r(e,t){le(t,!0);const n=O(t,"small",3,!1),i=O(t,"compact",3,!1);let r=V(!1),a=V(!1),o=V(!1);var l=is(),c=ee(l),u=x(c),d=x(u);{var f=N=>{var R=es(),q=x(R);L(()=>ce(q,"src",Zt(t.title.standing_poster))),L(()=>{ce(q,"alt",`Movie poster for '${t.title.title??""}'`),ue(q,"loaded",s(r))}),de("load",q,()=>C(r,!0)),k(N,R)};H(d,N=>{i()||N(f)})}var v=E(d,2),m=x(v);an(v,(N,R)=>Se==null?void 0:Se(N,R),()=>2);var g=E(v,2),h=x(g),y=x(h);Qr(y);var w=E(y),p=E(h,2);Hl(p,{get genres(){return t.title.genres}});var S=E(p,2),A=x(S),b=E(S,2),T=x(b);L(()=>K(T,ye(`Type: ${t.title.type}`)));var U=E(b,2);{var M=N=>{var R=ts(),q=x(R);L(()=>K(q,`${t.title.length??""} ${ye("Minutes")??""}`)),k(N,R)};H(U,N=>{!n()&&t.title.length&&N(M)})}var P=E(u,2),D=x(P);Yl(D,{get playlinks(){return t.title.providers},get title(){return t.title}});var Z=E(D,2);{var G=N=>{Ql(N,{get text(){return t.title.description},get blurb(){return t.title.blurb}})};H(Z,N=>{n()||N(G)})}var B=E(c,2),j=x(B);Or(j,()=>s(o),N=>{var R=ns();L(()=>ce(R,"src",Zt(s(o)?t.title.standing_poster:t.title.medium_poster))),L(()=>{ue(R,"loaded",s(a)),ue(R,"blur",s(o))}),de("load",R,()=>C(a,!0)),de("error",R,()=>C(o,!0)),k(N,R)}),L(()=>{ue(c,"small",n()),ue(c,"compact",i()),ue(v,"truncate",n()),K(m,t.title.title),K(w,` ${t.title.imdb_score??""}`),K(A,t.title.year),ue(B,"faded",i())}),k(e,l),se()}function rs(e,t){le(t,!0),he(fe.TitleModalView,t.title);let n=!1;Ge(()=>{const r=Date.now();return xl("initial_test","modal"),()=>he(fe.TitleModalClose,t.title,{time_spent:Date.now()-r})});function i(){n||(he(fe.TitleModalScroll,t.title),n=!0)}Jr(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{$r(r,{get title(){return t.title}})},$$slots:{default:!0}}),se()}var as=I('<div class="popover svelte-1us1507" tabindex="-1" aria-hidden="true"><div class="dialog svelte-1us1507" data-view-transition-old=""><!></div></div>');function os(e,t){le(t,!0);let n=O(t,"maxHeight",15);Cr("scope","popover");let i=V(null),r=V(!1);Ge(async()=>{await Kn(),a(),await Kn(),o()});function a(){if(!s(i))return;const{top:f,right:v,bottom:m,height:g}=s(i).getBoundingClientRect(),h=l();C(r,J(f-h<0&&window.innerHeight-m>f+g));const y=window.innerWidth-v-h;v+h>window.innerWidth&&(s(i).style.left=`${y}px`)}function o(){if(!s(i))return;const{top:f,height:v}=s(i).getBoundingClientRect(),m=l(),g=s(r)?window.innerHeight-f-m:f+v-m;n(Math.min(g,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=as(),u=x(c),d=x(u);Nt(d,()=>t.children),on(c,f=>C(i,f),()=>s(i)),L(()=>{ue(c,"flip",s(r)),jn(c,"--max-height",n()?n()+"px":null)}),Ce(7,u,()=>Ln,()=>({duration:mi.current?0:100,y:10})),k(e,c),se()}var ls=I('<div class="title-popover svelte-d86q0q" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function ss(e,t){le(t,!0);let n=V(0),i=V(null);he(fe.TitlePopoverView,t.title),Ge(()=>{r();const l=Date.now();return()=>he(fe.TitlePopoverClose,t.title,{time_spent:Date.now()-l})});function r(){const l=t.event.target;if(!(l!=null&&l.getClientRects))return;const c=Array.from(l.getClientRects()),d=c.map(v=>v.x).map(v=>Math.abs(v-t.event.clientX)),f=c[d.indexOf(Math.min(...d))];s(i).style.top=f.top+window.scrollY+"px",s(i).style.left=f.left+window.scrollX+"px",s(i).style.height=f.height+"px"}var a=ls(),o=x(a);os(o,{get maxHeight(){return s(n)},set maxHeight(l){C(n,J(l))},children:(l,c)=>{var u=z(()=>!!s(n)&&s(n)<250);$r(l,{get title(){return t.title},small:!0,get compact(){return s(u)}})},$$slots:{default:!0}}),on(a,l=>C(i,l),()=>s(i)),k(e,a),se()}var cs=e=>e.stopPropagation(),us=(e,t,n,i)=>t(e,s(n).title_details,s(i)),ds=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),fs=(e,t,n,i)=>t(s(n).title_details,i()),vs=I('<!> <a target="_blank"> </a>',1),_s=I(" <!>.",1),hs=I("<!> <br>",1),gs=I(" <br>",1),ms=I('<span class="svelte-pfvkex"><!></span>'),ps=I('<p class="svelte-pfvkex"></p>');function ys(e,t){le(t,!0);const n=O(t,"onclickmodal",3,()=>null);function i(c,u){he(fe.AfterArticlePlaylinkClick,c,{playlink:u})}function r(c,u,d){he(fe.AfterArticleModalButtonClick,u),n()(c,d)}var a=qe(),o=ee(a);{var l=c=>{var u=ps();Qe(u,21,()=>t.linkInjections,yt,(d,f)=>{var v=ms();const m=z(()=>{const{key:p,title:S,title_details:A,after_article_style:b}=s(f);return{key:p,title:S,title_details:A,after_article_style:b}}),g=z(()=>{var p;return((p=s(m).title_details)==null?void 0:p.providers)||[]});var h=x(v);{var y=p=>{var S=hs(),A=ee(S);{var b=U=>{var M=ds(),P=ee(M);L(()=>K(P,`"${s(m).title??""}" ${ye("Is Available To Stream")??""} `));var D=E(P);D.__click=[cs];var Z=x(D);Z.__click=[us,r,m,f];var G=x(Z);L(()=>K(G,ye("View Streaming Options"))),k(U,M)},T=U=>{var M=_s(),P=ee(M);L(()=>K(P,`"${s(m).title??""}" ${ye("Is Available To Stream On")??""} `));var D=E(P);Qe(D,17,()=>s(g),yt,(Z,G,B)=>{let j=()=>s(G).name,N=()=>s(G).url;var R=vs(),q=ee(R);{var ae=te=>{var we=Ue();L(()=>K(we,B===s(g).length-1?`, ${ye("And")}`:",")),k(te,we)};H(q,te=>{B&&te(ae)})}var Q=E(q,2);Q.__click=[fs,i,m,j];var re=x(Q);L(()=>{ce(Q,"href",N()),K(re,j())}),k(Z,R)}),k(U,M)};H(A,U=>{s(m).after_article_style==="modal_button"?U(b):U(T,!1)})}k(p,S)},w=p=>{var S=gs(),A=ee(S);L(()=>K(A,`"${s(m).title??""}" ${ye("Title Unavailable Suffix")??""} `)),k(p,S)};H(h,p=>{s(g).length?p(y):p(w,!1)})}L(()=>ce(v,"data-playpilot-injection-key",s(m).key)),k(d,v)}),k(c,u)};H(o,c=>{t.linkInjections.length&&c(l)})}k(e,a),se()}ve(["click"]);function ws(e,t,n){return e.filter(i=>n.every(r=>i[r]===t[r])).length}function ks(e,t){return t.some(n=>e>=n.start&&e<n.end)}function bs(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function pi(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ui(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function zi(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function xs(e,t,n,i){const r=bs(t),a=pi(t),o=e.slice(0,i),l=e.slice(i),c=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(c,"\\$&")}|${r.replace(c,"\\$&")}`),d=l.replace(u,n);return o+d}function Ss(e,t,n,i){return e.substring(0,n)+t+e.substring(i)}function Ne(e){return pi(e).toLowerCase().replace(/\s+/g,"")}function ea(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let c=e.slice(o,l).trim();return o>0&&(c="…"+c),l<e.length&&(c+="…"),c}function Es(e,t,n){const i=e.nodeType===Node.TEXT_NODE&&e.parentNode?e.parentElement:e;if(!i||!e.textContent)return{before:"",after:""};const r=i.innerText.indexOf(e.textContent),a=Wi(i.innerText.slice(0,t+r)),o=i.innerText.slice(n+r),l=Wi(Ki(a,2)),c=Ki(o,2);return{before:l,after:c}}function Wi(e){return e.split("").reverse().join("")}function Ki(e,t=1){const n=e.match(/[^\s]+/g);return n?n.slice(0,t).join(" ").replace(/[.,!?;:]+$/u,""):""}function Ts(e,t){let n=0,i=0;for(;(i=e.indexOf(t,i))!==-1;)n++,i+=t.length;return n}function Is(e,t,n){const i=[];let r=0;for(;r<=e.length;){const a=t?e.indexOf(t,r):r;if(a===-1&&t)break;const o=t?a+t.length:a,l=n?e.indexOf(n,o):e.length;if(n&&l===-1)break;const c=e.slice(o,l);i.push({match:c,index:o}),r=n?l+n.length:e.length+1}return i}function As(e,t,n,i){const a=Is(e,n,i).filter(({match:l})=>pi(l).includes(t));return a.length?a.reduce((l,c)=>!l||c.match.length<l.match.length?c:l):null}function Ps(e){var t,n;return{leadingSpaces:((t=e.match(/^\s*/))==null?void 0:t[0].length)||0,trailingSpaces:((n=e.match(/\s*$/))==null?void 0:n[0].length)||0}}function Cs(e,t,n=0){const i=t.innerHTML,r=[],a=js(t);let o=i.indexOf(e);for(;o!==-1;)ks(o,a)&&r.push(o),o=i.indexOf(e,o+e.length);return r[n]??-1}function js(e){const t=[],n=e.innerHTML;let i=!1,r=!1,a=!1,o=0;for(let l=0;l<n.length;l++){const c=n[l];if(!r&&!i&&c==="<"){i=!0,a&&(t.push({start:o,end:l}),a=!1);continue}if(i&&c==='"'&&(r=!r),i&&!r&&c===">"){i=!1;continue}!i&&!r&&!a&&(o=l,a=!0)}return!t.length&&e.textContent.length&&t.push({start:o,end:e.innerHTML.length}),t}function ta(e){return e.ctrlKey||e.metaKey||e.button!==0}function Ms(e,t){if(!document.startViewTransition||!t){e();return}document.startViewTransition(()=>{const n=document.querySelector("[data-view-transition-old]");if(!n)return;const i=window.getComputedStyle(n).getPropertyValue("view-transition-name");n.style.viewTransitionName="none",e();const r=document.querySelector("[data-view-transition-new]");r&&(r.style.viewTransitionName=i)})}const _t="data-playpilot-injection-key",Ht=`[${_t}]`;let yn=null,ht=null,Ft=null,Bt=null;function yi(e,t=""){const n=[],i=[e];for(;i.length>0;){const r=i.pop();if(n.includes(r)||t&&r.matches(t)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|H1)$/.test(r.tagName)||r.offsetWidth<=1)continue;const a=Array.from(r.childNodes).some(c=>{var u;return c.nodeType===Node.TEXT_NODE&&((u=c.nodeValue)==null?void 0:u.trim())!==""});if(a&&r.tagName==="LI"){const c=r.closest("ul, ol");c&&!n.includes(c)&&n.push(c);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const l=Array.from(r.children);for(let c=l.length-1;c>=0;c--)i.push(l[c])}return n}function At(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function na(e){return e.map(t=>t.innerText).join(`
|
|
8
|
+
`}}Ha();var Tl=He('<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 Xr(e){var t=Tl();k(e,t)}function gi(e,t){le(t,!0);const n=O(t,"size",3,"margin(2)"),i=O(t,"onclick",3,()=>null),r=ol(t,["$$slots","$$events","$$legacy","children","size","onclick"]);var a=qe(),o=ee(a);Bo(o,()=>t.href?"a":"button",!1,(l,c)=>{let u;N(()=>{u=Wo(l,u,{role:t.href?"link":"button",onclick:i(),class:"button",...r},"svelte-1qqv88o",l.namespaceURI===ar,l.nodeName.includes("-")),jn(l,"--size",n())});var d=qe(),f=ee(d);Nt(f,()=>t.children??ft),k(c,d)}),k(e,a),se()}function Il(e){C(e,e.v+1)}function Al(e){let t=0,n=Te(0),i;return()=>{oo()&&(s(n),In(()=>(t===0&&(i=Ve(()=>e(()=>Il(n)))),t+=1,()=>{Kn().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}var Xt,Jt;class Pl{constructor(t,n){dt(this,Xt);dt(this,Jt);Ot(this,Xt,t),Ot(this,Jt,Al(n))}get current(){return Fe(this,Jt).call(this),Fe(this,Xt).call(this)}}Xt=new WeakMap,Jt=new WeakMap;const Cl=/\(.+\)/;class jl extends Pl{constructor(t,n){let i=Cl.test(t)?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,a=>Lo(r,"change",a))}}const mi=new jl("(prefers-reduced-motion: reduce)");var Ml=(e,t)=>t()(),Ll=I('<div class="modal svelte-aqwna4"><div class="dialog svelte-aqwna4" role="dialog" aria-labelledby="title" data-view-transition-new=""><div class="close svelte-aqwna4"><!></div> <!></div> <div class="backdrop svelte-aqwna4"></div></div>');function Jr(e,t){le(t,!0);const n=O(t,"onclose",3,()=>null),i=O(t,"onscroll",3,()=>null);Cr("scope","modal"),Ge(()=>{const f=document.body.style.overflowY;return document.body.style.overflowY="hidden",()=>document.body.style.overflowY=f||""});function r(f){return mi.current?Kt(f,{duration:0}):window.innerWidth<600?Ln(f,{duration:250,y:window.innerHeight}):El(f,{duration:150,start:.85})}var a=Ll();de("keydown",be,({key:f})=>{f==="Escape"&&n()()});var o=x(a),l=x(o),c=x(l);gi(c,{onclick:()=>n()(),children:(f,v)=>{Xr(f)},$$slots:{default:!0}});var u=E(l,2);Nt(u,()=>t.children);var d=E(o,2);d.__click=[Ml,n],de("scroll",o,function(...f){var v;(v=i())==null||v.apply(this,f)}),Ce(7,o,()=>r),Ce(7,a,()=>Kt,()=>({duration:150})),k(e,a),se()}ve(["click"]);const Nl=[{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"}];var Ol=I('<div class="genre svelte-1ebula3"> </div>'),Dl=(e,t)=>C(t,!0),Rl=I('<button class="genre expand svelte-1ebula3"> </button>'),ql=I("<!> <!>",1);function Hl(e,t){le(t,!0);let n=V(!1);const i=z(()=>s(n)?t.genres:[t.genres[0]]);var r=ql(),a=ee(r);Qe(a,17,()=>s(i),yt,(c,u)=>{var d=qe();const f=z(()=>{var g;return(g=Nl.find(h=>h.slug===s(u)))==null?void 0:g.name});var v=ee(d);{var m=g=>{var h=Ol(),y=x(h);N(()=>K(y,ye(s(f)))),k(g,h)};H(v,g=>{s(f)&&g(m)})}k(c,d)});var o=E(a,2);{var l=c=>{var u=Rl();u.__click=[Dl,n];var d=x(u);N(()=>K(d,`+${t.genres.length-1}`)),k(c,u)};H(o,c=>{!s(n)&&t.genres.length>1&&c(l)})}k(e,r),se()}ve(["click"]);function Fl(e){let t=[];for(const n of e){let i=n;const r=t.find(l=>l.name===i.name),a=r==null?void 0:r.extra_info.category,o=i.extra_info.category;(a==="RENT"&&o==="BUY"||a==="BUY"&&o==="RENT")&&(t=t.filter(l=>l.name!==i.name),i={...i,extra_info:{...i.extra_info,category:"TVOD"}}),t.push(i)}return t}function Se(e,t=1){e.role="heading",e.ariaLevel=t.toString()}function Zt(e){return e?e.replace("/src/img",""):null}var Bl=I('<div class="disclaimer svelte-1gro5q8" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1gro5q8">PlayPilot.com</a></div>'),Vl=(e,t,n)=>t(n()),Ul=I('<span class="cta svelte-1gro5q8"> </span>'),zl=I('<a target="_blank" class="playlink svelte-1gro5q8" rel="sponsored"><div class="playlink-content svelte-1gro5q8"><img alt="" height="36" width="36" class="svelte-1gro5q8"> <span class="name svelte-1gro5q8"> </span> <span class="category svelte-1gro5q8"> </span> <!> <div class="action svelte-1gro5q8"> </div></div></a>'),Wl=I('<div class="playlink empty svelte-1gro5q8" data-testid="playlinks-empty"> </div>'),Kl=I('<div class="heading svelte-1gro5q8"> </div> <!> <div class="playlinks svelte-1gro5q8"><!> <!></div>',1);function Yl(e,t){le(t,!0);const n=ko("scope")==="modal";let i=V(0);const r=z(()=>s(i)<500),a=z(()=>t.playlinks.filter(p=>!!p.logo_url)),o=z(()=>Fl(s(a))),l={SVOD:ye("Stream"),BUY:ye("Buy"),RENT:ye("Rent"),TVOD:ye("Rent Or Buy")};function c(p){he(n?fe.TitleModalPlaylinkClick:fe.TitlePopoverPlaylinkClick,t.title,{playlink:p})}var u=Kl(),d=ee(u),f=x(d);N(()=>K(f,ye("Where To Stream Online"))),an(d,(p,S)=>Se==null?void 0:Se(p,S),()=>3);var v=E(d,2);{var m=p=>{var S=Bl(),A=x(S);N(()=>K(A,`${ye("Commission Disclaimer")??""} `)),k(p,S)};H(v,p=>{t.playlinks.length&&p(m)})}var g=E(v,2),h=x(g);Qe(h,17,()=>s(o),yt,(p,S)=>{let A=()=>s(S).name,b=()=>s(S).url,T=()=>s(S).logo_url,U=()=>s(S).highlighted,M=()=>s(S).cta_text,P=()=>s(S).extra_info.category;var D=zl();D.__click=[Vl,c,A];var Z=x(D),G=x(Z);N(()=>ce(G,"src",Zt(T())));var B=E(G,2),j=x(B),L=E(B,2),R=x(L);N(()=>K(R,l[P()]||ye("Stream")));var q=E(L,2);{var ae=te=>{var we=Ul(),X=x(we);N(()=>K(X,M())),k(te,we)};H(q,te=>{M()&&te(ae)})}var Q=E(q,2),re=x(Q);N(()=>K(re,ye("Watch"))),N(()=>{ce(D,"href",b()),ce(D,"data-playlink",A()),ue(D,"highlighted",U()&&M()),K(j,A())}),k(p,D)});var y=E(h,2);{var w=p=>{var S=Wl(),A=x(S);N(()=>K(A,ye("Title Unavailable"))),k(p,S)};H(y,p=>{t.playlinks.length||p(w)})}N(()=>ue(g,"list",s(r))),il(g,"clientWidth",p=>C(i,p)),k(e,u),se()}ve(["click"]);var Zl=(e,t)=>C(t,!0),Gl=I('<button class="show-more svelte-1u3je71">Show more</button>'),Xl=I('<div class="paragraph svelte-1u3je71" role="paragraph"> </div>'),Jl=I('<div><span class="paragraph svelte-1u3je71" role="paragraph"> <!> <!></span> <!></div>');function Ql(e,t){le(t,!0);const n=O(t,"blurb",3,""),i=O(t,"limit",3,200);let r=V(!1);const a=z(()=>t.text.slice(0,i()));var o=Jl(),l=x(o),c=x(l),u=E(c);{var d=h=>{var y=Ue("...");k(h,y)};H(u,h=>{!s(r)&&t.text.length>i()&&h(d)})}var f=E(u,2);{var v=h=>{var y=Gl();y.__click=[Zl,r],k(h,y)};H(f,h=>{!s(r)&&(t.text.length>i()||n())&&h(v)})}var m=E(l,2);{var g=h=>{var y=Xl(),w=x(y);N(()=>K(w,n())),k(h,y)};H(m,h=>{s(r)&&h(g)})}N(()=>K(c,s(r)?t.text:s(a))),k(e,o),se()}ve(["click"]);var $l=He('<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 Qr(e){var t=$l();k(e,t)}var es=I('<div class="top svelte-1026zg0"><img class="poster svelte-1026zg0"></div>'),ts=I("<div> </div>"),ns=I('<img alt="" class="svelte-1026zg0">'),is=I('<div class="content svelte-1026zg0" data-playpilot-link-injections-title=""><div class="header svelte-1026zg0"><!> <div class="heading svelte-1026zg0" id="title"> </div> <div class="info svelte-1026zg0"><div class="imdb svelte-1026zg0"><!> </div> <!> <div> </div> <div class="capitalize svelte-1026zg0"> </div> <!></div></div> <div class="main"><!> <!></div></div> <div class="background svelte-1026zg0"><!></div>',1);function $r(e,t){le(t,!0);const n=O(t,"small",3,!1),i=O(t,"compact",3,!1);let r=V(!1),a=V(!1),o=V(!1);var l=is(),c=ee(l),u=x(c),d=x(u);{var f=L=>{var R=es(),q=x(R);N(()=>ce(q,"src",Zt(t.title.standing_poster))),N(()=>{ce(q,"alt",`Movie poster for '${t.title.title??""}'`),ue(q,"loaded",s(r))}),de("load",q,()=>C(r,!0)),k(L,R)};H(d,L=>{i()||L(f)})}var v=E(d,2),m=x(v);an(v,(L,R)=>Se==null?void 0:Se(L,R),()=>2);var g=E(v,2),h=x(g),y=x(h);Qr(y);var w=E(y),p=E(h,2);Hl(p,{get genres(){return t.title.genres}});var S=E(p,2),A=x(S),b=E(S,2),T=x(b);N(()=>K(T,ye(`Type: ${t.title.type}`)));var U=E(b,2);{var M=L=>{var R=ts(),q=x(R);N(()=>K(q,`${t.title.length??""} ${ye("Minutes")??""}`)),k(L,R)};H(U,L=>{!n()&&t.title.length&&L(M)})}var P=E(u,2),D=x(P);Yl(D,{get playlinks(){return t.title.providers},get title(){return t.title}});var Z=E(D,2);{var G=L=>{Ql(L,{get text(){return t.title.description},get blurb(){return t.title.blurb}})};H(Z,L=>{n()||L(G)})}var B=E(c,2),j=x(B);Or(j,()=>s(o),L=>{var R=ns();N(()=>ce(R,"src",Zt(s(o)?t.title.standing_poster:t.title.medium_poster))),N(()=>{ue(R,"loaded",s(a)),ue(R,"blur",s(o))}),de("load",R,()=>C(a,!0)),de("error",R,()=>C(o,!0)),k(L,R)}),N(()=>{ue(c,"small",n()),ue(c,"compact",i()),ue(v,"truncate",n()),K(m,t.title.title),K(w,` ${t.title.imdb_score??""}`),K(A,t.title.year),ue(B,"faded",i())}),k(e,l),se()}function rs(e,t){le(t,!0),he(fe.TitleModalView,t.title);let n=!1;Ge(()=>{const r=Date.now();return xl("initial_test","modal"),()=>he(fe.TitleModalClose,t.title,{time_spent:Date.now()-r})});function i(){n||(he(fe.TitleModalScroll,t.title),n=!0)}Jr(e,{get onclose(){return t.onclose},onscroll:i,children:(r,a)=>{$r(r,{get title(){return t.title}})},$$slots:{default:!0}}),se()}var as=I('<div class="popover svelte-1us1507" tabindex="-1" aria-hidden="true"><div class="dialog svelte-1us1507" data-view-transition-old=""><!></div></div>');function os(e,t){le(t,!0);let n=O(t,"maxHeight",15);Cr("scope","popover");let i=V(null),r=V(!1);Ge(async()=>{await Kn(),a(),await Kn(),o()});function a(){if(!s(i))return;const{top:f,right:v,bottom:m,height:g}=s(i).getBoundingClientRect(),h=l();C(r,J(f-h<0&&window.innerHeight-m>f+g));const y=window.innerWidth-v-h;v+h>window.innerWidth&&(s(i).style.left=`${y}px`)}function o(){if(!s(i))return;const{top:f,height:v}=s(i).getBoundingClientRect(),m=l(),g=s(r)?window.innerHeight-f-m:f+v-m;n(Math.min(g,window.innerHeight*.8))}function l(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}var c=as(),u=x(c),d=x(u);Nt(d,()=>t.children),on(c,f=>C(i,f),()=>s(i)),N(()=>{ue(c,"flip",s(r)),jn(c,"--max-height",n()?n()+"px":null)}),Ce(7,u,()=>Ln,()=>({duration:mi.current?0:100,y:10})),k(e,c),se()}var ls=I('<div class="title-popover svelte-d86q0q" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function ss(e,t){le(t,!0);let n=V(0),i=V(null);he(fe.TitlePopoverView,t.title),Ge(()=>{r();const l=Date.now();return()=>he(fe.TitlePopoverClose,t.title,{time_spent:Date.now()-l})});function r(){const l=t.event.target;if(!(l!=null&&l.getClientRects))return;const c=Array.from(l.getClientRects()),d=c.map(v=>v.x).map(v=>Math.abs(v-t.event.clientX)),f=c[d.indexOf(Math.min(...d))];s(i).style.top=f.top+window.scrollY+"px",s(i).style.left=f.left+window.scrollX+"px",s(i).style.height=f.height+"px"}var a=ls(),o=x(a);os(o,{get maxHeight(){return s(n)},set maxHeight(l){C(n,J(l))},children:(l,c)=>{var u=z(()=>!!s(n)&&s(n)<250);$r(l,{get title(){return t.title},small:!0,get compact(){return s(u)}})},$$slots:{default:!0}}),on(a,l=>C(i,l),()=>s(i)),k(e,a),se()}var cs=e=>e.stopPropagation(),us=(e,t,n,i)=>t(e,s(n).title_details,s(i)),ds=I(' <span class="svelte-pfvkex"><button class="svelte-pfvkex"> </button></span>',1),fs=(e,t,n,i)=>t(s(n).title_details,i()),vs=I('<!> <a target="_blank"> </a>',1),_s=I(" <!>.",1),hs=I("<!> <br>",1),gs=I(" <br>",1),ms=I('<span class="svelte-pfvkex"><!></span>'),ps=I('<p class="svelte-pfvkex"></p>');function ys(e,t){le(t,!0);const n=O(t,"onclickmodal",3,()=>null);function i(c,u){he(fe.AfterArticlePlaylinkClick,c,{playlink:u})}function r(c,u,d){he(fe.AfterArticleModalButtonClick,u),n()(c,d)}var a=qe(),o=ee(a);{var l=c=>{var u=ps();Qe(u,21,()=>t.linkInjections,yt,(d,f)=>{var v=ms();const m=z(()=>{const{key:p,title:S,title_details:A,after_article_style:b}=s(f);return{key:p,title:S,title_details:A,after_article_style:b}}),g=z(()=>{var p;return((p=s(m).title_details)==null?void 0:p.providers)||[]});var h=x(v);{var y=p=>{var S=hs(),A=ee(S);{var b=U=>{var M=ds(),P=ee(M);N(()=>K(P,`"${s(m).title??""}" ${ye("Is Available To Stream")??""} `));var D=E(P);D.__click=[cs];var Z=x(D);Z.__click=[us,r,m,f];var G=x(Z);N(()=>K(G,ye("View Streaming Options"))),k(U,M)},T=U=>{var M=_s(),P=ee(M);N(()=>K(P,`"${s(m).title??""}" ${ye("Is Available To Stream On")??""} `));var D=E(P);Qe(D,17,()=>s(g),yt,(Z,G,B)=>{let j=()=>s(G).name,L=()=>s(G).url;var R=vs(),q=ee(R);{var ae=te=>{var we=Ue();N(()=>K(we,B===s(g).length-1?`, ${ye("And")}`:",")),k(te,we)};H(q,te=>{B&&te(ae)})}var Q=E(q,2);Q.__click=[fs,i,m,j];var re=x(Q);N(()=>{ce(Q,"href",L()),K(re,j())}),k(Z,R)}),k(U,M)};H(A,U=>{s(m).after_article_style==="modal_button"?U(b):U(T,!1)})}k(p,S)},w=p=>{var S=gs(),A=ee(S);N(()=>K(A,`"${s(m).title??""}" ${ye("Title Unavailable Suffix")??""} `)),k(p,S)};H(h,p=>{s(g).length?p(y):p(w,!1)})}N(()=>ce(v,"data-playpilot-injection-key",s(m).key)),k(d,v)}),k(c,u)};H(o,c=>{t.linkInjections.length&&c(l)})}k(e,a),se()}ve(["click"]);function ws(e,t,n){return e.filter(i=>n.every(r=>i[r]===t[r])).length}function ks(e,t){return t.some(n=>e>=n.start&&e<n.end)}function bs(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function pi(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ui(e,t,n=[]){var a,o;const i=document.createTreeWalker(t);let r;for(;(r=i.nextNode())&&!((a=r.nodeValue)!=null&&a.includes(e)&&!n.includes(((o=r.parentNode)==null?void 0:o.nodeName)||"")););return r}function zi(e){const t=e.parentNode;return t?t.nodeName==="A"||!!t.closest("a"):!1}function xs(e,t,n,i){const r=bs(t),a=pi(t),o=e.slice(0,i),l=e.slice(i),c=/[-/\\^$*+?.()|[\]{}]/g,u=new RegExp(`${a.replace(c,"\\$&")}|${r.replace(c,"\\$&")}`),d=l.replace(u,n);return o+d}function Ss(e,t,n,i){return e.substring(0,n)+t+e.substring(i)}function Ne(e){return pi(e).toLowerCase().replace(/\s+/g,"")}function ea(e,t,n){const r=e.indexOf(t),a=Math.floor((n-t.length)/2);let o=Math.max(0,r-a),l=o+n;l>e.length&&(l=e.length,o=Math.max(0,l-n));let c=e.slice(o,l).trim();return o>0&&(c="…"+c),l<e.length&&(c+="…"),c}function Es(e,t,n){const i=e.nodeType===Node.TEXT_NODE&&e.parentNode?e.parentElement:e;if(!i||!e.textContent)return{before:"",after:""};const r=i.innerText.indexOf(e.textContent),a=Wi(i.innerText.slice(0,t+r)),o=i.innerText.slice(n+r),l=Wi(Ki(a,2)),c=Ki(o,2);return{before:l,after:c}}function Wi(e){return e.split("").reverse().join("")}function Ki(e,t=1){const n=e.match(/[^\s]+/g);return n?n.slice(0,t).join(" ").replace(/[.,!?;:]+$/u,""):""}function Ts(e,t){let n=0,i=0;for(;(i=e.indexOf(t,i))!==-1;)n++,i+=t.length;return n}function Is(e,t,n){const i=[];let r=0;for(;r<=e.length;){const a=t?e.indexOf(t,r):r;if(a===-1&&t)break;const o=t?a+t.length:a,l=n?e.indexOf(n,o):e.length;if(n&&l===-1)break;const c=e.slice(o,l);i.push({match:c,index:o}),r=n?l+n.length:e.length+1}return i}function As(e,t,n,i){const a=Is(e,n,i).filter(({match:l})=>pi(l).includes(t));return a.length?a.reduce((l,c)=>!l||c.match.length<l.match.length?c:l):null}function Ps(e){var t,n;return{leadingSpaces:((t=e.match(/^\s*/))==null?void 0:t[0].length)||0,trailingSpaces:((n=e.match(/\s*$/))==null?void 0:n[0].length)||0}}function Cs(e,t,n=0){const i=t.innerHTML,r=[],a=js(t);let o=i.indexOf(e);for(;o!==-1;)ks(o,a)&&r.push(o),o=i.indexOf(e,o+e.length);return r[n]??-1}function js(e){const t=[],n=e.innerHTML;let i=!1,r=!1,a=!1,o=0;for(let l=0;l<n.length;l++){const c=n[l];if(!r&&!i&&c==="<"){i=!0,a&&(t.push({start:o,end:l}),a=!1);continue}if(i&&c==='"'&&(r=!r),i&&!r&&c===">"){i=!1;continue}!i&&!r&&!a&&(o=l,a=!0)}return!t.length&&e.textContent.length&&t.push({start:o,end:e.innerHTML.length}),t}function ta(e){return e.ctrlKey||e.metaKey||e.button!==0}function Ms(e,t){if(!document.startViewTransition||!t){e();return}document.startViewTransition(()=>{const n=document.querySelector("[data-view-transition-old]");if(!n)return;const i=window.getComputedStyle(n).getPropertyValue("view-transition-name");n.style.viewTransitionName="none",e();const r=document.querySelector("[data-view-transition-new]");r&&(r.style.viewTransitionName=i)})}const _t="data-playpilot-injection-key",Ht=`[${_t}]`;let yn=null,ht=null,Ft=null,Bt=null;function yi(e,t=""){const n=[],i=[e];for(;i.length>0;){const r=i.pop();if(n.includes(r)||t&&r.matches(t)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|H1)$/.test(r.tagName)||r.offsetWidth<=1)continue;const a=Array.from(r.childNodes).some(c=>{var u;return c.nodeType===Node.TEXT_NODE&&((u=c.nodeValue)==null?void 0:u.trim())!==""});if(a&&r.tagName==="LI"){const c=r.closest("ul, ol");c&&!n.includes(c)&&n.push(c);continue}const o=r.tagName==="P"&&!!r.textContent;if(a||o){n.push(r);continue}const l=Array.from(r.children);for(let c=l.length-1;c>=0;c--)i.push(l[c])}return n}function At(){var t;const e=(t=window.PlayPilotLinkInjections)==null?void 0:t.selector;if(e){const n=e.replace(/(:)/g,"\\$1"),i=document.querySelector(n);if(i)return i}return document.querySelector("article")||document.querySelector("main")||document.body}function na(e){return e.map(t=>t.innerText).join(`
|
|
9
9
|
|
|
10
|
-
`)}function Ls(e,t={aiInjections:[],manualInjections:[]}){wi();const n=Bs(t);if(!n)return[];const i=Ne(e.map(u=>u.innerText).join(" ")),r=Vs(n),a=r.filter(u=>i.includes(Ne(u.sentence))),o={};let l=-1;for(const u of a){l++;const d=e.findIndex(A=>Ne(A.innerText).includes(Ne(u.sentence))),f=e[d];if(!f)continue;const v=Ui(u.title,f,["A"]);if(!(v!=null&&v.nodeValue)||zi(v)){const A=Ui(u.title,f);if(A&&zi(A)){o[u.key]="Given text is already inside of a link.";continue}}const{injectionElement:m,linkElement:g}=Ns(u),{phrase_before:h,phrase_after:y}=u;let w=-1,p=!1;if(Ts(f.innerHTML,u.title)===1&&(w=f.innerHTML.indexOf(u.title)),w===-1&&(h||y)){const A=[h,u.title,y].filter(Boolean).join(" ");if(w=f.innerHTML.indexOf(A),w===-1){const b=As(f.innerHTML,u.title,h||"",y||"");if(b){const{leadingSpaces:T,trailingSpaces:U}=Ps(b.match);g.innerHTML=b.match.trim();const M=b.index+T,P=b.index+b.match.length-U;f.innerHTML=Ss(f.innerHTML,m.outerHTML,M,P),w=b.index,p=!0}}}if(w===-1&&(v!=null&&v.nodeValue)){const A=f.innerHTML.indexOf(v.nodeValue),b=f.innerHTML.indexOf(u.sentence),T=ws(a.slice(0,l+1),u,["title","sentence"])-1,U=Cs(v.nodeValue,f,T);w=Math.max(A,U,b,0)}w!==-1&&(p||(f.innerHTML=xs(f.innerHTML,u.title,m.outerHTML,w)))}Ds(r),Os();const c=Us(n);return c.length&&qs(e,c),n.filter(u=>u.title_details).map((u,d)=>{const f=u.duplicate??(!u.manual&&zs(u,d,n)),v=document.querySelector(`[${_t}="${u.key}"]`),m=Nn(u)&&!u.inactive&&!u.after_article&&!v,g=!!e.find(y=>Ne(y.innerText).includes(Ne(u.sentence))),h=m?o[u.key]||(g?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...u,inactive:u.inactive??!1,duplicate:f,failed:m,failed_message:h}})}function Ns(e){const t=document.createElement("span");t.dataset.playpilotInjectionKey=e.key;const n=document.createElement("a");return n.innerText=e.title,n.href=e.playpilot_url,n.target="_blank",n.rel="noopener nofollow noreferrer",t.insertAdjacentElement("beforeend",n),{injectionElement:t,linkElement:n}}function Os(){const e=Array.from(document.querySelectorAll(`${Ht} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function Ds(e){window.addEventListener("click",n=>{if(ta(n))return;let i=n.target;if(!i||(i.hasAttribute(_t)||(i=i.closest(Ht)),!i))return;const r=i.getAttribute(_t);if(!r)return;const a=e.find(o=>r===o.key);a&&(n.preventDefault(),Ms(()=>{wn(!1),ia(n,a)},!mi.current&&window.innerWidth>=600&&!window.matchMedia("(pointer: coarse)").matches))}),window.addEventListener("mousemove",n=>{if(!ht)return;const i=n.target;i.hasAttribute("data-playpilot-title-popover")||i.closest("[data-playpilot-title-popover]")||i.hasAttribute(_t)||i.closest(Ht)||wn()}),Array.from(document.querySelectorAll(Ht)).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=e.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{ht||Rs(a,r)}),n.addEventListener("mouseleave",()=>yn=null))})}function ia(e,t){ta(e)||Bt||(e.preventDefault(),Bt=rn(rs,{target:ca(),props:{title:t.title_details,onclose:ra}}))}function ra(e=!0){Bt&&(Cn(Bt,{outro:e}),Bt=null)}function Rs(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;ht&&wn();const n=e.currentTarget;yn=n,setTimeout(()=>{yn===n&&(ht=rn(ss,{target:ca(),props:{event:e,title:t.title_details}}))},100)}function wn(e=!0){ht&&(Cn(ht,{outro:e}),yn=null,ht=null)}function qs(e,t){var o,l;if(Ft||!t.length)return;const n=document.createElement("div"),i=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,r=(i?document.querySelector(i):null)||e[e.length-1],a=((l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),Ft=rn(ys,{target:n,props:{linkInjections:t,onclickmodal:(c,u)=>ia(c,u)}})}function Hs(){var e;Ft&&(Cn(Ft),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Ft=null)}function wi(){document.querySelectorAll(Ht).forEach(t=>Fs(t.getAttribute(_t)||"")),Hs(),ra(!1),wn(!1)}function Fs(e){var i;const t=document.querySelector(`[${_t}="${e}"]`);if(!t)return;const n=(i=t.querySelector("a"))==null?void 0:i.innerHTML;t.outerHTML=n||""}function Bs({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function aa(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function oa(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&Nn(e)}function Nn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function Vs(e){return la(e).filter(t=>t.in_text!==!1&&oa(t))}function Us(e){return la(e).filter(t=>t.after_article===!0&&oa(t))}function la(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&sa(n,t)))}function zs(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&sa(i,e))}function sa(e,t){return e.title===t.title&&Ne(e.sentence)===Ne(t.sentence)}function ca(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function ki(){const e=At();return{content_heading:Ws(e),content_modified_time:Ks(e),content_published_time:Ys(e)}}function Ws(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Ks(e){const t=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="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?bi(n):null}function Ys(e){const t=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="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?bi(n):null}function bi(e){try{return new Date(e).toISOString()}catch{return null}}let Bn=null;async function ln(e,{url:t=fi(),hash:n=yl(e||""),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=On(),o=Kr()?await Wr():!1,l=Zr();if(!a)throw new Error("No token was provided");i.metadata=ki(),i.run_ai&&(i.hash=n,i.page_text=e);const c=await fetch(Mn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({url:t,...i})});if(!c.ok)throw c;const u=await c.json();return window.PlayPilotLinkInjections.last_successful_fetch=u,u}async function Yi(e,{requireCompletedResult:t=!1,runAiWhenRelevant:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=0;Bn&&clearTimeout(Bn);const l=async(c,u)=>{let d;try{if(d=await ln(e),n&&(d=await Zs(e,d)),t&&d.ai_enabled&&d.ai_running)throw new Error;d.manual_injections=Zi(d.manual_injections||[]),d.ai_injections=Zi(d.ai_injections||[]),c(d);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),c();return}d&&a(d),Bn=setTimeout(()=>l(c),i)}};return new Promise(l)}async function Zs(e,t){if(!e||!t.ai_enabled||t.ai_running)return t;const n=ki().content_modified_time,i=t.content_modified_time?bi(t.content_modified_time):null,r=n&&i===n;return t.ai_last_run&&r?t:await ln(e,{params:{run_ai:!0}})}async function Gs(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,phrase_before:l.phrase_before,phrase_after:l.phrase_after,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await ln(t,{params:{private_token:_i(),manual_injections:r,content_text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Xs(){const e=new Headers({"Content-Type":"application/json"}),t=On();if(!t)throw new Error("No token was provided");const n=await fetch(Mn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Zi(e){return e.map(t=>({...t,key:ua(t.sid)}))}function ua(e){return e+"-"+Yr()}function On(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Js(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Qs=He('<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 $s(e,t){const n=O(t,"expanded",3,!1);var i=Qs();L(()=>ue(i,"expanded",n())),k(e,i)}var ec=He('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function tc(e){var t=ec();k(e,t)}function nc(e,t,n){t(!t()),n()(t())}var ic=I('<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 Qn(e,t){le(t,!0);let n=O(t,"active",15),i=O(t,"fullwidth",3,!1),r=O(t,"label",3,""),a=O(t,"onclick",3,()=>null);var o=ic();o.__click=[nc,n,a];var l=x(o),c=x(l);Nt(c,()=>t.children),L(()=>{ce(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),ue(o,"active",n()),ue(o,"fullwidth",i())}),k(e,o),se()}ve(["click"]);var rc=I('<input type="text" autocomplete="off" class="svelte-1vrer3i">');function xi(e,t){let n=O(t,"value",15),i=O(t,"label",3,""),r=O(t,"name",3,""),a=O(t,"readonly",3,!1),o=O(t,"oninput",3,()=>null);var l=rc();l.__input=function(...c){var u;(u=o())==null||u.apply(this,c)},L(()=>{ce(l,"name",r()),ce(l,"aria-label",i()),ce(l,"placeholder",i()),l.readOnly=a()}),Qo(l,n),k(e,l)}ve(["input"]);var ac=He('<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>'),oc=He('<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>'),lc=He('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Gi(e,t){const n=O(t,"align",3,"bottom");var i=lc(),r=x(i);{var a=l=>{var c=ac();k(l,c)},o=l=>{var c=qe(),u=ee(c);{var d=f=>{var v=oc();k(f,v)};H(u,f=>{n()==="center"&&f(d)},!0)}k(l,c)};H(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var sc=I("<div><!></div>");function wt(e,t){le(t,!0);const n=O(t,"type",3,"error"),i=O(t,"fixed",3,!1);var r=sc(),a=x(r);Nt(a,()=>t.children),L(()=>{Ko(r,`alert ${n()??""} svelte-df5n87`),ue(r,"fixed",i())}),k(e,r),se()}var cc=I("<!> In-text Playlink",1),uc=I("<!> Bottom Playlink",1),dc=I('<div class="alert svelte-1shw34x"><!></div>'),fc=(e,t)=>t().after_article_style="playlinks",vc=(e,t)=>t().after_article_style="modal_button",_c=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),hc=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function gc(e,t){le(t,!0);const n=O(t,"linkInjection",7),i=z(()=>n().after_article_style==="modal_button");var r=hc(),a=ee(r),o=x(a),l=z(()=>n().in_text??!0);Qn(o,{fullwidth:!0,get active(){return s(l)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,h)=>{var y=cc(),w=ee(y);Gi(w,{align:"center"}),k(g,y)},$$slots:{default:!0}});var c=E(o,2),u=z(()=>n().after_article??!1);Qn(c,{fullwidth:!0,get active(){return s(u)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,h)=>{var y=uc(),w=ee(y);Gi(w,{align:"bottom"}),k(g,y)},$$slots:{default:!0}});var d=E(a,2);{var f=g=>{var h=dc(),y=x(h);wt(y,{type:"warning",children:(w,p)=>{var S=Ue("At least one layout option must be selected for the playlink to be visible.");k(w,S)},$$slots:{default:!0}}),Ce(3,h,()=>Yt,()=>({duration:200})),k(g,h)};H(d,g=>{Nn(n())||g(f)})}var v=E(d,2);{var m=g=>{var h=_c(),y=E(x(h),2),w=x(y);w.__click=[fc,n];var p=E(w,2);p.__click=[vc,n];var S=E(p,2);L(()=>{ce(y,"aria-activedescendant",`playlinks-${(s(i)?"after-article":"in-text")??""}`),ce(w,"aria-selected",!s(i)||null),ue(w,"active",!s(i)),ce(p,"aria-selected",s(i)||null),ue(p,"active",s(i)),ue(S,"right",s(i))}),Ce(3,h,()=>Yt,()=>({duration:100})),k(g,h)};H(v,g=>{n().after_article&&g(m)})}k(e,r),se()}ve(["click"]);var mc=He('<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 pc(e){var t=mc();k(e,t)}var yc=(e,t)=>C(t,!s(t)),wc=I('<div class="content svelte-zpsd2z"><!></div>'),kc=I('<div class="context-menu svelte-zpsd2z"><button class="svelte-zpsd2z"><!></button> <!></div>');function bc(e,t){le(t,!0);let n=V(!1),i=V(null);function r(d){var v;const f=d.target;f===s(i)||(v=s(i))!=null&&v.contains(f)||C(n,!1)}var a=kc();de("click",be,r);var o=x(a);o.__click=[yc,n];var l=x(o);pc(l),on(o,d=>C(i,d),()=>s(i));var c=E(o,2);{var u=d=>{var f=wc(),v=x(f);Nt(v,()=>t.children),Ce(1,f,()=>Ln,()=>({duration:150,y:5})),k(d,f)};H(c,d=>{s(n)&&d(u)})}L(()=>{ce(o,"aria-label",t.ariaLabel),ce(o,"aria-expanded",s(n))}),k(e,a),se()}ve(["click"]);function xc(e,t,n,i){var r,a;s(t)&&(he(fe.ManualReport,n.linkInjection.title_details,{report_reason:s(t),sid:n.linkInjection.sid,title:n.linkInjection.title,sentence:n.linkInjection.sentence,failed:(r=n.linkInjection.failed)==null?void 0:r.toString(),failed_message:n.linkInjection.failed_message,manual:(a=n.linkInjection.manual)==null?void 0:a.toString()}),C(i,!0),setTimeout(n.onclose,3e3))}var Sc=(e,t,n)=>C(t,J(n())),Ec=I('<option class="svelte-o5qkco"> </option>'),Tc=I('<div class="sent svelte-o5qkco">Report has been sent, thank you! Closing window...</div>'),Ic=I('<button class="submit svelte-o5qkco">Send report</button>'),Ac=I('<div class="form svelte-o5qkco"><div class="heading svelte-o5qkco">Report issue</div> <div class="info svelte-o5qkco"><div><strong class="svelte-o5qkco">Title</strong> </div> <div><strong class="svelte-o5qkco">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-o5qkco"><option class="svelte-o5qkco">Select an issue...</option><!></select> <div><!></div></div>');function Pc(e,t){le(t,!0);const n=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let i=V(""),r=V(!1);Jr(e,{get onclose(){return t.onclose},children:(a,o)=>{var l=Ac(),c=x(l);an(c,(b,T)=>Se==null?void 0:Se(b,T),()=>2);var u=E(c,2),d=x(u),f=E(x(d)),v=E(d,2),m=E(x(v));L(()=>K(m,`:
|
|
11
|
-
${ea(t.linkInjection.sentence,t.linkInjection.title,100)??""}`));var g=E(u,4),h=x(g);h.value=((h.__value="")==null,"");var y=E(h);Qe(y,17,()=>n,yt,(b,T)=>{let U=()=>s(T).value,M=()=>s(T).label;var P=Ec(),D={};P.__click=[Sc,i,U];var Z=x(P);L(()=>{D!==(D=U())&&(P.value=(P.__value=U())==null?"":U()),K(Z,M())}),k(b,P)});var w=E(g,2),p=x(w);{var S=b=>{var T=Tc();Ce(1,T,()=>Kt,()=>({duration:200})),k(b,T)},A=b=>{var T=Ic();T.__click=[xc,i,t,r],L(()=>T.disabled=!s(i)),k(b,T)};H(p,b=>{s(r)?b(S):b(A,!1)})}L(()=>K(f,`: ${t.linkInjection.title??""}`)),el(g,()=>s(i),b=>C(i,b)),k(a,l)},$$slots:{default:!0}}),se()}ve(["click"]);function Cc(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}function jc(e,t){const n=rn(Pc,{target:document.body,props:{linkInjection:t(),onclose:()=>Cn(n)}})}var Mc=(e,t)=>C(t,!s(t)),Lc=I('<button class="expand-sentence svelte-lo6h85"> </button>'),Nc=I('<button class="context-menu-action svelte-lo6h85">Remove</button> <button class="context-menu-action svelte-lo6h85">Report issue</button>',1),Oc=(e,t)=>C(t,!s(t)),Dc=I('<div class="warning svelte-lo6h85" aria-label="Invalid playlink settings"><!></div>'),Rc=I('<div class="actions svelte-lo6h85"><button class="expand svelte-lo6h85" aria-label="Expand"><!></button> <!> <!></div>'),qc=I('<div class="expanded svelte-lo6h85"><div class="label svelte-lo6h85">Link URL</div> <!> <div class="label offset svelte-lo6h85">Layout options</div> <div class="type-select svelte-lo6h85"><!></div></div>'),Hc=I('<div class="item svelte-lo6h85"><div class="header svelte-lo6h85"><img class="poster svelte-lo6h85" alt="" width="32" height="48"> <div class="info svelte-lo6h85"><div class="title svelte-lo6h85"> </div> <div class="sentence svelte-lo6h85"><!> <!></div></div> <div class="context-menu svelte-lo6h85"><!></div></div> <div class="content svelte-lo6h85"><!> <!></div></div>');function Fc(e,t){le(t,!0);const n=O(t,"linkInjection",15),i=O(t,"onremove",3,()=>null),r=O(t,"onhighlight",3,()=>null),a=z(()=>n()||{}),o=z(()=>s(a).key),l=z(()=>s(a).sentence),c=z(()=>s(a).title_details),u=z(()=>s(a).failed),d=z(()=>s(a).failed_message),f=z(()=>s(a).inactive),v=z(()=>s(c)),m=z(()=>ea(n().sentence,n().title,60));let g=V(!1),h=V(!1),y=V(!1),w=V(null);Ge(()=>{s(u)&&he(fe.InjectionFailed,s(v),{phrase:n().title,sentence:s(l)})});function p(X=!0){A().forEach(oe=>{oe.classList.toggle("playpilot-injection-highlight",X)})}function S(X){let $=X.target,oe=$==null?void 0:$.dataset.playpilotInjectionKey;$&&!oe&&($=$.closest(`[data-playpilot-injection-key="${s(o)}"]`),oe=$==null?void 0:$.dataset.playpilotInjectionKey),C(y,oe===s(o)),s(w)&&s(y)&&r()(s(w))}function A(){const X=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${s(o)}"]`));return X.length?X:yi(At()).filter($=>Ne($.innerText).includes(Ne(n().sentence)))||[]}var b=Hc();de("mouseover",be,S),b.__click=[Cc,p,A];var T=x(b),U=x(T);L(()=>ce(U,"src",Zt(s(v).standing_poster)));var M=E(U,2),P=x(M),D=x(P),Z=E(P,2),G=x(Z);Fo(G,()=>(s(h)?s(l):s(m)).replace(n().title,`<em>${n().title}</em>`));var B=E(G,2);{var j=X=>{var $=Lc();$.__click=[Mc,h];var oe=x($);L(()=>K(oe,s(h)?"Less":"More")),k(X,$)};H(B,X=>{s(m).length<s(l).length&&X(j)})}var N=E(M,2),R=x(N);bc(R,{ariaLabel:"More options",children:(X,$)=>{var oe=Nc(),Ae=ee(oe);Ae.__click=function(...ct){var F;(F=i())==null||F.apply(this,ct)};var et=E(Ae,2);et.__click=[jc,n],k(X,oe)},$$slots:{default:!0}});var q=E(T,2),ae=x(q);{var Q=X=>{wt(X,{children:($,oe)=>{var Ae=Ue();L(()=>K(Ae,s(d))),k($,Ae)},$$slots:{default:!0}})},re=X=>{var $=Rc(),oe=x($);oe.__click=[Oc,g];var Ae=x(oe);$s(Ae,{get expanded(){return s(g)}});var et=E(oe,2);{var ct=_e=>{var Ee=Dc(),Me=x(Ee);tc(Me),Ce(3,Ee,()=>Kt,()=>({duration:100})),k(_e,Ee)};H(et,_e=>{Nn(n())||_e(ct)})}var F=E(et,2),W=z(()=>s(f)?"Inactive":"Visible"),ge=z(()=>!n().inactive);Qn(F,{get label(){return s(W)},get active(){return s(ge)},onclick:_e=>{n(n().inactive=!_e,!0),n(n().manual=!0,!0)},children:(_e,Ee)=>{var Me=Ue();L(()=>K(Me,s(f)?"Inactive":"Visible")),k(_e,Me)},$$slots:{default:!0}}),L(()=>ce(oe,"aria-expanded",s(g))),k(X,$)};H(ae,X=>{s(u)?X(Q):X(re,!1)})}var te=E(ae,2);{var we=X=>{var $=qc(),oe=E(x($),2);xi(oe,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ct){n(n().playpilot_url=ct,!0)}});var Ae=E(oe,4),et=x(Ae);gc(et,{get linkInjection(){return n()}}),Ce(3,$,()=>Yt,()=>({duration:100})),k(X,$)};H(te,X=>{s(g)&&X(we)})}on(b,X=>C(w,X),()=>s(w)),L(()=>{ue(b,"highlighted",s(y)),ue(b,"inactive",s(f)),K(D,s(v).title)}),de("mouseenter",b,()=>p(!0)),de("mouseleave",b,()=>p(!1)),de("error",U,({target:X})=>X.src=Vr),Ce(6,b,()=>Yt,()=>({duration:200})),k(e,b),se()}ve(["click"]);var Bc=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Vc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"position",23,()=>({x:0,y:0})),r=O(t,"limit",19,()=>({x:0,y:0})),a=O(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},c=i();Ge(()=>{u(i().x,i().y)});function u(h,y){const w=window.innerWidth,p=window.innerHeight,S=n().clientWidth,A=n().clientHeight;h=Math.min(Math.max(h,r().x),w-S-r().x),y=Math.min(Math.max(y,r().y),p-A-r().y),n().style.right=h+"px",n().style.bottom=Math.max(y,r().y)+"px",i({x:h,y}),a()(i())}function d(h){var y,w;return{x:h.pageX||((y=h.touches)==null?void 0:y[0].pageX)||0,y:h.pageY||((w=h.touches)==null?void 0:w[0].pageY)||0}}function f(h){o=!0,l=d(h),c=i()}function v(h){if(!o)return;const y=d(h),w=y.x-l.x,p=y.y-l.y,S=c.x-w,A=c.y-p;u(S,A)}function m(){o&&(o=!1)}var g=Bc();de("mousemove",be,v),de("touchmove",be,v,void 0,!0),de("mouseup",be,m),de("touchend",be,m),de("resize",be,()=>u(i().x,i().y)),g.__mousedown=f,g.__touchstart=f,k(e,g),se()}ve(["mousedown","touchstart"]);var Uc=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function zc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"height",7,200),r=O(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,c=i();Ge(()=>{i()&&u(i())});function u(h){const y=window.getComputedStyle(n()).minHeight||"0",w=Math.max(parseInt(y),Math.min(h,m()));n().style.height=`${w}px`,i(w),r()(w)}function d(h){var y,w;o=!0,l=h.pageY||((w=(y=h.touches)==null?void 0:y[0])==null?void 0:w.pageY)||0,c=n().clientHeight}function f(h){var S,A;if(!o)return;const y=h.pageY||((A=(S=h.touches)==null?void 0:S[0])==null?void 0:A.pageY)||0,w=l-y,p=c+w;u(p)}function v(){o=!1}function m(){const h=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-h,0)}var g=Uc();de("mousemove",be,f),de("touchmove",be,f,void 0,!0),de("mouseup",be,v),de("touchend",be,v),de("resize",be,()=>{i()&&u(i())}),g.__mousedown=d,g.__touchstart=d,k(e,g),se()}ve(["mousedown","touchstart"]);var Wc=He('<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 Kc(e){var t=Wc();k(e,t)}async function Yc(e){const t=new Headers({"Content-Type":"application/json"}),n=On();if(!n)throw new Error("No token was provided");const i=await fetch(Mn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Zc=He('<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 Gc(e){var t=Zc();k(e,t)}var Xc=I("<div> </div>"),Jc=e=>e.stopImmediatePropagation(),Qc=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function Xi(e,t){le(t,!0);const n=O(t,"hoverable",3,!0),i=O(t,"onclick",3,()=>null);var r=Qc();r.__click=function(...b){var T;(T=i())==null||T.apply(this,b)};var a=x(r);L(()=>ce(a,"src",Zt(t.title.standing_poster)));var o=E(a,2),l=x(o),c=x(l),u=E(l,2),d=x(u),f=x(d);Qr(f);var v=E(f),m=E(d,2),g=x(m),h=E(m,2),y=x(h),w=E(h,2);{var p=b=>{var T=Xc(),U=x(T);L(()=>K(U,`${t.title.length??""} min`)),k(b,T)};H(w,b=>{t.title.length&&b(p)})}var S=E(o,2);S.__click=[Jc];var A=x(S);Gc(A),L(()=>{ue(r,"hoverable",n()),K(c,t.title.title),K(v,` ${t.title.imdb_score??""}`),K(g,t.title.year),K(y,t.title.type),ce(S,"href",`${Br}/${t.title.type??""}/${t.title.slug??""}`)}),de("error",a,({target:b})=>b.src=Vr),k(e,r),se()}ve(["click"]);var $c=I('<em class="empty svelte-1olb8n0">No results found</em>'),eu=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),tu=I('<div class="selected svelte-1olb8n0"><!></div>'),nu=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function iu(e,t){le(t,!0);let n=O(t,"onselect",3,()=>null),i=O(t,"query",15),r=V(J([])),a=V(null),o=V(!1);Tn(()=>{i()&&l(i())});async function l(h){C(o,!0);try{C(r,J(await Yc(h)))}finally{C(o,!1)}}function c(h){i(h.title),C(a,J(h)),n()(h)}var u=nu(),d=x(u);xi(d,{oninput:()=>C(a,null),name:"search",label:"Search...",get value(){return i()},set value(h){i(h)}});var f=E(d,2);{var v=h=>{var y=eu();Qe(y,21,()=>s(r),w=>w.sid,(w,p)=>{Xi(w,{get title(){return s(p)},onclick:()=>c(s(p))})},w=>{var p=qe(),S=ee(p);{var A=b=>{var T=$c();k(b,T)};H(S,b=>{s(o)||b(A)})}k(w,p)}),k(h,y)};H(f,h=>{i()&&!s(a)&&h(v)})}var m=E(f,2);{var g=h=>{var y=tu(),w=x(y);Xi(w,{get title(){return s(a)},hoverable:!1}),k(h,y)};H(m,h=>{s(a)&&h(g)})}k(e,u),se()}function ru(e,t=e.anchorNode){if(!e.anchorNode||!t)return{start:-1,end:-1};const n=e.toString().trim(),i=e.toString().search(/\S/);if(e.anchorNode===t&&t.nodeType===Node.TEXT_NODE){const u=Math.min(e.anchorOffset,e.focusOffset)+i;return{start:u,end:u+n.length}}const r=e.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset);const l=a.toString().length+i,c=l+n.length;return{start:l,end:c}}function au(e,t,n,i,r,a,o,l){if(!s(t)||!s(n))return;const c=s(n).type==="movie"?"movie":"show",u=Br+`/${c}/${s(n).slug}`,d={sid:s(n).sid,title:s(t),sentence:s(i),phrase_before:s(r),phrase_after:s(a),playpilot_url:u,key:ua(s(n).sid),title_details:s(n),manual:!0};o.onsave(d),l()()}var ou=I('<div class="error svelte-1i8p6op"><!></div>'),lu=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),su=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function cu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onclose",3,()=>null);let r=V(""),a=V(""),o=V(null),l=V(""),c=V(""),u=V(""),d=V("");Ge(f);function f(){const P=window.getSelection();if(!(P!=null&&P.anchorNode)||P.anchorNode.parentElement&&!At().contains(P.anchorNode.parentElement))return;const D=P.toString().trim();if(!D)return;C(u,""),C(r,J(D));const Z=P.getRangeAt(0).cloneContents();if(Array.from(Z.childNodes).filter(Q=>{var re;return(re=Q.textContent)==null?void 0:re.trim()}).find(Q=>{var re;return Q.nodeName==="A"||((re=Q.querySelector)==null?void 0:re.call(Q,"a"))})){C(u,"Selection is or contains a link. Injections can not be created around already existing links.");return}C(d,J(s(r)));const{node:B,sentence:j}=v(P,D);if(!B)return;C(a,J(j));const{start:N,end:R}=ru(P,B);(Q=>(C(c,J(Q.before)),C(l,J(Q.after))))(Es(B,N,R)),j.includes(s(c))||C(c,""),j.includes(s(l))||C(l,"");const q=P.getRangeAt(0).commonAncestorContainer.textContent,ae=Ne(n());(!q||!ae.includes(Ne(q)))&&C(u,"Selection was not inside of given content")}function v(P,D){const Z=P.getRangeAt(0),G=At();let B=Z.startContainer;for(;(B.textContent||"").length<=D.length*3&&B.parentNode&&B.parentNode.textContent!==G.textContent;)B=B.parentNode;if(!B||!B.textContent)return{node:null,sentence:""};const j=B.textContent,N=m(B,Z.startContainer,Z.startOffset),R=m(B,Z.endContainer,Z.endOffset),q=j.slice(0,N).lastIndexOf("."),ae=j.slice(R).match(/[.!?]/),Q=ae?R+ae.index:j.length,re=q===-1?0:q+1,te=Q,we=j.slice(re,te+1).trim();return{node:B,sentence:we}}function m(P,D,Z){let G=0;const B=P,j=N=>{var R;if(N===D)return G+=Z,!0;N.nodeType===Node.TEXT_NODE&&(G+=((R=N.textContent)==null?void 0:R.length)||0);for(let q=N.firstChild;q;q=q.nextSibling)if(j(q))return!0;return!1};return j(B),G}function g(P){var D,Z;C(o,J(P)),(Z=(D=window.getSelection())==null?void 0:D.removeAllRanges)==null||Z.call(D)}var h=su();de("mouseup",be,f);var y=x(h),w=x(y);gi(w,{get onclick(){return i()},size:"24px",children:(P,D)=>{Kc(P)},$$slots:{default:!0}});var p=E(w,2);an(p,(P,D)=>Se==null?void 0:Se(P,D),()=>2);var S=E(y,6);xi(S,{get value(){return s(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var A=E(S,2);{var b=P=>{var D=ou(),Z=x(D);wt(Z,{children:(G,B)=>{var j=Ue();L(()=>K(j,s(u))),k(G,j)},$$slots:{default:!0}}),k(P,D)};H(A,P=>{s(u)&&P(b)})}var T=E(A,2);{var U=P=>{var D=lu(),Z=E(ee(D),2);Or(Z,()=>s(a)+s(r),G=>{iu(G,{onselect:g,get query(){return s(d)},set query(B){C(d,J(B))}})}),k(P,D)};H(T,P=>{s(u)||P(U)})}var M=E(T,2);M.__click=[au,r,o,a,c,l,t,i],L(()=>M.disabled=!s(r)||!s(o)),k(e,h),se()}ve(["click"]);const $n="PlayPilotEditorialSessionId",da=5e3,uu=da*2;async function du(e){const{ai_enabled:t,injections_enabled:n,ai_last_run:i,session_id:r,session_last_ping:a}=await ln(e),o=va(r||null,a||null),l={ai_enabled:t,ai_last_run:i,injections_enabled:n,session_id:r,session_last_ping:a};return o?await fa(e):l}async function fa(e){const t=_a(),n=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:n.toString()},{ai_enabled:r,injections_enabled:a,ai_last_run:o}=await ln(e,{params:i});return{ai_enabled:r,ai_last_run:o,injections_enabled:a,...i}}function va(e,t){if(!e||!t)return!0;const n=Date.now(),i=new Date(t),r=_a();return n-i.getTime()>uu?!0:r===e}function _a(){return sessionStorage.getItem($n)||fu()}function fu(){const e=sessionStorage.getItem($n)||Yr();return sessionStorage.setItem($n,e),e}function vu(e,t,n){fa(t()),n()()}var _u=I('<p class="svelte-2m2urs"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-2m2urs">Take over editing</button>',1),hu=I('<div class="alert svelte-2m2urs"><!></div>');function gu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onpoll",3,()=>null),r=O(t,"onallow",3,()=>null),a=O(t,"ondisallow",3,()=>null),o=O(t,"ontakeover",3,()=>null);let l=null,c=V(!0);Ge(()=>(u(),()=>{l&&clearInterval(l)}));function u(){d(),l=setInterval(d,da)}async function d(){const g=await du(n());g&&(C(c,J(va(g.session_id||null,g.session_last_ping||null))),s(c)?r()():a()(),i()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}var f=qe(),v=ee(f);{var m=g=>{var h=hu(),y=x(h);wt(y,{type:"warning",children:(w,p)=>{var S=_u(),A=E(ee(S),2);A.__click=[vu,n,o],k(w,S)},$$slots:{default:!0}}),k(g,h)};H(v,g=>{s(c)||g(m)})}k(e,f),se()}ve(["click"]);var mu=He('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function pu(e){var t=mu();k(e,t)}var yu=I('<strong class="svelte-1kpafo0">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1kpafo0">Partner Portal</a>',1),wu=I('<span class="svelte-1kpafo0">.</span>'),ku=I(`<strong class="svelte-1kpafo0">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1kpafo0"> <span class="ellipses svelte-1kpafo0"></span></div> <div class="loading-bar svelte-1kpafo0"><div class="loading-bar-progress svelte-1kpafo0"><div class="loading-bar-fill svelte-1kpafo0" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1kpafo0"> </div></div>`,1),bu=(e,t)=>C(t,!0),xu=I('<p class="svelte-1kpafo0"><strong class="svelte-1kpafo0">AI has finished processing.</strong> <br class="svelte-1kpafo0"> <!></p> <button class="dismiss svelte-1kpafo0">Dismiss</button>',1),Su=I('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),Eu=I('<div class="ai-indicator svelte-1kpafo0" data-testid="ai-indicator"><div class="content svelte-1kpafo0"><div class="icon svelte-1kpafo0"><!></div> <div class="svelte-1kpafo0"><!></div></div> <div class="border svelte-1kpafo0"><!></div></div>');function Tu(e,t){const n=O(t,"aiRunning",3,!1),i=O(t,"aiEnabled",3,!1),r=O(t,"message",3,""),a=O(t,"percentage",3,0),o=O(t,"aiInjectionsCount",3,0),l=o();let c=V(!1);var u=qe(),d=ee(u);{var f=v=>{var m=Eu(),g=x(m),h=x(g),y=x(h);pu(y);var w=E(h,2),p=x(w);{var S=M=>{var P=yu();k(M,P)},A=M=>{var P=qe(),D=ee(P);{var Z=B=>{var j=ku(),N=E(ee(j),2),R=x(N),q=E(R);Qe(q,20,()=>({length:3}),yt,($,oe)=>{var Ae=wu();k($,Ae)});var ae=E(N,2),Q=x(ae),re=x(Q);const te=z(()=>`${Math.max(a(),3)??""}%`);L(()=>jn(re,"width",s(te)));var we=E(Q,2),X=x(we);L(()=>K(X,`${Math.floor(a())??""}%`)),L(()=>K(R,`${r()??""} `)),k(B,j)},G=B=>{var j=xu(),N=ee(j),R=E(x(N),4);{var q=re=>{var te=Ue("No new injections where found.");k(re,te)},ae=re=>{var te=Ue();L(()=>K(te,`${o()??""} Injections where found and added to the page.`)),k(re,te)};H(R,re=>{l===o()?re(q):re(ae,!1)})}var Q=E(N,2);Q.__click=[bu,c],k(B,j)};H(D,B=>{n()?B(Z):B(G,!1)},!0)}k(M,P)};H(p,M=>{i()?M(A,!1):M(S)})}var b=E(g,2),T=x(b);{var U=M=>{var P=Su();k(M,P)};H(T,M=>{n()&&M(U)})}L(()=>ue(m,"running",n())),k(v,m)};H(d,v=>{s(c)||v(f)})}k(e,u)}ve(["click"]);async function Iu(e,t,n,i,r,a,o){try{C(t,!0),C(n,!1),i(await Gs(i(),r())),C(a,J(s(o)))}catch{C(n,!0)}finally{C(t,!1)}}var Au=I('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700">'),Pu=I('<div class="handles svelte-11aj6xq"><div class="handle svelte-11aj6xq"><!></div> <div class="handle svelte-11aj6xq"><!></div></div>'),Cu=I('<div class="loading svelte-11aj6xq">Loading...</div>'),ju=I('<div class="bubble svelte-11aj6xq"> </div> <!>',1),Mu=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),Lu=I('<div class="alert svelte-11aj6xq"><!></div>'),Nu=I('<div class="error svelte-11aj6xq"><!></div>'),Ou=I('<div class="empty svelte-11aj6xq">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Du=I('<button class="save svelte-11aj6xq"> </button>'),Ru=I('<!> <!> <div class="items svelte-11aj6xq"></div> <!>',1),qu=I("<!> <!> <!>",1),Hu=I('<div class="panel playpilot-styled-scrollbar svelte-11aj6xq"><!></div>'),Fu=I('<section class="editor playpilot-styled-scrollbar svelte-11aj6xq"><!> <header class="header svelte-11aj6xq"><div class="heading svelte-11aj6xq">Playlinks</div> <!></header> <!> <!></section>');function Bu(e,t){le(t,!0);let n=O(t,"linkInjections",15),i=O(t,"pageText",3,""),r=O(t,"loading",3,!1),a=O(t,"injectionsEnabled",7,!1),o=O(t,"aiStatus",23,()=>({})),l=O(t,"onreinitialize",3,()=>null);const c="editor-position",u="editor-height",d=JSON.parse(localStorage.getItem(c)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(u)||"0");let v=V(null),m=V(!1),g=V(!1),h=V(!1),y=V(!0),w=V(0),p=V("");const S=z(()=>_n(o().aiEnabled,!1)),A=z(()=>_n(o().aiRunning,!1)),b=z(()=>JSON.stringify(n())),T=z(()=>!s(A)&&s(y)),U=z(()=>s(p)&&s(p)!==s(b)),M=z(()=>n().filter(F=>F.title_details&&!F.removed&&!F.duplicate&&(F.manual||!F.manual&&!F.failed))),P=z(()=>Z(s(M))),D=z(()=>!r()&&Ve(()=>o().aiRunning));Tn(()=>{r()||Ve(()=>{requestAnimationFrame(()=>C(p,J(s(b)))),R()})});function Z(F){return F.sort((W,ge)=>W.failed!==ge.failed?W.failed?1:-1:W.title_details.title.localeCompare(ge.title_details.title))}function G(F,W){localStorage.setItem(F,W)}function B(F){const W=n().findIndex(ge=>ge.key===F);n(n()[W].manual=!0,!0),n(n()[W].removed=!0,!0),n([...n()])}function j(F){if(!s(v))return;const W=F.offsetTop,ge=W+F.offsetHeight,_e=s(v).scrollTop,Ee=_e+s(v).clientHeight;W>=_e&&ge<=Ee||s(v).scrollTo({top:W-s(v).clientHeight/2,behavior:"smooth"})}function N(F){const W=F.target;C(w,J(W.scrollTop))}function R(){const F={total:n().length,failed_automatic:n().filter(W=>W.failed&&!W.manual).length,failed_manual:n().filter(W=>W.failed&&W.manual).length,final_injected:s(M).length};he(fe.TotalInjectionsCount,null,F)}var q=Fu();No(F=>{var W=Au();k(F,W)});var ae=x(q);{var Q=F=>{var W=Pu(),ge=x(W),_e=x(ge);zc(_e,{get element(){return s(v)},height:f,onchange:Xe=>G(u,JSON.stringify(Xe))});var Ee=E(ge,2),Me=x(Ee);Vc(Me,{get element(){return s(v)},position:d,limit:{x:16,y:16},onchange:Xe=>G(c,JSON.stringify(Xe))}),k(F,W)};H(ae,F=>{s(v)&&!r()&&F(Q)})}var re=E(ae,2),te=x(re);an(te,F=>Se==null?void 0:Se(F));var we=E(te,2);{var X=F=>{var W=Cu();k(F,W)},$=F=>{var W=qe(),ge=ee(W);{var _e=Ee=>{var Me=ju(),Xe=ee(Me),Le=x(Xe),sn=E(Xe,2);gi(sn,{onclick:()=>C(m,!0),size:"24px","aria-label":"Add manual injection",children:(cn,Si)=>{var un=Ue("+");k(cn,un)},$$slots:{default:!0}}),L(()=>{ce(Xe,"aria-label",`${s(M).length??""} found playlinks`),K(Le,s(M).length)}),k(Ee,Me)};H(ge,Ee=>{s(T)&&Ee(_e)},!0)}k(F,W)};H(we,F=>{r()?F(X):F($,!1)})}var oe=E(re,2);{var Ae=F=>{var W=qu(),ge=ee(W);gu(ge,{get pageText(){return i()},onallow:()=>C(y,!0),ondisallow:()=>C(y,!1),get ontakeover(){return l()},onpoll:Le=>{a(Le.injectionsEnabled),o({...o(),aiEnabled:Le.aiEnabled})}});var _e=E(ge,2);{var Ee=Le=>{Tu(Le,sl(o,{get aiInjectionsCount(){return aa(n()).aiInjections.length}}))};H(_e,Le=>{s(y)&&(s(D)||!s(S))&&Le(Ee)})}var Me=E(_e,2);{var Xe=Le=>{var sn=Ru(),cn=ee(sn);{var Si=me=>{var pe=Lu(),tt=x(pe);wt(tt,{type:"warning",children:(ut,pa)=>{var Dn=Mu();k(ut,Dn)},$$slots:{default:!0}}),k(me,pe)};H(cn,me=>{a()||me(Si)})}var un=E(cn,2);{var ha=me=>{var pe=Nu(),tt=x(pe);wt(tt,{children:(ut,pa)=>{var Dn=Ue("Something went wrong, check your links below.");k(ut,Dn)},$$slots:{default:!0}}),Ce(7,pe,()=>Yt,()=>({duration:150})),k(me,pe)};H(un,me=>{s(h)&&me(ha)})}var Ei=E(un,2);Qe(Ei,21,()=>s(P),me=>me.key,(me,pe)=>{const tt=z(()=>n().findIndex(ut=>ut.key===s(pe).key));Fc(me,{onremove:()=>B(s(pe).key),onhighlight:j,get linkInjection(){return n()[s(tt)]},set linkInjection(ut){n(n()[s(tt)]=ut,!0)}})},me=>{var pe=Ou();k(me,pe)});var ga=E(Ei,2);{var ma=me=>{var pe=Du();pe.__click=[Iu,g,h,n,i,p,b];var tt=x(pe);L(()=>{pe.disabled=s(g),K(tt,s(g)?"Saving...":"Save links")}),Ce(1,pe,()=>Kt,()=>({duration:100})),k(me,pe)};H(ga,me=>{s(U)&&n().length&&s(y)&&me(ma)})}k(Le,sn)};H(Me,Le=>{s(T)&&Le(Xe)})}k(F,W)};H(oe,F=>{r()||F(Ae)})}var et=E(oe,2);{var ct=F=>{var W=Hu(),ge=x(W);cu(ge,{get pageText(){return i()},onclose:()=>C(m,!1),onsave:_e=>n().push(_e)}),L(()=>jn(W,"top",`${s(w)??""}px`)),Ce(3,W,()=>Ln,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(F,W)};H(et,F=>{s(m)&&F(ct)})}on(q,F=>C(v,F),()=>s(v)),L(()=>{ue(q,"panel-open",s(m)),ue(q,"loading",r())}),de("scroll",q,N),k(e,q),se()}ve(["click"]);var Vu=He('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function Uu(e){var t=Vu();k(e,t)}var zu=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function Wu(e,t){var n=zu(),i=x(n);i.__click=function(...l){var c;(c=t.onclick)==null||c.apply(this,l)};var r=x(i);Uu(r);var a=E(i,2);a.__click=function(...l){var c;(c=t.onclose)==null||c.apply(this,l)};var o=x(a);Xr(o),k(e,n)}ve(["click"]);var Ku=I('<img alt="" class="svelte-j7f9xl">');function Yu(e,t){var n=qe(),i=ee(n);Qe(i,17,()=>t.pixels,yt,(r,a)=>{var o=Ku();L(()=>ce(o,"src",s(a))),k(r,o)}),k(e,n)}var Zu=I('<div class="playpilot-link-injections svelte-13rmd3g" data-playpilot-link-injections=""><!> <!></div> <!>',1);function Gu(e,t){le(t,!0);let n=V(null),i=V(J([])),r=V(null),a=V(J(Kr())),o=V(!!_i()),l=V(!1),c=V(!0),u=V(!0),d=V(J([]));const f=z(()=>s(r)||{}),v=z(()=>_n(s(f).ai_injections,()=>[],!0)),m=z(()=>_n(s(f).manual_injections,()=>[],!0)),g=z(()=>na(s(i)));Tn(()=>{s(a)&&!s(c)&&y()}),Ge(()=>{if(!Js())return(async()=>(await h(),he(fe.ArticlePageView),bl("initial_test")))(),()=>wi()});async function h(){C(c,!0),s(a)&&C(l,J(await Wr()));try{const j=await Xs(),N=fi();if(C(u,!!(j!=null&&j.exclude_urls_pattern&&N.match(new RegExp(j.exclude_urls_pattern)))),s(u))return;j!=null&&j.custom_style&&b(j.custom_style||""),S((j==null?void 0:j.html_selector)||"",(j==null?void 0:j.exclude_elements_selector)||"")}catch(j){he(fe.FetchingConfigFailed),console.error("TPI Config failed to fetch",j);return}try{if(C(r,J(await Yi(s(g),{maxTries:1,runAiWhenRelevant:!0}))),C(c,!1),!s(r))return;if(_l({organizationSid:s(r).organization_sid,domainSid:s(r).domain_sid}),!s(r).ai_running||!s(r).ai_enabled){p({aiInjections:s(v),manualInjections:s(m)});return}if(!s(a))return;C(r,J(await Yi(s(g),{requireCompletedResult:!0,onpoll:j=>C(r,J(j))}))),p({aiInjections:s(v),manualInjections:s(m)})}catch(j){console.error(j),he(fe.InjectionError,null,{message:j.message})}}function y(){p(aa(s(d)))}function w(){C(a,!1),requestAnimationFrame(()=>{C(a,!0),h()})}function p(j={aiInjections:s(v),manualInjections:s(m)}){const N=Ls(s(i),j);JSON.stringify(N)!==JSON.stringify(s(d))&&C(d,J(N));const R=N.filter(q=>!q.failed);R.length&&(s(a)||he(fe.ArticleInjected,null,{manual:R.filter(q=>q.manual).length,ai:R.filter(q=>!q.manual).length}))}function S(j,N){j&&(window.PlayPilotLinkInjections.selector=j),C(n,J(At())),C(i,J(yi(s(n),N)))}function A(){C(a,!0),ml(),h()}function b(j){const N="playpilot-custom-style",R=document.getElementById(N),q=R||document.createElement("style");q.textContent=`[data-playpilot-link-injections] { ${j} }`,q.id=N,R||document.body.appendChild(q)}var T=Zu(),U=ee(T),M=x(U);{var P=j=>{Wu(j,{onclick:A,onclose:()=>{C(o,!1),gl()}})};H(M,j=>{!s(u)&&s(o)&&!s(a)&&j(P)})}var D=E(M,2);{var Z=j=>{var N=qe(),R=ee(N);cl(R,{onerror:ae=>he(fe.EditorError,null,{message:ae.message}),failed:ae=>{wt(ae,{fixed:!0,children:(Q,re)=>{var te=Ue("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");k(Q,te)},$$slots:{default:!0}})}},ae=>{var Q=z(()=>{var te;return(te=s(r))==null?void 0:te.injections_enabled}),re=z(()=>{var te,we,X,$,oe;return{aiEnabled:(te=s(r))==null?void 0:te.ai_enabled,aiRunning:((we=s(r))==null?void 0:we.ai_running)&&((X=s(r))==null?void 0:X.ai_enabled),message:($=s(r))==null?void 0:$.ai_progress_message,percentage:(oe=s(r))==null?void 0:oe.ai_progress_percentage}});Bu(ae,{get pageText(){return s(g)},get loading(){return s(c)},onreinitialize:w,get injectionsEnabled(){return s(Q)},get aiStatus(){return s(re)},get linkInjections(){return s(d)},set linkInjections(te){C(d,J(te))}})}),k(j,N)};H(D,j=>{!s(u)&&s(a)&&s(l)&&j(Z)})}var G=E(U,2);{var B=j=>{Yu(j,{get pixels(){return s(r).pixels}})};H(G,j=>{var N,R;(R=(N=s(r))==null?void 0:N.pixels)!=null&&R.length&&j(B)})}k(e,T),se()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid:null,last_successful_fetch:null,tracked_events:[],split_test_identifiers:{},app:null,initialize(e={token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid: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.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.organization_sid=e.organization_sid,this.domain_sid=e.domain_sid,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=rn(Gu,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),wi()},debug(){const e=At(),t=yi(e);console.group("PlayPilot Link Injection Debug"),console.groupCollapsed("Config"),console.table(Object.entries(this)),console.groupEnd(),console.groupCollapsed("Elements"),console.log("Parent element",e),console.log("Valid elements",t),console.groupEnd(),console.groupCollapsed("Last fetch"),console.log(this.last_successful_fetch),console.groupEnd(),console.groupCollapsed("Meta"),console.log(ki()),console.groupEnd(),console.groupCollapsed("Page text"),console.log(na(t)),console.groupEnd(),console.groupCollapsed("Tracked events"),console.log(this.tracked_events),console.groupEnd(),console.groupCollapsed("Split tests"),console.log(this.split_test_identifiers),console.groupEnd(),console.groupEnd()}};
|
|
10
|
+
`)}function Ls(e,t={aiInjections:[],manualInjections:[]}){wi();const n=Bs(t);if(!n)return[];const i=Ne(e.map(u=>u.innerText).join(" ")),r=Vs(n),a=r.filter(u=>i.includes(Ne(u.sentence))),o={};let l=-1;for(const u of a){l++;const d=e.findIndex(A=>Ne(A.innerText).includes(Ne(u.sentence))),f=e[d];if(!f)continue;const v=Ui(u.title,f,["A"]);if(!(v!=null&&v.nodeValue)||zi(v)){const A=Ui(u.title,f);if(A&&zi(A)){o[u.key]="Given text is already inside of a link.";continue}}const{injectionElement:m,linkElement:g}=Ns(u),{phrase_before:h,phrase_after:y}=u;let w=-1,p=!1;if(Ts(f.innerHTML,u.title)===1&&(w=f.innerHTML.indexOf(u.title)),w===-1&&(h||y)){const A=[h,u.title,y].filter(Boolean).join(" ");if(w=f.innerHTML.indexOf(A),w===-1){const b=As(f.innerHTML,u.title,h||"",y||"");if(b){const{leadingSpaces:T,trailingSpaces:U}=Ps(b.match);g.innerHTML=b.match.trim();const M=b.index+T,P=b.index+b.match.length-U;f.innerHTML=Ss(f.innerHTML,m.outerHTML,M,P),w=b.index,p=!0}}}if(w===-1&&(v!=null&&v.nodeValue)){const A=f.innerHTML.indexOf(v.nodeValue),b=f.innerHTML.indexOf(u.sentence),T=ws(a.slice(0,l+1),u,["title","sentence"])-1,U=Cs(v.nodeValue,f,T);w=Math.max(A,U,b,0)}w!==-1&&(p||(f.innerHTML=xs(f.innerHTML,u.title,m.outerHTML,w)))}Ds(r),Os();const c=Us(n);return c.length&&qs(e,c),n.filter(u=>u.title_details).map((u,d)=>{const f=u.duplicate??(!u.manual&&zs(u,d,n)),v=document.querySelector(`[${_t}="${u.key}"]`),m=Nn(u)&&!u.inactive&&!u.after_article&&!v,g=!!e.find(y=>Ne(y.innerText).includes(Ne(u.sentence))),h=m?o[u.key]||(g?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...u,inactive:u.inactive??!1,duplicate:f,failed:m,failed_message:h}})}function Ns(e){const t=document.createElement("span");t.dataset.playpilotInjectionKey=e.key;const n=document.createElement("a");return n.innerText=e.title,n.href=e.playpilot_url,n.target="_blank",n.rel="noopener nofollow noreferrer",t.insertAdjacentElement("beforeend",n),{injectionElement:t,linkElement:n}}function Os(){const e=Array.from(document.querySelectorAll(`${Ht} a`)),t=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];e.forEach(n=>{t.forEach(i=>{getComputedStyle(n).getPropertyValue(i)&&(n.dataset.usedCssVariables=`${n.dataset.usedCssVariables||""} ${i}`)})})}function Ds(e){window.addEventListener("click",n=>{if(ta(n))return;let i=n.target;if(!i||(i.hasAttribute(_t)||(i=i.closest(Ht)),!i))return;const r=i.getAttribute(_t);if(!r)return;const a=e.find(o=>r===o.key);a&&(n.preventDefault(),Ms(()=>{wn(!1),ia(n,a)},!mi.current&&window.innerWidth>=600&&!window.matchMedia("(pointer: coarse)").matches))}),window.addEventListener("mousemove",n=>{if(!ht)return;const i=n.target;i.hasAttribute("data-playpilot-title-popover")||i.closest("[data-playpilot-title-popover]")||i.hasAttribute(_t)||i.closest(Ht)||wn()}),Array.from(document.querySelectorAll(Ht)).forEach(n=>{const i=n.dataset.playpilotInjectionKey,r=e.find(a=>i===a.key);r&&(n.addEventListener("mouseenter",a=>{ht||Rs(a,r)}),n.addEventListener("mouseleave",()=>yn=null))})}function ia(e,t){ta(e)||Bt||(e.preventDefault(),Bt=rn(rs,{target:ca(),props:{title:t.title_details,onclose:ra}}))}function ra(e=!0){Bt&&(Cn(Bt,{outro:e}),Bt=null)}function Rs(e,t){if(window.matchMedia("(pointer: coarse)").matches)return;ht&&wn();const n=e.currentTarget;yn=n,setTimeout(()=>{yn===n&&(ht=rn(ss,{target:ca(),props:{event:e,title:t.title_details}}))},100)}function wn(e=!0){ht&&(Cn(ht,{outro:e}),yn=null,ht=null)}function qs(e,t){var o,l;if(Ft||!t.length)return;const n=document.createElement("div"),i=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,r=(i?document.querySelector(i):null)||e[e.length-1],a=((l=window.PlayPilotLinkInjections)==null?void 0:l.after_article_insert_position)||"afterend";n.dataset.playpilotAfterArticlePlaylinks="true",r.insertAdjacentElement(a,n),Ft=rn(ys,{target:n,props:{linkInjections:t,onclickmodal:(c,u)=>ia(c,u)}})}function Hs(){var e;Ft&&(Cn(Ft),(e=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||e.remove(),Ft=null)}function wi(){document.querySelectorAll(Ht).forEach(t=>Fs(t.getAttribute(_t)||"")),Hs(),ra(!1),wn(!1)}function Fs(e){var i;const t=document.querySelector(`[${_t}="${e}"]`);if(!t)return;const n=(i=t.querySelector("a"))==null?void 0:i.innerHTML;t.outerHTML=n||""}function Bs({aiInjections:e,manualInjections:t}){return[...t.map(n=>({...n,manual:!0})),...e]}function aa(e){return{aiInjections:e.filter(t=>!t.manual),manualInjections:e.filter(t=>t.manual)}}function oa(e){return!e.inactive&&!e.removed&&!e.duplicate&&!!e.title_details&&Nn(e)}function Nn(e){return e.in_text||e.in_text===void 0?!0:!!e.after_article}function Vs(e){return la(e).filter(t=>t.in_text!==!1&&oa(t))}function Us(e){return la(e).filter(t=>t.after_article===!0&&oa(t))}function la(e){return e.filter(t=>t.removed||t.inactive?!1:t.manual&&!t.removed&&!t.inactive?!0:!e.some(n=>n.manual&&(n.removed||n.inactive)&&sa(n,t)))}function zs(e,t,n){return n.some((i,r)=>t!==r&&i.manual&&sa(i,e))}function sa(e,t){return e.title===t.title&&Ne(e.sentence)===Ne(t.sentence)}function ca(){return document.querySelector("[data-playpilot-link-injections]")||document.body}function ki(){const e=At();return{content_heading:Ws(e),content_modified_time:Ks(e),content_published_time:Ys(e)}}function Ws(e){const t=e.querySelector("h1")||document.querySelector("h1");return(t==null?void 0:t.innerText.trim())||null}function Ks(e){const t=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="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?bi(n):null}function Ys(e){const t=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="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?bi(n):null}function bi(e){try{return new Date(e).toISOString()}catch{return null}}let Bn=null;async function ln(e,{url:t=fi(),hash:n=yl(e||""),params:i={}}={}){const r=new Headers({"Content-Type":"application/json"}),a=On(),o=Kr()?await Wr():!1,l=Zr();if(!a)throw new Error("No token was provided");i.metadata=ki(),i.run_ai&&(i.hash=n,i.page_text=e);const c=await fetch(Mn+`/external-pages/?api-token=${a}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${l}`,{headers:r,method:"POST",body:JSON.stringify({url:t,...i})});if(!c.ok)throw c;const u=await c.json();return window.PlayPilotLinkInjections.last_successful_fetch=u,u}async function Yi(e,{requireCompletedResult:t=!1,runAiWhenRelevant:n=!1,pollInterval:i=3e3,maxTries:r=600,onpoll:a=()=>null}={}){let o=0;Bn&&clearTimeout(Bn);const l=async(c,u)=>{let d;try{if(d=await ln(e),n&&(d=await Zs(e,d)),t&&d.ai_enabled&&d.ai_running)throw new Error;d.manual_injections=Zi(d.manual_injections||[]),d.ai_injections=Zi(d.ai_injections||[]),c(d);return}catch{if(o++,o>=r){r>1&&console.error("Max poll limit exceeded. Please return later."),c();return}d&&a(d),Bn=setTimeout(()=>l(c),i)}};return new Promise(l)}async function Zs(e,t){if(!e||!t.ai_enabled||t.ai_running)return t;const n=ki().content_modified_time,i=t.content_modified_time?bi(t.content_modified_time):null,r=n&&i===n;return t.ai_last_run&&r?t:await ln(e,{params:{run_ai:!0}})}async function Gs(e,t){var o;const n=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,r=e.filter(l=>l.manual).map(l=>({sid:l.sid,title:l.title,sentence:l.sentence,phrase_before:l.phrase_before,phrase_after:l.phrase_after,playpilot_url:l.playpilot_url,after_article:!!l.after_article,after_article_style:l.after_article_style||null,in_text:l.in_text??!0,inactive:!!l.inactive,removed:!!l.removed}));if(!await ln(t,{params:{private_token:_i(),manual_injections:r,content_text_selector:n}}))throw new Error("saveLinkInjections response was faulty");return e}async function Xs(){const e=new Headers({"Content-Type":"application/json"}),t=On();if(!t)throw new Error("No token was provided");const n=await fetch(Mn+`/domains/config?api-token=${t}`,{headers:e});if(!n.ok)throw n;try{return await n.json()||null}catch{return null}}function Zi(e){return e.map(t=>({...t,key:ua(t.sid)}))}function ua(e){return e+"-"+Yr()}function On(){var e;return(e=window.PlayPilotLinkInjections)==null?void 0:e.token}function Js(){const e=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(e)}var Qs=He('<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 $s(e,t){const n=O(t,"expanded",3,!1);var i=Qs();N(()=>ue(i,"expanded",n())),k(e,i)}var ec=He('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function tc(e){var t=ec();k(e,t)}function nc(e,t,n){t(!t()),n()(t())}var ic=I('<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 Qn(e,t){le(t,!0);let n=O(t,"active",15),i=O(t,"fullwidth",3,!1),r=O(t,"label",3,""),a=O(t,"onclick",3,()=>null);var o=ic();o.__click=[nc,n,a];var l=x(o),c=x(l);Nt(c,()=>t.children),N(()=>{ce(o,"aria-label",`Toggle ${r()??""} ${(n()?"off":"on")??""}`),ue(o,"active",n()),ue(o,"fullwidth",i())}),k(e,o),se()}ve(["click"]);var rc=I('<input type="text" autocomplete="off" class="svelte-1vrer3i">');function xi(e,t){let n=O(t,"value",15),i=O(t,"label",3,""),r=O(t,"name",3,""),a=O(t,"readonly",3,!1),o=O(t,"oninput",3,()=>null);var l=rc();l.__input=function(...c){var u;(u=o())==null||u.apply(this,c)},N(()=>{ce(l,"name",r()),ce(l,"aria-label",i()),ce(l,"placeholder",i()),l.readOnly=a()}),Qo(l,n),k(e,l)}ve(["input"]);var ac=He('<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>'),oc=He('<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>'),lc=He('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Gi(e,t){const n=O(t,"align",3,"bottom");var i=lc(),r=x(i);{var a=l=>{var c=ac();k(l,c)},o=l=>{var c=qe(),u=ee(c);{var d=f=>{var v=oc();k(f,v)};H(u,f=>{n()==="center"&&f(d)},!0)}k(l,c)};H(r,l=>{n()==="bottom"?l(a):l(o,!1)})}k(e,i)}var sc=I("<div><!></div>");function wt(e,t){le(t,!0);const n=O(t,"type",3,"error"),i=O(t,"fixed",3,!1);var r=sc(),a=x(r);Nt(a,()=>t.children),N(()=>{Ko(r,`alert ${n()??""} svelte-df5n87`),ue(r,"fixed",i())}),k(e,r),se()}var cc=I("<!> In-text Playlink",1),uc=I("<!> Bottom Playlink",1),dc=I('<div class="alert svelte-1shw34x"><!></div>'),fc=(e,t)=>t().after_article_style="playlinks",vc=(e,t)=>t().after_article_style="modal_button",_c=I('<div><div class="label svelte-1shw34x">Bottom playlinks style</div> <div class="group svelte-1shw34x" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text" class="svelte-1shw34x">Playlinks sentence</button> <button role="option" id="playlinks-after-article" class="svelte-1shw34x">Modal button</button> <div class="active-marker svelte-1shw34x"></div></div></div>'),hc=I('<div class="switches svelte-1shw34x"><!> <!></div> <!> <!>',1);function gc(e,t){le(t,!0);const n=O(t,"linkInjection",7),i=z(()=>n().after_article_style==="modal_button");var r=hc(),a=ee(r),o=x(a),l=z(()=>n().in_text??!0);Qn(o,{fullwidth:!0,get active(){return s(l)},onclick:g=>{n().in_text=g,n().manual=!0},label:"In-text Playlink",children:(g,h)=>{var y=cc(),w=ee(y);Gi(w,{align:"center"}),k(g,y)},$$slots:{default:!0}});var c=E(o,2),u=z(()=>n().after_article??!1);Qn(c,{fullwidth:!0,get active(){return s(u)},onclick:g=>{n().after_article=g,n().manual=!0},label:"Bottom Playlink",children:(g,h)=>{var y=uc(),w=ee(y);Gi(w,{align:"bottom"}),k(g,y)},$$slots:{default:!0}});var d=E(a,2);{var f=g=>{var h=dc(),y=x(h);wt(y,{type:"warning",children:(w,p)=>{var S=Ue("At least one layout option must be selected for the playlink to be visible.");k(w,S)},$$slots:{default:!0}}),Ce(3,h,()=>Yt,()=>({duration:200})),k(g,h)};H(d,g=>{Nn(n())||g(f)})}var v=E(d,2);{var m=g=>{var h=_c(),y=E(x(h),2),w=x(y);w.__click=[fc,n];var p=E(w,2);p.__click=[vc,n];var S=E(p,2);N(()=>{ce(y,"aria-activedescendant",`playlinks-${(s(i)?"after-article":"in-text")??""}`),ce(w,"aria-selected",!s(i)||null),ue(w,"active",!s(i)),ce(p,"aria-selected",s(i)||null),ue(p,"active",s(i)),ue(S,"right",s(i))}),Ce(3,h,()=>Yt,()=>({duration:100})),k(g,h)};H(v,g=>{n().after_article&&g(m)})}k(e,r),se()}ve(["click"]);var mc=He('<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 pc(e){var t=mc();k(e,t)}var yc=(e,t)=>C(t,!s(t)),wc=I('<div class="content svelte-zpsd2z"><!></div>'),kc=I('<div class="context-menu svelte-zpsd2z"><button class="svelte-zpsd2z"><!></button> <!></div>');function bc(e,t){le(t,!0);let n=V(!1),i=V(null);function r(d){var v;const f=d.target;f===s(i)||(v=s(i))!=null&&v.contains(f)||C(n,!1)}var a=kc();de("click",be,r);var o=x(a);o.__click=[yc,n];var l=x(o);pc(l),on(o,d=>C(i,d),()=>s(i));var c=E(o,2);{var u=d=>{var f=wc(),v=x(f);Nt(v,()=>t.children),Ce(1,f,()=>Ln,()=>({duration:150,y:5})),k(d,f)};H(c,d=>{s(n)&&d(u)})}N(()=>{ce(o,"aria-label",t.ariaLabel),ce(o,"aria-expanded",s(n))}),k(e,a),se()}ve(["click"]);function xc(e,t,n,i){var r,a;s(t)&&(he(fe.ManualReport,n.linkInjection.title_details,{report_reason:s(t),sid:n.linkInjection.sid,title:n.linkInjection.title,sentence:n.linkInjection.sentence,failed:(r=n.linkInjection.failed)==null?void 0:r.toString(),failed_message:n.linkInjection.failed_message,manual:(a=n.linkInjection.manual)==null?void 0:a.toString()}),C(i,!0),setTimeout(n.onclose,3e3))}var Sc=(e,t,n)=>C(t,J(n())),Ec=I('<option class="svelte-o5qkco"> </option>'),Tc=I('<div class="sent svelte-o5qkco">Report has been sent, thank you! Closing window...</div>'),Ic=I('<button class="submit svelte-o5qkco">Send report</button>'),Ac=I('<div class="form svelte-o5qkco"><div class="heading svelte-o5qkco">Report issue</div> <div class="info svelte-o5qkco"><div><strong class="svelte-o5qkco">Title</strong> </div> <div><strong class="svelte-o5qkco">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-o5qkco"><option class="svelte-o5qkco">Select an issue...</option><!></select> <div><!></div></div>');function Pc(e,t){le(t,!0);const n=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let i=V(""),r=V(!1);Jr(e,{get onclose(){return t.onclose},children:(a,o)=>{var l=Ac(),c=x(l);an(c,(b,T)=>Se==null?void 0:Se(b,T),()=>2);var u=E(c,2),d=x(u),f=E(x(d)),v=E(d,2),m=E(x(v));N(()=>K(m,`:
|
|
11
|
+
${ea(t.linkInjection.sentence,t.linkInjection.title,100)??""}`));var g=E(u,4),h=x(g);h.value=((h.__value="")==null,"");var y=E(h);Qe(y,17,()=>n,yt,(b,T)=>{let U=()=>s(T).value,M=()=>s(T).label;var P=Ec(),D={};P.__click=[Sc,i,U];var Z=x(P);N(()=>{D!==(D=U())&&(P.value=(P.__value=U())==null?"":U()),K(Z,M())}),k(b,P)});var w=E(g,2),p=x(w);{var S=b=>{var T=Tc();Ce(1,T,()=>Kt,()=>({duration:200})),k(b,T)},A=b=>{var T=Ic();T.__click=[xc,i,t,r],N(()=>T.disabled=!s(i)),k(b,T)};H(p,b=>{s(r)?b(S):b(A,!1)})}N(()=>K(f,`: ${t.linkInjection.title??""}`)),el(g,()=>s(i),b=>C(i,b)),k(a,l)},$$slots:{default:!0}}),se()}ve(["click"]);function Cc(e,t,n){requestAnimationFrame(()=>t());const i=e.target;if(["BUTTON","INPUT"].includes(i.nodeName)||i.closest("button")||i.closest("input"))return;const r=n()[0];r&&r.scrollIntoView({behavior:"smooth"})}function jc(e,t){const n=rn(Pc,{target:document.body,props:{linkInjection:t(),onclose:()=>Cn(n)}})}var Mc=(e,t)=>C(t,!s(t)),Lc=I('<button class="expand-sentence svelte-lo6h85"> </button>'),Nc=I('<button class="context-menu-action svelte-lo6h85">Remove</button> <button class="context-menu-action svelte-lo6h85">Report issue</button>',1),Oc=(e,t)=>C(t,!s(t)),Dc=I('<div class="warning svelte-lo6h85" aria-label="Invalid playlink settings"><!></div>'),Rc=I('<div class="actions svelte-lo6h85"><button class="expand svelte-lo6h85" aria-label="Expand"><!></button> <!> <!></div>'),qc=I('<div class="expanded svelte-lo6h85"><div class="label svelte-lo6h85">Link URL</div> <!> <div class="label offset svelte-lo6h85">Layout options</div> <div class="type-select svelte-lo6h85"><!></div></div>'),Hc=I('<div class="item svelte-lo6h85"><div class="header svelte-lo6h85"><img class="poster svelte-lo6h85" alt="" width="32" height="48"> <div class="info svelte-lo6h85"><div class="title svelte-lo6h85"> </div> <div class="sentence svelte-lo6h85"><!> <!></div></div> <div class="context-menu svelte-lo6h85"><!></div></div> <div class="content svelte-lo6h85"><!> <!></div></div>');function Fc(e,t){le(t,!0);const n=O(t,"linkInjection",15),i=O(t,"onremove",3,()=>null),r=O(t,"onhighlight",3,()=>null),a=z(()=>n()||{}),o=z(()=>s(a).key),l=z(()=>s(a).sentence),c=z(()=>s(a).title_details),u=z(()=>s(a).failed),d=z(()=>s(a).failed_message),f=z(()=>s(a).inactive),v=z(()=>s(c)),m=z(()=>ea(n().sentence,n().title,60));let g=V(!1),h=V(!1),y=V(!1),w=V(null);Ge(()=>{s(u)&&he(fe.InjectionFailed,s(v),{phrase:n().title,sentence:s(l)})});function p(X=!0){A().forEach(oe=>{oe.classList.toggle("playpilot-injection-highlight",X)})}function S(X){let $=X.target,oe=$==null?void 0:$.dataset.playpilotInjectionKey;$&&!oe&&($=$.closest(`[data-playpilot-injection-key="${s(o)}"]`),oe=$==null?void 0:$.dataset.playpilotInjectionKey),C(y,oe===s(o)),s(w)&&s(y)&&r()(s(w))}function A(){const X=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${s(o)}"]`));return X.length?X:yi(At()).filter($=>Ne($.innerText).includes(Ne(n().sentence)))||[]}var b=Hc();de("mouseover",be,S),b.__click=[Cc,p,A];var T=x(b),U=x(T);N(()=>ce(U,"src",Zt(s(v).standing_poster)));var M=E(U,2),P=x(M),D=x(P),Z=E(P,2),G=x(Z);Fo(G,()=>(s(h)?s(l):s(m)).replace(n().title,`<em>${n().title}</em>`));var B=E(G,2);{var j=X=>{var $=Lc();$.__click=[Mc,h];var oe=x($);N(()=>K(oe,s(h)?"Less":"More")),k(X,$)};H(B,X=>{s(m).length<s(l).length&&X(j)})}var L=E(M,2),R=x(L);bc(R,{ariaLabel:"More options",children:(X,$)=>{var oe=Nc(),Ae=ee(oe);Ae.__click=function(...ct){var F;(F=i())==null||F.apply(this,ct)};var et=E(Ae,2);et.__click=[jc,n],k(X,oe)},$$slots:{default:!0}});var q=E(T,2),ae=x(q);{var Q=X=>{wt(X,{children:($,oe)=>{var Ae=Ue();N(()=>K(Ae,s(d))),k($,Ae)},$$slots:{default:!0}})},re=X=>{var $=Rc(),oe=x($);oe.__click=[Oc,g];var Ae=x(oe);$s(Ae,{get expanded(){return s(g)}});var et=E(oe,2);{var ct=_e=>{var Ee=Dc(),Me=x(Ee);tc(Me),Ce(3,Ee,()=>Kt,()=>({duration:100})),k(_e,Ee)};H(et,_e=>{Nn(n())||_e(ct)})}var F=E(et,2),W=z(()=>s(f)?"Inactive":"Visible"),ge=z(()=>!n().inactive);Qn(F,{get label(){return s(W)},get active(){return s(ge)},onclick:_e=>{n(n().inactive=!_e,!0),n(n().manual=!0,!0)},children:(_e,Ee)=>{var Me=Ue();N(()=>K(Me,s(f)?"Inactive":"Visible")),k(_e,Me)},$$slots:{default:!0}}),N(()=>ce(oe,"aria-expanded",s(g))),k(X,$)};H(ae,X=>{s(u)?X(Q):X(re,!1)})}var te=E(ae,2);{var we=X=>{var $=qc(),oe=E(x($),2);xi(oe,{oninput:()=>n(n().manual=!0,!0),label:"Playlink URL",get value(){return n().playpilot_url},set value(ct){n(n().playpilot_url=ct,!0)}});var Ae=E(oe,4),et=x(Ae);gc(et,{get linkInjection(){return n()}}),Ce(3,$,()=>Yt,()=>({duration:100})),k(X,$)};H(te,X=>{s(g)&&X(we)})}on(b,X=>C(w,X),()=>s(w)),N(()=>{ue(b,"highlighted",s(y)),ue(b,"inactive",s(f)),K(D,s(v).title)}),de("mouseenter",b,()=>p(!0)),de("mouseleave",b,()=>p(!1)),de("error",U,({target:X})=>X.src=Vr),Ce(6,b,()=>Yt,()=>({duration:200})),k(e,b),se()}ve(["click"]);var Bc=I('<button class="drag-handle svelte-19mcc5g" aria-label="Move editor"></button>');function Vc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"position",23,()=>({x:0,y:0})),r=O(t,"limit",19,()=>({x:0,y:0})),a=O(t,"onchange",3,()=>null),o=!1,l={x:0,y:0},c=i();Ge(()=>{u(i().x,i().y)});function u(h,y){const w=window.innerWidth,p=window.innerHeight,S=n().clientWidth,A=n().clientHeight;h=Math.min(Math.max(h,r().x),w-S-r().x),y=Math.min(Math.max(y,r().y),p-A-r().y),n().style.right=h+"px",n().style.bottom=Math.max(y,r().y)+"px",i({x:h,y}),a()(i())}function d(h){var y,w;return{x:h.pageX||((y=h.touches)==null?void 0:y[0].pageX)||0,y:h.pageY||((w=h.touches)==null?void 0:w[0].pageY)||0}}function f(h){o=!0,l=d(h),c=i()}function v(h){if(!o)return;const y=d(h),w=y.x-l.x,p=y.y-l.y,S=c.x-w,A=c.y-p;u(S,A)}function m(){o&&(o=!1)}var g=Bc();de("mousemove",be,v),de("touchmove",be,v,void 0,!0),de("mouseup",be,m),de("touchend",be,m),de("resize",be,()=>u(i().x,i().y)),g.__mousedown=f,g.__touchstart=f,k(e,g),se()}ve(["mousedown","touchstart"]);var Uc=I('<button class="resize-handle svelte-sxkuxk" aria-label="Move editor"></button>');function zc(e,t){le(t,!0);let n=O(t,"element",7),i=O(t,"height",7,200),r=O(t,"onchange",3,()=>null);const a=16;let o=!1,l=0,c=i();Ge(()=>{i()&&u(i())});function u(h){const y=window.getComputedStyle(n()).minHeight||"0",w=Math.max(parseInt(y),Math.min(h,m()));n().style.height=`${w}px`,i(w),r()(w)}function d(h){var y,w;o=!0,l=h.pageY||((w=(y=h.touches)==null?void 0:y[0])==null?void 0:w.pageY)||0,c=n().clientHeight}function f(h){var S,A;if(!o)return;const y=h.pageY||((A=(S=h.touches)==null?void 0:S[0])==null?void 0:A.pageY)||0,w=l-y,p=c+w;u(p)}function v(){o=!1}function m(){const h=window.innerHeight-n().getBoundingClientRect().bottom;return Math.max(window.innerHeight-a*2-h,0)}var g=Uc();de("mousemove",be,f),de("touchmove",be,f,void 0,!0),de("mouseup",be,v),de("touchend",be,v),de("resize",be,()=>{i()&&u(i())}),g.__mousedown=d,g.__touchstart=d,k(e,g),se()}ve(["mousedown","touchstart"]);var Wc=He('<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 Kc(e){var t=Wc();k(e,t)}async function Yc(e){const t=new Headers({"Content-Type":"application/json"}),n=On();if(!n)throw new Error("No token was provided");const i=await fetch(Mn+`/search/titles/?api-token=${n}&query=${e}`,{headers:t});if(!i.ok)throw i;return await i.json()}var Zc=He('<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 Gc(e){var t=Zc();k(e,t)}var Xc=I("<div> </div>"),Jc=e=>e.stopImmediatePropagation(),Qc=I('<button class="item svelte-rjq94e"><img class="poster svelte-rjq94e" alt="" width="28" height="42"> <div class="content"><div class="name svelte-rjq94e"> </div> <div class="meta svelte-rjq94e"><div class="imdb svelte-rjq94e"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-rjq94e"><!></a></button>');function Xi(e,t){le(t,!0);const n=O(t,"hoverable",3,!0),i=O(t,"onclick",3,()=>null);var r=Qc();r.__click=function(...b){var T;(T=i())==null||T.apply(this,b)};var a=x(r);N(()=>ce(a,"src",Zt(t.title.standing_poster)));var o=E(a,2),l=x(o),c=x(l),u=E(l,2),d=x(u),f=x(d);Qr(f);var v=E(f),m=E(d,2),g=x(m),h=E(m,2),y=x(h),w=E(h,2);{var p=b=>{var T=Xc(),U=x(T);N(()=>K(U,`${t.title.length??""} min`)),k(b,T)};H(w,b=>{t.title.length&&b(p)})}var S=E(o,2);S.__click=[Jc];var A=x(S);Gc(A),N(()=>{ue(r,"hoverable",n()),K(c,t.title.title),K(v,` ${t.title.imdb_score??""}`),K(g,t.title.year),K(y,t.title.type),ce(S,"href",`${Br}/${t.title.type??""}/${t.title.slug??""}`)}),de("error",a,({target:b})=>b.src=Vr),k(e,r),se()}ve(["click"]);var $c=I('<em class="empty svelte-1olb8n0">No results found</em>'),eu=I('<div class="results svelte-1olb8n0" data-testid="search-results"></div>'),tu=I('<div class="selected svelte-1olb8n0"><!></div>'),nu=I('<div class="search svelte-1olb8n0"><!> <!> <!></div>');function iu(e,t){le(t,!0);let n=O(t,"onselect",3,()=>null),i=O(t,"query",15),r=V(J([])),a=V(null),o=V(!1);Tn(()=>{i()&&l(i())});async function l(h){C(o,!0);try{C(r,J(await Yc(h)))}finally{C(o,!1)}}function c(h){i(h.title),C(a,J(h)),n()(h)}var u=nu(),d=x(u);xi(d,{oninput:()=>C(a,null),name:"search",label:"Search...",get value(){return i()},set value(h){i(h)}});var f=E(d,2);{var v=h=>{var y=eu();Qe(y,21,()=>s(r),w=>w.sid,(w,p)=>{Xi(w,{get title(){return s(p)},onclick:()=>c(s(p))})},w=>{var p=qe(),S=ee(p);{var A=b=>{var T=$c();k(b,T)};H(S,b=>{s(o)||b(A)})}k(w,p)}),k(h,y)};H(f,h=>{i()&&!s(a)&&h(v)})}var m=E(f,2);{var g=h=>{var y=tu(),w=x(y);Xi(w,{get title(){return s(a)},hoverable:!1}),k(h,y)};H(m,h=>{s(a)&&h(g)})}k(e,u),se()}function ru(e,t=e.anchorNode){if(!e.anchorNode||!t)return{start:-1,end:-1};const n=e.toString().trim(),i=e.toString().search(/\S/);if(e.anchorNode===t&&t.nodeType===Node.TEXT_NODE){const u=Math.min(e.anchorOffset,e.focusOffset)+i;return{start:u,end:u+n.length}}const r=e.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset);const l=a.toString().length+i,c=l+n.length;return{start:l,end:c}}function au(e,t,n,i,r,a,o,l){if(!s(t)||!s(n))return;const c=s(n).type==="movie"?"movie":"show",u=Br+`/${c}/${s(n).slug}`,d={sid:s(n).sid,title:s(t),sentence:s(i),phrase_before:s(r),phrase_after:s(a),playpilot_url:u,key:ua(s(n).sid),title_details:s(n),manual:!0};o.onsave(d),l()()}var ou=I('<div class="error svelte-1i8p6op"><!></div>'),lu=I('<label for="text" class="svelte-1i8p6op">Paired title</label> <!>',1),su=I('<section class="layout svelte-1i8p6op"><div class="header svelte-1i8p6op"><!> <div class="heading svelte-1i8p6op">Add Playlink manually</div></div> <p class="svelte-1i8p6op">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-1i8p6op">Selected text</label> <!> <!> <!> <button class="save svelte-1i8p6op">Add playlink</button></section>');function cu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onclose",3,()=>null);let r=V(""),a=V(""),o=V(null),l=V(""),c=V(""),u=V(""),d=V("");Ge(f);function f(){const P=window.getSelection();if(!(P!=null&&P.anchorNode)||P.anchorNode.parentElement&&!At().contains(P.anchorNode.parentElement))return;const D=P.toString().trim();if(!D)return;C(u,""),C(r,J(D));const Z=P.getRangeAt(0).cloneContents();if(Array.from(Z.childNodes).filter(Q=>{var re;return(re=Q.textContent)==null?void 0:re.trim()}).find(Q=>{var re;return Q.nodeName==="A"||((re=Q.querySelector)==null?void 0:re.call(Q,"a"))})){C(u,"Selection is or contains a link. Injections can not be created around already existing links.");return}C(d,J(s(r)));const{node:B,sentence:j}=v(P,D);if(!B)return;C(a,J(j));const{start:L,end:R}=ru(P,B);(Q=>(C(c,J(Q.before)),C(l,J(Q.after))))(Es(B,L,R)),j.includes(s(c))||C(c,""),j.includes(s(l))||C(l,"");const q=P.getRangeAt(0).commonAncestorContainer.textContent,ae=Ne(n());(!q||!ae.includes(Ne(q)))&&C(u,"Selection was not inside of given content")}function v(P,D){const Z=P.getRangeAt(0),G=At();let B=Z.startContainer;for(;(B.textContent||"").length<=D.length*3&&B.parentNode&&B.parentNode.textContent!==G.textContent;)B=B.parentNode;if(!B||!B.textContent)return{node:null,sentence:""};const j=B.textContent,L=m(B,Z.startContainer,Z.startOffset),R=m(B,Z.endContainer,Z.endOffset),q=j.slice(0,L).lastIndexOf("."),ae=j.slice(R).match(/[.!?]/),Q=ae?R+ae.index:j.length,re=q===-1?0:q+1,te=Q,we=j.slice(re,te+1).trim();return{node:B,sentence:we}}function m(P,D,Z){let G=0;const B=P,j=L=>{var R;if(L===D)return G+=Z,!0;L.nodeType===Node.TEXT_NODE&&(G+=((R=L.textContent)==null?void 0:R.length)||0);for(let q=L.firstChild;q;q=q.nextSibling)if(j(q))return!0;return!1};return j(B),G}function g(P){var D,Z;C(o,J(P)),(Z=(D=window.getSelection())==null?void 0:D.removeAllRanges)==null||Z.call(D)}var h=su();de("mouseup",be,f);var y=x(h),w=x(y);gi(w,{get onclick(){return i()},size:"24px",children:(P,D)=>{Kc(P)},$$slots:{default:!0}});var p=E(w,2);an(p,(P,D)=>Se==null?void 0:Se(P,D),()=>2);var S=E(y,6);xi(S,{get value(){return s(r)},label:"Select text on the page",name:"selected-text",readonly:!0});var A=E(S,2);{var b=P=>{var D=ou(),Z=x(D);wt(Z,{children:(G,B)=>{var j=Ue();N(()=>K(j,s(u))),k(G,j)},$$slots:{default:!0}}),k(P,D)};H(A,P=>{s(u)&&P(b)})}var T=E(A,2);{var U=P=>{var D=lu(),Z=E(ee(D),2);Or(Z,()=>s(a)+s(r),G=>{iu(G,{onselect:g,get query(){return s(d)},set query(B){C(d,J(B))}})}),k(P,D)};H(T,P=>{s(u)||P(U)})}var M=E(T,2);M.__click=[au,r,o,a,c,l,t,i],N(()=>M.disabled=!s(r)||!s(o)),k(e,h),se()}ve(["click"]);const $n="PlayPilotEditorialSessionId",da=5e3,uu=da*2;async function du(e){const{ai_enabled:t,injections_enabled:n,ai_last_run:i,session_id:r,session_last_ping:a}=await ln(e),o=va(r||null,a||null),l={ai_enabled:t,ai_last_run:i,injections_enabled:n,session_id:r,session_last_ping:a};return o?await fa(e):l}async function fa(e){const t=_a(),n=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:n.toString()},{ai_enabled:r,injections_enabled:a,ai_last_run:o}=await ln(e,{params:i});return{ai_enabled:r,ai_last_run:o,injections_enabled:a,...i}}function va(e,t){if(!e||!t)return!0;const n=Date.now(),i=new Date(t),r=_a();return n-i.getTime()>uu?!0:r===e}function _a(){return sessionStorage.getItem($n)||fu()}function fu(){const e=sessionStorage.getItem($n)||Yr();return sessionStorage.setItem($n,e),e}function vu(e,t,n){fa(t()),n()()}var _u=I('<p class="svelte-2m2urs"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-2m2urs">Take over editing</button>',1),hu=I('<div class="alert svelte-2m2urs"><!></div>');function gu(e,t){le(t,!0);const n=O(t,"pageText",3,""),i=O(t,"onpoll",3,()=>null),r=O(t,"onallow",3,()=>null),a=O(t,"ondisallow",3,()=>null),o=O(t,"ontakeover",3,()=>null);let l=null,c=V(!0);Ge(()=>(u(),()=>{l&&clearInterval(l)}));function u(){d(),l=setInterval(d,da)}async function d(){const g=await du(n());g&&(C(c,J(va(g.session_id||null,g.session_last_ping||null))),s(c)?r()():a()(),i()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}var f=qe(),v=ee(f);{var m=g=>{var h=hu(),y=x(h);wt(y,{type:"warning",children:(w,p)=>{var S=_u(),A=E(ee(S),2);A.__click=[vu,n,o],k(w,S)},$$slots:{default:!0}}),k(g,h)};H(v,g=>{s(c)||g(m)})}k(e,f),se()}ve(["click"]);var mu=He('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function pu(e){var t=mu();k(e,t)}var yu=I('<strong class="svelte-1kpafo0">AI processing is disabled.</strong> Enable AI from the <a href="https://partner.playpilot.net" class="svelte-1kpafo0">Partner Portal</a>',1),wu=I('<span class="svelte-1kpafo0">.</span>'),ku=I(`<strong class="svelte-1kpafo0">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1kpafo0"> <span class="ellipses svelte-1kpafo0"></span></div> <div class="loading-bar svelte-1kpafo0"><div class="loading-bar-progress svelte-1kpafo0"><div class="loading-bar-fill svelte-1kpafo0" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1kpafo0"> </div></div>`,1),bu=(e,t)=>C(t,!0),xu=I('<p class="svelte-1kpafo0"><strong class="svelte-1kpafo0">AI has finished processing.</strong> <br class="svelte-1kpafo0"> <!></p> <button class="dismiss svelte-1kpafo0">Dismiss</button>',1),Su=I('<div class="animator svelte-1kpafo0" data-test-id="animator"></div>'),Eu=I('<div class="ai-indicator svelte-1kpafo0" data-testid="ai-indicator"><div class="content svelte-1kpafo0"><div class="icon svelte-1kpafo0"><!></div> <div class="svelte-1kpafo0"><!></div></div> <div class="border svelte-1kpafo0"><!></div></div>');function Tu(e,t){const n=O(t,"aiRunning",3,!1),i=O(t,"aiEnabled",3,!1),r=O(t,"message",3,""),a=O(t,"percentage",3,0),o=O(t,"aiInjectionsCount",3,0),l=o();let c=V(!1);var u=qe(),d=ee(u);{var f=v=>{var m=Eu(),g=x(m),h=x(g),y=x(h);pu(y);var w=E(h,2),p=x(w);{var S=M=>{var P=yu();k(M,P)},A=M=>{var P=qe(),D=ee(P);{var Z=B=>{var j=ku(),L=E(ee(j),2),R=x(L),q=E(R);Qe(q,20,()=>({length:3}),yt,($,oe)=>{var Ae=wu();k($,Ae)});var ae=E(L,2),Q=x(ae),re=x(Q);const te=z(()=>`${Math.max(a(),3)??""}%`);N(()=>jn(re,"width",s(te)));var we=E(Q,2),X=x(we);N(()=>K(X,`${Math.floor(a())??""}%`)),N(()=>K(R,`${r()??""} `)),k(B,j)},G=B=>{var j=xu(),L=ee(j),R=E(x(L),4);{var q=re=>{var te=Ue("No new injections where found.");k(re,te)},ae=re=>{var te=Ue();N(()=>K(te,`${o()??""} Injections where found and added to the page.`)),k(re,te)};H(R,re=>{l===o()?re(q):re(ae,!1)})}var Q=E(L,2);Q.__click=[bu,c],k(B,j)};H(D,B=>{n()?B(Z):B(G,!1)},!0)}k(M,P)};H(p,M=>{i()?M(A,!1):M(S)})}var b=E(g,2),T=x(b);{var U=M=>{var P=Su();k(M,P)};H(T,M=>{n()&&M(U)})}N(()=>ue(m,"running",n())),k(v,m)};H(d,v=>{s(c)||v(f)})}k(e,u)}ve(["click"]);async function Iu(e,t,n,i,r,a,o){try{C(t,!0),C(n,!1),i(await Gs(i(),r())),C(a,J(s(o)))}catch{C(n,!0)}finally{C(t,!1)}}var Au=I('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700">'),Pu=I('<div class="handles svelte-11aj6xq"><div class="handle svelte-11aj6xq"><!></div> <div class="handle svelte-11aj6xq"><!></div></div>'),Cu=I('<div class="loading svelte-11aj6xq">Loading...</div>'),ju=I('<div class="bubble svelte-11aj6xq"> </div> <!>',1),Mu=I(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),Lu=I('<div class="alert svelte-11aj6xq"><!></div>'),Nu=I('<div class="error svelte-11aj6xq"><!></div>'),Ou=I('<div class="empty svelte-11aj6xq">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),Du=I('<button class="save svelte-11aj6xq"> </button>'),Ru=I('<!> <!> <div class="items svelte-11aj6xq"></div> <!>',1),qu=I("<!> <!> <!>",1),Hu=I('<div class="panel playpilot-styled-scrollbar svelte-11aj6xq"><!></div>'),Fu=I('<section class="editor playpilot-styled-scrollbar svelte-11aj6xq"><!> <header class="header svelte-11aj6xq"><div class="heading svelte-11aj6xq">Playlinks</div> <!></header> <!> <!></section>');function Bu(e,t){le(t,!0);let n=O(t,"linkInjections",15),i=O(t,"pageText",3,""),r=O(t,"loading",3,!1),a=O(t,"injectionsEnabled",7,!1),o=O(t,"aiStatus",23,()=>({})),l=O(t,"onreinitialize",3,()=>null);const c="editor-position",u="editor-height",d=JSON.parse(localStorage.getItem(c)||'{ "x": 0, "y": 0 }'),f=parseInt(localStorage.getItem(u)||"0");let v=V(null),m=V(!1),g=V(!1),h=V(!1),y=V(!0),w=V(0),p=V("");const S=z(()=>_n(o().aiEnabled,!1)),A=z(()=>_n(o().aiRunning,!1)),b=z(()=>JSON.stringify(n())),T=z(()=>!s(A)&&s(y)),U=z(()=>s(p)&&s(p)!==s(b)),M=z(()=>n().filter(F=>F.title_details&&!F.removed&&!F.duplicate&&(F.manual||!F.manual&&!F.failed))),P=z(()=>Z(s(M))),D=z(()=>!r()&&Ve(()=>o().aiRunning));Tn(()=>{r()||Ve(()=>{requestAnimationFrame(()=>C(p,J(s(b)))),R()})});function Z(F){return F.sort((W,ge)=>W.failed!==ge.failed?W.failed?1:-1:W.title_details.title.localeCompare(ge.title_details.title))}function G(F,W){localStorage.setItem(F,W)}function B(F){const W=n().findIndex(ge=>ge.key===F);n(n()[W].manual=!0,!0),n(n()[W].removed=!0,!0),n([...n()])}function j(F){if(!s(v))return;const W=F.offsetTop,ge=W+F.offsetHeight,_e=s(v).scrollTop,Ee=_e+s(v).clientHeight;W>=_e&&ge<=Ee||s(v).scrollTo({top:W-s(v).clientHeight/2,behavior:"smooth"})}function L(F){const W=F.target;C(w,J(W.scrollTop))}function R(){const F={total:n().length,failed_automatic:n().filter(W=>W.failed&&!W.manual).length,failed_manual:n().filter(W=>W.failed&&W.manual).length,final_injected:s(M).length};he(fe.TotalInjectionsCount,null,F)}var q=Fu();No(F=>{var W=Au();k(F,W)});var ae=x(q);{var Q=F=>{var W=Pu(),ge=x(W),_e=x(ge);zc(_e,{get element(){return s(v)},height:f,onchange:Xe=>G(u,JSON.stringify(Xe))});var Ee=E(ge,2),Me=x(Ee);Vc(Me,{get element(){return s(v)},position:d,limit:{x:16,y:16},onchange:Xe=>G(c,JSON.stringify(Xe))}),k(F,W)};H(ae,F=>{s(v)&&!r()&&F(Q)})}var re=E(ae,2),te=x(re);an(te,F=>Se==null?void 0:Se(F));var we=E(te,2);{var X=F=>{var W=Cu();k(F,W)},$=F=>{var W=qe(),ge=ee(W);{var _e=Ee=>{var Me=ju(),Xe=ee(Me),Le=x(Xe),sn=E(Xe,2);gi(sn,{onclick:()=>C(m,!0),size:"24px","aria-label":"Add manual injection",children:(cn,Si)=>{var un=Ue("+");k(cn,un)},$$slots:{default:!0}}),N(()=>{ce(Xe,"aria-label",`${s(M).length??""} found playlinks`),K(Le,s(M).length)}),k(Ee,Me)};H(ge,Ee=>{s(T)&&Ee(_e)},!0)}k(F,W)};H(we,F=>{r()?F(X):F($,!1)})}var oe=E(re,2);{var Ae=F=>{var W=qu(),ge=ee(W);gu(ge,{get pageText(){return i()},onallow:()=>C(y,!0),ondisallow:()=>C(y,!1),get ontakeover(){return l()},onpoll:Le=>{a(Le.injectionsEnabled),o({...o(),aiEnabled:Le.aiEnabled})}});var _e=E(ge,2);{var Ee=Le=>{Tu(Le,sl(o,{get aiInjectionsCount(){return aa(n()).aiInjections.length}}))};H(_e,Le=>{s(y)&&(s(D)||!s(S))&&Le(Ee)})}var Me=E(_e,2);{var Xe=Le=>{var sn=Ru(),cn=ee(sn);{var Si=me=>{var pe=Lu(),tt=x(pe);wt(tt,{type:"warning",children:(ut,pa)=>{var Dn=Mu();k(ut,Dn)},$$slots:{default:!0}}),k(me,pe)};H(cn,me=>{a()||me(Si)})}var un=E(cn,2);{var ha=me=>{var pe=Nu(),tt=x(pe);wt(tt,{children:(ut,pa)=>{var Dn=Ue("Something went wrong, check your links below.");k(ut,Dn)},$$slots:{default:!0}}),Ce(7,pe,()=>Yt,()=>({duration:150})),k(me,pe)};H(un,me=>{s(h)&&me(ha)})}var Ei=E(un,2);Qe(Ei,21,()=>s(P),me=>me.key,(me,pe)=>{const tt=z(()=>n().findIndex(ut=>ut.key===s(pe).key));Fc(me,{onremove:()=>B(s(pe).key),onhighlight:j,get linkInjection(){return n()[s(tt)]},set linkInjection(ut){n(n()[s(tt)]=ut,!0)}})},me=>{var pe=Ou();k(me,pe)});var ga=E(Ei,2);{var ma=me=>{var pe=Du();pe.__click=[Iu,g,h,n,i,p,b];var tt=x(pe);N(()=>{pe.disabled=s(g),K(tt,s(g)?"Saving...":"Save links")}),Ce(1,pe,()=>Kt,()=>({duration:100})),k(me,pe)};H(ga,me=>{s(U)&&n().length&&s(y)&&me(ma)})}k(Le,sn)};H(Me,Le=>{s(T)&&Le(Xe)})}k(F,W)};H(oe,F=>{r()||F(Ae)})}var et=E(oe,2);{var ct=F=>{var W=Hu(),ge=x(W);cu(ge,{get pageText(){return i()},onclose:()=>C(m,!1),onsave:_e=>n().push(_e)}),N(()=>jn(W,"top",`${s(w)??""}px`)),Ce(3,W,()=>Ln,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),k(F,W)};H(et,F=>{s(m)&&F(ct)})}on(q,F=>C(v,F),()=>s(v)),N(()=>{ue(q,"panel-open",s(m)),ue(q,"loading",r())}),de("scroll",q,L),k(e,q),se()}ve(["click"]);var Vu=He('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function Uu(e){var t=Vu();k(e,t)}var zu=I('<div class="trigger svelte-qee95d"><button type="button" class="button svelte-qee95d" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qee95d" title="Close PlayPilot TPI"><!></button></div>');function Wu(e,t){var n=zu(),i=x(n);i.__click=function(...l){var c;(c=t.onclick)==null||c.apply(this,l)};var r=x(i);Uu(r);var a=E(i,2);a.__click=function(...l){var c;(c=t.onclose)==null||c.apply(this,l)};var o=x(a);Xr(o),k(e,n)}ve(["click"]);var Ku=I('<img alt="" class="svelte-j7f9xl">');function Yu(e,t){var n=qe(),i=ee(n);Qe(i,17,()=>t.pixels,yt,(r,a)=>{var o=Ku();N(()=>ce(o,"src",s(a))),k(r,o)}),k(e,n)}var Zu=I('<div class="playpilot-link-injections svelte-13rmd3g" data-playpilot-link-injections=""><!> <!></div> <!>',1);function Gu(e,t){le(t,!0);let n=V(null),i=V(J([])),r=V(null),a=V(J(Kr())),o=V(!!_i()),l=V(!1),c=V(!0),u=V(!0),d=V(J([]));const f=z(()=>s(r)||{}),v=z(()=>_n(s(f).ai_injections,()=>[],!0)),m=z(()=>_n(s(f).manual_injections,()=>[],!0)),g=z(()=>na(s(i)));Tn(()=>{s(a)&&!s(c)&&y()}),Ge(()=>{if(!Js())return(async()=>(await h(),he(fe.ArticlePageView),bl("initial_test")))(),()=>wi()});async function h(){C(c,!0),s(a)&&C(l,J(await Wr()));try{const j=await Xs(),L=fi();if(C(u,!!(j!=null&&j.exclude_urls_pattern&&L.match(new RegExp(j.exclude_urls_pattern)))),s(u))return;j!=null&&j.custom_style&&b(j.custom_style||""),S((j==null?void 0:j.html_selector)||"",(j==null?void 0:j.exclude_elements_selector)||"")}catch(j){he(fe.FetchingConfigFailed),console.error("TPI Config failed to fetch",j);return}try{if(C(r,J(await Yi(s(g),{maxTries:1,runAiWhenRelevant:!0}))),C(c,!1),!s(r))return;if(_l({organizationSid:s(r).organization_sid,domainSid:s(r).domain_sid}),!s(r).ai_running||!s(r).ai_enabled){p({aiInjections:s(v),manualInjections:s(m)});return}if(!s(a))return;C(r,J(await Yi(s(g),{requireCompletedResult:!0,onpoll:j=>C(r,J(j))}))),p({aiInjections:s(v),manualInjections:s(m)})}catch(j){console.error(j),he(fe.InjectionError,null,{message:j.message})}}function y(){p(aa(s(d)))}function w(){C(a,!1),requestAnimationFrame(()=>{C(a,!0),h()})}function p(j={aiInjections:s(v),manualInjections:s(m)}){const L=Ls(s(i),j);JSON.stringify(L)!==JSON.stringify(s(d))&&(C(d,J(L)),window.PlayPilotLinkInjections.evaluated_link_injections=L);const R=L.filter(q=>!q.failed);R.length&&(s(a)||he(fe.ArticleInjected,null,{manual:R.filter(q=>q.manual).length,ai:R.filter(q=>!q.manual).length}))}function S(j,L){j&&(window.PlayPilotLinkInjections.selector=j),C(n,J(At())),C(i,J(yi(s(n),L)))}function A(){C(a,!0),ml(),h()}function b(j){const L="playpilot-custom-style",R=document.getElementById(L),q=R||document.createElement("style");q.textContent=`[data-playpilot-link-injections] { ${j} }`,q.id=L,R||document.body.appendChild(q)}var T=Zu(),U=ee(T),M=x(U);{var P=j=>{Wu(j,{onclick:A,onclose:()=>{C(o,!1),gl()}})};H(M,j=>{!s(u)&&s(o)&&!s(a)&&j(P)})}var D=E(M,2);{var Z=j=>{var L=qe(),R=ee(L);cl(R,{onerror:ae=>he(fe.EditorError,null,{message:ae.message}),failed:ae=>{wt(ae,{fixed:!0,children:(Q,re)=>{var te=Ue("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");k(Q,te)},$$slots:{default:!0}})}},ae=>{var Q=z(()=>{var te;return(te=s(r))==null?void 0:te.injections_enabled}),re=z(()=>{var te,we,X,$,oe;return{aiEnabled:(te=s(r))==null?void 0:te.ai_enabled,aiRunning:((we=s(r))==null?void 0:we.ai_running)&&((X=s(r))==null?void 0:X.ai_enabled),message:($=s(r))==null?void 0:$.ai_progress_message,percentage:(oe=s(r))==null?void 0:oe.ai_progress_percentage}});Bu(ae,{get pageText(){return s(g)},get loading(){return s(c)},onreinitialize:w,get injectionsEnabled(){return s(Q)},get aiStatus(){return s(re)},get linkInjections(){return s(d)},set linkInjections(te){C(d,J(te))}})}),k(j,L)};H(D,j=>{!s(u)&&s(a)&&s(l)&&j(Z)})}var G=E(U,2);{var B=j=>{Yu(j,{get pixels(){return s(r).pixels}})};H(G,j=>{var L,R;(R=(L=s(r))==null?void 0:L.pixels)!=null&&R.length&&j(B)})}k(e,T),se()}window.PlayPilotLinkInjections={token:"",editorial_token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid:null,last_successful_fetch:null,tracked_events:[],split_test_identifiers:{},evaluated_link_injections:[],app:null,initialize(e={token:"",selector:"",after_article_selector:"",after_article_insert_position:"",language:null,organization_sid:null,domain_sid: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.after_article_selector=e.after_article_selector,this.after_article_insert_position=e.after_article_insert_position,this.language=e.language,this.organization_sid=e.organization_sid,this.domain_sid=e.domain_sid,this.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),this.app=rn(Gu,{target:t})},destroy(){if(!this.app)return;this.app=null;const e=document.getElementById("playpilot-link-injection");e&&e.remove(),wi()},debug(){const e=At(),t=yi(e);console.group("PlayPilot Link Injection Debug"),console.groupCollapsed("Config"),console.table(Object.entries(this)),console.groupEnd(),console.groupCollapsed("Elements"),console.log("Parent element",e),console.log("Valid elements",t),console.groupEnd(),console.groupCollapsed("Last fetch"),console.log(this.last_successful_fetch),console.groupEnd(),console.groupCollapsed("Meta"),console.log(ki()),console.groupEnd(),console.groupCollapsed("Page text"),console.log(na(t)),console.groupEnd(),console.groupCollapsed("Evaluated injections"),console.log(this.evaluated_link_injections),console.groupEnd(),console.groupCollapsed("Tracked events"),console.log(this.tracked_events),console.groupEnd(),console.groupCollapsed("Split tests"),console.log(this.split_test_identifiers),console.groupEnd(),console.groupEnd()}};
|
|
13
13
|
|
|
14
14
|
})();
|
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { LinkInjection } from "./injection"
|
|
2
|
+
|
|
1
3
|
export type ScriptConfig = {
|
|
2
4
|
token: string
|
|
3
5
|
editorial_token?: string
|
|
@@ -10,4 +12,5 @@ export type ScriptConfig = {
|
|
|
10
12
|
last_successful_fetch?: LinkInjectionResponse | null
|
|
11
13
|
tracked_events?: { event: string, payload: Record<string, any> }[]
|
|
12
14
|
split_test_identifiers?: Record<string, number>
|
|
15
|
+
evaluated_link_injections?: LinkInjection[]
|
|
13
16
|
}
|
package/src/main.ts
CHANGED
|
@@ -15,6 +15,7 @@ window.PlayPilotLinkInjections = {
|
|
|
15
15
|
last_successful_fetch: null,
|
|
16
16
|
tracked_events: [],
|
|
17
17
|
split_test_identifiers: {},
|
|
18
|
+
evaluated_link_injections: [],
|
|
18
19
|
app: null,
|
|
19
20
|
|
|
20
21
|
initialize(config = { token: '', selector: '', after_article_selector: '', after_article_insert_position: '', language: null, organization_sid: null, domain_sid: null, editorial_token: '' }): void {
|
|
@@ -79,6 +80,10 @@ window.PlayPilotLinkInjections = {
|
|
|
79
80
|
console.log(getPageText(elements))
|
|
80
81
|
console.groupEnd()
|
|
81
82
|
|
|
83
|
+
console.groupCollapsed('Evaluated injections')
|
|
84
|
+
console.log(this.evaluated_link_injections)
|
|
85
|
+
console.groupEnd()
|
|
86
|
+
|
|
82
87
|
console.groupCollapsed('Tracked events')
|
|
83
88
|
console.log(this.tracked_events)
|
|
84
89
|
console.groupEnd()
|
package/src/routes/+page.svelte
CHANGED
|
@@ -120,7 +120,14 @@
|
|
|
120
120
|
// Get filtered injections as they are shown on the page.
|
|
121
121
|
// Only update state if it they are different from current injections.
|
|
122
122
|
const filteredInjections = injectLinksInDocument(elements, injections)
|
|
123
|
-
if (JSON.stringify(filteredInjections) !== JSON.stringify(linkInjections))
|
|
123
|
+
if (JSON.stringify(filteredInjections) !== JSON.stringify(linkInjections)) {
|
|
124
|
+
linkInjections = filteredInjections
|
|
125
|
+
|
|
126
|
+
// This is added to the window both for debugging purposes and for the benchmarking tool.
|
|
127
|
+
// Just to have some way to evaluate injections outside of editorial mode.
|
|
128
|
+
// This shouldn't be used anywhere else.
|
|
129
|
+
window.PlayPilotLinkInjections.evaluated_link_injections = filteredInjections
|
|
130
|
+
}
|
|
124
131
|
|
|
125
132
|
const successfulInjections = filteredInjections.filter(i => !i.failed)
|
|
126
133
|
|