/*! For license information please see 1a851082570905907533.js.LICENSE.txt */ !function(t){function e(e){for(var n,s,o=e[0],r=e[1],a=0,c=[];a""===e,toAttribute:t=>{if(t)return""}},s={fromAttribute:(t,e)=>t||e?""===e?null:e?Number(e):e:t,toAttribute:t=>{if(!isNaN(t))return t}},o={fromAttribute:(t,e)=>{if(!t&&!e)return t;if(!e)return e;try{return JSON.parse(e)}catch(t){return null}},toAttribute:t=>{if(t)return JSON.stringify(t)}},r={fromAttribute:(t,e)=>t||e?e?String(e):e:t,toAttribute:t=>{if(""!==t)return t}}},function(t,e,n){"use strict";n.d(e,"f",(function(){return i})),n.d(e,"g",(function(){return s})),n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return h})),n.d(e,"e",(function(){return d}));const i=`{{lit-${String(Math.random()).slice(2)}}}`,s=`\x3c!--${i}--\x3e`,o=new RegExp(`${i}|${s}`),r="$lit$";class a{constructor(t,e){this.parts=[],this.element=e;const n=[],s=[],a=document.createTreeWalker(e.content,133,null,!1);let c=0,u=-1,p=0;const{strings:f,values:{length:m}}=t;for(;p0;){const e=f[p],n=d.exec(e)[2],i=n.toLowerCase()+r,s=t.getAttribute(i);t.removeAttribute(i);const a=s.split(o);this.parts.push({type:"attribute",index:u,name:n,strings:a}),p+=a.length-1}}"TEMPLATE"===t.tagName&&(s.push(t),a.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(i)>=0){const i=t.parentNode,s=e.split(o),a=s.length-1;for(let e=0;e{const n=t.length-e.length;return n>=0&&t.slice(n)===e},c=t=>-1!==t.index,h=()=>document.createComment(""),d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/},function(t,e,n){"use strict";n.d(e,"f",(function(){return c})),n.d(e,"a",(function(){return d})),n.d(e,"d",(function(){return p})),n.d(e,"b",(function(){return f})),n.d(e,"e",(function(){return m})),n.d(e,"c",(function(){return v}));var i=n(11),s=n(4),o=n(3),r=n(15),a=n(13),l=n(1);const c=t=>null===t||!("object"==typeof t||"function"==typeof t),h=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class d{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;t{try{const t={get capture(){return b=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class v{constructor(t,e,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;Object(i.b)(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=o.a,t(this)}if(this.__pendingValue===o.a)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),s=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=y(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=o.a}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const y=t=>t&&(b?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));const i={},s={}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return o}));const i="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,s=(t,e,n=null,i=null)=>{for(;e!==n;){const n=e.nextSibling;t.insertBefore(e,i),e=n}},o=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return o}));const i=t=>class extends t{propertyChangedCallback(t,e,n){super.propertyChangedCallback&&super.propertyChangedCallback(t,e,n),this.constructor.__callPropertyHandlers.call(this,t,e,n)}static __callPropertyHandlers(t,e,n){const i=(this.constructor.propertyChangedHandlers||{})[t];if(i&&i.constructor)if("Function"===i.constructor.name)i.call(this,e,n);else if("String"===i.constructor.name&&this[i])return this[i].call(this,e,n)}},s=t=>class extends t{propertiesChangedCallback(t,e,n){super.propertiesChangedCallback&&super.propertiesChangedCallback(t,e,n),this.constructor.__callMultiPropertyHandlers.call(this,t)}static __callMultiPropertyHandlers(t){const e=new Map,n=this.constructor.propertiesChangedHandlers||{};for(let i in t)for(let s in n){const o=n[s];-1!==o.indexOf(t[i])&&e.set(s,o)}e.forEach((t,e)=>this[e].call(this,...t.map(t=>this[t])))}static get propertiesChangedHandlers(){return{}}},o=t=>class extends t{propertyChangedCallback(t,e,n){super.propertyChangedCallback&&super.propertyChangedCallback(t,e,n),this.__changedProperties||(this.__changedProperties=new Map),this.constructor.__addChangedProperty.call(this,t,e)}static __addChangedProperty(t,e){this.__changedProperties.has(t)||this.__changedProperties.set(t,e),window.requestAnimationFrame(this.constructor.__invokeCallback.bind(this))}static __invokeCallback(){if(0===this.__changedProperties.size)return;const t={},e={};this.__changedProperties.forEach((e,n)=>t[n]=e),this.__changedProperties.forEach((t,n)=>e[n]=this[n]);const n=Object.keys(t);this.__changedProperties.clear(),this.propertiesChangedCallback&&this.propertiesChangedCallback(n,t,e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(12),s=n(16),o=n(5),r=n(7);n.d(e,"b",(function(){return r.a}));let a,l=t=>t;class c extends(Object(s.a)(Object(o.b)(Object(o.a)(Object(o.c)(Object(i.a)(HTMLElement)))))){static get properties(){return{}}constructor(){super(),this.attachShadow({mode:"open"}),this.render()}get template(){return Object(r.a)(a||(a=l``))}async render(){await new Promise(t=>window.requestAnimationFrame(t)),Object(r.b)(this.template,this.shadowRoot,{eventContext:this,scopeName:this.localName}),this.firstRenderedCallback&&this.firstRenderedCallback()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d.c})),n.d(e,"b",(function(){return v}));var i=n(4),s=n(1);function o(t,e){const{element:{content:n},parts:i}=t,s=document.createTreeWalker(n,133,null,!1);let o=a(i),r=i[o],l=-1,c=0;const h=[];let d=null;for(;s.nextNode();){l++;const t=s.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(h.push(t),null===d&&(d=t)),null!==d&&c++;void 0!==r&&r.index===l;)r.index=null!==d?-1:r.index-c,o=a(i,o),r=i[o]}h.forEach(t=>t.parentNode.removeChild(t))}const r=t=>{let e=11===t.nodeType?0:1;const n=document.createTreeWalker(t,133,null,!1);for(;n.nextNode();)e++;return e},a=(t,e=-1)=>{for(let n=e+1;n`${t}--${e}`;let p=!0;void 0===window.ShadyCSS?p=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),p=!1);const f=t=>e=>{const n=u(e.type,t);let i=c.a.get(n);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},c.a.set(n,i));let o=i.stringsArray.get(e.strings);if(void 0!==o)return o;const r=e.strings.join(s.f);if(o=i.keyString.get(r),void 0===o){const n=e.getTemplateElement();p&&window.ShadyCSS.prepareTemplateDom(n,t),o=new s.a(e,n),i.keyString.set(r,o)}return i.stringsArray.set(e.strings,o),o},m=["html","svg"],g=new Set,b=(t,e,n)=>{g.add(t);const i=n?n.element:document.createElement("template"),s=e.querySelectorAll("style"),{length:l}=s;if(0===l)return void window.ShadyCSS.prepareTemplateStyles(i,t);const h=document.createElement("style");for(let t=0;t{m.forEach(e=>{const n=c.a.get(u(e,t));void 0!==n&&n.keyString.forEach(t=>{const{element:{content:e}}=t,n=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{n.add(t)}),o(t,n)})})})(t);const d=i.content;n?function(t,e,n=null){const{element:{content:i},parts:s}=t;if(null==n)return void i.appendChild(e);const o=document.createTreeWalker(i,133,null,!1);let l=a(s),c=0,h=-1;for(;o.nextNode();){h++;for(o.currentNode===n&&(c=r(e),n.parentNode.insertBefore(e,n));-1!==l&&s[l].index===h;){if(c>0){for(;-1!==l;)s[l].index+=c,l=a(s,l);return}l=a(s,l)}}}(n,h,d.firstChild):d.insertBefore(h,d.firstChild),window.ShadyCSS.prepareTemplateStyles(i,t);const p=d.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==p)e.insertBefore(p.cloneNode(!0),e.firstChild);else if(n){d.insertBefore(h,d.firstChild);const t=new Set;t.add(h),o(n,t)}},v=(t,e,n)=>{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");const s=n.scopeName,o=l.a.has(e),r=p&&11===e.nodeType&&!!e.host,a=r&&!g.has(s),c=a?document.createDocumentFragment():e;if(Object(l.b)(t,c,Object.assign({templateFactory:f(s)},n)),a){const t=l.a.get(c);l.a.delete(c);const n=t.value instanceof h.a?t.value.template:void 0;b(s,c,n),Object(i.b)(e,e.firstChild),e.appendChild(c),l.a.set(e,t)}!o&&r&&window.ShadyCSS.styleElement(e.host)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),s=n(14);const o=new WeakMap,r=Object(s.b)(t=>e=>{if(!(e instanceof s.a))throw new Error("unsafeHTML can only be used in text bindings");const n=o.get(e);if(void 0!==n&&Object(i.f)(t)&&t===n.value&&e.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=t;const a=document.importNode(r.content,!0);e.setValue(a),o.set(e,{value:t,fragment:a})})},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return o}));var i=n(1);function s(t){let e=o.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},o.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const s=t.strings.join(i.f);return n=e.keyString.get(s),void 0===n&&(n=new i.a(t,t.getTemplateElement()),e.keyString.set(s,n)),e.stringsArray.set(t.strings,n),n}const o=new Map},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return a}));var i=n(4),s=n(2),o=n(9);const r=new WeakMap,a=(t,e,n)=>{let a=r.get(e);void 0===a&&(Object(i.b)(e,e.firstChild),r.set(e,a=new s.d(Object.assign({templateFactory:o.b},n))),a.appendInto(e)),a.setValue(t),a.commit()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return o}));const i=new WeakMap,s=t=>(...e)=>{const n=t(...e);return i.set(n,!0),n},o=t=>"function"==typeof t&&i.has(t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const i=t=>class extends t{constructor(){super(),this.constructor.__saveInitialPropertyValues.call(this),this.constructor.__initProperties.call(this)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.constructor.__setInitialPropertyValues.call(this)}static __saveInitialPropertyValues(){this.__initialPropertyValues=new Map,(this.constructor.observedProperties||[]).map(t=>this.__initialPropertyValues.set(t,this[t]))}static __setInitialPropertyValues(){this.__initialPropertyValues.forEach((t,e)=>{void 0!==t&&(this[e]=t)})}static __initProperties(){this.constructor.__propertyAccessors={};(this.constructor.observedProperties||[]).map(t=>this.constructor.__initProperty.call(this,t))}static __initProperty(t){this.constructor.__propertyAccessors[t]=this.__getPropertyDescriptor(this,t),Object.defineProperty(this,t,{set(e){this.constructor.__setProperty.call(this,t,e)},get(){return this.constructor.__getProperty.call(this,t)}})}static __getProperty(t){const e=this.constructor.__propertyAccessors[t]||{};return e.get?e.get.call(this,t):this["#"+t]}static __setProperty(t,e){const n=this.constructor.__propertyAccessors[t]||{},i=this[t];n.set?n.set.call(this,e):this["#"+t]=e,this.constructor.__propertyValueChanged.call(this,t,i,this[t])}static __propertyValueChanged(t,e,n){if(e!==n){try{if(JSON.stringify(e)===JSON.stringify(n))return}catch(t){}this.propertyChangedCallback&&this.propertyChangedCallback(t,e,n)}}__getPropertyDescriptor(t,e){if(t)return Object.getOwnPropertyDescriptor(t,e)||this.__getPropertyDescriptor(Object.getPrototypeOf(t),e)}},s=t=>class extends t{static get observedAttributes(){const t=[],e=this.DOMProperties||[];for(let n in e)t.push((this.propertyAttributeNames||{})[e[n]]||e[n].toLowerCase());return t}attributeChangedCallback(t,e,n){if(e===n)return;const i=this.constructor.__getPropertyNameByAttributeName.call(this,t);i&&this.constructor.__setDOMProperty.call(this,i,this[i],n)}static __getPropertyNameByAttributeName(t){const e=this.constructor.propertyAttributeNames;for(let n in e)if(e[n]===t)return n;const n=this.constructor.DOMProperties||[];for(let e in n)if(n[e].toLowerCase()===t)return n[e]}static __setDOMProperty(t,e,n){const i=(this.constructor.propertyFromAttributeConverters||{})[t];i&&(n=i.call(this,e,n)),this[t]=n}},o=t=>class extends t{connectedCallback(){for(var t in super.connectedCallback(),this.constructor.reflectedProperties){const e=this.constructor.reflectedProperties[t],n=this.constructor.__getAttributeNameByPropertyName.call(this,e);this.constructor.__setDOMAttribute.call(this,n,e,this[e])}}propertyChangedCallback(t,e,n){if(super.propertyChangedCallback&&super.propertyChangedCallback(t,e,n),!this.isConnected)return;if(!(-1!==(this.constructor.reflectedProperties||{}).indexOf(t)))return;const i=this.constructor.__getAttributeNameByPropertyName.call(this,t);this.constructor.__setDOMAttribute.call(this,i,t,n)}static __setDOMAttribute(t,e,n){const i=(this.constructor.propertyToAttributeConverters||{})[e];if(i&&(n=i.call(this,n)),null==n)return this.removeAttribute(t);this.setAttribute(t,n)}static __getAttributeNameByPropertyName(t){const e=this.constructor.reflectedProperties||[],n=this.constructor.propertyAttributeNames||{};if(-1===e.indexOf(t))return;return n[t]||t.toLowerCase()}},r=t=>class extends(o(s(i(t)))){static get properties(){return{}}static get observedProperties(){return Object.keys(this.__getFilteredProperties.call(this,"observe",!0))}static get DOMProperties(){return Object.keys(this.__getFilteredProperties.call(this,"DOM",!0))}static get reflectedProperties(){return Object.keys(this.__getFilteredProperties.call(this,"reflect",!0))}static get propertyChangedHandlers(){return this.__getPropertyValues.call(this,"changedHandler")}static get propertyAttributeNames(){const t={},e=this.properties;for(let n in e)t[n]=e[n].attributeName||n.toLowerCase();return t}static get propertyToAttributeConverters(){return this.__getPropertyValues.call(this,"toAttributeConverter")}static get propertyFromAttributeConverters(){return this.__getPropertyValues.call(this,"fromAttributeConverter")}static __getFilteredProperties(t,e){const n={},i=this.properties;for(let s in i)i[s][t]===e&&(n[s]=i[s]);return n}static __getPropertyValues(t){const e={},n=this.properties;for(let i in n)e[i]=n[i][t];return e}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return l}));var i=n(4),s=n(1);const o=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),r=` ${s.f} `;class a{constructor(t,e,n,i){this.strings=t,this.values=e,this.type=n,this.processor=i}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let i=0;i-1||n)&&-1===t.indexOf("--\x3e",o+1);const a=s.e.exec(t);e+=null===a?t+(n?r:s.g):t.substr(0,a.index)+a[1]+a[2]+s.b+a[3]+s.f}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==o&&(e=o.createHTML(e)),t.innerHTML=e,t}}class l extends a{getHTML(){return`${super.getHTML()}`}getTemplateElement(){const t=super.getTemplateElement(),e=t.content,n=e.firstChild;return e.removeChild(n),Object(i.c)(e,n.firstChild),t}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r.a})),n.d(e,"a",(function(){return i.d})),n.d(e,"c",(function(){return a}));var i=n(2);const s=new class{handleAttributeExpressions(t,e,n,s){const o=e[0];if("."===o){return new i.e(t,e.slice(1),n).parts}if("@"===o)return[new i.c(t,e.slice(1),s.eventContext)];if("?"===o)return[new i.b(t,e.slice(1),n)];return new i.a(t,e,n).parts}handleTextExpression(t){return new i.d(t)}};var o=n(13),r=n(11);n(4),n(3),n(10),n(9),n(15),n(1);"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");const a=(t,...e)=>new o.b(t,e,"html",s)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4),s=n(1);class o{constructor(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this.__parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=i.a?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],n=this.template.parts,o=document.createTreeWalker(t,133,null,!1);let r,a=0,l=0,c=o.nextNode();for(;aclass extends t{updateStyles(t,e,n=this){this.isConnected&&(n.style.setProperty(t,e),window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,{[t]:e}))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const i=t=>{!function(){if(!0===window.__focusVisiblePolyFillReady)return;window.addEventListener("keydown",t=>window.__focusVisiblePolyFillLastKeyDown=t.key),window.addEventListener("mousedown",()=>window.__focusVisiblePolyFillLastKeyDown=null),window.addEventListener("pointerdown",()=>window.__focusVisiblePolyFillLastKeyDown=null),window.addEventListener("touchdown",()=>window.__focusVisiblePolyFillLastKeyDown=null),window.__focusVisiblePolyFillReady=!0}(),t.addEventListener("focus",s.bind(t)),t.addEventListener("blur",a.bind(t))};function s(){if("Tab"===window.__focusVisiblePolyFillLastKeyDown)return o.call(this);r.call(this)}function o(){this.classList.add("focus-visible")}function r(){this.classList.remove("focus-visible")}function a(){r.call(this)}},function(t,e){Object.fromEntries||(Object.fromEntries=t=>{const e={};return t.forEach((t,n)=>e[n]=t),e})},function(t,e,n){"use strict";n.r(e);var i=n(12),s=n(5),o=n(0),r=n(7),a=n(16);let l,c=t=>t;class h extends(Object(a.a)(Object(s.a)(Object(s.c)(Object(s.b)(Object(i.a)(HTMLElement)))))){static get properties(){return{media:{observe:!0,DOM:!0,reflect:!0,fromAttributeConverter:o.d.fromAttribute,toAttributeConverter:o.d.toAttribute},orientation:{observe:!0,DOM:!0,reflect:!0,fromAttributeConverter:o.d.fromAttribute,toAttributeConverter:o.d.toAttribute}}}constructor(){super(),this.media="small",this.orientation="portrait",this.attachShadow({mode:"open"})}connectedCallback(){super.connectedCallback(),this._render()}get template(){return Object(r.a)(l||(l=c``))}render(t,e){JSON.stringify(t)!==JSON.stringify(e)&&this._render()}async _render(){await new Promise(t=>window.requestAnimationFrame(t)),Object(r.b)(this.template,this.shadowRoot,{eventContext:this,scopeName:this.localName})}notify(t,e){this.dispatchEvent(new CustomEvent(t,e))}}n(20);var d=n(6);class u extends d.a{static get properties(){return{active:{observe:!0,DOM:!0,fromAttributeConverter:o.a.fromAttribute},zoom:{observe:!0,DOM:!0,fromAttributeConverter:o.b.fromAttribute},panX:{observe:!0,DOM:!0,fromAttributeConverter:o.b.fromAttribute,attributeName:"pan-x"},panY:{observe:!0,DOM:!0,fromAttributeConverter:o.b.fromAttribute,attributeName:"pan-y"}}}constructor(){super(),this.active=!1,this.zoom=1,this.panX=50,this.panY=50}propertiesChangedCallback(t,e,n){super.propertiesChangedCallback(t,e,n),this.dispatchEvent(new CustomEvent("value-changed",{detail:this.value}))}get value(){if(!this.active||1===this.zoom)return"";const t=this._animationCoords,e=("kenburns"+Math.random()).replace(/\./g,"");return{keyframes:`\n @keyframes ${e} {\n 0% {\n transform: translate(0%, 0%) scale3d(1, 1, 1);\n }\n 100% {\n opacity: 1;\n transform: translate(${t.x}, ${t.y}) scale3d(${this.zoom}, ${this.zoom}, ${this.zoom});\n }\n }\n `.replace(/\s+/g," "),name:e}}get _animationCoords(){const t="number"==typeof this.panX?this.panX:50,e="number"==typeof this.panY?this.panY:50,n=50*(this.zoom-1)*2,i=n/2;return{x:Math.round(0-(t/100*n-i))+"%",y:Math.round(0-(e/100*n-i))+"%"}}}window.customElements.define("kenburns-animation",u);let p,f,m,g=t=>t;class b extends d.a{get template(){return Object(d.b)(p||(p=g`
${0}
`),'\n:host,\n:host *,\n*::before,\n*::after {\n box-sizing: border-box;\n}\na {\n color: inherit;\n}\n:host(:not(.focus-visible)),\n:host(.focus-visible),\n:host(:not(.focus-visible)) input,\n:host(:not(.focus-visible)) button,\n:host(:not(.focus-visible)) select {\n outline: none;\n}\n[hidden] {\n display: none !important;\n}\n:host {\n display: block;\n --slicesui-image-grid-color: rgba(255,255,255,0.7);\n --slicesui-image-scale: 1;\n}\n:host #placeholder[src] {\n opacity: 1;\n}\n:host #placeholder[src^="http"] {\n display: none;\n}\n:host figure {\n padding: 0;\n margin: 0;\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: var(--slicesui-image-background-color, transparent);\n}\n:host img {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n transition: 1s opacity;\n width: 100%;\n height: 100%;\n object-fit: var(--slicesui-image-object-fit, contain);\n object-position: var(--slicesui-image-object-position, 50% 50%);\n border: 0;\n border-style: none;\n opacity: 0;\n box-sizing: border-box;\n padding: 0;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n:host([editable]) img {\n pointer-events: all;\n}\n:host([loaded]) #placeholder[src] {\n transition-delay: 0.25s;\n opacity: 0;\n}\n:host([loaded]) #full[srcset] {\n opacity: 1;\n animation-name: var(--slicesui-image-animation-name);\n animation-play-state: var(--slicesui-image-animation-play-state, paused);\n animation-duration: var(--slicesui-image-animation-duration, 20s);\n animation-direction: var(--slicesui-image-animation-direction, normal);\n animation-timing-function: linear;\n animation-iteration-count: var(--slicesui-image-animation-iteration-count, infinite);\n animation-fill-mode: forwards;\n}\n[hidden] {\n display: none !important;\n}\n',this.animationKeyframes,this.placeholder||"",!this.placeholder,this._srcset?Object(d.b)(f||(f=g` `),this._srcset,this._handleLoaded,this._handleError,!this.preload):Object(d.b)(m||(m=g``)),this.animationEnabled,this.animation.zoom,this.animation.xPosition,this.animation.yPosition,this._handleAnimationChanged)}static get properties(){return{placeholder:{observe:!0,DOM:!0,fromAttributeConverter:o.d.fromAttribute},sources:{observe:!0,DOM:!0,fromAttributeConverter:o.c.fromAttribute},preload:{observe:!0,DOM:!0,fromAttributeConverter:o.a.fromAttribute},loaded:{observe:!0,DOM:!0,reflect:!0,fromAttributeConverter:o.a.fromAttribute,toAttributeConverter:o.a.toAttribute,changedHandler:"_loadedChanged"},error:{observe:!0},animation:{observe:!0,DOM:!0,fromAttributeConverter:o.c.fromAttribute},animationName:{observe:!0,DOM:!0,attributeName:"animation-name",fromAttributeConverter:o.d.fromAttribute},animationEnabled:{observe:!0,DOM:!0,attributeName:"animation-enabled",fromAttributeConverter:o.a.fromAttribute,changedHandler:"_animationEnabledChanged"},animationKeyframes:{observe:!0,DOM:!0,attributeName:"animation-keyframes",fromAttributeConverter:o.d.fromAttribute}}}constructor(){super(),this.placeholder="",this.preload=!1,this.loaded=!1,this.error=!1,this.animation={},this.animationEnabled=!1,window.addEventListener("online",this._handleOnline.bind(this))}get animation(){return this["#animation"]||{}}static get propertiesChangedHandlers(){return{_toggleOpacity:["loaded","animationEnabled"],render:["placeholder","sources","loaded","_srcset","preload","animationEnabled","animationName","animation","animationKeyframes"]}}propertiesChangedCallback(t,e,n){super.propertiesChangedCallback(t,e,n),this._updateCSS()}set placeholder(t){"http"!==(t||"").substr(0,4)&&(this["#placeholder"]=t)}get _srcset(){if(!this.preload)return;const t=this.sources;if(!t)return this.loaded=!1;const e=[];return t.map(t=>("750w"==t.size&&(t.size="480w"),"1024w"==t.size&&(t.size="1080w"),e.push(t.url+" "+t.size))),e.join(", ")}_updateCSS(){this.updateStyles("--slicesui-image-animation-name",this.animationName),this.updateStyles("--slicesui-image-animation-play-state",this.animationEnabled?"running":"paused"),this.updateStyles("--slicesui-image-animation-duration",this.animation.duration+"s"),this.updateStyles("--slicesui-image-animation-direction",this.animation.direction)}_loadedChanged(){this.dispatchEvent(new CustomEvent("loaded-changed",{detail:{value:this.loaded}}))}_handleOnline(){if(this.error){const t=this.shadowRoot.querySelector("#full");t.removeAttribute("srcset"),t.setAttribute("srcset",this._srcset)}}_handleLoaded(){this.sources&&(this.loaded=!0,this.error=!1)}_handleError(){this.error=!0}_handleAnimationChanged(t){this.animationName=t.detail.name,this.animationKeyframes=t.detail.keyframes}_toggleOpacity(){if(!this.animationEnabled)return;const t=this.shadowRoot.querySelector("#full");t&&(t.style.setProperty("opacity",.99),window.requestAnimationFrame(()=>t.style.setProperty("opacity",1)))}}window.customElements.define("slicesui-image",b);let v,y=t=>t;window.customElements.define("slices-player-element",class extends h{static get properties(){return{styles:{observe:!0,changedHandler:"_stylesChanged"},layout:{observe:!0,reflect:!0,toAttributeConverter:o.d.toAttribute}}}constructor(){super(),this.styles={},this.layout="split"}connectedCallback(){super.connectedCallback(),this._stylesChanged()}get template(){return Object(r.a)(v||(v=y` `),'\n:host,\n:host *,\n*::before,\n*::after {\n box-sizing: border-box;\n}\na {\n color: inherit;\n}\n:host(:not(.focus-visible)),\n:host(.focus-visible),\n:host(:not(.focus-visible)) input,\n:host(:not(.focus-visible)) button,\n:host(:not(.focus-visible)) select {\n outline: none;\n}\n[hidden] {\n display: none !important;\n}\n:host {\n display: block;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n:host ::slotted(*) {\n position: absolute;\n opacity: 0;\n transition: 1000ms opacity ease;\n z-index: var(--z-index-content-text);\n}\n:host(.visual) {\n z-index: var(--z-index-content-visual);\n --slicesui-image-object-fit: var(--slice-image-fit);\n --slicesui-image-object-position: var(--slice-image-position);\n --slicesui-av-player-caption-padding: 0 0 64px 0;\n}\n:host(.visual) ::slotted(*) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--slice-figure-background-color);\n background-position: var(--slice-image-position);\n background-size: var(--slice-image-fit);\n background-repeat: no-repeat;\n border: var(--slice-image-padding, 0) solid transparent;\n}\n:host(.text) {\n z-index: var(--z-index-content-text);\n padding: calc(max(calc(var(--erem) * 2), 44px) + (var(--slices-player-content--padding) * 2)) calc(var(--emin) * 4);\n display: flex;\n flex-direction: column;\n align-items: center /*x-axis */;\n justify-content: var(--slice-textbox-position, center) /*y-axis */;\n position: relative;\n color: var(--slice-text-color);\n --slicesui-textbox-a-pointer-events: none;\n --slicesui-button-background: var(--slice-textbox-button-fill-color, var(--highlight-color));\n --slicesui-button-color: var(--slice-textbox-button-color);\n --slicesui-button-background--hover: var(--slice-textbox-button-fill-hover-color);\n --slicesui-button-color--hover: var(--slice-textbox-button-hover-color);\n --slicesui-button-border-radius: var(--slice-textbox-button-border-radius);\n --slicesui-button-border-color: var(--slice-textbox-button-border-color);\n --slices-player-element-text-transition-delay--active: var(--slice-textbox-transition-delay, 1000ms);\n}\n:host(.text) ::slotted(*) {\n position: relative;\n max-width: 704px;\n max-width: calc(min(var(--erem) * 24));\n width: 100%;\n}\n:host(.cover) ::slotted(slicesui-av-player) {\n background: transparent;\n}\n:host(.cover.text[data-overlay="card"]) {\n padding: 12px;\n}\n:host(.text[layout="stack"]:not([no-visual])) {\n align-items: flex-end /*x-axis */;\n}\n:host(.text[layout="center"]) {\n align-items: center /*x-axis */;\n}\n:host(.text[layout="stack-reverse"]:not([no-visual])) {\n align-items: flex-start /*x-axis */;\n}\n:host(.text[active]) {\n --slicesui-textbox-a-pointer-events: all;\n}\n:host(.text:not([no-visual]):not([layout*="split"])):before {\n --slicesui-textbox-backdrop: linear-gradient(to var(--backdrop-direction, bottom), var(--slices-textbox-backdrop-end-color, rgba(0,0,0,0)), var(--slices-textbox-backdrop-start-color, rgba(0,0,0,0.7)));\n position: absolute;\n z-index: var(--z-index-content-text-backdrop);\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--slicesui-textbox-backdrop);\n content: \'\';\n opacity: 0;\n transition: 1000ms opacity ease;\n}\n:host(.text.cover:not([no-visual])):before {\n --slicesui-textbox-backdrop: var(--cover-background-color);\n --slice-textbox-gradient-opacity: 1;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: var(--cover-background-position, 50% 50%);\n}\n:host(.text:not([no-visual]):not([layout*="split"])[active]):before {\n opacity: var(--slice-textbox-gradient-opacity, 0.5);\n transition-delay: var(--slice-textbox-transition-delay, 1000ms);\n}\n:host([layout*="split"]:not([no-visual]):not([no-text])) {\n height: 50%;\n}\n:host([layout="split"].text) {\n padding-top: 24px;\n}\n:host([layout="split-reverse"].text) {\n padding-bottom: 24px;\n}\n:host([layout="split"].text:not([no-visual])),\n:host([layout="split-reverse"].visual) {\n top: 50%;\n}\n:host([layout="split-reverse"].text),\n:host([layout="split"].visual) {\n top: 0;\n}\n:host(.cover),\n:host(.back) {\n padding-top: 12px;\n --slicesui-image-object-fit: var(--cover-background-fit, cover);\n --slicesui-image-object-position: var(--cover-background-position, 50% 50%);\n --slice-textbox-transition-delay: 0ms;\n}\n:host(.cover) {\n justify-content: var(--cover-text-position, center);\n}\n:host(.cover.text) {\n padding: 0;\n}\n:host(.back.text) {\n padding: 0;\n}\n:host(.back.visual) {\n transition: 1000ms background ease;\n}\n:host(.back.visual[active]) {\n background: var(--cover-background-color);\n}\n:host(.widget) {\n padding: 0;\n display: block;\n}\n:host ::slotted(slicesui-poll) {\n z-index: var(--z-index-content-links);\n width: 100%;\n margin-top: 16px;\n}\n:host ::slotted(slicesui-poll[data-active]:not([voted])) {\n pointer-events: all;\n}\n:host ::slotted(slicesui-textbox) {\n display: block;\n position: relative;\n background: var(--slice-text-background-color);\n border-radius: calc(var(--slice-textbox-border-radius-px, 0) * 1px);\n text-align: var(--slice-text-align);\n padding: calc(var(--erem) * 0.75);\n --slices-text-h1--font-family: var(--slices-h1-font-family);\n --slices-text-h1--font-weight: var(--slices-h1-font-weight);\n --slices-text-h1--line-height: var(--slices-h1-line-height, var(--slices-headline-line-height));\n --slices-text-h2--font-family: var(--slices-h2-font-family);\n --slices-text-h2--font-weight: var(--slices-h2-font-weight);\n --slices-text-h2--line-height: var(--slices-h2-line-height, var(--slices-headline-line-height));\n --slices-text-h3--font-family: var(--slices-h3-font-family);\n --slices-text-h3--font-weight: var(--slices-h3-font-weight);\n --slices-text-h3--line-height: var(--slices-h3-line-height, var(--slices-headline-line-height));\n --slices-text-h4--font-family: var(--slices-h3-font-family);\n --slices-text-h4--font-weight: var(--slices-h3-font-weight);\n --slices-text-h4--line-height: var(--slices-h3-line-height, var(--slices-headline-line-height));\n}\n:host ::slotted(slicesui-textbox[data-transparent]) {\n padding: 0;\n background: transparent;\n}\n:host ::slotted(#credits) {\n position: absolute;\n left: 0;\n text-align: center;\n width: 100%;\n bottom: 24px;\n z-index: var(--z-index-content-links);\n pointer-events: all;\n text-decoration: none;\n}\n:host([active]) ::slotted(*) {\n opacity: 1;\n}\n:host([data-orientation="landscape"][layout*="split"].text) {\n padding-top: 64px;\n padding-bottom: 64px;\n justify-content: center;\n}\n:host([data-orientation="landscape"][layout*="split"]:not([no-visual]):not([no-text])) {\n height: 100%;\n width: 50%;\n}\n:host([data-orientation="landscape"][layout="split"].text:not([no-visual])),\n:host([data-orientation="landscape"][layout="split-reverse"].visual) {\n top: 0%;\n left: 50%;\n}\n:host([data-orientation="landscape"].cover.text) {\n flex-direction: row;\n justify-content: var(--cover-text-position-desktop, center);\n align-items: center;\n}\n:host([data-orientation="landscape"][data-overlay="card"].cover.text) {\n align-items: var(--cover-text-position-desktop, center);\n justify-content: center;\n}\n')}_stylesChanged(){const t=this.styles||{};for(let e in t)this.updateStyles(e,t[e]);this.updateStyles("--backdrop-direction","flex-start"===t["--slice-textbox-position"]?"top":"bottom"),this.layout=t["--slice-layout"]||"stack"}});class x extends(Object(s.c)(Object(s.a)(Object(i.a)(HTMLElement)))){static get properties(){return{config:{observe:!0,DOM:!0,fromAttributeConverter:o.c.fromAttribute,changedHandler:"_configChanged"},auto:{observe:!0,DOM:!0,fromAttributeConverter:o.a.fromAttribute},cssSelector:{observe:!0,DOM:!0,attributeName:"css-selector",fromAttributeConverter:o.d.fromAttribute}}}constructor(){super(),this.config={},this.auto=!1,this.cssSelector="slices-fonts"}_configChanged(t,e){JSON.stringify(t||"")!==JSON.stringify(e||"")&&this.auto&&(this.config.google&&this._loadGoogleFonts(this.config.google),this.config.typekit&&this._loadTypekitFonts(this.config.typekit),this.config.custom&&this._loadCustomFonts(this.config.custom))}_loadGoogleFonts(t){const e=t.families;this._loadStyleSheet("https://fonts.googleapis.com/css?family="+e.join("|"))}_loadTypekitFonts(t){const e=t.id;this._loadStyleSheet(`https://use.typekit.net/${e}.css`)}_loadCustomFonts(t){const e=t.urls;for(const t in e)this._loadStyleSheet(e[t])}_loadStyleSheet(t){fetch(t).then(t=>{200===t.status&&t.text().then(t=>this._parseCssResult(t))})}_parseCssResult(t){const e=t.replace(/}/g,"font-display: swap; }");let n=document.querySelector("."+this.cssSelector);!!n||(n=this._appendStylesTag(),n.classList.add(this.cssSelector)),n.innerHTML+=e,this.dispatchEvent(new CustomEvent("font-face-changed"))}_appendStylesTag(){const t=document.createElement("style");return document.body.appendChild(t),t}}window.customElements.define("font-loader",x);var w=n(8);const _=t=>t.requestFullscreen||t.webkitRequestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen,k=()=>document.isFullScreen||document.webkitIsFullScreen||document.mozFullScreen||document.msIsFullScreen||document.msFullScreen,C=t=>{const e=_(t);e&&e.call(t)},O=()=>{const t=document.exitFullscreen||document.webkitExitFullscreen||document.mozExitFullscreen||document.msExitFullscreen;t&&t.call(document)},S=t=>class extends t{constructor(){super(),window.addEventListener("keydown",this.constructor.__handleKeydown.bind(this)),window.addEventListener("keypress",this.constructor.__handleKeypress.bind(this)),window.addEventListener("keyup",this.constructor.__handleKeyup.bind(this))}static __handleKeydown(t){const e=this.constructor.keyDownBindings;for(var n in e)this.constructor.__handleKeybindingMethod.call(this,t,n,e)}static __handleKeypress(t){const e=this.constructor.keyPressBindings;for(var n in e)this.constructor.__handleKeybindingMethod.call(this,t,n,e)}static __handleKeyup(t){const e=this.constructor.keyUpBindings;for(var n in e)this.constructor.__handleKeybindingMethod.call(this,t,n,e)}static __handleKeybindingMethod(t,e,n){const i=n[e];for(let n in i)this.constructor.__handleKeybindingRequirementSet.call(this,t,e,i[n])}static __handleKeybindingRequirementSet(t,e,n){let i=0;for(var s in n)t[s]===n[s]&&i++;i===Object.keys(n).length&&this[e].call(this,t)}static get keyDownBindings(){return{}}static get keyPressBindings(){return{}}static get keyUpBindings(){return{}}},A=t=>t||window.location.href,T={fb:t=>{const e="https://www.facebook.com/sharer.php?s=100&u="+A(t),n=window.open(e,"Share on Facebook");n&&(n.opener=null)},tw:t=>{const e="https://twitter.com/intent/tweet?url="+A(t),n=window.open(e,"Share on Twitter");n&&(n.opener=null)},wa:t=>{const e="whatsapp://send?text="+A(t),n=window.open(e,"Share on Whatsapp");n&&(n.opener=null)},email:(t,e)=>{const n=document.createElement("a");n.href="mailto:?body="+e+"%0D%0A"+A(t),n.rel="noopener noreferrer",n.click()}};var E=n(17),$=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n0},t.prototype.connect_=function(){z&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),L?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){z&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;N.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),M=function(t,e){for(var n=0,i=Object.keys(e);n0},t}(),G="undefined"!=typeof WeakMap?new WeakMap:new $,X=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=I.getInstance(),i=new Y(e,n,this);G.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){X.prototype[t]=function(){var e;return(e=G.get(this))[t].apply(e,arguments)}}));var J=void 0!==j.ResizeObserver?j.ResizeObserver:X;class Z{constructor(t){this._observer=new J(()=>{window.requestAnimationFrame(()=>{const e=Math.min(t===document.body?window.innerWidth:t.offsetWidth,window.innerWidth),n=Math.min(t===document.body?window.innerHeight:t.offsetHeight,window.innerHeight),i=Math.min(e,n)/100,s=Math.max(Math.min(i,7),4);t.style.setProperty("--emin",i+"px"),t.style.setProperty("--ew",e+"px"),t.style.setProperty("--eh",n+"px"),t.style.setProperty("--eclamp",s+"px"),t.style.setProperty("--erem",4*s+"px")})}),this._observer.observe(t)}}class Q{constructor(t={}){this.previewUrl=t.url,this.sizes=t.sizes}get DEFAULT_IMAGE(){return{url:this.DEFAULT_URI,sizes:[]}}get DEFAULT_URI(){return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}get url(){const t=this.sizes;if(t[0])return t[0].url}get previewUrl(){return this["#previewUrl"]||this.DEFAULT_URI}set previewUrl(t=""){"data:image/"===t.substr(0,11)&&(this["#previewUrl"]=t)}get sizes(){return this["#sizes"]||[]}set sizes(t=[]){this["#sizes"]=t}get hidden(){return 0===this.sizes.length}}class tt{constructor(t={}){this.url=t.url,this.subtitlesUrl=t.textUrl,this.posterImage=t.posterImage,this.audio=t.audio,this.video=t.video,this.loop=t.loop,this.muted=t.muted,this.controlsHidden=t.controlsHidden,this.controlsFullscreen=t.fullscreenControls}get url(){return this["#url"]||"#"}set url(t=""){this["#url"]=t}get subtitlesUrl(){return this["#subtitlesUrl"]}set subtitlesUrl(t=""){this["#subtitlesUrl"]=t}get posterImage(){return this["#posterImage"]||new Q({})}set posterImage(t={}){this["#posterImage"]=new Q(t)}get sizes(){return this["#sizes"]||[]}set sizes(t=[]){this["#sizes"]=t}get type(){return this["#type"]||"audio"}get video(){return"video"===this["#type"]}set video(t){const e=Boolean(t);this["#type"]=e?"video":"audio"}get audio(){return"audio"===this["#type"]}set audio(t){const e=Boolean(t);this["#type"]=e?"audio":"video"}get loop(){return this["#loop"]||!1}set loop(t){this["#loop"]=Boolean(t)}get muted(){return this["#muted"]||!1}set muted(t){this["#muted"]=Boolean(t)}get controlsHidden(){return this["#controlsHidden"]||!1}set controlsHidden(t){this["#controlsHidden"]=Boolean(t)}get controlsFullscreen(){return this["#controlsFullscreen"]||!1}set controlsFullscreen(t){this["#controlsFullscreen"]=Boolean(t)}get hidden(){return!this["#url"]}}class et{constructor(t={}){this.name=t.name,this.speed=t.speed}get ALLOWED_NAMES(){return new Set(["","fadein","typewrite","highlight","focusin"])}get name(){return this["#name"]||Array.from(this.ALLOWED_NAMES)[0]}set name(t){this.ALLOWED_NAMES.has(t)&&(this["#name"]=t)}get speed(){return this["#speed"]||40}set speed(t=40){this["#speed"]=parseInt(t)}}n(18);function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function it(t){for(var e=1;e{void 0!==t[n]?this["#styles"].set(n,t[n]):this["#styles"].delete(n)})}get slug(){return this["#slug"]}set slug(t){this["#slug"]=t}get autoplayAudio(){return this["#autoplayAudio"]}set autoplayAudio(t){this["#autoplayAudio"]=Boolean(t)||!1}get relatedStories(){return this["#relatedStories"]||[]}set relatedStories(t){this["#relatedStories"]=t}get widgets(){return this["#widgets"]||[]}set widgets(t){this["#widgets"]=t}get textAnimation(){return this["#textAnimation"]||new et}set textAnimation(t){this["#textAnimation"]=new et(t)}get published(){return this["#published"]||!1}set published(t){this["#published"]=Boolean(t)}get timeCreated(){return this["#timeCreated"]}set timeCreated(t){this["#timeCreated"]=t}get timeLastPublished(){return this["#timeLastPublished"]}set timeLastPublished(t){this["#timeLastPublished"]=t}get webfonts(){return this["#webfonts"]||this.DEFAULT_WEBFONTS}set webfonts(t){this["#webfonts"]=t}get numberOfSlices(){return Object.keys(this.slicesIds).length}get imageCoordinates(){return this._parseCSSObjectPositionToFraction(this.styles["--cover-background-position"])}_parseCSSObjectPositionToFraction(t){if(!t)return{x:.5,y:.5};const[e,n]=t.split(" ");return{x:parseFloat((parseInt(e)/100).toFixed(2)),y:parseFloat((parseInt(n)/100).toFixed(2))}}}class rt{constructor(t={}){this.direction=t.direction,this.duration=t.duration,this.xPosition=t.xPosition,this.yPosition=t.yPosition,this.zoom=t.zoom,this.enabled=t.enabled}get ALLOWED_DIRECTIONS(){return new Set(["normal","reverse"])}get direction(){return this["#direction"]||Array.from(this.ALLOWED_DIRECTIONS)[0]}set direction(t){this.ALLOWED_DIRECTIONS.has(t)&&(this["#direction"]=t)}get duration(){return this["#duration"]||0}set duration(t){this["#duration"]=Number(t)}get xPosition(){return this["#xPosition"]||.5}set xPosition(t){this["#xPosition"]=Number(t)}get yPosition(){return this["#yPosition"]||.5}set yPosition(t){this["#yPosition"]=Number(t)}get zoom(){return this["#zoom"]||1}set zoom(t){this["#zoom"]=Number(t)}get enabled(){return this["#enabled"]||!1}set enabled(t){this["#enabled"]=Boolean(t)}}class at{constructor(t={}){this.type=t.type,this.value=t.value,this.label=t.label,this.startTime=t.startTime,this.endTime=t.endTime}get ALLOWED_TYPES(){return new Set(["empty","attachment","person","location"])}get type(){return this["#type"]||Array.from(this.ALLOWED_TYPES)[0]}set type(t){this.ALLOWED_TYPES.has(t)&&(this["#type"]=t)}get value(){return this["#value"]||{}}set value(t={}){this["#value"]=t||{}}get text(){return this.value.text}get lat(){return parseFloat(this.value.lat)}get lng(){return parseFloat(this.value.lng)}get zoom(){return parseFloat(this.value.zoom)}get embedCode(){return this.value.embedCode||""}get label(){return this["#label"]}set label(t="Untitled"){this["#label"]=t}get startTime(){return this["#startTime"]}set startTime(t){this["#startTime"]=parseFloat(t)}get endTime(){return this["#endTime"]}set endTime(t){this["#endTime"]=parseFloat(t)}get icon(){return"location"===this.type?"room":"person"===this.type?"perm_identity":"attach_file"}get hidden(){return"{}"===JSON.stringify(this["#value"])}}function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ct(t){for(var e=1;enew at(t))}get pollOptions(){return this["#pollOptions"]||{}}get hasPoll(){return Object.keys(this.pollOptions).length>0}set pollOptions(t={}){this["#pollOptions"]=t}get styles(){return ct(ct({},Object.fromEntries(this.SUPPORTED_STYLES)),Object.fromEntries(this["#styles"]||new Map))}set styles(t={}){this["#styles"]||(this["#styles"]=new Map),this.SUPPORTED_STYLES.forEach((e,n)=>{void 0!==t[n]?this["#styles"].set(n,t[n]):this["#styles"].delete(n)})}get customValues(){return this["#customValues"]||{}}set customValues(t={}){this["#customValues"]=t}get linkedSliceIds(){const t=(this.text.match(/slice:\/\/.*?\s/g)||[]).map(t=>t.replace(/slice:\/\/|"/g,"").trim());return new Set(t)}get imageCoordinates(){return this._parseCSSObjectPositionToFraction(this.styles["--slice-image-position"])}_parseCSSObjectPositionToFraction(t){if(!t)return{x:.5,y:.5};const[e,n]=t.split(" ");return{x:parseFloat((parseInt(e)/100).toFixed(2)),y:parseFloat((parseInt(n)/100).toFixed(2))}}}let ut,pt,ft,mt,gt,bt,vt,yt,xt,wt,_t,kt,Ct,Ot,St,At,Tt,Et,$t,zt,jt,Pt,Nt,Lt,It,Mt,Dt,Ft,Vt,Ut,Bt,Rt,Ht,qt,Wt,Kt,Yt,Gt,Xt,Jt,Zt,Qt,te=t=>t;class ee extends(S(h)){static get properties(){return{lang:{observe:!0},currentIndex:{observe:!0,DOM:!0,reflect:!0,attributeName:"current-index",fromAttributeConverter:o.b.fromAttribute,toAttributeConverter:o.b.toAttribute,changedHandler:"_currentIndexChanged"},storyId:{observe:!0,DOM:!0,attributeName:"story-id",fromAttributeConverter:o.d.fromAttribute},storyData:{observe:!0,DOM:!0,attributeName:"story-data",fromAttributeConverter:o.c.fromAttribute,changedHandler:"_storyDataChanged"},slicesData:{observe:!0,DOM:!0,attributeName:"slices-data",fromAttributeConverter:o.c.fromAttribute},votes:{observe:!0,DOM:!0,fromAttributeConverter:o.c.fromAttribute},mediaPaused:{observe:!0},mediaLoading:{observe:!0},mediaDuration:{observe:!0},mediaCurrentTime:{observe:!0,changedHandler:function(){!0===this.currentSlice.mediaTrack.controlsFullscreen&&this.render(!0,!1),!0===this.currentFootnote.hidden&&(this.footnoteOpened=!1)}},mediaControlsActive:{observe:!0},mediaMuted:{observe:!0},editable:{observe:!0,DOM:!0,reflect:!0,fromAttributeConverter:o.a.fromAttribute,toAttributeConverter:o.a.toAttribute,changedHandler:"_editableChanged"},flow:{observe:!0,DOM:!0,reflect:!0,fromAttributeConverter:o.d.fromAttribute,toAttributeConverter:o.d.toAttribute},footnoteOpened:{observe:!0,reflect:!0,attributeName:"footnote-opened",toAttributeConverter:o.a.toAttribute,changedHandler:"_footnoteOpenedChanged"},sliceFinished:{observe:!0,changedHandler:"_sliceFinishedChanged"},url:{observe:!0,DOM:!0,fromAttributeConverter:o.d.fromAttribute},canonicalUrl:{observe:!0,DOM:!0,attributeName:"canonical-url",fromAttributeConverter:o.d.fromAttribute},allowFullscreen:{observe:!0,DOM:!0,attributeName:"allow-fullscreen"},_coverLoaded:{observe:!0,changedHandler:"_importLazy"},orientation:{observe:!0},preview:{observe:!0,reflect:!0,toAttributeConverter:o.a.toAttribute,changedHandler:function(){this.preview&&(this.mediaPaused=!0,this.currentIndex=-1)}}}}static get propertiesChangedHandlers(){return{_toggleHeader:["currentIndex","maxIndex"],_setAVProgress:["mediaDuration","mediaCurrentTime"],_updateBackground:["slicesData","currentIndex"],render:["currentIndex","storyData","slicesData","mediaPaused","mediaLoading","mediaMuted","flow","editable","footnoteOpened","sliceFinished","allowFullscreen","_coverLoaded","orientation"]}}constructor(){super(),this.mediaPaused=!1,this.mediaMuted=!0,this.editable=!1,this.footnoteOpened=!1,this.sliceFinished=!1,this._coverLoaded=!1,this.allowFullscreen=!0,document.addEventListener("fullscreenchange",this._handleFullscreenChange.bind(this)),document.addEventListener("mozfullscreenchange",this._handleFullscreenChange.bind(this)),document.addEventListener("webkitfullscreenchange",this._handleFullscreenChange.bind(this)),document.addEventListener("msfullscreenchange",this._handleFullscreenChange.bind(this)),this.addEventListener("slices-link-tapped",this._handleLinkTap.bind(this)),this.addEventListener("mousemove",this._handleMousemove.bind(this)),this.addEventListener("click",this._handleClick.bind(this)),this._watchOrientation(),this._resizeObserver=new Z(this)}static get keyDownBindings(){return{_handleKeyLeft:[{code:"ArrowLeft"}],_handleKeyRight:[{code:"ArrowRight"}]}}firstRenderedCallback(){Object(E.a)(this.shadowRoot.querySelector("#footnote .container")),this._currentIndexChanged(-2)}connectedCallback(){super.connectedCallback(),this._storyDataChanged()}back(){!0!==this.editable&&!0!==this.footnoteOpened&&!0!==this.currentSlice.navigationDisabled&&this.currentIndex--}forward(){!0!==this.editable&&!0!==this.currentSlice.navigationDisabled&&!0!==this.footnoteOpened&&this.currentIndex++}get maxIndex(){return this.story.numberOfSlices}get currentIndex(){const t=parseFloat(this["#currentIndex"]);return isNaN(t)||t<-1?-1:t>this.maxIndex?this.maxIndex||0:t}get story(){return new ot(this.storyData)}get slicesIds(){return Object.keys(this.story.slicesIds)}get slices(){const t={};return Object.keys(this.story.slicesIds).map(e=>t[e]=new dt((this.slicesData||{})[e])),t}get currentSlice(){return this.slices[this.currentSliceId]||new dt}get currentSliceId(){if(-1===this.currentIndex)return"cover";if(this.currentIndex===this.maxIndex)return"back";const t=Object.values(this.story.slicesIds).indexOf(this.currentIndex);return-1!==t?Object.keys(this.story.slicesIds||[])[t]:void 0}get currentSliceDuration(){const t=this.currentSlice.duration;if(t)return t;const e=this.readingSpeed||300,n=this.currentSlice.wordCount/e;let i=Math.round(60*n*1e3);return i+=this.currentSlice.hasVisual?this.watchTime||3e3:0,i<3e3&&(i=3e3),i}get currentFootnote(){for(let t in this.currentSlice.footnotes)if(this.currentSlice.footnotes[t].startTime<=this.mediaCurrentTime&&this.currentSlice.footnotes[t].endTime>=this.mediaCurrentTime)return this.currentSlice.footnotes[t];return this.currentSlice.footnote}get lang(){return this.story.language}get fullscreen(){return k()}get votes(){return this["#votes"]||{}}get template(){return Object(r.a)(ut||(ut=te`
${0}
${0} ${0} ${0} ${0} ${0} ${0}
${0}
${0} `),"\n:host,\n:host *,\n*::before,\n*::after {\n box-sizing: border-box;\n}\na {\n color: inherit;\n}\n:host(:not(.focus-visible)),\n:host(.focus-visible),\n:host(:not(.focus-visible)) input,\n:host(:not(.focus-visible)) button,\n:host(:not(.focus-visible)) select {\n outline: none;\n}\n[hidden] {\n display: none !important;\n}\n@import 'https://firebasestorage.googleapis.com/v0/b/another-proto.appspot.com/o/fonts%2Fslices.css?alt=media&token=012cecd6-4e43-48de-a422-a2fbb495502e';\nhtml,\nbody,\n:host {\n/* text */\n --slices-text--font-family: 'Basis Grotesque Off-White', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n --slices-text-h--font-family: 'Basis Grotesque Off-White', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n --slices-text-h--alt-font-family: 'Apercu Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n --slices-text-title--font-size: calc(var(--erem) * 3.75);\n --slices-text-h0--font-size: calc(var(--erem) * 2.75);\n --slices-text-h1--font-size: calc(var(--erem) * 2);\n --slices-text-h2--font-size: calc(var(--erem) * 1.5);\n --slices-text-h3--font-size: calc(var(--erem) * 1.1);\n --slices-text-h4--font-size: calc(var(--erem) * 1);\n --slices-text-h5--font-size: calc(var(--erem) * 1);\n --slices-text-h6--font-size: calc(var(--erem) * 1);\n --slices-text-b1--font-size: calc(min(var(--erem), 22px));\n --slices-text-s1--font-size: calc(min(calc(var(--erem) * 0.8), 16px));\n --slices-text-s2--font-size: calc(min(calc(var(--erem) * 0.8), 12px));\n --slices-text-h--font-weight: 400;\n --slices-text-b--font-weight: 400;\n/* color */\n --slices-color-dark--100: #000;\n --slices-color-dark--90: #191919;\n --slices-color-dark--80: #333;\n --slices-color-dark--70: #4c4c4c;\n --slices-color-dark--60: #666;\n --slices-color-dark--50: #7f7f7f;\n --slices-color-dark--40: #999;\n --slices-color-dark--30: #b2b2b2;\n --slices-color-dark--20: #ccc;\n --slices-color-dark--10: #e5e5e5;\n --slices-color-light--100: #fff;\n --slices-color-light--90: rgba(255,255,255,0.9);\n --slices-color-light--80: rgba(255,255,255,0.8);\n --slices-color-light--70: rgba(255,255,255,0.7);\n --slices-color-light--60: rgba(255,255,255,0.6);\n --slices-color-light--50: rgba(255,255,255,0.5);\n --slices-color-light--40: rgba(255,255,255,0.4);\n --slices-color-light--30: rgba(255,255,255,0.3);\n --slices-color-light--20: rgba(255,255,255,0.2);\n --slices-color-light--10: rgba(255,255,255,0.1);\n --slices-color-highlight--100: #515ce7;\n --slices-color-highlight--90: #626ce9;\n --slices-color-highlight--80: #737ceb;\n --slices-color-highlight--70: #858cee;\n --slices-color-highlight--60: #969df0;\n --slices-color-highlight--50: #a8adf3;\n --slices-color-highlight--40: #b9bdf5;\n --slices-color-highlight--30: #cacef7;\n --slices-color-highlight--20: #dcdefa;\n --slices-color-highlight--10: #edeefc;\n}\n:host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n -webkit-tap-highlight-color: transparent;\n -webkit-text-size-adjust: none;\n background: #000;\n --z-index-content-visual: 1;\n --z-index-content-text-backdrop: 2;\n --z-index-content-text: 3;\n --z-index-content-links: 5;\n --z-index-nav-controls: 6;\n --z-index-nav-main: 5;\n --slicesui-button-background: rgba(0,0,0,0.2);\n --logo-fill-color: var(--highlight-color);\n --slicesui-progress-color: var(--highlight-color);\n --slices-text--font-family: var(--slices-main-font-family, 'Basis Grotesque Off-White', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif);\n --slices-text--font-weight: var(--slices-main-font-weight);\n --slices-text-b--font-weight: var(--slices-main-font-weight);\n --slices-text-s--font-weight: var(--slices-main-font-weight);\n --slices-text-h--font-family: var(--slices-headline-font-family, 'Apercu Condensed', sans-serif);\n --slices-text-h--font-weight: var(--slices-headline-font-weight, 700);\n --slices-text-h--line-height: var(--slices-headline-line-height, 1);\n --slices-player-content--padding: calc(var(--emin) * 3);\n --slices-player-element-text-opacity--initial: 0;\n --slices-player-element-text-opacity--active: 1;\n --slices-player-element-text-opacity--finished: 0;\n --slices-player-element-text-transform--initial: none;\n --slices-player-element-text-transform--active: none;\n --slices-player-element-text-transform--finished: none;\n --slices-player-element-text-transition-delay--initial: 0ms;\n --slices-player-element-text-transition-delay--active: var(--slice-textbox-transition-delay, 1000ms);\n --slices-player-element-text-transition-delay--finished: 0ms;\n --slices-player-element-visual-opacity--initial: 0;\n --slices-player-element-visual-opacity--active: 1;\n --slices-player-element-visual-opacity--finished: 0;\n --slices-player-element-visual-transform--initial: none;\n --slices-player-element-visual-transform--active: none;\n --slices-player-element-visual-transform--finished: none;\n --slices-player-element-visual-transition-delay--initial: 0ms;\n --slices-player-element-visual-transition-delay--active: 0ms;\n --slices-player-element-visual-transition-delay--finished: 0ms;\n}\n:host slicesui-formatting-bar {\n position: fixed;\n z-index: var(--z-index-nav-controls);\n}\n:host slicesui-progress {\n position: absolute;\n top: 4px;\n height: 3px;\n left: 4px;\n right: 4px;\n width: auto;\n z-index: var(--z-index-nav-controls);\n display: var(--slices-player-progess-bar-display, block);\n --slicesui-progress-border-radius: 0;\n}\n:host header {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: var(--z-index-nav-main);\n display: flex;\n flex-direction: var(--slices-player-header-flex-direction, row);\n align-items: center;\n justify-content: space-between;\n pointer-events: none;\n padding: var(--slices-player-content--padding);\n transition: 0.4s transform ease-out;\n transform: translateY(-96px);\n --slicesui-button-background: transparent;\n --slicesui-button-color: var(--highlight-color);\n --slicesui-community-buttons-fill: var(--highlight-color);\n}\n:host header a {\n height: calc(var(--erem) * 2);\n height: calc(var(--erem) * 2);\n}\n:host header a #logo {\n background: transparent;\n padding: 0;\n --slicesui-button-background: transparent;\n --slicesui-button-padding: 0;\n height: 100%;\n max-width: calc(var(--eclamp) * 16);\n}\n:host header a #logo svg {\n position: relative;\n height: 100%;\n max-width: 100%;\n}\n:host header #buttons-container {\n position: relative;\n z-index: var(--z-index-content-links);\n pointer-events: none;\n}\n:host header #buttons-container > * {\n display: var(--slices-header-social-display, none);\n pointer-events: all;\n}\n:host([browsing]) header {\n transform: translateY(0);\n}\n:host([browsing]) header > * {\n pointer-events: all;\n}\n:host main {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: var(--z-index-content-visual);\n background: var(--slice-background-color, var(--slice-figure-background-color, #000));\n transition: 800ms background ease;\n}\n:host footer {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: var(--z-index-nav-controls);\n display: flex;\n padding: var(--slices-player-content--padding);\n pointer-events: none;\n transition-duration: 500ms;\n transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);\n transition-property: transform;\n transform: var(--slices-player-footer--transform, none);\n --slicesui-button-background: transparent;\n}\n:host footer slicesui-button {\n pointer-events: all;\n}\n:host footer slicesui-button:not(:last-of-type) {\n margin-right: 8px;\n}\n:host footer slicesui-button:last-of-type {\n margin: 0 0 0 auto;\n}\n:host footer slicesui-button slicesui-icon {\n font-size: 22px;\n text-shadow: 0 0 4px #4c4c4c;\n}\n:host footer slicesui-button#footnoteToggleButton {\n z-index: var(--z-index-content-links);\n transition-duration: 500ms;\n transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);\n transition-property: transform, opacity;\n}\n:host footer slicesui-button#footnoteToggleButton slicesui-icon + span:not([hidden]) {\n margin-left: 8px;\n}\n:host footer slicesui-button#footnoteToggleButton[data-hidden] {\n transition-duration: 0s;\n opacity: 0;\n transform: translateY(64px);\n}\n:host footer slicesui-button#footnoteToggleButton slicesui-icon {\n font-size: var(--slices-text-b1--font-size);\n text-shadow: none;\n}\n:host footer slicesui-button.unmute {\n position: relative;\n}\n:host footer slicesui-button.unmute:after {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background: #fff;\n content: '';\n transform: scaleX(var(--slices-player-av-progress, 0));\n transform-origin: 0 0;\n}\n:host footer slicesui-button#footnoteToggleButton {\n --slicesui-button-background: var(--slices-footnote-button-fill-color, var(--highlight-color));\n --slicesui-button-color: var(--slices-footnote-button-text-color, inherit);\n}\n:host slicesui-carousel {\n pointer-events: var(--slicesui-textbox-a-pointer-events);\n min-width: 100%;\n height: calc(var(--erem) * 11);\n margin-top: 0;\n --slicesui-button-background: rgba(0,0,0,0.2);\n --slicesui-button-color: #fff;\n --slicesui-button-border-color: transparent;\n text-align: center;\n}\n:host slicesui-carousel a {\n width: calc(var(--erem) * 19);\n height: 100%;\n display: inline-flex;\n background: #4c4c4c;\n position: relative;\n justify-content: flex-end;\n flex-direction: column;\n padding: 16px;\n margin: 0 8px;\n text-decoration: none;\n}\n:host slicesui-carousel a > * {\n white-space: normal;\n text-align: start;\n color: #fff;\n}\n:host slicesui-carousel a h2 {\n z-index: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h6--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h6--font-size);\n font-weight: var(--slices-text-h6--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h6--line-height, var(--slices-text-h--line-height, 1));\n position: absolute;\n}\n:host slicesui-carousel a slicesui-image {\n --slicesui-image-object-fit: cover;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n:host slicesui-carousel a slicesui-image:after {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.5));\n content: '';\n}\n:host #continueButton {\n position: absolute;\n bottom: var(--slices-player-content--padding);\n left: 50%;\n z-index: var(--z-index-nav-main);\n transition: 1000ms opacity ease;\n opacity: 0;\n transform: translate(-50%, 0);\n --slicesui-button-border-radius: 50%;\n --slicesui-button-background: transparent;\n --slicesui-button-border-color: var(--highlight-color, rgba(255,255,255,0.6));\n --slicesui-button-color: var(--highlight-color, rgba(255,255,255,0.6));\n pointer-events: none;\n}\n:host #continueButton[data-active],\n:host #continueButton.focus-visible:focus {\n opacity: 1;\n pointer-events: all;\n}\n:host #continueButton slicesui-icon {\n transform: rotate(var(--slices-player-continue-button-rotate));\n font-size: var(--slices-text-b1--font-size);\n text-shadow: none;\n}\n#footnote {\n position: absolute;\n z-index: var(--z-index-nav-main);\n width: 768px;\n max-width: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n padding: 0 0 calc(var(--erem) * 4);\n transition-timing-function: ease-in-out;\n transition-duration: 600ms;\n transition-property: all;\n transform: translateY(100px);\n opacity: 0;\n background: var(--slices-footnote-button-fill-color, var(--highlight-color, #fff));\n pointer-events: none;\n}\n#footnote .container {\n color: var(--slices-footnote-button-text-color, #191919);\n margin: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: var(--erem);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n pointer-events: none;\n --slicesui-textbox-a-pointer-events: none;\n/* width */\n/* Track */\n/* Handle */\n}\n#footnote .container::-webkit-scrollbar {\n width: 8px;\n}\n#footnote .container::-webkit-scrollbar-track {\n background: transparent;\n}\n#footnote .container::-webkit-scrollbar-thumb {\n background: var(--slices-footnote-button-text-color, #191919);\n}\n#footnote[data-type=\"location\"] {\n padding: 0;\n}\n#footnote[data-type=\"location\"] .container {\n width: 100%;\n padding: 0;\n}\n#footnote .embed {\n margin: var(--erem) 0;\n background: #000;\n width: 100%;\n height: 0;\n overflow: hidden;\n padding-top: 56.25%;\n position: relative;\n}\n#footnote .embed > * {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n object-fit: contain;\n}\n#footnote h2 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h2--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h2--font-size);\n font-weight: var(--slices-text-h2--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h2--line-height, var(--slices-text-h--line-height, 1));\n}\n#footnote slicesui-textbox,\n#footnote google-map {\n margin: 0;\n flex: 1;\n}\n#footnote h2:not([hidden]) {\n margin-bottom: 16px;\n}\n:host([footnote-opened]) #footnote {\n opacity: 1;\n transform: translateY(0);\n}\n:host([footnote-opened]) #footnote .container {\n pointer-events: all;\n --slicesui-textbox-a-pointer-events: all;\n}\n:host([footnote-opened]) #continueButton {\n display: none;\n}\n#mouseCursor {\n position: fixed;\n z-index: var(--z-index-nav-main);\n transform: translate3d(var(--slices-cursor-left, 50vw), var(--slices-cursor-top, 50vh), 0) rotate(var(--slices-cursor-rotate));\n top: -12px;\n left: -12px;\n pointer-events: none;\n will-change: transform;\n display: none;\n --slicesui-button-border-radius: 50%;\n --slicesui-button-background: transparent;\n --slicesui-button-border-color: var(--highlight-color, rgba(255,255,255,0.6));\n --slicesui-button-color: var(--highlight-color, rgba(255,255,255,0.6));\n box-shadow: 0 0 1px rgba(255,255,255,0.6);\n border-radius: 50%;\n}\nslicesui-av-controls {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: var(--z-index-content-visual);\n --slicesui-av-controls-nav-button--color: var(--highlight-color);\n --slicesui-av-controls--padding: calc(var(--emin) * 3) calc(var(--emin) * 3) calc(var(--erem) * 4) calc(var(--emin) * 3);\n}\n#pointerNavigation {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: var(--no-preview--display, flex);\n z-index: var(--z-index-content-visual);\n cursor: none;\n}\n#pointerNavigation > *:nth-child(1) {\n flex: 1;\n}\n#pointerNavigation > *:nth-child(2) {\n flex: 2;\n}\n#credits {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-s1--font-family, var(--slices-text-s--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-s1--font-size);\n font-weight: var(--slices-text-s1--font-weight, var(--slices-text-s--font-weight, 400));\n line-height: var(--slices-text-s1--line-height, var(--slices-text-s--line-height, 1.2));\n display: inline-block;\n width: auto;\n left: auto;\n color: var(--cover-text-color, #fff);\n bottom: var(--slices-player-content--padding);\n height: calc(var(--erem) * 1.5);\n height: max(calc(var(--erem) * 1.5), 44px);\n display: flex;\n align-items: center;\n}\n#credits:hover {\n text-decoration: underline;\n}\nslices-player-element {\n position: absolute;\n pointer-events: none;\n}\nslices-player-element[data-overlay=\"no\"]:before,\nslices-player-element[data-overlay=\"card\"]:before {\n display: none;\n}\nslices-player-element > * {\n transition-property: transform, opacity;\n transition-duration: 800ms;\n transition-timing-function: ease-in-out;\n}\nslices-player-element.text > * {\n opacity: var(--slices-player-element-text-opacity--initial);\n transform: var(--slices-player-element-text-transform--initial);\n transition-delay: var(--slices-player-element-text-transition-delay--initial);\n}\nslices-player-element.visual > * {\n opacity: var(--slices-player-element-visual-opacity--initial);\n transform: var(--slices-player-element-visual-transform--initial);\n transition-delay: var(--slices-player-element-visual-transition-delay--initial);\n}\nslices-player-element.visual .visualContainer > * {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\nslices-player-element.cover > * {\n --slices-player-element-visual-transform--finished: scale(1.1);\n --slices-player-element-text-transition-delay--active: 0ms;\n}\nslices-player-element[active].text > * {\n opacity: var(--slices-player-element-text-opacity--active);\n transform: var(--slices-player-element-visual-transform--active);\n transition-delay: var(--slices-player-element-text-transition-delay--active);\n}\nslices-player-element[active].text slicesui-community-buttons {\n pointer-events: all;\n}\nslices-player-element[active].visual > * {\n opacity: var(--slices-player-element-visual-opacity--active);\n transform: var(--slices-player-element-visual-transform--active);\n transition-delay: var(--slices-player-element-visual-transition-delay--active);\n}\nslices-player-element[finished].text > * {\n opacity: var(--slices-player-element-text-opacity--finished);\n transform: var(--slices-player-element-text-transform--finished);\n transition-delay: var(--slices-player-element-text-transition-delay--finished);\n}\nslices-player-element[finished].visual > * {\n opacity: var(--slices-player-element-visual-opacity--finished);\n transform: var(--slices-player-element-visual-transform--finished);\n transition-delay: var(--slices-player-element-visual-transition-delay--finished);\n}\n:host([preview]:not([editable])) {\n --no-preview--display: none;\n --preview--display: inline-block;\n --cover-text--justify-content: center;\n --cover-title--font-size: var(--slices-text-h2--font-size);\n}\n:host([flow=\"horizontal\"]) slices-player-element.cover > * {\n --slices-player-element-text-transform--finished: translateX(-120vw);\n}\n:host([flow=\"vertical\"]) {\n --slices-player-continue-button-rotate: 90deg;\n}\n:host([flow=\"vertical\"]) slices-player-element {\n --slices-player-element-text-transform--initial: translateY(25vh);\n --slices-player-element-text-transform--active: none;\n --slices-player-element-text-transform--finished: translateY(-25vh);\n}\n:host([flow=\"vertical\"]) #pointerNavigation {\n flex-direction: column;\n}\n:host([editable]) slices-player-element[active] slicesui-textbox,\n:host([editable]) slices-player-element[active] #cardText {\n pointer-events: all;\n}\n@media (hover: hover) and (pointer: fine) {\n #pointerNavigation:hover + #mouseCursor {\n display: block;\n }\n}\n",'\n:host,\n:host *,\n*::before,\n*::after {\n box-sizing: border-box;\n}\na {\n color: inherit;\n}\n:host(:not(.focus-visible)),\n:host(.focus-visible),\n:host(:not(.focus-visible)) input,\n:host(:not(.focus-visible)) button,\n:host(:not(.focus-visible)) select {\n outline: none;\n}\n[hidden] {\n display: none !important;\n}\n.card {\n text-align: var(--cover-text-align, center);\n width: calc(var(--erem) * 24);\n max-width: 100%;\n --logo-height-base: 16px;\n --slicesui-community-buttons-fill: var(--cover-text-color, #fff);\n/*\n card content\n */\n}\n.card > * {\n position: relative;\n z-index: var(--z-index-content-text);\n}\n.card #cardLogo {\n margin: 12px 0;\n padding: var(--erem);\n display: var(--no-preview--display, block);\n}\n.card #cardLogo svg {\n height: calc(var(--erem) * var(--story-logo-height-multiplier, 1));\n --logo-fill-color: var(--cover-logo-color);\n}\n.card #cardText {\n color: var(--cover-text-color);\n width: 100%;\n padding: calc(var(--erem) * 0.9) var(--erem);\n}\n.card #cardText .h1 {\n --slicesui-textbox--font-family: var(--cover-title--font-family, var(--slices-text-h0--font-family, var(--slices-text-h--font-family)));\n --slicesui-textbox--font-size: var(--cover-title--font-size, var(--slices-text-h0--font-size));\n --slicesui-textbox--font-weight: var(--cover-title--font-weight, var(--slices-text-h--font-weight, var(--slices-text-h--font-weight)));\n --slicesui-textbox--line-height: var(--cover-title--line-height, 0.9);\n color: var(--cover-title-color);\n margin-bottom: 12px;\n}\n.card #cardText .h3 {\n --slicesui-textbox--font-family: var(--cover-introtext--font-family, var(--slices-text-b1--font-family, var(--slices-text-b--font-family)));\n --slicesui-textbox--font-size: var(--slices-text-b1--font-size);\n --slicesui-textbox--line-height: var(--cover-introtext--line-height, var(--slices-text-b--line-height));\n --slicesui-textbox--font-weight: var(--cover-introtext--font-family, var(--slices-text-b--font-weight, var(--slices-text-b--font-weight)));\n color: var(--cover-introtext-color);\n margin: 16px auto;\n width: auto;\n max-width: 100%;\n display: var(--no-preview--display, block);\n}\n.card #cardText hr {\n width: calc(var(--erem) * 2);\n width: calc(var(--erem) * 2);\n display: inline-block;\n margin: 4px 0 16px 0;\n border-bottom: 0;\n border-color: var(--cover-hr-color, var(--cover-text-color));\n border-width: calc(var(--erem) / 16) 0;\n display: var(--no-preview--display, inline-block);\n}\n.card #cardText .h6 {\n --slicesui-textbox--font-family: var(--cover-author--font-family, var(--slices-text-s1--font-family, var(--slices-text-s--font-family)));\n --slicesui-textbox--font-size: var(--slices-text-s1--font-size);\n --slicesui-textbox--line-height: var(--cover-author--line-height, var(--slices-text-s--line-height));\n --slicesui-textbox--font-weight: var(--cover-author--font-family, var(--slices-text-s--font-weight, var(--slices-text-s--font-weight)));\n color: var(--cover-author-color);\n margin: 0 auto;\n width: auto;\n max-width: 100%;\n display: var(--no-preview--display, block);\n}\n.card #cardText .h6 + .continueButton {\n margin-top: 32px;\n}\n.card #cardText .continueButton {\n --slicesui-button-border-color: var(--cover-button-color, var(--cover-text-color, #000));\n --slicesui-button-color: var(--cover-button-color, var(--cover-text-color, #000));\n --slicesui-button-background: var(--cover-button-background, transparent);\n --slicesui-button-border-radius: var(--cover-button-border-radius, 50%);\n pointer-events: all;\n}\n.card #cardText #previewButton {\n --slicesui-button-border-radius: initial;\n --slicesui-button-border-color: initial;\n --slicesui-button-background: initial;\n --slicesui-button-color: initial;\n display: var(--preview--display, none);\n pointer-events: all;\n}\n.card #cardText #startButton {\n display: var(--no-preview--display, inline-block);\n}\n.card #cardText #startButton slicesui-icon {\n transform: rotate(var(--slices-player-continue-button-rotate));\n}\n.card #cardText slicesui-community-buttons {\n display: inline-flex;\n justify-content: center;\n width: auto;\n margin-top: 16px;\n visibility: visible;\n --slicesui-button-background: transsparent;\n --slicesui-button-color: var(--highlight-color);\n}\n.card[data-overlay="no"] {\n position: absolute;\n}\n.card[data-overlay="card"] #cardLogo {\n margin-bottom: 12px;\n}\n.card[data-overlay="card"] #cardText {\n background: var(--cover-background-color);\n border-radius: calc(1px * var(--cover-textbox-border-radius-px));\n}\n.card[data-overlay="card"] #cardText .h1 {\n --slicesui-textbox--font-size: var(--slices-text-h1--font-size, var(--slices-text-h--font-size));\n}\n.card#backCard {\n --slicesui-button-background: rgba(0,0,0,0.2);\n --slicesui-button-color: #fff;\n text-align: center;\n}\n.card#backCard #cardText {\n background: transparent;\n}\n.card#backCard #cardText > * {\n margin-left: auto;\n margin-right: auto;\n}\n.card#backCard #cardText .h1 {\n --slicesui-textbox--font-size: var(--slices-text-h2--font-size, var(--slices-text-h--font-size));\n}\n.card#coverCard[data-overlay="no"] {\n width: 100%;\n background: var(--cover-background-color);\n}\n.card[data-orientation="landscape"][data-overlay="no"] {\n height: 100%;\n width: 512px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n.card[data-orientation="landscape"]#coverCard[data-overlay="no"] {\n width: 512px;\n}\n',this.story.webfonts,this.currentIndex+2,(this.maxIndex||0)+2,this.disabled,!window.navigator.share,this._handleShare,["fb","tw","wa"],window.navigator.share,this._handleShareButtonClick,this.story.publisherUrl?Object(r.a)(pt||(pt=te` `),this.story.publisherUrl,this._handleUrlClick,Object(w.a)(this.story.publisherLogo)):Object(r.a)(ft||(ft=te` `),Object(w.a)(this.story.publisherLogo)),this._renderCoverElements(),this.slicesIds.map(t=>this._renderSliceElement(this.slices[t],this.story.slicesIds[t],t)),this._renderBackElements(),this.story.widgets.map(t=>this._renderWidgetElements(t)),this.editable?Object(r.a)(mt||(mt=te``)):Object(r.a)(gt||(gt=te` `),!this._coverLoaded||!0===this.currentSlice.navigationDisabled||this.footnoteOpened,this.story.autoplayAudio?"unmute":"",()=>{this.story.autoplayAudio&&this._handleUnmuteClick()},this.back,this._handleNavBackEnter,this.forward,this._handleNavForwardEnter,this.click),this.editable?Object(r.a)(vt||(vt=te` `),(this.story.imageCoordinates||this.currentSlice.imageCoordinates).x,(this.story.imageCoordinates||this.currentSlice.imageCoordinates).y,-1===this.currentIndex?`/stories/${this.storyId}/styles/--cover-background-position`:`/slices/${this.currentSliceId}/styles/--slice-image-position`,this._handleImagePositionChanged):Object(r.a)(bt||(bt=te``)),this.mediaCurrentTime,this.mediaDuration,this.mediaLoading,this.mediaPaused,!this.currentSlice.mediaTrack.controlsFullscreen,this.navigationDisabled,t=>this.mediaPaused=t.target.paused,this._handleScrubMediaControls,this._handleSkipBackMediaControls,this._handleSkipForwardMediaControls,this.back,this.forward,!this.mediaMuted||!this.currentSlice.hasAudio,this._handleUnmuteClick,"volume_off",!0===this.footnoteOpened,this.mediaMuted||!0===this.currentSlice.mediaTrack.hidden||!0===this.currentSlice.mediaTrack.controlsHidden,()=>this.mediaPaused=!this.mediaPaused,this.mediaPaused?"unpause":"pause",this.mediaPaused?"play_arrow":"pause",!0===this.currentFootnote.hidden,this._handleToggleFootnote,this.currentFootnote.hidden?-1:0,this.footnoteOpened?"close":"open",!this.currentFootnote.label,this.footnoteOpened?"close":this.currentFootnote.icon,!this.currentFootnote.label,this.currentFootnote.label,this.sliceFinished,this.editable||!this._coverLoaded||-1===this.currentIndex||this.maxIndex<=this.currentIndex||!0===this.navigationDisabled,this.forward,!_(this)||!this.allowFullscreen,()=>(t=>{if(k())return O();C(t)})(this),this.fullscreen?"exit":"enable",this.fullscreen?"fullscreen_exit":"fullscreen",this._renderFootnote(),this.currentSlice.soundTrack.url,this._handleMediaLoadingChanged,this.currentSlice.entrySound.url,this.currentSlice.entrySound.loop)}_renderCoverElements(){return Object(r.a)(yt||(yt=te` ${0} ${0} `),this._renderElement(new dt({styles:{"--slice-layout":"stack-center","--slice-background-color":this.story.styles["--cover-background-color"]}}),-1,null,"cover visual",Object(r.a)(xt||(xt=te` `),this.story.coverImage.previewUrl,this.story.coverImage.sizes,this.editable,this._handleCoverLoadChange,this.story.coverImage.hidden,this.story.coverVideo.url,this.currentIndex<2,this.story.coverVideo.hidden,"cover",this.story.styles["--cover-background-position"],t=>{t.target.elapsedTime&&(this._coverLoaded=!0)})),this._renderElement(new dt({image:this.story.coverImage,mediaTrack:this.story.coverVideo,styles:{"--slice-layout":"stack-center","--slice-background-color":this.story.styles["--cover-background-color"]}}),-1,null,"cover text",Object(r.a)(wt||(wt=te`
${0} Open
`),this.story.styles["--cover-overlay"]||"no",this.orientation,!this.story.title&&!this.editable,Object(w.a)(this.story.publisherLogo),this.story.styles?Object(r.a)(_t||(_t=te`
`),this.editable?this.story.title:this.story.title.replace(/(?:\r\n|\r|\n)/g,"
"),this.editable,this.storyId,this._handleValueChanged,this.editable?this.story.introText:this.story.introText.replace(/(?:\r\n|\r|\n)/g,"
"),this.editable,this.storyId,this._handleValueChanged,!(this.story.introText||"").trim()&&!this.editable,!this.story.author&&!this.editable,this.editable?this.story.author:this.story.author.replace(/(?:\r\n|\r|\n)/g,"
"),this.editable,this.storyId,this._handleValueChanged,!this.story.author&&!this.editable):Object(r.a)(kt||(kt=te``)),this.story.autoplayAudio?"unmute":"",this.sliceFinished,this.editable,()=>{this.story.autoplayAudio&&this._handleUnmuteClick(),this.forward()},this._handlePreviewButtonClick)))}_renderBackElements(){return this._coverLoaded?this.currentIndex `),this.story.coverImage.previewUrl||"",this.currentIndex>=this.maxIndex)),this._renderElement({},this.maxIndex,null,"back text",Object(r.a)(Tt||(Tt=te`
${0}
${0} ${0} `),Object(w.a)(this.story.publisherLogo),this.editable?this.story.title:this.story.title.replace(/(?:\r\n|\r|\n)/g,"
"),this._handleShareButtonClick,this.story.relatedStories.length>0?Object(r.a)(Et||(Et=te` `)):Object(r.a)($t||($t=te``)),0===this.story.relatedStories.length,this.story.relatedStories.map(t=>Object(r.a)(zt||(zt=te`

${0}

`),t.url,this._handleUrlClick,this.currentIndex!==this.maxIndex,[{url:t.imageUrl,size:"100w"}],t.title)),this.currentIndex!==this.maxIndex?Object(r.a)(jt||(jt=te``)):Object(r.a)(Pt||(Pt=te` Created with Slices `),()=>this._notifyUserInteraction({category:"controls",action:"click-credits"}))))):Object(r.a)(Ct||(Ct=te``))}_renderWidgetElements(t){const e=Object.keys(t.styles).map(e=>`${e}:${t.styles[e]}`).join(";"),n=this.currentSlice.customValues[t.name];return Object(r.a)(Nt||(Nt=te` ${0} `),this._renderElement({},this.currentIndex,null,"text widget",Object(r.a)(Lt||(Lt=te`

`),n||0,null==n,e)))}_renderSliceElement(t,e,n){if(!this._coverLoaded)return Object(r.a)(It||(It=te``));const i=Math.abs(e-this.currentIndex)<2,s=e===this.currentIndex,o=-1!==["",void 0,null,"transparent"].indexOf(t.styles["--slice-text-background-color"])||t.styles["--slice-background-color"]===t.styles["--slice-text-background-color"]&&!t.hasVisual,a=i?t.mediaTrack.subtitlesUrl:null,l=!1===t.noText?Object(r.a)(Mt||(Mt=te` ${0} `),this._renderElement(t,e,n,"text",Object(r.a)(Dt||(Dt=te` ${0} ${0} `),!0===t.noText||!1===i?Object(r.a)(Ft||(Ft=te``)):Object(r.a)(Vt||(Vt=te` `),this.lang,t.text,t.textType,t.textAnimation.name?t.textAnimation:this.story.textAnimation,this.currentIndex==e,this.media,this.editable,t.noText,n,o,this._handleValueChanged,this._handleTextAnimationComplete,s?"":-1),t.hasPoll&&i?Object(r.a)(Ut||(Ut=te` `),t.pollOptions||{},this.votes[n]||{},s,t=>this.notify("user-vote",{detail:t.detail,composed:!0,bubbles:!0})):Object(r.a)(Bt||(Bt=te``))))):Object(r.a)(Rt||(Rt=te``)),c=Object(r.a)(Ht||(Ht=te` ${0} `),this._renderElement(t,e,n,"visual",Object(r.a)(qt||(qt=te`
${0}
`),!t.hasVisual,!0===t.stillImage.hidden||!1===i?Object(r.a)(Wt||(Wt=te``)):Object(r.a)(Kt||(Kt=te` `),t.stillImage.previewUrl,t.stillImage.sizes,i||this.currentSlice.linkedSliceIds.has(n)||this.story.slicesIds[n]===this._lastSliceIndex,this.editable&&e===this.currentIndex,t.visualAnimation,i&&!0===t.visualAnimation.enabled),i?t.mediaTrack.url:"#",a,!s||this.mediaPaused,t.mediaTrack.loop,i,t.mediaTrack.muted||!1,this.mediaCurrentTime,t.mediaTrack.hidden||!i,(this.styles||{})["--slice-image-fit"],(this.styles||{})["--slice-image-position"],s,this._handleMediaLoadingChanged,this._handleMediaElapsedTimeChanged,this._handleMediaFinished)));return Object(r.a)(Yt||(Yt=te`${0}${0}`),l,c)}_renderFootnote(){return Object(r.a)(Gt||(Gt=te`

${0}

${0}
`),!1===this.currentFootnote.hidden&&!0===this.footnoteOpened?0:-1,this.currentFootnote.type,this.footnoteOpened?0:-1,!this.currentFootnote.label||"location"===this.currentFootnote.type,this.currentFootnote.label,"location"===this.currentFootnote.type?Object(r.a)(Xt||(Xt=te``)):Object(r.a)(Jt||(Jt=te`
${0}
`),!this.currentFootnote.embedCode,Object(w.a)(this.currentFootnote.embedCode),this.currentFootnote.text,this.editable,this.currentSliceId,this._handleFootnoteValueChanged),"AIzaSyDsY75h5gMl9V20o3VeMdALdEtGfn0czH0",this.currentFootnote.lat,this.currentFootnote.lng,this.currentFootnote.zoom,this.editable,this._handleLatitudeChanged,this._handleLongitudeChanged,this._handleZoomChanged,"location"!==this.currentFootnote.type,this.currentFootnote.lat,this.currentFootnote.lng)}_renderElement(t=new dt,e,n=null,i="",s=Object(r.a)(Zt||(Zt=te``))){const o=e===this.currentIndex,a=Math.abs(e-this.currentIndex)<2,l=i.match(/cover/)?this.story.styles["--cover-overlay"]||"no":null;return Object(r.a)(Qt||(Qt=te` ${0} `),i,!a&&!this.currentSlice.linkedSliceIds.has(n)&&this.story.slicesIds[n]!==this._lastSliceIndex,o,e{this.orientation=this.offsetWidth>this.offsetHeight?"landscape":"portrait",window.requestAnimationFrame(()=>this.setAttribute("data-orientation",this.orientation)),this.preview=this.offsetWidth<320||this.offsetHeight<320}),this._resizeObserver.observe(this)}_handleLinkTap(t){if(t.preventDefault(),!t.detail.sliceId)return this._openURL(t.detail.value);const e=this.story.slicesIds[t.detail.sliceId];e&&(this.currentIndex=e),this._notifyUserInteraction({category:"jump",action:t.detail.sliceId,label:t.detail.label})}_toggleHeader(t,e){t>-1&&t-1&&(this._coverLoaded=!0),this._lastSliceIndex=t,this.mediaPaused=!1,this.footnoteOpened=!1,this._resetSliceTimer(),this.notify("user-navigation",{detail:{sliceId:this.currentSliceId,currentIndex:this.currentIndex}})}_updateBackground(){this.updateStyles("--slice-background-color",this.currentSlice.styles["--slice-background-color"]||"#fff"),this.updateStyles("--slice-textbox-gradient-opacity",this.currentSlice.styles["--slice-textbox-gradient-opacity"])}_handleMediaLoadingChanged(t){const e=t.target.closest("slices-player-element");e&&e.hasAttribute("active")&&(this.mediaLoading=t.detail.value)}_handleMediaElapsedTimeChanged(t){const e=t.target.closest("slices-player-element");e&&e.hasAttribute("active")&&(this.mediaDuration=t.target.duration||0,this.mediaCurrentTime=t.detail.value||0)}_handleMediaFinished(t){t.target.hasAttribute("data-active")&&t.target.elapsedTime===t.target.duration&&(!0!==t.target.loop&&(this.mediaPaused=!0),this.sliceFinished=!0)}_setAVProgress(t,e){const n=!0===this.currentSlice.mediaTrack.controlsHidden||0===t?0:(e/t).toFixed(2);this.updateStyles("--slices-player-av-progress",n,this)}_handleFullscreenChange(){this.render()}_handleMousemove(t){!0!==this.editable&&(window.cancelAnimationFrame(this._cursorDebouncer),this._cursorDebouncer=window.requestAnimationFrame(()=>{this.updateStyles("--slices-cursor-left",t.clientX+"px"),this.updateStyles("--slices-cursor-top",t.clientY+"px")}))}_handleNavBackEnter(){this.updateStyles("--slices-cursor-rotate","horizontal"===this.flow?"-180deg":"-90deg")}_handleNavForwardEnter(){this.updateStyles("--slices-cursor-rotate","horizontal"===this.flow?"0":"90deg")}_handleClick(t){const e=t.composedPath().find(t=>t.dataset&&void 0!==t.dataset.anlAction);e&&this._notifyUserInteraction({category:e.dataset.anlCategory,action:e.dataset.anlAction})}_storyDataChanged(){for(var t in this.flow=this.story.flow,this.story.styles)this.updateStyles(t,this.story.styles[t]);this.storyData&&this.story.coverImage.hidden&&(this._coverLoaded=!0)}_handleShare(){window.navigator.share({title:document.title,text:document.querySelector('meta[name="description"]').content,url:window.location.href})}_handleUnmuteClick(){!1!==this.mediaMuted&&(this.mediaMuted=!1)}_importLazy(){window.requestAnimationFrame(()=>{n.e(7).then(n.bind(null,30)),n.e(3).then(n.bind(null,31)),n.e(12).then(n.bind(null,24)),n.e(6).then(n.bind(null,32)),n.e(9).then(n.bind(null,22)),n.e(8).then(n.bind(null,21)),Promise.resolve().then(n.bind(null,20)),n.e(10).then(n.bind(null,25)),n.e(5).then(n.bind(null,33)),n.e(2).then(n.bind(null,28))})}_editableChanged(){n.e(11).then(n.bind(null,34)),n.e(4).then(n.bind(null,29))}_footnoteOpenedChanged(){this.mediaPaused=this.footnoteOpened,"location"===this.currentSlice.footnote.type&&(Promise.all([n.e(0),n.e(13)]).then(n.bind(null,26)),Promise.all([n.e(0),n.e(14)]).then(n.bind(null,27)))}_getSliceTextLength(t){const e=document.createElement("span");e.innerHTML=t||"";return e.textContent.length}_resetSliceTimer(){window.clearTimeout(this._sliceTimer),this.sliceFinished=!1,!1!==this.currentSlice.mediaTrack.hidden&&!0!==this.currentSlice.navigationDisabled&&(this.maxIndex<=this.currentIndex||!1===this.currentSlice.noText&&this.currentSlice.characterCount>0&&(this.currentSlice.textAnimation.name||this.story.textAnimation.name)||(this._sliceTimer=window.setTimeout(()=>this.sliceFinished=!0,this.currentSliceDuration)))}_sliceFinishedChanged(t,e){if(!0!==this.editable)return!1===t&&!0===e&&!0===this.currentSlice.autoplay?this.forward():void 0}_openURL(t){if(!t)return;const e=document.createElement("a");e.rel="noopener noreferrer",e.target="_blank",e.href=t,document.body.appendChild(e),e.click(),this._notifyUserInteraction({category:"navigate",action:"open-url",label:t})}_handleUrlClick(t){if(!t.currentTarget.href)return t.preventDefault();this._notifyUserInteraction({category:"navigate",action:"open-url",label:t.currentTarget.href})}_handleKeyLeft(t){!0!==this.editable&&(t.preventDefault(),this.back())}_handleKeyRight(t){!0!==this.editable&&(t.preventDefault(),this.forward())}_handleFootnoteValueChanged(t){t.target.dataset.path.match(this.currentSliceId)&&!0!==this.currentSlice.footnote.hidden&&this._notifyUserEdit(t.target.dataset.path,t.detail.value)}_handleValueChanged(t){void 0!==t.detail.value&&this._notifyUserEdit(t.target.dataset.path,t.detail.value)}_handleLatitudeChanged(t){!0!==this.currentSlice.footnote.hidden&&this._notifyUserEdit(`/slices/${this.currentSliceId}/extension/value/lat`,t.detail.value)}_handleLongitudeChanged(t){!0!==this.currentSlice.footnote.hidden&&this._notifyUserEdit(`/slices/${this.currentSliceId}/extension/value/lng`,t.detail.value)}_handleZoomChanged(t){!0!==this.currentSlice.footnote.hidden&&this._notifyUserEdit(`/slices/${this.currentSliceId}/extension/value/zoom`,t.detail.value)}_handleImagePositionChanged(t){if(!0!==t.target.pressed)return;const e=`${parseInt(100*t.detail.value.x)}% ${parseInt(100*t.detail.value.y)}%`;this._notifyUserEdit(t.target.dataset.path,e)}_notifyUserEdit(t,e){this.editable&&(this.notify("user-edit",{detail:{path:t,value:e}}),this.notify("slices-user-edit",{detail:{path:t,value:e},bubbles:!0,composed:!0}))}_notifyUserInteraction(t){this.notify("user-interaction",{detail:t})}_handleShareButtonClick(t){const e=t.detail.value;T[e](this.canonicalUrl,this.story.title),this._notifyUserInteraction({category:"share",action:e})}_handleToggleMediaControls(t){this.mediaControlsActive=t.target.active}_handleScrubMediaControls(t){const e=this.shadowRoot.querySelector("slices-player-element[active] slicesui-av-player");e&&e.setCurrentTime(t.detail.value)}_handleSkipBackMediaControls(){const t=this.shadowRoot.querySelector("slices-player-element[active] slicesui-av-player");t&&t.setCurrentTime(this.mediaCurrentTime-=10)}_handleSkipForwardMediaControls(){const t=this.shadowRoot.querySelector("slices-player-element[active] slicesui-av-player");t&&t.setCurrentTime(this.mediaCurrentTime+=10)}_handleToggleFootnote(){this.footnoteOpened=!this.footnoteOpened}_handleCoverLoadChange(t){window.requestAnimationFrame(()=>this._coverLoaded=t.detail.value)}_handlePreviewButtonClick(){this._openURL(this.url||"https://player.slices.co/stories/"+this.storyId)}_handleTextAnimationComplete(){window.setTimeout(()=>this.sliceFinished=!0,1e3)}}window.customElements.define("slices-player",ee);let ne,ie=t=>t;class se extends(Object(s.a)(Object(i.a)(HTMLElement))){get template(){return Object(r.a)(ne||(ne=ie` `),this.storyId,this.storyData||{},this.slicesData||{},this.votes,window.location.href,this.canonicalUrl,this.allowFullscreen,this._handleUserNavigation,this._handleUserInteraction,this._handleUserVote)}static get properties(){return{storyId:{observe:!0,DOM:!0,attributeName:"story-id",fromAttributeConverter:o.d.fromAttribute},storyData:{observe:!0,DOM:!0,attributeName:"story-data",fromAttributeConverter:o.c.fromAttribute},slicesData:{observe:!0,DOM:!0,attributeName:"slices-data",fromAttributeConverter:o.c.fromAttribute},votes:{observe:!0,DOM:!0,fromAttributeConverter:o.c.fromAttribute},canonicalUrl:{observe:!0,DOM:!0,attributeName:"canonical-url",fromAttributeConverter:o.d.fromAttribute},allowFullscreen:{observe:!0,DOM:!0,attributeName:"allow-fullscreen",fromAttributeConverter:o.a.fromAttribute}}}propertiesChangedCallback(){this.render()}constructor(){super(),this.attachShadow({mode:"open"}),this.votes={}}connectedCallback(){super.connectedCallback(),this.render()}render(){Object(r.b)(this.template,this.shadowRoot,{eventContext:this,scopeName:this.localName})}_handleUserNavigation(t){this.storyId&&this.dispatchEvent(new CustomEvent("user-navigation",{detail:t.detail}))}_handleUserInteraction(t){this.storyId&&this.dispatchEvent(new CustomEvent("user-interaction",{detail:t.detail}))}_handleUserVote(t){this.storyId&&this.dispatchEvent(new CustomEvent("user-vote",{detail:t.detail}))}}window.customElements.define("slices-player-app",se)},function(t,e,n){"use strict";n.r(e);var i=n(6),s=n(0);const o="attachShadow"in Element.prototype&&"getRootNode"in Element.prototype,r=!(!o||!document.createElement("div").attachShadow({mode:"open"}).getSelection),a=window.ShadyDOM&&window.ShadyDOM.inUse,l=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=!o||a||!r&&!l,h=/^(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|script|source|style|template|track|wbr)$/,d=[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.DOCUMENT_FRAGMENT_NODE];function u(t,e,n){const i=e.childNodes||e.children;if(!i)return e;for(let e=0;e{document.dispatchEvent(new CustomEvent("-shadow-selectionchange"))}),()=>{};let t=!1;document.addEventListener("selectionchange",e=>{if(t)return;t=!0;const n=window.getSelection();if("Caret"===n.type){const t=function(t,e){const n=[],i=t=>{for(let e=0;e{t=!1})})}();const g=new Map;function b(t){if(a){const t=document.getSelection();return t.rangeCount?t.getRangeAt(0):null}if(c){const e=document.getSelection();return e.containsNode(t,!0)?e.getRangeAt(0):null}if(r){const e=t.getSelection();return e.rangeCount?e.getRangeAt(0):null}const e=g.get(t);if(e)return e;const n=function(t){const e=window.getSelection();if("None"===e.type)return{range:null,type:"none"};if("Caret"!==e.type&&"Range"!==e.type)throw new TypeError("unexpected type: "+e.type);const n=u(e,t,!0);if(n===t)return{range:null,mode:"none"};const i=document.createRange();let s=null,o=void 0;if("Range"===e.type&&(s=u(e,t,!1),o=function(t,e,n){if("Range"!==t.type)return;const i=()=>t.toString().length,s=i();let o;return t.modify("extend","forward","character"),o=i(),o>s||f(t,n,!0)?(t.modify("extend","backward","character"),!0):os||f(t,e,!1)?(t.modify("extend","forward","character"),!1):o=0;--n){s.splitText(n);if(e.toString().length!==r){l=n+1;break}}for(s.insertData(s.length,t.substr(s.length));s.nextSibling!==n;)s.nextSibling.remove()}if(n.nodeType===Node.TEXT_NODE){n!==s&&(n.appendData("?"),e.collapseToStart(),e.modify("extend","right","character"));const t=n.textContent,i=n.nextSibling;for(let i=n===s?l:t.length-1;i>=0;--i)if(n.splitText(i),""===e.toString()){a=i;break}for(n.insertData(n.length,t.substr(n.length));n.nextSibling!==i;)n.nextSibling.remove();n!==s&&n.deleteData(n.length-1,1),null===s&&(s=n,l=a)}else null===s&&(s=n);1===r&&p&&p.node===n&&p.offset>a&&o&&(o=!1);!0===o?(e.collapse(n,a),e.extend(s,l)):!1===o?(e.collapse(s,l),e.extend(n,a)):e.setPosition(n,a);return i.setStart(n,a),i.setEnd(s,l),{range:i,mode:"normal"}}(t);return g.set(t,n.range),window.setTimeout(()=>{g.delete(t)},0),n.range}var v=n(8);let y,x,w,_=t=>t;class k extends i.a{static get properties(){return{text:{observe:!0,DOM:!0,fromAttributeConverter:s.d.fromAttribute,toAttributeConverter:s.d.toAttribute,changedHandler:"_textChanged"},placeholder:{observe:!0,DOM:!0,fromAttributeConverter:s.d.fromAttribute,toAttributeConverter:s.d.toAttribute},type:{observe:!0,DOM:!0,fromAttributeConverter:s.d.fromAttribute,toAttributeConverter:s.d.toAttribute},editable:{observe:!0,DOM:!0,reflect:!0,fromAttributeConverter:s.a.fromAttribute,toAttributeConverter:s.a.toAttribute},plaintext:{observe:!0,DOM:!0,fromAttributeConverter:s.a.fromAttribute},animation:{observe:!0,DOM:!0,fromAttributeConverter:s.c.fromAttribute,changedHandler:"_animationChanged"},animationEnabled:{observe:!0}}}constructor(){super(),document.addEventListener("selectionchange",this._handleSelectionChange.bind(this)),this.text="",this.placeholder="Click here to start typing...",this.type="",this.editable=!1,this.plaintext=!1,this.animationRunning=!1}static get propertiesChangedHandlers(){return{_triggerRender:["text","placeholder","type","editable","plaintext","_editingText","animation","animationEnabled"],_toggleAnimation:["animation","animationEnabled"]}}get template(){return Object(i.b)(y||(y=_` ${0} `),'\n:host,\n:host *,\n*::before,\n*::after {\n box-sizing: border-box;\n}\na {\n color: inherit;\n}\n:host(:not(.focus-visible)),\n:host(.focus-visible),\n:host(:not(.focus-visible)) input,\n:host(:not(.focus-visible)) button,\n:host(:not(.focus-visible)) select {\n outline: none;\n}\n[hidden] {\n display: none !important;\n}\n:host {\n display: block;\n}\n:host article {\n outline: none;\n text-align: var(--slicesui-textbox-text-align);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-b1--font-family, var(--slices-text-b--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-b1--font-size);\n font-weight: var(--slices-text-b1--font-weight, var(--slices-text-b--font-weight, 400));\n line-height: var(--slices-text-b1--line-height, var(--slices-text-b--line-height, 1.4));\n font-family: var(--slicesui-textbox--font-family, var(--slices-text-b1--font-family, var(--slices-text-b--font-family, var(--slices-text--font-family))));\n font-size: var(--slicesui-textbox--font-size, var(--slices-text-b1--font-size));\n font-weight: var(--slicesui-textbox--font-weight, var(--slices-text-b1--font-weight, var(--slices-text-b--font-weight, 400)));\n line-height: var(--slicesui-textbox--line-height, var(--slices-text-b1--line-height, var(--slices-text-b--line-height)));\n}\n:host article[data-type="caption"] {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-s1--font-family, var(--slices-text-s--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-s1--font-size);\n font-weight: var(--slices-text-s1--font-weight, var(--slices-text-s--font-weight, 400));\n line-height: var(--slices-text-s1--line-height, var(--slices-text-s--line-height, 1.2));\n}\n:host article h1 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h1--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h1--font-size);\n font-weight: var(--slices-text-h1--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h1--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article h2 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h2--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h2--font-size);\n font-weight: var(--slices-text-h2--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h2--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article h3 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h3--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h3--font-size);\n font-weight: var(--slices-text-h3--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h3--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article h4 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h4--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h4--font-size, 2rem);\n font-weight: var(--slices-text-h4--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h4--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article h5 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h5--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h5--font-size);\n font-weight: var(--slices-text-h5--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h5--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article h6 {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h6--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h6--font-size);\n font-weight: var(--slices-text-h6--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h6--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article blockquote {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-blockquote--font-family, var(--slices-text-b--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h2--font-size);\n font-weight: var(--slices-text-blockquote--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-blockquote--line-height, var(--slices-text-h--line-height, 1));\n}\n:host article a {\n color: var(--slicesui-textbox-link-color, var(--slicesui-page-textbox-color));\n pointer-events: var(--slicesui-textbox-a-pointer-events, all);\n}\n:host article a:hover,\n:host article a:active {\n color: var(--slicesui-textbox-link-hover-color, var(--slicesui-page-textbox-color));\n text-decoration-color: var(--slicesui-textbox-link-hover-color, var(--slicesui-page-textbox-color));\n}\n:host article a[href^="slice://"] {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n margin: 0;\n font-family: var(--slices-text-h6--font-family, var(--slices-text-h--font-family, var(--slices-text--font-family)));\n font-size: var(--slices-text-h6--font-size);\n font-weight: var(--slices-text-h6--font-weight, var(--slices-text-h--font-weight, 700));\n line-height: var(--slices-text-h6--line-height, var(--slices-text-h--line-height, 1));\n font-weight: $slices-text-h--font-weight;\n line-height: 1;\n background: var(--slicesui-button-background, transparent);\n color: var(--slicesui-button-color, inherit);\n border-radius: var(--slicesui-button-border-radius, 6px);\n border: 2px solid var(--slicesui-button-border-color, transparent);\n padding: var(--slicesui-button-padding, 0 calc(var(--erem) * 0.75));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n text-decoration-color: transparent;\n margin-top: 6px;\n margin-bottom: 6px;\n height: calc(var(--erem) * 2);\n height: max(calc(var(--erem) * 2), 44px);\n}\n:host article a[href^="slice://"]:hover {\n background: var(--slicesui-button-background--hover, var(--slicesui-button-background, inherit));\n color: var(--slicesui-button-color--hover, var(--slicesui-button-color, inherit));\n border-color: var(--slicesui-button-border-color--hover, var(--slicesui-button-border-color));\n}\n:host article[contenteditable] {\n -webkit-user-select: text;\n user-select: text;\n}\n:host article[contenteditable]:empty:after {\n content: attr(data-placeholder);\n cursor: text;\n opacity: 0.5;\n}\n:host span[data-nodetype="char"] {\n display: inline-flex;\n}\n:host [data-nodetype="word"] {\n white-space: nowrap;\n}\n:host [data-animation-name] span[data-nodetype="char"]:not([data-visible]) {\n transition: none;\n}\n:host [data-animation-name="focusin"] span[data-nodetype="char"] {\n transform-origin: 50%;\n transform: scale(3);\n filter: blur(6px);\n opacity: 0;\n}\n:host [data-animation-name="focusin"] span[data-nodetype="char"][data-visible] {\n transform: scale(1);\n opacity: 1;\n filter: blur(0px);\n transition: 0.5s all ease-in-out;\n}\n:host [data-animation-name="fadein"] span[data-nodetype="char"] {\n transform-origin: 50%;\n transition: 0.2s all ease-in-out;\n opacity: 0;\n}\n:host [data-animation-name="fadein"] span[data-nodetype="char"][data-visible] {\n opacity: 1;\n transition: 0.5s all ease-in-out;\n}\n:host [data-animation-name="typewrite"] span[data-nodetype="char"] {\n opacity: 0;\n}\n:host [data-animation-name="typewrite"] span[data-nodetype="char"][data-visible] {\n opacity: 1;\n}\n:host [data-animation-name="highlight"] span {\n position: relative;\n}\n:host [data-animation-name="highlight"] span:after {\n position: absolute;\n top: 0;\n left: -0.5ch;\n right: -0.5ch;\n min-width: 100%;\n height: 100%;\n background: var(--slicesui-textbox-highlight-color, #ff0);\n transform: scaleX(0);\n transform-origin: 0 0;\n content: \'\';\n z-index: -1;\n}\n:host [data-animation-name="highlight"] span[data-visible]:after {\n transform: scaleX(1);\n transition: 0.2s transform;\n}\n',this.editable?Object(i.b)(x||(x=_`
${0}
`),this.placeholder,this.editable,!1,this.type,this._handleInput,this._handlePaste,()=>this._editingText=!0,()=>this._editingText=!1,Object(v.a)(this.text)):Object(i.b)(w||(w=_`
${0}
`),this.type,this._handleClick,this._parseText(this.text)))}get article(){return this.shadowRoot.querySelector("article")}_triggerRender(){this._editingText||this.render()}_handleSelectionChange(){if(!this.editable)return;const t=b(this.shadowRoot);t&&!this.plaintext&&this.dispatchEvent(new CustomEvent("selection-change",{detail:{range:t},composed:!0,bubbles:!0}))}_textChanged(){this.editable&&this._notifyText(),this.article&&(!b(this.shadowRoot)||this.editable)}_handleInput(){this.text=this.article.innerHTML,this._handleSelectionChange()}_handlePaste(t){t.preventDefault();const e=t.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,e)}_handleClick(t){const e=(Array.from(t.composedPath()).filter(t=>"A"===t.nodeName)||[])[0];if(!e)return;t.preventDefault();const n=((e.href.match(/slice:\/\/(.*?)(\?|#|$)/)||[])[1]||"").trim(),i=e.innerHTML.trim();this._notifyClick(e.href,n,i)}_notifyClick(t,e,n){this.dispatchEvent(new CustomEvent("slices-link-tapped",{detail:{value:t,sliceId:e,label:n},bubbles:!0,composed:!0}))}_notifyText(){this.dispatchEvent(new CustomEvent("text-changed",{detail:{value:(this["#text"]||"").replace(//g,"")}}))}_parseText(t){if(!this.animation||!this.animation.name)return Object(v.a)(t);const e=document.createElement("article");e.innerHTML=t.replace(/delete t.dataset.visible)}_runAnimationPart(t,e,n,i,s,o){return new Promise(r=>{const a=e&&e.textContent.match(/\.|:|;|!|\?/)?s*o:s;window.setTimeout(()=>{window.requestAnimationFrame(()=>{t.dataset.visible="",r(),parseInt(n)===parseInt(i)&&this.dispatchEvent(new CustomEvent("animation-complete"))})},a)})}_animationChanged(){this.editable||this.render()}_parseHTMLNode(t){const e=t.cloneNode(),n=Array.from(t.childNodes);for(let t in n)"#text"===n[t].nodeName&&e.appendChild(this._parseTextNode(n[t])),"#text"!==n[t].nodeName&&e.appendChild(this._parseHTMLNode(n[t]));return e.querySelectorAll('span[data-nodetype="textnode"]').forEach(t=>t.innerHTML=this._separateWords(t.textContent)),e}_parseTextNode(t){const e=document.createElement("span");return e.dataset.nodetype="textnode",e.innerHTML=t.textContent,e}_separateWords(t){return t.split(/\s/g).map(t=>`${this._separateCharacters(t)}`).join(" ")}_separateCharacters(t){return t.trim().match(/(.?)/g).slice(0,-1).map(t=>`${t.trim()}`).join("")}}window.customElements.define("slicesui-textbox",k)}]); //# sourceMappingURL=1a851082570905907533.js.map