lew-ui 1.0.13 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -9
- package/dist/lew.es.ts +9305 -3469
- package/dist/lew.umd.ts +45 -12
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/package.json +14 -7
package/dist/lew.umd.ts
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,r){typeof exports=="object"&&typeof module!="undefined"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(E=typeof globalThis!="undefined"?globalThis:E||self,r(E["lew-ui"]={},E.Vue))})(this,function(E,r){"use strict";var nh=Object.defineProperty,sh=Object.defineProperties;var oh=Object.getOwnPropertyDescriptors;var Ti=Object.getOwnPropertySymbols;var Go=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable;var Yo=(E,r,oe)=>r in E?nh(E,r,{enumerable:!0,configurable:!0,writable:!0,value:oe}):E[r]=oe,te=(E,r)=>{for(var oe in r||(r={}))Go.call(r,oe)&&Yo(E,oe,r[oe]);if(Ti)for(var oe of Ti(r))Ko.call(r,oe)&&Yo(E,oe,r[oe]);return E},fe=(E,r)=>sh(E,oh(r));var Zo=(E,r)=>{var oe={};for(var M in E)Go.call(E,M)&&r.indexOf(M)<0&&(oe[M]=E[M]);if(E!=null&&Ti)for(var M of Ti(E))r.indexOf(M)<0&&Ko.call(E,M)&&(oe[M]=E[M]);return oe};var oe="",M=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},Cn=M(r.defineComponent({name:"LewFlex",props:{direction:{type:String,default:"row"},x:{type:String,default:"center"},y:{type:String,default:"center"},mode:{type:String,default:""},wrap:{type:Boolean,default:!1},gap:{type:String,default:"10px"},width:{type:String,default:""}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-flex",`${i.direction?"lew-flex-"+i.direction:""} ${i.wrap?"lew-flex-wrap":""} ${i.x?"lew-flex-x-"+i.x:""} ${i.y?"lew-flex-y-"+i.y:""} ${i.mode?"lew-flex-mode-"+i.mode:""}
|
|
2
|
+
`]),style:r.normalizeStyle(`gap: ${i.gap}; width:${i.width}`)},[r.renderSlot(e.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-0a8a3e9b"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/flex/src/LewFlex.vue"]]),rh="";const Jo={class:"lew-space"};var Tn=M(r.defineComponent({name:"LewSpace",props:{direction:{type:String,default:"row"}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",Jo,[r.renderSlot(e.$slots,"default")]))}}),[["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/space/src/LewSpace.vue"]]),ch="",$n=M(r.defineComponent({name:"LewLayout",props:{direction:{type:String,default:"row"},x:{type:String,default:"center"},y:{type:String,default:"center"},mode:{type:String,default:""}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-flex",`${i.direction?"lew-flex-"+i.direction:""} ${i.x?"lew-flex-x-"+i.x:""} ${i.y?"lew-flex-y-"+i.y:""} ${i.mode?"lew-flex-mode-"+i.mode:""} `])},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-38cc287d"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/layout/src/LewLayout.vue"]]);/*!
|
|
2
3
|
* vue-router v4.0.13
|
|
3
4
|
* (c) 2022 Eduardo San Martin Morote
|
|
4
5
|
* @license MIT
|
|
5
|
-
*/const Rn=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Nn=(e=>Rn?Symbol(e):"_vr_"+e)("r");var Tt;(function(e){e.pop="pop",e.push="push"})(Tt||(Tt={}));var Vt;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Vt||(Vt={}));var Dt;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Dt||(Dt={}));function In(){return o.inject(Nn)}var ja="";const Mn=o.defineComponent({name:"LewBadge",props:{type:{type:String,default:"primary"},round:{type:Boolean,default:!1},bold:{type:Number,default:400},dot:{type:Boolean,default:!1},href:{type:String,default:""}},setup(e){const t=e,n=In(),r=()=>{t.href&&(t.href.includes("http")?window.open(t.href,"_blank"):n.push(t.href))};return(a,s)=>(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(["lew-badge",`${e.dot?"lew-badge-dot":""} ${e.round?"lew-badge-round":""} ${e.href?"lew-badge-href":""} lew-badge-${e.type} `]),style:o.normalizeStyle(` font-weight:${e.bold}`),onClick:s[0]||(s[0]=i=>r())},[o.renderSlot(a.$slots,"default")],6))}});var Pa="",zn=P(o.defineComponent({name:"LewTitle",props:{bold:{type:Number,default:600},size:{type:String,default:"24px"}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["lew-title",`${e.bold?"lew-title-bold":""}`]),style:o.normalizeStyle(`font-weight:${e.bold};font-size:${e.size}`)},[o.renderSlot(t.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-391c178e"]]),Wa="";const jn={class:"title-label"};var Pn=P(o.defineComponent({name:"LewFormItem",props:{title:{type:String,default:"\u6807\u9898"},direction:{type:String,default:"x"}},setup(e){const t=e;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["lew-form-item",`lew-form-item-${e.direction}`])},[o.createElementVNode("label",jn,o.toDisplayString(t.title),1),o.renderSlot(n.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-bd1d3568"]]),Ha="";const Fn=["disabled"];var Rt=P(o.defineComponent({name:"LewInput",props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=o.ref(n.modelValue);o.watch(()=>n.modelValue,()=>{r.value=n.modelValue});const a=s=>{let i=s.target.value;t("update:modelValue",i)};return(s,i)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",{"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),class:"lew-input",disabled:n.disabled,placeholder:"\u8BF7\u8F93\u5165",onInput:a},null,40,Fn)),[[o.vModelText,r.value]])}}),[["__scopeId","data-v-1364aebe"]]),Xa="";const Wn={class:"lew-select"},Un=["onClick"];var Hn=P(o.defineComponent({name:"LewSelect",props:{modelValue:{type:String,default:""},options:{type:Array,default(){return[]}}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=o.ref(""),a=o.ref("");o.onMounted(()=>{var p;a.value=(p=n.options.find(f=>f.value==n.modelValue))==null?void 0:p.label});let s=o.ref(!1);const i=()=>{s.value=!0},c=()=>{setTimeout(()=>{s.value=!1},150)},u=p=>{a.value=p.label,r.value==p.value,t("update:modelValue",p.value)};return(p,f)=>(o.openBlock(),o.createElementBlock("div",Wn,[o.createVNode(Rt,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=g=>a.value=g),placeholder:"\u8BF7\u9009\u62E9",onFocus:i,onBlur:c},null,8,["modelValue"]),o.createElementVNode("div",{class:o.normalizeClass(["options-box",{isShowOptions:o.unref(s)}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.options,g=>(o.openBlock(),o.createElementBlock("div",{key:g.value,class:"item",onClick:b=>u(g)},o.toDisplayString(g.label),9,Un))),128))],2)]))}}),[["__scopeId","data-v-63e71814"]]),Ga="";const qn=["disabled"];var Xn=P(o.defineComponent({name:"LewSwitch",props:{modelValue:{type:Boolean,default:()=>!1},round:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=o.ref(n.modelValue);o.watch(()=>n.modelValue,()=>{r.value=n.modelValue});const a=()=>{t("update:modelValue",r.value)};return(s,i)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",{"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),class:o.normalizeClass({round:e.round}),type:"checkbox",disabled:n.disabled,onChange:a},null,42,qn)),[[o.vModelCheckbox,r.value]])}}),[["__scopeId","data-v-52343795"]]),Ja="";const Yn=["disabled"];var Gn=P(o.defineComponent({name:"LewTextarea",props:{modelValue:{type:String,default:""},resize:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=o.ref(n.modelValue);o.watch(()=>n.modelValue,()=>{r.value=n.modelValue});const a=s=>{let i=s.target.value;t("update:modelValue",i)};return(s,i)=>o.withDirectives((o.openBlock(),o.createElementBlock("textarea",{"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),class:o.normalizeClass(["lew-textarea btf-scrollbar",`resize-${e.resize}`]),rows:"3",cols:"3",disabled:n.disabled,placeholder:"\u8BF7\u8F93\u5165",onInput:a},null,42,Yn)),[[o.vModelText,r.value]])}}),[["__scopeId","data-v-54e15f33"]]),Qa="";const Kn=[(e=>(o.pushScopeId("data-v-0f975742"),e=e(),o.popScopeId(),e))(()=>o.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1))],Jn=["checked"];var Nt=P(o.defineComponent({name:"LewCheckbox",props:{label:{type:String,required:!0},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},checked:{type:Boolean}},emits:["update:checked"],setup(e,{emit:t}){const n=r=>{t("update:checked",r.target.checked)};return(r,a)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["lew-checkbox",`${e.block?"lew-checkbox-block":""} ${e.round?"lew-checkbox-round":""}`])},[o.createElementVNode("div",{class:o.normalizeClass(["icon-checkbox-box",{"icon-checked-box":e.checked}])},[(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(["icon-checkbox",{"icon-checked":e.checked}]),viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"4",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Kn,2))],2),o.withDirectives(o.createElementVNode("input",{type:"checkbox",checked:e.checked,onInput:n},null,40,Jn),[[o.vShow,!1]]),o.createTextVNode(" "+o.toDisplayString(e.label),1)],2))}}),[["__scopeId","data-v-0f975742"]]),ri="",Zn=P(o.defineComponent({name:"LewCheckboxGroup",props:{modelValue:{type:Array,default:()=>[],required:!0},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},direction:{type:String,default:"x"},options:{type:Array,default:()=>[],required:!0,validator:e=>{const t=e.every(r=>Object.keys(r).includes("name")),n=e.every(r=>Object.keys(r).includes("id"));return t&&n}}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=(s,i)=>{let c=[...n.modelValue];s=Number(s),i?c.push(s):c.splice(c.indexOf(s),1),t("update:modelValue",c)},a=s=>(s=Number(s),n.modelValue.includes(s));return(s,i)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["lew-checkbox-group",`lew-checkbox-group-${e.direction}`])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.options,c=>(o.openBlock(),o.createBlock(Nt,{key:c.id,block:e.block,round:e.round,label:c.name,checked:a(c.id),"onUpdate:checked":u=>r(c.id,u)},null,8,["block","round","label","checked","onUpdate:checked"]))),128))],2))}}),[["__scopeId","data-v-95a0abfe"]]),ai="";const Qn=[(e=>(o.pushScopeId("data-v-6be47ae3"),e=e(),o.popScopeId(),e))(()=>o.createElementVNode("div",{class:"icon-radio"},null,-1))],er=["checked"];var It=P(o.defineComponent({name:"LewRadio",props:{label:{type:String,required:!0},block:{type:Boolean,default:()=>!1},checked:{type:Boolean}},emits:["update:checked"],setup(e,{emit:t}){const n=()=>{t("update:checked")};return(r,a)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["lew-radio",`${e.block?"lew-radio-block":""} `])},[o.createElementVNode("div",{class:o.normalizeClass(["icon-radio-box",{"icon-checked-box":e.checked}])},Qn,2),o.withDirectives(o.createElementVNode("input",{type:"radio",checked:e.checked,onInput:n},null,40,er),[[o.vShow,!1]]),o.createTextVNode(" "+o.toDisplayString(e.label),1)],2))}}),[["__scopeId","data-v-6be47ae3"]]),ci="",tr=P(o.defineComponent({name:"LewRadioGroup",props:{modelValue:{type:Number,default:()=>0,required:!0},block:{type:Boolean,default:()=>!1},direction:{type:String,default:"x"},options:{type:Array,default:()=>[],required:!0,validator:e=>{const t=e.every(r=>Object.keys(r).includes("name")),n=e.every(r=>Object.keys(r).includes("id"));return t&&n}}},emits:["update:modelValue"],setup(e,{emit:t}){const n=r=>{t("update:modelValue",Number(r))};return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["lew-radio-group",`lew-radio-group-${e.direction}`])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.options,s=>(o.openBlock(),o.createBlock(It,{key:s.id,block:e.block,label:s.name,checked:e.modelValue==s.id,"onUpdate:checked":i=>n(s.id)},null,8,["block","label","checked","onUpdate:checked"]))),128))],2))}}),[["__scopeId","data-v-1c9758ec"]]),di="";const nr={class:"lew-tabs"},rr=["onClick"];var or=P(o.defineComponent({name:"LewTabs",props:{modelValue:{type:String,default:""},options:{type:Array,default(){return[]}}},emits:["update:change","update:modelValue"],setup(e,{emit:t}){const n=e;let r=o.ref(""),a=o.ref(n.modelValue),s=o.ref([]);const i=()=>{let u=n.options.findIndex(p=>p.value==a.value);u<0&&(u=0),r.value=`width:${s.value[u].offsetWidth}px;transform: translateX(${s.value[u].offsetLeft}px);`},c=(u,p)=>{if(u.value==n.modelValue)return;a.value=n.options[p].value;let f=s.value[p];r.value=`width:${f.offsetWidth}px;transform: translateX(${f.offsetLeft}px);`,t("update:change",{label:u.label,value:u.value,activeIndex:p}),t("update:modelValue",u.value)};return o.onMounted(()=>{i()}),(u,p)=>(o.openBlock(),o.createElementBlock("div",nr,[o.createElementVNode("div",{style:o.normalizeStyle(o.unref(r)),class:"activeItem"},null,4),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.options,(f,g)=>(o.openBlock(),o.createElementBlock("div",{key:f.value,ref_for:!0,ref:b=>o.unref(s).push(b),class:"lew-tabs-item",onClick:b=>c(f,g)},o.toDisplayString(f.label),9,rr))),128))]))}}),[["__scopeId","data-v-2912852e"]]);const ar={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ir=[o.createElementVNode("g",{fill:"none"},[o.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1)];var sr=o.defineComponent({name:"Alert24Regular",render:function(t,n){return o.openBlock(),o.createElementBlock("svg",ar,ir)}});const lr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},cr=[o.createElementVNode("g",{fill:"none"},[o.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z",fill:"currentColor"})],-1)];var ur=o.defineComponent({name:"CheckmarkCircle24Regular",render:function(t,n){return o.openBlock(),o.createElementBlock("svg",lr,cr)}});const dr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 20 20"},fr=[o.createElementVNode("g",{fill:"none"},[o.createElementVNode("path",{d:"M3.897 4.054l.073-.084a.75.75 0 0 1 .976-.073l.084.073L10 8.939l4.97-4.97a.75.75 0 0 1 .976-.072l.084.073a.75.75 0 0 1 .073.976l-.073.084L11.061 10l4.97 4.97a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L10 11.061l-4.97 4.97a.75.75 0 0 1-.976.072l-.084-.073a.75.75 0 0 1-.073-.976l.073-.084L8.939 10l-4.97-4.97a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",fill:"currentColor"})],-1)];var pr=o.defineComponent({name:"Dismiss20Filled",render:function(t,n){return o.openBlock(),o.createElementBlock("svg",dr,fr)}});const mr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},hr=[o.createElementVNode("g",{fill:"none"},[o.createElementVNode("path",{d:"M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z",fill:"currentColor"})],-1)];var vr=o.defineComponent({name:"ErrorCircle24Regular",render:function(t,n){return o.openBlock(),o.createElementBlock("svg",mr,hr)}});const gr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},yr=[o.createElementVNode("g",{fill:"none"},[o.createElementVNode("path",{d:"M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z",fill:"currentColor"})],-1)];var br=o.defineComponent({name:"Info24Regular",render:function(t,n){return o.openBlock(),o.createElementBlock("svg",gr,yr)}});const wr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xr=[o.createElementVNode("g",{fill:"none"},[o.createElementVNode("path",{d:"M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z",fill:"currentColor"})],-1)];var _r=o.defineComponent({name:"Warning24Regular",render:function(t,n){return o.openBlock(),o.createElementBlock("svg",wr,xr)}});function kr(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Mt=/\s*,(?![^(]*\))\s*/g,Cr=/\s+/g;function Er(e,t){const n=[];return t.split(Mt).forEach(r=>{let a=kr(r);if(a){if(a===1){e.forEach(i=>{n.push(r.replace("&",i))});return}}else{e.forEach(i=>{n.push((i&&i+" ")+r)});return}let s=[r];for(;a--;){const i=[];s.forEach(c=>{e.forEach(u=>{i.push(c.replace("&",u))})}),s=i}s.forEach(i=>n.push(i))}),n}function Or(e,t){const n=[];return t.split(Mt).forEach(r=>{e.forEach(a=>{n.push((a&&a+" ")+r)})}),n}function Br(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=Er(t,n):t=Or(t,n))}),t.join(", ").replace(Cr," ")}const $r=/[A-Z]/g;function zt(e){return e.replace($r,t=>"-"+t.toLowerCase())}function Ar(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
6
|
-
|
|
6
|
+
*/const Qo=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",ea=(i=>Qo?Symbol("[vue-router]: "+i):"[vue-router]: "+i)("router");var En;(function(i){i.pop="pop",i.push="push"})(En||(En={}));var Sn;(function(i){i.back="back",i.forward="forward",i.unknown=""})(Sn||(Sn={}));var Ln;(function(i){i[i.aborted=4]="aborted",i[i.cancelled=8]="cancelled",i[i.duplicated=16]="duplicated"})(Ln||(Ln={}));function $i(){return r.inject(ea)}var uh="",An=M(r.defineComponent({name:"LewMark",props:{type:{type:String,default:"normal"},round:{type:Boolean,default:!1},link:{type:String,default:""},bold:{type:Number,default:400}},setup(i){const e=i,t=$i(),n=()=>{e.link&&(e.link.startsWith("http")?window.open(e.link):t.push(e.link))};return(s,o)=>(r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(["lew-mark",`lew-mark-${i.type} ${i.round?"lew-mark-round":""} ${i.link?"lew-mark-link":""}`]),style:r.normalizeStyle(`font-weight:${i.bold};`),onClick:n},[r.renderSlot(s.$slots,"default")],6))}}),[["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/mark/src/LewMark.vue"]]),mh="",fh="";const ta={class:"lew-tabs"},ia=["onClick"];var Pn=M(r.defineComponent({name:"LewTabs",props:{modelValue:{type:String,default:""},options:{type:Array,default(){return[]}}},emits:["update:change","update:modelValue"],setup(i,{emit:e}){const t=i;let n=r.ref(""),s=r.ref(t.modelValue),o=r.ref([]);const a=()=>{let h=t.options.findIndex(f=>f.value==s.value);h<0&&(h=0),n.value=`width:${o.value[h].offsetWidth}px;transform: translateX(${o.value[h].offsetLeft}px);`},l=(h,f)=>{if(h.value==t.modelValue)return;s.value=t.options[f].value;let m=o.value[f];n.value=`width:${m.offsetWidth}px;transform: translateX(${m.offsetLeft}px);`,e("update:change",{label:h.label,value:h.value,activeIndex:f}),e("update:modelValue",h.value)};let c;const u=()=>{clearTimeout(c),c=setTimeout(()=>{console.log(1),a()},250)};return r.onMounted(()=>{t.modelValue==""&&(s.value=t.options[0].value),a(),window.addEventListener("resize",u,!1)}),r.onUnmounted(()=>{window.removeEventListener("resize",u)}),(h,f)=>(r.openBlock(),r.createElementBlock("div",ta,[r.createElementVNode("div",{style:r.normalizeStyle(r.unref(n)),class:"activeItem"},null,4),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(m,g)=>(r.openBlock(),r.createElementBlock("div",{key:m.value,ref_for:!0,ref:b=>r.unref(o).push(b),class:r.normalizeClass(["lew-tabs-item",{active:r.unref(s)==m.value}]),onClick:b=>l(m,g)},r.toDisplayString(m.label),11,ia))),128))]))}}),[["__scopeId","data-v-6111b125"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/tabs/src/LewTabs.vue"]]),yh="";const na={class:"lew-breadcrumb"};var On=M(r.defineComponent({name:"LewSteps",props:{},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",na))}}),[["__scopeId","data-v-5e4b1dfe"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/steps/src/LewSteps.vue"]]),vh="";const Nn=i=>(r.pushScopeId("data-v-5303b0ef"),i=i(),r.popScopeId(),i),sa={class:"lew-breadcrumb"},oa=["onClick"],aa={key:0,class:"lew-breadcrumb-parting"},ra={key:0,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:"arco-icon arco-icon-oblique-line","stroke-width":"4","stroke-linecap":"butt","stroke-linejoin":"miter"},la=[Nn(()=>r.createElementVNode("path",{d:"M29.506 6.502 18.493 41.498"},null,-1))],ca={key:1,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:"arco-icon arco-icon-right","stroke-width":"4","stroke-linecap":"butt","stroke-linejoin":"miter"},da=[Nn(()=>r.createElementVNode("path",{d:"m16 39.513 15.556-15.557L16 8.4"},null,-1))];var Mn=M(r.defineComponent({name:"LewBreadcrumb",props:{options:{type:Array,default(){return[]}},iconType:{type:String,default(){return"sprit"}}},setup(i){const e=$i(),t=n=>{n&&(n.startsWith("http")?window.open(n):e.push(n))};return(n,s)=>(r.openBlock(),r.createElementBlock("div",sa,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(o,a)=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass(["lew-breadcrumb-item",{"lew-breadcrumb-active":o.active}])},[r.createElementVNode("span",{class:r.normalizeClass({"lew-breadcrumb-isPath":!!o.path}),onClick:l=>t(o.path)},r.toDisplayString(o.label),11,oa),a!=i.options.length-1?(r.openBlock(),r.createElementBlock("div",aa,[i.iconType=="sprit"?(r.openBlock(),r.createElementBlock("svg",ra,la)):r.createCommentVNode("v-if",!0),i.iconType=="shoulder"?(r.openBlock(),r.createElementBlock("svg",ca,da)):r.createCommentVNode("v-if",!0)])):r.createCommentVNode("v-if",!0)],2))),128))]))}}),[["__scopeId","data-v-5303b0ef"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/breadcrumb/src/LewBreadcrumb.vue"]]),le="top",ue="bottom",pe="right",ce="left",Gt="auto",Ct=[le,ue,pe,ce],it="start",Tt="end",ha="clippingParents",In="viewport",$t="popper",ua="reference",Bn=Ct.reduce(function(i,e){return i.concat([e+"-"+it,e+"-"+Tt])},[]),Dn=[].concat(Ct,[Gt]).reduce(function(i,e){return i.concat([e,e+"-"+it,e+"-"+Tt])},[]),pa="beforeRead",ma="read",fa="afterRead",ga="beforeMain",ya="main",ba="afterMain",va="beforeWrite",wa="write",xa="afterWrite",Ei=[pa,ma,fa,ga,ya,ba,va,wa,xa];function _e(i){return i?(i.nodeName||"").toLowerCase():null}function ge(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function nt(i){var e=ge(i).Element;return i instanceof e||i instanceof Element}function de(i){var e=ge(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function Si(i){if(typeof ShadowRoot=="undefined")return!1;var e=ge(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function ka(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},o=e.elements[t];!de(o)||!_e(o)||(Object.assign(o.style,n),Object.keys(s).forEach(function(a){var l=s[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function _a(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var s=e.elements[n],o=e.attributes[n]||{},a=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),l=a.reduce(function(c,u){return c[u]="",c},{});!de(s)||!_e(s)||(Object.assign(s.style,l),Object.keys(o).forEach(function(c){s.removeAttribute(c)}))})}}var Rn={name:"applyStyles",enabled:!0,phase:"write",fn:ka,effect:_a,requires:["computeStyles"]};function ye(i){return i.split("-")[0]}var Xe=Math.max,Kt=Math.min,st=Math.round;function ot(i,e){e===void 0&&(e=!1);var t=i.getBoundingClientRect(),n=1,s=1;if(de(i)&&e){var o=i.offsetHeight,a=i.offsetWidth;a>0&&(n=st(t.width)/a||1),o>0&&(s=st(t.height)/o||1)}return{width:t.width/n,height:t.height/s,top:t.top/s,right:t.right/n,bottom:t.bottom/s,left:t.left/n,x:t.left/n,y:t.top/s}}function Li(i){var e=ot(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function zn(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Si(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function be(i){return ge(i).getComputedStyle(i)}function Ca(i){return["table","td","th"].indexOf(_e(i))>=0}function ze(i){return((nt(i)?i.ownerDocument:i.document)||window.document).documentElement}function Zt(i){return _e(i)==="html"?i:i.assignedSlot||i.parentNode||(Si(i)?i.host:null)||ze(i)}function Vn(i){return!de(i)||be(i).position==="fixed"?null:i.offsetParent}function Ta(i){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,t=navigator.userAgent.indexOf("Trident")!==-1;if(t&&de(i)){var n=be(i);if(n.position==="fixed")return null}var s=Zt(i);for(Si(s)&&(s=s.host);de(s)&&["html","body"].indexOf(_e(s))<0;){var o=be(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function Et(i){for(var e=ge(i),t=Vn(i);t&&Ca(t)&&be(t).position==="static";)t=Vn(t);return t&&(_e(t)==="html"||_e(t)==="body"&&be(t).position==="static")?e:t||Ta(i)||e}function Ai(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function St(i,e,t){return Xe(i,Kt(e,t))}function $a(i,e,t){var n=St(i,e,t);return n>t?t:n}function Fn(){return{top:0,right:0,bottom:0,left:0}}function Hn(i){return Object.assign({},Fn(),i)}function jn(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}var Ea=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Hn(typeof e!="number"?e:jn(e,Ct))};function Sa(i){var e,t=i.state,n=i.name,s=i.options,o=t.elements.arrow,a=t.modifiersData.popperOffsets,l=ye(t.placement),c=Ai(l),u=[ce,pe].indexOf(l)>=0,h=u?"height":"width";if(!(!o||!a)){var f=Ea(s.padding,t),m=Li(o),g=c==="y"?le:ce,b=c==="y"?ue:pe,v=t.rects.reference[h]+t.rects.reference[c]-a[c]-t.rects.popper[h],x=a[c]-t.rects.reference[c],C=Et(o),S=C?c==="y"?C.clientHeight||0:C.clientWidth||0:0,w=v/2-x/2,p=f[g],L=S-m[h]-f[b],k=S/2-m[h]/2+w,N=St(p,k,L),R=c;t.modifiersData[n]=(e={},e[R]=N,e.centerOffset=N-k,e)}}function La(i){var e=i.state,t=i.options,n=t.element,s=n===void 0?"[data-popper-arrow]":n;if(s!=null&&!(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s))){if(de(s)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),!zn(e.elements.popper,s)){console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=s}}var Aa={name:"arrow",enabled:!0,phase:"main",fn:Sa,effect:La,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function at(i){return i.split("-")[1]}var Pa={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oa(i){var e=i.x,t=i.y,n=window,s=n.devicePixelRatio||1;return{x:st(e*s)/s||0,y:st(t*s)/s||0}}function Un(i){var e,t=i.popper,n=i.popperRect,s=i.placement,o=i.variation,a=i.offsets,l=i.position,c=i.gpuAcceleration,u=i.adaptive,h=i.roundOffsets,f=i.isFixed,m=a.x,g=m===void 0?0:m,b=a.y,v=b===void 0?0:b,x=typeof h=="function"?h({x:g,y:v}):{x:g,y:v};g=x.x,v=x.y;var C=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=ce,p=le,L=window;if(u){var k=Et(t),N="clientHeight",R="clientWidth";if(k===ge(t)&&(k=ze(t),be(k).position!=="static"&&l==="absolute"&&(N="scrollHeight",R="scrollWidth")),k=k,s===le||(s===ce||s===pe)&&o===Tt){p=ue;var U=f&&k===L&&L.visualViewport?L.visualViewport.height:k[N];v-=U-n.height,v*=c?1:-1}if(s===ce||(s===le||s===ue)&&o===Tt){w=pe;var W=f&&k===L&&L.visualViewport?L.visualViewport.width:k[R];g-=W-n.width,g*=c?1:-1}}var F=Object.assign({position:l},u&&Pa),q=h===!0?Oa({x:g,y:v}):{x:g,y:v};if(g=q.x,v=q.y,c){var G;return Object.assign({},F,(G={},G[p]=S?"0":"",G[w]=C?"0":"",G.transform=(L.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",G))}return Object.assign({},F,(e={},e[p]=S?v+"px":"",e[w]=C?g+"px":"",e.transform="",e))}function Na(i){var e=i.state,t=i.options,n=t.gpuAcceleration,s=n===void 0?!0:n,o=t.adaptive,a=o===void 0?!0:o,l=t.roundOffsets,c=l===void 0?!0:l;{var u=be(e.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some(function(f){return u.indexOf(f)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
7
|
+
|
|
8
|
+
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
|
9
|
+
|
|
10
|
+
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var h={placement:ye(e.placement),variation:at(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Un(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Un(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Ma={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Na,data:{}},Jt={passive:!0};function Ia(i){var e=i.state,t=i.instance,n=i.options,s=n.scroll,o=s===void 0?!0:s,a=n.resize,l=a===void 0?!0:a,c=ge(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",t.update,Jt)}),l&&c.addEventListener("resize",t.update,Jt),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",t.update,Jt)}),l&&c.removeEventListener("resize",t.update,Jt)}}var Ba={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ia,data:{}},Da={left:"right",right:"left",bottom:"top",top:"bottom"};function Qt(i){return i.replace(/left|right|bottom|top/g,function(e){return Da[e]})}var Ra={start:"end",end:"start"};function qn(i){return i.replace(/start|end/g,function(e){return Ra[e]})}function Pi(i){var e=ge(i),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function Oi(i){return ot(ze(i)).left+Pi(i).scrollLeft}function za(i){var e=ge(i),t=ze(i),n=e.visualViewport,s=t.clientWidth,o=t.clientHeight,a=0,l=0;return n&&(s=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:s,height:o,x:a+Oi(i),y:l}}function Va(i){var e,t=ze(i),n=Pi(i),s=(e=i.ownerDocument)==null?void 0:e.body,o=Xe(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=Xe(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-n.scrollLeft+Oi(i),c=-n.scrollTop;return be(s||t).direction==="rtl"&&(l+=Xe(t.clientWidth,s?s.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function Ni(i){var e=be(i),t=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+n)}function Wn(i){return["html","body","#document"].indexOf(_e(i))>=0?i.ownerDocument.body:de(i)&&Ni(i)?i:Wn(Zt(i))}function Lt(i,e){var t;e===void 0&&(e=[]);var n=Wn(i),s=n===((t=i.ownerDocument)==null?void 0:t.body),o=ge(n),a=s?[o].concat(o.visualViewport||[],Ni(n)?n:[]):n,l=e.concat(a);return s?l:l.concat(Lt(Zt(a)))}function Mi(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Fa(i){var e=ot(i);return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function Xn(i,e){return e===In?Mi(za(i)):nt(e)?Fa(e):Mi(Va(ze(i)))}function Ha(i){var e=Lt(Zt(i)),t=["absolute","fixed"].indexOf(be(i).position)>=0,n=t&&de(i)?Et(i):i;return nt(n)?e.filter(function(s){return nt(s)&&zn(s,n)&&_e(s)!=="body"}):[]}function ja(i,e,t){var n=e==="clippingParents"?Ha(i):[].concat(e),s=[].concat(n,[t]),o=s[0],a=s.reduce(function(l,c){var u=Xn(i,c);return l.top=Xe(u.top,l.top),l.right=Kt(u.right,l.right),l.bottom=Kt(u.bottom,l.bottom),l.left=Xe(u.left,l.left),l},Xn(i,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Yn(i){var e=i.reference,t=i.element,n=i.placement,s=n?ye(n):null,o=n?at(n):null,a=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,c;switch(s){case le:c={x:a,y:e.y-t.height};break;case ue:c={x:a,y:e.y+e.height};break;case pe:c={x:e.x+e.width,y:l};break;case ce:c={x:e.x-t.width,y:l};break;default:c={x:e.x,y:e.y}}var u=s?Ai(s):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case it:c[u]=c[u]-(e[h]/2-t[h]/2);break;case Tt:c[u]=c[u]+(e[h]/2-t[h]/2);break}}return c}function At(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=n===void 0?i.placement:n,o=t.boundary,a=o===void 0?ha:o,l=t.rootBoundary,c=l===void 0?In:l,u=t.elementContext,h=u===void 0?$t:u,f=t.altBoundary,m=f===void 0?!1:f,g=t.padding,b=g===void 0?0:g,v=Hn(typeof b!="number"?b:jn(b,Ct)),x=h===$t?ua:$t,C=i.rects.popper,S=i.elements[m?x:h],w=ja(nt(S)?S:S.contextElement||ze(i.elements.popper),a,c),p=ot(i.elements.reference),L=Yn({reference:p,element:C,strategy:"absolute",placement:s}),k=Mi(Object.assign({},C,L)),N=h===$t?k:p,R={top:w.top-N.top+v.top,bottom:N.bottom-w.bottom+v.bottom,left:w.left-N.left+v.left,right:N.right-w.right+v.right},U=i.modifiersData.offset;if(h===$t&&U){var W=U[s];Object.keys(R).forEach(function(F){var q=[pe,ue].indexOf(F)>=0?1:-1,G=[le,ue].indexOf(F)>=0?"y":"x";R[F]+=W[G]*q})}return R}function Ua(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=t.boundary,o=t.rootBoundary,a=t.padding,l=t.flipVariations,c=t.allowedAutoPlacements,u=c===void 0?Dn:c,h=at(n),f=h?l?Bn:Bn.filter(function(b){return at(b)===h}):Ct,m=f.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=f,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var g=m.reduce(function(b,v){return b[v]=At(i,{placement:v,boundary:s,rootBoundary:o,padding:a})[ye(v)],b},{});return Object.keys(g).sort(function(b,v){return g[b]-g[v]})}function qa(i){if(ye(i)===Gt)return[];var e=Qt(i);return[qn(i),e,qn(e)]}function Wa(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var s=t.mainAxis,o=s===void 0?!0:s,a=t.altAxis,l=a===void 0?!0:a,c=t.fallbackPlacements,u=t.padding,h=t.boundary,f=t.rootBoundary,m=t.altBoundary,g=t.flipVariations,b=g===void 0?!0:g,v=t.allowedAutoPlacements,x=e.options.placement,C=ye(x),S=C===x,w=c||(S||!b?[Qt(x)]:qa(x)),p=[x].concat(w).reduce(function(Ie,ke){return Ie.concat(ye(ke)===Gt?Ua(e,{placement:ke,boundary:h,rootBoundary:f,padding:u,flipVariations:b,allowedAutoPlacements:v}):ke)},[]),L=e.rects.reference,k=e.rects.popper,N=new Map,R=!0,U=p[0],W=0;W<p.length;W++){var F=p[W],q=ye(F),G=at(F)===it,we=[le,ue].indexOf(q)>=0,xe=we?"width":"height",ne=At(e,{placement:F,boundary:h,rootBoundary:f,altBoundary:m,padding:u}),se=we?G?pe:ce:G?ue:le;L[xe]>k[xe]&&(se=Qt(se));var ee=Qt(se),Se=[];if(o&&Se.push(ne[q]<=0),l&&Se.push(ne[se]<=0,ne[ee]<=0),Se.every(function(Ie){return Ie})){U=F,R=!1;break}N.set(F,Se)}if(R)for(var Le=b?3:1,Je=function(ke){var Be=p.find(function(vt){var De=N.get(vt);if(De)return De.slice(0,ke).every(function(wt){return wt})});if(Be)return U=Be,"break"},Ae=Le;Ae>0;Ae--){var Qe=Je(Ae);if(Qe==="break")break}e.placement!==U&&(e.modifiersData[n]._skip=!0,e.placement=U,e.reset=!0)}}var Xa={name:"flip",enabled:!0,phase:"main",fn:Wa,requiresIfExists:["offset"],data:{_skip:!1}};function Gn(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function Kn(i){return[le,pe,ue,ce].some(function(e){return i[e]>=0})}function Ya(i){var e=i.state,t=i.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,a=At(e,{elementContext:"reference"}),l=At(e,{altBoundary:!0}),c=Gn(a,n),u=Gn(l,s,o),h=Kn(c),f=Kn(u);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":f})}var Ga={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ya};function Ka(i,e,t){var n=ye(i),s=[ce,le].indexOf(n)>=0?-1:1,o=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,a=o[0],l=o[1];return a=a||0,l=(l||0)*s,[ce,pe].indexOf(n)>=0?{x:l,y:a}:{x:a,y:l}}function Za(i){var e=i.state,t=i.options,n=i.name,s=t.offset,o=s===void 0?[0,0]:s,a=Dn.reduce(function(h,f){return h[f]=Ka(f,e.rects,o),h},{}),l=a[e.placement],c=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=a}var Ja={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Za};function Qa(i){var e=i.state,t=i.name;e.modifiersData[t]=Yn({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var er={name:"popperOffsets",enabled:!0,phase:"read",fn:Qa,data:{}};function tr(i){return i==="x"?"y":"x"}function ir(i){var e=i.state,t=i.options,n=i.name,s=t.mainAxis,o=s===void 0?!0:s,a=t.altAxis,l=a===void 0?!1:a,c=t.boundary,u=t.rootBoundary,h=t.altBoundary,f=t.padding,m=t.tether,g=m===void 0?!0:m,b=t.tetherOffset,v=b===void 0?0:b,x=At(e,{boundary:c,rootBoundary:u,padding:f,altBoundary:h}),C=ye(e.placement),S=at(e.placement),w=!S,p=Ai(C),L=tr(p),k=e.modifiersData.popperOffsets,N=e.rects.reference,R=e.rects.popper,U=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,W=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(!!k){if(o){var G,we=p==="y"?le:ce,xe=p==="y"?ue:pe,ne=p==="y"?"height":"width",se=k[p],ee=se+x[we],Se=se-x[xe],Le=g?-R[ne]/2:0,Je=S===it?N[ne]:R[ne],Ae=S===it?-R[ne]:-N[ne],Qe=e.elements.arrow,Ie=g&&Qe?Li(Qe):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Fn(),Be=ke[we],vt=ke[xe],De=St(0,N[ne],Ie[ne]),wt=w?N[ne]/2-Le-De-Be-W.mainAxis:Je-De-Be-W.mainAxis,qe=w?-N[ne]/2+Le+De+vt+W.mainAxis:Ae+De+vt+W.mainAxis,xt=e.elements.arrow&&Et(e.elements.arrow),mi=xt?p==="y"?xt.clientTop||0:xt.clientLeft||0:0,Ut=(G=F==null?void 0:F[p])!=null?G:0,fi=se+wt-Ut-mi,gi=se+qe-Ut,qt=St(g?Kt(ee,fi):ee,se,g?Xe(Se,gi):Se);k[p]=qt,q[p]=qt-se}if(l){var Wt,yi=p==="x"?le:ce,bi=p==="x"?ue:pe,Re=k[L],We=L==="y"?"height":"width",Xt=Re+x[yi],et=Re-x[bi],Yt=[le,ce].indexOf(C)!==-1,vi=(Wt=F==null?void 0:F[L])!=null?Wt:0,wi=Yt?Xt:Re-N[We]-R[We]-vi+W.altAxis,xi=Yt?Re+N[We]+R[We]-vi-W.altAxis:et,ki=g&&Yt?$a(wi,Re,xi):St(g?wi:Xt,Re,g?xi:et);k[L]=ki,q[L]=ki-Re}e.modifiersData[n]=q}}var nr={name:"preventOverflow",enabled:!0,phase:"main",fn:ir,requiresIfExists:["offset"]};function sr(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function or(i){return i===ge(i)||!de(i)?Pi(i):sr(i)}function ar(i){var e=i.getBoundingClientRect(),t=st(e.width)/i.offsetWidth||1,n=st(e.height)/i.offsetHeight||1;return t!==1||n!==1}function rr(i,e,t){t===void 0&&(t=!1);var n=de(e),s=de(e)&&ar(e),o=ze(e),a=ot(i,s),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!t)&&((_e(e)!=="body"||Ni(o))&&(l=or(e)),de(e)?(c=ot(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=Oi(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function lr(i){var e=new Map,t=new Set,n=[];i.forEach(function(o){e.set(o.name,o)});function s(o){t.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!t.has(l)){var c=e.get(l);c&&s(c)}}),n.push(o)}return i.forEach(function(o){t.has(o.name)||s(o)}),n}function cr(i){var e=lr(i);return Ei.reduce(function(t,n){return t.concat(e.filter(function(s){return s.phase===n}))},[])}function dr(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function Ve(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return[].concat(t).reduce(function(s,o){return s.replace(/%s/,o)},i)}var Ye='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',hr='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',Zn=["name","enabled","phase","fn","effect","requires","options"];function ur(i){i.forEach(function(e){[].concat(Object.keys(e),Zn).filter(function(t,n,s){return s.indexOf(t)===n}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(Ve(Ye,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(Ve(Ye,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Ei.indexOf(e.phase)<0&&console.error(Ve(Ye,e.name,'"phase"',"either "+Ei.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(Ve(Ye,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(Ve(Ye,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(Ve(Ye,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(Ve(Ye,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+Zn.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+t+'" was provided.')}e.requires&&e.requires.forEach(function(n){i.find(function(s){return s.name===n})==null&&console.error(Ve(hr,String(e.name),n,n))})})})}function pr(i,e){var t=new Set;return i.filter(function(n){var s=e(n);if(!t.has(s))return t.add(s),!0})}function mr(i){var e=i.reduce(function(t,n){var s=t[n.name];return t[n.name]=s?Object.assign({},s,n,{options:Object.assign({},s.options,n.options),data:Object.assign({},s.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var Jn="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",fr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",Qn={placement:"bottom",modifiers:[],strategy:"absolute"};function es(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function gr(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,s=e.defaultOptions,o=s===void 0?Qn:s;return function(l,c,u){u===void 0&&(u=o);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},Qn,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],m=!1,g={state:h,setOptions:function(C){var S=typeof C=="function"?C(h.options):C;v(),h.options=Object.assign({},o,h.options,S),h.scrollParents={reference:nt(l)?Lt(l):l.contextElement?Lt(l.contextElement):[],popper:Lt(c)};var w=cr(mr([].concat(n,h.options.modifiers)));h.orderedModifiers=w.filter(function(F){return F.enabled});{var p=pr([].concat(w,h.options.modifiers),function(F){var q=F.name;return q});if(ur(p),ye(h.options.placement)===Gt){var L=h.orderedModifiers.find(function(F){var q=F.name;return q==="flip"});L||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var k=be(c),N=k.marginTop,R=k.marginRight,U=k.marginBottom,W=k.marginLeft;[N,R,U,W].some(function(F){return parseFloat(F)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return b(),g.update()},forceUpdate:function(){if(!m){var C=h.elements,S=C.reference,w=C.popper;if(!es(S,w)){console.error(Jn);return}h.rects={reference:rr(S,Et(w),h.options.strategy==="fixed"),popper:Li(w)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(F){return h.modifiersData[F.name]=Object.assign({},F.data)});for(var p=0,L=0;L<h.orderedModifiers.length;L++){if(p+=1,p>100){console.error(fr);break}if(h.reset===!0){h.reset=!1,L=-1;continue}var k=h.orderedModifiers[L],N=k.fn,R=k.options,U=R===void 0?{}:R,W=k.name;typeof N=="function"&&(h=N({state:h,options:U,name:W,instance:g})||h)}}},update:dr(function(){return new Promise(function(x){g.forceUpdate(),x(h)})}),destroy:function(){v(),m=!0}};if(!es(l,c))return console.error(Jn),g;g.setOptions(u).then(function(x){!m&&u.onFirstUpdate&&u.onFirstUpdate(x)});function b(){h.orderedModifiers.forEach(function(x){var C=x.name,S=x.options,w=S===void 0?{}:S,p=x.effect;if(typeof p=="function"){var L=p({state:h,name:C,instance:g,options:w}),k=function(){};f.push(L||k)}})}function v(){f.forEach(function(x){return x()}),f=[]}return g}}var yr=[Ba,er,Ma,Rn,Ja,Xa,nr,Aa,Ga],br=gr({defaultModifiers:yr}),vr="tippy-box",ts="tippy-content",wr="tippy-backdrop",is="tippy-arrow",ns="tippy-svg-arrow",Ge={passive:!0,capture:!0},ss=function(){return document.body};function xr(i,e){return{}.hasOwnProperty.call(i,e)}function Ii(i,e,t){if(Array.isArray(i)){var n=i[e];return n==null?Array.isArray(t)?t[e]:t:n}return i}function Bi(i,e){var t={}.toString.call(i);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function os(i,e){return typeof i=="function"?i.apply(void 0,e):i}function as(i,e){if(e===0)return i;var t;return function(n){clearTimeout(t),t=setTimeout(function(){i(n)},e)}}function kr(i,e){var t=Object.assign({},i);return e.forEach(function(n){delete t[n]}),t}function _r(i){return i.split(/\s+/).filter(Boolean)}function rt(i){return[].concat(i)}function rs(i,e){i.indexOf(e)===-1&&i.push(e)}function Cr(i){return i.filter(function(e,t){return i.indexOf(e)===t})}function Tr(i){return i.split("-")[0]}function ei(i){return[].slice.call(i)}function ls(i){return Object.keys(i).reduce(function(e,t){return i[t]!==void 0&&(e[t]=i[t]),e},{})}function Pt(){return document.createElement("div")}function Ot(i){return["Element","Fragment"].some(function(e){return Bi(i,e)})}function $r(i){return Bi(i,"NodeList")}function Er(i){return Bi(i,"MouseEvent")}function Sr(i){return!!(i&&i._tippy&&i._tippy.reference===i)}function Lr(i){return Ot(i)?[i]:$r(i)?ei(i):Array.isArray(i)?i:ei(document.querySelectorAll(i))}function Di(i,e){i.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function cs(i,e){i.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Ar(i){var e,t=rt(i),n=t[0];return n!=null&&(e=n.ownerDocument)!=null&&e.body?n.ownerDocument:document}function Pr(i,e){var t=e.clientX,n=e.clientY;return i.every(function(s){var o=s.popperRect,a=s.popperState,l=s.props,c=l.interactiveBorder,u=Tr(a.placement),h=a.modifiersData.offset;if(!h)return!0;var f=u==="bottom"?h.top.y:0,m=u==="top"?h.bottom.y:0,g=u==="right"?h.left.x:0,b=u==="left"?h.right.x:0,v=o.top-n+f>c,x=n-o.bottom-m>c,C=o.left-t+g>c,S=t-o.right-b>c;return v||x||C||S})}function Ri(i,e,t){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){i[n](s,t)})}function ds(i,e){for(var t=e;t;){var n;if(i.contains(t))return!0;t=t.getRootNode==null||(n=t.getRootNode())==null?void 0:n.host}return!1}var Ce={isTouch:!1},hs=0;function Or(){Ce.isTouch||(Ce.isTouch=!0,window.performance&&document.addEventListener("mousemove",us))}function us(){var i=performance.now();i-hs<20&&(Ce.isTouch=!1,document.removeEventListener("mousemove",us)),hs=i}function Nr(){var i=document.activeElement;if(Sr(i)){var e=i._tippy;i.blur&&!e.state.isVisible&&i.blur()}}function Mr(){document.addEventListener("touchstart",Or,Ge),window.addEventListener("blur",Nr)}var Ir=typeof window!="undefined"&&typeof document!="undefined",Br=Ir?!!window.msCrypto:!1;function lt(i){var e=i==="destroy"?"n already-":" ";return[i+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ps(i){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return i.replace(e," ").replace(t,"").trim()}function Dr(i){return ps(`
|
|
11
|
+
%ctippy.js
|
|
12
|
+
|
|
13
|
+
%c`+ps(i)+`
|
|
14
|
+
|
|
15
|
+
%c\u{1F477}\u200D This is a development-only message. It will be removed in production.
|
|
16
|
+
`)}function ms(i){return[Dr(i),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Nt;Rr();function Rr(){Nt=new Set}function Pe(i,e){if(i&&!Nt.has(e)){var t;Nt.add(e),(t=console).warn.apply(t,ms(e))}}function zi(i,e){if(i&&!Nt.has(e)){var t;Nt.add(e),(t=console).error.apply(t,ms(e))}}function zr(i){var e=!i,t=Object.prototype.toString.call(i)==="[object Object]"&&!i.addEventListener;zi(e,["tippy() was passed","`"+String(i)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zi(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var fs={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Vr={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},he=Object.assign({appendTo:ss,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},fs,Vr),Fr=Object.keys(he),Hr=function(e){bs(e,[]);var t=Object.keys(e);t.forEach(function(n){he[n]=e[n]})};function gs(i){var e=i.plugins||[],t=e.reduce(function(n,s){var o=s.name,a=s.defaultValue;if(o){var l;n[o]=i[o]!==void 0?i[o]:(l=he[o])!=null?l:a}return n},{});return Object.assign({},i,t)}function jr(i,e){var t=e?Object.keys(gs(Object.assign({},he,{plugins:e}))):Fr,n=t.reduce(function(s,o){var a=(i.getAttribute("data-tippy-"+o)||"").trim();if(!a)return s;if(o==="content")s[o]=a;else try{s[o]=JSON.parse(a)}catch{s[o]=a}return s},{});return n}function ys(i,e){var t=Object.assign({},e,{content:os(e.content,[i])},e.ignoreAttributes?{}:jr(i,e.plugins));return t.aria=Object.assign({},he.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function bs(i,e){i===void 0&&(i={}),e===void 0&&(e=[]);var t=Object.keys(i);t.forEach(function(n){var s=kr(he,Object.keys(fs)),o=!xr(s,n);o&&(o=e.filter(function(a){return a.name===n}).length===0),Pe(o,["`"+n+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
17
|
+
|
|
18
|
+
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
19
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Ur=function(){return"innerHTML"};function Vi(i,e){i[Ur()]=e}function vs(i){var e=Pt();return i===!0?e.className=is:(e.className=ns,Ot(i)?e.appendChild(i):Vi(e,i)),e}function ws(i,e){Ot(e.content)?(Vi(i,""),i.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Vi(i,e.content):i.textContent=e.content)}function Fi(i){var e=i.firstElementChild,t=ei(e.children);return{box:e,content:t.find(function(n){return n.classList.contains(ts)}),arrow:t.find(function(n){return n.classList.contains(is)||n.classList.contains(ns)}),backdrop:t.find(function(n){return n.classList.contains(wr)})}}function xs(i){var e=Pt(),t=Pt();t.className=vr,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var n=Pt();n.className=ts,n.setAttribute("data-state","hidden"),ws(n,i.props),e.appendChild(t),t.appendChild(n),s(i.props,i.props);function s(o,a){var l=Fi(e),c=l.box,u=l.content,h=l.arrow;a.theme?c.setAttribute("data-theme",a.theme):c.removeAttribute("data-theme"),typeof a.animation=="string"?c.setAttribute("data-animation",a.animation):c.removeAttribute("data-animation"),a.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?c.setAttribute("role",a.role):c.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&ws(u,i.props),a.arrow?h?o.arrow!==a.arrow&&(c.removeChild(h),c.appendChild(vs(a.arrow))):c.appendChild(vs(a.arrow)):h&&c.removeChild(h)}return{popper:e,onUpdate:s}}xs.$$tippy=!0;var qr=1,ti=[],Hi=[];function Wr(i,e){var t=ys(i,Object.assign({},he,gs(ls(e)))),n,s,o,a=!1,l=!1,c=!1,u=!1,h,f,m,g=[],b=as(fi,t.interactiveDebounce),v,x=qr++,C=null,S=Cr(t.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},p={id:x,reference:i,popper:Pt(),popperInstance:C,props:t,state:w,plugins:S,clearDelayTimeouts:wi,setProps:xi,setContent:ki,show:Zd,hide:Jd,hideWithInteractivity:Qd,enable:Yt,disable:vi,unmount:eh,destroy:th};if(!t.render)return zi(!0,"render() function has not been supplied."),p;var L=t.render(p),k=L.popper,N=L.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+p.id,p.popper=k,i._tippy=p,k._tippy=p;var R=S.map(function(y){return y.fn(p)}),U=i.hasAttribute("aria-expanded");return xt(),Le(),se(),ee("onCreate",[p]),t.showOnCreate&&Xt(),k.addEventListener("mouseenter",function(){p.props.interactive&&p.state.isVisible&&p.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){p.props.interactive&&p.props.trigger.indexOf("mouseenter")>=0&&we().addEventListener("mousemove",b)}),p;function W(){var y=p.props.touch;return Array.isArray(y)?y:[y,0]}function F(){return W()[0]==="hold"}function q(){var y;return!!((y=p.props.render)!=null&&y.$$tippy)}function G(){return v||i}function we(){var y=G().parentNode;return y?Ar(y):document}function xe(){return Fi(k)}function ne(y){return p.state.isMounted&&!p.state.isVisible||Ce.isTouch||h&&h.type==="focus"?0:Ii(p.props.delay,y?0:1,he.delay)}function se(y){y===void 0&&(y=!1),k.style.pointerEvents=p.props.interactive&&!y?"":"none",k.style.zIndex=""+p.props.zIndex}function ee(y,$,O){if(O===void 0&&(O=!0),R.forEach(function(z){z[y]&&z[y].apply(z,$)}),O){var H;(H=p.props)[y].apply(H,$)}}function Se(){var y=p.props.aria;if(!!y.content){var $="aria-"+y.content,O=k.id,H=rt(p.props.triggerTarget||i);H.forEach(function(z){var re=z.getAttribute($);if(p.state.isVisible)z.setAttribute($,re?re+" "+O:O);else{var me=re&&re.replace(O,"").trim();me?z.setAttribute($,me):z.removeAttribute($)}})}}function Le(){if(!(U||!p.props.aria.expanded)){var y=rt(p.props.triggerTarget||i);y.forEach(function($){p.props.interactive?$.setAttribute("aria-expanded",p.state.isVisible&&$===G()?"true":"false"):$.removeAttribute("aria-expanded")})}}function Je(){we().removeEventListener("mousemove",b),ti=ti.filter(function(y){return y!==b})}function Ae(y){if(!(Ce.isTouch&&(c||y.type==="mousedown"))){var $=y.composedPath&&y.composedPath()[0]||y.target;if(!(p.props.interactive&&ds(k,$))){if(rt(p.props.triggerTarget||i).some(function(O){return ds(O,$)})){if(Ce.isTouch||p.state.isVisible&&p.props.trigger.indexOf("click")>=0)return}else ee("onClickOutside",[p,y]);p.props.hideOnClick===!0&&(p.clearDelayTimeouts(),p.hide(),l=!0,setTimeout(function(){l=!1}),p.state.isMounted||Be())}}}function Qe(){c=!0}function Ie(){c=!1}function ke(){var y=we();y.addEventListener("mousedown",Ae,!0),y.addEventListener("touchend",Ae,Ge),y.addEventListener("touchstart",Ie,Ge),y.addEventListener("touchmove",Qe,Ge)}function Be(){var y=we();y.removeEventListener("mousedown",Ae,!0),y.removeEventListener("touchend",Ae,Ge),y.removeEventListener("touchstart",Ie,Ge),y.removeEventListener("touchmove",Qe,Ge)}function vt(y,$){wt(y,function(){!p.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&$()})}function De(y,$){wt(y,$)}function wt(y,$){var O=xe().box;function H(z){z.target===O&&(Ri(O,"remove",H),$())}if(y===0)return $();Ri(O,"remove",f),Ri(O,"add",H),f=H}function qe(y,$,O){O===void 0&&(O=!1);var H=rt(p.props.triggerTarget||i);H.forEach(function(z){z.addEventListener(y,$,O),g.push({node:z,eventType:y,handler:$,options:O})})}function xt(){F()&&(qe("touchstart",Ut,{passive:!0}),qe("touchend",gi,{passive:!0})),_r(p.props.trigger).forEach(function(y){if(y!=="manual")switch(qe(y,Ut),y){case"mouseenter":qe("mouseleave",gi);break;case"focus":qe(Br?"focusout":"blur",qt);break;case"focusin":qe("focusout",qt);break}})}function mi(){g.forEach(function(y){var $=y.node,O=y.eventType,H=y.handler,z=y.options;$.removeEventListener(O,H,z)}),g=[]}function Ut(y){var $,O=!1;if(!(!p.state.isEnabled||Wt(y)||l)){var H=(($=h)==null?void 0:$.type)==="focus";h=y,v=y.currentTarget,Le(),!p.state.isVisible&&Er(y)&&ti.forEach(function(z){return z(y)}),y.type==="click"&&(p.props.trigger.indexOf("mouseenter")<0||a)&&p.props.hideOnClick!==!1&&p.state.isVisible?O=!0:Xt(y),y.type==="click"&&(a=!O),O&&!H&&et(y)}}function fi(y){var $=y.target,O=G().contains($)||k.contains($);if(!(y.type==="mousemove"&&O)){var H=We().concat(k).map(function(z){var re,me=z._tippy,kt=(re=me.popperInstance)==null?void 0:re.state;return kt?{popperRect:z.getBoundingClientRect(),popperState:kt,props:t}:null}).filter(Boolean);Pr(H,y)&&(Je(),et(y))}}function gi(y){var $=Wt(y)||p.props.trigger.indexOf("click")>=0&&a;if(!$){if(p.props.interactive){p.hideWithInteractivity(y);return}et(y)}}function qt(y){p.props.trigger.indexOf("focusin")<0&&y.target!==G()||p.props.interactive&&y.relatedTarget&&k.contains(y.relatedTarget)||et(y)}function Wt(y){return Ce.isTouch?F()!==y.type.indexOf("touch")>=0:!1}function yi(){bi();var y=p.props,$=y.popperOptions,O=y.placement,H=y.offset,z=y.getReferenceClientRect,re=y.moveTransition,me=q()?Fi(k).arrow:null,kt=z?{getBoundingClientRect:z,contextElement:z.contextElement||G()}:i,Xo={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(_i){var _t=_i.state;if(q()){var ih=xe(),_n=ih.box;["placement","reference-hidden","escaped"].forEach(function(Ci){Ci==="placement"?_n.setAttribute("data-placement",_t.placement):_t.attributes.popper["data-popper-"+Ci]?_n.setAttribute("data-"+Ci,""):_n.removeAttribute("data-"+Ci)}),_t.attributes.popper={}}}},tt=[{name:"offset",options:{offset:H}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!re}},Xo];q()&&me&&tt.push({name:"arrow",options:{element:me,padding:3}}),tt.push.apply(tt,($==null?void 0:$.modifiers)||[]),p.popperInstance=br(kt,k,Object.assign({},$,{placement:O,onFirstUpdate:m,modifiers:tt}))}function bi(){p.popperInstance&&(p.popperInstance.destroy(),p.popperInstance=null)}function Re(){var y=p.props.appendTo,$,O=G();p.props.interactive&&y===ss||y==="parent"?$=O.parentNode:$=os(y,[O]),$.contains(k)||$.appendChild(k),p.state.isMounted=!0,yi(),Pe(p.props.interactive&&y===he.appendTo&&O.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
20
|
+
|
|
21
|
+
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
22
|
+
|
|
23
|
+
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
24
|
+
|
|
25
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function We(){return ei(k.querySelectorAll("[data-tippy-root]"))}function Xt(y){p.clearDelayTimeouts(),y&&ee("onTrigger",[p,y]),ke();var $=ne(!0),O=W(),H=O[0],z=O[1];Ce.isTouch&&H==="hold"&&z&&($=z),$?n=setTimeout(function(){p.show()},$):p.show()}function et(y){if(p.clearDelayTimeouts(),ee("onUntrigger",[p,y]),!p.state.isVisible){Be();return}if(!(p.props.trigger.indexOf("mouseenter")>=0&&p.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(y.type)>=0&&a)){var $=ne(!1);$?s=setTimeout(function(){p.state.isVisible&&p.hide()},$):o=requestAnimationFrame(function(){p.hide()})}}function Yt(){p.state.isEnabled=!0}function vi(){p.hide(),p.state.isEnabled=!1}function wi(){clearTimeout(n),clearTimeout(s),cancelAnimationFrame(o)}function xi(y){if(Pe(p.state.isDestroyed,lt("setProps")),!p.state.isDestroyed){ee("onBeforeUpdate",[p,y]),mi();var $=p.props,O=ys(i,Object.assign({},$,ls(y),{ignoreAttributes:!0}));p.props=O,xt(),$.interactiveDebounce!==O.interactiveDebounce&&(Je(),b=as(fi,O.interactiveDebounce)),$.triggerTarget&&!O.triggerTarget?rt($.triggerTarget).forEach(function(H){H.removeAttribute("aria-expanded")}):O.triggerTarget&&i.removeAttribute("aria-expanded"),Le(),se(),N&&N($,O),p.popperInstance&&(yi(),We().forEach(function(H){requestAnimationFrame(H._tippy.popperInstance.forceUpdate)})),ee("onAfterUpdate",[p,y])}}function ki(y){p.setProps({content:y})}function Zd(){Pe(p.state.isDestroyed,lt("show"));var y=p.state.isVisible,$=p.state.isDestroyed,O=!p.state.isEnabled,H=Ce.isTouch&&!p.props.touch,z=Ii(p.props.duration,0,he.duration);if(!(y||$||O||H)&&!G().hasAttribute("disabled")&&(ee("onShow",[p],!1),p.props.onShow(p)!==!1)){if(p.state.isVisible=!0,q()&&(k.style.visibility="visible"),se(),ke(),p.state.isMounted||(k.style.transition="none"),q()){var re=xe(),me=re.box,kt=re.content;Di([me,kt],0)}m=function(){var tt;if(!(!p.state.isVisible||u)){if(u=!0,k.offsetHeight,k.style.transition=p.props.moveTransition,q()&&p.props.animation){var kn=xe(),_i=kn.box,_t=kn.content;Di([_i,_t],z),cs([_i,_t],"visible")}Se(),Le(),rs(Hi,p),(tt=p.popperInstance)==null||tt.forceUpdate(),ee("onMount",[p]),p.props.animation&&q()&&De(z,function(){p.state.isShown=!0,ee("onShown",[p])})}},Re()}}function Jd(){Pe(p.state.isDestroyed,lt("hide"));var y=!p.state.isVisible,$=p.state.isDestroyed,O=!p.state.isEnabled,H=Ii(p.props.duration,1,he.duration);if(!(y||$||O)&&(ee("onHide",[p],!1),p.props.onHide(p)!==!1)){if(p.state.isVisible=!1,p.state.isShown=!1,u=!1,a=!1,q()&&(k.style.visibility="hidden"),Je(),Be(),se(!0),q()){var z=xe(),re=z.box,me=z.content;p.props.animation&&(Di([re,me],H),cs([re,me],"hidden"))}Se(),Le(),p.props.animation?q()&&vt(H,p.unmount):p.unmount()}}function Qd(y){Pe(p.state.isDestroyed,lt("hideWithInteractivity")),we().addEventListener("mousemove",b),rs(ti,b),b(y)}function eh(){Pe(p.state.isDestroyed,lt("unmount")),p.state.isVisible&&p.hide(),p.state.isMounted&&(bi(),We().forEach(function(y){y._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Hi=Hi.filter(function(y){return y!==p}),p.state.isMounted=!1,ee("onHidden",[p]))}function th(){Pe(p.state.isDestroyed,lt("destroy")),!p.state.isDestroyed&&(p.clearDelayTimeouts(),p.unmount(),mi(),delete i._tippy,p.state.isDestroyed=!0,ee("onDestroy",[p]))}}function Fe(i,e){e===void 0&&(e={});var t=he.plugins.concat(e.plugins||[]);zr(i),bs(e,t),Mr();var n=Object.assign({},e,{plugins:t}),s=Lr(i);{var o=Ot(n.content),a=s.length>1;Pe(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
26
|
+
|
|
27
|
+
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
28
|
+
|
|
29
|
+
`,`1) content: element.innerHTML
|
|
30
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var l=s.reduce(function(c,u){var h=u&&Wr(u,n);return h&&c.push(h),c},[]);return Ot(i)?l[0]:l}Fe.defaultProps=he,Fe.setDefaultProps=Hr,Fe.currentInput=Ce,Object.assign({},Rn,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Fe.setDefaultProps({render:xs});var _h="",Ch="",Th="",$h="";const Xr={class:"lew-dropdown"},Yr=["onClick"];var ks=M(r.defineComponent({name:"LewDropdown",props:{options:{type:Array,default(){return[]}},trigger:{type:String,default:"hover"},placement:{type:String,default:"bottom"},width:{type:String,default:""},arrow:{type:Boolean,default:!0},align:{type:String,default:"left"}},emits:["change"],setup(i,{expose:e,emit:t}){const n=i;let s=r.ref(null),o=r.ref(null),a;r.onMounted(()=>{let h=n.trigger,f=n.placement;h=="hover"&&(h="mouseenter"),a=Fe(s.value,{theme:"light",trigger:h,content:o.value,animation:"shift-away-subtle",interactive:!0,arrow:n.arrow,placement:f,interactiveBorder:30,appendTo:()=>document.body,allowHTML:!0,maxWidth:"none",onShow(m){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?m.popper.children[0].setAttribute("data-theme","dark"):m.popper.children[0].setAttribute("data-theme","light")}})});let l=()=>{a.hide()},c=()=>{a.hide()};e({show:l,hide:c});const u=h=>{t("change",h),setTimeout(()=>{c()},80)};return r.onUnmounted(()=>{a&&a.destroy()}),(h,f)=>(r.openBlock(),r.createElementBlock("div",Xr,[r.createElementVNode("div",{ref_key:"triggerRef",ref:s},[r.renderSlot(h.$slots,"default",{},void 0,!0)],512),r.createElementVNode("div",{ref_key:"bodyRef",ref:o,class:"lew-dropdown-body",style:r.normalizeStyle(`width:${i.width}`)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(m,g)=>(r.openBlock(),r.createElementBlock("div",{key:g,class:"lew-dropdown-option",style:r.normalizeStyle(`text-align:${i.align}`),onClick:b=>u(m)},r.toDisplayString(m.label),13,Yr))),128))],4)]))}}),[["__scopeId","data-v-9869e96a"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/dropdown/src/LewDropdown.vue"]]),Sh="";const Gr=["disabled"];var ji=M(r.defineComponent({name:"LewInput",props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=r.ref(t.modelValue);r.watch(()=>t.modelValue,()=>{n.value=t.modelValue});const s=o=>{let a=o.target.value;e("update:modelValue",a)};return(o,a)=>r.withDirectives((r.openBlock(),r.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),class:"lew-input",disabled:t.disabled,placeholder:"\u8BF7\u8F93\u5165",onInput:s},null,40,Gr)),[[r.vModelText,n.value]])}}),[["__scopeId","data-v-156ce1e1"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/input/src/LewInput.vue"]]),Ah="";const Kr={class:"title-label"};var _s=M(r.defineComponent({name:"LewFormItem",props:{title:{type:String,default:"\u6807\u9898"},direction:{type:String,default:"x"}},setup(i){const e=i;return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-form-item",`lew-form-item-${i.direction}`])},[r.createElementVNode("label",Kr,r.toDisplayString(e.title),1),r.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-441b5c62"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/form-item/src/LewFormItem.vue"]]),Oh="";const Zr=(i=>(r.pushScopeId("data-v-5594c4af"),i=i(),r.popScopeId(),i))(()=>r.createElementVNode("div",{class:"icon-checkbox-box"},[r.createElementVNode("svg",{class:"icon-checkbox",viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"4",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("polyline",{points:"20 6 9 17 4 12"})])],-1)),Jr=["checked"];var Qr=M(r.defineComponent({name:"LewCheckbox",props:{label:{type:String,required:!0},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},checked:{type:Boolean}},emits:["update:checked"],setup(i,{emit:e}){const t=n=>{e("update:checked",n.target.checked)};return(n,s)=>(r.openBlock(),r.createElementBlock("label",{class:r.normalizeClass(["lew-checkbox",`${i.block?"lew-checkbox-block":""} ${i.round?"lew-checkbox-round":""} ${i.checked?"lew-checkbox-checked":""} `])},[Zr,r.withDirectives(r.createElementVNode("input",{type:"checkbox",checked:i.checked,onInput:t},null,40,Jr),[[r.vShow,!1]]),r.createTextVNode(" "+r.toDisplayString(i.label),1)],2))}}),[["__scopeId","data-v-5594c4af"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/checkbox/src/LewCheckbox.vue"]]),Ih="",Cs=M(r.defineComponent({name:"LewCheckboxGroup",props:{modelValue:{type:Array,default:()=>[],required:!0},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},direction:{type:String,default:"x"},options:{type:Array,default:()=>[],required:!0,validator:i=>{const e=i.every(n=>Object.keys(n).includes("name")),t=i.every(n=>Object.keys(n).includes("id"));return e&&t}}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=(o,a)=>{let l=[...t.modelValue];o=Number(o),a?l.push(o):l.splice(l.indexOf(o),1),e("update:modelValue",l)},s=o=>(o=Number(o),t.modelValue.includes(o));return(o,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-checkbox-group",`lew-checkbox-group-${i.direction}`])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,l=>(r.openBlock(),r.createBlock(Qr,{key:l.id,block:i.block,round:i.round,label:l.name,checked:s(l.id),"onUpdate:checked":c=>n(l.id,c)},null,8,["block","round","label","checked","onUpdate:checked"]))),128))],2))}}),[["__scopeId","data-v-66b915c0"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/checkbox/src/LewCheckboxGroup.vue"]]),Dh="";const el=["disabled"];var Ts=M(r.defineComponent({name:"LewTextarea",props:{modelValue:{type:String,default:""},resize:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=r.ref(t.modelValue);r.watch(()=>t.modelValue,()=>{n.value=t.modelValue});const s=o=>{let a=o.target.value;e("update:modelValue",a)};return(o,a)=>r.withDirectives((r.openBlock(),r.createElementBlock("textarea",{"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),class:r.normalizeClass(["lew-textarea btf-scrollbar",`resize-${i.resize}`]),rows:"3",cols:"3",disabled:t.disabled,placeholder:"\u8BF7\u8F93\u5165",onInput:s},null,42,el)),[[r.vModelText,n.value]])}}),[["__scopeId","data-v-3567f2c6"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/textarea/src/LewTextarea.vue"]]),zh="";const tl=[(i=>(r.pushScopeId("data-v-365d2981"),i=i(),r.popScopeId(),i))(()=>r.createElementVNode("div",{class:"icon-radio"},null,-1))],il=["checked"];var nl=M(r.defineComponent({name:"LewRadio",props:{label:{type:String,required:!0},block:{type:Boolean,default:()=>!1},checked:{type:Boolean}},emits:["update:checked"],setup(i,{emit:e}){const t=()=>{e("update:checked")};return(n,s)=>(r.openBlock(),r.createElementBlock("label",{class:r.normalizeClass(["lew-radio",`${i.block?"lew-radio-block":""} ${i.checked?"lew-radio-checked":""} `])},[r.createElementVNode("div",{class:r.normalizeClass(["icon-radio-box",{"icon-checked-box":i.checked}])},tl,2),r.withDirectives(r.createElementVNode("input",{type:"radio",checked:i.checked,onInput:t},null,40,il),[[r.vShow,!1]]),r.createTextVNode(" "+r.toDisplayString(i.label),1)],2))}}),[["__scopeId","data-v-365d2981"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/radio/src/LewRadio.vue"]]),jh="",$s=M(r.defineComponent({name:"LewRadioboxGroup",props:{modelValue:{type:Number,default:()=>0,required:!0},block:{type:Boolean,default:()=>!1},direction:{type:String,default:"x"},options:{type:Array,default:()=>[],required:!0,validator:i=>{const e=i.every(n=>Object.keys(n).includes("name")),t=i.every(n=>Object.keys(n).includes("id"));return e&&t}}},emits:["update:modelValue"],setup(i,{emit:e}){const t=n=>{e("update:modelValue",Number(n))};return(n,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-radio-group",`lew-radio-group-${i.direction}`])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,o=>(r.openBlock(),r.createBlock(nl,{key:o.id,block:i.block,label:o.name,checked:i.modelValue==o.id,"onUpdate:checked":a=>t(o.id)},null,8,["block","label","checked","onUpdate:checked"]))),128))],2))}}),[["__scopeId","data-v-304dc5f5"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/radio/src/LewRadioboxGroup.vue"]]),qh="";const sl={class:"lew-select"},ol=["onClick"];var Es=M(r.defineComponent({name:"LewSelect",props:{modelValue:{type:String,default:""},options:{type:Array,default(){return[]}}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=r.ref(""),s=r.ref("");r.onMounted(()=>{var u;s.value=(u=t.options.find(h=>h.value==t.modelValue))==null?void 0:u.label});let o=r.ref(!1);const a=()=>{o.value=!0},l=()=>{setTimeout(()=>{o.value=!1},150)},c=u=>{s.value=u.label,n.value==u.value,e("update:modelValue",u.value)};return(u,h)=>(r.openBlock(),r.createElementBlock("div",sl,[r.createVNode(r.unref(ji),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=f=>s.value=f),placeholder:"\u8BF7\u9009\u62E9",onFocus:a,onBlur:l},null,8,["modelValue"]),r.createElementVNode("div",{class:r.normalizeClass(["options-box",{isShowOptions:r.unref(o)}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,f=>(r.openBlock(),r.createElementBlock("div",{key:f.value,class:"item",onClick:m=>c(f)},r.toDisplayString(f.label),9,ol))),128))],2)]))}}),[["__scopeId","data-v-326752a1"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/select/src/LewSelect.vue"]]),Xh="";const al=["disabled"];var Ss=M(r.defineComponent({name:"LewSwitch",props:{modelValue:{type:Boolean,default:()=>!1},round:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=r.ref(t.modelValue);r.watch(()=>t.modelValue,()=>{n.value=t.modelValue});const s=()=>{e("update:modelValue",n.value)};return(o,a)=>r.withDirectives((r.openBlock(),r.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),class:r.normalizeClass({round:i.round}),type:"checkbox",disabled:t.disabled,onChange:s},null,42,al)),[[r.vModelCheckbox,n.value]])}}),[["__scopeId","data-v-3d4d5d11"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/switch/src/LewSwitch.vue"]]),Gh="";const rl={class:"lew-avatar"},ll=["src","alt"];var Ls=M(r.defineComponent({name:"LewAvatar",props:{round:{type:Boolean,default:!1},status:{type:String,default:""},statusPosition:{type:String,default:""},src:{type:String,default:""},alt:{type:String,default:""}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",rl,[r.createElementVNode("img",{src:i.src,class:r.normalizeClass({round:i.round}),alt:i.alt},null,10,ll),i.status?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["dot",`dot-${i.status} dot-${i.statusPosition}`])},null,2)):r.createCommentVNode("v-if",!0)]))}}),[["__scopeId","data-v-3ce1779b"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/avatar/src/LewAvatar.vue"]]),Zh="",As=M(r.defineComponent({name:"LewTitle",props:{bold:{type:Number,default:500},size:{type:String,default:"24px"}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",{class:"lew-title",style:r.normalizeStyle(`font-weight:${i.bold};font-size:${i.size}`)},[r.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-cfbccebe"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/title/src/LewTitle.vue"]]),Qh="",eu="";const cl=["disabled"];var ct=M(r.defineComponent({name:"LewButton",props:{type:{type:String,default:"primary"},size:{type:String,default:"medium"},loading:{type:Boolean,default:!1},round:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["lew-button",`lew-button-${i.type} lew-button-${i.size} ${i.round?"lew-button-round":""} ${i.disabled?"lew-button-disabled":""} ${i.loading?"lew-button-loading":""}`]),disabled:i.disabled},[r.renderSlot(e.$slots,"default",{},void 0,!0)],10,cl))}}),[["__scopeId","data-v-e7956ae6"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/button/src/LewButton.vue"]]),iu="";const dl={key:0,class:"lew-badge-value"},hl={key:1,class:"lew-badge-dot"};var Ps=M(r.defineComponent({name:"LewBadge",props:{type:{type:String,default:"normal"},round:{type:Boolean,default:!1},value:{type:String,default:""}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-badge",`lew-badge-${i.type} ${i.round?"lew-badge-round":""}`])},[i.value?(r.openBlock(),r.createElementBlock("div",dl,r.toDisplayString(i.value),1)):r.createCommentVNode("v-if",!0),i.value?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createElementBlock("div",hl)),r.renderSlot(e.$slots,"default")],2))}}),[["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/badge/src/LewBadge.vue"]]);const ul={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pl=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1)];var Ui=r.defineComponent({name:"Alert24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",ul,pl)}});const ml={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},fl=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z",fill:"currentColor"})],-1)];var qi=r.defineComponent({name:"CheckmarkCircle24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",ml,fl)}});const gl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},yl=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})],-1)];var bl=r.defineComponent({name:"ChevronUp24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",gl,yl)}});const vl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wl=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M8.066 18.943l6.5-14.5a.75.75 0 0 1 1.404.518l-.036.096l-6.5 14.5a.75.75 0 0 1-1.404-.518l.036-.096l6.5-14.5l-6.5 14.5zM2.22 11.47l4.25-4.25a.75.75 0 0 1 1.133.976l-.073.085L3.81 12l3.72 3.719a.75.75 0 0 1-.976 1.133l-.084-.073l-4.25-4.25a.75.75 0 0 1-.073-.976l.073-.084l4.25-4.25l-4.25 4.25zm14.25-4.25a.75.75 0 0 1 .976-.073l.084.073l4.25 4.25a.75.75 0 0 1 .073.976l-.073.085l-4.25 4.25a.75.75 0 0 1-1.133-.977l.073-.084L20.19 12l-3.72-3.72a.75.75 0 0 1 0-1.06z",fill:"currentColor"})],-1)];var xl=r.defineComponent({name:"Code24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",vl,wl)}});const kl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_l=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M4.21 4.387l.083-.094a1 1 0 0 1 1.32-.083l.094.083L12 10.585l6.293-6.292a1 1 0 1 1 1.414 1.414L13.415 12l6.292 6.293a1 1 0 0 1 .083 1.32l-.083.094a1 1 0 0 1-1.32.083l-.094-.083L12 13.415l-6.293 6.292a1 1 0 0 1-1.414-1.414L10.585 12L4.293 5.707a1 1 0 0 1-.083-1.32l.083-.094l-.083.094z",fill:"currentColor"})],-1)];var Wi=r.defineComponent({name:"Dismiss24Filled",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",kl,_l)}});const Cl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Tl=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z",fill:"currentColor"})],-1)];var Xi=r.defineComponent({name:"ErrorCircle24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",Cl,Tl)}});const $l={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},El=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z",fill:"currentColor"})],-1)];var Yi=r.defineComponent({name:"Info24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",$l,El)}});const Sl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ll=[r.createElementVNode("g",{fill:"none"},[r.createElementVNode("path",{d:"M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z",fill:"currentColor"})],-1)];var Gi=r.defineComponent({name:"Warning24Regular",render:function(e,t){return r.openBlock(),r.createElementBlock("svg",Sl,Ll)}});function Al(i){let e=0;for(let t=0;t<i.length;++t)i[t]==="&"&&++e;return e}const Os=/\s*,(?![^(]*\))\s*/g,Pl=/\s+/g;function Ol(i,e){const t=[];return e.split(Os).forEach(n=>{let s=Al(n);if(s){if(s===1){i.forEach(a=>{t.push(n.replace("&",a))});return}}else{i.forEach(a=>{t.push((a&&a+" ")+n)});return}let o=[n];for(;s--;){const a=[];o.forEach(l=>{i.forEach(c=>{a.push(l.replace("&",c))})}),o=a}o.forEach(a=>t.push(a))}),t}function Nl(i,e){const t=[];return e.split(Os).forEach(n=>{i.forEach(s=>{t.push((s&&s+" ")+n)})}),t}function Ml(i){let e=[""];return i.forEach(t=>{t=t&&t.trim(),t&&(t.includes("&")?e=Ol(e,t):e=Nl(e,t))}),e.join(", ").replace(Pl," ")}const Il=/[A-Z]/g;function Ns(i){return i.replace(Il,e=>"-"+e.toLowerCase())}function Bl(i,e=" "){return typeof i=="object"&&i!==null?` {
|
|
31
|
+
`+Object.entries(i).map(t=>e+` ${Ns(t[0])}: ${t[1]};`).join(`
|
|
7
32
|
`)+`
|
|
8
|
-
`+
|
|
9
|
-
${
|
|
10
|
-
}`;const
|
|
11
|
-
}`:"";const i
|
|
12
|
-
`+
|
|
13
|
-
`);return}
|
|
14
|
-
`)}function
|
|
15
|
-
|
|
16
|
-
`)}function Sr(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function dt(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function ft(e){return document.querySelector(`style[cssr-id="${e}"]`)}function Tr(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}window&&(window.__cssrContext={});function Wt(e){const t=e.getAttribute("mount-count");return t===null?null:Number(t)}function pt(e,t){e.setAttribute("mount-count",String(t))}function Ut(e,t,n,r){const{els:a}=t;if(n===void 0)a.forEach(dt),t.els=[];else{const s=ft(n);if(s&&a.includes(s)){const i=Wt(s);r?i===null?console.error(`[css-render/unmount]: The style with target='${n}' is mounted in count mode.`):i<=1?(dt(s),t.els=a.filter(c=>c!==s)):pt(s,i-1):i!==null?console.error(`[css-render/unmount]: The style with target='${n}' is mounted in no-count mode.`):(dt(s),t.els=a.filter(c=>c!==s))}}}function Vr(e,t){e.push(t)}function Dr(e,t,n,r,a,s,i,c,u){if(i&&!u){if(n===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}const v=window.__cssrContext;v[n]||(v[n]=!0,Ft(t,e,r,i));return}let p;const{els:f}=t;let g;if(n===void 0&&(g=t.render(r),n=Sr(g)),u){u(n,g!=null?g:t.render(r));return}const b=ft(n);if(c||b===null){if(p=b===null?Tr(n):b,g===void 0&&(g=t.render(r)),p.textContent=g,b!==null)return;if(a){const v=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(p,v)}else document.head.appendChild(p);s&&pt(p,1),Vr(f,p)}else{const v=Wt(b);s?v===null?console.error(`[css-render/mount]: The style with id='${n}' has been mounted in no-count mode.`):pt(b,v+1):v!==null&&console.error(`[css-render/mount]: The style with id='${n}' has been mounted in count mode.`)}return b!=null?b:p}function Rr(e){return Ft(this,this.instance,e)}function Nr(e={}){const{target:t,id:n,ssr:r,props:a,count:s=!1,head:i=!1,boost:c=!1,force:u=!1}=e;return Dr(this.instance,this,n!=null?n:t,a,i,s,c,u,r)}function Ir(e={}){const{id:t,target:n,delay:r=0,count:a=!1}=e;r===0?Ut(this.instance,this,t!=null?t:n,a):setTimeout(()=>Ut(this.instance,this,t!=null?t:n,a),r)}const He=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Rr,mount:Nr,unmount:Ir}},Mr=function(e,t,n,r){return Array.isArray(t)?He(e,{$:null},null,t):Array.isArray(n)?He(e,t,null,n):Array.isArray(r)?He(e,t,n,r):He(e,t,n,null)};function zr(e={}){let t=null;const n={c:(...r)=>Mr(n,...r),use:(r,...a)=>r.install(n,...a),find:ft,context:{},config:e,get __styleSheet(){if(!t){const r=document.createElement("style");return document.head.appendChild(r),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return n}const{c:mt}=zr(),jr=mt(".xicon",{width:"1em",height:"1em",display:"inline-flex"},[mt("svg",{width:"1em",height:"1em"}),mt("svg:not([fill])",{fill:"currentColor"})]),Pr=()=>{jr.mount({id:"xicons-icon"})},Ht={size:[String,Number],color:String,tag:String},qt=Symbol("IconConfigInjection");o.defineComponent({name:"IconConfigProvider",props:Ht,setup(e,{slots:t}){return o.provide(qt,e),()=>o.renderSlot(t,"default")}});const Fr="span",be=o.defineComponent({name:"Icon",props:Ht,setup(e,{slots:t}){const n=o.inject(qt,null),r=o.computed(()=>{var i;const c=(i=e.size)!==null&&i!==void 0?i:n==null?void 0:n.size;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),a=o.computed(()=>{const{color:i}=e;return i===void 0?n?n.color:void 0:i}),s=o.computed(()=>{var i;const{tag:c}=e;return c===void 0?(i=n==null?void 0:n.tag)!==null&&i!==void 0?i:Fr:c});return o.onBeforeMount(()=>{Pr()}),()=>o.h(s.value,{class:"xicon",style:{color:a.value,fontSize:r.value}},[o.renderSlot(t,"default")])}});var bi="";const Wr={class:"lew-alert-group"},Ur={class:"alert-icon"},Hr={class:"message"},qr={class:"title"},Xr=["onClick"],Yr=o.defineComponent({name:"LewAlert",props:{alertList:{type:Array,default(){return[]}}},emits:["close"],setup(e,{emit:t}){return(n,r)=>(o.openBlock(),o.createElementBlock("div",Wr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.alertList,(a,s)=>(o.openBlock(),o.createElementBlock("div",{key:s,class:o.normalizeClass(["lew-alert",`lew-alert-${a.type}`])},[o.createElementVNode("div",Ur,[a.type=="normal"?(o.openBlock(),o.createBlock(o.unref(be),{key:0,size:"24"},{default:o.withCtx(()=>[o.createVNode(o.unref(br))]),_:1})):o.createCommentVNode("",!0),a.type=="warning"?(o.openBlock(),o.createBlock(o.unref(be),{key:1,size:"24"},{default:o.withCtx(()=>[o.createVNode(o.unref(_r))]),_:1})):o.createCommentVNode("",!0),a.type=="success"?(o.openBlock(),o.createBlock(o.unref(be),{key:2,size:"24"},{default:o.withCtx(()=>[o.createVNode(o.unref(ur))]),_:1})):o.createCommentVNode("",!0),a.type=="danger"?(o.openBlock(),o.createBlock(o.unref(be),{key:3,size:"24"},{default:o.withCtx(()=>[o.createVNode(o.unref(vr))]),_:1})):o.createCommentVNode("",!0),a.type=="primary"?(o.openBlock(),o.createBlock(o.unref(be),{key:4,size:"24"},{default:o.withCtx(()=>[o.createVNode(o.unref(sr))]),_:1})):o.createCommentVNode("",!0)]),o.createElementVNode("div",Hr,[o.createElementVNode("div",qr,o.toDisplayString(a.title),1),o.withDirectives(o.createElementVNode("div",{class:"content"},o.toDisplayString(a.content),513),[[o.vShow,a.content]])]),o.createElementVNode("div",{class:"close",onClick:i=>t("close",s)},[o.createVNode(o.unref(be),{size:"20"},{default:o.withCtx(()=>[o.createVNode(o.unref(pr))]),_:1})],8,Xr)],2))),128))]))}});function Gr(e){const t=document.createElement("div");t.id=e,document.body.appendChild(t),o.onUnmounted(()=>{document.body.removeChild(t)})}var wi="",Kr=P(o.defineComponent({name:"LewModal",props:{title:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},visible:{type:Boolean,default:!1}},emits:["maskClick","confirm"],setup(e,{emit:t}){Gr("lew-modal");const n=()=>{t("maskClick")};return(r,a)=>(o.openBlock(),o.createBlock(o.Teleport,{to:"#lew-modal"},[o.createVNode(o.Transition,{name:"fade"},{default:o.withCtx(()=>[e.visible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"lew-modal",onClick:n},[e.visible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"lew-modal-box",style:o.normalizeStyle(`width:${e.width};height:${e.height}`),onClick:a[0]||(a[0]=o.withModifiers(()=>{},["stop"]))},[o.renderSlot(r.$slots,"default",{},void 0,!0)],4)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)]),_:3})]))}}),[["__scopeId","data-v-3af6ad00"]]),F="top",U="bottom",H="right",W="left",ht="auto",Se=[F,U,H,W],we="start",Te="end",Jr="clippingParents",Xt="viewport",Ve="popper",Zr="reference",Yt=Se.reduce(function(e,t){return e.concat([t+"-"+we,t+"-"+Te])},[]),Gt=[].concat(Se,[ht]).reduce(function(e,t){return e.concat([t,t+"-"+we,t+"-"+Te])},[]),Qr="beforeRead",eo="read",to="afterRead",no="beforeMain",ro="main",oo="afterMain",ao="beforeWrite",io="write",so="afterWrite",lo=[Qr,eo,to,no,ro,oo,ao,io,so];function Q(e){return e?(e.nodeName||"").toLowerCase():null}function Y(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xe(e){var t=Y(e).Element;return e instanceof t||e instanceof Element}function q(e){var t=Y(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function vt(e){if(typeof ShadowRoot=="undefined")return!1;var t=Y(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function co(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},s=t.elements[n];!q(s)||!Q(s)||(Object.assign(s.style,r),Object.keys(a).forEach(function(i){var c=a[i];c===!1?s.removeAttribute(i):s.setAttribute(i,c===!0?"":c)}))})}function uo(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var a=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=i.reduce(function(u,p){return u[p]="",u},{});!q(a)||!Q(a)||(Object.assign(a.style,c),Object.keys(s).forEach(function(u){a.removeAttribute(u)}))})}}var Kt={name:"applyStyles",enabled:!0,phase:"write",fn:co,effect:uo,requires:["computeStyles"]};function ee(e){return e.split("-")[0]}var pe=Math.max,qe=Math.min,_e=Math.round;function ke(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,a=1;if(q(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(r=_e(n.width)/i||1),s>0&&(a=_e(n.height)/s||1)}return{width:n.width/r,height:n.height/a,top:n.top/a,right:n.right/r,bottom:n.bottom/a,left:n.left/r,x:n.left/r,y:n.top/a}}function gt(e){var t=ke(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Jt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vt(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ae(e){return Y(e).getComputedStyle(e)}function fo(e){return["table","td","th"].indexOf(Q(e))>=0}function ue(e){return((xe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xe(e){return Q(e)==="html"?e:e.assignedSlot||e.parentNode||(vt(e)?e.host:null)||ue(e)}function Zt(e){return!q(e)||ae(e).position==="fixed"?null:e.offsetParent}function po(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&q(e)){var r=ae(e);if(r.position==="fixed")return null}var a=Xe(e);for(vt(a)&&(a=a.host);q(a)&&["html","body"].indexOf(Q(a))<0;){var s=ae(a);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return a;a=a.parentNode}return null}function De(e){for(var t=Y(e),n=Zt(e);n&&fo(n)&&ae(n).position==="static";)n=Zt(n);return n&&(Q(n)==="html"||Q(n)==="body"&&ae(n).position==="static")?t:n||po(e)||t}function yt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Re(e,t,n){return pe(e,qe(t,n))}function mo(e,t,n){var r=Re(e,t,n);return r>n?n:r}function Qt(){return{top:0,right:0,bottom:0,left:0}}function en(e){return Object.assign({},Qt(),e)}function tn(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ho=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,en(typeof t!="number"?t:tn(t,Se))};function vo(e){var t,n=e.state,r=e.name,a=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,c=ee(n.placement),u=yt(c),p=[W,H].indexOf(c)>=0,f=p?"height":"width";if(!(!s||!i)){var g=ho(a.padding,n),b=gt(s),v=u==="y"?F:W,x=u==="y"?U:H,w=n.rects.reference[f]+n.rects.reference[u]-i[u]-n.rects.popper[f],_=i[u]-n.rects.reference[u],$=De(s),E=$?u==="y"?$.clientHeight||0:$.clientWidth||0:0,A=w/2-_/2,l=g[v],O=E-b[f]-g[x],h=E/2-b[f]/2+A,B=Re(l,h,O),T=u;n.modifiersData[r]=(t={},t[T]=B,t.centerOffset=B-h,t)}}function go(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||!Jt(t.elements.popper,a)||(t.elements.arrow=a))}var yo={name:"arrow",enabled:!0,phase:"main",fn:vo,effect:go,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ce(e){return e.split("-")[1]}var bo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wo(e){var t=e.x,n=e.y,r=window,a=r.devicePixelRatio||1;return{x:_e(t*a)/a||0,y:_e(n*a)/a||0}}function nn(e){var t,n=e.popper,r=e.popperRect,a=e.placement,s=e.variation,i=e.offsets,c=e.position,u=e.gpuAcceleration,p=e.adaptive,f=e.roundOffsets,g=e.isFixed,b=i.x,v=b===void 0?0:b,x=i.y,w=x===void 0?0:x,_=typeof f=="function"?f({x:v,y:w}):{x:v,y:w};v=_.x,w=_.y;var $=i.hasOwnProperty("x"),E=i.hasOwnProperty("y"),A=W,l=F,O=window;if(p){var h=De(n),B="clientHeight",T="clientWidth";if(h===Y(n)&&(h=ue(n),ae(h).position!=="static"&&c==="absolute"&&(B="scrollHeight",T="scrollWidth")),h=h,a===F||(a===W||a===H)&&s===Te){l=U;var N=g&&h===O&&O.visualViewport?O.visualViewport.height:h[B];w-=N-r.height,w*=u?1:-1}if(a===W||(a===F||a===U)&&s===Te){A=H;var D=g&&h===O&&O.visualViewport?O.visualViewport.width:h[T];v-=D-r.width,v*=u?1:-1}}var R=Object.assign({position:c},p&&bo),S=f===!0?wo({x:v,y:w}):{x:v,y:w};if(v=S.x,w=S.y,u){var V;return Object.assign({},R,(V={},V[l]=E?"0":"",V[A]=$?"0":"",V.transform=(O.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},R,(t={},t[l]=E?w+"px":"",t[A]=$?v+"px":"",t.transform="",t))}function xo(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,c=n.roundOffsets,u=c===void 0?!0:c,p={placement:ee(t.placement),variation:Ce(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,nn(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,nn(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var _o={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xo,data:{}},Ye={passive:!0};function ko(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,s=a===void 0?!0:a,i=r.resize,c=i===void 0?!0:i,u=Y(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach(function(f){f.addEventListener("scroll",n.update,Ye)}),c&&u.addEventListener("resize",n.update,Ye),function(){s&&p.forEach(function(f){f.removeEventListener("scroll",n.update,Ye)}),c&&u.removeEventListener("resize",n.update,Ye)}}var Co={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ko,data:{}},Eo={left:"right",right:"left",bottom:"top",top:"bottom"};function Ge(e){return e.replace(/left|right|bottom|top/g,function(t){return Eo[t]})}var Oo={start:"end",end:"start"};function rn(e){return e.replace(/start|end/g,function(t){return Oo[t]})}function bt(e){var t=Y(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function wt(e){return ke(ue(e)).left+bt(e).scrollLeft}function Bo(e){var t=Y(e),n=ue(e),r=t.visualViewport,a=n.clientWidth,s=n.clientHeight,i=0,c=0;return r&&(a=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=r.offsetLeft,c=r.offsetTop)),{width:a,height:s,x:i+wt(e),y:c}}function $o(e){var t,n=ue(e),r=bt(e),a=(t=e.ownerDocument)==null?void 0:t.body,s=pe(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=pe(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-r.scrollLeft+wt(e),u=-r.scrollTop;return ae(a||n).direction==="rtl"&&(c+=pe(n.clientWidth,a?a.clientWidth:0)-s),{width:s,height:i,x:c,y:u}}function xt(e){var t=ae(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function on(e){return["html","body","#document"].indexOf(Q(e))>=0?e.ownerDocument.body:q(e)&&xt(e)?e:on(Xe(e))}function Ne(e,t){var n;t===void 0&&(t=[]);var r=on(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),s=Y(r),i=a?[s].concat(s.visualViewport||[],xt(r)?r:[]):r,c=t.concat(i);return a?c:c.concat(Ne(Xe(i)))}function _t(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ao(e){var t=ke(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function an(e,t){return t===Xt?_t(Bo(e)):xe(t)?Ao(t):_t($o(ue(e)))}function Lo(e){var t=Ne(Xe(e)),n=["absolute","fixed"].indexOf(ae(e).position)>=0,r=n&&q(e)?De(e):e;return xe(r)?t.filter(function(a){return xe(a)&&Jt(a,r)&&Q(a)!=="body"}):[]}function So(e,t,n){var r=t==="clippingParents"?Lo(e):[].concat(t),a=[].concat(r,[n]),s=a[0],i=a.reduce(function(c,u){var p=an(e,u);return c.top=pe(p.top,c.top),c.right=qe(p.right,c.right),c.bottom=qe(p.bottom,c.bottom),c.left=pe(p.left,c.left),c},an(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function sn(e){var t=e.reference,n=e.element,r=e.placement,a=r?ee(r):null,s=r?Ce(r):null,i=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,u;switch(a){case F:u={x:i,y:t.y-n.height};break;case U:u={x:i,y:t.y+t.height};break;case H:u={x:t.x+t.width,y:c};break;case W:u={x:t.x-n.width,y:c};break;default:u={x:t.x,y:t.y}}var p=a?yt(a):null;if(p!=null){var f=p==="y"?"height":"width";switch(s){case we:u[p]=u[p]-(t[f]/2-n[f]/2);break;case Te:u[p]=u[p]+(t[f]/2-n[f]/2);break}}return u}function Ie(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,s=n.boundary,i=s===void 0?Jr:s,c=n.rootBoundary,u=c===void 0?Xt:c,p=n.elementContext,f=p===void 0?Ve:p,g=n.altBoundary,b=g===void 0?!1:g,v=n.padding,x=v===void 0?0:v,w=en(typeof x!="number"?x:tn(x,Se)),_=f===Ve?Zr:Ve,$=e.rects.popper,E=e.elements[b?_:f],A=So(xe(E)?E:E.contextElement||ue(e.elements.popper),i,u),l=ke(e.elements.reference),O=sn({reference:l,element:$,strategy:"absolute",placement:a}),h=_t(Object.assign({},$,O)),B=f===Ve?h:l,T={top:A.top-B.top+w.top,bottom:B.bottom-A.bottom+w.bottom,left:A.left-B.left+w.left,right:B.right-A.right+w.right},N=e.modifiersData.offset;if(f===Ve&&N){var D=N[a];Object.keys(T).forEach(function(R){var S=[H,U].indexOf(R)>=0?1:-1,V=[F,U].indexOf(R)>=0?"y":"x";T[R]+=D[V]*S})}return T}function To(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,s=n.rootBoundary,i=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,p=u===void 0?Gt:u,f=Ce(r),g=f?c?Yt:Yt.filter(function(x){return Ce(x)===f}):Se,b=g.filter(function(x){return p.indexOf(x)>=0});b.length===0&&(b=g);var v=b.reduce(function(x,w){return x[w]=Ie(e,{placement:w,boundary:a,rootBoundary:s,padding:i})[ee(w)],x},{});return Object.keys(v).sort(function(x,w){return v[x]-v[w]})}function Vo(e){if(ee(e)===ht)return[];var t=Ge(e);return[rn(e),t,rn(t)]}function Do(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,s=a===void 0?!0:a,i=n.altAxis,c=i===void 0?!0:i,u=n.fallbackPlacements,p=n.padding,f=n.boundary,g=n.rootBoundary,b=n.altBoundary,v=n.flipVariations,x=v===void 0?!0:v,w=n.allowedAutoPlacements,_=t.options.placement,$=ee(_),E=$===_,A=u||(E||!x?[Ge(_)]:Vo(_)),l=[_].concat(A).reduce(function(ie,Z){return ie.concat(ee(Z)===ht?To(t,{placement:Z,boundary:f,rootBoundary:g,padding:p,flipVariations:x,allowedAutoPlacements:w}):Z)},[]),O=t.rects.reference,h=t.rects.popper,B=new Map,T=!0,N=l[0],D=0;D<l.length;D++){var R=l[D],S=ee(R),V=Ce(R)===we,K=[F,U].indexOf(S)>=0,J=K?"width":"height",M=Ie(t,{placement:R,boundary:f,rootBoundary:g,altBoundary:b,padding:p}),z=K?V?H:W:V?U:F;O[J]>h[J]&&(z=Ge(z));var I=Ge(z),ne=[];if(s&&ne.push(M[S]<=0),c&&ne.push(M[z]<=0,M[I]<=0),ne.every(function(ie){return ie})){N=R,T=!1;break}B.set(R,ne)}if(T)for(var re=x?3:1,he=function(Z){var se=l.find(function(Oe){var le=B.get(Oe);if(le)return le.slice(0,Z).every(function(Be){return Be})});if(se)return N=se,"break"},oe=re;oe>0;oe--){var ve=he(oe);if(ve==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}var Ro={name:"flip",enabled:!0,phase:"main",fn:Do,requiresIfExists:["offset"],data:{_skip:!1}};function ln(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function cn(e){return[F,H,U,W].some(function(t){return e[t]>=0})}function No(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ie(t,{elementContext:"reference"}),c=Ie(t,{altBoundary:!0}),u=ln(i,r),p=ln(c,a,s),f=cn(u),g=cn(p);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:p,isReferenceHidden:f,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":g})}var Io={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:No};function Mo(e,t,n){var r=ee(e),a=[W,F].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],c=s[1];return i=i||0,c=(c||0)*a,[W,H].indexOf(r)>=0?{x:c,y:i}:{x:i,y:c}}function zo(e){var t=e.state,n=e.options,r=e.name,a=n.offset,s=a===void 0?[0,0]:a,i=Gt.reduce(function(f,g){return f[g]=Mo(g,t.rects,s),f},{}),c=i[t.placement],u=c.x,p=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=i}var jo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zo};function Po(e){var t=e.state,n=e.name;t.modifiersData[n]=sn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Fo={name:"popperOffsets",enabled:!0,phase:"read",fn:Po,data:{}};function Wo(e){return e==="x"?"y":"x"}function Uo(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,s=a===void 0?!0:a,i=n.altAxis,c=i===void 0?!1:i,u=n.boundary,p=n.rootBoundary,f=n.altBoundary,g=n.padding,b=n.tether,v=b===void 0?!0:b,x=n.tetherOffset,w=x===void 0?0:x,_=Ie(t,{boundary:u,rootBoundary:p,padding:g,altBoundary:f}),$=ee(t.placement),E=Ce(t.placement),A=!E,l=yt($),O=Wo(l),h=t.modifiersData.popperOffsets,B=t.rects.reference,T=t.rects.popper,N=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,D=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(!!h){if(s){var V,K=l==="y"?F:W,J=l==="y"?U:H,M=l==="y"?"height":"width",z=h[l],I=z+_[K],ne=z-_[J],re=v?-T[M]/2:0,he=E===we?B[M]:T[M],oe=E===we?-T[M]:-B[M],ve=t.elements.arrow,ie=v&&ve?gt(ve):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Qt(),se=Z[K],Oe=Z[J],le=Re(0,B[M],ie[M]),Be=A?B[M]/2-re-le-se-D.mainAxis:he-le-se-D.mainAxis,de=A?-B[M]/2+re+le+Oe+D.mainAxis:oe+le+Oe+D.mainAxis,$e=t.elements.arrow&&De(t.elements.arrow),Qe=$e?l==="y"?$e.clientTop||0:$e.clientLeft||0:0,je=(V=R==null?void 0:R[l])!=null?V:0,et=z+Be-je-Qe,tt=z+de-je,Pe=Re(v?qe(I,et):I,z,v?pe(ne,tt):ne);h[l]=Pe,S[l]=Pe-z}if(c){var Fe,nt=l==="x"?F:W,rt=l==="x"?U:H,ce=h[O],fe=O==="y"?"height":"width",We=ce+_[nt],ge=ce-_[rt],Ue=[F,W].indexOf($)!==-1,ot=(Fe=R==null?void 0:R[O])!=null?Fe:0,at=Ue?We:ce-B[fe]-T[fe]-ot+D.altAxis,it=Ue?ce+B[fe]+T[fe]-ot-D.altAxis:ge,st=v&&Ue?mo(at,ce,it):Re(v?at:We,ce,v?it:ge);h[O]=st,S[O]=st-ce}t.modifiersData[r]=S}}var Ho={name:"preventOverflow",enabled:!0,phase:"main",fn:Uo,requiresIfExists:["offset"]};function qo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Xo(e){return e===Y(e)||!q(e)?bt(e):qo(e)}function Yo(e){var t=e.getBoundingClientRect(),n=_e(t.width)/e.offsetWidth||1,r=_e(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Go(e,t,n){n===void 0&&(n=!1);var r=q(t),a=q(t)&&Yo(t),s=ue(t),i=ke(e,a),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Q(t)!=="body"||xt(s))&&(c=Xo(t)),q(t)?(u=ke(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=wt(s))),{x:i.left+c.scrollLeft-u.x,y:i.top+c.scrollTop-u.y,width:i.width,height:i.height}}function Ko(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function a(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(c){if(!n.has(c)){var u=t.get(c);u&&a(u)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||a(s)}),r}function Jo(e){var t=Ko(e);return lo.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function Zo(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qo(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var un={placement:"bottom",modifiers:[],strategy:"absolute"};function dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function ea(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,a=t.defaultOptions,s=a===void 0?un:a;return function(c,u,p){p===void 0&&(p=s);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},un,s),modifiersData:{},elements:{reference:c,popper:u},attributes:{},styles:{}},g=[],b=!1,v={state:f,setOptions:function($){var E=typeof $=="function"?$(f.options):$;w(),f.options=Object.assign({},s,f.options,E),f.scrollParents={reference:xe(c)?Ne(c):c.contextElement?Ne(c.contextElement):[],popper:Ne(u)};var A=Jo(Qo([].concat(r,f.options.modifiers)));return f.orderedModifiers=A.filter(function(l){return l.enabled}),x(),v.update()},forceUpdate:function(){if(!b){var $=f.elements,E=$.reference,A=$.popper;if(!!dn(E,A)){f.rects={reference:Go(E,De(A),f.options.strategy==="fixed"),popper:gt(A)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(D){return f.modifiersData[D.name]=Object.assign({},D.data)});for(var l=0;l<f.orderedModifiers.length;l++){if(f.reset===!0){f.reset=!1,l=-1;continue}var O=f.orderedModifiers[l],h=O.fn,B=O.options,T=B===void 0?{}:B,N=O.name;typeof h=="function"&&(f=h({state:f,options:T,name:N,instance:v})||f)}}}},update:Zo(function(){return new Promise(function(_){v.forceUpdate(),_(f)})}),destroy:function(){w(),b=!0}};if(!dn(c,u))return v;v.setOptions(p).then(function(_){!b&&p.onFirstUpdate&&p.onFirstUpdate(_)});function x(){f.orderedModifiers.forEach(function(_){var $=_.name,E=_.options,A=E===void 0?{}:E,l=_.effect;if(typeof l=="function"){var O=l({state:f,name:$,instance:v,options:A}),h=function(){};g.push(O||h)}})}function w(){g.forEach(function(_){return _()}),g=[]}return v}}var ta=[Co,Fo,_o,Kt,jo,Ro,Ho,yo,Io],na=ea({defaultModifiers:ta}),ra="tippy-box",fn="tippy-content",oa="tippy-backdrop",pn="tippy-arrow",mn="tippy-svg-arrow",me={passive:!0,capture:!0},hn=function(){return document.body};function kt(e,t,n){if(Array.isArray(e)){var r=e[t];return r==null?Array.isArray(n)?n[t]:n:r}return e}function Ct(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function vn(e,t){return typeof e=="function"?e.apply(void 0,t):e}function gn(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function aa(e){return e.split(/\s+/).filter(Boolean)}function Ee(e){return[].concat(e)}function yn(e,t){e.indexOf(t)===-1&&e.push(t)}function ia(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function sa(e){return e.split("-")[0]}function Ke(e){return[].slice.call(e)}function bn(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Me(){return document.createElement("div")}function Je(e){return["Element","Fragment"].some(function(t){return Ct(e,t)})}function la(e){return Ct(e,"NodeList")}function ca(e){return Ct(e,"MouseEvent")}function ua(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function da(e){return Je(e)?[e]:la(e)?Ke(e):Array.isArray(e)?e:Ke(document.querySelectorAll(e))}function Et(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function wn(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function fa(e){var t,n=Ee(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function pa(e,t){var n=t.clientX,r=t.clientY;return e.every(function(a){var s=a.popperRect,i=a.popperState,c=a.props,u=c.interactiveBorder,p=sa(i.placement),f=i.modifiersData.offset;if(!f)return!0;var g=p==="bottom"?f.top.y:0,b=p==="top"?f.bottom.y:0,v=p==="right"?f.left.x:0,x=p==="left"?f.right.x:0,w=s.top-r+g>u,_=r-s.bottom-b>u,$=s.left-n+v>u,E=n-s.right-x>u;return w||_||$||E})}function Ot(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){e[r](a,n)})}function xn(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var te={isTouch:!1},_n=0;function ma(){te.isTouch||(te.isTouch=!0,window.performance&&document.addEventListener("mousemove",kn))}function kn(){var e=performance.now();e-_n<20&&(te.isTouch=!1,document.removeEventListener("mousemove",kn)),_n=e}function ha(){var e=document.activeElement;if(ua(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function va(){document.addEventListener("touchstart",ma,me),window.addEventListener("blur",ha)}var ga=typeof window!="undefined"&&typeof document!="undefined",ya=ga?!!window.msCrypto:!1,ba={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},wa={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},G=Object.assign({appendTo:hn,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ba,wa),xa=Object.keys(G),_a=function(t){var n=Object.keys(t);n.forEach(function(r){G[r]=t[r]})};function Cn(e){var t=e.plugins||[],n=t.reduce(function(r,a){var s=a.name,i=a.defaultValue;if(s){var c;r[s]=e[s]!==void 0?e[s]:(c=G[s])!=null?c:i}return r},{});return Object.assign({},e,n)}function ka(e,t){var n=t?Object.keys(Cn(Object.assign({},G,{plugins:t}))):xa,r=n.reduce(function(a,s){var i=(e.getAttribute("data-tippy-"+s)||"").trim();if(!i)return a;if(s==="content")a[s]=i;else try{a[s]=JSON.parse(i)}catch{a[s]=i}return a},{});return r}function En(e,t){var n=Object.assign({},t,{content:vn(t.content,[e])},t.ignoreAttributes?{}:ka(e,t.plugins));return n.aria=Object.assign({},G.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var Ca=function(){return"innerHTML"};function Bt(e,t){e[Ca()]=t}function On(e){var t=Me();return e===!0?t.className=pn:(t.className=mn,Je(e)?t.appendChild(e):Bt(t,e)),t}function Bn(e,t){Je(t.content)?(Bt(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Bt(e,t.content):e.textContent=t.content)}function $t(e){var t=e.firstElementChild,n=Ke(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(fn)}),arrow:n.find(function(r){return r.classList.contains(pn)||r.classList.contains(mn)}),backdrop:n.find(function(r){return r.classList.contains(oa)})}}function $n(e){var t=Me(),n=Me();n.className=ra,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Me();r.className=fn,r.setAttribute("data-state","hidden"),Bn(r,e.props),t.appendChild(n),n.appendChild(r),a(e.props,e.props);function a(s,i){var c=$t(t),u=c.box,p=c.content,f=c.arrow;i.theme?u.setAttribute("data-theme",i.theme):u.removeAttribute("data-theme"),typeof i.animation=="string"?u.setAttribute("data-animation",i.animation):u.removeAttribute("data-animation"),i.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof i.maxWidth=="number"?i.maxWidth+"px":i.maxWidth,i.role?u.setAttribute("role",i.role):u.removeAttribute("role"),(s.content!==i.content||s.allowHTML!==i.allowHTML)&&Bn(p,e.props),i.arrow?f?s.arrow!==i.arrow&&(u.removeChild(f),u.appendChild(On(i.arrow))):u.appendChild(On(i.arrow)):f&&u.removeChild(f)}return{popper:t,onUpdate:a}}$n.$$tippy=!0;var Ea=1,Ze=[],At=[];function Oa(e,t){var n=En(e,Object.assign({},G,Cn(bn(t)))),r,a,s,i=!1,c=!1,u=!1,p=!1,f,g,b,v=[],x=gn(et,n.interactiveDebounce),w,_=Ea++,$=null,E=ia(n.plugins),A={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},l={id:_,reference:e,popper:Me(),popperInstance:$,props:n,state:A,plugins:E,clearDelayTimeouts:at,setProps:it,setContent:st,show:$a,hide:Aa,hideWithInteractivity:La,enable:Ue,disable:ot,unmount:Sa,destroy:Ta};if(!n.render)return l;var O=n.render(l),h=O.popper,B=O.onUpdate;h.setAttribute("data-tippy-root",""),h.id="tippy-"+l.id,l.popper=h,e._tippy=l,h._tippy=l;var T=E.map(function(d){return d.fn(l)}),N=e.hasAttribute("aria-expanded");return $e(),re(),z(),I("onCreate",[l]),n.showOnCreate&&We(),h.addEventListener("mouseenter",function(){l.props.interactive&&l.state.isVisible&&l.clearDelayTimeouts()}),h.addEventListener("mouseleave",function(){l.props.interactive&&l.props.trigger.indexOf("mouseenter")>=0&&K().addEventListener("mousemove",x)}),l;function D(){var d=l.props.touch;return Array.isArray(d)?d:[d,0]}function R(){return D()[0]==="hold"}function S(){var d;return!!((d=l.props.render)!=null&&d.$$tippy)}function V(){return w||e}function K(){var d=V().parentNode;return d?fa(d):document}function J(){return $t(h)}function M(d){return l.state.isMounted&&!l.state.isVisible||te.isTouch||f&&f.type==="focus"?0:kt(l.props.delay,d?0:1,G.delay)}function z(d){d===void 0&&(d=!1),h.style.pointerEvents=l.props.interactive&&!d?"":"none",h.style.zIndex=""+l.props.zIndex}function I(d,m,y){if(y===void 0&&(y=!0),T.forEach(function(k){k[d]&&k[d].apply(k,m)}),y){var C;(C=l.props)[d].apply(C,m)}}function ne(){var d=l.props.aria;if(!!d.content){var m="aria-"+d.content,y=h.id,C=Ee(l.props.triggerTarget||e);C.forEach(function(k){var j=k.getAttribute(m);if(l.state.isVisible)k.setAttribute(m,j?j+" "+y:y);else{var X=j&&j.replace(y,"").trim();X?k.setAttribute(m,X):k.removeAttribute(m)}})}}function re(){if(!(N||!l.props.aria.expanded)){var d=Ee(l.props.triggerTarget||e);d.forEach(function(m){l.props.interactive?m.setAttribute("aria-expanded",l.state.isVisible&&m===V()?"true":"false"):m.removeAttribute("aria-expanded")})}}function he(){K().removeEventListener("mousemove",x),Ze=Ze.filter(function(d){return d!==x})}function oe(d){if(!(te.isTouch&&(u||d.type==="mousedown"))){var m=d.composedPath&&d.composedPath()[0]||d.target;if(!(l.props.interactive&&xn(h,m))){if(Ee(l.props.triggerTarget||e).some(function(y){return xn(y,m)})){if(te.isTouch||l.state.isVisible&&l.props.trigger.indexOf("click")>=0)return}else I("onClickOutside",[l,d]);l.props.hideOnClick===!0&&(l.clearDelayTimeouts(),l.hide(),c=!0,setTimeout(function(){c=!1}),l.state.isMounted||se())}}}function ve(){u=!0}function ie(){u=!1}function Z(){var d=K();d.addEventListener("mousedown",oe,!0),d.addEventListener("touchend",oe,me),d.addEventListener("touchstart",ie,me),d.addEventListener("touchmove",ve,me)}function se(){var d=K();d.removeEventListener("mousedown",oe,!0),d.removeEventListener("touchend",oe,me),d.removeEventListener("touchstart",ie,me),d.removeEventListener("touchmove",ve,me)}function Oe(d,m){Be(d,function(){!l.state.isVisible&&h.parentNode&&h.parentNode.contains(h)&&m()})}function le(d,m){Be(d,m)}function Be(d,m){var y=J().box;function C(k){k.target===y&&(Ot(y,"remove",C),m())}if(d===0)return m();Ot(y,"remove",g),Ot(y,"add",C),g=C}function de(d,m,y){y===void 0&&(y=!1);var C=Ee(l.props.triggerTarget||e);C.forEach(function(k){k.addEventListener(d,m,y),v.push({node:k,eventType:d,handler:m,options:y})})}function $e(){R()&&(de("touchstart",je,{passive:!0}),de("touchend",tt,{passive:!0})),aa(l.props.trigger).forEach(function(d){if(d!=="manual")switch(de(d,je),d){case"mouseenter":de("mouseleave",tt);break;case"focus":de(ya?"focusout":"blur",Pe);break;case"focusin":de("focusout",Pe);break}})}function Qe(){v.forEach(function(d){var m=d.node,y=d.eventType,C=d.handler,k=d.options;m.removeEventListener(y,C,k)}),v=[]}function je(d){var m,y=!1;if(!(!l.state.isEnabled||Fe(d)||c)){var C=((m=f)==null?void 0:m.type)==="focus";f=d,w=d.currentTarget,re(),!l.state.isVisible&&ca(d)&&Ze.forEach(function(k){return k(d)}),d.type==="click"&&(l.props.trigger.indexOf("mouseenter")<0||i)&&l.props.hideOnClick!==!1&&l.state.isVisible?y=!0:We(d),d.type==="click"&&(i=!y),y&&!C&&ge(d)}}function et(d){var m=d.target,y=V().contains(m)||h.contains(m);if(!(d.type==="mousemove"&&y)){var C=fe().concat(h).map(function(k){var j,X=k._tippy,Ae=(j=X.popperInstance)==null?void 0:j.state;return Ae?{popperRect:k.getBoundingClientRect(),popperState:Ae,props:n}:null}).filter(Boolean);pa(C,d)&&(he(),ge(d))}}function tt(d){var m=Fe(d)||l.props.trigger.indexOf("click")>=0&&i;if(!m){if(l.props.interactive){l.hideWithInteractivity(d);return}ge(d)}}function Pe(d){l.props.trigger.indexOf("focusin")<0&&d.target!==V()||l.props.interactive&&d.relatedTarget&&h.contains(d.relatedTarget)||ge(d)}function Fe(d){return te.isTouch?R()!==d.type.indexOf("touch")>=0:!1}function nt(){rt();var d=l.props,m=d.popperOptions,y=d.placement,C=d.offset,k=d.getReferenceClientRect,j=d.moveTransition,X=S()?$t(h).arrow:null,Ae=k?{getBoundingClientRect:k,contextElement:k.contextElement||V()}:e,An={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(lt){var Le=lt.state;if(S()){var Va=J(),St=Va.box;["placement","reference-hidden","escaped"].forEach(function(ct){ct==="placement"?St.setAttribute("data-placement",Le.placement):Le.attributes.popper["data-popper-"+ct]?St.setAttribute("data-"+ct,""):St.removeAttribute("data-"+ct)}),Le.attributes.popper={}}}},ye=[{name:"offset",options:{offset:C}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!j}},An];S()&&X&&ye.push({name:"arrow",options:{element:X,padding:3}}),ye.push.apply(ye,(m==null?void 0:m.modifiers)||[]),l.popperInstance=na(Ae,h,Object.assign({},m,{placement:y,onFirstUpdate:b,modifiers:ye}))}function rt(){l.popperInstance&&(l.popperInstance.destroy(),l.popperInstance=null)}function ce(){var d=l.props.appendTo,m,y=V();l.props.interactive&&d===hn||d==="parent"?m=y.parentNode:m=vn(d,[y]),m.contains(h)||m.appendChild(h),l.state.isMounted=!0,nt()}function fe(){return Ke(h.querySelectorAll("[data-tippy-root]"))}function We(d){l.clearDelayTimeouts(),d&&I("onTrigger",[l,d]),Z();var m=M(!0),y=D(),C=y[0],k=y[1];te.isTouch&&C==="hold"&&k&&(m=k),m?r=setTimeout(function(){l.show()},m):l.show()}function ge(d){if(l.clearDelayTimeouts(),I("onUntrigger",[l,d]),!l.state.isVisible){se();return}if(!(l.props.trigger.indexOf("mouseenter")>=0&&l.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(d.type)>=0&&i)){var m=M(!1);m?a=setTimeout(function(){l.state.isVisible&&l.hide()},m):s=requestAnimationFrame(function(){l.hide()})}}function Ue(){l.state.isEnabled=!0}function ot(){l.hide(),l.state.isEnabled=!1}function at(){clearTimeout(r),clearTimeout(a),cancelAnimationFrame(s)}function it(d){if(!l.state.isDestroyed){I("onBeforeUpdate",[l,d]),Qe();var m=l.props,y=En(e,Object.assign({},m,bn(d),{ignoreAttributes:!0}));l.props=y,$e(),m.interactiveDebounce!==y.interactiveDebounce&&(he(),x=gn(et,y.interactiveDebounce)),m.triggerTarget&&!y.triggerTarget?Ee(m.triggerTarget).forEach(function(C){C.removeAttribute("aria-expanded")}):y.triggerTarget&&e.removeAttribute("aria-expanded"),re(),z(),B&&B(m,y),l.popperInstance&&(nt(),fe().forEach(function(C){requestAnimationFrame(C._tippy.popperInstance.forceUpdate)})),I("onAfterUpdate",[l,d])}}function st(d){l.setProps({content:d})}function $a(){var d=l.state.isVisible,m=l.state.isDestroyed,y=!l.state.isEnabled,C=te.isTouch&&!l.props.touch,k=kt(l.props.duration,0,G.duration);if(!(d||m||y||C)&&!V().hasAttribute("disabled")&&(I("onShow",[l],!1),l.props.onShow(l)!==!1)){if(l.state.isVisible=!0,S()&&(h.style.visibility="visible"),z(),Z(),l.state.isMounted||(h.style.transition="none"),S()){var j=J(),X=j.box,Ae=j.content;Et([X,Ae],0)}b=function(){var ye;if(!(!l.state.isVisible||p)){if(p=!0,h.offsetHeight,h.style.transition=l.props.moveTransition,S()&&l.props.animation){var Lt=J(),lt=Lt.box,Le=Lt.content;Et([lt,Le],k),wn([lt,Le],"visible")}ne(),re(),yn(At,l),(ye=l.popperInstance)==null||ye.forceUpdate(),I("onMount",[l]),l.props.animation&&S()&&le(k,function(){l.state.isShown=!0,I("onShown",[l])})}},ce()}}function Aa(){var d=!l.state.isVisible,m=l.state.isDestroyed,y=!l.state.isEnabled,C=kt(l.props.duration,1,G.duration);if(!(d||m||y)&&(I("onHide",[l],!1),l.props.onHide(l)!==!1)){if(l.state.isVisible=!1,l.state.isShown=!1,p=!1,i=!1,S()&&(h.style.visibility="hidden"),he(),se(),z(!0),S()){var k=J(),j=k.box,X=k.content;l.props.animation&&(Et([j,X],C),wn([j,X],"hidden"))}ne(),re(),l.props.animation?S()&&Oe(C,l.unmount):l.unmount()}}function La(d){K().addEventListener("mousemove",x),yn(Ze,x),x(d)}function Sa(){l.state.isVisible&&l.hide(),l.state.isMounted&&(rt(),fe().forEach(function(d){d._tippy.unmount()}),h.parentNode&&h.parentNode.removeChild(h),At=At.filter(function(d){return d!==l}),l.state.isMounted=!1,I("onHidden",[l]))}function Ta(){l.state.isDestroyed||(l.clearDelayTimeouts(),l.unmount(),Qe(),delete e._tippy,l.state.isDestroyed=!0,I("onDestroy",[l]))}}function ze(e,t){t===void 0&&(t={});var n=G.plugins.concat(t.plugins||[]);va();var r=Object.assign({},t,{plugins:n}),a=da(e),s=a.reduce(function(i,c){var u=c&&Oa(c,r);return u&&i.push(u),i},[]);return Je(e)?s[0]:s}ze.defaultProps=G,ze.setDefaultProps=_a,ze.currentInput=te,Object.assign({},Kt,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),ze.setDefaultProps({render:$n});var _i="",ki="",Ci="",Ei="",Ba={install(e){e.directive("tooltip",{mounted(t,n){ze(t,{theme:"dark",trigger:n.value.trigger,content:n.value.content,animation:"shift-away-subtle",interactive:!0,appendTo:"parent",placement:n.value.placement})}})}},Oi="",Bi="",$i="";L.LewAlert=Yr,L.LewAvatar=Tn,L.LewBadge=Mn,L.LewButton=Dn,L.LewCheckbox=Nt,L.LewCheckboxGroup=Zn,L.LewFormItem=Pn,L.LewInput=Rt,L.LewModal=Kr,L.LewRadiobox=It,L.LewRadioboxGroup=tr,L.LewSelect=Hn,L.LewSwitch=Xn,L.LewTabs=or,L.LewTextarea=Gn,L.LewTitle=zn,L.LewTooltips=Ba,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
33
|
+
`+e+"}":`: ${i};`}function Dl(i,e,t){return typeof i=="function"?i({context:e.context,props:t}):i}function Ms(i,e,t,n){if(!e)return"";const s=Dl(e,t,n);if(!s)return"";if(typeof s=="string")return`${i} {
|
|
34
|
+
${s}
|
|
35
|
+
}`;const o=Object.keys(s);if(o.length===0)return t.config.keepEmptyBlock?i+` {
|
|
36
|
+
}`:"";const a=i?[i+" {"]:[];return o.forEach(l=>{const c=s[l];if(l==="raw"){a.push(`
|
|
37
|
+
`+c+`
|
|
38
|
+
`);return}l=Ns(l),c!=null&&a.push(` ${l}${Bl(c)}`)}),i&&a.push("}"),a.join(`
|
|
39
|
+
`)}function Ki(i,e,t){!i||i.forEach(n=>{if(Array.isArray(n))Ki(n,e,t);else if(typeof n=="function"){const s=n(e);Array.isArray(s)?Ki(s,e,t):s&&t(s)}else n&&t(n)})}function Is(i,e,t,n,s,o){const a=i.$;!a||typeof a=="string"?e.push(a):typeof a=="function"?e.push(a({context:n.context,props:s})):(a.before&&a.before(n.context),!a.$||typeof a.$=="string"?e.push(a.$):a.$&&e.push(a.$({context:n.context,props:s})));const l=Ml(e),c=Ms(l,i.props,n,s);o&&c&&o.insertRule(c),!o&&c.length&&t.push(c),i.children&&Ki(i.children,{context:n.context,props:s},u=>{if(typeof u=="string"){const h=Ms(l,{raw:u},n,s);o?o.insertRule(h):t.push(h)}else Is(u,e,t,n,s,o)}),e.pop(),a&&a.after&&a.after(n.context)}function Bs(i,e,t,n=!1){const s=[];return Is(i,[],s,e,t,n?i.instance.__styleSheet:void 0),n?"":s.join(`
|
|
40
|
+
|
|
41
|
+
`)}function Rl(i){for(var e=0,t,n=0,s=i.length;s>=4;++n,s-=4)t=i.charCodeAt(n)&255|(i.charCodeAt(++n)&255)<<8|(i.charCodeAt(++n)&255)<<16|(i.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(i.charCodeAt(n+2)&255)<<16;case 2:e^=(i.charCodeAt(n+1)&255)<<8;case 1:e^=i.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function Zi(i){if(!i)return;const e=i.parentElement;e&&e.removeChild(i)}function Ji(i){return document.querySelector(`style[cssr-id="${i}"]`)}function zl(i){const e=document.createElement("style");return e.setAttribute("cssr-id",i),e}window&&(window.__cssrContext={});function Ds(i){const e=i.getAttribute("mount-count");return e===null?null:Number(e)}function Qi(i,e){i.setAttribute("mount-count",String(e))}function Rs(i,e,t,n){const{els:s}=e;if(t===void 0)s.forEach(Zi),e.els=[];else{const o=Ji(t);if(o&&s.includes(o)){const a=Ds(o);n?a===null?console.error(`[css-render/unmount]: The style with target='${t}' is mounted in count mode.`):a<=1?(Zi(o),e.els=s.filter(l=>l!==o)):Qi(o,a-1):a!==null?console.error(`[css-render/unmount]: The style with target='${t}' is mounted in no-count mode.`):(Zi(o),e.els=s.filter(l=>l!==o))}}}function Vl(i,e){i.push(e)}function Fl(i,e,t,n,s,o,a,l,c){if(a&&!c){if(t===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}const g=window.__cssrContext;g[t]||(g[t]=!0,Bs(e,i,n,a));return}let u;const{els:h}=e;let f;if(t===void 0&&(f=e.render(n),t=Rl(f)),c){c(t,f!=null?f:e.render(n));return}const m=Ji(t);if(l||m===null){if(u=m===null?zl(t):m,f===void 0&&(f=e.render(n)),u.textContent=f,m!==null)return;if(s){const g=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(u,g)}else document.head.appendChild(u);o&&Qi(u,1),Vl(h,u)}else{const g=Ds(m);o?g===null?console.error(`[css-render/mount]: The style with id='${t}' has been mounted in no-count mode.`):Qi(m,g+1):g!==null&&console.error(`[css-render/mount]: The style with id='${t}' has been mounted in count mode.`)}return m!=null?m:u}function Hl(i){return Bs(this,this.instance,i)}function jl(i={}){const{target:e,id:t,ssr:n,props:s,count:o=!1,head:a=!1,boost:l=!1,force:c=!1}=i;return Fl(this.instance,this,t!=null?t:e,s,a,o,l,c,n)}function Ul(i={}){const{id:e,target:t,delay:n=0,count:s=!1}=i;n===0?Rs(this.instance,this,e!=null?e:t,s):setTimeout(()=>Rs(this.instance,this,e!=null?e:t,s),n)}const ii=function(i,e,t,n){return{instance:i,$:e,props:t,children:n,els:[],render:Hl,mount:jl,unmount:Ul}},ql=function(i,e,t,n){return Array.isArray(e)?ii(i,{$:null},null,e):Array.isArray(t)?ii(i,e,null,t):Array.isArray(n)?ii(i,e,t,n):ii(i,e,t,null)};function Wl(i={}){let e=null;const t={c:(...n)=>ql(t,...n),use:(n,...s)=>n.install(t,...s),find:Ji,context:{},config:i,get __styleSheet(){if(!e){const n=document.createElement("style");return document.head.appendChild(n),e=document.styleSheets[document.styleSheets.length-1],e}return e}};return t}const{c:en}=Wl(),Xl=en(".xicon",{width:"1em",height:"1em",display:"inline-flex"},[en("svg",{width:"1em",height:"1em"}),en("svg:not([fill])",{fill:"currentColor"})]),Yl=()=>{Xl.mount({id:"xicons-icon"})},zs={size:[String,Number],color:String,tag:String},Vs=Symbol("IconConfigInjection");r.defineComponent({name:"IconConfigProvider",props:zs,setup(i,{slots:e}){return r.provide(Vs,i),()=>r.renderSlot(e,"default")}});const Gl="span",He=r.defineComponent({name:"Icon",props:zs,setup(i,{slots:e}){const t=r.inject(Vs,null),n=r.computed(()=>{var a;const l=(a=i.size)!==null&&a!==void 0?a:t==null?void 0:t.size;if(l!==void 0)return typeof l=="number"||/^\d+$/.test(l)?`${l}px`:l}),s=r.computed(()=>{const{color:a}=i;return a===void 0?t?t.color:void 0:a}),o=r.computed(()=>{var a;const{tag:l}=i;return l===void 0?(a=t==null?void 0:t.tag)!==null&&a!==void 0?a:Gl:l});return r.onBeforeMount(()=>{Yl()}),()=>r.h(o.value,{class:"xicon",style:{color:s.value,fontSize:n.value}},[r.renderSlot(e,"default")])}});var uu="";const Kl={class:"lew-tag-left"},Zl={class:"lew-tag-value"},Jl={class:"lew-tag-right"};var Fs=M(r.defineComponent({name:"LewTag",props:{type:{type:String,default:"normal"},size:{type:String,default:"medium"},round:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},link:{type:String,default:""}},emits:["close"],setup(i,{emit:e}){const t=i,n=$i(),s=()=>{t.disabled||e("close")},o=()=>{t.link&&(t.link.startsWith("http")?window.open(t.link):n.push(t.link))};return(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["lew-tag",`lew-tag-${i.size} lew-tag-${i.type} ${i.round?"lew-tag-round":""} ${i.disabled?"lew-tag-disabled":""} ${i.link?"lew-tag-link":""}`]),onClick:o},[r.createElementVNode("div",Kl,[r.renderSlot(a.$slots,"left")]),r.createElementVNode("div",Zl,[r.renderSlot(a.$slots,"default")]),r.createElementVNode("div",Jl,[r.renderSlot(a.$slots,"right")]),i.closable?(r.openBlock(),r.createElementBlock("div",{key:0,class:"lew-tag-close",onClick:s},[r.createVNode(r.unref(He),{size:"13"},{default:r.withCtx(()=>[r.createVNode(r.unref(Wi))]),_:1})])):r.createCommentVNode("v-if",!0)],2))}}),[["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/tag/src/LewTag.vue"]]),mu="";const Ql={class:"lew-alert-group"},ec={class:"alert-icon"},tc={class:"message"},ic={class:"title"},nc=["onClick"];var Hs=M(r.defineComponent({name:"LewAlert",props:{alertList:{type:Array,default(){return[]}}},emits:["close"],setup(i,{emit:e}){return(t,n)=>(r.openBlock(),r.createElementBlock("div",Ql,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.alertList,(s,o)=>(r.openBlock(),r.createElementBlock("div",{key:o,class:r.normalizeClass(["lew-alert",`lew-alert-${s.type}`])},[r.createElementVNode("div",ec,[r.createVNode(r.unref(He),{size:"20"},{default:r.withCtx(()=>[s.type=="normal"?(r.openBlock(),r.createBlock(r.unref(Yi),{key:0})):r.createCommentVNode("v-if",!0),s.type=="warning"?(r.openBlock(),r.createBlock(r.unref(Gi),{key:1})):r.createCommentVNode("v-if",!0),s.type=="success"?(r.openBlock(),r.createBlock(r.unref(qi),{key:2})):r.createCommentVNode("v-if",!0),s.type=="error"?(r.openBlock(),r.createBlock(r.unref(Xi),{key:3})):r.createCommentVNode("v-if",!0),s.type=="info"?(r.openBlock(),r.createBlock(r.unref(Ui),{key:4})):r.createCommentVNode("v-if",!0)]),_:2},1024)]),r.createElementVNode("div",tc,[r.createElementVNode("div",ic,r.toDisplayString(s.title),1),r.withDirectives(r.createElementVNode("div",{class:"content"},r.toDisplayString(s.content),513),[[r.vShow,s.content]])]),r.createElementVNode("div",{class:"btn-close",onClick:a=>e("close",o)},[r.createVNode(r.unref(He),{size:"16"},{default:r.withCtx(()=>[r.createVNode(r.unref(Wi))]),_:1})],8,nc)],2))),128))]))}}),[["__scopeId","data-v-a39e41be"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/alert/src/LewAlert.vue"]]),gu="",yu="";const sc={class:"lew-dialog-box"},oc={class:"left"},ac={class:"right"},rc=r.createTextVNode("\u53D6\u6D88"),lc=r.createTextVNode("\u786E\u8BA4");var cc=M(r.defineComponent({name:"LewDialog",props:{visible:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},type:{type:String,default:""},ok:{type:Function},cancel:{type:Function}},emits:["update:visible"],setup(i,{emit:e}){const t=i,n=()=>{t.closeOnClickOverlay&&o()};let s=r.ref(!0);const o=()=>{s.value=!1,setTimeout(()=>{e("update:visible",!1)},245)},a=()=>{typeof t.ok=="function"&&t.ok(),o()},l=()=>{typeof t.cancel=="function"&&t.cancel(),o()};return(c,u)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[i.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"lew-dialog",style:r.normalizeStyle(r.unref(s)?"animation: lewDialogOpen 0.25s;":"animation: lewDialogClose 0.25s;"),onClick:n},[r.createElementVNode("div",sc,[r.createElementVNode("div",{class:"btn-close",onClick:l},[r.createVNode(r.unref(He),{size:"18"},{default:r.withCtx(()=>[r.createVNode(r.unref(Wi))]),_:1})]),r.createElementVNode("div",oc,[r.createVNode(r.unref(He),{size:"32",class:r.normalizeClass(`icon-${i.type}`)},{default:r.withCtx(()=>[i.type=="normal"?(r.openBlock(),r.createBlock(r.unref(Yi),{key:0})):r.createCommentVNode("v-if",!0),i.type=="warning"?(r.openBlock(),r.createBlock(r.unref(Gi),{key:1})):r.createCommentVNode("v-if",!0),i.type=="success"?(r.openBlock(),r.createBlock(r.unref(qi),{key:2})):r.createCommentVNode("v-if",!0),i.type=="error"?(r.openBlock(),r.createBlock(r.unref(Xi),{key:3})):r.createCommentVNode("v-if",!0),i.type=="info"?(r.openBlock(),r.createBlock(r.unref(Ui),{key:4})):r.createCommentVNode("v-if",!0)]),_:1},8,["class"])]),r.createElementVNode("div",ac,[r.createElementVNode("header",null,[r.renderSlot(c.$slots,"title",{},void 0,!0),r.createElementVNode("span",{class:"gulu-dialog-close",onClick:o})]),r.createElementVNode("main",null,[r.renderSlot(c.$slots,"content",{},void 0,!0)]),r.createElementVNode("footer",null,[r.createVNode(r.unref(ct),{size:"small",type:"blank",onClick:l},{default:r.withCtx(()=>[rc]),_:1}),r.createVNode(r.unref(ct),{size:"small",onClick:a},{default:r.withCtx(()=>[lc]),_:1})])])])],4)):r.createCommentVNode("v-if",!0)]))}}),[["__scopeId","data-v-bcca3b8e"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/dialog/src/LewDialog.vue"]]);const dc=i=>{Mt("warning",i)},hc=i=>{Mt("error",i)},uc=i=>{Mt("info",i)},pc=i=>{Mt("normal",i)},mc=i=>{Mt("success",i)},Mt=(i,e)=>{const{title:t,content:n,ok:s,cancel:o}=e,a=document.createElement("div");document.body.appendChild(a);const l=()=>{c.unmount(a),a.remove()},c=r.createApp({render(){return r.h(cc,{closeOnClickOverlay:!1,type:i,visible:!0,"onUpdate:visible":u=>{u===!1&&l()},ok:s,cancel:o},{title:()=>t,content:()=>n})}});c.mount(a)};var js={warning:dc,info:uc,normal:pc,success:mc,error:hc},vu="";const fc=i=>{dt("warning",i)},gc=i=>{dt("error",i)},yc=i=>{dt("info",i)},bc=i=>{dt("normal",i)},vc=i=>{dt("success",i)},wc=()=>{const i=document.createElement("div");i.setAttribute("id","lew-message"),document.body.appendChild(i)},dt=(i,e)=>{document.getElementById("lew-message")?xc(i,e):(wc(),dt(i,e))},xc=(i,e)=>{const t=document.getElementById("lew-message"),n=document.createElement("div"),s={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z" fill="currentColor"></path></g></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z" fill="currentColor"></path></g></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z" fill="currentColor"></path></g></svg>',normal:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z" fill="currentColor"></path></g></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z" fill="currentColor"></path></g></svg>'};n.innerHTML=`${s[i]}<span>${e}</span>`,t==null||t.appendChild(n,t==null?void 0:t.childNodes[0]),n.setAttribute("class",`message message-${i}`),setTimeout(()=>{n.setAttribute("class",`message message-${i} message-show`),setTimeout(()=>{n.setAttribute("class",`message message-${i} message-hidden`),setTimeout(()=>{t==null||t.removeChild(n)},250)},3e3)},10)};var Us={warning:fc,info:yc,normal:bc,success:vc,error:gc};function kc(i){const e=document.createElement("div");e.id=i,document.body.appendChild(e),r.onUnmounted(()=>{document.body.removeChild(e)})}var wu="",qs=M(r.defineComponent({name:"LewModal",props:{title:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},visible:{type:Boolean,default:!1}},emits:["maskClick","confirm"],setup(i,{emit:e}){kc("lew-modal");const t=()=>{e("maskClick")};return(n,s)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"#lew-modal"},[r.createVNode(r.Transition,{name:"lew-modal"},{default:r.withCtx(()=>[i.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"lew-modal",onClick:t},[i.visible?(r.openBlock(),r.createElementBlock("div",{key:0,class:"lew-modal-box",style:r.normalizeStyle(`width:${i.width};height:${i.height}`),onClick:s[0]||(s[0]=r.withModifiers(()=>{},["stop"]))},[r.renderSlot(n.$slots,"default",{},void 0,!0)],4)):r.createCommentVNode("v-if",!0)])):r.createCommentVNode("v-if",!0)]),_:3})]))}}),[["__scopeId","data-v-463e7ac1"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/modal/src/LewModal.vue"]]),ku="";const _c={class:"lew-popok"},Cc={class:"left"},Tc={class:"right"},$c={key:0,class:"title"},Ec={key:1,class:"content"},Sc={class:"footer"},Lc=r.createTextVNode("\u53D6\u6D88 "),Ac=r.createTextVNode("\u786E\u5B9A");var Ws=M(r.defineComponent({name:"LewPopok",props:{type:{type:String,default:"warning"},trigger:{type:String,default:"click"},title:{type:String,default:""},content:{type:String,default:""},placement:{type:String,default:"top"}},emits:["ok","cancel"],setup(i,{expose:e,emit:t}){const n=i;let s=r.ref(null),o=r.ref(null),a;r.onMounted(()=>{let u=n.trigger,h=n.placement;u=="hover"&&(u="mouseenter"),a=Fe(s.value,{theme:"light",trigger:u||"click",content:o.value,animation:"shift-away-subtle",interactive:!0,placement:h,appendTo:()=>document.body,allowHTML:!0,maxWidth:"none",onShow(f){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?f.popper.children[0].setAttribute("data-theme","dark"):f.popper.children[0].setAttribute("data-theme","light")}})});let l=()=>{a.hide()},c=()=>{a.hide()};return e({show:l,hide:c}),r.onUnmounted(()=>{a&&a.destroy()}),(u,h)=>(r.openBlock(),r.createElementBlock("div",_c,[r.createElementVNode("div",{ref_key:"triggerRef",ref:s},[r.renderSlot(u.$slots,"default",{},void 0,!0)],512),r.createElementVNode("div",{ref_key:"bodyRef",ref:o,class:"lew-popok-body"},[r.createElementVNode("div",Cc,[r.createVNode(r.unref(He),{size:"22",class:r.normalizeClass(`icon-${i.type}`)},{default:r.withCtx(()=>[i.type=="normal"?(r.openBlock(),r.createBlock(r.unref(Yi),{key:0})):r.createCommentVNode("v-if",!0),i.type=="warning"?(r.openBlock(),r.createBlock(r.unref(Gi),{key:1})):r.createCommentVNode("v-if",!0),i.type=="success"?(r.openBlock(),r.createBlock(r.unref(qi),{key:2})):r.createCommentVNode("v-if",!0),i.type=="error"?(r.openBlock(),r.createBlock(r.unref(Xi),{key:3})):r.createCommentVNode("v-if",!0),i.type=="info"?(r.openBlock(),r.createBlock(r.unref(Ui),{key:4})):r.createCommentVNode("v-if",!0)]),_:1},8,["class"])]),r.createElementVNode("div",Tc,[i.title?(r.openBlock(),r.createElementBlock("div",$c,r.toDisplayString(i.title),1)):r.createCommentVNode("v-if",!0),i.content?(r.openBlock(),r.createElementBlock("div",Ec,r.toDisplayString(i.content),1)):r.createCommentVNode("v-if",!0),r.createElementVNode("div",Sc,[r.createVNode(r.unref(ct),{size:"small",type:"blank",onClick:h[0]||(h[0]=f=>(r.unref(c)(),t("cancel")))},{default:r.withCtx(()=>[Lc]),_:1}),r.createVNode(r.unref(ct),{onClick:h[1]||(h[1]=f=>(r.unref(c)(),t("ok"))),size:"small"},{default:r.withCtx(()=>[Ac]),_:1})])])],512)]))}}),[["__scopeId","data-v-7f9302c1"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/popok/src/LewPopok.vue"]]),Cu="";const Pc={class:"lew-popover"};var Xs=M(r.defineComponent({name:"LewPopover",props:{trigger:{type:String,default:"click"},placement:{type:String,default:"top"}},setup(i,{expose:e}){const t=i;let n=r.ref(null),s=r.ref(null),o;return r.onMounted(()=>{let c=t.trigger,u=t.placement;c=="hover"&&(c="mouseenter"),o=Fe(n.value,{theme:"light",trigger:c,content:s.value,animation:"shift-away-subtle",interactive:!0,placement:u,appendTo:()=>document.body,allowHTML:!0,maxWidth:"none",onShow(h){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?h.popper.children[0].setAttribute("data-theme","dark"):h.popper.children[0].setAttribute("data-theme","light")}})}),e({show:()=>{o.hide()},hide:()=>{o.hide()}}),r.onUnmounted(()=>{o&&o.destroy()}),(c,u)=>(r.openBlock(),r.createElementBlock("div",Pc,[r.createElementVNode("div",{ref_key:"triggerRef",ref:n},[r.renderSlot(c.$slots,"trigger",{},void 0,!0)],512),r.createElementVNode("div",{ref_key:"bodyRef",ref:s,class:"lew-popover-body"},[r.renderSlot(c.$slots,"popover-body",{},void 0,!0)],512)]))}}),[["__scopeId","data-v-7b894581"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/popover/src/LewPopover.vue"]]),$u="";const Oc=["href"],Nc=["src"];var Ys=M(r.defineComponent({name:"LewFancyImage",props:{round:{type:Boolean,default:!1},src:{type:String,default:""},alt:{type:String,default:""}},setup(i){return(e,t)=>(r.openBlock(),r.createElementBlock("a",{class:"lew-fancy-img","data-fancybox":"gallery",href:i.src},[r.createElementVNode("img",{src:i.src},null,8,Nc)],8,Oc))}}),[["__scopeId","data-v-68377446"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/fancybox/src/LewFancyImage.vue"]]);const ht=i=>typeof i=="object"&&i!==null&&i.constructor===Object&&Object.prototype.toString.call(i)==="[object Object]",ae=(...i)=>{let e=!1;typeof i[0]=="boolean"&&(e=i.shift());let t=i[0];if(!t||typeof t!="object")throw new Error("extendee must be an object");const n=i.slice(1),s=n.length;for(let o=0;o<s;o++){const a=n[o];for(let l in a)if(a.hasOwnProperty(l)){const c=a[l];if(e&&(Array.isArray(c)||ht(c))){const u=Array.isArray(c)?[]:{};t[l]=ae(!0,t.hasOwnProperty(l)?t[l]:u,c)}else t[l]=c}}return t},K=(i,e=1e4)=>(i=parseFloat(i)||0,Math.round((i+Number.EPSILON)*e)/e),ni=function(i){return!!(i&&typeof i=="object"&&i instanceof Element&&i!==document.body)&&!i.__Panzoom&&(function(e){const t=getComputedStyle(e)["overflow-y"],n=getComputedStyle(e)["overflow-x"],s=(t==="scroll"||t==="auto")&&Math.abs(e.scrollHeight-e.clientHeight)>1,o=(n==="scroll"||n==="auto")&&Math.abs(e.scrollWidth-e.clientWidth)>1;return s||o}(i)?i:ni(i.parentNode))},Mc=typeof window!="undefined"&&window.ResizeObserver||class{constructor(i){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=i}observe(i){if(this.observables.some(t=>t.el===i))return;const e={el:i,size:{height:i.clientHeight,width:i.clientWidth}};this.observables.push(e)}unobserve(i){this.observables=this.observables.filter(e=>e.el!==i)}disconnect(){this.observables=[]}check(){const i=this.observables.filter(e=>{const t=e.el.clientHeight,n=e.el.clientWidth;if(e.size.height!==t||e.size.width!==n)return e.size.height=t,e.size.width=n,!0}).map(e=>e.el);i.length>0&&this.callback(i),window.requestAnimationFrame(this.boundCheck)}};class ut{constructor(e){this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY}}const Gs=(i,e)=>e?Math.sqrt((e.clientX-i.clientX)**2+(e.clientY-i.clientY)**2):0,tn=(i,e)=>e?{clientX:(i.clientX+e.clientX)/2,clientY:(i.clientY+e.clientY)/2}:i;class Ic{constructor(e,{start:t=()=>!0,move:n=()=>{},end:s=()=>{}}={}){this._element=e,this.startPointers=[],this.currentPointers=[],this._pointerStart=o=>{if(o.buttons>0&&o.button!==0)return;const a=new ut(o);this.currentPointers.some(l=>l.id===a.id)||this._triggerPointerStart(a,o)&&(window.addEventListener("mousemove",this._move),window.addEventListener("mouseup",this._pointerEnd))},this._touchStart=o=>{for(const a of Array.from(o.changedTouches||[]))this._triggerPointerStart(new ut(a),o)},this._move=o=>{const a=this.currentPointers.slice(),l=(c=>"changedTouches"in c)(o)?Array.from(o.changedTouches).map(c=>new ut(c)):[new ut(o)];for(const c of l){const u=this.currentPointers.findIndex(h=>h.id===c.id);u<0||(this.currentPointers[u]=c)}this._moveCallback(a,this.currentPointers.slice(),o)},this._triggerPointerEnd=(o,a)=>{const l=this.currentPointers.findIndex(c=>c.id===o.id);return!(l<0)&&(this.currentPointers.splice(l,1),this.startPointers.splice(l,1),this._endCallback(o,a),!0)},this._pointerEnd=o=>{o.buttons>0&&o.button!==0||this._triggerPointerEnd(new ut(o),o)&&(window.removeEventListener("mousemove",this._move,{passive:!1}),window.removeEventListener("mouseup",this._pointerEnd,{passive:!1}))},this._touchEnd=o=>{for(const a of Array.from(o.changedTouches||[]))this._triggerPointerEnd(new ut(a),o)},this._startCallback=t,this._moveCallback=n,this._endCallback=s,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}stop(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}_triggerPointerStart(e,t){return!!this._startCallback(e,t)&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}}class nn{constructor(e={}){this.options=ae(!0,{},e),this.plugins=[],this.events={};for(const t of["on","once"])for(const n of Object.entries(this.options[t]||{}))this[t](...n)}option(e,t,...n){e=String(e);let s=(o=e,a=this.options,o.split(".").reduce(function(l,c){return l&&l[c]},a));var o,a;return typeof s=="function"&&(s=s.call(this,this,...n)),s===void 0?t:s}localize(e,t=[]){return e=(e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(n,s,o)=>{let a="";o?a=this.option(`${s[0]+s.toLowerCase().substring(1)}.l10n.${o}`):s&&(a=this.option(`l10n.${s}`)),a||(a=n);for(let l=0;l<t.length;l++)a=a.split(t[l][0]).join(t[l][1]);return a})).replace(/\{\{(.*)\}\}/,(n,s)=>s)}on(e,t){if(ht(e)){for(const n of Object.entries(e))this.on(...n);return this}return String(e).split(" ").forEach(n=>{const s=this.events[n]=this.events[n]||[];s.indexOf(t)==-1&&s.push(t)}),this}once(e,t){if(ht(e)){for(const n of Object.entries(e))this.once(...n);return this}return String(e).split(" ").forEach(n=>{const s=(...o)=>{this.off(n,s),t.call(this,this,...o)};s._=t,this.on(n,s)}),this}off(e,t){if(!ht(e))return e.split(" ").forEach(n=>{const s=this.events[n];if(!s||!s.length)return this;let o=-1;for(let a=0,l=s.length;a<l;a++){const c=s[a];if(c&&(c===t||c._===t)){o=a;break}}o!=-1&&s.splice(o,1)}),this;for(const n of Object.entries(e))this.off(...n)}trigger(e,...t){for(const n of[...this.events[e]||[]].slice())if(n&&n.call(this,this,...t)===!1)return!1;for(const n of[...this.events["*"]||[]].slice())if(n&&n.call(this,e,this,...t)===!1)return!1;return!0}attachPlugins(e){const t={};for(const[n,s]of Object.entries(e||{}))this.options[n]===!1||this.plugins[n]||(this.options[n]=ae({},s.defaults||{},this.options[n]),t[n]=new s(this));for(const[n,s]of Object.entries(t))s.attach(this);return this.plugins=Object.assign({},this.plugins,t),this}detachPlugins(){for(const e in this.plugins){let t;(t=this.plugins[e])&&typeof t.detach=="function"&&t.detach(this)}return this.plugins={},this}}const Bc={touch:!0,zoom:!0,pinchToZoom:!0,panOnlyZoomed:!1,lockAxis:!1,friction:.64,decelFriction:.88,zoomFriction:.74,bounceForce:.2,baseScale:1,minScale:1,maxScale:2,step:.5,textSelection:!1,click:"toggleZoom",wheel:"zoom",wheelFactor:42,wheelLimit:5,draggableClass:"is-draggable",draggingClass:"is-dragging",ratio:1};class pt extends nn{constructor(e,t={}){super(ae(!0,{},Bc,t)),this.state="init",this.$container=e;for(const n of["onLoad","onWheel","onClick"])this[n]=this[n].bind(this);this.initLayout(),this.resetValues(),this.attachPlugins(pt.Plugins),this.trigger("init"),this.updateMetrics(),this.attachEvents(),this.trigger("ready"),this.option("centerOnStart")===!1?this.state="ready":this.panTo({friction:0}),e.__Panzoom=this}initLayout(){const e=this.$container;if(!(e instanceof HTMLElement))throw new Error("Panzoom: Container not found");const t=this.option("content")||e.querySelector(".panzoom__content");if(!t)throw new Error("Panzoom: Content not found");this.$content=t;let n=this.option("viewport")||e.querySelector(".panzoom__viewport");n||this.option("wrapInner")===!1||(n=document.createElement("div"),n.classList.add("panzoom__viewport"),n.append(...e.childNodes),e.appendChild(n)),this.$viewport=n||t.parentNode}resetValues(){this.updateRate=this.option("updateRate",/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)?250:24),this.container={width:0,height:0},this.viewport={width:0,height:0},this.content={origWidth:0,origHeight:0,width:0,height:0,x:this.option("x",0),y:this.option("y",0),scale:this.option("baseScale")},this.transform={x:0,y:0,scale:1},this.resetDragPosition()}onLoad(e){this.updateMetrics(),this.panTo({scale:this.option("baseScale"),friction:0}),this.trigger("load",e)}onClick(e){if(e.defaultPrevented)return;if(this.option("textSelection")&&window.getSelection().toString().length)return void e.stopPropagation();const t=this.$content.getClientRects()[0];if(this.state!=="ready"&&(this.dragPosition.midPoint||Math.abs(t.top-this.dragStart.rect.top)>1||Math.abs(t.left-this.dragStart.rect.left)>1))return e.preventDefault(),void e.stopPropagation();this.trigger("click",e)!==!1&&this.option("zoom")&&this.option("click")==="toggleZoom"&&(e.preventDefault(),e.stopPropagation(),this.zoomWithClick(e))}onWheel(e){this.trigger("wheel",e)!==!1&&this.option("zoom")&&this.option("wheel")&&this.zoomWithWheel(e)}zoomWithWheel(e){this.changedDelta===void 0&&(this.changedDelta=0);const t=Math.max(-1,Math.min(1,-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)),n=this.content.scale;let s=n*(100+t*this.option("wheelFactor"))/100;if(t<0&&Math.abs(n-this.option("minScale"))<.01||t>0&&Math.abs(n-this.option("maxScale"))<.01?(this.changedDelta+=Math.abs(t),s=n):(this.changedDelta=0,s=Math.max(Math.min(s,this.option("maxScale")),this.option("minScale"))),this.changedDelta>this.option("wheelLimit")||(e.preventDefault(),s===n))return;const o=this.$content.getBoundingClientRect(),a=e.clientX-o.left,l=e.clientY-o.top;this.zoomTo(s,{x:a,y:l})}zoomWithClick(e){const t=this.$content.getClientRects()[0],n=e.clientX-t.left,s=e.clientY-t.top;this.toggleZoom({x:n,y:s})}attachEvents(){this.$content.addEventListener("load",this.onLoad),this.$container.addEventListener("wheel",this.onWheel,{passive:!1}),this.$container.addEventListener("click",this.onClick,{passive:!1}),this.initObserver();const e=new Ic(this.$container,{start:(t,n)=>{if(!this.option("touch")||this.velocity.scale<0)return!1;const s=n.composedPath()[0];return!e.currentPointers.length&&(["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)!==-1||this.option("textSelection")&&((o,a,l)=>{const c=o.childNodes,u=document.createRange();for(let h=0;h<c.length;h++){const f=c[h];if(f.nodeType!==Node.TEXT_NODE)continue;u.selectNodeContents(f);const m=u.getBoundingClientRect();if(a>=m.left&&l>=m.top&&a<=m.right&&l<=m.bottom)return f}return!1})(s,t.clientX,t.clientY))?!1:!ni(s)&&this.trigger("touchStart",n)!==!1&&(n.type==="mousedown"&&n.preventDefault(),this.state="pointerdown",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0)},move:(t,n,s)=>{if(this.state!=="pointerdown")return;if(this.trigger("touchMove",s)===!1)return void s.preventDefault();if(n.length<2&&this.option("panOnlyZoomed")===!0&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")||n.length>1&&(!this.option("zoom")||this.option("pinchToZoom")===!1))return;const o=tn(t[0],t[1]),a=tn(n[0],n[1]),l=a.clientX-o.clientX,c=a.clientY-o.clientY,u=Gs(t[0],t[1]),h=Gs(n[0],n[1]),f=u&&h?h/u:1;this.dragOffset.x+=l,this.dragOffset.y+=c,this.dragOffset.scale*=f,this.dragOffset.time=Date.now()-this.dragPosition.time;const m=this.dragStart.scale===1&&this.option("lockAxis");if(m&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void s.preventDefault();const g=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=g>45&&g<135?"y":"x"}if(m==="xy"||this.lockAxis!=="y"){if(s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset[this.lockAxis==="x"?"y":"x"]=0),this.$container.classList.add(this.option("draggingClass")),this.transform.scale===this.option("baseScale")&&this.lockAxis==="y"||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option("baseScale")&&this.lockAxis==="x"||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,n.length>1){const g=tn(e.startPointers[0],e.startPointers[1]),b=g.clientX-this.dragStart.rect.x,v=g.clientY-this.dragStart.rect.y,{deltaX:x,deltaY:C}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,b,v);this.dragPosition.x-=x,this.dragPosition.y-=C,this.dragPosition.midPoint=a}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(t,n)=>{if(this.state!=="pointerdown")return;if(this._dragOffset=te({},this.dragOffset),e.currentPointers.length)return void this.resetDragPosition();if(this.state="decel",this.friction=this.option("decelFriction"),this.recalculateTransform(),this.$container.classList.remove(this.option("draggingClass")),this.trigger("touchEnd",n)===!1||this.state!=="decel")return;const s=this.option("minScale");if(this.transform.scale<s)return void this.zoomTo(s,{friction:.64});const o=this.option("maxScale");if(this.transform.scale-o>.01){const a=this.dragPosition.midPoint||t,l=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:a.clientX-l.left,y:a.clientY-l.top})}}});this.pointerTracker=e}initObserver(){this.resizeObserver||(this.resizeObserver=new Mc(()=>{this.updateTimer||(this.updateTimer=setTimeout(()=>{const e=this.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-this.container.width)>1||Math.abs(e.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null},this.updateRate))}),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:e,y:t,scale:n}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:t,scale:n},this.dragPosition=fe(te({},this.dragPosition),{x:e,y:t,scale:n}),this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(e){e!==!0&&this.trigger("beforeUpdate");const t=this.$container,n=this.$content,s=this.$viewport,o=n instanceof HTMLImageElement,a=this.option("zoom"),l=this.option("resizeParent",a);let c=this.option("width"),u=this.option("height"),h=c||(f=n,Math.max(parseFloat(f.naturalWidth||0),parseFloat(f.width&&f.width.baseVal&&f.width.baseVal.value||0),parseFloat(f.offsetWidth||0),parseFloat(f.scrollWidth||0)));var f;let m=u||(p=>Math.max(parseFloat(p.naturalHeight||0),parseFloat(p.height&&p.height.baseVal&&p.height.baseVal.value||0),parseFloat(p.offsetHeight||0),parseFloat(p.scrollHeight||0)))(n);Object.assign(n.style,{width:c?`${c}px`:"",height:u?`${u}px`:"",maxWidth:"",maxHeight:""}),l&&Object.assign(s.style,{width:"",height:""});const g=this.option("ratio");h=K(h*g),m=K(m*g),c=h,u=m;const b=n.getBoundingClientRect(),v=s.getBoundingClientRect(),x=s==t?v:t.getBoundingClientRect();let C=Math.max(s.offsetWidth,K(v.width)),S=Math.max(s.offsetHeight,K(v.height)),w=window.getComputedStyle(s);if(C-=parseFloat(w.paddingLeft)+parseFloat(w.paddingRight),S-=parseFloat(w.paddingTop)+parseFloat(w.paddingBottom),this.viewport.width=C,this.viewport.height=S,a){if(Math.abs(h-b.width)>.1||Math.abs(m-b.height)>.1){const p=((L,k,N,R)=>{const U=Math.min(N/L||0,R/k);return{width:L*U||0,height:k*U||0}})(h,m,Math.min(h,b.width),Math.min(m,b.height));c=K(p.width),u=K(p.height)}Object.assign(n.style,{width:`${c}px`,height:`${u}px`,transform:""})}if(l&&(Object.assign(s.style,{width:`${c}px`,height:`${u}px`}),this.viewport=fe(te({},this.viewport),{width:c,height:u})),o&&a&&typeof this.options.maxScale!="function"){const p=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:p}}this.content=fe(te({},this.content),{origWidth:h,origHeight:m,fitWidth:c,fitHeight:u,width:c,height:u,scale:1,isZoomable:a}),this.container={width:x.width,height:x.height},e!==!0&&this.trigger("afterUpdate")}zoomIn(e){this.zoomTo(this.content.scale+(e||this.option("step")))}zoomOut(e){this.zoomTo(this.content.scale-(e||this.option("step")))}toggleZoom(e={}){const t=this.option("maxScale"),n=this.option("baseScale"),s=this.content.scale>n+.5*(t-n)?n:t;this.zoomTo(s,e)}zoomTo(e=this.option("baseScale"),{x:t=null,y:n=null}={}){e=Math.max(Math.min(e,this.option("maxScale")),this.option("minScale"));const s=K(this.content.scale/(this.content.width/this.content.fitWidth),1e7);t===null&&(t=this.content.width*s*.5),n===null&&(n=this.content.height*s*.5);const{deltaX:o,deltaY:a}=this.getZoomDelta(e,t,n);t=this.content.x-o,n=this.content.y-a,this.panTo({x:t,y:n,scale:e,friction:this.option("zoomFriction")})}getZoomDelta(e,t=0,n=0){const s=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,a=t>0&&s?t/s:0,l=n>0&&o?n/o:0;return{deltaX:(this.content.fitWidth*e-s)*a,deltaY:(this.content.fitHeight*e-o)*l}}panTo({x:e=this.content.x,y:t=this.content.y,scale:n,friction:s=this.option("friction"),ignoreBounds:o=!1}={}){if(n=n||this.content.scale||1,!o){const{boundX:a,boundY:l}=this.getBounds(n);a&&(e=Math.max(Math.min(e,a.to),a.from)),l&&(t=Math.max(Math.min(t,l.to),l.from))}this.friction=s,this.transform=fe(te({},this.transform),{x:e,y:t,scale:n}),s?(this.state="panning",this.velocity={x:(1/this.friction-1)*(e-this.content.x),y:(1/this.friction-1)*(t-this.content.y),scale:(1/this.friction-1)*(n-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame(()=>this.animate())}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if(this.state!=="pointerdown")return void this.endAnimation();this.rAF=requestAnimationFrame(()=>this.animate())}getBounds(e){let t=this.boundX,n=this.boundY;if(t!==void 0&&n!==void 0)return{boundX:t,boundY:n};t={from:0,to:0},n={from:0,to:0},e=e||this.transform.scale;const s=this.content.fitWidth*e,o=this.content.fitHeight*e,a=this.viewport.width,l=this.viewport.height;if(s<a){const c=K(.5*(a-s));t.from=c,t.to=c}else t.from=K(a-s);if(o<l){const c=.5*(l-o);n.from=c,n.to=c}else n.from=K(l-o);return{boundX:t,boundY:n}}setEdgeForce(){if(this.state!=="decel")return;const e=this.option("bounceForce"),{boundX:t,boundY:n}=this.getBounds(Math.max(this.transform.scale,this.content.scale));let s,o,a,l;if(t&&(s=this.content.x<t.from,o=this.content.x>t.to),n&&(a=this.content.y<n.from,l=this.content.y>n.to),s||o){let c=((s?t.from:t.to)-this.content.x)*e;const u=this.content.x+(this.velocity.x+c)/this.friction;u>=t.from&&u<=t.to&&(c+=this.velocity.x),this.velocity.x=c,this.recalculateTransform()}if(a||l){let c=((a?n.from:n.to)-this.content.y)*e;const u=this.content.y+(c+this.velocity.y)/this.friction;u>=n.from&&u<=n.to&&(c+=this.velocity.y),this.velocity.y=c,this.recalculateTransform()}}setDragResistance(){if(this.state!=="pointerdown")return;const{boundX:e,boundY:t}=this.getBounds(this.dragPosition.scale);let n,s,o,a;if(e&&(n=this.dragPosition.x<e.from,s=this.dragPosition.x>e.to),t&&(o=this.dragPosition.y<t.from,a=this.dragPosition.y>t.to),(n||s)&&(!n||!s)){const l=n?e.from:e.to,c=l-this.dragPosition.x;this.dragPosition.x=l-.3*c}if((o||a)&&(!o||!a)){const l=o?t.from:t.to,c=l-this.dragPosition.y;this.dragPosition.y=l-.3*c}}setDragForce(){this.state==="pointerdown"&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(e){let t,n,s;if(e?(t=K(this.transform.x),n=K(this.transform.y),s=this.transform.scale,this.content=fe(te({},this.content),{x:t,y:n,scale:s})):(t=K(this.content.x),n=K(this.content.y),s=this.content.scale/(this.content.width/this.content.fitWidth),this.content=fe(te({},this.content),{x:t,y:n})),this.trigger("beforeTransform"),t=K(this.content.x),n=K(this.content.y),e&&this.option("zoom")){let o,a;o=K(this.content.fitWidth*s),a=K(this.content.fitHeight*s),this.content.width=o,this.content.height=a,this.transform=fe(te({},this.transform),{width:o,height:a,scale:s}),Object.assign(this.$content.style,{width:`${o}px`,height:`${a}px`,maxWidth:"none",maxHeight:"none",transform:`translate3d(${t}px, ${n}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${t}px, ${n}px, 0) scale(${s})`;this.trigger("afterTransform")}endAnimation(e){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state="ready",this.handleCursor(),e!==!0&&this.trigger("endAnimation")}handleCursor(){const e=this.option("draggableClass");e&&this.option("touch")&&(this.option("panOnlyZoomed")==1&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")?this.$container.classList.remove(e):this.$container.classList.add(e))}detachEvents(){this.$content.removeEventListener("load",this.onLoad),this.$container.removeEventListener("wheel",this.onWheel,{passive:!1}),this.$container.removeEventListener("click",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){this.state!=="destroy"&&(this.state="destroy",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}pt.version="4.0.27",pt.Plugins={};const Ks=(i,e)=>{let t=0;return function(...n){const s=new Date().getTime();if(!(s-t<e))return t=s,i(...n)}};class Zs{constructor(e){this.$container=null,this.$prev=null,this.$next=null,this.carousel=e,this.onRefresh=this.onRefresh.bind(this)}option(e){return this.carousel.option(`Navigation.${e}`)}createButton(e){const t=document.createElement("button");t.setAttribute("title",this.carousel.localize(`{{${e.toUpperCase()}}}`));const n=this.option("classNames.button")+" "+this.option(`classNames.${e}`);return t.classList.add(...n.split(" ")),t.setAttribute("tabindex","0"),t.innerHTML=this.carousel.localize(this.option(`${e}Tpl`)),t.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),this.carousel["slide"+(e==="next"?"Next":"Prev")]()}),t}build(){this.$container||(this.$container=document.createElement("div"),this.$container.classList.add(...this.option("classNames.main").split(" ")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton("next"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton("prev"),this.$container.appendChild(this.$prev))}onRefresh(){const e=this.carousel.pages.length;e<=1||e>1&&this.carousel.elemDimWidth<this.carousel.wrapDimWidth&&!Number.isInteger(this.carousel.option("slidesPerPage"))?this.cleanup():(this.build(),this.$prev.removeAttribute("disabled"),this.$next.removeAttribute("disabled"),this.carousel.option("infiniteX",this.carousel.option("infinite"))||(this.carousel.page<=0&&this.$prev.setAttribute("disabled",""),this.carousel.page>=e-1&&this.$next.setAttribute("disabled","")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on("refresh change",this.onRefresh)}detach(){this.carousel.off("refresh change",this.onRefresh),this.cleanup()}}Zs.defaults={prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>',nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>',classNames:{main:"carousel__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}};class Js{constructor(e){this.carousel=e,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(e){this.target=this.carousel,this.nav=e,this.attachEvents()}addAsNavFor(e){this.target=e,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.on("createSlide",this.onNavCreateSlide),this.nav.on("Panzoom.click",this.onNavClick),this.target.on("change",this.onTargetChange),this.target.on("Panzoom.afterUpdate",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(e,t,n){const s=n.target.closest(".carousel__slide");if(!s)return;n.stopPropagation();const o=parseInt(s.dataset.index,10),a=this.target.findPageForSlide(o);this.target.page!==a&&this.target.slideTo(a,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){const e=this.target.pages[this.target.page].indexes[0],t=this.nav.findPageForSlide(e);this.nav.slideTo(t),this.markSelectedSlide(e)}markSelectedSlide(e){this.selectedIndex=e,[...this.nav.slides].filter(n=>n.$el&&n.$el.classList.remove("is-nav-selected"));const t=this.nav.slides[e];t&&t.$el&&t.$el.classList.add("is-nav-selected")}attach(e){const t=e.options.Sync;(t.target||t.nav)&&(t.target?this.addAsNavFor(t.target):t.nav&&this.addAsTargetFor(t.nav),this.friction=t.friction)}detach(){this.nav&&(this.nav.off("ready",this.onNavReady),this.nav.off("Panzoom.click",this.onNavClick),this.nav.off("createSlide",this.onNavCreateSlide)),this.target&&(this.target.off("Panzoom.afterUpdate",this.onTargetChange),this.target.off("change",this.onTargetChange))}}Js.defaults={friction:.92};const Dc={Navigation:Zs,Dots:class{constructor(i){this.carousel=i,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length<this.carousel.option("Dots.minSlideCount"))return;const i=document.createElement("ol");return i.classList.add("carousel__dots"),i.addEventListener("click",e=>{if(!("page"in e.target.dataset))return;e.preventDefault(),e.stopPropagation();const t=parseInt(e.target.dataset.page,10),n=this.carousel;t!==n.page&&(n.pages.length<3&&n.option("infinite")?n[t==0?"slidePrev":"slideNext"]():n.slideTo(t))}),this.$list=i,this.carousel.$container.appendChild(i),this.carousel.$container.classList.add("has-dots"),i}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove("has-dots")}rebuildDots(){let i=this.$list;const e=!!i,t=this.carousel.pages.length;if(t<2)return void(e&&this.removeList());e||(i=this.buildList());const n=this.$list.children.length;if(n>t)for(let s=t;s<n;s++)this.$list.removeChild(this.$list.lastChild);else{for(let s=n;s<t;s++){const o=document.createElement("li");o.classList.add("carousel__dot"),o.dataset.page=s,o.setAttribute("role","button"),o.setAttribute("tabindex","0"),o.setAttribute("title",this.carousel.localize("{{GOTO}}",[["%d",s+1]])),o.addEventListener("keydown",a=>{const l=a.code;let c;l==="Enter"||l==="NumpadEnter"?c=o:l==="ArrowRight"?c=o.nextSibling:l==="ArrowLeft"&&(c=o.previousSibling),c&&c.click()}),this.$list.appendChild(o)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach(e=>{e.classList.remove("is-selected")});const i=this.$list.childNodes[this.carousel.page];i&&i.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:Js},Rc={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class mt extends nn{constructor(e,t={}){if(super(t=ae(!0,{},Rc,t)),this.state="init",this.$container=e,!(this.$container instanceof HTMLElement))throw new Error("No root element provided");this.slideNext=Ks(this.slideNext.bind(this),250),this.slidePrev=Ks(this.slidePrev.bind(this),250),this.init(),e.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(mt.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const e=this.option("prefix"),t=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${e}${t.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(e+t.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${e}${t.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(e+t.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[],this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach(e=>{const t={$el:e,isDom:!0};this.slides.push(t),this.trigger("createSlide",t,this.slides.length)}),Array.isArray(this.options.slides)&&(this.slides=ae(!0,[...this.slides],this.options.slides))}updateMetrics(){let e,t=0,n=[];this.slides.forEach((g,b)=>{const v=g.$el,x=g.isDom||!e?this.getSlideMetrics(v):e;g.index=b,g.width=x,g.left=t,e=x,t+=x,n.push(b)});let s=Math.max(this.$track.offsetWidth,K(this.$track.getBoundingClientRect().width)),o=getComputedStyle(this.$track);s-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),this.contentWidth=t,this.viewportWidth=s;const a=[],l=this.option("slidesPerPage");if(Number.isInteger(l)&&t>s)for(let g=0;g<this.slides.length;g+=l)a.push({indexes:n.slice(g,g+l),slides:this.slides.slice(g,g+l)});else{let g=0,b=0;for(let v=0;v<this.slides.length;v+=1){let x=this.slides[v];(!a.length||b+x.width>s)&&(a.push({indexes:[],slides:[]}),g=a.length-1,b=0),b+=x.width,a[g].indexes.push(v),a[g].slides.push(x)}}const c=this.option("center"),u=this.option("fill");a.forEach((g,b)=>{g.index=b,g.width=g.slides.reduce((v,x)=>v+x.width,0),g.left=g.slides[0].left,c&&(g.left+=.5*(s-g.width)*-1),u&&!this.option("infiniteX",this.option("infinite"))&&t>s&&(g.left=Math.max(g.left,0),g.left=Math.min(g.left,t-s))});const h=[];let f;a.forEach(g=>{const b=te({},g);f&&b.left===f.left?(f.width+=b.width,f.slides=[...f.slides,...b.slides],f.indexes=[...f.indexes,...b.indexes]):(b.index=h.length,f=b,h.push(b))}),this.pages=h;let m=this.page;if(m===null){const g=this.option("initialSlide");m=g!==null?this.findPageForSlide(g):parseInt(this.option("initialPage",0),10)||0,h[m]||(m=h.length&&m>h.length?h[h.length-1].index:0),this.page=m,this.pageIndex=m}this.updatePanzoom(),this.trigger("refresh")}getSlideMetrics(e){if(!e){const s=this.slides[0];(e=document.createElement("div")).dataset.isTestEl=1,e.style.visibility="hidden",e.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),s.customClass&&e.classList.add(...s.customClass.split(" ")),this.$track.prepend(e)}let t=Math.max(e.offsetWidth,K(e.getBoundingClientRect().width));const n=e.currentStyle||window.getComputedStyle(e);return t=t+(parseFloat(n.marginLeft)||0)+(parseFloat(n.marginRight)||0),e.dataset.isTestEl&&e.remove(),t}findPageForSlide(e){e=parseInt(e,10)||0;const t=this.pages.find(n=>n.indexes.indexOf(e)>-1);return t?t.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(e,t={}){const{x:n=-1*this.setPage(e,!0),y:s=0,friction:o=this.option("friction")}=t;this.Panzoom.content.x===n&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:n,y:s,friction:o,ignoreBounds:!0}),this.state==="ready"&&this.Panzoom.state==="ready"&&this.trigger("settle"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const e=ae(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:"x",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option("textSelection",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option("Panzoom"));this.Panzoom=new pt(this.$container,e),this.Panzoom.on({"*":(t,...n)=>this.trigger(`Panzoom.${t}`,...n),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger("settle")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content=fe(te({},this.Panzoom.content),{fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth}),this.pages.length>1&&this.option("infiniteX",this.option("infinite"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option("infiniteY",this.option("infinite"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const e=this.contentWidth,t=this.viewportWidth;let n=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const s=this.option("preload"),o=this.option("infiniteX",this.option("infinite")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-left")),l=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-right"));this.slides.forEach(h=>{let f,m,g=0;f=n-a,m=n+t+l,f-=s*(t+a+l),m+=s*(t+a+l);const b=h.left+h.width>f&&h.left<m;f=n+e-a,m=n+e+t+l,f-=s*(t+a+l);const v=o&&h.left+h.width>f&&h.left<m;f=n-e-a,m=n-e+t+l,f-=s*(t+a+l);const x=o&&h.left+h.width>f&&h.left<m;v||b||x?(this.createSlideEl(h),b&&(g=0),v&&(g=-1),x&&(g=1),h.left+h.width>n&&h.left<=n+t+l&&(g=0)):this.removeSlideEl(h),h.hasDiff=g});let c=0,u=0;this.slides.forEach((h,f)=>{let m=0;h.$el?(f!==c||h.hasDiff?m=u+h.hasDiff*e:u=0,h.$el.style.left=Math.abs(m)>.1?`${u+h.hasDiff*e}px`:"",c++):u+=h.width}),this.markSelectedSlides()}createSlideEl(e){if(!e)return;if(e.$el){let a=e.$el.dataset.index;if(!a||parseInt(a,10)!==e.index){let l;e.$el.dataset.index=e.index,e.$el.querySelectorAll("[data-lazy-srcset]").forEach(c=>{c.srcset=c.dataset.lazySrcset}),e.$el.querySelectorAll("[data-lazy-src]").forEach(c=>{let u=c.dataset.lazySrc;c instanceof HTMLImageElement?c.src=u:c.style.backgroundImage=`url('${u}')`}),(l=e.$el.dataset.lazySrc)&&(e.$el.style.backgroundImage=`url('${l}')`),e.state="ready"}return}const t=document.createElement("div");t.dataset.index=e.index,t.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),e.customClass&&t.classList.add(...e.customClass.split(" ")),e.html&&(t.innerHTML=e.html);const n=[];this.slides.forEach((a,l)=>{a.$el&&n.push(l)});const s=e.index;let o=null;if(n.length){let a=n.reduce((l,c)=>Math.abs(c-s)<Math.abs(l-s)?c:l);o=this.slides[a]}return this.$track.insertBefore(t,o&&o.$el?o.index<e.index?o.$el.nextSibling:o.$el:null),e.$el=t,this.trigger("createSlide",e,s),e}removeSlideEl(e){e.$el&&!e.isDom&&(this.trigger("removeSlide",e),e.$el.remove(),e.$el=null)}markSelectedSlides(){const e=this.option("classNames.slideSelected"),t="aria-hidden";this.slides.forEach((n,s)=>{const o=n.$el;if(!o)return;const a=this.pages[this.page];a&&a.indexes&&a.indexes.indexOf(s)>-1?(e&&!o.classList.contains(e)&&(o.classList.add(e),this.trigger("selectSlide",n)),o.removeAttribute(t)):(e&&o.classList.contains(e)&&(o.classList.remove(e),this.trigger("unselectSlide",n)),o.setAttribute(t,!0))})}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option("infiniteX",this.option("infinite"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const e=this.contentWidth,t=this.viewportWidth;if(!this.option("infiniteX",this.option("infinite"))||this.pages.length<2||e<t)return;const n=this.Panzoom;let s=!1;return n.content.x<-1*(e-t)&&(n.content.x+=e,this.pageIndex=this.pageIndex-this.pages.length,s=!0),n.content.x>t&&(n.content.x-=e,this.pageIndex=this.pageIndex+this.pages.length,s=!0),s&&n.state==="pointerdown"&&n.resetDragPosition(),s}onTouchEnd(e,t){const n=this.option("dragFree");if(!n&&this.pages.length>1&&e.dragOffset.time<350&&Math.abs(e.dragOffset.y)<1&&Math.abs(e.dragOffset.x)>5)this[e.dragOffset.x<0?"slideNext":"slidePrev"]();else if(n){const[,s]=this.getPageFromPosition(-1*e.transform.x);this.setPage(s)}else this.slideToClosest()}slideToClosest(e={}){let[,t]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(t,e)}getPageFromPosition(e){const t=this.pages.length;this.option("center")&&(e+=.5*this.viewportWidth);const n=Math.floor(e/this.contentWidth);e-=n*this.contentWidth;let s=this.slides.find(o=>o.left<=e&&o.left+o.width>e);if(s){let o=this.findPageForSlide(s.index);return[o,o+n*t]}return[0,0]}setPage(e,t){let n=0,s=parseInt(e,10)||0;const o=this.page,a=this.pageIndex,l=this.pages.length,c=this.contentWidth,u=this.viewportWidth;if(e=(s%l+l)%l,this.option("infiniteX",this.option("infinite"))&&c>u){const h=Math.floor(s/l)||0,f=c;if(n=this.pages[e].left+h*f,t===!0&&l>2){let m=-1*this.Panzoom.content.x;const g=n-f,b=n+f,v=Math.abs(m-n),x=Math.abs(m-g),C=Math.abs(m-b);C<v&&C<=x?(n=b,s+=l):x<v&&x<C&&(n=g,s-=l)}}else e=s=Math.max(0,Math.min(s,l-1)),n=this.pages.length?this.pages[e].left:0;return this.page=e,this.pageIndex=s,o!==null&&e!==o&&(this.prevPage=o,this.prevPageIndex=a,this.trigger("change",e,o)),n}destroy(){this.state="destroy",this.slides.forEach(e=>{this.removeSlideEl(e)}),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}mt.version="4.0.27",mt.Plugins=Dc;const si=!(typeof window=="undefined"||!window.document||!window.document.createElement);let sn=null;const Qs=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],It=i=>{if(i&&si){sn===null&&document.createElement("div").focus({get preventScroll(){return sn=!0,!1}});try{if(i.setActive)i.setActive();else if(sn)i.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,t=window.pageYOffset||document.body.scrollLeft;i.focus(),document.body.scrollTo({top:e,left:t,behavior:"auto"})}}catch{}}};class eo{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const t of["onPrepare","onClosing","onKeydown"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length<this.fancybox.option("Thumbs.minSlideCount")?this.state="disabled":this.fancybox.option("Thumbs.autoStart")===!0&&this.fancybox.Carousel.Panzoom.content.height>=this.fancybox.option("Thumbs.minScreenHeight")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(e,t){t===e.option("Thumbs.key")&&this.toggle()}build(){if(this.$container)return;const e=document.createElement("div");e.classList.add("fancybox__thumbs"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel.nextSibling),this.Carousel=new mt(e,ae(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option("Thumbs.Carousel"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on("wheel",(t,n)=>{n.preventDefault(),this.fancybox[n.deltaY<0?"prev":"next"]()}),this.$container=e,this.state="visible"}getSlides(){const e=[];for(const t of this.fancybox.items){const n=t.thumb;n&&e.push({html:`<div class="fancybox__thumb" style="background-image:url('${n}')"></div>`,customClass:`has-thumb has-${t.type||"image"}`})}return e}toggle(){this.state==="visible"?this.hide():this.state==="hidden"?this.show():this.build()}show(){this.state==="hidden"&&(this.$container.style.display="",this.Carousel.Panzoom.attachEvents(),this.state="visible")}hide(){this.state==="visible"&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display="none",this.state="hidden")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state="init"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}eo.defaults={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:"t",Carousel:{}};const to=(i,e)=>{const t=new URL(i),n=new URLSearchParams(t.search);let s=new URLSearchParams;for(const[a,l]of[...n,...Object.entries(e)])a==="t"?s.set("start",parseInt(l)):s.set(a,l);s=s.toString();let o=i.match(/#t=((.*)?\d+s)/);return o&&(s+=`#t=${o[1]}`),s},io={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:`<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">
|
|
42
|
+
<source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,format:""}};class no{constructor(e){this.fancybox=e;for(const t of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}onInit(){for(const e of this.fancybox.items)this.processType(e)}processType(e){if(e.html)return e.src=e.html,e.type="html",void delete e.html;const t=e.src||"";let n=e.type||this.fancybox.options.type,s=null;if(!t||typeof t=="string"){if(s=t.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const o=to(t,this.fancybox.option("Html.youtube")),a=encodeURIComponent(s[1]);e.videoId=a,e.src=`https://www.youtube-nocookie.com/embed/${a}?${o}`,e.thumb=e.thumb||`https://i.ytimg.com/vi/${a}/mqdefault.jpg`,e.vendor="youtube",n="video"}else if(s=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)){const o=to(t,this.fancybox.option("Html.vimeo")),a=encodeURIComponent(s[1]);e.videoId=a,e.src=`https://player.vimeo.com/video/${a}?${o}`,e.vendor="vimeo",n="video"}else(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`//maps.google.${s[1]}/?ll=${(s[2]?s[2]+"&z="+Math.floor(s[3])+(s[4]?s[4].replace(/^\//,"&"):""):s[4]+"").replace(/\?/,"&")}&output=${s[4]&&s[4].indexOf("layer=c")>0?"svembed":"embed"}`,n="map"):(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`//maps.google.${s[1]}/maps?q=${s[2].replace("query=","q=").replace("api=1","")}&output=embed`,n="map");n||(t.charAt(0)==="#"?n="inline":(s=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(n="html5video",e.format=e.format||"video/"+(s[1]==="ogv"?"ogg":s[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?n="image":t.match(/\.(pdf)((\?|#).*)?$/i)&&(n="pdf")),e.type=n||this.fancybox.option("defaultType","image"),n!=="html5video"&&n!=="video"||(e.video=ae({},this.fancybox.option("Html.video"),e.video),e._width&&e._height?e.ratio=parseFloat(e._width)/parseFloat(e._height):e.ratio=e.ratio||e.video.ratio||io.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach(e=>{e.$el&&(this.setContent(e),e.index===this.fancybox.getSlide().index&&this.playVideo(e))})}onCreateSlide(e,t,n){this.fancybox.state==="ready"&&this.setContent(n)}loadInlineContent(e){let t;if(e.src instanceof HTMLElement)t=e.src;else if(typeof e.src=="string"){const n=e.src.split("#",2),s=n.length===2&&n[0]===""?n[1]:n[0];t=document.getElementById(s)}if(t){if(e.type==="clone"||t.$placeHolder){t=t.cloneNode(!0);let n=t.getAttribute("id");n=n?`${n}--clone`:`clone-${this.fancybox.id}-${e.index}`,t.setAttribute("id",n)}else{const n=document.createElement("div");n.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(n,t),t.$placeHolder=n}this.fancybox.setContent(e,t)}else this.fancybox.setError(e,"{{ELEMENT_NOT_FOUND}}")}loadAjaxContent(e){const t=this.fancybox,n=new XMLHttpRequest;t.showLoading(e),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&t.state==="ready"&&(t.hideLoading(e),n.status===200?t.setContent(e,n.responseText):t.setError(e,n.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=e.ajax||null;n.open(s?"POST":"GET",e.src),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),e.xhr=n}loadIframeContent(e){const t=this.fancybox,n=document.createElement("iframe");if(n.className="fancybox__iframe",n.setAttribute("id",`fancybox__iframe_${t.id}_${e.index}`),n.setAttribute("allow","autoplay; fullscreen"),n.setAttribute("scrolling","auto"),e.$iframe=n,e.type!=="iframe"||e.preload===!1)return n.setAttribute("src",e.src),this.fancybox.setContent(e,n),void this.resizeIframe(e);t.showLoading(e);const s=document.createElement("div");s.style.visibility="hidden",this.fancybox.setContent(e,s),s.appendChild(n),n.onerror=()=>{t.setError(e,"{{IFRAME_ERROR}}")},n.onload=()=>{t.hideLoading(e);let o=!1;n.isReady||(n.isReady=!0,o=!0),n.src.length&&(n.parentNode.style.visibility="",this.resizeIframe(e),o&&t.revealContent(e))},n.setAttribute("src",e.src)}setAspectRatio(e){const t=e.$content,n=e.ratio;if(!t)return;let s=e._width,o=e._height;if(n||s&&o){Object.assign(t.style,{width:s&&o?"100%":"",height:s&&o?"100%":"",maxWidth:"",maxHeight:""});let a=t.offsetWidth,l=t.offsetHeight;if(s=s||a,o=o||l,s>a||o>l){let c=Math.min(a/s,l/o);s*=c,o*=c}Math.abs(s/o-n)>.01&&(n<s/o?s=o*n:o=s/n),Object.assign(t.style,{width:`${s}px`,height:`${o}px`})}}resizeIframe(e){const t=e.$iframe;if(!t)return;let n=e._width||0,s=e._height||0;n&&s&&(e.autoSize=!1);const o=t.parentNode,a=o&&o.style;if(e.preload!==!1&&e.autoSize!==!1&&a)try{const l=window.getComputedStyle(o),c=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight),u=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),h=t.contentWindow.document,f=h.getElementsByTagName("html")[0],m=h.body;a.width="",m.style.overflow="hidden",n=n||f.scrollWidth+c,a.width=`${n}px`,m.style.overflow="",a.flex="0 0 auto",a.height=`${m.scrollHeight}px`,s=f.scrollHeight+u}catch{}if(n||s){const l={flex:"0 1 auto"};n&&(l.width=`${n}px`),s&&(l.height=`${s}px`),Object.assign(a,l)}}onRefresh(e,t){t.slides.forEach(n=>{n.$el&&(n.$iframe&&this.resizeIframe(n),n.ratio&&this.setAspectRatio(n))})}setContent(e){if(e&&!e.isDom){switch(e.type){case"html":this.fancybox.setContent(e,e.src);break;case"html5video":this.fancybox.setContent(e,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,e.src).replace("{{format}}",e.format||e.html5video&&e.html5video.format||"").replace("{{poster}}",e.poster||e.thumb||""));break;case"inline":case"clone":this.loadInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"video":case"map":e.preload=!1;case"iframe":this.loadIframeContent(e)}e.ratio&&this.setAspectRatio(e)}}onSelectSlide(e,t,n){e.state==="ready"&&this.playVideo(n)}playVideo(e){if(e.type==="html5video"&&e.video.autoplay)try{const n=e.$el.querySelector("video");if(n){const s=n.play();s!==void 0&&s.then(()=>{}).catch(o=>{n.muted=!0,n.play()})}}catch{}if(e.type!=="video"||!e.$iframe||!e.$iframe.contentWindow)return;const t=()=>{if(e.state==="done"&&e.$iframe&&e.$iframe.contentWindow){let n;if(e.$iframe.isReady)return e.video&&e.video.autoplay&&(n=e.vendor=="youtube"?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(n&&e.$iframe.contentWindow.postMessage(JSON.stringify(n),"*"));e.vendor==="youtube"&&(n={event:"listening",id:e.$iframe.getAttribute("id")},e.$iframe.contentWindow.postMessage(JSON.stringify(n),"*"))}e.poller=setTimeout(t,250)};t()}onUnselectSlide(e,t,n){if(n.type==="html5video"){try{n.$el.querySelector("video").pause()}catch{}return}let s=!1;n.vendor=="vimeo"?s={method:"pause",value:"true"}:n.vendor==="youtube"&&(s={event:"command",func:"pauseVideo"}),s&&n.$iframe&&n.$iframe.contentWindow&&n.$iframe.contentWindow.postMessage(JSON.stringify(s),"*"),clearTimeout(n.poller)}onRemoveSlide(e,t,n){n.xhr&&(n.xhr.abort(),n.xhr=null),n.$iframe&&(n.$iframe.onload=n.$iframe.onerror=null,n.$iframe.src="//about:blank",n.$iframe=null);const s=n.$content;n.type==="inline"&&s&&(s.classList.remove("fancybox__content"),s.style.display!=="none"&&(s.style.display="none")),n.$closeButton&&(n.$closeButton.remove(),n.$closeButton=null);const o=s&&s.$placeHolder;o&&(o.parentNode.insertBefore(s,o),o.remove(),s.$placeHolder=null)}onMessage(e){try{let t=JSON.parse(e.data);if(e.origin==="https://player.vimeo.com"){if(t.event==="ready")for(let n of document.getElementsByClassName("fancybox__iframe"))n.contentWindow===e.source&&(n.isReady=1)}else e.origin==="https://www.youtube-nocookie.com"&&t.event==="onReady"&&(document.getElementById(t.id).isReady=1)}catch{}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}}no.defaults=io;class so{constructor(e){this.fancybox=e;for(const t of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach(e=>{e.$el&&this.setContent(e)})}onDone(e,t){this.handleCursor(t)}onClosing(e){clearTimeout(this.clickTimer),this.clickTimer=null,e.Carousel.slides.forEach(t=>{t.$image&&(t.state="destroy"),t.Panzoom&&t.Panzoom.detachEvents()}),this.fancybox.state==="closing"&&this.canZoom(e.getSlide())&&this.zoomOut()}onCreateSlide(e,t,n){this.fancybox.state==="ready"&&this.setContent(n)}onRemoveSlide(e,t,n){n.$image&&(n.$el.classList.remove(e.option("Image.canZoomInClass")),n.$image.remove(),n.$image=null),n.Panzoom&&(n.Panzoom.destroy(),n.Panzoom=null),n.$el&&n.$el.dataset&&delete n.$el.dataset.imageFit}setContent(e){if(e.isDom||e.html||e.type&&e.type!=="image"||e.$image)return;e.type="image",e.state="loading";const t=document.createElement("div");t.style.visibility="hidden";const n=document.createElement("img");n.addEventListener("load",o=>{o.stopImmediatePropagation(),this.onImageStatusChange(e)}),n.addEventListener("error",()=>{this.onImageStatusChange(e)}),n.src=e.src,n.alt="",n.draggable=!1,n.classList.add("fancybox__image"),e.srcset&&n.setAttribute("srcset",e.srcset),e.sizes&&n.setAttribute("sizes",e.sizes),e.$image=n;const s=this.fancybox.option("Image.wrap");if(s){const o=document.createElement("div");o.classList.add(typeof s=="string"?s:"fancybox__image-wrap"),o.appendChild(n),t.appendChild(o),e.$wrap=o}else t.appendChild(n);e.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(e,t),n.complete||n.error?this.onImageStatusChange(e):this.fancybox.showLoading(e)}onImageStatusChange(e){const t=e.$image;t&&e.state==="loading"&&(t.complete&&t.naturalWidth&&t.naturalHeight?(this.fancybox.hideLoading(e),this.fancybox.option("Image.fit")==="contain"&&this.initSlidePanzoom(e),e.$el.addEventListener("wheel",n=>this.onWheel(e,n),{passive:!1}),e.$content.addEventListener("click",n=>this.onClick(e,n),{passive:!1}),this.revealContent(e)):this.fancybox.setError(e,"{{IMAGE_ERROR}}"))}initSlidePanzoom(e){e.Panzoom||(e.Panzoom=new pt(e.$el,ae(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:e.$wrap,content:e.$image,width:e._width,height:e._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),e.Panzoom.on("startAnimation",()=>{this.fancybox.trigger("Image.startAnimation",e)}),e.Panzoom.on("endAnimation",()=>{e.state==="zoomIn"&&this.fancybox.done(e),this.handleCursor(e),this.fancybox.trigger("Image.endAnimation",e)}),e.Panzoom.on("afterUpdate",()=>{this.handleCursor(e),this.fancybox.trigger("Image.afterUpdate",e)}))}revealContent(e){this.fancybox.Carousel.prevPage===null&&e.index===this.fancybox.options.startIndex&&this.canZoom(e)?this.zoomIn():this.fancybox.revealContent(e)}getZoomInfo(e){const t=e.$thumb.getBoundingClientRect(),n=t.width,s=t.height,o=e.$content.getBoundingClientRect(),a=o.width,l=o.height,c=o.top-t.top,u=o.left-t.left;let h=this.fancybox.option("Image.zoomOpacity");return h==="auto"&&(h=Math.abs(n/s-a/l)>.1),{top:c,left:u,scale:a&&n?n/a:1,opacity:h}}canZoom(e){const t=this.fancybox,n=t.$container;if(window.visualViewport&&window.visualViewport.scale!==1||e.Panzoom&&!e.Panzoom.content.width||!t.option("Image.zoom")||t.option("Image.fit")!=="contain")return!1;const s=e.$thumb;if(!s||e.state==="loading")return!1;n.classList.add("fancybox__no-click");const o=s.getBoundingClientRect();let a;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const l=document.elementFromPoint(o.left+1,o.top+1)===s,c=document.elementFromPoint(o.right-1,o.bottom-1)===s;a=l&&c}else a=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===s;return n.classList.remove("fancybox__no-click"),a}zoomIn(){const e=this.fancybox,t=e.getSlide(),n=t.Panzoom,{top:s,left:o,scale:a,opacity:l}=this.getZoomInfo(t);e.trigger("reveal",t),n.panTo({x:-1*o,y:-1*s,scale:a,friction:0,ignoreBounds:!0}),t.$content.style.visibility="",t.state="zoomIn",l===!0&&n.on("afterTransform",c=>{t.state!=="zoomIn"&&t.state!=="zoomOut"||(c.$content.style.opacity=Math.min(1,1-(1-c.content.scale)/(1-a)))}),n.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const e=this.fancybox,t=e.getSlide(),n=t.Panzoom;if(!n)return;t.state="zoomOut",e.state="customClosing",t.$caption&&(t.$caption.style.visibility="hidden");let s=this.fancybox.option("Image.zoomFriction");const o=a=>{const{top:l,left:c,scale:u,opacity:h}=this.getZoomInfo(t);a||h||(s*=.82),n.panTo({x:-1*c,y:-1*l,scale:u,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener("scroll",o),n.once("endAnimation",()=>{window.removeEventListener("scroll",o),e.destroy()}),o()}handleCursor(e){if(e.type!=="image"||!e.$el)return;const t=e.Panzoom,n=this.fancybox.option("Image.click",!1,e),s=this.fancybox.option("Image.touch"),o=e.$el.classList,a=this.fancybox.option("Image.canZoomInClass"),l=this.fancybox.option("Image.canZoomOutClass");o.remove(l),o.remove(a),t&&n==="toggleZoom"?t&&t.content.scale===1&&t.option("maxScale")-t.content.scale>.01?o.add(a):t.content.scale>1&&!s&&o.add(l):n==="close"&&o.add(l)}onWheel(e,t){if(this.fancybox.state==="ready"&&this.fancybox.trigger("Image.wheel",t)!==!1)switch(this.fancybox.option("Image.wheel")){case"zoom":e.state==="done"&&e.Panzoom&&e.Panzoom.zoomWithWheel(t);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[t.deltaY<0?"prev":"next"]()}}onClick(e,t){if(this.fancybox.state!=="ready")return;const n=e.Panzoom;if(n&&(n.dragPosition.midPoint||n.dragOffset.x!==0||n.dragOffset.y!==0||n.dragOffset.scale!==1))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=l=>{switch(l){case"toggleZoom":t.stopPropagation(),e.Panzoom&&e.Panzoom.zoomWithClick(t);break;case"close":this.fancybox.close();break;case"next":t.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option("Image.click"),a=this.fancybox.option("Image.doubleClick");a?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(a)):this.clickTimer=setTimeout(()=>{this.clickTimer=null,s(o)},300):s(o)}onPageChange(e,t){const n=e.getSlide();t.slides.forEach(s=>{s.Panzoom&&s.state==="done"&&s.index!==n.index&&s.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})})}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}so.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class ve{constructor(e){this.fancybox=e;for(const t of["onChange","onClosing"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}onChange(e){const t=e.Carousel;this.timer&&clearTimeout(this.timer);const n=t.prevPage===null,s=e.getSlide(),o=new URL(document.URL).hash;let a=!1;if(s.slug)a="#"+s.slug;else{const l=s.$trigger&&s.$trigger.dataset,c=e.option("slug")||l&&l.fancybox;c&&c.length&&c!=="true"&&(a="#"+c+(t.slides.length>1?"-"+(s.index+1):""))}n&&(this.origHash=o!==a?o:""),a&&o!==a&&(this.timer=setTimeout(()=>{try{window.history[n?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+a),n&&(this.hasCreatedHistory=!0)}catch{}},300))}onClosing(){if(this.timer&&clearTimeout(this.timer),this.hasSilentClose!==!0)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch{}}attach(e){e.on(this.events)}detach(e){e.off(this.events)}static startFromUrl(){const e=ve.Fancybox;if(!e||e.getInstance()||e.defaults.Hash===!1)return;const{hash:t,slug:n,index:s}=ve.getParsedURL();if(!n)return;let o=document.querySelector(`[data-slug="${t}"]`);if(o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),e.getInstance())return;const a=document.querySelectorAll(`[data-fancybox="${n}"]`);a.length&&(s===null&&a.length===1?o=a[0]:s&&(o=a[s-1]),o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:e,index:t}=ve.getParsedURL(),n=ve.Fancybox,s=n&&n.getInstance();if(s&&s.plugins.Hash){if(e){const o=s.Carousel;if(e===s.option("slug"))return o.slideTo(t-1);for(let c of o.slides)if(c.slug&&c.slug===e)return o.slideTo(c.index);const a=s.getSlide(),l=a.$trigger&&a.$trigger.dataset;if(l&&l.fancybox===e)return o.slideTo(t-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}ve.startFromUrl()}static create(e){function t(){window.addEventListener("hashchange",ve.onHashChange,!1),ve.startFromUrl()}ve.Fancybox=e,si&&window.requestAnimationFrame(()=>{/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)})}static destroy(){window.removeEventListener("hashchange",ve.onHashChange,!1)}static getParsedURL(){const e=window.location.hash.substr(1),t=e.split("-"),n=t.length>1&&/^\+?\d+$/.test(t[t.length-1])&&parseInt(t.pop(-1),10)||null;return{hash:e,slug:t.join("-"),index:n}}}const Oe={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(i){Oe.pageXOffset=window.pageXOffset,Oe.pageYOffset=window.pageYOffset,i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen():i.msRequestFullscreen&&i.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class zc{constructor(e){this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout(()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})},e);let t=this.$progress;t||(t=document.createElement("div"),t.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel),this.$progress=t,t.offsetHeight),t.style.transitionDuration=`${e}ms`,t.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),this.fancybox.getSlide().state==="done"&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const Vc={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:'<span data-fancybox-index=""></span> / <span data-fancybox-count=""></span>',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'<svg viewBox="0 0 24 24"><path d="M15 4l-8 8 8 8"/></svg>',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'<svg viewBox="0 0 24 24"><path d="M8 4l8 8-8 8"/></svg>',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:`<svg viewBox="0 0 24 24">
|
|
43
|
+
<g><path d="M3 8 V3h5"></path><path d="M21 8V3h-5"></path><path d="M8 21H3v-5"></path><path d="M16 21h5v-5"></path></g>
|
|
44
|
+
<g><path d="M7 2v5H2M17 2v5h5M2 17h5v5M22 17h-5v5"/></g>
|
|
45
|
+
</svg>`,click:function(i){i.preventDefault(),Oe.element()?Oe.deactivate():Oe.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:`<svg viewBox="0 0 24 24">
|
|
46
|
+
<g><path d="M6 4v16"/><path d="M20 12L6 20"/><path d="M20 12L6 4"/></g>
|
|
47
|
+
<g><path d="M7 4v15M17 4v15"/></g>
|
|
48
|
+
</svg>`,click:function(i){i.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'<svg viewBox="0 0 24 24"><circle cx="10" cy="10" r="7"></circle><path d="M16 16 L21 21"></svg>',click:function(i){i.preventDefault();const e=this.fancybox.getSlide().Panzoom;e&&e.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'<svg viewBox="0 0 24 24"><path d="M12 15V3m0 12l-4-4m4 4l4-4M2 17l.62 2.48A2 2 0 004.56 21h14.88a2 2 0 001.94-1.51L22 17"/></svg>',click:function(i){i.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'<svg viewBox="0 0 24 24"><circle cx="4" cy="4" r="1" /><circle cx="12" cy="4" r="1" transform="rotate(90 12 4)"/><circle cx="20" cy="4" r="1" transform="rotate(90 20 4)"/><circle cx="4" cy="12" r="1" transform="rotate(90 4 12)"/><circle cx="12" cy="12" r="1" transform="rotate(90 12 12)"/><circle cx="20" cy="12" r="1" transform="rotate(90 20 12)"/><circle cx="4" cy="20" r="1" transform="rotate(90 4 20)"/><circle cx="12" cy="20" r="1" transform="rotate(90 12 20)"/><circle cx="20" cy="20" r="1" transform="rotate(90 20 20)"/></svg>',click:function(i){i.stopPropagation();const e=this.fancybox.plugins.Thumbs;e&&e.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'<svg viewBox="0 0 24 24"><path d="M20 20L4 4m16 0L4 20"></path></svg>',attr:{"data-fancybox-close":"",tabindex:0}}}};class oo{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const t of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(t,n)=>this.onRefresh(n),"Image.afterUpdate":(t,n)=>this.onRefresh(n)}}onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let e=!1;for(const t of this.fancybox.items)if(t.type==="image"){e=!0;break}if(!e)return void(this.state="disabled")}for(const e of this.fancybox.option("Toolbar.display"))if((ht(e)?e.id:e)==="close"){this.fancybox.options.closeButton=!1;break}}onPrepare(){const e=this.fancybox;if(this.state==="init"&&(this.build(),this.update(),this.Slideshow=new zc(e),!e.Carousel.prevPage&&(e.option("slideshow.autoStart")&&this.Slideshow.activate(),e.option("fullscreen.autoStart")&&!Oe.element())))try{Oe.activate(e.$container)}catch{}}onFsChange(){window.scrollTo(Oe.pageXOffset,Oe.pageYOffset)}onSettle(){const e=this.fancybox,t=this.Slideshow;t&&t.isActive()&&(e.getSlide().index!==e.Carousel.slides.length-1||e.option("infinite")?e.getSlide().state==="done"&&t.setTimer():t.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(e,t){const n=this.Slideshow;t.index===e.getSlide().index&&(this.update(),n&&n.isActive()&&(e.option("infinite")||t.index!==e.Carousel.slides.length-1?n.setTimer():n.deactivate()))}onRefresh(e){e&&e.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||e&&e.state!=="done"||this.Slideshow.deactivate())}onKeydown(e,t,n){t===" "&&this.Slideshow&&(this.Slideshow.toggle(),n.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(e){let t;e.type==="div"?t=document.createElement("div"):(t=document.createElement(e.type==="link"?"a":"button"),t.classList.add("carousel__button")),t.innerHTML=e.html,t.setAttribute("tabindex",e.tabindex||0),e.class&&t.classList.add(...e.class.split(" "));for(const s in e.attr)t.setAttribute(s,e.attr[s]);e.label&&t.setAttribute("title",this.fancybox.localize(`{{${e.label}}}`)),e.click&&t.addEventListener("click",e.click.bind(this)),e.id==="prev"&&t.setAttribute("data-fancybox-prev",""),e.id==="next"&&t.setAttribute("data-fancybox-next","");const n=t.querySelector("svg");return n&&(n.setAttribute("role","img"),n.setAttribute("tabindex","-1"),n.setAttribute("xmlns","http://www.w3.org/2000/svg")),t}build(){this.cleanup();const e=this.fancybox.option("Toolbar.items"),t=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],n=this.fancybox.plugins.Thumbs;for(const o of this.fancybox.option("Toolbar.display")){let a,l;if(ht(o)?(a=o.id,l=ae({},e[a],o)):(a=o,l=e[a]),["counter","next","prev","slideshow"].includes(a)&&this.fancybox.items.length<2)continue;if(a==="fullscreen"){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if(a==="thumbs"&&(!n||n.state==="disabled")||!l)continue;let c=l.position||"right",u=t.find(h=>h.position===c);u&&u.items.push(l)}const s=document.createElement("div");s.classList.add("fancybox__toolbar");for(const o of t)if(o.items.length){const a=document.createElement("div");a.classList.add("fancybox__toolbar__items"),a.classList.add(`fancybox__toolbar__items--${o.position}`);for(const l of o.items)a.appendChild(this.createElement(l));s.appendChild(a)}this.fancybox.$carousel.parentNode.insertBefore(s,this.fancybox.$carousel),this.$container=s}update(){const e=this.fancybox.getSlide(),t=e.index,n=this.fancybox.items.length,s=e.downloadSrc||(e.type!=="image"||e.error?null:e.src);for(const l of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))s?(l.removeAttribute("disabled"),l.removeAttribute("tabindex"),l.setAttribute("href",s),l.setAttribute("download",s),l.setAttribute("target","_blank")):(l.setAttribute("disabled",""),l.setAttribute("tabindex",-1),l.removeAttribute("href"),l.removeAttribute("download"));const o=e.Panzoom,a=o&&o.option("maxScale")>o.option("baseScale");for(const l of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))a?l.removeAttribute("disabled"):l.setAttribute("disabled","");for(const l of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))l.innerHTML=e.index+1;for(const l of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))l.innerHTML=n;if(!this.fancybox.option("infinite")){for(const l of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))t===0?l.setAttribute("disabled",""):l.removeAttribute("disabled");for(const l of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))t===n-1?l.setAttribute("disabled",""):l.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}oo.defaults=Vc;const Fc={ScrollLock:class{constructor(i){this.fancybox=i,this.viewport=null,this.pendingUpdate=null;for(const e of["onReady","onResize","onTouchstart","onTouchmove"])this[e]=this[e].bind(this)}onReady(){const i=window.visualViewport;i&&(this.viewport=i,this.startY=0,i.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const i=this.fancybox,e=this.viewport,t=e.scale||1,n=i.$container;if(!n)return;let s="",o="",a="";t-1>.1&&(s=e.width*t+"px",o=e.height*t+"px",a=`translate3d(${e.offsetLeft}px, ${e.offsetTop}px, 0) scale(${1/t})`),n.style.width=s,n.style.height=o,n.style.transform=a}onTouchstart(i){this.startY=i.touches?i.touches[0].screenY:i.screenY}onTouchmove(i){const e=this.startY,t=window.innerWidth/window.document.documentElement.clientWidth;if(!i.cancelable||i.touches.length>1||t!==1)return;const n=ni(i.composedPath()[0]);if(!n)return void i.preventDefault();const s=window.getComputedStyle(n),o=parseInt(s.getPropertyValue("height"),10),a=i.touches?i.touches[0].screenY:i.screenY,l=e<=a&&n.scrollTop===0,c=e>=a&&n.scrollHeight-n.scrollTop===o;(l||c)&&i.preventDefault()}onWheel(i){ni(i.composedPath()[0])||i.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const i=this.viewport;i&&(i.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}},Thumbs:eo,Html:no,Toolbar:oo,Image:so,Hash:ve},ao={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg>',spinner:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="25 25 50 50" tabindex="-1"><circle cx="50" cy="50" r="20"/></svg>',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},Bt=new Map;let Hc=0;class I extends nn{constructor(e,t={}){e=e.map(n=>(n.width&&(n._width=n.width),n.height&&(n._height=n.height),n)),super(ae(!0,{},ao,t)),this.bindHandlers(),this.state="init",this.setItems(e),this.attachPlugins(I.Plugins),this.trigger("init"),this.option("hideScrollbar")===!0&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),Bt.set(this.id,this),this.trigger("prepare"),this.state="ready",this.trigger("ready"),this.$container.setAttribute("aria-hidden","false"),this.option("trapFocus")&&this.focus()}option(e,...t){const n=this.getSlide();let s=n?n[e]:void 0;return s!==void 0?(typeof s=="function"&&(s=s.call(this,this,...t)),s):super.option(e,...t)}bindHandlers(){for(const e of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[e]=this[e].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach(n=>this.$container.setAttribute(...n)),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++Hc,this.$container.setAttribute("id","fancybox-"+this.id));const t=this.option("mainClass");return t&&this.$container.classList.add(...t.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(e){const t=[];for(const n of e){const s=n.$trigger;if(s){const l=s.dataset||{};n.src=l.src||s.getAttribute("href")||n.src,n.type=l.type||n.type,!n.src&&s instanceof HTMLImageElement&&(n.src=s.currentSrc||n.$trigger.src)}let o=n.$thumb;if(!o){let l=n.$trigger&&n.$trigger.origTarget;l&&(o=l instanceof HTMLImageElement?l:l.querySelector("img:not([aria-hidden])")),!o&&n.$trigger&&(o=n.$trigger instanceof HTMLImageElement?n.$trigger:n.$trigger.querySelector("img:not([aria-hidden])"))}n.$thumb=o||null;let a=n.thumb;!a&&o&&(a=o.currentSrc||o.src,!a&&o.dataset&&(a=o.dataset.lazySrc||o.dataset.src)),a||n.type!=="image"||(a=n.src),n.thumb=a||null,n.caption=n.caption||"",t.push(n)}this.items=t}initCarousel(){return this.Carousel=new mt(this.$carousel,ae(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let e="x";return this.option("dragToClose")&&(e+="y"),e}}},on:{"*":(e,...t)=>this.trigger(`Carousel.${e}`,...t),init:e=>this.Carousel=e,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(e,t){let n=t.caption||"";if(typeof this.options.caption=="function"&&(n=this.options.caption.call(this,this,this.Carousel,t)),typeof n=="string"&&n.length){const s=document.createElement("div"),o=`fancybox__caption_${this.id}_${t.index}`;s.className="fancybox__caption",s.innerHTML=n,s.setAttribute("id",o),t.$caption=t.$el.appendChild(s),t.$el.classList.add("has-caption"),t.$el.setAttribute("aria-labelledby",o)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(e){this.focus(e)}onClick(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.matches("[data-fancybox-close]"))return e.preventDefault(),void I.close(!1,e);if(t.matches("[data-fancybox-next]"))return e.preventDefault(),void I.next();if(t.matches("[data-fancybox-prev]"))return e.preventDefault(),void I.prev();if(t.matches(Qs)||document.activeElement.blur(),!t.closest(".fancybox__content")&&!getSelection().toString().length&&this.trigger("click",e)!==!1)switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const e=this.getSlide().Panzoom;return!e||e.content.scale===1}onTouchEnd(e){const t=e.dragOffset.y;Math.abs(t)>=150||Math.abs(t)>=35&&e.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(e.content.y<0?"Up":"Down")),this.close()):e.lockAxis==="y"&&e.panTo({y:0})}onTransform(e){if(this.$backdrop){const t=Math.abs(e.content.y),n=t<1?"":Math.max(.33,Math.min(1,1-t/e.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",n?"0s":""),this.$container.style.setProperty("--fancybox-opacity",n)}}onMousedown(){this.state==="ready"&&document.body.classList.add("is-using-mouse")}onKeydown(e){if(I.getInstance().id!==this.id)return;document.body.classList.remove("is-using-mouse");const t=e.key,n=this.option("keyboard");if(!n||e.ctrlKey||e.altKey||e.shiftKey)return;const s=e.composedPath()[0],o=document.activeElement&&document.activeElement.classList,a=o&&o.contains("carousel__button");if(t!=="Escape"&&!a&&(e.target.isContentEditable||["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)!==-1)||this.trigger("keydown",t,e)===!1)return;const l=n[t];typeof this[l]=="function"&&this[l]()}getSlide(){const e=this.Carousel;if(!e)return null;const t=e.page===null?e.option("initialPage"):e.page,n=e.pages||[];return n.length&&n[t]?n[t].slides[0]:null}focus(e){if(I.ignoreFocusChange||["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const t=this.$container,n=this.getSlide(),s=n.state==="done"?n.$el:null;if(s&&s.contains(document.activeElement))return;e&&e.preventDefault(),I.ignoreFocusChange=!0;const o=Array.from(t.querySelectorAll(Qs));let a,l=[];for(let c of o){const u=c.offsetParent,h=s&&s.contains(c),f=!this.Carousel.$viewport.contains(c);u&&(h||f)?(l.push(c),c.dataset.origTabindex!==void 0&&(c.tabIndex=c.dataset.origTabindex,c.removeAttribute("data-orig-tabindex")),(c.hasAttribute("autoFocus")||!a&&h&&!c.classList.contains("carousel__button"))&&(a=c)):(c.dataset.origTabindex=c.dataset.origTabindex===void 0?c.getAttribute("tabindex"):c.dataset.origTabindex,c.tabIndex=-1)}e?l.indexOf(e.target)>-1?this.lastFocus=e.target:this.lastFocus===t?It(l[l.length-1]):It(t):this.option("autoFocus")&&a?It(a):l.indexOf(document.activeElement)<0&&It(t),this.lastFocus=document.activeElement,I.ignoreFocusChange=!1}hideScrollbar(){if(!si)return;const e=window.innerWidth-document.documentElement.getBoundingClientRect().width,t="fancybox-style-noscroll";let n=document.getElementById(t);n||e>0&&(n=document.createElement("style"),n.id=t,n.type="text/css",n.innerHTML=`.compensate-for-scrollbar {padding-right: ${e}px;}`,document.getElementsByTagName("head")[0].appendChild(n),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const e=document.getElementById("fancybox-style-noscroll");e&&e.remove()}clearContent(e){this.Carousel.trigger("removeSlide",e),e.$content&&(e.$content.remove(),e.$content=null),e.$closeButton&&(e.$closeButton.remove(),e.$closeButton=null),e._className&&e.$el.classList.remove(e._className)}setContent(e,t,n={}){let s;const o=e.$el;if(t instanceof HTMLElement)["img","iframe","video","audio"].indexOf(t.nodeName.toLowerCase())>-1?(s=document.createElement("div"),s.appendChild(t)):s=t;else{const a=document.createRange().createContextualFragment(t);s=document.createElement("div"),s.appendChild(a)}if(e.filter&&!e.error&&(s=s.querySelector(e.filter)),s instanceof Element)return e._className=`has-${n.suffix||e.type||"unknown"}`,o.classList.add(e._className),s.classList.add("fancybox__content"),s.style.display!=="none"&&getComputedStyle(s).getPropertyValue("display")!=="none"||(s.style.display=e.display||this.option("defaultDisplay")||"flex"),e.id&&s.setAttribute("id",e.id),e.$content=s,o.prepend(s),this.manageCloseButton(e),e.state!=="loading"&&this.revealContent(e),s;this.setError(e,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(e){const t=e.closeButton===void 0?this.option("closeButton"):e.closeButton;if(!t||t==="top"&&this.$closeButton)return;const n=document.createElement("button");n.classList.add("carousel__button","is-close"),n.setAttribute("title",this.options.l10n.CLOSE),n.innerHTML=this.option("template.closeButton"),n.addEventListener("click",s=>this.close(s)),t==="inside"?(e.$closeButton&&e.$closeButton.remove(),e.$closeButton=e.$content.appendChild(n)):this.$closeButton=this.$container.insertBefore(n,this.$container.firstChild)}revealContent(e){this.trigger("reveal",e),e.$content.style.visibility="";let t=!1;e.error||e.state==="loading"||this.Carousel.prevPage!==null||e.index!==this.options.startIndex||(t=e.showClass===void 0?this.option("showClass"):e.showClass),t?(e.state="animating",this.animateCSS(e.$content,t,()=>{this.done(e)})):this.done(e)}animateCSS(e,t,n){if(e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!e||!t)return void(typeof n=="function"&&n());const s=function(o){o.currentTarget===this&&(e.removeEventListener("animationend",s),n&&n(),e.classList.remove(t))};e.addEventListener("animationend",s),e.classList.add(t)}done(e){e.state="done",this.trigger("done",e);const t=this.getSlide();t&&e.index===t.index&&this.option("autoFocus")&&this.focus()}setError(e,t){e.error=t,this.hideLoading(e),this.clearContent(e);const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,n,{suffix:"error"})}showLoading(e){e.state="loading",e.$el.classList.add("is-loading");let t=e.$el.querySelector(".fancybox__spinner");t||(t=document.createElement("div"),t.classList.add("fancybox__spinner"),t.innerHTML=this.option("template.spinner"),t.addEventListener("click",()=>{this.Carousel.Panzoom.velocity||this.close()}),e.$el.prepend(t))}hideLoading(e){const t=e.$el&&e.$el.querySelector(".fancybox__spinner");t&&(t.remove(),e.$el.classList.remove("is-loading")),e.state==="loading"&&(this.trigger("load",e),e.state="ready")}next(){const e=this.Carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.Carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.Carousel&&this.Carousel.slideTo(...e)}close(e){if(e&&e.preventDefault(),["closing","customClosing","destroy"].includes(this.state)||this.trigger("shouldClose",e)===!1||(this.state="closing",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger("closing",e),this.state==="destroy"))return;this.$container.setAttribute("aria-hidden","true"),this.$container.classList.add("is-closing");const t=this.getSlide();if(this.Carousel.slides.forEach(n=>{n.$content&&n.index!==t.index&&this.Carousel.trigger("removeSlide",n)}),this.state==="closing"){const n=t.hideClass===void 0?this.option("hideClass"):t.hideClass;this.animateCSS(t.$content,n,()=>{this.destroy()},!0)}}destroy(){if(this.state==="destroy")return;this.state="destroy",this.trigger("destroy");const e=this.option("placeFocusBack")?this.getSlide().$trigger:null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,e&&It(e),Bt.delete(this.id);const t=I.getInstance();t?t.focus():(document.documentElement.classList.remove("with-fancybox"),document.body.classList.remove("is-using-mouse"),this.revealScrollbar())}static show(e,t={}){return new I(e,t)}static fromEvent(e,t={}){if(e.defaultPrevented||e.button&&e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey)return;const n=e.composedPath()[0];let s,o,a,l=n;if((l.matches("[data-fancybox-trigger]")||(l=l.closest("[data-fancybox-trigger]")))&&(s=l&&l.dataset&&l.dataset.fancyboxTrigger),s){const u=document.querySelectorAll(`[data-fancybox="${s}"]`),h=parseInt(l.dataset.fancyboxIndex,10)||0;l=u.length?u[h]:l}l||(l=n),Array.from(I.openers.keys()).reverse().some(u=>{a=l;let h=!1;try{a instanceof Element&&(typeof u=="string"||u instanceof String)&&(h=a.matches(u)||(a=a.closest(u)))}catch{}return!!h&&(e.preventDefault(),o=u,!0)});let c=!1;if(o){t.event=e,t.target=a,a.origTarget=n,c=I.fromOpener(o,t);const u=I.getInstance();u&&u.state==="ready"&&e.detail&&document.body.classList.add("is-using-mouse")}return c}static fromOpener(e,t={}){let n=[],s=t.startIndex||0,o=t.target||null;const a=(t=ae({},t,I.openers.get(e))).groupAll!==void 0&&t.groupAll,l=t.groupAttr===void 0?"data-fancybox":t.groupAttr,c=l&&o?o.getAttribute(`${l}`):"";if(!o||c||a){const h=t.root||(o?o.getRootNode():document.body);n=[].slice.call(h.querySelectorAll(e))}if(o&&!a&&(n=c?n.filter(h=>h.getAttribute(`${l}`)===c):[o]),!n.length)return!1;const u=I.getInstance();return!(u&&n.indexOf(u.options.$trigger)>-1)&&(s=o?n.indexOf(o):s,n=n.map(function(h){const f=["false","0","no","null","undefined"],m=["true","1","yes"],g=Object.assign({},h.dataset),b={};for(let[v,x]of Object.entries(g))if(v!=="fancybox")if(v==="width"||v==="height")b[`_${v}`]=x;else if(typeof x=="string"||x instanceof String)if(f.indexOf(x)>-1)b[v]=!1;else if(m.indexOf(b[v])>-1)b[v]=!0;else try{b[v]=JSON.parse(x)}catch{b[v]=x}else b[v]=x;return h instanceof Element&&(b.$trigger=h),b}),new I(n,ae({},t,{startIndex:s,$trigger:o})))}static bind(e,t={}){function n(){document.body.addEventListener("click",I.fromEvent,!1)}si&&(I.openers.size||(/complete|interactive|loaded/.test(document.readyState)?n():document.addEventListener("DOMContentLoaded",n)),I.openers.set(e,t))}static unbind(e){I.openers.delete(e),I.openers.size||I.destroy()}static destroy(){let e;for(;e=I.getInstance();)e.destroy();I.openers=new Map,document.body.removeEventListener("click",I.fromEvent,!1)}static getInstance(e){return e?Bt.get(e):Array.from(Bt.values()).reverse().find(t=>!["closing","customClosing","destroy"].includes(t.state)&&t)||null}static close(e=!0,t){if(e)for(const n of Bt.values())n.close(t);else{const n=I.getInstance();n&&n.close(t)}}static next(){const e=I.getInstance();e&&e.next()}static prev(){const e=I.getInstance();e&&e.prev()}}I.version="4.0.27",I.defaults=ao,I.openers=new Map,I.Plugins=Fc,I.bind("[data-fancybox]");for(const[i,e]of Object.entries(I.Plugins||{}))typeof e.create=="function"&&e.create(I);var ro={install(){I.bind('[data-fancybox="gallery"]',{})}};function T(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function jc(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function lo(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Uc(i,e,t){return e&&lo(i.prototype,e),t&&lo(i,t),i}function qc(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function co(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),t.push.apply(t,n)}return t}function ho(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?co(Object(t),!0).forEach(function(n){qc(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):co(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}var uo={addCSS:!0,thumbWidth:15,watch:!0};function Wc(i,e){return function(){return Array.from(document.querySelectorAll(e)).includes(this)}.call(i,e)}function Xc(i,e){if(i&&e){var t=new Event(e,{bubbles:!0});i.dispatchEvent(t)}}var Dt=function(i){return i!=null?i.constructor:null},on=function(i,e){return!!(i&&e&&i instanceof e)},po=function(i){return i==null},mo=function(i){return Dt(i)===Object},Yc=function(i){return Dt(i)===Number&&!Number.isNaN(i)},fo=function(i){return Dt(i)===String},Gc=function(i){return Dt(i)===Boolean},Kc=function(i){return Dt(i)===Function},go=function(i){return Array.isArray(i)},yo=function(i){return on(i,NodeList)},Zc=function(i){return on(i,Element)},Jc=function(i){return on(i,Event)},Qc=function(i){return po(i)||(fo(i)||go(i)||yo(i))&&!i.length||mo(i)&&!Object.keys(i).length},ie={nullOrUndefined:po,object:mo,number:Yc,string:fo,boolean:Gc,function:Kc,array:go,nodeList:yo,element:Zc,event:Jc,empty:Qc};function ed(i){var e="".concat(i).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function td(i,e){if(1>e){var t=ed(e);return parseFloat(i.toFixed(t))}return Math.round(i/e)*e}var id=function(){function i(e,t){jc(this,i),ie.element(e)?this.element=e:ie.string(e)&&(this.element=document.querySelector(e)),ie.element(this.element)&&ie.empty(this.element.rangeTouch)&&(this.config=ho({},uo,{},t),this.init())}return Uc(i,[{key:"init",value:function(){i.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){i.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(s){t.element[n](s,function(o){return t.set(o)},!1)})}},{key:"get",value:function(e){if(!i.enabled||!ie.event(e))return null;var t,n=e.target,s=e.changedTouches[0],o=parseFloat(n.getAttribute("min"))||0,a=parseFloat(n.getAttribute("max"))||100,l=parseFloat(n.getAttribute("step"))||1,c=n.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return 0>(t=100/c.width*(s.clientX-c.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*u:50<t&&(t+=2*(t-50)*u),o+td(t/100*(a-o),l)}},{key:"set",value:function(e){i.enabled&&ie.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),Xc(e.target,e.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(ie.empty(e)||ie.string(e)?n=Array.from(document.querySelectorAll(ie.string(e)?e:'input[type="range"]')):ie.element(e)?n=[e]:ie.nodeList(e)?n=Array.from(e):ie.array(e)&&(n=e.filter(ie.element)),ie.empty(n))return null;var s=ho({},uo,{},t);if(ie.string(e)&&s.watch){var o=new MutationObserver(function(a){Array.from(a).forEach(function(l){Array.from(l.addedNodes).forEach(function(c){ie.element(c)&&Wc(c,e)&&new i(c,s)})})});o.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(a){return new i(a,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),i}();const ft=i=>i!=null?i.constructor:null,Ne=(i,e)=>Boolean(i&&e&&i instanceof e),an=i=>i==null,bo=i=>ft(i)===Object,nd=i=>ft(i)===Number&&!Number.isNaN(i),oi=i=>ft(i)===String,sd=i=>ft(i)===Boolean,vo=i=>ft(i)===Function,wo=i=>Array.isArray(i),od=i=>Ne(i,WeakMap),xo=i=>Ne(i,NodeList),ad=i=>ft(i)===Text,rd=i=>Ne(i,Event),ld=i=>Ne(i,KeyboardEvent),cd=i=>Ne(i,window.TextTrackCue)||Ne(i,window.VTTCue),dd=i=>Ne(i,TextTrack)||!an(i)&&oi(i.kind),hd=i=>Ne(i,Promise)&&vo(i.then),ud=i=>i!==null&&typeof i=="object"&&i.nodeType===1&&typeof i.style=="object"&&typeof i.ownerDocument=="object",ko=i=>an(i)||(oi(i)||wo(i)||xo(i))&&!i.length||bo(i)&&!Object.keys(i).length;var d={nullOrUndefined:an,object:bo,number:nd,string:oi,boolean:sd,function:vo,array:wo,weakMap:od,nodeList:xo,element:ud,textNode:ad,event:rd,keyboardEvent:ld,cue:cd,track:dd,promise:hd,url:i=>{if(Ne(i,window.URL))return!0;if(!oi(i))return!1;let e=i;i.startsWith("http://")&&i.startsWith("https://")||(e=`http://${i}`);try{return!ko(new URL(e).hostname)}catch{return!1}},empty:ko};const rn=(()=>{const i=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(e).find(n=>i.style[n]!==void 0);return!!d.string(t)&&e[t]})();function _o(i,e){setTimeout(()=>{try{i.hidden=!0,i.offsetHeight,i.hidden=!1}catch{}},e)}const Q={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function pd(i){return JSON.parse(JSON.stringify(i))}function Co(i,e){return e.split(".").reduce((t,n)=>t&&t[n],i)}function Y(i={},...e){if(!e.length)return i;const t=e.shift();return d.object(t)?(Object.keys(t).forEach(n=>{d.object(t[n])?(Object.keys(i).includes(n)||Object.assign(i,{[n]:{}}),Y(i[n],t[n])):Object.assign(i,{[n]:t[n]})}),Y(i,...e)):i}function To(i,e){const t=i.length?i:[i];Array.from(t).reverse().forEach((n,s)=>{const o=s>0?e.cloneNode(!0):e,a=n.parentNode,l=n.nextSibling;o.appendChild(n),l?a.insertBefore(o,l):a.appendChild(o)})}function ln(i,e){d.element(i)&&!d.empty(e)&&Object.entries(e).filter(([,t])=>!d.nullOrUndefined(t)).forEach(([t,n])=>i.setAttribute(t,n))}function A(i,e,t){const n=document.createElement(i);return d.object(e)&&ln(n,e),d.string(t)&&(n.innerText=t),n}function md(i,e){d.element(i)&&d.element(e)&&e.parentNode.insertBefore(i,e.nextSibling)}function $o(i,e,t,n){d.element(e)&&e.appendChild(A(i,t,n))}function Me(i){d.nodeList(i)||d.array(i)?Array.from(i).forEach(Me):d.element(i)&&d.element(i.parentNode)&&i.parentNode.removeChild(i)}function ai(i){if(!d.element(i))return;let{length:e}=i.childNodes;for(;e>0;)i.removeChild(i.lastChild),e-=1}function ri(i,e){return d.element(e)&&d.element(e.parentNode)&&d.element(i)?(e.parentNode.replaceChild(i,e),i):null}function Te(i,e){if(!d.string(i)||d.empty(i))return{};const t={},n=Y({},e);return i.split(",").forEach(s=>{const o=s.trim(),a=o.replace(".",""),l=o.replace(/[[\]]/g,"").split("="),[c]=l,u=l.length>1?l[1].replace(/["']/g,""):"";switch(o.charAt(0)){case".":d.string(n.class)?t.class=`${n.class} ${a}`:t.class=a;break;case"#":t.id=o.replace("#","");break;case"[":t[c]=u}}),Y(n,t)}function Ke(i,e){if(!d.element(i))return;let t=e;d.boolean(t)||(t=!i.hidden),i.hidden=t}function B(i,e,t){if(d.nodeList(i))return Array.from(i).map(n=>B(n,e,t));if(d.element(i)){let n="toggle";return t!==void 0&&(n=t?"add":"remove"),i.classList[n](e),i.classList.contains(e)}return!1}function li(i,e){return d.element(i)&&i.classList.contains(e)}function Ze(i,e){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(i,e)}function fd(i,e){const{prototype:t}=Element;return(t.closest||function(){let n=this;do{if(Ze.matches(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(i,e)}function gt(i){return this.elements.container.querySelectorAll(i)}function Z(i){return this.elements.container.querySelector(i)}function cn(i=null,e=!1){d.element(i)&&(i.focus({preventScroll:!0}),e&&B(i,this.config.classNames.tabFocus))}const Eo={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},X={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(i,e,t){const n=Q.isIPhone&&t&&X.playsinline,s=X[i]||e!=="html5";return{api:s,ui:s&&X.rangeInput&&(i!=="video"||!Q.isIPhone||n)}},pip:!(Q.isIPhone||!d.function(A("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||A("video").disablePictureInPicture)),airplay:d.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(i){if(d.empty(i))return!1;const[e]=i.split("/");let t=i;if(!this.isHTML5||e!==this.type)return!1;Object.keys(Eo).includes(t)&&(t+=`; codecs="${Eo[i]}"`);try{return Boolean(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const i=document.createElement("input");return i.type="range",i.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:rn!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},gd=(()=>{let i=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(i=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return i})();function yt(i,e,t,n=!1,s=!0,o=!1){if(!i||!("addEventListener"in i)||d.empty(e)||!d.function(t))return;const a=e.split(" ");let l=o;gd&&(l={passive:s,capture:o}),a.forEach(c=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:i,type:c,callback:t,options:l}),i[n?"addEventListener":"removeEventListener"](c,t,l)})}function D(i,e="",t,n=!0,s=!1){yt.call(this,i,e,t,!0,n,s)}function ci(i,e="",t,n=!0,s=!1){yt.call(this,i,e,t,!1,n,s)}function dn(i,e="",t,n=!0,s=!1){const o=(...a)=>{ci(i,e,o,n,s),t.apply(this,a)};yt.call(this,i,e,o,!0,n,s)}function P(i,e="",t=!1,n={}){if(!d.element(i)||d.empty(e))return;const s=new CustomEvent(e,{bubbles:t,detail:fe(te({},n),{plyr:this})});i.dispatchEvent(s)}function yd(){this&&this.eventListeners&&(this.eventListeners.forEach(i=>{const{element:e,type:t,callback:n,options:s}=i;e.removeEventListener(t,n,s)}),this.eventListeners=[])}function bd(){return new Promise(i=>this.ready?setTimeout(i,0):D.call(this,this.elements.container,"ready",i)).then(()=>{})}function $e(i){d.promise(i)&&i.then(null,()=>{})}function hn(i){return d.array(i)?i.filter((e,t)=>i.indexOf(e)===t):i}function So(i,e){return d.array(i)&&i.length?i.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):null}function Lo(i){return!(!window||!window.CSS)&&window.CSS.supports(i)}const Ao=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((i,[e,t])=>fe(te({},i),{[e/t]:[e,t]}),{});function Po(i){return d.array(i)||d.string(i)&&i.includes(":")?(d.array(i)?i:i.split(":")).map(Number).every(d.number):!1}function di(i){if(!d.array(i)||!i.every(d.number))return null;const[e,t]=i,n=(o,a)=>a===0?o:n(a,o%a),s=n(e,t);return[e/s,t/s]}function un(i){const e=n=>Po(n)?n.split(":").map(Number):null;let t=e(i);if(t===null&&(t=e(this.config.ratio)),t===null&&!d.empty(this.embed)&&d.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:n,videoHeight:s}=this.media;t=[n,s]}return di(t)}function bt(i){if(!this.isVideo)return{};const{wrapper:e}=this.elements,t=un.call(this,i);if(!d.array(t))return{};const[n,s]=di(t),o=100/n*s;if(Lo(`aspect-ratio: ${n}/${s}`)?e.style.aspectRatio=`${n}/${s}`:e.style.paddingBottom=`${o}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const a=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(a-o)/(a/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:o,ratio:t}}function Oo(i,e,t=.05){const n=i/e,s=So(Object.keys(Ao),n);return Math.abs(s-n)<=t?Ao[s]:[i,e]}function vd(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const je={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(i=>{const e=i.getAttribute("type");return!!d.empty(e)||X.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:je.getSources.call(this).map(i=>Number(i.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const i=this;i.options.speed=i.config.speed.options,d.empty(this.config.ratio)||bt.call(i),Object.defineProperty(i.media,"quality",{get(){const e=je.getSources.call(i).find(t=>t.getAttribute("src")===i.source);return e&&Number(e.getAttribute("size"))},set(e){if(i.quality!==e){if(i.config.quality.forced&&d.function(i.config.quality.onChange))i.config.quality.onChange(e);else{const t=je.getSources.call(i).find(c=>Number(c.getAttribute("size"))===e);if(!t)return;const{currentTime:n,paused:s,preload:o,readyState:a,playbackRate:l}=i.media;i.media.src=t.getAttribute("src"),(o!=="none"||a)&&(i.once("loadedmetadata",()=>{i.speed=l,i.currentTime=n,s||$e(i.play())}),i.media.load())}P.call(i,i.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(Me(je.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function wd(i){return`${i}-${Math.floor(1e4*Math.random())}`}function pn(i,...e){return d.empty(i)?i:i.toString().replace(/{(\d+)}/g,(t,n)=>e[n].toString())}function xd(i,e){return i===0||e===0||Number.isNaN(i)||Number.isNaN(e)?0:(i/e*100).toFixed(2)}const Rt=(i="",e="",t="")=>i.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),No=(i="")=>i.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function kd(i=""){let e=i.toString();return e=Rt(e,"-"," "),e=Rt(e,"_"," "),e=No(e),Rt(e," ","")}function _d(i=""){let e=i.toString();return e=kd(e),e.charAt(0).toLowerCase()+e.slice(1)}function Cd(i){const e=document.createDocumentFragment(),t=document.createElement("div");return e.appendChild(t),t.innerHTML=i,e.firstChild.innerText}function Td(i){const e=document.createElement("div");return e.appendChild(i),e.innerHTML}const Mo={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},J={get(i="",e={}){if(d.empty(i)||d.empty(e))return"";let t=Co(e.i18n,i);if(d.empty(t))return Object.keys(Mo).includes(i)?Mo[i]:"";const n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach(([s,o])=>{t=Rt(t,s,o)}),t}};class zt{constructor(e){T(this,"get",t=>{if(!zt.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(d.empty(n))return null;const s=JSON.parse(n);return d.string(t)&&t.length?s[t]:s}),T(this,"set",t=>{if(!zt.supported||!this.enabled||!d.object(t))return;let n=this.get();d.empty(n)&&(n={}),Y(n,t);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function Vt(i,e="text"){return new Promise((t,n)=>{try{const s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",()=>{if(e==="text")try{t(JSON.parse(s.responseText))}catch{t(s.responseText)}else t(s.response)}),s.addEventListener("error",()=>{throw new Error(s.status)}),s.open("GET",i,!0),s.responseType=e,s.send()}catch(s){n(s)}})}function Io(i,e){if(!d.string(i))return;const t=d.string(e);let n=!1;const s=()=>document.getElementById(e)!==null,o=(a,l)=>{a.innerHTML=l,t&&s()||document.body.insertAdjacentElement("afterbegin",a)};if(!t||!s()){const a=zt.supported,l=document.createElement("div");if(l.setAttribute("hidden",""),t&&l.setAttribute("id",e),a){const c=window.localStorage.getItem(`cache-${e}`);if(n=c!==null,n){const u=JSON.parse(c);o(l,u.content)}}Vt(i).then(c=>{if(!d.empty(c)){if(a)try{window.localStorage.setItem(`cache-${e}`,JSON.stringify({content:c}))}catch{}o(l,c)}}).catch(()=>{})}}const Bo=i=>Math.trunc(i/60/60%60,10),$d=i=>Math.trunc(i%60,10);function hi(i=0,e=!1,t=!1){if(!d.number(i))return hi(void 0,e,t);const n=c=>`0${c}`.slice(-2);let s=Bo(i);const o=(a=i,Math.trunc(a/60%60,10));var a;const l=$d(i);return s=e||s>0?`${s}:`:"",`${t&&i>0?"-":""}${s}${n(o)}:${n(l)}`}const _={getIconUrl(){const i=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,t=i.host!==e||Q.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=Z.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:gt.call(this,this.config.selectors.buttons.play),pause:Z.call(this,this.config.selectors.buttons.pause),restart:Z.call(this,this.config.selectors.buttons.restart),rewind:Z.call(this,this.config.selectors.buttons.rewind),fastForward:Z.call(this,this.config.selectors.buttons.fastForward),mute:Z.call(this,this.config.selectors.buttons.mute),pip:Z.call(this,this.config.selectors.buttons.pip),airplay:Z.call(this,this.config.selectors.buttons.airplay),settings:Z.call(this,this.config.selectors.buttons.settings),captions:Z.call(this,this.config.selectors.buttons.captions),fullscreen:Z.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Z.call(this,this.config.selectors.progress),this.elements.inputs={seek:Z.call(this,this.config.selectors.inputs.seek),volume:Z.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Z.call(this,this.config.selectors.display.buffer),currentTime:Z.call(this,this.config.selectors.display.currentTime),duration:Z.call(this,this.config.selectors.display.duration)},d.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(i){return this.debug.warn("It looks like there is a problem with your custom controls HTML",i),this.toggleNativeControls(!0),!1}},createIcon(i,e){const t="http://www.w3.org/2000/svg",n=_.getIconUrl.call(this),s=`${n.cors?"":n.url}#${this.config.iconPrefix}`,o=document.createElementNS(t,"svg");ln(o,Y(e,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(t,"use"),l=`${s}-${i}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",l),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.appendChild(a),o},createLabel(i,e={}){const t=J.get(i,this.config);return A("span",fe(te({},e),{class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),t)},createBadge(i){if(d.empty(i))return null;const e=A("span",{class:this.config.classNames.menu.value});return e.appendChild(A("span",{class:this.config.classNames.menu.badge},i)),e},createButton(i,e){const t=Y({},e);let n=_d(i);const s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(a=>{Object.keys(t).includes(a)&&(s[a]=t[a],delete t[a])}),s.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(a=>a===this.config.classNames.control)||Y(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,i){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,n="play",s.label="play",s.icon="play";break;default:d.empty(s.label)&&(s.label=n),d.empty(s.icon)&&(s.icon=i)}const o=A(s.element);return s.toggle?(o.appendChild(_.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),o.appendChild(_.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),o.appendChild(_.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),o.appendChild(_.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(o.appendChild(_.createIcon.call(this,s.icon)),o.appendChild(_.createLabel.call(this,s.label))),Y(t,Te(this.config.selectors.buttons[n],t)),ln(o,t),n==="play"?(d.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(o)):this.elements.buttons[n]=o,o},createRange(i,e){const t=A("input",Y(Te(this.config.selectors.inputs[i]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":J.get(i,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[i]=t,_.updateRangeFill.call(this,t),id.setup(t),t},createProgress(i,e){const t=A("progress",Y(Te(this.config.selectors.display[i]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(i!=="volume"){t.appendChild(A("span",null,"0"));const n={played:"played",buffer:"buffered"}[i],s=n?J.get(n,this.config):"";t.innerText=`% ${s.toLowerCase()}`}return this.elements.display[i]=t,t},createTime(i,e){const t=Te(this.config.selectors.display[i],e),n=A("div",Y(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":J.get(i,this.config)}),"00:00");return this.elements.display[i]=n,n},bindMenuItemShortcuts(i,e){D.call(this,i,"keydown keyup",t=>{if(!["Space","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const n=Ze(i,'[role="menuitemradio"]');if(!n&&["Space","ArrowRight"].includes(t.key))_.showMenuPanel.call(this,e,!0);else{let s;t.key!=="Space"&&(t.key==="ArrowDown"||n&&t.key==="ArrowRight"?(s=i.nextElementSibling,d.element(s)||(s=i.parentNode.firstElementChild)):(s=i.previousElementSibling,d.element(s)||(s=i.parentNode.lastElementChild)),cn.call(this,s,!0))}},!1),D.call(this,i,"keyup",t=>{t.key==="Return"&&_.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:i,list:e,type:t,title:n,badge:s=null,checked:o=!1}){const a=Te(this.config.selectors.inputs[t]),l=A("button",Y(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":o,value:i})),c=A("span");c.innerHTML=n,d.element(s)&&c.appendChild(s),l.appendChild(c),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(u){u&&Array.from(l.parentNode.children).filter(h=>Ze(h,'[role="menuitemradio"]')).forEach(h=>h.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",u?"true":"false")}}),this.listeners.bind(l,"click keyup",u=>{if(!d.keyboardEvent(u)||u.key==="Space"){switch(u.preventDefault(),u.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(i);break;case"quality":this.quality=i;break;case"speed":this.speed=parseFloat(i)}_.showMenuPanel.call(this,"home",d.keyboardEvent(u))}},t,!1),_.bindMenuItemShortcuts.call(this,l,t),e.appendChild(l)},formatTime(i=0,e=!1){return d.number(i)?hi(i,Bo(this.duration)>0,e):i},updateTimeDisplay(i=null,e=0,t=!1){d.element(i)&&d.number(e)&&(i.innerText=_.formatTime(e,t))},updateVolume(){this.supported.ui&&(d.element(this.elements.inputs.volume)&&_.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),d.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(i,e=0){d.element(i)&&(i.value=e,_.updateRangeFill.call(this,i))},updateProgress(i){if(!this.supported.ui||!d.event(i))return;let e=0;const t=(n,s)=>{const o=d.number(s)?s:0,a=d.element(n)?n:this.elements.display.buffer;if(d.element(a)){a.value=o;const l=a.getElementsByTagName("span")[0];d.element(l)&&(l.childNodes[0].nodeValue=o)}};if(i)switch(i.type){case"timeupdate":case"seeking":case"seeked":e=xd(this.currentTime,this.duration),i.type==="timeupdate"&&_.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(i){const e=d.event(i)?i.target:i;if(d.element(e)&&e.getAttribute("type")==="range"){if(Ze(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=_.formatTime(this.currentTime),n=_.formatTime(this.duration),s=J.get("seekLabel",this.config);e.setAttribute("aria-valuetext",s.replace("{currentTime}",t).replace("{duration}",n))}else if(Ze(e,this.config.selectors.inputs.volume)){const t=100*e.value;e.setAttribute("aria-valuenow",t),e.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);Q.isWebkit&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(i){var e,t;if(!this.config.tooltips.seek||!d.element(this.elements.inputs.seek)||!d.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,s=`${this.config.classNames.tooltip}--visible`,o=h=>B(n,s,h);if(this.touch)return void o(!1);let a=0;const l=this.elements.progress.getBoundingClientRect();if(d.event(i))a=100/l.width*(i.pageX-l.left);else{if(!li(n,s))return;a=parseFloat(n.style.left,10)}a<0?a=0:a>100&&(a=100);const c=this.duration/100*a;n.innerText=_.formatTime(c);const u=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.find(({time:h})=>h===Math.round(c));u&&n.insertAdjacentHTML("afterbegin",`${u.label}<br>`),n.style.left=`${a}%`,d.event(i)&&["mouseenter","mouseleave"].includes(i.type)&&o(i.type==="mouseenter")},timeUpdate(i){const e=!d.element(this.elements.display.duration)&&this.config.invertTime;_.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),i&&i.type==="timeupdate"&&this.media.seeking||_.updateProgress.call(this,i)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Ke(this.elements.display.currentTime,!0),void Ke(this.elements.progress,!0);d.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const i=d.element(this.elements.display.duration);!i&&this.config.displayDuration&&this.paused&&_.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),i&&_.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&_.setMarkers.call(this),_.updateSeekTooltip.call(this)},toggleMenuButton(i,e){Ke(this.elements.settings.buttons[i],!e)},updateSetting(i,e,t){const n=this.elements.settings.panels[i];let s=null,o=e;if(i==="captions")s=this.currentTrack;else{if(s=d.empty(t)?this[i]:t,d.empty(s)&&(s=this.config[i].default),!d.empty(this.options[i])&&!this.options[i].includes(s))return void this.debug.warn(`Unsupported value of '${s}' for ${i}`);if(!this.config[i].options.includes(s))return void this.debug.warn(`Disabled value of '${s}' for ${i}`)}if(d.element(o)||(o=n&&n.querySelector('[role="menu"]')),!d.element(o))return;this.elements.settings.buttons[i].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=_.getLabel.call(this,i,s);const a=o&&o.querySelector(`[value="${s}"]`);d.element(a)&&(a.checked=!0)},getLabel(i,e){switch(i){case"speed":return e===1?J.get("normal",this.config):`${e}×`;case"quality":if(d.number(e)){const t=J.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return No(e);case"captions":return V.getLabel.call(this);default:return null}},setQualityMenu(i){if(!d.element(this.elements.settings.panels.quality))return;const e="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');d.array(i)&&(this.options.quality=hn(i).filter(o=>this.config.quality.options.includes(o)));const n=!d.empty(this.options.quality)&&this.options.quality.length>1;if(_.toggleMenuButton.call(this,e,n),ai(t),_.checkMenu.call(this),!n)return;const s=o=>{const a=J.get(`qualityBadge.${o}`,this.config);return a.length?_.createBadge.call(this,a):null};this.options.quality.sort((o,a)=>{const l=this.config.quality.options;return l.indexOf(o)>l.indexOf(a)?1:-1}).forEach(o=>{_.createMenuItem.call(this,{value:o,list:t,type:e,title:_.getLabel.call(this,"quality",o),badge:s(o)})}),_.updateSetting.call(this,e,t)},setCaptionsMenu(){if(!d.element(this.elements.settings.panels.captions))return;const i="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=V.getTracks.call(this),n=Boolean(t.length);if(_.toggleMenuButton.call(this,i,n),ai(e),_.checkMenu.call(this),!n)return;const s=t.map((o,a)=>({value:a,checked:this.captions.toggled&&this.currentTrack===a,title:V.getLabel.call(this,o),badge:o.language&&_.createBadge.call(this,o.language.toUpperCase()),list:e,type:"language"}));s.unshift({value:-1,checked:!this.captions.toggled,title:J.get("disabled",this.config),list:e,type:"language"}),s.forEach(_.createMenuItem.bind(this)),_.updateSetting.call(this,i,e)},setSpeedMenu(){if(!d.element(this.elements.settings.panels.speed))return;const i="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const t=!d.empty(this.options.speed)&&this.options.speed.length>1;_.toggleMenuButton.call(this,i,t),ai(e),_.checkMenu.call(this),t&&(this.options.speed.forEach(n=>{_.createMenuItem.call(this,{value:n,list:e,type:i,title:_.getLabel.call(this,"speed",n)})}),_.updateSetting.call(this,i,e))},checkMenu(){const{buttons:i}=this.elements.settings,e=!d.empty(i)&&Object.values(i).some(t=>!t.hidden);Ke(this.elements.settings.menu,!e)},focusFirstMenuItem(i,e=!1){if(this.elements.settings.popup.hidden)return;let t=i;d.element(t)||(t=Object.values(this.elements.settings.panels).find(s=>!s.hidden));const n=t.querySelector('[role^="menuitem"]');cn.call(this,n,e)},toggleMenu(i){const{popup:e}=this.elements.settings,t=this.elements.buttons.settings;if(!d.element(e)||!d.element(t))return;const{hidden:n}=e;let s=n;if(d.boolean(i))s=i;else if(d.keyboardEvent(i)&&i.key==="Escape")s=!1;else if(d.event(i)){const o=d.function(i.composedPath)?i.composedPath()[0]:i.target,a=e.contains(o);if(a||!a&&i.target!==t&&s)return}t.setAttribute("aria-expanded",s),Ke(e,!s),B(this.elements.container,this.config.classNames.menu.open,s),s&&d.keyboardEvent(i)?_.focusFirstMenuItem.call(this,null,!0):s||n||cn.call(this,t,d.keyboardEvent(i))},getMenuSize(i){const e=i.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),i.parentNode.appendChild(e);const t=e.scrollWidth,n=e.scrollHeight;return Me(e),{width:t,height:n}},showMenuPanel(i="",e=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${i}`);if(!d.element(t))return;const n=t.parentNode,s=Array.from(n.children).find(o=>!o.hidden);if(X.transitions&&!X.reducedMotion){n.style.width=`${s.scrollWidth}px`,n.style.height=`${s.scrollHeight}px`;const o=_.getMenuSize.call(this,t),a=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",ci.call(this,n,rn,a))};D.call(this,n,rn,a),n.style.width=`${o.width}px`,n.style.height=`${o.height}px`}Ke(s,!0),Ke(t,!1),_.focusFirstMenuItem.call(this,t,e)},setDownloadUrl(){const i=this.elements.buttons.download;d.element(i)&&i.setAttribute("href",this.download)},create(i){const{bindMenuItemShortcuts:e,createButton:t,createProgress:n,createRange:s,createTime:o,setQualityMenu:a,setSpeedMenu:l,showMenuPanel:c}=_;this.elements.controls=null,d.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const u=A("div",Te(this.config.selectors.controls.wrapper));this.elements.controls=u;const h={class:"plyr__controls__item"};return hn(d.array(this.config.controls)?this.config.controls:[]).forEach(f=>{if(f==="restart"&&u.appendChild(t.call(this,"restart",h)),f==="rewind"&&u.appendChild(t.call(this,"rewind",h)),f==="play"&&u.appendChild(t.call(this,"play",h)),f==="fast-forward"&&u.appendChild(t.call(this,"fast-forward",h)),f==="progress"){const m=A("div",{class:`${h.class} plyr__progress__container`}),g=A("div",Te(this.config.selectors.progress));if(g.appendChild(s.call(this,"seek",{id:`plyr-seek-${i.id}`})),g.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const b=A("span",{class:this.config.classNames.tooltip},"00:00");g.appendChild(b),this.elements.display.seekTooltip=b}this.elements.progress=g,m.appendChild(this.elements.progress),u.appendChild(m)}if(f==="current-time"&&u.appendChild(o.call(this,"currentTime",h)),f==="duration"&&u.appendChild(o.call(this,"duration",h)),f==="mute"||f==="volume"){let{volume:m}=this.elements;if(d.element(m)&&u.contains(m)||(m=A("div",Y({},h,{class:`${h.class} plyr__volume`.trim()})),this.elements.volume=m,u.appendChild(m)),f==="mute"&&m.appendChild(t.call(this,"mute")),f==="volume"&&!Q.isIos){const g={max:1,step:.05,value:this.config.volume};m.appendChild(s.call(this,"volume",Y(g,{id:`plyr-volume-${i.id}`})))}}if(f==="captions"&&u.appendChild(t.call(this,"captions",h)),f==="settings"&&!d.empty(this.config.settings)){const m=A("div",Y({},h,{class:`${h.class} plyr__menu`.trim(),hidden:""}));m.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${i.id}`,"aria-expanded":!1}));const g=A("div",{class:"plyr__menu__container",id:`plyr-settings-${i.id}`,hidden:""}),b=A("div"),v=A("div",{id:`plyr-settings-${i.id}-home`}),x=A("div",{role:"menu"});v.appendChild(x),b.appendChild(v),this.elements.settings.panels.home=v,this.config.settings.forEach(C=>{const S=A("button",Y(Te(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(this,S,C),D.call(this,S,"click",()=>{c.call(this,C,!1)});const w=A("span",null,J.get(C,this.config)),p=A("span",{class:this.config.classNames.menu.value});p.innerHTML=i[C],w.appendChild(p),S.appendChild(w),x.appendChild(S);const L=A("div",{id:`plyr-settings-${i.id}-${C}`,hidden:""}),k=A("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});k.appendChild(A("span",{"aria-hidden":!0},J.get(C,this.config))),k.appendChild(A("span",{class:this.config.classNames.hidden},J.get("menuBack",this.config))),D.call(this,L,"keydown",N=>{N.key==="ArrowLeft"&&(N.preventDefault(),N.stopPropagation(),c.call(this,"home",!0))},!1),D.call(this,k,"click",()=>{c.call(this,"home",!1)}),L.appendChild(k),L.appendChild(A("div",{role:"menu"})),b.appendChild(L),this.elements.settings.buttons[C]=S,this.elements.settings.panels[C]=L}),g.appendChild(b),m.appendChild(g),u.appendChild(m),this.elements.settings.popup=g,this.elements.settings.menu=m}if(f==="pip"&&X.pip&&u.appendChild(t.call(this,"pip",h)),f==="airplay"&&X.airplay&&u.appendChild(t.call(this,"airplay",h)),f==="download"){const m=Y({},h,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(m.download="");const{download:g}=this.config.urls;!d.url(g)&&this.isEmbed&&Y(m,{icon:`logo-${this.provider}`,label:this.provider}),u.appendChild(t.call(this,"download",m))}f==="fullscreen"&&u.appendChild(t.call(this,"fullscreen",h))}),this.isHTML5&&a.call(this,je.getQualityOptions.call(this)),l.call(this),u},inject(){if(this.config.loadSprite){const s=_.getIconUrl.call(this);s.cors&&Io(s.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let i=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;d.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),d.element(this.config.controls)||d.string(this.config.controls)?i=this.config.controls:(i=_.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:V.getLabel.call(this)}),t=!1);let n;if(t&&d.string(this.config.controls)&&(i=(s=>{let o=s;return Object.entries(e).forEach(([a,l])=>{o=Rt(o,`{${a}}`,l)}),o})(i)),d.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),d.element(n)||(n=this.elements.container),n[d.element(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),d.element(this.elements.controls)||_.findElements.call(this),!d.empty(this.elements.buttons)){const s=o=>{const a=this.config.classNames.controlPressed;Object.defineProperty(o,"pressed",{enumerable:!0,get:()=>li(o,a),set(l=!1){B(o,a,l)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(o=>{d.array(o)||d.nodeList(o)?Array.from(o).filter(Boolean).forEach(s):s(o)})}if(Q.isEdge&&_o(n),this.config.tooltips.controls){const{classNames:s,selectors:o}=this.config,a=`${o.controls.wrapper} ${o.labels} .${s.hidden}`,l=gt.call(this,a);Array.from(l).forEach(c=>{B(c,this.config.classNames.hidden,!1),B(c,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var i,e;if(!this.duration||this.elements.markers)return;const t=(i=this.config.markers)===null||i===void 0||(e=i.points)===null||e===void 0?void 0:e.filter(({time:c})=>c>0&&c<this.duration);if(t==null||!t.length)return;const n=document.createDocumentFragment(),s=document.createDocumentFragment();let o=null;const a=`${this.config.classNames.tooltip}--visible`,l=c=>B(o,a,c);t.forEach(c=>{const u=A("span",{class:this.config.classNames.marker},""),h=c.time/this.duration*100+"%";o&&(u.addEventListener("mouseenter",()=>{c.label||(o.style.left=h,o.innerHTML=c.label,l(!0))}),u.addEventListener("mouseleave",()=>{l(!1)})),u.addEventListener("click",()=>{this.currentTime=c.time}),u.style.left=h,s.appendChild(u)}),n.appendChild(s),this.config.tooltips.seek||(o=A("span",{class:this.config.classNames.tooltip},""),n.appendChild(o)),this.elements.markers={points:s,tip:o},this.elements.progress.appendChild(n)}};function Do(i,e=!0){let t=i;if(e){const n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch{return null}}function Ro(i){const e=new URLSearchParams;return d.object(i)&&Object.entries(i).forEach(([t,n])=>{e.set(t,n)}),e}const V={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!X.textTracks)return void(d.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&_.setCaptionsMenu.call(this));if(d.element(this.elements.captions)||(this.elements.captions=A("div",Te(this.config.selectors.captions)),md(this.elements.captions,this.elements.wrapper)),Q.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(s=>{const o=s.getAttribute("src"),a=Do(o);a!==null&&a.hostname!==window.location.href.hostname&&["http:","https:"].includes(a.protocol)&&Vt(o,"blob").then(l=>{s.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{Me(s)})})}const i=hn((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();e==="auto"&&([e]=i);let t=this.storage.get("captions");if(d.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:e,languages:i}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";D.call(this,this.media.textTracks,n,V.update.bind(this))}setTimeout(V.update.bind(this),0)},update(){const i=V.getTracks.call(this,!0),{active:e,language:t,meta:n,currentTrackNode:s}=this.captions,o=Boolean(i.find(a=>a.language===t));this.isHTML5&&this.isVideo&&i.filter(a=>!n.get(a)).forEach(a=>{this.debug.log("Track added",a),n.set(a,{default:a.mode==="showing"}),a.mode==="showing"&&(a.mode="hidden"),D.call(this,a,"cuechange",()=>V.updateCues.call(this))}),(o&&this.language!==t||!i.includes(s))&&(V.setLanguage.call(this,t),V.toggle.call(this,e&&o)),this.elements&&B(this.elements.container,this.config.classNames.captions.enabled,!d.empty(i)),d.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&_.setCaptionsMenu.call(this)},toggle(i,e=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,n=this.config.classNames.captions.active,s=d.nullOrUndefined(i)?!t:i;if(s!==t){if(e||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!e){const o=V.getTracks.call(this),a=V.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=a.language,void V.set.call(this,o.indexOf(a))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),B(this.elements.container,n,s),this.captions.toggled=s,_.updateSetting.call(this,"captions"),P.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout(()=>{s&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(i,e=!0){const t=V.getTracks.call(this);if(i!==-1)if(d.number(i))if(i in t){if(this.captions.currentTrack!==i){this.captions.currentTrack=i;const n=t[i],{language:s}=n||{};this.captions.currentTrackNode=n,_.updateSetting.call(this,"captions"),e||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),P.call(this,this.media,"languagechange")}V.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&V.updateCues.call(this)}else this.debug.warn("Track not found",i);else this.debug.warn("Invalid caption argument",i);else V.toggle.call(this,!1,e)},setLanguage(i,e=!0){if(!d.string(i))return void this.debug.warn("Invalid language argument",i);const t=i.toLowerCase();this.captions.language=t;const n=V.getTracks.call(this),s=V.findTrack.call(this,[t]);V.set.call(this,n.indexOf(s),e)},getTracks(i=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||i||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(i,e=!1){const t=V.getTracks.call(this),n=a=>Number((this.captions.meta.get(a)||{}).default),s=Array.from(t).sort((a,l)=>n(l)-n(a));let o;return i.every(a=>(o=s.find(l=>l.language===a),!o)),o||(e?s[0]:void 0)},getCurrentTrack(){return V.getTracks.call(this)[this.currentTrack]},getLabel(i){let e=i;return!d.track(e)&&X.textTracks&&this.captions.toggled&&(e=V.getCurrentTrack.call(this)),d.track(e)?d.empty(e.label)?d.empty(e.language)?J.get("enabled",this.config):i.language.toUpperCase():e.label:J.get("disabled",this.config)},updateCues(i){if(!this.supported.ui)return;if(!d.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!d.nullOrUndefined(i)&&!Array.isArray(i))return void this.debug.warn("updateCues: Invalid input",i);let e=i;if(!e){const n=V.getCurrentTrack.call(this);e=Array.from((n||{}).activeCues||[]).map(s=>s.getCueAsHTML()).map(Td)}const t=e.map(n=>n.trim()).join(`
|
|
49
|
+
`);if(t!==this.elements.captions.innerHTML){ai(this.elements.captions);const n=A("span",Te(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),P.call(this,this.media,"cuechange")}}},zo={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.2/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},mn={active:"picture-in-picture",inactive:"inline"},Ue={html5:"html5",youtube:"youtube",vimeo:"vimeo"},fn={audio:"audio",video:"video"};function Ed(i){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(i)?Ue.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(i)?Ue.vimeo:null}const gn=()=>{};class Sd{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):gn}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):gn}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):gn}}class Ee{constructor(e){T(this,"onChange",()=>{if(!this.enabled)return;const t=this.player.elements.buttons.fullscreen;d.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;P.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),T(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",B(this.target,this.player.config.classNames.fullscreen.fallback,t),Q.isIos){let n=document.head.querySelector('meta[name="viewport"]');const s="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const o=d.string(n.content)&&n.content.includes(s);t?(this.cleanupViewport=!o,o||(n.content+=`,${s}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(a=>a.trim()!==s).join(","))}this.onChange()}),T(this,"trapFocus",t=>{if(Q.isIos||!this.active||t.key!=="Tab")return;const n=document.activeElement,s=gt.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=s,a=s[s.length-1];n!==a||t.shiftKey?n===o&&t.shiftKey&&(a.focus(),t.preventDefault()):(o.focus(),t.preventDefault())}),T(this,"update",()=>{if(this.enabled){let t;t=this.forceFallback?"Fallback (forced)":Ee.native?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");B(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}),T(this,"enter",()=>{this.enabled&&(Q.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ee.native||this.forceFallback?this.toggleFallback(!0):this.prefix?d.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),T(this,"exit",()=>{if(this.enabled)if(Q.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),$e(this.player.play());else if(!Ee.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!d.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),T(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ee.prefix,this.property=Ee.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&fd(this.player.elements.container,e.config.fullscreen.container),D.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),D.call(this.player,this.player.elements.container,"dblclick",t=>{d.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),D.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return Ee.native&&!this.forceFallback}static get prefix(){if(d.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!d.function(document[`${t}ExitFullscreen`])&&!d.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get enabled(){return(Ee.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!Ee.native||this.forceFallback)return li(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return Q.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function ui(i,e=1){return new Promise((t,n)=>{const s=new Image,o=()=>{delete s.onload,delete s.onerror,(s.naturalWidth>=e?t:n)(s)};Object.assign(s,{onload:o,onerror:o,src:i})})}const j={addStyleHook(){B(this.elements.container,this.config.selectors.container.replace(".",""),!0),B(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(i=!1){i&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void j.toggleNativeControls.call(this,!0);d.element(this.elements.controls)||(_.inject.call(this),this.listeners.controls()),j.toggleNativeControls.call(this),this.isHTML5&&V.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,_.updateVolume.call(this),_.timeUpdate.call(this),_.durationUpdate.call(this),j.checkPlaying.call(this),B(this.elements.container,this.config.classNames.pip.supported,X.pip&&this.isHTML5&&this.isVideo),B(this.elements.container,this.config.classNames.airplay.supported,X.airplay&&this.isHTML5),B(this.elements.container,this.config.classNames.isIos,Q.isIos),B(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{P.call(this,this.media,"ready")},0),j.setTitle.call(this),this.poster&&j.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&_.durationUpdate.call(this),this.config.mediaMetadata&&_.setMediaMetadata.call(this)},setTitle(){let i=J.get("play",this.config);if(d.string(this.config.title)&&!d.empty(this.config.title)&&(i+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",i)}),this.isEmbed){const e=Z.call(this,"iframe");if(!d.element(e))return;const t=d.empty(this.config.title)?"video":this.config.title,n=J.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(i){B(this.elements.container,this.config.classNames.posterEnabled,i)},setPoster(i,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",i),this.elements.poster.removeAttribute("hidden"),bd.call(this).then(()=>ui(i)).catch(t=>{throw i===this.poster&&j.togglePoster.call(this,!1),t}).then(()=>{if(i!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${i}')`,backgroundSize:""}),j.togglePoster.call(this,!0),i)))},checkPlaying(i){B(this.elements.container,this.config.classNames.playing,this.playing),B(this.elements.container,this.config.classNames.paused,this.paused),B(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",J.get(this.playing?"pause":"play",this.config))}),d.event(i)&&i.type==="timeupdate"||j.toggleControls.call(this)},checkLoading(i){this.loading=["stalled","waiting"].includes(i.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{B(this.elements.container,this.config.classNames.loading,this.loading),j.toggleControls.call(this)},this.loading?250:0)},toggleControls(i){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(i||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values(te({},this.media.style)).filter(i=>!d.empty(i)&&d.string(i)&&i.startsWith("--plyr")).forEach(i=>{this.elements.container.style.setProperty(i,this.media.style.getPropertyValue(i)),this.media.style.removeProperty(i)}),d.empty(this.media.style)&&this.media.removeAttribute("style")}};class Ld{constructor(e){T(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,B(n.container,t.config.classNames.isTouch,!0)}),T(this,"setTabFocus",t=>{const{player:n}=this,{elements:s}=n,{key:o,type:a,timeStamp:l}=t;if(clearTimeout(this.focusTimer),a==="keydown"&&o!=="Tab")return;a==="keydown"&&(this.lastKeyDown=l);const c=l-this.lastKeyDown<=20;(a!=="focus"||c)&&((()=>{const u=n.config.classNames.tabFocus;B(gt.call(n,`.${u}`),u,!1)})(),a!=="focusout"&&(this.focusTimer=setTimeout(()=>{const u=document.activeElement;s.container.contains(u)&&B(document.activeElement,n.config.classNames.tabFocus,!0)},10)))}),T(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&yt.call(n,window,"keydown keyup",this.handleKey,t,!1),yt.call(n,document.body,"click",this.toggleMenu,t),dn.call(n,document.body,"touchstart",this.firstTouch),yt.call(n,document.body,"keydown focus blur focusout",this.setTabFocus,t,!1,!0)}),T(this,"container",()=>{const{player:t}=this,{config:n,elements:s,timers:o}=t;!n.keyboard.global&&n.keyboard.focused&&D.call(t,s.container,"keydown keyup",this.handleKey,!1),D.call(t,s.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",c=>{const{controls:u}=s;u&&c.type==="enterfullscreen"&&(u.pressed=!1,u.hover=!1);let h=0;["touchstart","touchmove","mousemove"].includes(c.type)&&(j.toggleControls.call(t,!0),h=t.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>j.toggleControls.call(t,!1),h)});const a=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const c=s.wrapper,{active:u}=t.fullscreen,[h,f]=un.call(t),m=Lo(`aspect-ratio: ${h} / ${f}`);if(!u)return void(m?(c.style.width=null,c.style.height=null):(c.style.maxWidth=null,c.style.margin=null));const[g,b]=vd(),v=g/b>h/f;m?(c.style.width=v?"auto":"100%",c.style.height=v?"100%":"auto"):(c.style.maxWidth=v?b/f*h+"px":null,c.style.margin=v?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(a,50)};D.call(t,s.container,"enterfullscreen exitfullscreen",c=>{const{target:u}=t.fullscreen;u===s.container&&(!t.isEmbed&&d.empty(t.config.ratio)||(a(),(c.type==="enterfullscreen"?D:ci).call(t,window,"resize",l)))})}),T(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(D.call(t,t.media,"timeupdate seeking seeked",o=>_.timeUpdate.call(t,o)),D.call(t,t.media,"durationchange loadeddata loadedmetadata",o=>_.durationUpdate.call(t,o)),D.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),D.call(t,t.media,"progress playing seeking seeked",o=>_.updateProgress.call(t,o)),D.call(t,t.media,"volumechange",o=>_.updateVolume.call(t,o)),D.call(t,t.media,"playing play pause ended emptied timeupdate",o=>j.checkPlaying.call(t,o)),D.call(t,t.media,"waiting canplay seeked playing",o=>j.checkLoading.call(t,o)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const o=Z.call(t,`.${t.config.classNames.video}`);if(!d.element(o))return;D.call(t,n.container,"click",a=>{([n.container,o].includes(a.target)||o.contains(a.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(a,t.restart,"restart"),this.proxy(a,()=>{$e(t.play())},"play")):this.proxy(a,()=>{$e(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&D.call(t,n.wrapper,"contextmenu",o=>{o.preventDefault()},!1),D.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),D.call(t,t.media,"ratechange",()=>{_.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),D.call(t,t.media,"qualitychange",o=>{_.updateSetting.call(t,"quality",null,o.detail.quality)}),D.call(t,t.media,"ready qualitychange",()=>{_.setDownloadUrl.call(t)});const s=t.config.events.concat(["keyup","keydown"]).join(" ");D.call(t,t.media,s,o=>{let{detail:a={}}=o;o.type==="error"&&(a=t.media.error),P.call(t,n.container,o.type,!0,a)})}),T(this,"proxy",(t,n,s)=>{const{player:o}=this,a=o.config.listeners[s];let l=!0;d.function(a)&&(l=a.call(o,t)),l!==!1&&d.function(n)&&n.call(o,t)}),T(this,"bind",(t,n,s,o,a=!0)=>{const{player:l}=this,c=l.config.listeners[o],u=d.function(c);D.call(l,t,n,h=>this.proxy(h,s,o),a&&!u)}),T(this,"controls",()=>{const{player:t}=this,{elements:n}=t,s=Q.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(o=>{this.bind(o,"click",()=>{$e(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{P.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",o=>{o.stopPropagation(),o.preventDefault(),_.toggleMenu.call(t,o)},null,!1),this.bind(n.buttons.settings,"keyup",o=>{["Space","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),_.toggleMenu.call(t,o)):_.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",o=>{o.key==="Escape"&&_.toggleMenu.call(t,o)}),this.bind(n.inputs.seek,"mousedown mousemove",o=>{const a=n.progress.getBoundingClientRect(),l=100/a.width*(o.pageX-a.left);o.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",o=>{const a=o.currentTarget,l="play-on-seeked";if(d.keyboardEvent(o)&&!["ArrowLeft","ArrowRight"].includes(o.key))return;t.lastSeekTime=Date.now();const c=a.hasAttribute(l),u=["mouseup","touchend","keyup"].includes(o.type);c&&u?(a.removeAttribute(l),$e(t.play())):!u&&t.playing&&(a.setAttribute(l,""),t.pause())}),Q.isIos){const o=gt.call(t,'input[type="range"]');Array.from(o).forEach(a=>this.bind(a,s,l=>_o(l.target)))}this.bind(n.inputs.seek,s,o=>{const a=o.currentTarget;let l=a.getAttribute("seek-value");d.empty(l)&&(l=a.value),a.removeAttribute("seek-value"),t.currentTime=l/a.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",o=>_.updateSeekTooltip.call(t,o)),this.bind(n.progress,"mousemove touchmove",o=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.startMove(o)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",o=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.startScrubbing(o)}),this.bind(n.progress,"mouseup touchend",o=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.endScrubbing(o)}),Q.isWebkit&&Array.from(gt.call(t,'input[type="range"]')).forEach(o=>{this.bind(o,"input",a=>_.updateRangeFill.call(t,a.target))}),t.config.toggleInvert&&!d.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,_.timeUpdate.call(t))}),this.bind(n.inputs.volume,s,o=>{t.volume=o.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",o=>{n.controls.hover=!t.touch&&o.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(o=>!o.contains(n.container)).forEach(o=>{this.bind(o,"mouseenter mouseleave",a=>{n.controls&&(n.controls.hover=!t.touch&&a.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",o=>{n.controls.pressed=["mousedown","touchstart"].includes(o.type)}),this.bind(n.controls,"focusin",()=>{const{config:o,timers:a}=t;B(n.controls,o.classNames.noTransition,!0),j.toggleControls.call(t,!0),setTimeout(()=>{B(n.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(a.controls),a.controls=setTimeout(()=>j.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",o=>{const a=o.webkitDirectionInvertedFromDevice,[l,c]=[o.deltaX,-o.deltaY].map(f=>a?-f:f),u=Math.sign(Math.abs(l)>Math.abs(c)?l:c);t.increaseVolume(u/50);const{volume:h}=t.media;(u===1&&h<1||u===-1&&h>0)&&o.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:s,type:o,altKey:a,ctrlKey:l,metaKey:c,shiftKey:u}=e,h=o==="keydown",f=h&&s===this.lastKey;if(!(a||l||c||u)&&!!s){if(h){const g=document.activeElement;if(d.element(g)){const{editable:b}=t.config.selectors,{seek:v}=n.inputs;if(g!==v&&Ze(g,b)||e.key==="Space"&&Ze(g,'button, [role^="menuitem"]'))return}switch(["Space","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(s)&&(e.preventDefault(),e.stopPropagation()),s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":f||(m=parseInt(s,10),t.currentTime=t.duration/10*m);break;case"Space":case"k":f||$e(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":f||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":f||t.toggleCaptions();break;case"l":t.loop=!t.loop}s==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=s}else this.lastKey=null;var m}}toggleMenu(e){_.toggleMenu.call(this.player,e)}}function Ad(i,e){return i(e={exports:{}},e.exports),e.exports}var Pd=Ad(function(i,e){i.exports=function(){var t=function(){},n={},s={},o={};function a(m,g){m=m.push?m:[m];var b,v,x,C=[],S=m.length,w=S;for(b=function(p,L){L.length&&C.push(p),--w||g(C)};S--;)v=m[S],(x=s[v])?b(v,x):(o[v]=o[v]||[]).push(b)}function l(m,g){if(m){var b=o[m];if(s[m]=g,b)for(;b.length;)b[0](m,g),b.splice(0,1)}}function c(m,g){m.call&&(m={success:m}),g.length?(m.error||t)(g):(m.success||t)(m)}function u(m,g,b,v){var x,C,S=document,w=b.async,p=(b.numRetries||0)+1,L=b.before||t,k=m.replace(/[\?|#].*$/,""),N=m.replace(/^(css|img)!/,"");v=v||0,/(^css!|\.css$)/.test(k)?((C=S.createElement("link")).rel="stylesheet",C.href=N,(x="hideFocus"in C)&&C.relList&&(x=0,C.rel="preload",C.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(k)?(C=S.createElement("img")).src=N:((C=S.createElement("script")).src=m,C.async=w===void 0||w),C.onload=C.onerror=C.onbeforeload=function(R){var U=R.type[0];if(x)try{C.sheet.cssText.length||(U="e")}catch(W){W.code!=18&&(U="e")}if(U=="e"){if((v+=1)<p)return u(m,g,b,v)}else if(C.rel=="preload"&&C.as=="style")return C.rel="stylesheet";g(m,U,R.defaultPrevented)},L(m,C)!==!1&&S.head.appendChild(C)}function h(m,g,b){var v,x,C=(m=m.push?m:[m]).length,S=C,w=[];for(v=function(p,L,k){if(L=="e"&&w.push(p),L=="b"){if(!k)return;w.push(p)}--C||g(w)},x=0;x<S;x++)u(m[x],v,b)}function f(m,g,b){var v,x;if(g&&g.trim&&(v=g),x=(v?b:g)||{},v){if(v in n)throw"LoadJS";n[v]=!0}function C(S,w){h(m,function(p){c(x,p),S&&c({success:S,error:w},p),l(v,p)},x)}if(x.returnPromise)return new Promise(C);C()}return f.ready=function(m,g){return a(m,function(b){c(g,b)}),f},f.done=function(m){l(m,[])},f.reset=function(){n={},s={},o={}},f.isDefined=function(m){return m in n},f}()});function yn(i){return new Promise((e,t)=>{Pd(i,{success:e,error:t})})}function Od(i){return d.empty(i)?null:d.number(Number(i))?i:i.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:i}function Nd(i){const e=i.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function Ft(i){i&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===i&&(this.media.paused=!i,P.call(this,this.media,i?"play":"pause"))}const bn={setup(){const i=this;B(i.elements.wrapper,i.config.classNames.embed,!0),i.options.speed=i.config.speed.options,bt.call(i),d.object(window.Vimeo)?bn.ready.call(i):yn(i.config.urls.vimeo.sdk).then(()=>{bn.ready.call(i)}).catch(e=>{i.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const i=this,e=i.config.vimeo,S=e,{premium:t,referrerPolicy:n}=S,s=Zo(S,["premium","referrerPolicy"]);let o=i.media.getAttribute("src"),a="";d.empty(o)?(o=i.media.getAttribute(i.config.attributes.embed.id),a=i.media.getAttribute(i.config.attributes.embed.hash)):a=Nd(o);const l=a?{h:a}:{};t&&Object.assign(s,{controls:!1,sidedock:!1});const c=Ro(te(te({loop:i.config.loop.active,autoplay:i.autoplay,muted:i.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},l),s)),u=Od(o),h=A("iframe"),f=pn(i.config.urls.vimeo.iframe,u,c);if(h.setAttribute("src",f),h.setAttribute("allowfullscreen",""),h.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),d.empty(n)||h.setAttribute("referrerPolicy",n),t||!e.customControls)h.setAttribute("data-poster",i.poster),i.media=ri(h,i.media);else{const w=A("div",{class:i.config.classNames.embedContainer,"data-poster":i.poster});w.appendChild(h),i.media=ri(w,i.media)}e.customControls||Vt(pn(i.config.urls.vimeo.api,f)).then(w=>{!d.empty(w)&&w.thumbnail_url&&j.setPoster.call(i,w.thumbnail_url).catch(()=>{})}),i.embed=new window.Vimeo.Player(h,{autopause:i.config.autopause,muted:i.muted}),i.media.paused=!0,i.media.currentTime=0,i.supported.ui&&i.embed.disableTextTrack(),i.media.play=()=>(Ft.call(i,!0),i.embed.play()),i.media.pause=()=>(Ft.call(i,!1),i.embed.pause()),i.media.stop=()=>{i.pause(),i.currentTime=0};let{currentTime:m}=i.media;Object.defineProperty(i.media,"currentTime",{get:()=>m,set(w){const{embed:p,media:L,paused:k,volume:N}=i,R=k&&!p.hasPlayed;L.seeking=!0,P.call(i,L,"seeking"),Promise.resolve(R&&p.setVolume(0)).then(()=>p.setCurrentTime(w)).then(()=>R&&p.pause()).then(()=>R&&p.setVolume(N)).catch(()=>{})}});let g=i.config.speed.selected;Object.defineProperty(i.media,"playbackRate",{get:()=>g,set(w){i.embed.setPlaybackRate(w).then(()=>{g=w,P.call(i,i.media,"ratechange")}).catch(()=>{i.options.speed=[1]})}});let{volume:b}=i.config;Object.defineProperty(i.media,"volume",{get:()=>b,set(w){i.embed.setVolume(w).then(()=>{b=w,P.call(i,i.media,"volumechange")})}});let{muted:v}=i.config;Object.defineProperty(i.media,"muted",{get:()=>v,set(w){const p=!!d.boolean(w)&&w;i.embed.setVolume(p?0:i.config.volume).then(()=>{v=p,P.call(i,i.media,"volumechange")})}});let x,{loop:C}=i.config;Object.defineProperty(i.media,"loop",{get:()=>C,set(w){const p=d.boolean(w)?w:i.config.loop.active;i.embed.setLoop(p).then(()=>{C=p})}}),i.embed.getVideoUrl().then(w=>{x=w,_.setDownloadUrl.call(i)}).catch(w=>{this.debug.warn(w)}),Object.defineProperty(i.media,"currentSrc",{get:()=>x}),Object.defineProperty(i.media,"ended",{get:()=>i.currentTime===i.duration}),Promise.all([i.embed.getVideoWidth(),i.embed.getVideoHeight()]).then(w=>{const[p,L]=w;i.embed.ratio=Oo(p,L),bt.call(this)}),i.embed.setAutopause(i.config.autopause).then(w=>{i.config.autopause=w}),i.embed.getVideoTitle().then(w=>{i.config.title=w,j.setTitle.call(this)}),i.embed.getCurrentTime().then(w=>{m=w,P.call(i,i.media,"timeupdate")}),i.embed.getDuration().then(w=>{i.media.duration=w,P.call(i,i.media,"durationchange")}),i.embed.getTextTracks().then(w=>{i.media.textTracks=w,V.setup.call(i)}),i.embed.on("cuechange",({cues:w=[]})=>{const p=w.map(L=>Cd(L.text));V.updateCues.call(i,p)}),i.embed.on("loaded",()=>{i.embed.getPaused().then(w=>{Ft.call(i,!w),w||P.call(i,i.media,"playing")}),d.element(i.embed.element)&&i.supported.ui&&i.embed.element.setAttribute("tabindex",-1)}),i.embed.on("bufferstart",()=>{P.call(i,i.media,"waiting")}),i.embed.on("bufferend",()=>{P.call(i,i.media,"playing")}),i.embed.on("play",()=>{Ft.call(i,!0),P.call(i,i.media,"playing")}),i.embed.on("pause",()=>{Ft.call(i,!1)}),i.embed.on("timeupdate",w=>{i.media.seeking=!1,m=w.seconds,P.call(i,i.media,"timeupdate")}),i.embed.on("progress",w=>{i.media.buffered=w.percent,P.call(i,i.media,"progress"),parseInt(w.percent,10)===1&&P.call(i,i.media,"canplaythrough"),i.embed.getDuration().then(p=>{p!==i.media.duration&&(i.media.duration=p,P.call(i,i.media,"durationchange"))})}),i.embed.on("seeked",()=>{i.media.seeking=!1,P.call(i,i.media,"seeked")}),i.embed.on("ended",()=>{i.media.paused=!0,P.call(i,i.media,"ended")}),i.embed.on("error",w=>{i.media.error=w,P.call(i,i.media,"error")}),e.customControls&&setTimeout(()=>j.build.call(i),0)}};function Md(i){return d.empty(i)?null:i.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:i}function Ht(i){i&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===i&&(this.media.paused=!i,P.call(this,this.media,i?"play":"pause"))}function Id(i){return i.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const pi={setup(){if(B(this.elements.wrapper,this.config.classNames.embed,!0),d.object(window.YT)&&d.function(window.YT.Player))pi.ready.call(this);else{const i=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{d.function(i)&&i(),pi.ready.call(this)},yn(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(i){Vt(pn(this.config.urls.youtube.api,i)).then(e=>{if(d.object(e)){const{title:t,height:n,width:s}=e;this.config.title=t,j.setTitle.call(this),this.embed.ratio=Oo(s,n)}bt.call(this)}).catch(()=>{bt.call(this)})},ready(){const i=this,e=i.config.youtube,t=i.media&&i.media.getAttribute("id");if(!d.empty(t)&&t.startsWith("youtube-"))return;let n=i.media.getAttribute("src");d.empty(n)&&(n=i.media.getAttribute(this.config.attributes.embed.id));const s=Md(n),o=A("div",{id:wd(i.provider),"data-poster":e.customControls?i.poster:void 0});if(i.media=ri(o,i.media),e.customControls){const a=l=>`https://i.ytimg.com/vi/${s}/${l}default.jpg`;ui(a("maxres"),121).catch(()=>ui(a("sd"),121)).catch(()=>ui(a("hq"))).then(l=>j.setPoster.call(i,l.src)).then(l=>{l.includes("maxres")||(i.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}i.embed=new window.YT.Player(i.media,{videoId:s,host:Id(e),playerVars:Y({},{autoplay:i.config.autoplay?1:0,hl:i.config.hl,controls:i.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:i.config.fullscreen.iosNative?0:1,cc_load_policy:i.captions.active?1:0,cc_lang_pref:i.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(a){if(!i.media.error){const l=a.data,c={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occured";i.media.error={code:l,message:c},P.call(i,i.media,"error")}},onPlaybackRateChange(a){const l=a.target;i.media.playbackRate=l.getPlaybackRate(),P.call(i,i.media,"ratechange")},onReady(a){if(d.function(i.media.play))return;const l=a.target;pi.getTitle.call(i,s),i.media.play=()=>{Ht.call(i,!0),l.playVideo()},i.media.pause=()=>{Ht.call(i,!1),l.pauseVideo()},i.media.stop=()=>{l.stopVideo()},i.media.duration=l.getDuration(),i.media.paused=!0,i.media.currentTime=0,Object.defineProperty(i.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(f){i.paused&&!i.embed.hasPlayed&&i.embed.mute(),i.media.seeking=!0,P.call(i,i.media,"seeking"),l.seekTo(f)}}),Object.defineProperty(i.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(f){l.setPlaybackRate(f)}});let{volume:c}=i.config;Object.defineProperty(i.media,"volume",{get:()=>c,set(f){c=f,l.setVolume(100*c),P.call(i,i.media,"volumechange")}});let{muted:u}=i.config;Object.defineProperty(i.media,"muted",{get:()=>u,set(f){const m=d.boolean(f)?f:u;u=m,l[m?"mute":"unMute"](),l.setVolume(100*c),P.call(i,i.media,"volumechange")}}),Object.defineProperty(i.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(i.media,"ended",{get:()=>i.currentTime===i.duration});const h=l.getAvailablePlaybackRates();i.options.speed=h.filter(f=>i.config.speed.options.includes(f)),i.supported.ui&&e.customControls&&i.media.setAttribute("tabindex",-1),P.call(i,i.media,"timeupdate"),P.call(i,i.media,"durationchange"),clearInterval(i.timers.buffering),i.timers.buffering=setInterval(()=>{i.media.buffered=l.getVideoLoadedFraction(),(i.media.lastBuffered===null||i.media.lastBuffered<i.media.buffered)&&P.call(i,i.media,"progress"),i.media.lastBuffered=i.media.buffered,i.media.buffered===1&&(clearInterval(i.timers.buffering),P.call(i,i.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>j.build.call(i),50)},onStateChange(a){const l=a.target;switch(clearInterval(i.timers.playing),i.media.seeking&&[1,2].includes(a.data)&&(i.media.seeking=!1,P.call(i,i.media,"seeked")),a.data){case-1:P.call(i,i.media,"timeupdate"),i.media.buffered=l.getVideoLoadedFraction(),P.call(i,i.media,"progress");break;case 0:Ht.call(i,!1),i.media.loop?(l.stopVideo(),l.playVideo()):P.call(i,i.media,"ended");break;case 1:e.customControls&&!i.config.autoplay&&i.media.paused&&!i.embed.hasPlayed?i.media.pause():(Ht.call(i,!0),P.call(i,i.media,"playing"),i.timers.playing=setInterval(()=>{P.call(i,i.media,"timeupdate")},50),i.media.duration!==l.getDuration()&&(i.media.duration=l.getDuration(),P.call(i,i.media,"durationchange")));break;case 2:i.muted||i.embed.unMute(),Ht.call(i,!1);break;case 3:P.call(i,i.media,"waiting")}P.call(i,i.elements.container,"statechange",!1,{code:a.data})}}})}},Vo={setup(){this.media?(B(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),B(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&B(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=A("div",{class:this.config.classNames.video}),To(this.media,this.elements.wrapper),this.elements.poster=A("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?je.setup.call(this):this.isYouTube?pi.setup.call(this):this.isVimeo&&bn.setup.call(this)):this.debug.warn("No media element found!")}};class Bd{constructor(e){T(this,"load",()=>{this.enabled&&(d.object(window.google)&&d.object(window.google.ima)?this.ready():yn(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),T(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),T(this,"setupIMA",()=>{this.elements.container=A("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),T(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),T(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=hi(Math.max(this.manager.getRemainingTime(),0)),s=`${J.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",s)},100)}),T(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,s=>this.onAdError(s)),Object.keys(google.ima.AdEvent.Type).forEach(s=>{this.manager.addEventListener(google.ima.AdEvent.Type[s],o=>this.onAdEvent(o))}),this.trigger("loaded")}),T(this,"addCuePoints",()=>{d.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(d.element(n)){const s=100/this.player.duration*t,o=A("span",{class:this.player.config.classNames.cues});o.style.left=`${s.toString()}%`,n.appendChild(o)}}})}),T(this,"onAdEvent",t=>{const{container:n}=this.player.elements,s=t.getAd(),o=t.getAdData();switch((a=>{P.call(this.player,this.player.media,`ads${a.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),s.isLinear()||(s.width=n.offsetWidth,s.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}}),T(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),T(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const s=this.player.currentTime;d.empty(this.cuePoints)||this.cuePoints.forEach((o,a)=>{n<o&&o<s&&(this.manager.discardAdBreak(),this.cuePoints.splice(a,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),T(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),T(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,$e(this.player.media.play())}),T(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),T(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),T(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),T(this,"trigger",(t,...n)=>{const s=this.events[t];d.array(s)&&s.forEach(o=>{d.function(o)&&o.apply(this,n)})}),T(this,"on",(t,n)=>(d.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),T(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),T(this,"clearSafetyTimer",t=>{d.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!d.empty(e.publisherId)||d.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return d.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Ro({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function Fo(i=0,e=0,t=255){return Math.min(Math.max(i,e),t)}const Dd=i=>{const e=[];return i.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(s=>{if(d.number(n.startTime)){if(!d.empty(s.trim())&&d.empty(n.text)){const o=s.trim().split("#xywh=");[n.text]=o,o[1]&&([n.x,n.y,n.w,n.h]=o[1].split(","))}}else{const o=s.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);o&&(n.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+Number(`0.${o[4]}`),n.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+Number(`0.${o[9]}`))}}),n.text&&e.push(n)}),e},Ho=(i,e)=>{const t={};return i>e.width/e.height?(t.width=e.width,t.height=1/i*e.width):(t.height=e.height,t.width=i*e.height),t};class vn{constructor(e){T(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)})}),T(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(d.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const s=()=>{this.thumbnails.sort((o,a)=>o.height-a.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(d.function(n))n(o=>{this.thumbnails=o,s()});else{const o=(d.string(n)?[n]:n).map(a=>this.getThumbnail(a));Promise.all(o).then(s)}})),T(this,"getThumbnail",t=>new Promise(n=>{Vt(t).then(s=>{const o={frames:Dd(s),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const a=new Image;a.onload=()=>{o.height=a.naturalHeight,o.width=a.naturalWidth,this.thumbnails.push(o),n()},a.src=o.urlPrefix+o.frames[0].text})})),T(this,"startMove",t=>{if(this.loaded&&d.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,s;const o=this.player.elements.progress.getBoundingClientRect(),a=100/o.width*(t.pageX-o.left);this.seekTime=this.player.media.duration*(a/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=hi(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(s=n.points)===null||s===void 0?void 0:s.find(({time:c})=>c===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),T(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),T(this,"startScrubbing",t=>{(d.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),T(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):dn.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),T(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),T(this,"render",()=>{this.elements.thumb.container=A("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=A("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=A("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=A("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),d.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=A("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),T(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),T(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(o=>this.seekTime>=o.startTime&&this.seekTime<=o.endTime),n=t>=0;let s=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((o,a)=>{this.loadedImages.includes(o.frames[t].text)&&(s=a)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(s)))}),T(this,"loadImage",(t=0)=>{const n=this.showingThumb,s=this.thumbnails[t],{urlPrefix:o}=s,a=s.frames[n],l=s.frames[n].text,c=o+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,a,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const u=new Image;u.src=c,u.dataset.index=n,u.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${c}`),u.onload=()=>this.showImage(u,a,t,n,l,!0),this.loadingImage=u,this.removeOldImages(u)}}),T(this,"showImage",(t,n,s,o,a,l=!0)=>{this.player.debug.log(`Showing thumb: ${a}. num: ${o}. qual: ${s}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(a)||this.loadedImages.push(a)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(s,t,n,a))}),T(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const s=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:o}=this;setTimeout(()=>{o.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},s)}})}),T(this,"preloadNearby",(t,n=!0)=>new Promise(s=>{setTimeout(()=>{const o=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===o){let a;a=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;a.forEach(c=>{const u=c.text;if(u!==o&&!this.loadedImages.includes(u)){l=!0,this.player.debug.log(`Preloading thumb filename: ${u}`);const{urlPrefix:h}=this.thumbnails[0],f=h+u,m=new Image;m.src=f,m.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${u}`),this.loadedImages.includes(u)||this.loadedImages.push(u),s()}}}),l||s()}},300)})),T(this,"getHigherQuality",(t,n,s,o)=>{if(t<this.thumbnails.length-1){let a=n.naturalHeight;this.usingSprites&&(a=s.h),a<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(t+1))},300)}}),T(this,"toggleThumbContainer",(t=!1,n=!1)=>{const s=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(s,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),T(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),T(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),T(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),T(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:s}=this.elements.thumb,o=n.left-t.left+10,a=n.right-t.left-s.clientWidth-10,l=this.mousePosX-t.left-s.clientWidth/2,c=Fo(l,o,a);s.style.left=`${c}px`,s.style.setProperty("--preview-arrow-offset",l-c+"px")}),T(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Ho(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),T(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const s=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*s+"px",t.style.width=t.naturalWidth*s+"px",t.style.left=`-${n.x*s}px`,t.style.top=`-${n.y*s}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Ho(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const wn={insertElements(i,e){d.string(e)?$o(i,this.media,{src:e}):d.array(e)&&e.forEach(t=>{$o(i,this.media,t)})},change(i){Co(i,"sources.length")?(je.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Me(this.media),this.media=null,d.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=i,[{provider:n=Ue.html5,src:s}]=e,o=n==="html5"?t:"div",a=n==="html5"?{}:{src:s};Object.assign(this,{provider:n,type:t,supported:X.check(t,n,this.config.playsinline),media:A(o,a)}),this.elements.container.appendChild(this.media),d.boolean(i.autoplay)&&(this.config.autoplay=i.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),d.empty(i.poster)||(this.poster=i.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),j.addStyleHook.call(this),this.isHTML5&&wn.insertElements.call(this,"source",e),this.config.title=i.title,Vo.setup.call(this),this.isHTML5&&Object.keys(i).includes("tracks")&&wn.insertElements.call(this,"track",i.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&j.build.call(this),this.isHTML5&&this.media.load(),d.empty(i.previewThumbnails)||(Object.assign(this.config.previewThumbnails,i.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vn(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class jt{constructor(e,t){if(T(this,"play",()=>d.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>$e(this.media.play())),this.media.play()):null),T(this,"pause",()=>this.playing&&d.function(this.media.pause)?this.media.pause():null),T(this,"togglePlay",l=>(d.boolean(l)?l:!this.playing)?this.play():this.pause()),T(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):d.function(this.media.stop)&&this.media.stop()}),T(this,"restart",()=>{this.currentTime=0}),T(this,"rewind",l=>{this.currentTime-=d.number(l)?l:this.config.seekTime}),T(this,"forward",l=>{this.currentTime+=d.number(l)?l:this.config.seekTime}),T(this,"increaseVolume",l=>{const c=this.media.muted?0:this.volume;this.volume=c+(d.number(l)?l:0)}),T(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),T(this,"airplay",()=>{X.airplay&&this.media.webkitShowPlaybackTargetPicker()}),T(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const c=li(this.elements.container,this.config.classNames.hideControls),u=l===void 0?void 0:!l,h=B(this.elements.container,this.config.classNames.hideControls,u);if(h&&d.array(this.config.controls)&&this.config.controls.includes("settings")&&!d.empty(this.config.settings)&&_.toggleMenu.call(this,!1),h!==c){const f=h?"controlshidden":"controlsshown";P.call(this,this.media,f)}return!h}return!1}),T(this,"on",(l,c)=>{D.call(this,this.elements.container,l,c)}),T(this,"once",(l,c)=>{dn.call(this,this.elements.container,l,c)}),T(this,"off",(l,c)=>{ci(this.elements.container,l,c)}),T(this,"destroy",(l,c=!1)=>{if(!this.ready)return;const u=()=>{document.body.style.overflow="",this.embed=null,c?(Object.keys(this.elements).length&&(Me(this.elements.buttons.play),Me(this.elements.captions),Me(this.elements.controls),Me(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),d.function(l)&&l()):(yd.call(this),je.cancelRequests.call(this),ri(this.elements.original,this.elements.container),P.call(this,this.elements.original,"destroyed",!0),d.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(j.toggleNativeControls.call(this,!0),u()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&d.function(this.embed.destroy)&&this.embed.destroy(),u()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(u),setTimeout(u,200))}),T(this,"supports",l=>X.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=X.touch,this.media=e,d.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||d.nodeList(this.media)||d.array(this.media))&&(this.media=this.media[0]),this.config=Y({},zo,jt.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Sd(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",X),d.nullOrUndefined(this.media)||!d.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!X.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const s=this.media.tagName.toLowerCase();let o=null,a=null;switch(s){case"div":if(o=this.media.querySelector("iframe"),d.element(o)){if(a=Do(o.getAttribute("src")),this.provider=Ed(a.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",a.search.length){const l=["1","true"];l.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(d.empty(this.provider)||!Object.values(Ue).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=fn.video;break;case"video":case"audio":this.type=s,this.provider=Ue.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=X.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Ld(this),this.storage=new zt(this),this.media.plyr=this,d.element(this.elements.container)||(this.elements.container=A("div",{tabindex:0}),To(this.media,this.elements.container)),j.migrateStyles.call(this),j.addStyleHook.call(this),Vo.setup.call(this),this.config.debug&&D.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ee(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&j.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Bd(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>$e(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vn(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Ue.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Ue.youtube}get isVimeo(){return this.provider===Ue.vimeo}get isVideo(){return this.type===fn.video}get isAudio(){return this.type===fn.audio}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&this.currentTime===0)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=d.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return d.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=d.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;d.string(t)&&(t=Number(t)),d.number(t)||(t=this.storage.get("volume")),d.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!d.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;d.boolean(t)||(t=this.storage.get("muted")),d.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;d.number(e)&&(t=e),d.number(t)||(t=this.storage.get("speed")),d.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:s}=this;t=Fo(t,n,s),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let s=[!d.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(d.number),o=!0;if(!n.includes(s)){const a=So(n,s);this.debug.warn(`Unsupported quality option: ${s}, using ${a} instead`),s=a,o=!1}t.selected=s,this.media.quality=s,o&&this.storage.set({quality:s})}get quality(){return this.media.quality}set loop(e){const t=d.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){wn.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return d.url(e)?e:this.source}set download(e){d.url(e)&&(this.config.urls.download=e,_.setDownloadUrl.call(this))}set poster(e){this.isVideo?j.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=di(un.call(this));return d.array(e)?e.join(":"):e}set ratio(e){this.isVideo?d.string(e)&&Po(e)?(this.config.ratio=di(e),bt.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=d.boolean(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){V.toggle.call(this,e,!1)}set currentTrack(e){V.set.call(this,e,!1),V.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){V.setLanguage.call(this,e,!1)}get language(){return(V.getCurrentTrack.call(this)||{}).language}set pip(e){if(!X.pip)return;const t=d.boolean(e)?e:!this.pip;d.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?mn.active:mn.inactive),d.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return X.pip?d.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===mn.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vn(this))}static supported(e,t,n){return X.check(e,t,n)}static loadSprite(e,t){return Io(e,t)}static setup(e,t={}){let n=null;return d.string(e)?n=Array.from(document.querySelectorAll(e)):d.nodeList(e)?n=Array.from(e):d.array(e)&&(n=e.filter(d.element)),d.empty(n)?null:n.map(s=>new jt(s,t))}}jt.defaults=pd(zo);var Lu="";const Rd=i=>(r.pushScopeId("data-v-3fbadc18"),i=i(),r.popScopeId(),i),zd=["src"],Vd=["src"],Fd=Rd(()=>r.createElementVNode("track",{kind:"captions",label:"English captions",src:"/path/to/captions.vtt",srclang:"en",default:""},null,-1));var jo=M(r.defineComponent({name:"LewPlyrVideo",props:{src:{type:String,default:"https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4"}},setup(i){let e=r.ref(null),t;return r.onMounted(()=>{t=new jt(e.value,{settings:["quality","speed","loop"],controls:["play-large","play","progress","current-time","mute","volume","settings","pip","airplay","fullscreen"],keyboard:{focused:!0,global:!1}})}),r.onUnmounted(()=>{t.destroy()}),(n,s)=>(r.openBlock(),r.createElementBlock("video",{id:"player",ref_key:"playerRef",ref:e,playsinline:"",controls:"","data-poster":"/path/to/poster.jpg"},[r.createElementVNode("source",{src:i.src,type:"video/mp4"},null,8,zd),r.createElementVNode("source",{src:i.src,type:"video/webm"},null,8,Vd),r.createCommentVNode(" Captions are optional "),Fd],512))}}),[["__scopeId","data-v-3fbadc18"],["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/plyr/src/LewPlyrVideo.vue"]]),Pu="";const Hd={class:"demo-box"},jd={class:"demo-item"},Ud={class:"demo-cp"},qd={class:"hl-pre"},Wd={class:"pre-box"},Xd=["textContent"],Yd={class:"icon"};var Uo=M(r.defineComponent({name:"LewDemoBox",props:{title:{type:String,default(){return""}},tag:{type:String,default(){return""}},code:{type:String,default(){return""}}},setup(i){let e=r.ref(!1);return(t,n)=>{const s=r.resolveComponent("lew-tag"),o=r.resolveComponent("lew-title"),a=r.resolveDirective("highlight");return r.openBlock(),r.createElementBlock("div",Hd,[r.createVNode(o,{size:"16px"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(i.title)+" ",1),i.tag?(r.openBlock(),r.createBlock(s,{key:0,type:"info",style:{margin:"2px 0px 0px 5px"}},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(i.tag),1)]),_:1})):r.createCommentVNode("v-if",!0)]),_:1}),r.createElementVNode("div",jd,[r.createElementVNode("div",Ud,[r.renderSlot(t.$slots,"default")]),r.withDirectives((r.openBlock(),r.createElementBlock("div",qd,[r.createElementVNode("div",Wd,[r.createElementVNode("pre",null,[r.createElementVNode("code",{textContent:r.toDisplayString(i.code)},null,8,Xd)])])])),[[r.vShow,r.unref(e)],[a]]),r.createElementVNode("div",{class:"show-bar",onClick:n[0]||(n[0]=l=>r.isRef(e)?e.value=!r.unref(e):e=!r.unref(e))},[r.createElementVNode("div",Yd,[r.unref(e)?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(r.unref(He),{key:0,size:"20"},{default:r.withCtx(()=>[r.createVNode(r.unref(xl))]),_:1})),r.unref(e)?(r.openBlock(),r.createBlock(r.unref(He),{key:1,size:"20"},{default:r.withCtx(()=>[r.createVNode(r.unref(bl))]),_:1})):r.createCommentVNode("v-if",!0)]),r.createTextVNode(" "+r.toDisplayString(r.unref(e)?"\u5173\u95ED":"\u663E\u793A\u6E90\u7801"),1)])])])}}}),[["__file","/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/demo-box/src/LewDemoBox.vue"]]),qo=Object.freeze(Object.defineProperty({__proto__:null,LewFlex:Cn,LewSpace:Tn,LewLayout:$n,LewMark:An,LewTabs:Pn,LewSteps:On,LewBreadcrumb:Mn,LewDropdown:ks,LewInput:ji,LewFormItem:_s,LewCheckboxGroup:Cs,LewTextarea:Ts,LewRadioboxGroup:$s,LewSelect:Es,LewSwitch:Ss,LewAvatar:Ls,LewTitle:As,LewButton:ct,LewBadge:Ps,LewTag:Fs,LewAlert:Hs,LewDialog:js,LewMessage:Us,LewModal:qs,LewPopok:Ws,LewPopover:Xs,LewFancybox:ro,LewFancyImage:Ys,LewPlyrVideo:jo,LewDemoBox:Uo},Symbol.toStringTag,{value:"Module"}));let xn;var Gd={install(i){i.directive("tooltip",{mounted(e,t){let n=t.value.trigger;n=="hover"&&(n="mouseenter"),xn=Fe(e,{trigger:n||"mouseenter",content:t.value.content,animation:"shift-away-subtle",interactive:!0,appendTo:()=>document.body,placement:t.value.placement,allowHTML:t.value.allowHTML,maxWidth:250,onShow(s){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?s.popper.children[0].setAttribute("data-theme","dark"):s.popper.children[0].setAttribute("data-theme","light")}})},unmounted(){xn&&xn.destroy()}})}},Nu="",Mu="",Iu="",Bu="",Du="";const Wo=function(i){if(Wo.installed)return;Object.keys(qo).map(t=>qo[t]).forEach(t=>{t.hasOwnProperty("name")&&t.hasOwnProperty("setup")&&i.component(t.name,t)})};var Kd={install:Wo};E.LewAlert=Hs,E.LewAvatar=Ls,E.LewBadge=Ps,E.LewBreadcrumb=Mn,E.LewButton=ct,E.LewCheckboxGroup=Cs,E.LewDemoBox=Uo,E.LewDialog=js,E.LewDropdown=ks,E.LewFancyImage=Ys,E.LewFancybox=ro,E.LewFlex=Cn,E.LewFormItem=_s,E.LewInput=ji,E.LewLayout=$n,E.LewMark=An,E.LewMessage=Us,E.LewModal=qs,E.LewPlyrVideo=jo,E.LewPopok=Ws,E.LewPopover=Xs,E.LewRadioboxGroup=$s,E.LewSelect=Es,E.LewSpace=Tn,E.LewSteps=On,E.LewSwitch=Ss,E.LewTabs=Pn,E.LewTag=Fs,E.LewTextarea=Ts,E.LewTitle=As,E.LewTooltip=Gd,E.default=Kd,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|