officialblock 2.3.5 → 2.3.6

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.
@@ -313,7 +313,7 @@
313
313
  *
314
314
  * @author Feross Aboukhadijeh <https://feross.org>
315
315
  * @license MIT
316
- */var w$=function(n){return n!=null&&(Jh(n)||b$(n)||!!n._isBuffer)};function Jh(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function b$(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Jh(n.slice(0,0))}(function(){var n=_$,t=Zh.utf8,o=w$,a=Zh.bin,i=function(s,l){s.constructor==String?l&&l.encoding==="binary"?s=a.stringToBytes(s):s=t.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var r=n.bytesToWords(s),c=s.length*8,u=1732584193,g=-271733879,m=-1732584194,d=271733878,p=0;p<r.length;p++)r[p]=(r[p]<<8|r[p]>>>24)&16711935|(r[p]<<24|r[p]>>>8)&4278255360;r[c>>>5]|=128<<c%32,r[(c+64>>>9<<4)+14]=c;for(var f=i._ff,h=i._gg,C=i._hh,w=i._ii,p=0;p<r.length;p+=16){var x=u,y=g,b=m,V=d;u=f(u,g,m,d,r[p+0],7,-680876936),d=f(d,u,g,m,r[p+1],12,-389564586),m=f(m,d,u,g,r[p+2],17,606105819),g=f(g,m,d,u,r[p+3],22,-1044525330),u=f(u,g,m,d,r[p+4],7,-176418897),d=f(d,u,g,m,r[p+5],12,1200080426),m=f(m,d,u,g,r[p+6],17,-1473231341),g=f(g,m,d,u,r[p+7],22,-45705983),u=f(u,g,m,d,r[p+8],7,1770035416),d=f(d,u,g,m,r[p+9],12,-1958414417),m=f(m,d,u,g,r[p+10],17,-42063),g=f(g,m,d,u,r[p+11],22,-1990404162),u=f(u,g,m,d,r[p+12],7,1804603682),d=f(d,u,g,m,r[p+13],12,-40341101),m=f(m,d,u,g,r[p+14],17,-1502002290),g=f(g,m,d,u,r[p+15],22,1236535329),u=h(u,g,m,d,r[p+1],5,-165796510),d=h(d,u,g,m,r[p+6],9,-1069501632),m=h(m,d,u,g,r[p+11],14,643717713),g=h(g,m,d,u,r[p+0],20,-373897302),u=h(u,g,m,d,r[p+5],5,-701558691),d=h(d,u,g,m,r[p+10],9,38016083),m=h(m,d,u,g,r[p+15],14,-660478335),g=h(g,m,d,u,r[p+4],20,-405537848),u=h(u,g,m,d,r[p+9],5,568446438),d=h(d,u,g,m,r[p+14],9,-1019803690),m=h(m,d,u,g,r[p+3],14,-187363961),g=h(g,m,d,u,r[p+8],20,1163531501),u=h(u,g,m,d,r[p+13],5,-1444681467),d=h(d,u,g,m,r[p+2],9,-51403784),m=h(m,d,u,g,r[p+7],14,1735328473),g=h(g,m,d,u,r[p+12],20,-1926607734),u=C(u,g,m,d,r[p+5],4,-378558),d=C(d,u,g,m,r[p+8],11,-2022574463),m=C(m,d,u,g,r[p+11],16,1839030562),g=C(g,m,d,u,r[p+14],23,-35309556),u=C(u,g,m,d,r[p+1],4,-1530992060),d=C(d,u,g,m,r[p+4],11,1272893353),m=C(m,d,u,g,r[p+7],16,-155497632),g=C(g,m,d,u,r[p+10],23,-1094730640),u=C(u,g,m,d,r[p+13],4,681279174),d=C(d,u,g,m,r[p+0],11,-358537222),m=C(m,d,u,g,r[p+3],16,-722521979),g=C(g,m,d,u,r[p+6],23,76029189),u=C(u,g,m,d,r[p+9],4,-640364487),d=C(d,u,g,m,r[p+12],11,-421815835),m=C(m,d,u,g,r[p+15],16,530742520),g=C(g,m,d,u,r[p+2],23,-995338651),u=w(u,g,m,d,r[p+0],6,-198630844),d=w(d,u,g,m,r[p+7],10,1126891415),m=w(m,d,u,g,r[p+14],15,-1416354905),g=w(g,m,d,u,r[p+5],21,-57434055),u=w(u,g,m,d,r[p+12],6,1700485571),d=w(d,u,g,m,r[p+3],10,-1894986606),m=w(m,d,u,g,r[p+10],15,-1051523),g=w(g,m,d,u,r[p+1],21,-2054922799),u=w(u,g,m,d,r[p+8],6,1873313359),d=w(d,u,g,m,r[p+15],10,-30611744),m=w(m,d,u,g,r[p+6],15,-1560198380),g=w(g,m,d,u,r[p+13],21,1309151649),u=w(u,g,m,d,r[p+4],6,-145523070),d=w(d,u,g,m,r[p+11],10,-1120210379),m=w(m,d,u,g,r[p+2],15,718787259),g=w(g,m,d,u,r[p+9],21,-343485551),u=u+x>>>0,g=g+y>>>0,m=m+b>>>0,d=d+V>>>0}return n.endian([u,g,m,d])};i._ff=function(s,l,r,c,u,g,m){var d=s+(l&r|~l&c)+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._gg=function(s,l,r,c,u,g,m){var d=s+(l&c|r&~c)+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._hh=function(s,l,r,c,u,g,m){var d=s+(l^r^c)+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._ii=function(s,l,r,c,u,g,m){var d=s+(r^(l|~c))+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._blocksize=16,i._digestsize=16,Kh.exports=function(s,l){if(s==null)throw new Error("Illegal argument "+s);var r=n.wordsToBytes(i(s,l));return l&&l.asBytes?r:l&&l.asString?a.bytesToString(r):n.bytesToHex(r)}})();var C$=Kh.exports;const V$=Ua(C$),x$={class:"setting-content"},k$={class:"setting-header flex items-center"},E$={class:"setting-header flex items-center"},T$={class:"setting-header flex items-center"},N$={class:"setting-header flex items-center"},S$={class:"setting-header flex items-center"},B$={class:"setting-header flex items-center"},P$=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",x$,[e.createElementVNode("div",k$,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=u=>n.data.onlyShowPc=u)},null,8,["modelValue"])]),e.createElementVNode("div",E$,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"表单名称",-1)),e.createVNode(r,{modelValue:n.data.data.title,"onUpdate:modelValue":s[1]||(s[1]=u=>n.data.data.title=u),placeholder:"请输入表单名称"},null,8,["modelValue"])]),e.createElementVNode("div",T$,[s[8]||(s[8]=e.createElementVNode("span",{class:"header-title"},"Event Code (Key)",-1)),e.createVNode(r,{modelValue:n.data.data.event_name,"onUpdate:modelValue":s[2]||(s[2]=u=>n.data.data.event_name=u),placeholder:"请输入Event Code (Key)"},null,8,["modelValue"])]),e.createElementVNode("div",N$,[s[9]||(s[9]=e.createElementVNode("span",{class:"header-title"},"同意复选框文本",-1)),e.createVNode(r,{modelValue:n.data.data.checkText,"onUpdate:modelValue":s[3]||(s[3]=u=>n.data.data.checkText=u),placeholder:"请输入同意复选框文本"},null,8,["modelValue"])]),e.createElementVNode("div",S$,[s[10]||(s[10]=e.createElementVNode("span",{class:"header-title"},"同意通知",-1)),e.createVNode(r,{modelValue:n.data.data.notice,"onUpdate:modelValue":s[4]||(s[4]=u=>n.data.data.notice=u),placeholder:"请输入同意通知"},null,8,["modelValue"])]),e.createElementVNode("div",B$,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"提交api",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[5]||(s[5]=u=>n.data.api=u),placeholder:"请输入提交api"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-cb758cdc"]]),D$=["innerHTML"],$$={class:"form-input-group"},L$=["placeholder","value","onInput"],A$={key:0,class:"input-error"},ef=J(e.defineComponent({name:"FormInput",__name:"index",props:{value:{default:()=>[]},line:{default:1},title:{default:""},placeholder:{default:""},styleType:{default:""},optional:{type:Boolean,default:!1},componentKey:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref([]),l=e.computed({get(){return a.value||new Array(a.line)},set(u){i("updateValue",u),e.nextTick(r)}}),r=()=>{if(a.optional)return;const u=l.value.some(m=>!!m),g=a.componentKey??"tempKey";!u&&s.value.indexOf(g)<0&&s.value.push(g),u&&s.value.indexOf(g)>-1&&s.value.splice(s.value.indexOf(g),1),i("updateError",{key:a.componentKey,isPass:u})},c=(u,g)=>{const m=g.target,d=JSON.parse(JSON.stringify(l.value));d.splice(u,1,m.value),l.value=d};return t({checkError:r}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input",{"--is-tight":n.styleType=="2"}])},[e.createElementVNode("div",{class:"tx-btn text-blue-dark mb-1",innerHTML:n.title},null,8,D$),e.createElementVNode("div",$$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.line,(m,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`input-${d}`},[e.createElementVNode("input",{class:e.normalizeClass(["default-input",{"has-error":s.value.length>0&&d==0}]),type:"text",placeholder:d==0?n.placeholder:"请输入",value:l.value[d],onInput:p=>c(d,p)},null,42,L$),d==0?(e.openBlock(),e.createElementBlock("div",A$,"此为必填项")):e.createCommentVNode("",!0)],64))),128))])],2))}}),[["__scopeId","data-v-c52c5e09"]]),I$={class:"tx-btn text-blue-dark mb-1"},v$=["placeholder"],M$={class:"form-select__menu"},O$={class:"form-select__list"},U$=["onClick"],R$={class:"input-error"},F$=J({__name:"index",props:{options:{type:Array,default:()=>[]},value:{type:String,default:""},title:{type:String,default:""},optionPlaceholder:{type:String,default:"请选择"},error:{type:Object,default:null},isEmptyFirst:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},componentKey:{type:String,default:null}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o;e.ref(Date.now());const s=e.ref(!1),l=e.ref([]),r=e.ref(null),c=e.computed({get(){return a.options.some(d=>d.value==a.value)?a.value:""},set(d){i("updateValue",d),u()}});function u(){if(a.optional)return;const d=c.value,p=a.componentKey??"tempKey",f=l.value.indexOf(p);!d&&f<0&&l.value.push(p),d&&f>-1&&l.value.splice(f,1),i("updateError",{key:a.componentKey,isPass:!!d})}function g(d){c.value=d,s.value=!1}function m(d){r.value&&!r.value.contains(d.target)&&(s.value=!1)}return e.onMounted(()=>{!c.value&&!a.isEmptyFirst&&a.options&&a.options[0]&&(i("updateValue",a.options[0].value),u()),document.addEventListener("click",m)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",m)}),t({checkError:u}),(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:"form-select",ref_key:"selectRef",ref:r},[e.createElementVNode("div",I$,e.toDisplayString(n.title),1),e.createElementVNode("div",{class:e.normalizeClass(["form-select__select",{"is-active":s.value,"has-error":l.value.length>0&&!n.optional}]),onClick:p[1]||(p[1]=f=>s.value=!s.value)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"form-select__btn",placeholder:n.optionPlaceholder,"onUpdate:modelValue":p[0]||(p[0]=f=>c.value=f),readonly:""},null,8,v$),[[e.vModelText,c.value]]),e.createElementVNode("div",M$,[e.createVNode(di,null,{default:e.withCtx(()=>[e.createElementVNode("ul",O$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,f=>(e.openBlock(),e.createElementBlock("li",{class:"form-select__option",key:f.key,onClick:h=>g(f.value)},e.toDisplayString(f.name),9,U$))),128))])]),_:1})])],2),e.withDirectives(e.createElementVNode("div",R$,"此为必填项",512),[[e.vShow,!n.optional]])],512))}},[["__scopeId","data-v-c2a92ed3"]]),H$={class:"tx-btn text-blue-dark mb-1"},j$=["onClick"],z$={class:"option-label text-teal"},q$={class:"option-name text-black"},W$={key:0,class:"input-error"},G$={key:1,class:"input-error"},X$=J(e.defineComponent({name:"FormPhone",__name:"index",props:{value:{default:()=>({})},title:{default:""},error:{default:()=>({})},optional:{type:Boolean,default:!1},componentKey:{default:""},host:{default:""},locale:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref(!1),l=e.ref(!1),r=e.ref([]),c=e.ref([]),u=e.ref(null),g=e.computed(()=>c.value),m=e.computed({get(){var w;return((w=a.value)==null?void 0:w.code)??""},set(w){i("updateValue",{code:w,number:d.value??""})}}),d=e.computed({get(){var w;return((w=a.value)==null?void 0:w.number)??""},set(w){i("updateValue",{code:m.value,number:w})}}),p=w=>/^[\d\s\-\(\)]+$/.test(w)&&w.replace(/\D/g,"").length>=7,f=()=>{if(a.optional)return;const w="myNumber";e.nextTick(()=>{const x=p(d.value);console.log("isValid",x);const y=d.value;console.log("numberValue",y),(!y||!x)&&r.value.indexOf(w)<0&&r.value.push(w),y&&x&&r.value.indexOf(w)>-1&&r.value.splice(r.value.indexOf(w),1),i("updateError",{key:a.componentKey,isPass:r.value.length<=0})})};t({checkError:f});const h=async()=>{try{const w={params:{host:a.host,langCode:a.locale}},x="/country/list",{data:y}=await zE.get(x,w);c.value=y.data.map(b=>({...b,key:b.dial,label:b.country,value:b.dial,name:`+${b.dial}`})),!m.value&&c.value.length>0&&(m.value=c.value[0].value)}catch(w){console.error("Failed to fetch country data:",w)}},C=w=>{u.value&&!u.value.contains(w.target)&&(s.value=!1)};return e.onMounted(()=>{h(),document.addEventListener("click",C)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C)}),(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:"form-phone",ref_key:"phoneRef",ref:u},[e.createElementVNode("div",H$,e.toDisplayString(n.title),1),e.createElementVNode("div",{class:e.normalizeClass(["form-phone-wrapper",[{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]])},[e.createElementVNode("div",{class:"form-select",onClick:x[1]||(x[1]=y=>s.value=!s.value)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:e.normalizeClass(["form-select-btn",[{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]]),"onUpdate:modelValue":x[0]||(x[0]=y=>m.value=y),readonly:""},null,2),[[e.vModelText,m.value]])]),e.createElementVNode("div",{class:"form-number",onClick:x[5]||(x[5]=y=>s.value=!1)},[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass([{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]),type:"text","onUpdate:modelValue":x[2]||(x[2]=y=>d.value=y),placeholder:"12345678",onChange:f,onFocus:x[3]||(x[3]=y=>l.value=!0),onBlur:x[4]||(x[4]=y=>l.value=!1)},null,34),[[e.vModelText,d.value]])]),e.createElementVNode("div",{class:e.normalizeClass(["form-phone-select-menu",[{"is-active":s.value}]])},[e.createVNode(di,null,{default:e.withCtx(()=>[e.createElementVNode("ul",{class:"form-select-list",onClick:x[6]||(x[6]=y=>s.value=!s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,y=>(e.openBlock(),e.createElementBlock("li",{class:"form-select-option flex-between",key:y.key,onClick:b=>m.value=y.value},[e.createElementVNode("div",z$,e.toDisplayString(y.label),1),e.createElementVNode("div",q$,e.toDisplayString(y.name),1)],8,j$))),128))])]),_:1})],2)],2),d.value?(e.openBlock(),e.createElementBlock("div",W$,"请输入正确的格式")):(e.openBlock(),e.createElementBlock("div",G$,e.toDisplayString(n.error.errorMsg),1))],512))}}),[["__scopeId","data-v-3596449b"]]),Y$={class:"form-email"},K$={class:"tx-btn text-blue-dark mb-1"},Q$={class:"form-email-input"},Z$={key:0,class:"input-error"},J$={key:1,class:"input-error"},eL=J(e.defineComponent({name:"FormEmail",__name:"index",props:{value:{default:""},title:{default:""},componentKey:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref([]),l=e.computed({get(){return a.value},set(u){i("updateValue",u)}}),r=u=>{const g=/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;return!!u.match(g)},c=()=>{const u="myNumber";e.nextTick(()=>{const g=r(l.value);!g&&s.value.indexOf(u)<0&&s.value.push(u),g&&s.value.indexOf(u)>-1&&s.value.splice(s.value.indexOf(u),1),i("updateError",{key:a.componentKey,isPass:s.value.length<=0})})};return t({checkError:c}),(u,g)=>(e.openBlock(),e.createElementBlock("div",Y$,[e.createElementVNode("div",K$,e.toDisplayString(n.title),1),e.createElementVNode("div",Q$,[e.withDirectives(e.createElementVNode("input",{type:"email",placeholder:"example@yourmail.com","onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),class:e.normalizeClass(["default-input",{"has-error":s.value.length>0}]),onChange:c},null,34),[[e.vModelText,l.value]]),l.value?(e.openBlock(),e.createElementBlock("div",Z$,"请输入正确的格式")):(e.openBlock(),e.createElementBlock("div",J$,"此为必填项"))])]))}}),[["__scopeId","data-v-9e818ea4"]]),tL={key:"loading",class:"btn-submit-wrapper"},nL={key:"success",class:"btn-submit-wrapper"},oL={key:"fail",class:"btn-submit-wrapper"},aL={key:"default",class:"btn-submit-wrapper"},iL={class:"btn-submit-text"},sL=J(e.defineComponent({name:"BtnSubmit",__name:"index",props:{text:{default:"Button"},isLoading:{type:Boolean,default:!1},isSuccess:{type:Boolean,default:!1},isFail:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["btn-submit btn-primary w-100 size-normal",{"is-fail":n.isFail}]),type:"button"},[e.createVNode(e.Transition,{name:"submit-btn-label",mode:"out-in"},{default:e.withCtx(()=>[n.isLoading?(e.openBlock(),e.createElementBlock("div",tL,[...o[0]||(o[0]=[e.createElementVNode("div",{class:"spinner"},null,-1)])])):n.isSuccess?(e.openBlock(),e.createElementBlock("div",nL,[...o[1]||(o[1]=[e.createElementVNode("div",{class:"btn-submit-text"}," 提交成功 ",-1)])])):n.isFail?(e.openBlock(),e.createElementBlock("div",oL,[...o[2]||(o[2]=[e.createElementVNode("div",{class:"btn-submit-text"}," 提交失败 ",-1)])])):(e.openBlock(),e.createElementBlock("div",aL,[e.createElementVNode("div",iL,e.toDisplayString(n.text),1),o[3]||(o[3]=e.createElementVNode("span",{class:"btn-submit-icon"},null,-1))]))]),_:1})],2))}}),[["__scopeId","data-v-da92fddf"]]),lL={key:0},rL={key:1,class:"register-form-container"},dL={key:0,class:"register-form-wrapper"},cL={class:"register-form-title mb-3"},uL={class:"row mb-6"},mL={class:"col col-12 col-md-6"},pL={class:"col col-12 col-md-6"},hL={class:"other-col-temp col col-12 col-md-6"},fL={class:"col col-12 col-md-6"},gL={class:"col col-12 col-md-6"},yL={class:"col col-12 col-md-6"},_L={class:"col col-12"},wL={class:"register-form-btn mb-6"},bL=["innerHTML"],Yr=J(e.defineComponent({name:"RegisterForm",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var O,H;if(o.modelValue&&o.modelValue.data)return;const q={id:((O=o.modelValue)==null?void 0:O.id)||F(),type:"RegisterForm",onlyShowPc:!1,data:{title:"注册表单",event_name:"12",checkText:"我同意接收来自官方的直接营销信息",notice:"注意:请勿在表单中填写任何个人身份信息,如身份证号、护照号等。"},api:((H=o.modelValue)==null?void 0:H.api)||"/event-registration/submit"};a("update:modelValue",q)},s=e.computed(()=>{var q;return o.isPreview?!((q=o.modelValue)!=null&&q.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=q=>{a("handlePaste",q)};i();const m=e.ref({name:[],youare:"",other_person_type:"",number:null,email:"",school_or_organisation_name:[],opt_out_direct_marketing:!1}),d=e.ref([]),p=e.ref(!0),f=e.ref(!1),h=e.ref(!1),C=e.ref(!1),w=e.ref(null),x=e.ref(null),y=e.ref(null),b=e.ref(null),V=e.ref(null),T=e.computed(()=>{var q;return((q=o.componentProps)==null?void 0:q.event_date)??""}),k=e.computed(()=>{var q;return((q=o.componentProps)==null?void 0:q.optionsYouare)??[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]}),S=e.computed(()=>{var O,H,R,M,W;const q={host:o.host,langCode:o.locale,eventCode:(H=(O=o.modelValue)==null?void 0:O.data)==null?void 0:H.event_name,name:(R=m.value.name)==null?void 0:R.join(" "),personType:(M=k.value.find(Z=>Z.value===m.value.youare))==null?void 0:M.key,otherPersonType:m.value.other_person_type,contactNumber:m.value.number?`+${m.value.number.code}${m.value.number.number}`:"",email:m.value.email,schoolOrOrganisationName:(W=m.value.school_or_organisation_name)==null?void 0:W.join(","),optOutDirectMarketing:+m.value.opt_out_direct_marketing,eventDate:T.value,timestamp:Date.now()};return Object.keys(q).forEach(Z=>{q[Z]||delete q[Z]}),q}),D=(q,O)=>{m.value[q]=O},N=({key:q,isPass:O})=>{console.log("updateErrorFromInput",q,O),!O&&d.value.indexOf(q)<0&&d.value.push(q),O&&d.value.indexOf(q)>-1&&d.value.splice(d.value.indexOf(q),1)},A=()=>{if(f.value||h.value||C.value)return;[w.value,x.value,y.value,b.value,V.value].forEach(O=>{var H;(H=O==null?void 0:O.checkError)==null||H.call(O)}),e.nextTick(()=>{d.value.length>0||I()})},$=q=>{const O=q||S.value,H={};for(const[W,Z]of Object.entries(O))Z!==""&&Z!==null&&Z!==void 0&&(H[W]=Z);const M=Object.keys(H).sort().map(W=>`${H[W]}`).join("");return V$(M)},I=async()=>{var H;f.value=!0;const q=$(S.value),O=JSON.stringify({...S.value,sign:q});try{const{data:R}=await en.post((H=o.modelValue)==null?void 0:H.api,O),M=R.data.ref_no;U(),a("handleClick",`/thank-you?ref=${M}`)}catch(R){console.log(R),Y()}finally{f.value=!1}},U=()=>{m.value={name:[],youare:"",other_person_type:"",number:null,email:"",school_or_organisation_name:[],opt_out_direct_marketing:!1},f.value=!1,h.value=!0,setTimeout(()=>{h.value=!1,G()},2500)},Y=()=>{f.value=!1,C.value=!0,setTimeout(()=>{C.value=!1},3500)},G=()=>{p.value=!1,e.nextTick(()=>{p.value=!0})};return(q,O)=>{var H,R,M,W,Z,ie,ge,Le;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"register-form",onMouseenter:O[9]||(O[9]=ae=>l.value=!0),onMouseleave:O[10]||(O[10]=ae=>l.value=!1)},[n.host?(e.openBlock(),e.createElementBlock("div",rL,[p.value?(e.openBlock(),e.createElementBlock("div",dL,[e.createElementVNode("div",cL,e.toDisplayString((R=(H=n.modelValue)==null?void 0:H.data)==null?void 0:R.title),1),e.createElementVNode("div",uL,[e.createElementVNode("div",mL,[e.createVNode(ef,{ref_key:"field1",ref:w,class:"mb-0",componentKey:"name",title:"姓名",placeholder:"你的名字",value:m.value.name,onUpdateValue:O[0]||(O[0]=ae=>D("name",ae)),onUpdateError:N},null,8,["value"])]),e.createElementVNode("div",pL,[e.createVNode(F$,{ref_key:"field2",ref:x,class:"mb-0",componentKey:"youare",title:"你是",options:k.value,placeholder:"Select",value:m.value.youare,optional:!m.value.youare,onUpdateValue:O[1]||(O[1]=ae=>D("youare",ae)),onUpdateError:N},null,8,["options","value","optional"])]),e.withDirectives(e.createElementVNode("div",hL,null,512),[[e.vShow,S.value.person_type=="others"]]),e.withDirectives(e.createElementVNode("div",fL,[e.withDirectives(e.createElementVNode("input",{type:"text",class:"default-input","onUpdate:modelValue":O[2]||(O[2]=ae=>m.value.other_person_type=ae),placeholder:"其他"},null,512),[[e.vModelText,m.value.other_person_type]])],512),[[e.vShow,S.value.person_type=="others"]]),e.createElementVNode("div",gL,[e.createVNode(X$,{ref_key:"field3",ref:y,class:"mb-0",componentKey:"number",title:"联系电话",value:m.value.number,error:{errorMsg:"此为必填项"},host:n.host,locale:n.locale,onUpdateValue:O[3]||(O[3]=ae=>D("number",ae)),onUpdateError:N},null,8,["value","host","locale"])]),e.createElementVNode("div",yL,[e.createVNode(eL,{ref_key:"field4",ref:b,class:"mb-0",componentKey:"email",title:"电邮",placeholder:"example@yourmail.com",value:m.value.email,onUpdateValue:O[4]||(O[4]=ae=>D("email",ae)),onUpdateError:N},null,8,["value"])]),e.createElementVNode("div",_L,[e.createVNode(ef,{ref_key:"field5",ref:V,class:"mb-0",componentKey:"school_or_organisation_name",title:"学校名称/组织",placeholder:"学校名称/组织",value:m.value.school_or_organisation_name,onUpdateValue:O[5]||(O[5]=ae=>D("school_or_organisation_name",ae)),onUpdateError:N},null,8,["value"])])]),e.createElementVNode("div",wL,[e.createVNode(sL,{text:"提交",onClick:A,isLoading:f.value,isSuccess:h.value,isFail:C.value},null,8,["isLoading","isSuccess","isFail"])]),e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"default-checkbox",id:"register-form-checkbox","onUpdate:modelValue":O[6]||(O[6]=ae=>m.value.opt_out_direct_marketing=ae)},null,512),[[e.vModelCheckbox,m.value.opt_out_direct_marketing]]),e.createElementVNode("label",{for:"register-form-checkbox",innerHTML:(W=(M=n.modelValue)==null?void 0:M.data)==null?void 0:W.checkText},null,8,bL)]),e.withDirectives(e.createElementVNode("div",{class:"register-form-notice mt-3"},e.toDisplayString((ie=(Z=n.modelValue)==null?void 0:Z.data)==null?void 0:ie.notice),513),[[e.vShow,(Le=(ge=n.modelValue)==null?void 0:ge.data)==null?void 0:Le.notice]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("p",lL,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":O[7]||(O[7]=ae=>l.value=ae),onHandleEdit:O[8]||(O[8]=ae=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P$,{key:1,show:r.value,"onUpdate:show":O[11]||(O[11]=ae=>r.value=ae),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-408a7930"]]),CL=Object.freeze(Object.defineProperty({__proto__:null,default:Yr},Symbol.toStringTag,{value:"Module"})),VL={class:"setting-content"},xL={class:"setting-header flex items-center"},kL={class:"setting-body"},EL={class:"setting-item"},TL={class:"btn-group"},NL={key:0,class:"drag-handle"},SL=["src"],BL={class:"item-uplaod flex items-center"},PL=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=()=>{if(l.data.data.length>=3){alert("最多只能添加3个");return}l.data.data.push({id:F(),title:"",subtitle:"",url:"",imgSrc:""})},g=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("icon-drag-arrow"),h=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-input"),w=e.resolveComponent("icon-plus"),x=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(x,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",VL,[e.createElementVNode("div",xL,[d[5]||(d[5]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=y=>n.data.onlyShowPc=y)},null,8,["modelValue"])]),e.createElementVNode("div",kL,[e.createElementVNode("div",EL,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[1]||(d[1]=y=>n.data.data=y),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[2]||(d[2]=y=>a.value=!0),onEnd:d[3]||(d[3]=y=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:y})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:y.id},[e.createElementVNode("div",TL,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",NL,[e.createVNode(f,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(h,{class:"btn-delete",onClick:b=>g(y.id)},null,8,["onClick"])]),d[6]||(d[6]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(C,{modelValue:y.title,"onUpdate:modelValue":b=>y.title=b,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[7]||(d[7]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(C,{modelValue:y.subtitle,"onUpdate:modelValue":b=>y.subtitle=b,placeholder:"请输入文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[8]||(d[8]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(C,{modelValue:y.url,"onUpdate:modelValue":b=>y.url=b,placeholder:"请输入链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[9]||(d[9]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:y.imgSrc},null,8,SL),e.createElementVNode("div",BL,[e.createVNode(C,{modelValue:y.imgSrc,"onUpdate:modelValue":b=>y.imgSrc=b,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:y.imgSrc,"onUpdate:modelValue":b=>y.imgSrc=b,name:`GalleryBlock_img_${y.id}`},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[4]||(d[4]=y=>u())},[e.createVNode(w),d[10]||(d[10]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-5c2714e9"]]),DL={class:"gallery-block-wrapper"},$L=["onClick"],LL={class:"gallery-block-image-content"},AL=["innerHTML"],IL=["innerHTML"],vL={class:"gallery-block-image-link"},ML={class:"circle-link circle-link--light"},OL=["href"],UL=["onClick"],Kr=J(e.defineComponent({name:"GalleryBlock",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"GalleryBlock",onlyShowPc:!1,data:[{id:F(),title:"标题",subtitle:"副标题",url:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"},{id:F(),title:"标题",subtitle:"副标题",url:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=d=>{a("handlePaste",d)};i();const m=d=>{if(!(!d.url||!o.isPreview)){if(d.url.includes("http")){const p=window.open(d.url,"_blank","noopener,noreferrer");p&&(p.opener=null);return}a("handleClick",d)}};return(d,p)=>{var f,h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-block",onMouseenter:p[2]||(p[2]=w=>l.value=!0),onMouseleave:p[3]||(p[3]=w=>l.value=!1)},[e.createElementVNode("div",DL,[e.createElementVNode("div",{class:e.normalizeClass(["gallery-block-row",`gallery-block-row-cols-1 gallery-block-row-cols-md-${(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.length}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=n.modelValue)==null?void 0:C.data,w=>(e.openBlock(),e.createElementBlock("div",{class:"gallery-block-col",key:w.id},[e.createElementVNode("div",{class:"gallery-block-image-block",onClick:x=>m(w)},[e.createElementVNode("div",{class:e.normalizeClass(["gallery-block-image-bg",{"gallery-block-image-bg-has-subtitle":w.subtitle}]),style:e.normalizeStyle({"--bg-image":`url('${w.imgSrc}')`})},null,6),e.createElementVNode("div",LL,[p[7]||(p[7]=e.createElementVNode("div",{class:"gallery-block-image-border"},null,-1)),e.createElementVNode("div",{class:"gallery-block-image-title",innerHTML:w.title},null,8,AL),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{class:"gallery-block-image-subtitle",innerHTML:w.subtitle},null,8,IL)],512),[[e.vShow,w.subtitle]]),e.createElementVNode("div",vL,[e.createElementVNode("div",ML,[w.url&&w.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:w.url,class:"nuxt-link-exact-active nuxt-link-active"},[...p[5]||(p[5]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1)])],8,OL)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:x=>m(w),class:"nuxt-link-exact-active nuxt-link-active"},[...p[6]||(p[6]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1)])],8,UL))])])])],8,$L)]))),128))],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=w=>l.value=w),onHandleEdit:p[1]||(p[1]=w=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PL,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=w=>r.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-682e436d"]]),RL=Object.freeze(Object.defineProperty({__proto__:null,default:Kr},Symbol.toStringTag,{value:"Module"})),FL={class:"seting-box"},HL={class:"setting-header flex items-center"},jL={key:0},zL={class:"draggable_box"},qL={class:"drag_top_box"},WL=["onClick"],GL={class:"line-clamp-2"},XL=["src"],YL={class:"item-uplaod flex items-center"},KL={class:"btn_group"},QL=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=f=>{const h={key:F(8),title:"新文章",description:"这是一个新的文章描述",image:"https://picsum.photos/800/600",date:new Date().toISOString().split("T")[0],label:"new",labelName:"新标签",category:"new"};f==="prepend"?a.data.list.unshift(h):f==="append"&&a.data.list.push(h)},s=f=>r.value.has(f.key),l=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.ref(new Set),c=f=>{a.data.list=a.data.list.filter(h=>h.key!==f)},u=f=>{if(!r.value.has(f.key))r.value.add(f.key);else{const h=[];a.data.list.forEach(C=>{C.key&&h.push(C.key)}),r.value=new Set(h),r.value.delete(f.key)}},g=e.ref(!1);e.watch(()=>{var f;return(f=a.data)==null?void 0:f.list},f=>{if(f&&Array.isArray(f)&&!g.value){g.value=!0;const h=f.map(C=>C.key);r.value=new Set(h)}},{immediate:!0,deep:!0});const m=t,d=e.ref(!1),p=()=>{m("update:show",!1)};return(f,h)=>{const C=e.resolveComponent("a-switch"),w=e.resolveComponent("a-option"),x=e.resolveComponent("a-select"),y=e.resolveComponent("a-input"),b=e.resolveComponent("icon-drag-dot"),V=e.resolveComponent("icon-drag-arrow"),T=e.resolveComponent("icon-delete"),k=e.resolveComponent("a-date-picker"),S=e.resolveComponent("a-button"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:p,unmountOnClose:""},{title:e.withCtx(()=>{var N;return[e.createTextVNode(e.toDisplayString((N=n.data)==null?void 0:N.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",FL,[e.createElementVNode("div",HL,[h[8]||(h[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(C,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),h[22]||(h[22]=e.createElementVNode("p",{class:"item-title"},"内容宽度",-1)),e.createVNode(x,{style:{width:"320px",background:"#ffffff",marginBottom:"20px"},modelValue:n.data.width,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.width=N),placeholder:"请选择宽度..."},{default:e.withCtx(()=>[e.createVNode(w,{value:"container-content-800"},{default:e.withCtx(()=>[...h[9]||(h[9]=[e.createTextVNode("小 ",-1)])]),_:1}),e.createVNode(w,{value:"container-content-952"},{default:e.withCtx(()=>[...h[10]||(h[10]=[e.createTextVNode("默认 ",-1)])]),_:1}),e.createVNode(w,{value:"container-content-1208"},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(w,{value:"container-content-1920"},{default:e.withCtx(()=>[...h[12]||(h[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),n.data.getDataType==="all"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[h[13]||(h[13]=e.createElementVNode("p",{class:"item-title"},"您希望展示的文章类别标签",-1)),e.createVNode(y,{modelValue:n.data.getDataType,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.getDataType=N)},null,8,["modelValue"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.data.list.length===0?(e.openBlock(),e.createElementBlock("div",jL,"暂无数据")):e.createCommentVNode("",!0),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":h[3]||(h[3]=N=>n.data.list=N),"component-data":{tag:"div",type:"transition-group",name:d.value?null:"flip-list"}},l.value,{disabled:!1,onStart:h[4]||(h[4]=N=>d.value=!0),onEnd:h[5]||(h[5]=N=>d.value=!1),"item-key":"key"}),{item:e.withCtx(({element:N,index:A})=>[e.createElementVNode("div",zL,[e.createElementVNode("div",qL,[e.createElementVNode("div",{style:{display:"flex","align-items":"center"},onClick:$=>u(N)},[e.createVNode(b,{style:{"margin-right":"10px"}}),e.createElementVNode("span",GL,e.toDisplayString(N.title),1)],8,WL),e.createElementVNode("div",null,[e.createVNode(V,{class:"icon_drag"}),e.createVNode(T,{class:"btn-delete",onClick:e.withModifiers($=>c(N.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[h[14]||(h[14]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.title,"onUpdate:modelValue":$=>N.title=$},null,8,["modelValue","onUpdate:modelValue"]),h[15]||(h[15]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.image},null,8,XL),e.createElementVNode("div",YL,[e.createVNode(y,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,placeholder:"请输入图片链接","allow-clear":"",style:{border:"1px solid #c0c0c0"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,name:`CardCarouselArticles_${N.key}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),h[16]||(h[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.link,"onUpdate:modelValue":$=>N.link=$},null,8,["modelValue","onUpdate:modelValue"]),h[17]||(h[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标签名称",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.labelName,"onUpdate:modelValue":$=>N.labelName=$},null,8,["modelValue","onUpdate:modelValue"]),h[18]||(h[18]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"描述",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.desc,"onUpdate:modelValue":$=>N.desc=$},null,8,["modelValue","onUpdate:modelValue"]),h[19]||(h[19]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"日期",-1)),e.createVNode(k,{style:{width:"200px"},modelValue:N.date,"onUpdate:modelValue":$=>N.date=$},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!s(N)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createElementVNode("div",KL,[e.createVNode(S,{onClick:h[6]||(h[6]=N=>i("prepend")),type:"primary",style:{"margin-right":"20px"}},{default:e.withCtx(()=>[...h[20]||(h[20]=[e.createTextVNode("前置",-1)])]),_:1}),e.createVNode(S,{onClick:h[7]||(h[7]=N=>i("append")),type:"primary"},{default:e.withCtx(()=>[...h[21]||(h[21]=[e.createTextVNode("追加",-1)])]),_:1})])],64))])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-c52de08a"]]),ZL={key:0},JL={class:"slide-content"},eA={class:"mt-10 mt-md-12"},tA={key:1},nA={class:"row row-cols-1 row-cols-md-3 row-cols-lg-4 justify-content-center"},Qr=J(e.defineComponent({name:"CardCarouselArticles",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},c=M=>{a("handlePaste",M)},u=()=>{var W,Z,ie,ge;const M={id:((W=o.modelValue)==null?void 0:W.id)||F(),type:"CardCarouselArticles",onlyShowPc:!1,bgColor:((Z=o.modelValue)==null?void 0:Z.bgColor)||"#f8f9fa",width:((ie=o.modelValue)==null?void 0:ie.width)||"container-content-952",isLoop:((ge=o.modelValue)==null?void 0:ge.isLoop)??!0,getDataType:!1,list:[{key:"article-001",title:"探索人工智能的未来发展趋势",desc:"人工智能技术正在快速发展,从机器学习到深度学习,从自然语言处理到计算机视觉,AI正在改变我们的生活方式。本文将深入探讨AI技术的最新进展和未来发展方向。",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图",date:"2024-01-15",time:"2024-01-15T10:30:00Z",labelName:"科技前沿",category:"technology",link:"/articles/ai-future-trends"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"}]};a("update:modelValue",M)},g=e.computed(()=>{var M;return o.isPreview?!((M=o.modelValue)!=null&&M.onlyShowPc)||!D():!0}),m=e.ref([]),d=e.ref(0),p=e.ref([]),f=e.ref(0),h=e.ref(!1),C=e.ref(!0),w=e.ref(null),x=e.ref(1024),y=[ut.Navigation,ut.Pagination,ut.Autoplay],b=e.ref({centeredSlides:!1,speed:600,slidesPerView:1,slidesPerGroup:1,spaceBetween:16,shortSwipes:!0,longSwipesRatio:.3,loop:!0,autoHeight:!1,breakpoints:{768:{slidesPerView:3,slidesPerGroup:1,spaceBetween:16,shortSwipes:!1},1024:{slidesPerView:4,slidesPerGroup:1,spaceBetween:16}}}),V=()=>{x.value=typeof window<"u"?window.innerWidth:1024};e.onMounted(()=>{V(),typeof window<"u"&&window.addEventListener("resize",V)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",V)}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.classes)??null}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.style)??null});const T=e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.type)??"school"});e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.width)??null});const k=e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.isLoop)??!0}),S=e.computed(()=>{var M,W;return(M=o.modelValue)!=null&&M.getDataType?p.value:((W=o.modelValue)==null?void 0:W.list)||[]});e.computed(()=>x.value>=1024),e.computed(()=>x.value>=768&&x.value<1024);const D=e.computed(()=>x.value<768);e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.data)||[]}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.title)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.subtitle)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.description)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.link)||null}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.linkText)||"View More"});const N=e.computed(()=>x.value>=768?x.value>=1024?4:3:1);e.computed(()=>x.value<768?1:3);const A=e.computed(()=>{var M;return(M=o.modelValue)!=null&&M.getDataType?f.value:(console.log("总页数======",S.value.length),S.value.length)}),$=e.computed(()=>S.value.length>3&&x.value>=1024||S.value.length>2&&x.value>=768&&x.value<1024||x.value<768),I=async()=>{var M;if(!(!o.axiosInstance||!((M=o.modelValue)!=null&&M.apiEndpoint)))try{return(await o.axiosInstance.get(o.modelValue.apiEndpoint)).data}catch(W){return console.error("Error fetching data:",W),null}},U=M=>{d.value=M.realIndex},Y=M=>{w.value=M,h.value||e.nextTick(()=>{setTimeout(R,100)})},G=M=>{var W;(W=w.value)==null||W.slideToLoop(M,600)},q=()=>{var M;(M=w.value)==null||M.slidePrev(600)},O=()=>{var M;(M=w.value)==null||M.slideNext(600)},H=(M,W)=>{T.value=="profile"&&m.value[W].openLightbox()},R=()=>{C.value=!1,e.nextTick(()=>{var M;C.value=!0,(M=w.value)==null||M.destroy(),e.nextTick(()=>{var W;(W=w.value)==null||W.update(),h.value=!0})})};return e.onMounted(async()=>{var M;(M=o.modelValue)!=null&&M.autoFetch&&await I()}),u(),(M,W)=>{var Z,ie;return e.openBlock(),e.createElementBlock(e.Fragment,null,[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(Z=n.modelValue)==null?void 0:Z.bgColor}]),class:"cardcarouselarticles_container",onMouseenter:W[2]||(W[2]=ge=>i.value=!0),onMouseleave:W[3]||(W[3]=ge=>i.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-carousel__wrapper",[((ie=n.modelValue)==null?void 0:ie.width)||"container-content-952"]])},[$.value&&C.value?(e.openBlock(),e.createElementBlock("div",ZL,[e.createVNode(e.unref(kt.Swiper),{ref:"mySwiper",modules:y,"slides-per-view":b.value.slidesPerView,"space-between":b.value.spaceBetween,loop:b.value.loop,speed:b.value.speed,"centered-slides":b.value.centeredSlides,"auto-height":b.value.autoHeight,breakpoints:b.value.breakpoints,class:"swiper card-carousel__swiper",onSlideChange:U,onClickSlide:H,onSwiper:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(ge,Le)=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{class:"swiper-slide",key:`${ge.key}-${Le}`},{default:e.withCtx(()=>[e.createElementVNode("div",JL,[T.value=="article"?(e.openBlock(),e.createBlock(Is,{key:0,componentProps:ge,singleColumn:N.value==1},null,8,["componentProps","singleColumn"])):e.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["slides-per-view","space-between","loop","speed","centered-slides","auto-height","breakpoints"]),e.createElementVNode("div",eA,[e.createVNode(wi,{currentIndex:d.value,count:A.value,onUpdatePage:G,onSlidePrev:q,onSlideNext:O,dark:"",isLoop:k.value},null,8,["currentIndex","count","isLoop"])])])):(e.openBlock(),e.createElementBlock("div",tA,[e.createElementVNode("div",nA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(ge,Le)=>(e.openBlock(),e.createElementBlock("div",{style:{"margin-right":"10px"},class:"card-content",key:`${ge.key}-${Le}`},[T.value=="article"?(e.openBlock(),e.createBlock(Is,{key:0,componentProps:ge,singleColumn:N.value==1},null,8,["componentProps","singleColumn"])):e.createCommentVNode("",!0)]))),128))])]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:i.value,"onUpdate:show":W[0]||(W[0]=ge=>i.value=ge),onHandleEdit:W[1]||(W[1]=ge=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:c},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(QL,{key:1,show:s.value,"onUpdate:show":W[4]||(W[4]=ge=>s.value=ge),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-26b3b079"]]),oA=Object.freeze(Object.defineProperty({__proto__:null,default:Qr},Symbol.toStringTag,{value:"Module"})),aA={class:"seting-box"},iA={key:0},sA={class:"draggable_box"},lA={class:"drag_top_box"},rA=["onClick"],dA=["src"],cA={class:"item-uplaod flex items-center"},uA={class:"btn_group"},mA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=t,s=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=()=>{i("update:show",!1)},r=e.ref(!1),c=e.ref(new Set),u=f=>{if(!c.value.has(f.key))c.value.add(f.key);else{const h=[];a.data.list.forEach(C=>{C.key&&h.push(C.key)}),c.value=new Set(h),c.value.delete(f.key)}},g=f=>{a.data.list=a.data.list.filter(h=>h.key!==f)},m=f=>c.value.has(f.key),d=e.ref(!1);e.watch(()=>{var f;return(f=a.data)==null?void 0:f.list},f=>{if(f&&Array.isArray(f)&&!d.value){d.value=!0;const h=f.map(C=>C.key);c.value=new Set(h)}},{immediate:!0,deep:!0});const p=f=>{const h={key:F(8),title:"示例",desc:"描述",date:"2024-03-08",category:"news",link:"https://www.baidu.com",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"};f==="prepend"?a.data.list=[h,...a.data.list||[]]:f==="append"&&(a.data.list=[...a.data.list||[],h])};return(f,h)=>{const C=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),x=e.resolveComponent("a-slider"),y=e.resolveComponent("icon-drag-dot"),b=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),T=e.resolveComponent("a-input"),k=e.resolveComponent("a-date-picker"),S=e.resolveComponent("a-button"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:l,unmountOnClose:""},{title:e.withCtx(()=>{var N;return[e.createTextVNode(e.toDisplayString((N=n.data)==null?void 0:N.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",aA,[h[24]||(h[24]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(w,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.width,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.width=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...h[9]||(h[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...h[10]||(h[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...h[12]||(h[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),h[25]||(h[25]=e.createElementVNode("p",{class:"item-title"},"背景色",-1)),e.createVNode(w,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.bgColor,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.bgColor=N),placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(C,{value:"#ffffff"},{default:e.withCtx(()=>[...h[13]||(h[13]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(C,{value:"#f8f9fa"},{default:e.withCtx(()=>[...h[14]||(h[14]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),h[26]||(h[26]=e.createElementVNode("p",{class:"item-title"},"桌面显示的列数(最小:1,最大:4)",-1)),e.createVNode(x,{modelValue:n.data.row,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.row=N),min:1,max:4,"default-value":3,"show-input":""},null,8,["modelValue"]),h[27]||(h[27]=e.createElementVNode("p",{class:"item-title"},"移动端显示的列数(最小:1,最大:2)",-1)),e.createVNode(x,{modelValue:n.data.mobileRow,"onUpdate:modelValue":h[3]||(h[3]=N=>n.data.mobileRow=N),min:1,max:2,"default-value":2,"show-input":""},null,8,["modelValue"]),h[28]||(h[28]=e.createElementVNode("p",{class:"item-title"},"文章",-1)),n.data.list.length===0?(e.openBlock(),e.createElementBlock("div",iA,"暂无数据")):e.createCommentVNode("",!0),n.data.list.length?(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({key:1,modelValue:n.data.list,"onUpdate:modelValue":h[4]||(h[4]=N=>n.data.list=N),"component-data":{tag:"div",type:"transition-group",name:r.value?null:"flip-list"}},s.value,{disabled:!1,onStart:h[5]||(h[5]=N=>r.value=!0),onEnd:h[6]||(h[6]=N=>r.value=!1),"item-key":"key"}),{item:e.withCtx(({element:N,index:A})=>[e.createElementVNode("div",sA,[e.createElementVNode("div",lA,[e.createElementVNode("div",{onClick:$=>u(N)},[e.createVNode(y,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(N.title),1)],8,rA),e.createElementVNode("div",null,[e.createVNode(b,{class:"icon_drag"}),e.createVNode(V,{class:"btn-delete",onClick:e.withModifiers($=>g(N.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[h[15]||(h[15]=e.createElementVNode("h2",null,"照片",-1)),h[16]||(h[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(T,{modelValue:N.title,"onUpdate:modelValue":$=>N.title=$,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[17]||(h[17]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.image},null,8,dA),e.createElementVNode("div",cA,[e.createVNode(T,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,name:"BannerPage","button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue"])]),h[18]||(h[18]=e.createElementVNode("p",{class:"item-title"},"网址",-1)),e.createVNode(T,{modelValue:N.link,"onUpdate:modelValue":$=>N.link=$,placeholder:"请输入网址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[19]||(h[19]=e.createElementVNode("p",{class:"item-title"},"标签名称",-1)),e.createVNode(T,{modelValue:N.labelName,"onUpdate:modelValue":$=>N.labelName=$,placeholder:"请输入标签名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[20]||(h[20]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(T,{modelValue:N.desc,"onUpdate:modelValue":$=>N.desc=$,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[21]||(h[21]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(k,{modelValue:N.date,"onUpdate:modelValue":$=>N.date=$,style:{width:"200px",background:"#ffffff"}},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!m(N)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])):e.createCommentVNode("",!0),e.createElementVNode("div",uA,[e.createVNode(S,{onClick:h[7]||(h[7]=N=>p("prepend")),type:"primary",style:{"margin-right":"20px"}},{default:e.withCtx(()=>[...h[22]||(h[22]=[e.createTextVNode("前置",-1)])]),_:1}),e.createVNode(S,{onClick:h[8]||(h[8]=N=>p("append")),type:"primary"},{default:e.withCtx(()=>[...h[23]||(h[23]=[e.createTextVNode("追加",-1)])]),_:1})])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-c90f3200"]]),pA={class:"mt-10 mt-md-12"},Zr=J(e.defineComponent({name:"CardCarouselMultiRowArticles",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightBoxImage"],setup(n,{emit:t}){const o=n,a=t,i=[ut.Navigation,ut.Pagination,ut.Autoplay],s=e.ref(!1),l=e.ref(!1),r=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},u=ae=>{a("handlePaste",ae)};(()=>{var ye;if(o.modelValue&&o.modelValue.data)return;const ae={id:((ye=o.modelValue)==null?void 0:ye.id)||F(),type:"CardCarouselMultiRowArticles",bgColor:"#ffffff",width:"default",row:4,mobileRow:2,list:[{key:"art-001",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-002",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-003",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-004",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-005",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"}]};a("update:modelValue",ae)})();const m=e.ref(!1),d=e.ref(null),p=e.ref(null),f=e.ref(null),h=ae=>{f.value=ae},C=e.ref(0),w=e.ref([]),x=e.ref({data:[],meta:{}}),y=e.ref([]);e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.classes)??null}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.style)??null}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.type)??"articles"}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.width)??null});const b=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.row)??2}),V=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.mobileRow)??2}),T=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.apiLink)??null});e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.website)??void 0??""}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.locale)??"en"});const k=e.ref(1024),S=e.computed(()=>k.value>=768?b.value:V.value),D=e.computed(()=>S.value*2),N=ae=>Math.min(2,Math.ceil(ae.length/S.value)),A=(ae,ye)=>{const ve=(ye-1)*S.value,_e=ve+S.value;return ae.slice(ve,_e)};e.computed(()=>b.value),e.computed(()=>k.value>=768?k.value>=1024?4:3:2);const $=e.computed(()=>{var ae,ye;return(ae=o.modelValue)!=null&&ae.getDataType?x.value.data:T.value?y.value:((ye=o.modelValue)==null?void 0:ye.list)??[]}),I=e.computed(()=>w.value.length>1);e.computed(()=>{var ae;return((ae=p.value)==null?void 0:ae.swiper)??null});const U={768:{slidesPerView:"auto",slidesPerGroup:1,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}};e.watch(C,()=>{Z(d.value)}),e.watch([$,D],()=>{G()});const Y=e.computed(()=>{var ye;const ae=(ye=o.modelValue)==null?void 0:ye.width;return!ae||ae==="default"?"container-content":typeof ae=="string"?ae.startsWith("container-content-")?ae:{small:"container-content-small",middle:"container-content-middle",medium:"container-content-middle",max:"container-content-max"}[ae]||"container-content":typeof ae=="number"?`container-content-${ae}`:"container-content"}),G=()=>{const ae=$.value,ye=[];ae.forEach((ve,_e)=>{const se=Math.floor(_e/D.value);ye[se]||(ye[se]=[]),ye[se].push(ve)}),w.value=ye},q=ae=>{var ye;C.value=(ae==null?void 0:ae.realIndex)??((ye=f.value)==null?void 0:ye.realIndex)??0,Le(),ge()},O=ae=>{var ye,ve;(ve=(ye=f.value)==null?void 0:ye.slideToLoop)==null||ve.call(ye,ae,600)},H=()=>{var ae,ye;(ye=(ae=f.value)==null?void 0:ae.slidePrev)==null||ye.call(ae,600)},R=()=>{var ae,ye;(ye=(ae=f.value)==null?void 0:ae.slideNext)==null||ye.call(ae,600)},M=ae=>{if(ae.video_type==="outer")return;const ye=$.value.filter(_e=>_e.video_type!=="outer"&&_e.type!=="photo"),ve=ye.findIndex(_e=>_e.slug===ae.slug);a("showLightboxVideo",{idx:ve,list:ye})},W=ae=>{const ye=$.value.filter(_e=>_e.type==="photo"),ve=ye.findIndex(_e=>_e.slug===ae.slug);a("showLightBoxImage",{idx:ve,url:ae.url,text:ae.text||ae.title,list:ye})},Z=ae=>{if(!ae||!m.value)return;const ye=k.value>=1024?170:150,_e=ae.getBoundingClientRect().top+window.pageYOffset-ye;window.scroll({top:_e,left:0,behavior:"smooth"})},ie=ae=>{const ye=ae.currentTarget,ve=ye==null?void 0:ye.dataset.slug,_e=ye==null?void 0:ye.dataset.type,se=$.value.find(pe=>pe.key==ve||pe.slug==ve);se&&(_e==="photo"?W(se):M(se))},ge=()=>{m.value&&(Array.from(document.getElementsByClassName("card-asset")).forEach(ae=>{ae.addEventListener("click",ie)}),Array.from(document.getElementsByClassName("card-video")).forEach(ae=>{ae.addEventListener("click",ie)}))},Le=()=>{m.value&&(Array.from(document.getElementsByClassName("card-asset")).forEach(ae=>{ae.removeEventListener("click",ie)}),Array.from(document.getElementsByClassName("card-video")).forEach(ae=>{ae.removeEventListener("click",ie)}))};return e.onMounted(()=>{m.value=!0,k.value=window.innerWidth,window.addEventListener("resize",()=>{k.value=window.innerWidth})}),e.onBeforeUnmount(()=>{Le()}),(ae,ye)=>{var _e;const ve=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"CardCarouselMultiRowArticles_wrap",ref_key:"parent",ref:d,style:e.normalizeStyle({backgroundColor:((_e=n.modelValue)==null?void 0:_e.bgColor)||"transparent"}),onMouseenter:ye[2]||(ye[2]=se=>s.value=!0),onMouseleave:ye[3]||(ye[3]=se=>s.value=!1)},[e.createElementVNode("div",{style:{marginTop:"30px",marginBottom:"30px"},class:e.normalizeClass(["CardCarouselMultiRowArticles_container",[Y.value]])},[e.createVNode(ve,null,{default:e.withCtx(()=>[e.createVNode(e.unref(kt.Swiper),{ref_key:"swiperRef",ref:p,modules:i,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group":1,"space-between":16,loop:!0,breakpoints:U,"auto-height":!0,class:"swiper card-carousel__swiper",onSwiper:h,onSlideChange:q},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(se,pe)=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{class:"swiper-slide",key:pe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(se),le=>(e.openBlock(),e.createElementBlock("div",{key:le,class:e.normalizeClass(["row",[`row-cols-${S.value}`]]),style:e.normalizeStyle({"--cc-cols":S.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A(se,le),he=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:he.key||he.slug},[e.createVNode(Is,{componentProps:he},null,8,["componentProps"])]))),128))],6))),128))]),_:2},1024))),128))]),_:1},512)]),_:1}),e.withDirectives(e.createElementVNode("div",pA,[e.createVNode(wi,{currentIndex:C.value,onUpdatePage:O,count:w.value.length,onSlidePrev:H,onSlideNext:R,isLoop:!0,dark:""},null,8,["currentIndex","count"])],512),[[e.vShow,I.value]])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:s.value,"onUpdate:show":ye[0]||(ye[0]=se=>s.value=se),onHandleEdit:ye[1]||(ye[1]=se=>l.value=!0),onHandleDelete:r,onHandleCopy:c,onHandlePaste:u},null,8,["show"]))],36),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(mA,{key:0,show:l.value,"onUpdate:show":ye[4]||(ye[4]=se=>l.value=se),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-7475bd48"]]),hA=Object.freeze(Object.defineProperty({__proto__:null,default:Zr},Symbol.toStringTag,{value:"Module"})),fA={class:"setting-content"},gA={class:"setting-header flex items-center"},yA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),a=t,i=()=>{a("update:show",!1)};return e.ref(1),(s,l)=>{const r=e.resolveComponent("a-switch"),c=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",fA,[e.createElementVNode("div",gA,[l[5]||(l[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),l[12]||(l[12]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:""},{default:e.withCtx(()=>[...l[6]||(l[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(c,{value:"middle"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(c,{value:"max"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),l[13]||(l[13]=e.createElementVNode("p",{class:"item-title"},"背景颜色",-1)),e.createVNode(u,{modelValue:n.data.data.bgColor,"onUpdate:modelValue":l[2]||(l[2]=m=>n.data.data.bgColor=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:"#ffffff"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(c,{value:"#F7F7FA"},{default:e.withCtx(()=>[...l[11]||(l[11]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),l[14]||(l[14]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.title,"onUpdate:modelValue":l[3]||(l[3]=m=>n.data.data.title=m),name:"CustomText_editor_title"},null,8,["modelValue"]),l[15]||(l[15]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.description,"onUpdate:modelValue":l[4]||(l[4]=m=>n.data.data.description=m),name:"CustomText_editor_description"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-1611d103"]]),_A=["id"],wA=["innerHTML"],bA=["innerHTML"],Jr=J(e.defineComponent({name:"CustomText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"CustomText",onlyShowPc:!1,data:{width:1920,backgroundColor:"#ffffff",title:"这是标题",description:"这是描述"}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=e.computed(()=>{var f,h;const d=(h=(f=o.modelValue)==null?void 0:f.data)==null?void 0:h.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,p)=>{var f,h,C,w,x,y,b,V,T,k,S,D;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.id,class:"custom-text",style:e.normalizeStyle({backgroundColor:((w=(C=n.modelValue)==null?void 0:C.data)==null?void 0:w.bgColor)||"transparent"}),onMouseenter:p[2]||(p[2]=N=>l.value=!0),onMouseleave:p[3]||(p[3]=N=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["custom-text__container",[c.value,{"text-center":d.center}]])},[(y=(x=n.modelValue)==null?void 0:x.data)!=null&&y.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"custom-text__title",innerHTML:(V=(b=n.modelValue)==null?void 0:b.data)==null?void 0:V.title},null,8,wA)):e.createCommentVNode("",!0),(k=(T=n.modelValue)==null?void 0:T.data)!=null&&k.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:"custom-text__text",innerHTML:(D=(S=n.modelValue)==null?void 0:S.data)==null?void 0:D.description},null,8,bA)):e.createCommentVNode("",!0)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=N=>l.value=N),onHandleEdit:p[1]||(p[1]=N=>r.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],44,_A)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(yA,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=N=>r.value=N),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-418dea73"]]),CA=Object.freeze(Object.defineProperty({__proto__:null,default:Jr},Symbol.toStringTag,{value:"Module"})),VA={class:"setting-content"},xA={class:"setting-header flex items-center"},kA=["src"],EA={class:"item-uplaod flex items-center"},TA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),a=t,i=()=>{a("update:show",!1)};return(s,l)=>{const r=e.resolveComponent("a-switch"),c=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),g=e.resolveComponent("a-input"),m=e.resolveComponent("Upload"),d=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(d,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",VA,[e.createElementVNode("div",xA,[l[6]||(l[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=p=>n.data.onlyShowPc=p)},null,8,["modelValue"])]),l[11]||(l[11]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=p=>n.data.data.width=p),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:""},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(c,{value:"middle"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(c,{value:"max"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),l[12]||(l[12]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.image},null,8,kA),e.createElementVNode("div",EA,[e.createVNode(g,{modelValue:n.data.data.image,"onUpdate:modelValue":l[2]||(l[2]=p=>n.data.data.image=p),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(m,{modelValue:n.data.data.image,"onUpdate:modelValue":l[3]||(l[3]=p=>n.data.data.image=p),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),l[13]||(l[13]=e.createElementVNode("p",{class:"item-title"},"图片alt",-1)),e.createVNode(g,{modelValue:n.data.data.imgAlt,"onUpdate:modelValue":l[4]||(l[4]=p=>n.data.data.imgAlt=p),placeholder:"请输入图片alt","allow-clear":""},null,8,["modelValue"]),l[14]||(l[14]=e.createElementVNode("p",{class:"item-title"},"图片描述",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.text,"onUpdate:modelValue":l[5]||(l[5]=p=>n.data.data.text=p),name:"MediaImageFull_editor_text"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-7c5f1cd3"]]),NA=["id"],SA={class:"media-image-full"},BA={class:"img-fit"},PA=["src","alt"],DA=["innerHTML"],ed=J(e.defineComponent({name:"MediaImageFull",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"MediaImageFull",onlyShowPc:!1,data:{width:"default",image:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",imgAlt:"这是图片alt",text:"这是图片描述"}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=e.computed(()=>{var f,h;const d=(h=(f=o.modelValue)==null?void 0:f.data)==null?void 0:h.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,p)=>{var f,h,C,w,x,y,b,V,T,k;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaImageFull_wrap",id:(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.id,onMouseenter:p[2]||(p[2]=S=>l.value=!0),onMouseleave:p[3]||(p[3]=S=>l.value=!1)},[e.createElementVNode("div",SA,[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full__container",c.value])},[e.createElementVNode("div",BA,[e.createElementVNode("img",{style:{width:"100%",height:"auto"},src:(w=(C=n.modelValue)==null?void 0:C.data)==null?void 0:w.image,alt:(y=(x=n.modelValue)==null?void 0:x.data)==null?void 0:y.imgAlt},null,8,PA),(V=(b=n.modelValue)==null?void 0:b.data)!=null&&V.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"media-image-full__desc",innerHTML:(k=(T=n.modelValue)==null?void 0:T.data)==null?void 0:k.text},null,8,DA)):e.createCommentVNode("",!0)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=S=>l.value=S),onHandleEdit:p[1]||(p[1]=S=>r.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],40,NA)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(TA,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=S=>r.value=S),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-6483e262"]]),$A=Object.freeze(Object.defineProperty({__proto__:null,default:ed},Symbol.toStringTag,{value:"Module"})),LA={class:"setting-content"},AA={class:"setting-header flex items-center"},IA=["src"],vA={class:"item-uplaod flex items-center"},MA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("Upload"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",LA,[e.createElementVNode("div",AA,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=g=>n.data.onlyShowPc=g)},null,8,["modelValue"])]),s[5]||(s[5]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.image},null,8,IA),e.createElementVNode("div",vA,[e.createVNode(r,{modelValue:n.data.data.image,"onUpdate:modelValue":s[1]||(s[1]=g=>n.data.data.image=g),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(c,{modelValue:n.data.data.image,"onUpdate:modelValue":s[2]||(s[2]=g=>n.data.data.image=g),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),s[6]||(s[6]=e.createElementVNode("p",{class:"item-title"},"图片alt",-1)),e.createVNode(r,{modelValue:n.data.data.imgAlt,"onUpdate:modelValue":s[3]||(s[3]=g=>n.data.data.imgAlt=g),placeholder:"请输入图片alt","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-97710184"]]),OA=["id"],UA={class:"media-image-static"},RA={class:"img-fit"},FA=["src","alt"],td=J(e.defineComponent({name:"MediaImageStatic",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||F(),type:"MediaImageStatic",onlyShowPc:!1,data:{image:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",imgAlt:"这是图片alt"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1);e.computed(()=>{var p,f;const m=(f=(p=o.modelValue)==null?void 0:p.data)==null?void 0:f.width;return!m||m==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[m]||"container-content"});const c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=m=>{a("handlePaste",m)};return i(),(m,d)=>{var p,f,h,C,w,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaImageStatic_wrap",id:(f=(p=n.modelValue)==null?void 0:p.data)==null?void 0:f.id,onMouseenter:d[2]||(d[2]=y=>l.value=!0),onMouseleave:d[3]||(d[3]=y=>l.value=!1)},[e.createElementVNode("div",UA,[e.createElementVNode("div",RA,[e.createElementVNode("img",{style:{width:"100%",height:"auto"},src:(C=(h=n.modelValue)==null?void 0:h.data)==null?void 0:C.image,alt:(x=(w=n.modelValue)==null?void 0:w.data)==null?void 0:x.imgAlt},null,8,FA)])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=y=>l.value=y),onHandleEdit:d[1]||(d[1]=y=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],40,OA)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(MA,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=y=>r.value=y),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-3d6c1c77"]]),HA=Object.freeze(Object.defineProperty({__proto__:null,default:td},Symbol.toStringTag,{value:"Module"})),jA={class:"setting-content"},zA={class:"draggable_box"},qA={class:"drag_top_box"},WA=["onClick"],GA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=e.ref(!1),s=t,l=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.ref(new Set),c=e.ref(!1);e.watch(()=>{var f;return[a.show,(f=a.data)==null?void 0:f.list]},([f,h])=>{c.value||(c.value=!0,f&&h&&Array.isArray(h)&&(r.value.clear(),h.forEach(C=>{C.id&&r.value.add(C.id)})))},{immediate:!0,deep:!0});const u=f=>{var h;if(!r.value.has(f.id))r.value.add(f.id);else{const C=[];(h=a.data)!=null&&h.list&&Array.isArray(a.data.list)&&a.data.list.forEach(w=>{w.id&&C.push(w.id)}),r.value=new Set(C),r.value.delete(f.id)}},g=f=>r.value.has(f.id),m=f=>{a.data.list=a.data.list.filter(h=>h.id!==f)},d=()=>{s("update:show",!1)},p=()=>{a.data.list.push({id:F(),title:"标题",description:"描述"})};return(f,h)=>{const C=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),x=e.resolveComponent("icon-drag-dot"),y=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),T=e.resolveComponent("icon-plus"),k=e.resolveComponent("a-button"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:d,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",jA,[h[11]||(h[11]=e.createElementVNode("div",{class:"item-title"},"宽度",-1)),e.createVNode(w,{style:{"margin-bottom":"20px"},modelValue:n.data.width,"onUpdate:modelValue":h[0]||(h[0]=D=>n.data.width=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...h[4]||(h[4]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...h[5]||(h[5]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...h[6]||(h[6]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...h[7]||(h[7]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":h[1]||(h[1]=D=>n.data.list=D),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!1,onStart:h[2]||(h[2]=D=>i.value=!0),onEnd:h[3]||(h[3]=D=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[e.createElementVNode("div",zA,[e.createElementVNode("div",qA,[e.createElementVNode("div",{class:"drag-handle",onClick:N=>u(D)},[e.createVNode(x,{style:{"margin-right":"10px"}}),e.createTextVNode("标题:"+e.toDisplayString(D.title),1)],8,WA),e.createElementVNode("div",null,[e.createVNode(y,{class:"icon_drag"}),e.createVNode(b,{class:"btn-delete",onClick:e.withModifiers(N=>m(D.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[h[8]||(h[8]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"40px"}},"标题",-1)),e.createVNode(V,{modelValue:D.title,"onUpdate:modelValue":N=>D.title=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[9]||(h[9]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"描述",-1)),e.createVNode(V,{modelValue:D.description,"onUpdate:modelValue":N=>D.description=N,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!g(D)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createVNode(k,{style:{"margin-top":"20px"},type:"primary",onClick:p},{icon:e.withCtx(()=>[e.createVNode(T)]),default:e.withCtx(()=>[h[10]||(h[10]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-d705e63f"]]),XA=["id"],YA={class:"article-list-pure-text"},KA={class:"article-group"},QA={class:"article-item__title"},ZA={class:"article-item__description"},nd=J(e.defineComponent({name:"ArticleListPureText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.list)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"ArticleListPureText",width:"default",list:[{id:F(),title:"标题1",description:"描述1"},{id:F(),title:"标题2",description:"描述2"},{id:F(),title:"标题3",description:"描述3"},{id:F(),title:"标题4",description:"描述4"},{id:F(),title:"标题5",description:"描述5"}]};a("update:modelValue",d)},s=e.ref(!1),l=e.ref(!1),r=e.computed(()=>{var f;const d=(f=o.modelValue)==null?void 0:f.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),c=e.computed(()=>{var f,h;const d=(h=(f=o.modelValue)==null?void 0:f.data)==null?void 0:h.width;return!d||d==="default"?"row-cols-1 row-cols-md-2":{small:"row-cols-1 row-cols-md-2",middle:"row-cols-1 row-cols-md-2 row-cols-lg-3",max:"row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4"}[d]||"row-cols-1 row-cols-md-2"}),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,p)=>{var f,h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"articlePureText_wrap",id:(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.id,onMouseenter:p[2]||(p[2]=w=>s.value=!0),onMouseleave:p[3]||(p[3]=w=>s.value=!1)},[e.createElementVNode("div",YA,[e.createElementVNode("div",{class:e.normalizeClass(["article-list-pure-text__container",r.value])},[e.createElementVNode("div",KA,[e.createElementVNode("ul",{class:e.normalizeClass(["article-list row",c.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=n.modelValue)==null?void 0:C.list,(w,x)=>(e.openBlock(),e.createElementBlock("li",{key:x,class:"article-item col"},[e.createElementVNode("h4",QA,e.toDisplayString(w.title),1),e.createElementVNode("p",ZA,e.toDisplayString(w.description),1)]))),128))],2)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:s.value,"onUpdate:show":p[0]||(p[0]=w=>s.value=w),onHandleEdit:p[1]||(p[1]=w=>l.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],40,XA),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(GA,{key:0,show:l.value,"onUpdate:show":p[4]||(p[4]=w=>l.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-e817c868"]]),JA=Object.freeze(Object.defineProperty({__proto__:null,default:nd},Symbol.toStringTag,{value:"Module"})),eI={class:"setting-content"},tI={class:"setting-header flex items-center"},nI=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(r,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",eI,[e.createElementVNode("div",tI,[s[1]||(s[1]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-fe2132f5"]]),oI={key:0},aI={key:1,class:"tab-default__content mt-5 mt-md-13 container-content"},od=J(e.defineComponent({name:"AlummiCommunityList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","openPopup"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var y,b,V;if(o.modelValue&&o.modelValue.data)return;const x={id:((y=o.modelValue)==null?void 0:y.id)||F(),type:"AlummiCommunityList",onlyShowPc:Te(),api:((b=o.modelValue)==null?void 0:b.api)||"/article/newsList",category:((V=o.modelValue)==null?void 0:V.category)||"alumni-events"};a("update:modelValue",x)},s=e.computed(()=>{var x;return o.isPreview?!((x=o.modelValue)!=null&&x.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=x=>{a("handlePaste",x)},m=x=>{a("handleClick",x)},d=x=>{a("openPopup",x)};i();const p=e.ref([]),f=e.ref(1024),h=e.computed(()=>p.value),C=()=>{typeof window<"u"&&(f.value=window.innerWidth)},w=async()=>{var b,V;const x={params:{host:o.host,langCode:o.locale,per_page:4,page:1,category:(b=o.modelValue)==null?void 0:b.category}},y=await en.get((V=o.modelValue)==null?void 0:V.api,x);p.value=y.data.data.data};return e.onMounted(()=>{w(),C(),typeof window<"u"&&window.addEventListener("resize",C)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",C)}),(x,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"alummi-community-list news-list tab-default",ref:"parent",onMouseenter:y[2]||(y[2]=b=>l.value=!0),onMouseleave:y[3]||(y[3]=b=>l.value=!1)},[n.host?(e.openBlock(),e.createElementBlock("div",aI,[e.createElementVNode("div",{class:e.normalizeClass(["card-list row",["row-cols-2","row-cols-md-2","row-cols-lg-4"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,b=>(e.openBlock(),e.createElementBlock("div",{class:"card-item col",key:b.key},[e.createVNode(Is,{componentProps:b,singleColumn:f.value<768,onHandleClick:m,onOpenPopup:d},null,8,["componentProps","singleColumn"])]))),128))])])):(e.openBlock(),e.createElementBlock("p",oI,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":y[0]||(y[0]=b=>l.value=b),onHandleEdit:y[1]||(y[1]=b=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(nI,{key:1,show:r.value,"onUpdate:show":y[4]||(y[4]=b=>r.value=b),data:n.modelValue},null,8,["show","data"]))],64))}}),[["__scopeId","data-v-9434d33c"]]),iI=Object.freeze(Object.defineProperty({__proto__:null,default:od},Symbol.toStringTag,{value:"Module"})),sI={class:"message-card__wrapper"},lI={class:"message-card__head"},rI={class:"message-card__image"},dI=["src","alt"],cI=["innerHTML"],uI=["innerHTML"],mI=["innerHTML"],Su=J(e.defineComponent({name:"BlessingMessageCard",__name:"BlessingMessageCard",props:{image_url:{default:""},name:{default:""},person_type:{default:""},label:{default:""},message:{default:""},type:{default:0}},setup(n){const t=n,o=e.computed(()=>{const s=t.type%3;return[{"--bg-color":"#0032A0","--border-color":"#FF0044"},{"--bg-color":"#FF8200","--border-color":"#0032A0"},{"--bg-color":"#FF0044","--border-color":"#D2D6DC"}][s]}),a=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),i=e.computed(()=>{var s;return t.person_type==="others"?t.label:((s=a.value.find(l=>l.key===t.person_type))==null?void 0:s.name)??t.label});return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["blessing-message-card",{"has-image":!!n.image_url}]),"data-aos":"fade-up"},[e.createElementVNode("div",{class:"message-card",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",sI,[e.createElementVNode("div",lI,[e.withDirectives(e.createElementVNode("div",rI,[e.createElementVNode("img",{src:n.image_url,alt:n.name},null,8,dI)],512),[[e.vShow,n.image_url]]),e.createElementVNode("h5",{class:"message-card__name text-uppercase",innerHTML:n.name},null,8,cI),e.withDirectives(e.createElementVNode("div",{class:"message-card__label",innerHTML:i.value},null,8,uI),[[e.vShow,i.value]])]),e.createElementVNode("div",{class:"message-card__body",innerHTML:n.message},null,8,mI)])],4)],2))}}),[["__scopeId","data-v-ecf1d319"]]),pI={class:"blessing-message-pagination"},hI={class:"d-flex align-items-center h-100 justify-content-center justify-content-md-start"},fI={key:0,class:"page-ellipsis flex-center"},gI=["onClick"],yI=J(e.defineComponent({name:"BlessingMessagePagination",__name:"BlessingMessagePagination",props:{totalPage:{default:1},currentPage:{default:1}},emits:["changePage"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{const c=[];let u=!1;for(let g=1;g<=o.totalPage;g++)r(g)?(u=!1,c.push(g)):u||(c.push("Ellipsis"),u=!0);return c[0]==="Ellipsis"&&c.shift(),c}),s=c=>{a("changePage",c)},l=c=>{c<0?o.currentPage>1&&s(o.currentPage+c):o.currentPage<o.totalPage&&s(o.currentPage+c)},r=c=>o.totalPage<=6||c<=o.currentPage+2&&c>=o.currentPage||c===o.totalPage||o.currentPage>=o.totalPage-3&&(c>=o.totalPage-2||c===1);return(c,u)=>(e.openBlock(),e.createElementBlock("div",pI,[e.createElementVNode("ul",hI,[e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pr-3 pr-md-4",{"page-arrow--disable":n.currentPage===1}]),onClick:u[0]||(u[0]=g=>l(-1))},[...u[2]||(u[2]=[e.createElementVNode("div",{class:"i page-arrow__left"},null,-1)])],2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${g}-${m}`},[g==="Ellipsis"?(e.openBlock(),e.createElementBlock("li",fI)):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["page-item flex-center",{"page-item--active":g===n.currentPage}]),onClick:d=>s(g)},e.toDisplayString(g),11,gI))],64))),128)),e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pl-3 pl-md-4",{"page-arrow--disable":n.currentPage===n.totalPage}]),onClick:u[1]||(u[1]=g=>l(1))},[...u[3]||(u[3]=[e.createElementVNode("div",{class:"i page-arrow__right"},null,-1)])],2)])]))}}),[["__scopeId","data-v-36b31ee5"]]),_I={class:"lightbox__wrapper"},wI={class:"lightbox__content"},bI={class:"lightbox__content__body"},CI={class:"lightbox__content__top"},VI={class:"lightbox__content__image"},xI=["src","alt"],kI=["innerHTML"],EI=["innerHTML"],TI=["innerHTML"],tf=J(e.defineComponent({name:"LightboxBlessingMessage",__name:"index",props:{componentProps:{default:()=>({})},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>(window==null?void 0:window.innerWidth)>767.98?(window==null?void 0:window.innerWidth)>1100?"992px":"720px":"100%"),s=e.computed(()=>o.visible),l=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.image_url)??""}),r=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.image_alt)??u.value}),c=e.computed(()=>r.value),u=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.name)??""}),g=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.label)??""}),m=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.person_type)??""}),d=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.message)??""}),p=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),f=e.computed(()=>{var C;return m.value==="others"?g.value:((C=p.value.find(w=>w.key===m.value))==null?void 0:C.name)??g.value}),h=()=>{a("update:visible",!1)};return(C,w)=>{const x=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(x,{visible:s.value,"onUpdate:visible":w[0]||(w[0]=y=>s.value=y),class:"lightbox-custom lightbox-blessing",width:i.value,footer:!1,closable:!1},{default:e.withCtx(()=>[e.createElementVNode("div",_I,[e.createElementVNode("div",wI,[e.createElementVNode("div",{class:"lightbox__content__head"},[e.createElementVNode("div",{class:"lightbox__content__cross i i-cross-modal",onClick:h})]),e.createElementVNode("div",bI,[e.createElementVNode("div",CI,[e.withDirectives(e.createElementVNode("div",VI,[e.createElementVNode("img",{src:l.value,alt:c.value},null,8,xI)],512),[[e.vShow,l.value]]),e.createElementVNode("div",{class:"lightbox__content__name",innerHTML:u.value},null,8,kI),e.withDirectives(e.createElementVNode("div",{class:"lightbox__content__label",innerHTML:f.value},null,8,EI),[[e.vShow,f.value]])]),w[1]||(w[1]=e.createElementVNode("div",{class:"lightbox__content__title",innerHTML:"Blessing Message to YCYW"},null,-1)),e.createElementVNode("div",{class:"lightbox__content__content",innerHTML:d.value},null,8,TI)])])])]),_:1},8,["visible","width"])}}}),[["__scopeId","data-v-2868ec67"]]),NI={class:"setting-content"},SI={class:"setting-header flex items-center"},BI={class:"setting-header flex items-center"},PI=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",NI,[e.createElementVNode("div",SI,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=u=>n.data.onlyShowPc=u)},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",BI,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"组件标题",-1)),e.createVNode(r,{modelValue:n.data.title,"onUpdate:modelValue":s[1]||(s[1]=u=>n.data.title=u),placeholder:"请输入组件标题","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-797d5a08"]]),DI={class:"blessing-message__container container-content"},$I=["innerHTML"],LI={class:"d-none d-md-flex row row-cols-2"},AI={class:"col"},II={class:"blessing-message__card"},vI={class:"col"},MI={class:"blessing-message__card"},OI={class:"d-md-none row row-cols-1"},UI={class:"col"},RI={class:"blessing-message__card"},FI={key:0,class:"flex-center mt-9 mt-md-22"},ad=J(e.defineComponent({name:"BlessingMessage",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var S,D,N;if(o.modelValue&&o.modelValue.data)return;const k={id:((S=o.modelValue)==null?void 0:S.id)||F(),type:"BlessingMessage",onlyShowPc:!1,api:((D=o.modelValue)==null?void 0:D.api)||"/blessing-board/blessing-messages/list",title:((N=o.modelValue)==null?void 0:N.title)||"这里是标题"};a("update:modelValue",k)},s=e.computed(()=>{var k;return o.isPreview?!((k=o.modelValue)!=null&&k.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=k=>{a("handlePaste",k)};i();const m=e.ref(null),d=e.ref(1),p=e.ref(6),f=e.ref(1),h=e.ref([]),C=e.ref(null),w=e.computed(()=>h.value.filter((k,S)=>(S+1)%2)),x=e.computed(()=>h.value.filter((k,S)=>!((S+1)%2))),y=async()=>{var D;const k={headers:{website:`${o.website}-${o.locale}`}},S=`${(D=o.modelValue)==null?void 0:D.api}?per_page=${p.value}&page=${d.value}`;try{const{data:N}=await en.get(S,k);f.value=N.meta.last_page,h.value=N.data}catch{f.value=1,h.value=[]}},b=k=>{if(!k||typeof window>"u")return;const S=window.innerWidth,D=S>=768?S>=1024?170:120:100,A=k.getBoundingClientRect().top+window.pageYOffset-D;window.scroll({top:A,left:0,behavior:"smooth"})},V=e.ref(!1),T=k=>{C.value=k,V.value=!0};return e.watch(d,()=>{e.nextTick(()=>{y(),b(m.value)})}),e.onMounted(()=>{y()}),(k,S)=>{var D,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blessing-message",onMouseenter:S[4]||(S[4]=A=>l.value=!0),onMouseleave:S[5]||(S[5]=A=>l.value=!1),ref_key:"parent",ref:m},[e.createElementVNode("div",DI,[e.withDirectives(e.createElementVNode("div",{class:"blessing-message__title",innerHTML:(D=n.modelValue)==null?void 0:D.title},null,8,$I),[[e.vShow,(N=n.modelValue)==null?void 0:N.title]]),e.createElementVNode("div",LI,[e.createElementVNode("div",AI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${$}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",II,[e.createVNode(Su,e.mergeProps({onClick:I=>T(A)},{ref_for:!0},A,{type:Number($)*2}),null,16,["onClick","type"])])]))),128))]),e.createElementVNode("div",vI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${$}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",MI,[e.createVNode(Su,e.mergeProps({onClick:I=>T(A)},{ref_for:!0},A,{type:Number($)*2+1}),null,16,["onClick","type"])])]))),128))])]),e.createElementVNode("div",OI,[e.createElementVNode("div",UI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${$}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",RI,[e.createVNode(Su,e.mergeProps({onClick:I=>T(A)},{ref_for:!0},A,{type:$}),null,16,["onClick","type"])])]))),128))])]),f.value>0?(e.openBlock(),e.createElementBlock("div",FI,[e.createVNode(yI,{totalPage:f.value,currentPage:d.value,onChangePage:S[0]||(S[0]=A=>d.value=A)},null,8,["totalPage","currentPage"])])):e.createCommentVNode("",!0)]),e.createVNode(tf,{visible:V.value,"onUpdate:visible":S[1]||(S[1]=A=>V.value=A),componentProps:C.value},null,8,["visible","componentProps"]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":S[2]||(S[2]=A=>l.value=A),onHandleEdit:S[3]||(S[3]=A=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PI,{key:1,show:r.value,"onUpdate:show":S[6]||(S[6]=A=>r.value=A),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-ee9ca31d"]]),HI=Object.freeze(Object.defineProperty({__proto__:null,default:ad},Symbol.toStringTag,{value:"Module"})),jI={class:"setting-content"},zI={class:"setting-header flex items-center"},qI=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(r,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",jI,[e.createElementVNode("div",zI,[s[2]||(s[2]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-0db87e14"]]),WI={class:"container-content"},GI={class:"blessing-wrapper position-relative"},XI=["src","alt"],YI={class:"slide-card__wrapper"},KI={class:"slide-card__head"},QI=["innerHTML"],ZI=["innerHTML"],JI=["innerHTML"],ev=["src","alt"],tv=["src","alt"],id=J(e.defineComponent({name:"BlessingSlider",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var O,H;if(o.modelValue&&o.modelValue.data)return;const q={id:((O=o.modelValue)==null?void 0:O.id)||F(),type:"BlessingSlider",onlyShowPc:!1,api:((H=o.modelValue)==null?void 0:H.api)||"/blessing-board/blessing-messages/featured?count=6"};a("update:modelValue",q)},s=e.computed(()=>{var q;return o.isPreview?!((q=o.modelValue)!=null&&q.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=q=>{a("handlePaste",q)};i();const m=e.ref([]),d=e.ref(0),p=e.ref(1),f=e.ref(0),h=e.ref(0),C=e.ref(null),w=e.ref(!1),x=e.computed(()=>m.value.length),y=e.computed(()=>m.value[d.value]),b=e.computed(()=>d.value-1<0?x.value-1:d.value-1),V=e.computed(()=>d.value+1>=x.value?0:d.value+1),T=e.computed(()=>d.value%3),k=e.computed(()=>[{"--bg-color":"#0032A0","--border-color":"#FF0044"},{"--bg-color":"#FF8200","--border-color":"#0032A0"},{"--bg-color":"#FF0044","--border-color":"#D2D6DC"}][T.value]),S=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),D=e.computed(()=>{var q,O,H;return y.value?y.value.person_type==="others"?(q=y.value)==null?void 0:q.label:((O=S.value.find(R=>{var M;return R.key===((M=y.value)==null?void 0:M.person_type)}))==null?void 0:O.name)??((H=y.value)==null?void 0:H.label):null}),N=q=>{p.value=q>d.value?1:-1,d.value=(q+x.value)%x.value},A=()=>{h.value<f.value&&N(d.value+1),h.value>f.value&&N(d.value-1)},$=q=>{f.value=q.changedTouches[0].screenX},I=q=>{h.value=q.changedTouches[0].screenX,A()},U=e.ref(!1),Y=q=>{C.value=q,U.value=!0},G=async()=>{var H;const q={headers:{website:`${o.website}-${o.locale}`}},O=`${(H=o.modelValue)==null?void 0:H.api}`;try{const{data:R}=await en.get(O,q);m.value=R.data}catch{m.value=[]}};return e.onMounted(()=>{G()}),(q,O)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blessing-slider",onMouseenter:O[13]||(O[13]=H=>l.value=!0),onMouseleave:O[14]||(O[14]=H=>l.value=!1)},[e.createElementVNode("div",WI,[e.createElementVNode("div",GI,[e.createVNode(e.TransitionGroup,{tag:"div",name:p.value>0?"slide":"slide-invert",class:"slide-block",onTouchstart:$,onTouchend:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(H,R)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${H.name}-${H.label}-${H.image_url}-${R}`,ref_for:!0,ref:"image",onTransitionstart:O[0]||(O[0]=M=>w.value=!0),onTransitionend:O[1]||(O[1]=M=>w.value=!1)},[e.createElementVNode("img",{src:H.image_url,alt:H.name},null,8,XI)],32)),[[e.vShow,R===d.value]])),128)),e.createElementVNode("div",{class:"i page-arrow__left",key:"arrow__left",onClick:O[2]||(O[2]=H=>N(d.value-1))}),e.createElementVNode("div",{class:"i page-arrow__right",key:"arrow__right",onClick:O[3]||(O[3]=H=>N(d.value+1))})]),_:1},8,["name"]),y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-card",style:e.normalizeStyle(k.value),onTouchstart:$,onTouchend:I,onClick:O[4]||(O[4]=H=>Y(y.value))},[e.createElementVNode("div",YI,[e.createElementVNode("div",KI,[e.createElementVNode("h5",{class:"slide-card__name text-uppercase",innerHTML:y.value.name},null,8,QI),e.createElementVNode("div",{class:"slide-card__label",innerHTML:D.value},null,8,ZI)]),e.createElementVNode("div",{class:"slide-card__body",innerHTML:y.value.message},null,8,JI)])],36)):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"div",name:p.value>0?"slide":"slide-invert",class:"slide-block slide-block__prev"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(H,R)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${H.name}-${H.label}-${H.image_url}-${R}`,ref_for:!0,ref:"image",onTransitionstart:O[5]||(O[5]=M=>w.value=!0),onTransitionend:O[6]||(O[6]=M=>w.value=!1)},[e.createElementVNode("img",{src:H.image_url,alt:H.name},null,8,ev)],32)),[[e.vShow,R===b.value]])),128))]),_:1},8,["name"]),e.createVNode(e.TransitionGroup,{tag:"div",name:p.value>0?"slide":"slide-invert",class:"slide-block slide-block__next"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(H,R)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${H.name}-${H.label}-${H.image_url}-${R}`,ref_for:!0,ref:"image",onTransitionstart:O[7]||(O[7]=M=>w.value=!0),onTransitionend:O[8]||(O[8]=M=>w.value=!1)},[e.createElementVNode("img",{src:H.image_url,alt:H.name},null,8,tv)],32)),[[e.vShow,R===V.value]])),128))]),_:1},8,["name"]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"blessing-btn blessing-btn--prev",onClick:O[9]||(O[9]=H=>N(d.value-1))},[...O[16]||(O[16]=[e.createElementVNode("div",{class:"i"},null,-1)])],512),[[e.vShow,m.value.length>1]]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"blessing-btn blessing-btn--next",onClick:O[10]||(O[10]=H=>N(d.value+1))},[...O[17]||(O[17]=[e.createElementVNode("div",{class:"i"},null,-1)])],512),[[e.vShow,m.value.length>1]])])]),e.createVNode(tf,{visible:U.value,"onUpdate:visible":O[11]||(O[11]=H=>U.value=H),componentProps:C.value},null,8,["visible","componentProps"]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,onHandleEdit:O[12]||(O[12]=H=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g}))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(qI,{key:1,show:r.value,"onUpdate:show":O[15]||(O[15]=H=>r.value=H),data:n.modelValue},null,8,["show","data"]))],64))}}),[["__scopeId","data-v-a8c8eb07"]]),nv=Object.freeze(Object.defineProperty({__proto__:null,default:id},Symbol.toStringTag,{value:"Module"})),ov={class:"setting-content"},av={class:"setting-header flex items-center"},iv={class:"setting-header flex items-center"},sv=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},slugList:{type:Array,default:()=>[]}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ov,[e.createElementVNode("div",av,[s[2]||(s[2]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=u=>n.data.onlyShowPc=u)},null,8,["modelValue"])]),e.createElementVNode("div",iv,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"文章类别",-1)),e.createVNode(r,{modelValue:n.data.slug,"onUpdate:modelValue":s[1]||(s[1]=u=>n.data.slug=u),placeholder:"请输入文章类别","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-b9179ef4"]]),lv={key:0},rv={key:1,class:"card-showcase__container container-content-middle",ref:"cardShowcase"},dv=["onClick"],cv={class:"img-wrapper"},uv=["src","alt"],mv=["src","alt"],pv={class:"slide-content__box bg-white shadow-lg"},hv={class:"slide-content__box__title"},fv=["innerHTML"],gv={key:1,class:"slide-content__box__subtitle"},yv={key:2,class:"slide-content__box__subtitle"},_v=["href"],wv=["onClick"],bv=["onClick"],Cv={class:"img-wrapper"},Vv=["src","alt"],xv=["src","alt"],kv={class:"slide-content__box bg-white shadow-lg"},Ev={class:"slide-content__box__title"},Tv=["innerHTML"],Nv={key:1,class:"slide-content__box__subtitle"},Sv={key:2,class:"slide-content__box__subtitle"},Bv=["href"],Pv=["onClick"],sd=J(e.defineComponent({name:"CardShowcase",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.ref([]),s=()=>{var A,$,I;if(o.modelValue&&o.modelValue.data)return;const N={id:((A=o.modelValue)==null?void 0:A.id)||F(),type:"CardShowcase",onlyShowPc:!1,api:(($=o.modelValue)==null?void 0:$.api)||"/article/newsList",getDataType:((I=o.modelValue)==null?void 0:I.getDataType)||"alumni"};a("update:modelValue",N)},l=e.computed(()=>{var N;return o.isPreview?!((N=o.modelValue)!=null&&N.onlyShowPc)||!Te():!0}),r=e.ref(!1),c=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=N=>{a("handlePaste",N)};s();const d=[ut.Navigation,ut.Pagination,ut.Autoplay],p={768:{spaceBetween:-100},1024:{spaceBetween:-130}},f=e.ref([]),h=e.ref(typeof window<"u"?window.innerWidth:1024);let C=null,w=null;const x=async()=>{var $;en.get("/article/category/listForWeb",{params:{langCode:o.locale,host:o.host}}).then(I=>{i.value=I.data.data});const N={params:{host:o.host,langCode:o.locale,category:($=o.modelValue)==null?void 0:$.getDataType,per_page:5,page:1}};let A=await en.get(o.modelValue.api,N);f.value=A.data.data.data},y=N=>{w=N,S()},b=N=>{var A;typeof window<"u"&&window.scroll({top:0,left:0,behavior:"smooth"}),a("handleClick",`/article/${(A=o.modelValue)==null?void 0:A.getDataType}/${N}`)},V=N=>i.value.filter(A=>A.key===N)[0].name,T=N=>{const A=f.value.filter(I=>I.video_type!=="outer"),$=A.findIndex(I=>I.key==N);a("showLightboxVideo",{idx:$,list:A})},k=N=>{var $,I,U;if(!w)return;const A=((U=(I=($=N.path)==null?void 0:$[0])==null?void 0:I.className)==null?void 0:U.split(" "))||[];A.includes("swiper-slide-next")?w.slideNext():A.includes("swiper-slide-prev")&&w.slidePrev()},S=()=>{typeof document>"u"||(C=document.querySelectorAll(".swiper-slide"),C==null||C.forEach(N=>{N.addEventListener("mouseenter",k)}))},D=()=>{typeof window<"u"&&(h.value=window.innerWidth)};return e.onMounted(()=>{x(),typeof window<"u"&&window.addEventListener("resize",D),e.nextTick(()=>{var N;(N=o.modelValue)!=null&&N.getBackendData&&w&&setTimeout(()=>{w.slideTo(3)},300)})}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",D),C==null||C.forEach(N=>{N.removeEventListener("mouseenter",k)})}),(N,A)=>{const $=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-showcase",onMouseenter:A[2]||(A[2]=I=>r.value=!0),onMouseleave:A[3]||(A[3]=I=>r.value=!1)},[n.host?(e.openBlock(),e.createElementBlock("div",rv,[h.value>767.98?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(kt.Swiper),{ref:"swiperRef",modules:d,"centered-slides":!0,"slides-per-view":2.7,speed:600,loop:!0,"space-between":-80,breakpoints:p,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},class:"swiper showcaseSlide swiper--desktop",onSwiper:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,I=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{key:I.key,"data-swiper-key":I.key},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"slide-content",onClick:U=>b(I.key)},[e.createElementVNode("div",cv,[I.poster?(e.openBlock(),e.createElementBlock("img",{key:0,class:"img-static",src:I.poster,alt:I.alt||I.title},null,8,uv)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"img-static",src:I.image||I.meta.image,alt:I.alt||I.title},null,8,mv))]),e.createElementVNode("div",pv,[e.createElementVNode("h6",hv,e.toDisplayString(I.title),1),I.content||I.desc||I.meta.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-content__box__content",innerHTML:I.content||I.desc||I.meta.description},null,8,fv)):e.createCommentVNode("",!0),I.subtitle||I.label?(e.openBlock(),e.createElementBlock("h6",gv,e.toDisplayString(I.subtitle||I.label),1)):(e.openBlock(),e.createElementBlock("h6",yv,e.toDisplayString(V(I.category)),1))]),I.video_type&&I.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview&&I.video_type==="outer"?(e.openBlock(),e.createElementBlock("a",{key:0,href:I.link,target:"_blank",rel:"noopener noreferrer",class:"slide-content__play"},null,8,_v)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"slide-content__play",onClick:e.withModifiers(U=>T(I.key),["stop"])},null,8,wv))],64)):e.createCommentVNode("",!0)],8,dv)]),_:2},1032,["data-swiper-key"]))),128))]),_:1},512),A[5]||(A[5]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next"})],-1))]),_:1})):(e.openBlock(),e.createBlock($,{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(kt.Swiper),{ref:"swiperRefMobile",modules:d,"centered-slides":!0,"slides-per-view":1,speed:600,effect:"fade","fade-effect":{crossFade:!0},loop:!0,pagination:{el:".swiper-pagination__mobile",clickable:!0},navigation:{nextEl:".swiper-button-next__mobile",prevEl:".swiper-button-prev__mobile"},class:"swiper showcaseSlide swiper--mobile",onSwiper:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,I=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{key:I.key,"data-swiper-key":I.key},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"slide-content",onClick:U=>b(I.key)},[e.createElementVNode("div",Cv,[I.poster?(e.openBlock(),e.createElementBlock("img",{key:0,class:"img-static",src:I.poster,alt:I.alt||I.title},null,8,Vv)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"img-static",src:I.image||I.meta.image,alt:I.alt||I.title},null,8,xv))]),e.createElementVNode("div",kv,[e.createElementVNode("h6",Ev,e.toDisplayString(I.title),1),I.content||I.desc||I.meta.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-content__box__content",innerHTML:I.content||I.desc||I.meta.description},null,8,Tv)):e.createCommentVNode("",!0),I.subtitle||I.label?(e.openBlock(),e.createElementBlock("h6",Nv,e.toDisplayString(I.subtitle||I.label),1)):(e.openBlock(),e.createElementBlock("h6",Sv,e.toDisplayString(V(I.category)),1))]),I.video_type&&I.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview&&I.video_type==="outer"?(e.openBlock(),e.createElementBlock("a",{key:0,href:I.link,target:"_blank",rel:"noopener noreferrer",class:"slide-content__play"},null,8,Bv)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"slide-content__play",onClick:e.withModifiers(U=>T(I.key),["stop"])},null,8,Pv))],64)):e.createCommentVNode("",!0)],8,bv)]),_:2},1032,["data-swiper-key"]))),128))]),_:1},512),A[6]||(A[6]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev__mobile swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination__mobile swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next__mobile swiper-button-next"})],-1))]),_:1}))],512)):(e.openBlock(),e.createElementBlock("p",lv,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:r.value,"onUpdate:show":A[0]||(A[0]=I=>r.value=I),onHandleEdit:A[1]||(A[1]=I=>c.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sv,{key:1,show:c.value,"onUpdate:show":A[4]||(A[4]=I=>c.value=I),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b7107bd6"]]),Dv=Object.freeze(Object.defineProperty({__proto__:null,default:sd},Symbol.toStringTag,{value:"Module"})),$v={class:"setting-content"},Lv={class:"setting-header flex items-center"},Av={class:"setting-header flex items-center"},Iv={class:"setting-header flex items-center"},vv=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",$v,[e.createElementVNode("div",Lv,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=g=>n.data.onlyShowPc=g)},null,8,["modelValue"])]),e.createElementVNode("div",Av,[s[8]||(s[8]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=g=>n.data.width=g),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[4]||(s[4]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",Iv,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(c,{modelValue:n.data.bgColor,"onUpdate:modelValue":s[2]||(s[2]=g=>n.data.bgColor=g),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"#ffffff"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(r,{value:"#F7F7FA"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-33aa6b59"]]),Mv={key:0},Ov={class:"explore-links__list row row-cols-1 row-cols-md-3"},ld=J(e.defineComponent({name:"ExploreLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var C,w,x,y,b;if(o.modelValue&&o.modelValue.data)return;const h={id:((C=o.modelValue)==null?void 0:C.id)||F(),type:"ExploreLinks",onlyShowPc:!1,width:((w=o.modelValue)==null?void 0:w.width)||"",bgColor:((x=o.modelValue)==null?void 0:x.bgColor)||"",api:((y=o.modelValue)==null?void 0:y.api)||"/section-link/explore/random",count:((b=o.modelValue)==null?void 0:b.count)||6};a("update:modelValue",h)},s=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=h=>{a("handlePaste",h)},m=h=>{a("handleClick",h)};i();const d=e.ref([]),p=h=>{if(!h||!o.isPreview)return{tag:"div",props:{}};if(h.startsWith("http"))return{tag:"a",props:{href:h,target:"_blank"}};if(h.startsWith("?")||h.startsWith("#")||h.startsWith("/")){const C=h.startsWith("?")?(window==null?void 0:window.location.href.split("?")[0])+h:h.startsWith("#")?(window==null?void 0:window.location.href.split("#")[0])+h:h;return{tag:"div",props:{onClick:()=>m(C)}}}return{tag:"a",props:{href:h,target:"_blank"}}},f=async()=>{var x,y;const h={params:{host:o.host,langCode:o.locale}},C=`${(x=o.modelValue)==null?void 0:x.api}?count=${(y=o.modelValue)==null?void 0:y.count}`,{data:w}=await en.get(C,h);d.value=w.data};return e.onMounted(()=>{f()}),(h,C)=>{var w,x,y;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"explore-links",onMouseenter:C[2]||(C[2]=b=>l.value=!0),onMouseleave:C[3]||(C[3]=b=>l.value=!1),style:e.normalizeStyle({backgroundColor:((w=n.modelValue)==null?void 0:w.bgColor)||"transparent"})},[n.host?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",Mv,"api组件,请在门户端查看")),d.value.length>0&&n.host?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["explore-links__container",[(x=n.modelValue)!=null&&x.width?`container-content-${(y=n.modelValue)==null?void 0:y.width}`:"container-content"]])},[C[5]||(C[5]=e.createElementVNode("h6",{class:"explore-links__title"},"更多",-1)),e.createElementVNode("ul",Ov,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,b=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:"col explore-links__item"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(b.link).tag),e.mergeProps({ref_for:!0},p(b.link).props,{class:"explore-links__link link-body-p link--udrline"}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.name),1)]),_:2},1040))]))),128))])],2)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":C[0]||(C[0]=b=>l.value=b),onHandleEdit:C[1]||(C[1]=b=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(vv,{key:1,show:r.value,"onUpdate:show":C[4]||(C[4]=b=>r.value=b),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-f2ef19cd"]]),Uv=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),Rv=["id","value"],Fv=["for"],Hv=J(e.defineComponent({name:"TabTag",__name:"index",props:{tabList:{default:()=>[]},currentIdx:{default:0}},emits:["updateFilter"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(null),l=e.ref(0),r=e.ref(0),c=e.ref(0),u=e.ref("all"),g=e.ref(!1),m=e.ref(1024),d=e.computed(()=>l.value>0),p=e.computed(()=>{if(!g.value||typeof window>"u")return 24;const y=i.value;if(!y)return 24;const b=window.getComputedStyle(y,null).getPropertyValue("padding-right").split("px")[0];return Number(b)*2}),f=e.computed(()=>r.value-l.value+p.value>c.value),h=()=>{typeof window<"u"&&(m.value=window.innerWidth)},C=()=>{if(o.tabList.length<=0)return;const y=s.value;y&&(l.value=y.scrollLeft,r.value=y.scrollWidth);const b=i.value;b&&(c.value=b.getBoundingClientRect().width)},w=y=>{s.value&&(y==="next"?s.value.scrollLeft+=200:s.value.scrollLeft-=200)},x=()=>{C()};return e.watch(u,()=>{a("updateFilter",u.value)}),e.watch(m,()=>{C()}),e.onMounted(()=>{g.value=!0,h(),typeof window<"u"&&window.addEventListener("resize",h),e.nextTick(x),e.nextTick(()=>{setTimeout(x,1e3)})}),(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"wrapper",ref:i},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:s,onScroll:x},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:b[0]||(b[0]=V=>w("prev"))},null,512),[[e.vShow,d.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"tab-tag__item"},[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"tab-tag__checkbox d-none",id:`check-${V.key}`,value:V.key,"onUpdate:modelValue":b[1]||(b[1]=T=>u.value=T)},null,8,Rv),[[e.vModelRadio,u.value]]),e.createElementVNode("label",{class:"tab-tag__btn",for:`check-${V.key}`,ref_for:!0,ref:"btn"},e.toDisplayString(V.name),9,Fv)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:b[2]||(b[2]=V=>w("next"))},null,512),[[e.vShow,f.value]])],544)],512))}}),[["__scopeId","data-v-2d0c8438"]]),jv={class:"card-school"},zv={class:"school__head"},qv=["src","alt"],Wv={key:1,class:"school__img img-fit"},Gv=["src","alt"],Xv={key:2,class:"school__watermark"},Yv=["src","alt"],Kv={class:"school__body"},Qv={key:0,class:"school__cat-list"},Zv={key:1,class:"school__title"},Jv=["innerHTML"],eM={class:"school__cta"},tM={key:0},nM=["href"],oM={key:1},aM=["href"],iM={key:3,class:"contact__link mt-3"},sM={key:4,class:"contact__link mt-3"},nf=J(e.defineComponent({name:"CardSchool",__name:"index",props:{componentProps:{default:()=>({})}},emits:["handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.image)||((x=o.componentProps)==null?void 0:x.photo_url)}),s=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.cat)||((x=o.componentProps)==null?void 0:x.tags)}),l=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.title)||((x=o.componentProps)==null?void 0:x.name)}),r=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.text)||((x=o.componentProps)==null?void 0:x.description)}),c=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.watermark)??null}),u=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.phone)??null}),g=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.email)??null}),m=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.link)||((x=o.componentProps)==null?void 0:x.website)}),d=e.computed(()=>{var w;return(w=o.componentProps)==null?void 0:w.linkText}),p=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.buttons)??null}),f=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.alt)||l.value}),h=w=>w!=null&&w.startsWith("http")?{tag:"a",props:{href:w,target:"_blank",rel:"noopener noreferrer"}}:{tag:"a",props:{href:w}},C=w=>{a("handleClick",w)};return(w,x)=>(e.openBlock(),e.createElementBlock("div",jv,[e.createElementVNode("div",zv,[m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(m.value).tag),e.mergeProps({key:0},h(m.value).props,{class:"school__img img-fit"}),{default:e.withCtx(()=>[e.createElementVNode("img",{src:i.value,alt:f.value},null,8,qv)]),_:1},16)):(e.openBlock(),e.createElementBlock("div",Wv,[e.createElementVNode("img",{src:i.value,alt:f.value},null,8,Gv)])),c.value?(e.openBlock(),e.createElementBlock("div",Xv,[e.createElementVNode("img",{src:c.value,alt:f.value},null,8,Yv)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Kv,[s.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("ul",Qv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,y=>(e.openBlock(),e.createElementBlock("li",{key:y,class:"tx-overline text-blue"},e.toDisplayString(y),1))),128))])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("h6",Zv,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"school__content",innerHTML:r.value},null,8,Jv)):e.createCommentVNode("",!0),e.createElementVNode("ul",eM,[u.value?(e.openBlock(),e.createElementBlock("li",tM,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`tel:${u.value}`},e.toDisplayString(u.value),9,nM)])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("li",oM,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`mailto:${g.value}`},e.toDisplayString(g.value),9,aM)])):e.createCommentVNode("",!0)]),m.value?(e.openBlock(),e.createElementBlock("div",iM,[e.createVNode(Mo,{type:"link",data:{text:d.value||"访问学校网页",url:m.value},isPreview:w.isPreview,onHandleClick:C},null,8,["data","isPreview"])])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",sM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(y,b)=>(e.openBlock(),e.createBlock(Mo,{key:b,type:"button",data:{text:y.text,url:y.url},isPreview:w.isPreview,onHandleClick:C},null,8,["data","isPreview"]))),128))])):e.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-bd1748ce"]]),lM={class:"school-list"},rM={key:0,class:"school-list__filter"},dM={key:0,class:"school-list__title"},cM=["id"],uM=["data-aos-delay","data-aos-anchor"],mM=J(e.defineComponent({name:"SchoolList",__name:"SchoolList",props:{componentProps:{type:Object,default:()=>({})},schoolLocations:{type:Array,default:()=>[]},schoolCategories:{type:Array,default:()=>[]},host:{type:String,default:()=>""},locale:{type:String,default:()=>""}},setup(n){const t=n,o=e.ref("all"),a=Date.now(),i=e.ref([]),s=e.computed(()=>t.schoolLocations),l=e.computed(()=>t.schoolCategories),r=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.width)??null}),c=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.title)??null}),u=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.colDesktop)??3}),g=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.colMobile)??1}),m=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.slug)??"all"}),d=e.computed(()=>{const y=l.value.find(b=>b.slug===m.value);return(y==null?void 0:y.id)??NaN}),p=e.computed(()=>{let y=[{id:"all",name:"全部"}];return y.push(...s.value),y.map(V=>({...V,key:V.id}))}),f=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.list)??[]}),h=e.computed(()=>isNaN(d.value)?i.value:f.value),C=y=>{o.value=y},w=async()=>{try{const y={params:{host:t.host,langCode:t.locale}},b="/school/listForComponent",{data:V}=await en.get(b,y);i.value=V.data}catch(y){console.error("Error fetching school list:",y)}},x=async y=>{try{const b={params:{host:t.host,langCode:t.locale,locationId:y}},V="/school/location",{data:T}=await en.get(V,b);i.value=T.data}catch(b){console.error("Error fetching location list:",b)}};return e.watch(o,y=>{console.log("filter changed:",y),y==="all"?w():x(y)},{immediate:!0}),e.onMounted(()=>{isNaN(d.value)&&w()}),(y,b)=>(e.openBlock(),e.createElementBlock("div",lM,[p.value&&p.value.length>0&&isNaN(d.value)?(e.openBlock(),e.createElementBlock("div",rM,[e.createVNode(Hv,{tabList:p.value,onUpdateFilter:C},null,8,["tabList"])])):e.createCommentVNode("",!0),h.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["school-list__wrapper",[r.value]])},[c.value?(e.openBlock(),e.createElementBlock("h4",dM,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${g.value}`,`row-cols-md-${u.value}`,{"small-gap":u.value>4}]]),id:`school-list-${e.unref(a)}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:V.name,"data-aos":"fade-up","data-aos-delay":Number(T)*100,"data-aos-anchor":`#school-list-${e.unref(a)}`},[e.createVNode(nf,{componentProps:V},null,8,["componentProps"])],8,uM))),128))],10,cM)],2)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ebd2a9a9"]]),pM={class:"setting-content"},hM={class:"setting-header flex items-center"},fM={class:"setting-header flex items-center"},gM={class:"setting-header flex items-center"},yM=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},slugList:{type:Array,default:()=>[]}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",pM,[e.createElementVNode("div",hM,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",fM,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"学校类别",-1)),e.createVNode(c,{modelValue:n.data.slug,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.slug=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.slugList,m=>(e.openBlock(),e.createBlock(r,{key:m.slug,value:m.slug},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",gM,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(u,{modelValue:n.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-1a76979f"]]);var of={exports:{}},St=of.exports={},wo,bo;function Bu(){throw new Error("setTimeout has not been defined")}function Pu(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?wo=setTimeout:wo=Bu}catch{wo=Bu}try{typeof clearTimeout=="function"?bo=clearTimeout:bo=Pu}catch{bo=Pu}})();function af(n){if(wo===setTimeout)return setTimeout(n,0);if((wo===Bu||!wo)&&setTimeout)return wo=setTimeout,setTimeout(n,0);try{return wo(n,0)}catch{try{return wo.call(null,n,0)}catch{return wo.call(this,n,0)}}}function _M(n){if(bo===clearTimeout)return clearTimeout(n);if((bo===Pu||!bo)&&clearTimeout)return bo=clearTimeout,clearTimeout(n);try{return bo(n)}catch{try{return bo.call(null,n)}catch{return bo.call(this,n)}}}var Fo=[],Vi=!1,Ra,rd=-1;function wM(){!Vi||!Ra||(Vi=!1,Ra.length?Fo=Ra.concat(Fo):rd=-1,Fo.length&&sf())}function sf(){if(!Vi){var n=af(wM);Vi=!0;for(var t=Fo.length;t;){for(Ra=Fo,Fo=[];++rd<t;)Ra&&Ra[rd].run();rd=-1,t=Fo.length}Ra=null,Vi=!1,_M(n)}}St.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];Fo.push(new lf(n,t)),Fo.length===1&&!Vi&&af(sf)};function lf(n,t){this.fun=n,this.array=t}lf.prototype.run=function(){this.fun.apply(null,this.array)},St.title="browser",St.browser=!0,St.env={},St.argv=[],St.version="",St.versions={};function Ho(){}St.on=Ho,St.addListener=Ho,St.once=Ho,St.off=Ho,St.removeListener=Ho,St.removeAllListeners=Ho,St.emit=Ho,St.prependListener=Ho,St.prependOnceListener=Ho,St.listeners=function(n){return[]},St.binding=function(n){throw new Error("process.binding is not supported")},St.cwd=function(){return"/"},St.chdir=function(n){throw new Error("process.chdir is not supported")},St.umask=function(){return 0};var bM=of.exports;const CM={key:0},VM={key:0,class:"school-layout__logo"},xM={key:1,class:"school-layout__article"},dd=J(e.defineComponent({name:"SchoolLayout",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i={schoolCategories:"/school/category/listForWeb",schoolLocations:"/location/listForWeb"},s=e.ref([]),l=e.ref([]),r=()=>{Promise.all([en.get(i.schoolCategories,{params:{langCode:o.locale,host:o.host}}),en.get(i.schoolLocations)]).then(([T,k])=>{s.value=T.data.data,l.value=k.data.data,bM.nextTick(()=>{console.log("slugId",b.value),isNaN(b.value)||V()})})},c=()=>{var k,S,D,N,A,$;if(o.modelValue&&o.modelValue.data)return;const T={id:((k=o.modelValue)==null?void 0:k.id)||F(),type:"SchoolLayout",onlyShowPc:!1,api:((S=o.modelValue)==null?void 0:S.api)||"/school/getByCategoryId",title:((N=(D=o.modelValue)==null?void 0:D.data)==null?void 0:N.title)||"这里是标题",slug:(($=(A=o.modelValue)==null?void 0:A.data)==null?void 0:$.slug)||"ywiek"};a("update:modelValue",T)},u=e.computed(()=>{var T;return o.isPreview?!((T=o.modelValue)!=null&&T.onlyShowPc)||!Te():!0}),g=e.ref(!1),m=e.ref(!1),d=()=>{a("handleDelete",o.modelValue.id)},p=()=>{a("handleCopy",o.modelValue)},f=T=>{a("handlePaste",T)};r(),c();const h=e.ref([]),C=e.ref([]),w=e.ref([]),x=e.ref({id:F(),type:"MediaLogo",bgColor:"",width:"",data:[]}),y=e.ref({id:F(),type:"ArticleList",bgColor:"",width:"",data:[]}),b=e.computed(()=>{const T=s.value.find(k=>k.slug===o.modelValue.slug);return(T==null?void 0:T.id)??NaN}),V=async()=>{try{const T={params:{host:o.host,langCode:o.locale,categoryId:b.value}},{data:k}=await en.get(o.modelValue.api,T);w.value=k.data.schools;const S=k.data.logo_url;S&&(h.value=Array.isArray(S)?S.map(U=>({id:F(),url:U.url})):[{id:F(),imgSrc:S}],x.value.data=h.value,console.log("logo_list",h.value));const D=k.data.photo_url,N=k.data.name,A=k.data.description,$=k.data.caption,I=k.data.buttons;A&&C.value.push({id:F(),type:"Article",title:N||null,content:A,buttonList:I==null?void 0:I.map(U=>({id:F(),...U}))}),D&&C.value.push({id:F(),type:"Image",imgSrc:D,caption:$?N:null}),y.value.data=C.value}catch(T){console.error("Error fetching category list:",T)}};return(T,k)=>{var S,D;return e.openBlock(),e.createElementBlock(e.Fragment,null,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"school-layout",onMouseenter:k[4]||(k[4]=N=>g.value=!0),onMouseleave:k[5]||(k[5]=N=>g.value=!1)},[n.host?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value.length>0?(e.openBlock(),e.createElementBlock("div",VM,[e.createVNode(vs,{isPreview:!1,modelValue:x.value,"onUpdate:modelValue":k[0]||(k[0]=N=>x.value=N)},null,8,["modelValue"])])):e.createCommentVNode("",!0),C.value.length>0?(e.openBlock(),e.createElementBlock("div",xM,[e.createVNode(fs,{isPreview:!1,modelValue:y.value,"onUpdate:modelValue":k[1]||(k[1]=N=>y.value=N)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["school-layout__school",{"mt-0":w.value.length<=0}])},[e.createVNode(mM,{componentProps:{title:(S=n.modelValue)==null?void 0:S.title,list:w.value,slug:(D=n.modelValue)==null?void 0:D.slug,width:"container-content"},schoolLocations:l.value,schoolCategories:s.value,host:n.host,locale:n.locale},null,8,["componentProps","schoolLocations","schoolCategories","host","locale"])],2)],64)):(e.openBlock(),e.createElementBlock("p",CM,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:g.value,"onUpdate:show":k[2]||(k[2]=N=>g.value=N),onHandleEdit:k[3]||(k[3]=N=>m.value=!0),onHandleDelete:d,onHandleCopy:p,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(yM,{key:1,show:m.value,"onUpdate:show":k[6]||(k[6]=N=>m.value=N),data:n.modelValue,slugList:s.value},null,8,["show","data","slugList"]))],64)}}}),[["__scopeId","data-v-3e22366c"]]),kM=Object.freeze(Object.defineProperty({__proto__:null,default:dd},Symbol.toStringTag,{value:"Module"})),EM={class:"setting-content"},TM={class:"setting-header flex items-center"},NM={class:"setting-header flex items-center"},SM={class:"setting-header flex items-center"},BM={class:"setting-header flex items-center"},PM=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",EM,[e.createElementVNode("div",TM,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},{default:e.withCtx(()=>[...s[4]||(s[4]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",NM,[s[10]||(s[10]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",SM,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(u,{modelValue:n.data.desktopCol,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.desktopCol=m),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",BM,[s[12]||(s[12]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(u,{modelValue:n.data.mobileCol,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.mobileCol=m),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-6465c19c"]]),DM={key:0},$M={class:"mt-10 mt-md-12"},cd=J(e.defineComponent({name:"CardCarouselMultiRowPublications",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var M,W,Z;if(o.modelValue&&o.modelValue.data)return;const R={id:((M=o.modelValue)==null?void 0:M.id)||F(),type:"CardCarouselMultiRowPublications",onlyShowPc:!1,width:((W=o.modelValue)==null?void 0:W.width)||"",api:((Z=o.modelValue)==null?void 0:Z.api)||"/publication/listForComponent",desktopCol:4,mobileCol:2};a("update:modelValue",R)},s=e.computed(()=>{var R;return o.isPreview?!((R=o.modelValue)!=null&&R.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=R=>{a("handlePaste",R)},m=R=>{a("handleClick",R)};i();const d=[ut.Navigation,ut.Pagination],p={768:{slidesPerView:"auto",slidesPerGroup:1,slidesPerGroupAuto:!0,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}},f=e.ref(null),h=e.ref(null),C=e.ref(0),w=e.ref([]),x=e.ref([]),y=e.ref(1024),b=e.computed(()=>(y.value>=768&&y.value>=1024?4:3)*2),V=e.computed(()=>y.value>=768?y.value>=1024?4:3:2),T=e.computed(()=>x.value.length>1);e.watch(C,()=>{const R=f.value;G(R)});const k=()=>{typeof window<"u"&&(y.value=window.innerWidth)},S=async()=>{var R,M;if((R=o.modelValue)!=null&&R.api){const W=`${(M=o.modelValue)==null?void 0:M.api}`,Z={params:{host:o.host,langCode:o.locale}},{data:ie}=await en.get(W,Z);x.value=ie.data}D()},D=()=>{const R=x.value.reduce((M,W,Z)=>{const ie=Math.floor(Z/b.value);return M[ie]||(M[ie]=[]),M[ie].push(W),M},[]);w.value=R},N=R=>{h.value=R},A=()=>{h.value&&(C.value=h.value.realIndex,H(),O())},$=R=>{h.value&&h.value.slideToLoop(R,600)},I=R=>{if(R.video_type==="outer")return;const M=x.value.filter(Z=>Z.video_type!=="outer"&&Z.type!=="photo"),W=M.findIndex(Z=>Z.slug===R.slug);a("showLightboxVideo",{idx:W,list:M})},U=R=>{const M=x.value.filter(Z=>Z.type==="photo"),W=M.findIndex(Z=>Z.slug===R.slug);a("showLightboxImage",{idx:W,url:R.url,text:R.text||R.title,list:M})},Y=R=>{const M=R.getBoundingClientRect();return{x:M.left+window.pageXOffset,y:M.top+window.pageYOffset}},G=R=>{if(!R||typeof window>"u")return;const M=y.value>=1024?170:150,W=Y(R).y-M;window.scroll({top:W,left:0,behavior:"smooth"})},q=R=>{const M=R.currentTarget,W=M.dataset.slug,Z=M.dataset.type,ie=x.value.find(ge=>ge.key==W||ge.slug==W);ie&&(Z==="photo"?U(ie):I(ie))},O=()=>{typeof document>"u"||(Object.values(document.getElementsByClassName("card-asset")).forEach(R=>{R.addEventListener("click",q)}),Object.values(document.getElementsByClassName("card-video")).forEach(R=>{R.addEventListener("click",q)}))},H=()=>{typeof document>"u"||(Object.values(document.getElementsByClassName("card-asset")).forEach(R=>{R.removeEventListener("click",q)}),Object.values(document.getElementsByClassName("card-video")).forEach(R=>{R.removeEventListener("click",q)}))};return e.onMounted(()=>{k(),typeof window<"u"&&window.addEventListener("resize",k),S()}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",k),H()}),(R,M)=>{var W,Z;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-carousel-multi-row",onMouseenter:M[2]||(M[2]=ie=>l.value=!0),onMouseleave:M[3]||(M[3]=ie=>l.value=!1),ref_key:"parent",ref:f},[n.host?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["card-carousel__wrapper",[(W=n.modelValue)!=null&&W.width?`container-content-${(Z=n.modelValue)==null?void 0:Z.width}`:"container-content"]])},[w.value.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(kt.Swiper),{ref_key:"swiperRef",ref:h,modules:d,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group-skip":1,"space-between":16,loop:!0,breakpoints:p,class:"swiper card-carousel__swiper",onSlideChange:A,onSwiper:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ie,ge)=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{class:"swiper-slide",key:ge},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${V.value}`]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie,Le=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:Le.key||Le.slug},[e.createVNode(nf,{componentProps:Le,onHandleClick:m},null,8,["componentProps"])]))),128))],2)]),_:2},1024))),128))]),_:1},512),e.withDirectives(e.createElementVNode("div",$M,[e.createVNode(wi,{currentIndex:C.value,onUpdatePage:$,count:w.value.length,dark:""},null,8,["currentIndex","count"])],512),[[e.vShow,T.value]])],64)):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("p",DM,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":M[0]||(M[0]=ie=>l.value=ie),onHandleEdit:M[1]||(M[1]=ie=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PM,{key:1,show:r.value,"onUpdate:show":M[4]||(M[4]=ie=>r.value=ie),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-3c68e4bd"]]),LM=Object.freeze(Object.defineProperty({__proto__:null,default:cd},Symbol.toStringTag,{value:"Module"})),AM=[{label:"Common",key:"common",image:"",children:[{label:"CustomSpace",name:"CustomSpace",key:"custom_space",image:"../../assets/images/CustomSpace.png"},{label:"CustomText",name:"CustomText",key:"custom_text",image:""},{label:"QuoteText",name:"QuoteText",key:"quote_text",image:"../../assets/images/QuoteText.png"},{label:"ArticleList",name:"ArticleList",key:"article_list",image:"../../assets/images/ArticleList.png"},{label:"ArticleListPureText",name:"ArticleListPureText",key:"article_list_pure_text",image:""}]},{label:"Media",key:"media",image:"",children:[{label:"MedialmageFull",name:"MediaImageFull",key:"media_image_full",image:""},{label:"MedialmageStatic",name:"MediaImageStatic",key:"media_image_static",image:""},{label:"MediaVideo",name:"MediaVideo",key:"media_video",image:""}]},{label:"Links",key:"links",image:"",children:[{label:"BtnList",name:"BtnList",key:"btn_list",image:"../../assets/images/BtnList.png"},{label:"LinkList",name:"LinkList",key:"link_list",image:"../../assets/images/LinkList.png"},{label:"DonorLinks",name:"DonorLinks",key:"donor_links",image:"../../assets/images/DonorLinks.png"},{label:"GridLinks",name:"GridLinks",key:"grid_links",image:""},{label:"DetailLink",name:"DetailLink",key:"detail_link",image:""},{label:"InformationLink",name:"InformationLink",key:"information_link",image:""}]},{label:"Headers",key:"headers",image:"",children:[{label:"BannerPage",name:"BannerPage",key:"banner_page",image:"../../assets/images/BannerPage.png"},{label:"BannerImage",name:"BannerImage",key:"banner_image",image:"../../assets/images/BannerImage.png"},{label:"MapStatic",name:"MapStatic",key:"map_static",image:"../../assets/images/MapStatic.png"},{label:"VrTour",name:"VrTour",key:"vr_tour",image:""}]},{label:"Collections",key:"collections",image:"",children:[{label:"HeroSlide",name:"HeroSlide",key:"hero_slide",image:"../../assets/images/HeroSlide.png"},{label:"AccordionText",name:"AccordionText",key:"accordion_text",image:""},{label:"CardCarousel (Profiles)",name:"CardCarousel",key:"card_carousel_profiles",image:"../../assets/images/CardCarousel.png"},{label:"CardCarouselMultiRow (Profiles)",name:"CardCarouselMultiRow",key:"card_carousel_multi_row_profiles",image:"../../assets/images/CardCarouselMultiRow.png"},{label:"CardList (Circle)",name:"CardListCircle",key:"card_list_circle",image:""},{label:"CardList (Programme)",name:"CardListProgramme",key:"card_list_programme",image:""},{label:"CardList (School)",name:"CardListSchool",key:"card_list_school",image:""},{label:"CardShowcaseProfile",name:"CardShowcaseProfile",key:"card_showcase_profile",image:"../../assets/images/CardShowcaseProfile.png"},{label:"CarouselLogo",name:"CarouselLogo",key:"carousel_logo",image:"../../assets/images/CarouselLogo.png"},{label:"Resources",name:"Resources",key:"resources",image:""},{label:"ResourcesTwo",name:"ResourcesTwo",key:"resources_two",image:""},{label:"Process",name:"Process",key:"process",image:"../../assets/images/Process.png"},{label:"TableTwo",name:"TableTwo",key:"table_two",image:"../../assets/images/TableTwo.png"},{label:"GalleryList (Default)",name:"GalleryDefault",key:"gallery_list_default",image:"../../assets/images/GalleryDefault.png"},{label:"GalleryList (Caption)",name:"GalleryList",key:"gallery_list_caption",image:"../../assets/images/GalleryList.png"},{label:"GalleryList (Caption - Round)",name:"GalleryCaptionRound",key:"gallery_list_caption_round",image:"../../assets/images/GalleryCaptionRound.png"},{label:"GalleryList (Timeline - One Column)",name:"GalleryTimeline",key:"gallery_list_timeline_one_column",image:"../../assets/images/GalleryTimeline.png"},{label:"GalleryList (Timeline - Two Columns)",name:"GalleryTimelineCol",key:"gallery_list_timeline_two_columns",image:"../../assets/images/GalleryTimelineCol.png"},{label:"TabDefault",name:"TabDefault",key:"tab_default",image:""},{label:"TabTimeLine",name:"TabTimeLine",key:"tab_time_line",image:""},{label:"Disc",name:"Disc",key:"disc",image:""},{label:"BasicCollapse",name:"BasicCollapse",key:"basic_collapse",image:""},{label:"TableCollapse",name:"TableCollapse",key:"table_collapse",image:""},{label:"MediaLogo",name:"MediaLogo",key:"media_logo",image:""},{label:"CollapseCustom",name:"CollapseCustom",key:"collapse_custom",image:""},{label:"ScrollKeyInfo",name:"ScrollKeyInfo",key:"scroll_key_info",image:"../../assets/images/ScrollKeyInfo.png"},{label:"CardCarouselMultiRow (Articles)",name:"CardCarouselMultiRowArticles",key:"card_carousel_multi_row_articles",image:""},{label:"Publications",name:"Publications",key:"publications",image:"../../assets/images/Publications.png"}]},{label:"Contact Information",key:"contact_information",image:"",children:[{label:"ContactUsInfo",name:"ContactUsInfo",key:"contact_us_info",image:"../../assets/images/ContactUsInfo.png"},{label:"ContactUsList",name:"ContactUsList",key:"contact_us_list",image:"../../assets/images/ContactUsList.png"}]},{label:"Sections",key:"sections",image:"",children:[{label:"TabPage",name:"TabPage",key:"tab_page",image:""},{label:"TabLogo",name:"TabLogo",key:"tab_page",image:""}]},{label:"Others",key:"others",image:"",children:[{label:"Articleitem",name:"ArticleItem",key:"article_item",image:"../../assets/images/ArticleItem.png"},{label:"CountDown",name:"CountDown",key:"count_down",image:"../../assets/images/CountDown.png"},{label:"Customlframe",name:"CustomIframe",key:"custom_iframe",image:"../../assets/images/CustomIframe.png"},{label:"TheHistoryCarousel",name:"TheHistoryCarousel",key:"the_history_carousel",image:"../../assets/images/TheHistoryCarousel.png"},{label:"TimelineStory",name:"TimelineStory",key:"timeline_story",image:"../../assets/images/TimelineStory.png"},{label:"RegisterForm (Event)",name:"RegisterForm",key:"register_form_event",image:""}]},{label:"YCYW 90th",key:"ycyw_90th",image:"",children:[{label:"BackgroundWrapper",name:"BackgroundWrapper",key:"background_wrapper",image:""},{label:"BannerQuote",name:"BannerQuote",key:"banner_quote",image:"../../assets/images/BannerQuote.png"},{label:"BannerlmageWithLink",name:"BannerImageWithLink",key:"banner_image_with_link",image:"../../assets/images/BannerImageWithLink.png"},{label:"BlessingMessage",name:"BlessingMessage",key:"blessing_message",image:""},{label:"BlessingSlider",name:"BlessingSlider",key:"blessing_slider",image:""},{label:"GalleryBlock",name:"GalleryBlock",key:"gallery_block",image:""},{label:"RibbonBlock",name:"RibbonBlock",key:"ribbon_block",image:"../../assets/images/RibbonBlock.png"}]},{label:"API-related Components",key:"api_related_components",image:"",children:[{label:"NewsList",name:"NewsList",key:"news_list",image:"../../assets/images/NewsList.png"},{label:"ExploreLinks",name:"ExploreLinks",key:"explore_links",image:""},{label:"CardShowcase",name:"CardShowcase",key:"card_showcase",image:""},{label:"CardCarousel (Articles)",name:"CardCarouselArticles",key:"card_carousel_articles",image:"../../assets/images/CardCarouselArticles.png"},{label:"CardCarouselMultiRow (Publications)",name:"CardCarouselMultiRowPublications",key:"card_carousel_multi_row_publications",image:""},{label:"Alumni Community List",name:"AlummiCommunityList",key:"alumni_community_list",image:""},{label:"School Layout",name:"SchoolLayout",key:"school_layout",image:""}]}],IM={class:"search-box"},vM={class:"component-section"},MM={class:"section-title"},OM={class:"section-description"},UM={class:"component-grid"},RM=["onClick"],FM={class:"thumbnail-placeholder"},HM={class:"component-name"},jM=J({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","ok","cancel"],setup(n,{emit:t}){const o=n,a=t,i=e.reactive({}),s=e.ref(["common"]),l=e.ref(AM),r=e.ref({}),c=e.computed(()=>r.value.children||[]);e.watch(c,d=>{d.forEach(p=>{i[p.label]||(i[p.label]=null)})},{immediate:!0}),e.watch(s,d=>{r.value=l.value.find(p=>p.key===d[0])||{}},{immediate:!0});const u=d=>{a("ok",JSON.parse(JSON.stringify({type:d.label,id:F()})))},g=e.computed({get:()=>o.visible,set:d=>a("update:visible",d)}),m=()=>{const d=["#3498db","#2ecc71","#e74c3c","#f1c40f","#9b59b6","#1abc9c"];return d[Math.floor(Math.random()*d.length)]};return(d,p)=>{const f=e.resolveComponent("a-input-search"),h=e.resolveComponent("a-menu-item"),C=e.resolveComponent("a-menu"),w=e.resolveComponent("a-layout-sider"),x=e.resolveComponent("a-layout-content"),y=e.resolveComponent("a-layout"),b=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(b,{visible:g.value,"onUpdate:visible":p[1]||(p[1]=V=>g.value=V),title:"添加组件",width:"90%",footer:!1},{default:e.withCtx(()=>[e.createVNode(y,{class:"component-library-container",style:{display:"flex"}},{default:e.withCtx(()=>[e.createVNode(w,{width:240,style:{background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)"}},{default:e.withCtx(()=>[e.createElementVNode("div",IM,[e.createVNode(f,{placeholder:"Search components..."})]),e.createVNode(C,{"selected-keys":s.value,"onUpdate:selectedKeys":p[0]||(p[0]=V=>s.value=V),style:{height:"100%",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,V=>(e.openBlock(),e.createBlock(h,{key:V.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1024))),128))]),_:1},8,["selected-keys"])]),_:1}),e.createVNode(x,{style:{padding:"24px 40px 24px 24px",background:"#f5f5f5"}},{default:e.withCtx(()=>[e.createElementVNode("div",vM,[e.createElementVNode("h2",MM,e.toDisplayString(r.value.label),1),e.createElementVNode("p",OM,e.toDisplayString(r.value.description),1),e.createElementVNode("div",UM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(V,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:"component-card",onClick:k=>u(V)},[e.createElementVNode("div",FM,[e.createElementVNode("div",{class:"thumbnail-color",style:e.normalizeStyle({backgroundColor:m()})},null,4)]),e.createElementVNode("div",HM,e.toDisplayString(V.label),1)],8,RM))),128))])])]),_:1})]),_:1})]),_:1},8,["visible"])}}},[["__scopeId","data-v-72c80758"]]),Co=e.defineComponent({__name:"DynamicComponentLoader",props:{type:{},propsData:{}},emits:["handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=Object.assign({"/src/components/AccordionText/index.vue":()=>Promise.resolve().then(()=>zQ),"/src/components/AlummiCommunityList/index.vue":()=>Promise.resolve().then(()=>iI),"/src/components/ArticleItem/index.vue":()=>Promise.resolve().then(()=>K3),"/src/components/ArticleList/index.vue":()=>Promise.resolve().then(()=>dw),"/src/components/ArticleListPureText/index.vue":()=>Promise.resolve().then(()=>JA),"/src/components/BackgroundWrapper/index.vue":()=>Promise.resolve().then(()=>$Y),"/src/components/BannerImage/index.vue":()=>Promise.resolve().then(()=>gw),"/src/components/BannerImageWithLink/index.vue":()=>Promise.resolve().then(()=>vN),"/src/components/BannerPage/index.vue":()=>Promise.resolve().then(()=>Tw),"/src/components/BannerQuote/index.vue":()=>Promise.resolve().then(()=>I3),"/src/components/BasicCollapse/index.vue":()=>Promise.resolve().then(()=>ED),"/src/components/BlessingMessage/index.vue":()=>Promise.resolve().then(()=>HI),"/src/components/BlessingSlider/index.vue":()=>Promise.resolve().then(()=>nv),"/src/components/BtnList/index.vue":()=>Promise.resolve().then(()=>Hw),"/src/components/CardCarousel/index.vue":()=>Promise.resolve().then(()=>n3),"/src/components/CardCarouselArticles/index.vue":()=>Promise.resolve().then(()=>oA),"/src/components/CardCarouselMultiRow/index.vue":()=>Promise.resolve().then(()=>V3),"/src/components/CardCarouselMultiRowArticles/index.vue":()=>Promise.resolve().then(()=>hA),"/src/components/CardCarouselMultiRowPublications/index.vue":()=>Promise.resolve().then(()=>LM),"/src/components/CardListCircle/index.vue":()=>Promise.resolve().then(()=>hU),"/src/components/CardListProgramme/index.vue":()=>Promise.resolve().then(()=>FU),"/src/components/CardListSchool/index.vue":()=>Promise.resolve().then(()=>gR),"/src/components/CardShowcase/index.vue":()=>Promise.resolve().then(()=>Dv),"/src/components/CardShowcaseProfile/index.vue":()=>Promise.resolve().then(()=>u5),"/src/components/CarouselLogo/index.vue":()=>Promise.resolve().then(()=>k7),"/src/components/CollapseCustom/index.vue":()=>Promise.resolve().then(()=>uK),"/src/components/ContactUsInfo/index.vue":()=>Promise.resolve().then(()=>_S),"/src/components/ContactUsList/index.vue":()=>Promise.resolve().then(()=>tN),"/src/components/CountDown/index.vue":()=>Promise.resolve().then(()=>N5),"/src/components/CustomIframe/index.vue":()=>Promise.resolve().then(()=>v5),"/src/components/CustomSpace/index.vue":()=>Promise.resolve().then(()=>ux),"/src/components/CustomText/index.vue":()=>Promise.resolve().then(()=>CA),"/src/components/DetailLink/index.vue":()=>Promise.resolve().then(()=>xR),"/src/components/Disc/index.vue":()=>Promise.resolve().then(()=>pD),"/src/components/DonorLinks/index.vue":()=>Promise.resolve().then(()=>T8),"/src/components/ExploreLinks/index.vue":()=>Promise.resolve().then(()=>Uv),"/src/components/GalleryBlock/index.vue":()=>Promise.resolve().then(()=>RL),"/src/components/GalleryCaptionRound/index.vue":()=>Promise.resolve().then(()=>$b),"/src/components/GalleryDefault/index.vue":()=>Promise.resolve().then(()=>rb),"/src/components/GalleryList/index.vue":()=>Promise.resolve().then(()=>ck),"/src/components/GalleryTimeline/index.vue":()=>Promise.resolve().then(()=>kC),"/src/components/GalleryTimelineCol/index.vue":()=>Promise.resolve().then(()=>iV),"/src/components/GridLinks/index.vue":()=>Promise.resolve().then(()=>kQ),"/src/components/HeroSlide/index.vue":()=>Promise.resolve().then(()=>zk),"/src/components/InformationLink/index.vue":()=>Promise.resolve().then(()=>CX),"/src/components/LinkLIst/index.vue":()=>Promise.resolve().then(()=>t8),"/src/components/MapStatic/index.vue":()=>Promise.resolve().then(()=>Z9),"/src/components/MediaImageFull/index.vue":()=>Promise.resolve().then(()=>$A),"/src/components/MediaImageStatic/index.vue":()=>Promise.resolve().then(()=>HA),"/src/components/MediaLogo/index.vue":()=>Promise.resolve().then(()=>y$),"/src/components/MediaVideo/index.vue":()=>Promise.resolve().then(()=>mX),"/src/components/NewsList/index.vue":()=>Promise.resolve().then(()=>v4),"/src/components/Process/index.vue":()=>Promise.resolve().then(()=>sx),"/src/components/Publications/index.vue":()=>Promise.resolve().then(()=>u9),"/src/components/QuoteText/index.vue":()=>Promise.resolve().then(()=>u8),"/src/components/RegisterForm/index.vue":()=>Promise.resolve().then(()=>CL),"/src/components/Resources/index.vue":()=>Promise.resolve().then(()=>VP),"/src/components/ResourcesTwo/index.vue":()=>Promise.resolve().then(()=>OP),"/src/components/RibbonBlock/index.vue":()=>Promise.resolve().then(()=>iE),"/src/components/SchoolLayout/index.vue":()=>Promise.resolve().then(()=>kM),"/src/components/ScrollKeyInfo/index.vue":()=>Promise.resolve().then(()=>B6),"/src/components/TabDefault/index.vue":()=>Promise.resolve().then(()=>gO),"/src/components/TabLogo/index.vue":()=>Promise.resolve().then(()=>gY),"/src/components/TabPage/index.vue":()=>Promise.resolve().then(()=>KX),"/src/components/TabTimeLine/index.vue":()=>Promise.resolve().then(()=>qO),"/src/components/TableCollapse/index.vue":()=>Promise.resolve().then(()=>JD),"/src/components/TableTwo/index.vue":()=>Promise.resolve().then(()=>VN),"/src/components/TheHistoryCarousel/index.vue":()=>Promise.resolve().then(()=>LT),"/src/components/TimelineStory/index.vue":()=>Promise.resolve().then(()=>jE),"/src/components/VrTour/index.vue":()=>Promise.resolve().then(()=>lQ)}),a={};for(const g in o)try{const m=g.split("/"),d=m[m.length-2];a[d]=e.defineAsyncComponent(o[g])}catch(m){console.error("组件注册失败:",g,m)}a.DynamicComponentLoader=Co;const i=g=>a[g]||"div",s=t,l=g=>{s("handleDelete",g)},r=g=>{s("handleCopy",g)},c=g=>{s("handlePaste",g)},u=g=>{s("handleClick",g)};return(g,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(n.type)),e.mergeProps(n.propsData,{onHandleDelete:l,onHandleCopy:r,onHandlePaste:c,onHandleClick:u}),null,16))}}),zM={class:"page-content"},qM={key:0,style:{width:"100%"}},WM={class:"add-btn"},GM={key:1},Fa=J({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["update"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=n,s=t,l=e.ref(!1),r=e.ref(0),c=e.ref([...i.data]);e.watch(()=>i.data,h=>{c.value=[...h]},{deep:!0});const u=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),g=h=>h&&h.length>1,m=(h=0)=>{r.value=h,l.value=!0},d=(h,C)=>{console.log("===================updateComponentValue=================="),c.value[h]=C,s("update",[...c.value]),console.log("组件更新:",c.value)},p=()=>{a.value=!1,s("update",[...c.value])},f=h=>{l.value=!1,c.value.splice(r.value+1,0,h),s("update",[...c.value])};return(h,C)=>{const w=e.resolveComponent("icon-plus"),x=e.resolveComponent("a-button");return e.openBlock(),e.createElementBlock("div",zM,[c.value&&c.value.length>0?(e.openBlock(),e.createElementBlock("div",qM,[e.createVNode(e.unref(o),e.mergeProps({modelValue:c.value,"onUpdate:modelValue":C[0]||(C[0]=y=>c.value=y),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},u.value,{disabled:!g(c.value),onStart:C[1]||(C[1]=y=>a.value=!0),onEnd:p,"item-key":"id"}),{item:e.withCtx(({element:y,index:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item component-wrapper",{"sortable-disabled":!g(c.value)}]),key:y.id},[e.createVNode(Co,{type:y.type,"props-data":{isPreview:!1,modelValue:y,"onUpdate:modelValue":V=>d(b,V)}},null,8,["type","props-data"]),e.createElementVNode("div",WM,[e.createVNode(x,{type:"primary",onClick:V=>m(b)},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" Add Component ",-1))]),_:1},8,["onClick"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])):(e.openBlock(),e.createElementBlock("div",GM,[e.createVNode(x,{type:"primary",class:"add-component-btn",onClick:m},{default:e.withCtx(()=>[...C[4]||(C[4]=[e.createTextVNode(" 添加组件 ",-1)])]),_:1})])),e.createVNode(jM,{visible:l.value,"onUpdate:visible":C[2]||(C[2]=y=>l.value=y),onOk:f},null,8,["visible"])])}}},[["__scopeId","data-v-0a011a71"]]),XM={class:"setting-content"},YM={class:"setting-header flex items-center"},KM={class:"setting-header flex items-center"},QM={class:"setting-header flex items-center"},ZM={class:"setting-header flex items-center"},JM={class:"setting-body"},eO={class:"setting-toolbar"},tO={class:"tools"},nO={class:"setting-item"},oO={class:"item-header"},aO={class:"btn-group"},iO={key:0,class:"drag-handle"},sO={class:"components-content"},lO=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=m=>{l.data.data.push({id:F(),type:"Video",videoSrc:"",imgSrc:"",name:"",key:"",componentsDataJson:[]})},g=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("a-option"),h=e.resolveComponent("a-select"),C=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),x=e.resolveComponent("icon-drag-arrow"),y=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",XM,[e.createElementVNode("div",YM,[d[10]||(d[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=T=>n.data.onlyShowPc=T)},null,8,["modelValue"])]),e.createElementVNode("div",KM,[d[15]||(d[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(h,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=T=>n.data.width=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:""},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(f,{value:"small"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(f,{value:"middle"},{default:e.withCtx(()=>[...d[13]||(d[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(f,{value:"max"},{default:e.withCtx(()=>[...d[14]||(d[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",QM,[d[18]||(d[18]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(h,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[2]||(d[2]=T=>n.data.bgColor=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:"white"},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(f,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",ZM,[d[21]||(d[21]=e.createElementVNode("span",{class:"header-title"},"居中",-1)),e.createVNode(h,{modelValue:n.data.center,"onUpdate:modelValue":d[3]||(d[3]=T=>n.data.center=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:!0},{default:e.withCtx(()=>[...d[19]||(d[19]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(f,{value:!1},{default:e.withCtx(()=>[...d[20]||(d[20]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",JM,[e.createElementVNode("div",eO,[d[24]||(d[24]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",tO,[e.createVNode(w,{type:"primary",onClick:d[4]||(d[4]=T=>u())},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[d[22]||(d[22]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(w,{type:"primary",onClick:d[5]||(d[5]=T=>u())},{default:e.withCtx(()=>[...d[23]||(d[23]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",nO,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[7]||(d[7]=T=>n.data.data=T),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[8]||(d[8]=T=>a.value=!0),onEnd:d[9]||(d[9]=T=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:T})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:T.id},[e.createElementVNode("div",oO,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(T.name),1),e.createElementVNode("span",null,e.toDisplayString(T.key),1)]),e.createElementVNode("div",aO,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",iO,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:k=>g(T.id)},null,8,["onClick"]),e.createVNode(w,{size:"mini",type:"primary",onClick:d[6]||(d[6]=k=>u())},{default:e.withCtx(()=>[...d[25]||(d[25]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[26]||(d[26]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(b,{modelValue:T.name,"onUpdate:modelValue":k=>T.name=k,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[27]||(d[27]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(b,{modelValue:T.key,"onUpdate:modelValue":k=>T.key=k,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[28]||(d[28]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",sO,[e.createVNode(Fa,{data:T.componentsDataJson,onUpdate:k=>T.componentsDataJson=k},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-6024d07e"]]),rO={class:"tab-default__tab"},dO={class:"tab-blue__wrapper flex-center"},cO={class:"tab-blue__nav justify-content-center"},uO=["id"],mO=["id","onClick"],pO={class:"tab-default__content"},hO={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},fO={class:"component-wrapper"},ud=J(e.defineComponent({name:"TabDefault",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=(N,A)=>{N&&(p.value[A]=N)},a=n,i=t,s=e.ref(!1),l=e.ref(0),r=e.ref(0),c=e.ref(0),u=e.ref(0),g=e.ref(F()),m=e.ref(""),d=e.ref(0),p=e.ref([]);function f(N){var $;const A=($=p.value)==null?void 0:$.findIndex(I=>I.id===N);m.value=N,r.value=d.value,c.value=A,s.value=!0,l.value=1,setTimeout(()=>{l.value=2,d.value=A,setTimeout(()=>{s.value=!1,l.value=0},300)},300)}const h=e.ref(!1),C=e.ref(!1),w=e.computed(()=>{var A;if(!((A=a.modelValue)!=null&&A.data)||!Array.isArray(a.modelValue.data))return[];const N=a.modelValue.data[d.value];return N?N.componentsDataJson||[]:[]}),x=()=>{var A;if(a.modelValue&&a.modelValue.data){setTimeout(()=>{var $;f(($=a.modelValue)==null?void 0:$.data[0].id)},0);return}const N={id:((A=a.modelValue)==null?void 0:A.id)||F(),type:"TabDefault",onlyShowPc:!1,containerWidth:"",bgColor:"",center:!0,width:"",data:[{id:F(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:F(),key:"2222",name:"tab2",componentsDataJson:[]}]};i("update:modelValue",N),m.value=N.data[0].id},y=e.computed(()=>{var N;return a.isPreview?!((N=a.modelValue)!=null&&N.onlyShowPc)||!Te():!0}),b=e.computed(()=>{var N;return(N=a.modelValue)==null?void 0:N.data});x();const V=(N,A)=>{debugger;i("handleDelete",N||a.modelValue.id,A)},T=N=>{debugger;i("handleCopy",N||a.modelValue)},k=(N,A,$)=>{debugger;i("handlePaste",N,A,$)},S=e.computed(()=>{if(u.value,!p.value.length)return{};let N=0,A=0;if(s.value){if(l.value===1){const $=Math.min(r.value,c.value),I=Math.max(r.value,c.value),U=p.value[$],Y=p.value[I];if(!U||!Y)return{};const G=typeof window>"u"?{paddingLeft:"0"}:window.getComputedStyle(U),q=typeof window>"u"?{paddingRight:"0"}:window.getComputedStyle(Y);N=U.offsetLeft+parseInt(G.paddingLeft),A=Y.offsetLeft+Y.clientWidth-parseInt(q.paddingRight)-(U.offsetLeft+parseInt(G.paddingLeft))}else if(l.value===2){const $=p.value[c.value];if(!$)return{};const I=typeof window>"u"?{paddingLeft:"0",paddingRight:"0"}:window.getComputedStyle($);N=$.offsetLeft+parseInt(I.paddingLeft),A=$.clientWidth-parseInt(I.paddingLeft)-parseInt(I.paddingRight)}}else{const $=p.value[d.value];if(!$)return{};const I=typeof window>"u"?{paddingLeft:"0",paddingRight:"0"}:window.getComputedStyle($);N=$.offsetLeft+parseInt(I.paddingLeft),A=$.clientWidth-parseInt(I.paddingLeft)-parseInt(I.paddingRight)}return{"--strip-left":`${N}px`,"--strip-width":`${A}px`,"--tab-strip-color":"#0032a0",transition:s.value?"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none"}}),D=()=>{s.value||u.value++};return e.watch(b,N=>{setTimeout(()=>{if(typeof document>"u")return;p.value=[];const A=document.getElementById(g.value);if(!A)return;const $=A.querySelectorAll(".tab-blue__list__item");p.value=Array.from($),N&&N[0]&&f(N[0].id)},0)},{deep:!0}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",D),e.nextTick(()=>{d.value=d.value})}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",D)}),(N,A)=>{var $,I,U,Y;return y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tab-default__container bg-neutral-light",style:e.normalizeStyle({backgroundColor:($=n.modelValue)==null?void 0:$.bgColor}),onMouseover:A[5]||(A[5]=G=>C.value=!0),onMouseout:A[6]||(A[6]=G=>C.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["container-content-small",[(I=n.modelValue)!=null&&I.width?`container-content-${(U=n.modelValue)==null?void 0:U.width}`:"container-content"]])},[e.createElementVNode("div",rO,[e.createElementVNode("div",{class:"tab-blue bg-neutral-light",style:e.normalizeStyle({backgroundColor:(Y=n.modelValue)==null?void 0:Y.bgColor})},[e.createElementVNode("div",dO,[e.createElementVNode("div",cO,[A[7]||(A[7]=e.createElementVNode("div",{class:"tab-blue__nav__prev",style:{display:"none"}},null,-1)),e.createElementVNode("ul",{class:"tab-blue__list px-4",id:g.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(G,q)=>(e.openBlock(),e.createElementBlock("li",{id:G.id,key:G.id,class:"tab-blue__list__item",ref_for:!0,ref:O=>o(O,q),onClick:O=>f(G.id)},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-blue__btn",{"tab-blue__btn--active":m.value===G.id}])},e.toDisplayString(G.name),3)],8,mO))),128)),e.createElementVNode("span",{class:"tab-blue__strip",style:e.normalizeStyle(S.value)},null,4)],8,uO),A[8]||(A[8]=e.createElementVNode("div",{class:"tab-blue__nav__next",style:{display:"none"}},null,-1))]),A[9]||(A[9]=e.createElementVNode("div",{class:"tab-blue__filter mt-5 mt-md-3",style:{"--width":"338px"}},null,-1))])],4)]),e.createElementVNode("div",pO,[e.createElementVNode("div",hO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(G,q)=>(e.openBlock(),e.createElementBlock("div",{key:G.id,class:"page-item"},[e.createElementVNode("div",fO,[e.createVNode(Co,{type:G.type,"props-data":{modelValue:G,isPreview:!1},onHandleDelete:A[0]||(A[0]=O=>V(O,w.value)),onHandleCopy:A[1]||(A[1]=O=>T(O)),onHandlePaste:O=>k(O,w.value,q)},null,8,["type","props-data","onHandlePaste"])])]))),128))])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:C.value,"onUpdate:show":A[2]||(A[2]=G=>C.value=G),onHandleEdit:A[3]||(A[3]=G=>h.value=!0),onHandleDelete:V,onHandleCopy:T,onHandlePaste:k},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(lO,{key:0,show:h.value,"onUpdate:show":A[4]||(A[4]=G=>h.value=G),data:n.modelValue},null,8,["show","data"]))],36)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-6e9ec8ff"]]),gO=Object.freeze(Object.defineProperty({__proto__:null,default:ud},Symbol.toStringTag,{value:"Module"})),yO={class:"tab__wrapper"},_O=["onClick"],wO=["id","onClick"],bO=J({__name:"TabTimeLineTab",props:{list:{type:Array,default:()=>null},currentIdx:{type:Number,default:()=>0},isFixed:{type:Boolean,default:()=>!1}},emits:["updateIdx"],setup(n,{emit:t}){const o=n,a=t,{proxy:i}=e.getCurrentInstance(),s=e.ref(null),l=e.ref(null),r=e.ref(null),c=e.ref(0),u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(0),p=e.computed(()=>o.isFixed),f=e.computed({get:()=>o.currentIdx,set:k=>a("updateIdx",k)}),h=e.computed(()=>g.value>30),C=e.computed(()=>m.value>d.value),w=e.computed(()=>{var k;return(k=o.list)!=null&&k.length?o.list.length-1:0}),x=e.computed(()=>{var S;const k=(S=o.list)==null?void 0:S.length;return`${f.value/(k-1)*100}%`}),y=()=>{var A;const k=(A=r.value)==null?void 0:A[f.value],S=(k==null?void 0:k.clientWidth)/2,D=i.$_vsWidth/2;c.value=(k==null?void 0:k.getBoundingClientRect().right)-S;const N=l.value;N&&(N.scrollLeft-=D-c.value)},b=()=>{var k;u.value=(k=l.value)==null?void 0:k.scrollWidth},V=k=>{l.value.scrollLeft=g.value+k},T=()=>{var D,N;g.value=(D=l.value)==null?void 0:D.scrollLeft;const k=(N=r.value)==null?void 0:N[r.value.length-1];m.value=k==null?void 0:k.getBoundingClientRect().right;const S=s.value;d.value=S==null?void 0:S.getBoundingClientRect().right};return e.watch(f,()=>{y()}),e.watch(p,()=>{b(),T(),e.nextTick(y),setTimeout(b,300)}),e.nextTick(()=>{y(),b(),T()}),(k,S)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-timeline-tab",ref_key:"wrapper",ref:s},[e.createElementVNode("div",yO,[e.createElementVNode("div",{class:e.normalizeClass(["tab__nav",{"is-smaller":p.value}])},[e.withDirectives(e.createElementVNode("div",{class:"nav__prev",onClick:S[0]||(S[0]=D=>V(-100))},null,512),[[e.vShow,h.value]]),e.createElementVNode("ul",{class:"tab__list",ref_key:"listRef",ref:l,onScroll:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(D,N)=>(e.openBlock(),e.createElementBlock("li",{key:D.key,class:e.normalizeClass(["tab__item",{"is-active":f.value>=N}])},[e.createElementVNode("div",{class:e.normalizeClass(["tab__dot",{"is-active":f.value==N}]),onClick:A=>f.value=N},null,10,_O),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab__btn tx-body",{"is-active":f.value==N}]),id:D.id,ref_for:!0,ref_key:"btn",ref:r,onClick:A=>f.value=N},e.toDisplayString(D.name),11,wO)],2))),128)),e.createElementVNode("div",{class:e.normalizeClass(["progress",{"is-smaller":p.value}]),style:e.normalizeStyle([{"--progress-width":`${u.value}px`,"--count":w.value,"--bar-width":x.value}])},[...S[2]||(S[2]=[e.createElementVNode("div",{class:"progress-bar",role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":"100"},null,-1)])],6)],544),e.withDirectives(e.createElementVNode("div",{class:"nav__next",onClick:S[1]||(S[1]=D=>V(100))},null,512),[[e.vShow,C.value]])],2)])],512))}},[["__scopeId","data-v-4a77a08e"]]),CO=["id"],VO=["id"],xO=["data-bs-target","aria-expanded","aria-controls","onClick"],kO={class:"d-flex align-items-center"},EO={class:"py-2 text-blue-dark"},TO=["id","aria-labelledby","data-bs-parent"],NO={class:"acc-content"},SO=J({__name:"TabTimelineAccordion",props:{modelValue:{type:Object,default:()=>null}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a;console.log("$_vsWidth",a);const c=t,u=e.ref(null),g=e.ref([]),m=e.ref(null);e.ref(null);const d=(A,$)=>{A&&(g.value[$]=A)},p=e.ref(Date.now());e.ref(!1);const f=e.ref(0),h=e.ref(!1);e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.classes)??null}),e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.style)??null});const C=e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.data)??[]}),w=A=>{setTimeout(S,300);const $=g.value[A];setTimeout(()=>{k($)},400)},x=(A,$)=>{c("handleDelete",A||o.modelValue.id,$)},y=A=>{c("handleCopy",A||o.modelValue)},b=(A,$)=>{c("handlePaste",A,$)},V=(A,$)=>+window.getComputedStyle(document.body).getPropertyValue(A).split($)[0],T=()=>{const A=V("--header-height-calc","px"),$=V("--alert-height","px");return A+$},k=A=>{const $=T(),I=ri(A).y-$;window.scroll({top:I,left:0,behavior:"smooth"})},S=()=>{u.value&&(f.value=u.value.getBoundingClientRect().height)},D=()=>{const A=u.value,$=A.getBoundingClientRect().top,I=A.getBoundingClientRect().bottom,U=T()+40;h.value=$<U&&I>U},N=()=>{const A=m.value;console.log("========== checkBtnFixed",A,g.value),A&&A.forEach(($,I)=>{const U=g.value[I],Y=ri(U).y,G=ri(U).y+U.clientHeight,q=s.value+T()+80,O={top:Y,bottom:G};q<O.top?($.classList.add("is-btn-top"),$.classList.remove("is-btn-fixed"),$.classList.remove("is-btn-bottom")):q>O.bottom?($.classList.add("is-btn-bottom"),$.classList.remove("is-btn-fixed"),$.classList.remove("is-btn-top")):($.classList.add("is-btn-fixed"),$.classList.remove("is-btn-top"),$.classList.remove("is-btn-bottom"))})};return e.watch(()=>s==null?void 0:s.value,()=>{console.log("========== $_vsScrollY.value"),D(),N()}),(A,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-timeline-accordion",{"is-in-front":h.value}])},[e.createElementVNode("div",{class:"acc__wrapper",ref_key:"wrapper",ref:u,style:e.normalizeStyle({minHeight:`${f.value}px`})},[e.createElementVNode("ul",{class:"acc__list accordion",id:`acc-parent-${p.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(I,U)=>(e.openBlock(),e.createElementBlock("li",{class:"acc__item",key:I.key,ref_for:!0,ref:Y=>d(Y,U)},[e.createElementVNode("div",{class:"acc-header",id:`acc-${p.value}-${I.key}`},[e.createElementVNode("button",{class:e.normalizeClass(["acc-button",{collapsed:U!==0}]),type:"button",ref_for:!0,ref_key:"timeLine",ref:m,"data-bs-toggle":"collapse","data-bs-target":`#acc-${p.value}-collapse-${I.key}`,"aria-expanded":U==0,"aria-controls":`#acc-${p.value}-collapse-${I.key}`,onClick:Y=>w(U)},[e.createElementVNode("div",kO,[e.createElementVNode("div",{class:e.normalizeClass(["acc-button__line",{"is-first":U==0,"is-last":U==C.value.length-1}])},[...$[3]||($[3]=[e.createElementVNode("div",{class:"acc-button__dot"},null,-1)])],2),e.createElementVNode("h6",EO,e.toDisplayString(I.name),1)]),$[4]||($[4]=e.createElementVNode("span",{class:"acc-button__icon i"},null,-1))],10,xO)],8,VO),e.createElementVNode("div",{id:`acc-${p.value}-collapse-${I.key}`,class:e.normalizeClass(["acc-body collapse",{show:U==0}]),"aria-labelledby":`acc-${p.value}-${I.key}`,"data-bs-parent":`#acc-parent-${p.value}`},[e.createElementVNode("div",NO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.componentsDataJson,(Y,G)=>(e.openBlock(),e.createElementBlock("div",{key:Y.id,class:"page-item"},[e.createVNode(Co,{type:Y.type,"props-data":{modelValue:Y,isPreview:!1},onHandleDelete:$[0]||($[0]=q=>x(q,A.pageJsonData)),onHandleCopy:$[1]||($[1]=q=>y(q)),onHandlePaste:$[2]||($[2]=q=>b(q,A.pageJsonData))},null,8,["type","props-data"])]))),128))])],10,TO)]))),128))],8,CO)],4)],2))}},[["__scopeId","data-v-09678a58"]]),BO={class:"setting-content"},PO={class:"setting-header flex items-center"},DO={class:"setting-header flex items-center"},$O={class:"setting-body"},LO={class:"setting-toolbar"},AO={class:"tools"},IO={class:"setting-item"},vO={class:"item-header"},MO={class:"btn-group"},OO={key:0,class:"drag-handle"},UO={class:"components-content"},RO=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=m=>{l.data.data.push({id:F(),key:F(),name:"New Tab",componentsDataJson:[]})},g=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("a-option"),h=e.resolveComponent("a-select"),C=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),x=e.resolveComponent("icon-drag-arrow"),y=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",BO,[e.createElementVNode("div",PO,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=T=>n.data.onlyShowPc=T)},null,8,["modelValue"])]),e.createElementVNode("div",DO,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(h,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=T=>n.data.width=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:""},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(f,{value:"small"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(f,{value:"middle"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(f,{value:"max"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",$O,[e.createElementVNode("div",LO,[d[16]||(d[16]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",AO,[e.createVNode(w,{type:"primary",onClick:d[2]||(d[2]=T=>u())},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[d[14]||(d[14]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(w,{type:"primary",onClick:d[3]||(d[3]=T=>u())},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",IO,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[5]||(d[5]=T=>n.data.data=T),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[6]||(d[6]=T=>a.value=!0),onEnd:d[7]||(d[7]=T=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:T})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:T.id},[e.createElementVNode("div",vO,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(T.name),1),e.createElementVNode("span",null,e.toDisplayString(T.key),1)]),e.createElementVNode("div",MO,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",OO,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:k=>g(T.id)},null,8,["onClick"]),e.createVNode(w,{size:"mini",type:"primary",onClick:d[4]||(d[4]=k=>u())},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[18]||(d[18]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(b,{modelValue:T.name,"onUpdate:modelValue":k=>T.name=k,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[19]||(d[19]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(b,{modelValue:T.key,"onUpdate:modelValue":k=>T.key=k,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[20]||(d[20]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",UO,[e.createVNode(Fa,{data:T.componentsDataJson,onUpdate:k=>T.componentsDataJson=k},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-e62b8371"]]),FO={class:"tab-default__content"},HO={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},jO={class:"component-wrapper"},zO={class:"tab-timeline__mobile"},md=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=e.ref(null),g=e.ref(null),m=e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.data}),d=e.ref(0),p=e.ref(!1),f=e.ref(!1),h=e.ref(!1),C=e.computed(()=>{var Y;return((Y=r.modelValue)==null?void 0:Y.classes)??null}),w=e.computed(()=>{var Y;return((Y=r.modelValue)==null?void 0:Y.style)??null});e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.width});const x=e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.id}),y=e.computed(()=>{var Y;return(Y=r.modelValue)!=null&&Y.bgColor?r.modelValue.bgColor:a.value>=768?"bg-neutral-lightest":null}),b=e.computed(()=>{var G;if(!((G=r.modelValue)!=null&&G.data)||!Array.isArray(r.modelValue.data))return[];const Y=r.modelValue.data[d.value];return Y?Y.componentsDataJson||[]:[]}),V=()=>{var G;if(r.modelValue&&r.modelValue.data)return;const Y={id:((G=r.modelValue)==null?void 0:G.id)||F(),type:"TabTimeLine",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",data:[{id:F(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:F(),key:"2222",name:"tab2",componentsDataJson:[]},{id:F(),key:"33333",name:"tab3",componentsDataJson:[]}]};c("update:modelValue",Y),d.value=0},T=e.computed(()=>{var Y;return r.isPreview?!((Y=r.modelValue)!=null&&Y.onlyShowPc)||!Te():!0}),k=(Y,G)=>{debugger;c("handleDelete",Y||r.modelValue.id,G)},S=Y=>{debugger;c("handleCopy",Y||r.modelValue)},D=(Y,G)=>{debugger;c("handlePaste",Y,G)},N=()=>{var H,R;if(!g.value||!u.value)return;const Y=g.value.getBoundingClientRect().top,G=u.value.getBoundingClientRect().top,q=u.value.getBoundingClientRect().bottom,O=+((R=(H=window.getComputedStyle(document.body))==null?void 0:H.getPropertyValue("--header-height-calc"))==null?void 0:R.split("px")[0])||72;if(G>O||q<O){p.value=!1;return}Y<=O&&(p.value=!0)},A=()=>{if(a.value<=768)return;const Y=u.value,q=ri(Y).y-150;window.scroll({top:q,left:0,behavior:"smooth"})},$=e.ref(""),I=()=>{var G;const Y=(G=m.value)==null?void 0:G.findIndex(q=>q.key==$.value);Y>-1?d.value=Y:d.value=0},U=Y=>{d.value=Y,$.value=m.value[Y].key};return e.watch(()=>i.value,()=>{N()}),e.watch(d,()=>{A()}),V(),e.onMounted(()=>{I()}),(Y,G)=>{var q,O;return T.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tab-timeline",C.value]),ref_key:"wrapper",ref:u,style:e.normalizeStyle(w.value),onMouseover:G[6]||(G[6]=H=>h.value=!0),onMouseout:G[7]||(G[7]=H=>h.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__wrapper",[(q=n.modelValue)!=null&&q.width?`container-content-${(O=n.modelValue)==null?void 0:O.width}`:"container-content"]])},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__desktop",[y.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__hold",{"is-fixed":p.value}])},[e.createElementVNode("div",{class:"tab-timeline__nav",ref_key:"tab",ref:g},[e.createVNode(bO,{list:m.value,isFixed:p.value,currentIdx:d.value,onUpdateIdx:U,componentKey:x.value},null,8,["list","isFixed","currentIdx","componentKey"])],512)],2),e.createElementVNode("div",FO,[e.createElementVNode("div",HO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(H,R)=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:"page-item"},[e.createElementVNode("div",jO,[e.createVNode(Co,{type:H.type,"props-data":{modelValue:H,isPreview:!1},onHandleDelete:G[0]||(G[0]=M=>k(M,b.value)),onHandleCopy:G[1]||(G[1]=M=>S(M)),onHandlePaste:G[2]||(G[2]=M=>D(M,b.value))},null,8,["type","props-data"])])]))),128))])])],2),[[e.vShow,e.unref(a)>=768]]),e.withDirectives(e.createElementVNode("div",zO,[e.createVNode(SO,{modelValue:n.modelValue,componentKey:x.value},null,8,["modelValue","componentKey"])],512),[[e.vShow,e.unref(a)<768]]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:h.value,"onUpdate:show":G[3]||(G[3]=H=>h.value=H),onHandleEdit:G[4]||(G[4]=H=>f.value=!0),onHandleDelete:k,onHandleCopy:S,onHandlePaste:D},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(RO,{key:0,show:f.value,"onUpdate:show":G[5]||(G[5]=H=>f.value=H),data:n.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}}},[["__scopeId","data-v-bb2dfe13"]]),qO=Object.freeze(Object.defineProperty({__proto__:null,default:md},Symbol.toStringTag,{value:"Module"})),WO={class:"setting-content"},GO={class:"setting-header flex items-center"},XO={class:"setting-header flex items-center"},YO={class:"setting-header flex items-center"},KO={class:"setting-header flex items-center"},QO={class:"setting-body"},ZO={class:"setting-item"},JO={class:"btn-group"},eU={key:0,class:"drag-handle"},tU=["src"],nU={class:"item-uplaod flex items-center"},oU=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"circles",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=g=>g&&g.length>1,l=t,r=()=>{l("update:show",!1)},c=g=>{g.push({id:F(),title:"这里是标题",subtitle:"这里是副标题",subtitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""})},u=(g,m)=>{g.splice(g.findIndex(d=>d.id===m),1)};return(g,m)=>{const d=e.resolveComponent("a-switch"),p=e.resolveComponent("a-option"),f=e.resolveComponent("a-select"),h=e.resolveComponent("a-input"),C=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),x=e.resolveComponent("icon-plus"),y=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(y,{width:500,visible:n.show,footer:!1,onCancel:r,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",WO,[e.createElementVNode("div",GO,[m[8]||(m[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(d,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":m[0]||(m[0]=b=>n.data.onlyShowPc=b)},null,8,["modelValue"])]),e.createElementVNode("div",XO,[m[13]||(m[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(f,{modelValue:n.data.width,"onUpdate:modelValue":m[1]||(m[1]=b=>n.data.width=b),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(p,{value:""},{default:e.withCtx(()=>[...m[9]||(m[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(p,{value:"small"},{default:e.withCtx(()=>[...m[10]||(m[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(p,{value:"middle"},{default:e.withCtx(()=>[...m[11]||(m[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(p,{value:"max"},{default:e.withCtx(()=>[...m[12]||(m[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",YO,[m[14]||(m[14]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(h,{modelValue:n.data.colDesktop,"onUpdate:modelValue":m[2]||(m[2]=b=>n.data.colDesktop=b),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",KO,[m[15]||(m[15]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(h,{modelValue:n.data.colMobile,"onUpdate:modelValue":m[3]||(m[3]=b=>n.data.colMobile=b),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",QO,[m[22]||(m[22]=e.createElementVNode("p",{class:"item-title"},"Circles",-1)),e.createElementVNode("div",ZO,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":m[4]||(m[4]=b=>n.data.data=b),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:m[5]||(m[5]=b=>a.value=!0),onEnd:m[6]||(m[6]=b=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:b.id},[e.createElementVNode("div",JO,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",eU,[e.createVNode(C,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:V=>u(n.data.data,b.id)},null,8,["onClick"])]),m[16]||(m[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(h,{modelValue:b.title,"onUpdate:modelValue":V=>b.title=V,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[17]||(m[17]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(h,{modelValue:b.subtitle,"onUpdate:modelValue":V=>b.subtitle=V,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[18]||(m[18]=e.createElementVNode("p",{class:"item-title"},"第二个子标题",-1)),e.createVNode(h,{modelValue:b.subtitle2,"onUpdate:modelValue":V=>b.subtitle2=V,placeholder:"请输入第二个子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[19]||(m[19]=e.createElementVNode("p",{class:"item-title"},"引言",-1)),e.createVNode(h,{modelValue:b.text,"onUpdate:modelValue":V=>b.text=V,placeholder:"请输入引言","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[20]||(m[20]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:b.imgSrc},null,8,tU),e.createElementVNode("div",nU,[e.createVNode(h,{modelValue:b.imgSrc,"onUpdate:modelValue":V=>b.imgSrc=V,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:b.imgSrc,"onUpdate:modelValue":V=>b.imgSrc=V,name:`CardListCircle_${b.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(h,{class:"mt-2",modelValue:b.alt,"onUpdate:modelValue":V=>b.alt=V,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:m[7]||(m[7]=b=>c(n.data.data))},[e.createVNode(x),m[21]||(m[21]=e.createElementVNode("span",{class:"btn-text"},"添加Circle",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-059f39c9"]]),aU=["id"],iU=["data-aos-delay","data-aos-anchor"],sU={class:"card-circle"},lU={class:"circle__head"},rU={class:"circle__img img-fit"},dU=["src","alt"],cU={key:0,class:"circle__title mt-3"},uU={key:1,class:"circle__subtitle"},mU={key:2,class:"circle__subtitle"},pU={key:3,class:"circle__text mt-3"},pd=J(e.defineComponent({name:"CardListCircle",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||F(),type:"CardListCircle",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:F(),title:"这里是标题",subtitle:"这里是副标题",subtitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""},{id:F(),title:"这里是标题",subTitle:"这里是副标题",subTitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""}]};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=m=>{a("handlePaste",m)};return i(),(m,d)=>{var p,f,h,C,w,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:d[2]||(d[2]=y=>l.value=!0),onMouseleave:d[3]||(d[3]=y=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(p=n.modelValue)!=null&&p.width?`container-content-${(f=n.modelValue)==null?void 0:f.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-circle",[`row-cols-${(h=n.modelValue)==null?void 0:h.colMobile}`,`row-cols-md-${(C=n.modelValue)==null?void 0:C.colDesktop}`,{"small-gap":((w=n.modelValue)==null?void 0:w.colDesktop)>4}]]),id:`card-list-${m.timestamp}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((x=n.modelValue)==null?void 0:x.data,(y,b)=>{var V;return e.openBlock(),e.createElementBlock("div",{class:"col",key:y.id,"data-aos":"fade-up","data-aos-delay":b*100,"data-aos-anchor":`#card-list-${m.timestamp}`},[e.createElementVNode("div",sU,[e.createElementVNode("div",lU,[e.createElementVNode("div",rU,[e.createElementVNode("img",{src:y.imgSrc,alt:y.alt},null,8,dU)])]),e.createElementVNode("div",{class:e.normalizeClass(["circle__body",{"is-single-column":((V=n.modelValue)==null?void 0:V.colMobile)===1}])},[y.title?(e.openBlock(),e.createElementBlock("h4",cU,e.toDisplayString(y.title),1)):e.createCommentVNode("",!0),y.subtitle?(e.openBlock(),e.createElementBlock("div",uU,e.toDisplayString(y.subtitle),1)):e.createCommentVNode("",!0),y.subtitle2?(e.openBlock(),e.createElementBlock("div",mU,e.toDisplayString(y.subtitle2),1)):e.createCommentVNode("",!0),y.text?(e.openBlock(),e.createElementBlock("div",pU,e.toDisplayString(y.text),1)):e.createCommentVNode("",!0)],2)])],8,iU)}),128))],10,aU)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=y=>l.value=y),onHandleEdit:d[1]||(d[1]=y=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oU,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=y=>r.value=y),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-78d7177c"]]),hU=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),fU={class:"setting-content"},gU={class:"setting-header flex items-center"},yU={class:"setting-header flex items-center"},_U={class:"setting-header flex items-center"},wU={class:"setting-header flex items-center"},bU={class:"setting-body"},CU={class:"setting-item"},VU={class:"btn-group"},xU={key:0,class:"drag-handle"},kU=["src"],EU={class:"item-uplaod flex items-center"},TU={class:"btn-group"},NU={key:0,class:"drag-handle"},SU={class:"item-action flex items-center"},BU=["onClick"],PU=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"programmes",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=f=>f&&f.length>1,c=t,u=()=>{c("update:show",!1)},g=f=>{f.push({id:F(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]})},m=(f,h)=>{f.splice(f.findIndex(C=>C.id===h),1)},d=f=>{f.push({id:F(),type:"",text:"按钮",url:"",isExternal:!1})},p=(f,h)=>{f.splice(f.findIndex(C=>C.id===h),1)};return(f,h)=>{const C=e.resolveComponent("a-switch"),w=e.resolveComponent("a-option"),x=e.resolveComponent("a-select"),y=e.resolveComponent("a-input"),b=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),T=e.resolveComponent("a-button"),k=e.resolveComponent("a-checkbox"),S=e.resolveComponent("icon-plus"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",fU,[e.createElementVNode("div",gU,[h[10]||(h[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(C,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),e.createElementVNode("div",yU,[h[15]||(h[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(x,{modelValue:n.data.width,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.width=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(w,{value:""},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(w,{value:"small"},{default:e.withCtx(()=>[...h[12]||(h[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(w,{value:"middle"},{default:e.withCtx(()=>[...h[13]||(h[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(w,{value:"max"},{default:e.withCtx(()=>[...h[14]||(h[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",_U,[h[16]||(h[16]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(y,{modelValue:n.data.colDesktop,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.colDesktop=N),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",wU,[h[17]||(h[17]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(y,{modelValue:n.data.colMobile,"onUpdate:modelValue":h[3]||(h[3]=N=>n.data.colMobile=N),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",bU,[h[30]||(h[30]=e.createElementVNode("p",{class:"item-title"},"Programme",-1)),e.createElementVNode("div",CU,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":h[6]||(h[6]=N=>n.data.data=N),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!r(n.data.data),onStart:h[7]||(h[7]=N=>i.value=!0),onEnd:h[8]||(h[8]=N=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:N.id},[e.createElementVNode("div",VU,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",xU,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:A=>m(n.data.data,N.id)},null,8,["onClick"])]),h[24]||(h[24]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(y,{modelValue:N.title,"onUpdate:modelValue":A=>N.title=A,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[25]||(h[25]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(y,{modelValue:N.subtitle,"onUpdate:modelValue":A=>N.subtitle=A,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[26]||(h[26]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:N.description,"onUpdate:modelValue":A=>N.description=A,name:`CardListProgramme_editor_${N.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),h[27]||(h[27]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.imgSrc},null,8,kU),e.createElementVNode("div",EU,[e.createVNode(y,{modelValue:N.imgSrc,"onUpdate:modelValue":A=>N.imgSrc=A,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:N.imgSrc,"onUpdate:modelValue":A=>N.imgSrc=A,name:`CardListProgramme_${N.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(y,{class:"mt-2",modelValue:N.alt,"onUpdate:modelValue":A=>N.alt=A,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[28]||(h[28]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:N.buttons,"onUpdate:modelValue":A=>N.buttons=A,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!r(N.buttons),onStart:h[4]||(h[4]=A=>i.value=!0),onEnd:h[5]||(h[5]=A=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:A})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item school-button",{"sortable-disabled":!r(N.buttons)}]),key:A.id},[e.createElementVNode("div",TU,[r(N.buttons)?(e.openBlock(),e.createElementBlock("div",NU,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:$=>p(N.buttons,A.id)},null,8,["onClick"])]),e.createVNode(T,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.text),1)]),_:2},1024),e.createElementVNode("div",SU,[e.createVNode(y,{class:"action-text",modelValue:A.text,"onUpdate:modelValue":$=>A.text=$,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(y,{modelValue:A.url,"onUpdate:modelValue":$=>A.url=$,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(x,{modelValue:A.type,"onUpdate:modelValue":$=>A.type=$,placeholder:"请选择按钮类型"},{default:e.withCtx(()=>[e.createVNode(w,{value:""},{default:e.withCtx(()=>[...h[18]||(h[18]=[e.createTextVNode("默认按钮",-1)])]),_:1}),e.createVNode(w,{value:"white"},{default:e.withCtx(()=>[...h[19]||(h[19]=[e.createTextVNode("白色按钮",-1)])]),_:1}),e.createVNode(w,{value:"light"},{default:e.withCtx(()=>[...h[20]||(h[20]=[e.createTextVNode("亮色按钮",-1)])]),_:1}),e.createVNode(w,{value:"blue"},{default:e.withCtx(()=>[...h[21]||(h[21]=[e.createTextVNode("蓝色按钮",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(k,{modelValue:A.isExternal,"onUpdate:modelValue":$=>A.isExternal=$},{default:e.withCtx(()=>[...h[22]||(h[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:A=>d(N.buttons)},[e.createVNode(S),h[23]||(h[23]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,BU)],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:h[9]||(h[9]=N=>g(n.data.data))},[e.createVNode(S),h[29]||(h[29]=e.createElementVNode("span",{class:"btn-text"},"添加Programme",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-f720c331"]]),DU=["id"],$U=["data-aos-delay","data-aos-anchor"],LU={class:"card-programme"},AU={class:"card-image"},IU=["src","alt"],vU={class:"card-body"},MU=["innerHTML"],OU={class:"card-programme__buttons"},UU=["onClick"],RU={class:"btn-primary__text"},hd=J(e.defineComponent({name:"CardListProgramme",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"CardListProgramme",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:F(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1}]},{id:F(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]}]};a("update:modelValue",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=p=>{a("handlePaste",p)},m=p=>{!p||!o.isPreview||(p.startsWith("http")?typeof window<"u"&&window.open(p,"_blank"):a("handleClick",p))};i();const d=e.ref(Date.now());return(p,f)=>{var h,C,w,x,y,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:f[2]||(f[2]=V=>l.value=!0),onMouseleave:f[3]||(f[3]=V=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(h=n.modelValue)!=null&&h.width?`container-content-${(C=n.modelValue)==null?void 0:C.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-programme",[`row-cols-${(w=n.modelValue)==null?void 0:w.colMobile}`,`row-cols-md-${(x=n.modelValue)==null?void 0:x.colDesktop}`,{"small-gap":((y=n.modelValue)==null?void 0:y.colDesktop)>4}]]),id:`card-list-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:V.id,"data-aos":"fade-up","data-aos-delay":T*100,"data-aos-anchor":`#card-list-${d.value}`},[e.createElementVNode("div",LU,[e.createElementVNode("div",AU,[e.createElementVNode("img",{src:V.imgSrc,alt:V.alt},null,8,IU)]),e.createElementVNode("div",vU,[e.withDirectives(e.createElementVNode("div",{class:"card-body__title"},e.toDisplayString(V.title),513),[[e.vShow,V.title]]),e.withDirectives(e.createElementVNode("div",{class:"card-body__subtitle"},e.toDisplayString(V.subtitle),513),[[e.vShow,V.subtitle]]),e.withDirectives(e.createElementVNode("div",{class:"card-body__description",innerHTML:V.description},null,8,MU),[[e.vShow,V.description]]),e.withDirectives(e.createElementVNode("div",OU,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.buttons,k=>(e.openBlock(),e.createElementBlock("button",{key:k.id,onClick:S=>m(k.url||""),class:e.normalizeClass(["card-programme__buttons size-normal btn-primary",[k.type?`btn-primary--${k.type}`:""]])},[e.createElementVNode("div",RU,e.toDisplayString(k.text),1),f[5]||(f[5]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,UU))),128))],512),[[e.vShow,V.buttons&&V.buttons.length>0]])]),f[6]||(f[6]=e.createElementVNode("div",{class:"card-hover-border card-hover-border--y"},null,-1)),f[7]||(f[7]=e.createElementVNode("div",{class:"card-hover-border card-hover-border--x"},null,-1))])],8,$U))),128))],10,DU)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":f[0]||(f[0]=V=>l.value=V),onHandleEdit:f[1]||(f[1]=V=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PU,{key:1,show:r.value,"onUpdate:show":f[4]||(f[4]=V=>r.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-2a9f09d9"]]),FU=Object.freeze(Object.defineProperty({__proto__:null,default:hd},Symbol.toStringTag,{value:"Module"})),HU={class:"setting-content"},jU={class:"setting-header flex items-center"},zU={class:"setting-header flex items-center"},qU={class:"setting-header flex items-center"},WU={class:"setting-header flex items-center"},GU={class:"setting-body"},XU={class:"setting-item"},YU={class:"btn-group"},KU={key:0,class:"drag-handle"},QU=["src"],ZU={class:"item-uplaod flex items-center"},JU={class:"btn-group"},eR={key:0,class:"drag-handle"},tR={class:"item-action flex items-center"},nR=["onClick"],oR=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"schools",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=p=>p&&p.length>1,r=t,c=()=>{r("update:show",!1)},u=p=>{p.push({id:F(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]})},g=(p,f)=>{p.splice(p.findIndex(h=>h.id===f),1)},m=p=>{p.push({id:F(),type:"",text:"按钮",url:"",isExternal:!1})},d=(p,f)=>{p.splice(p.findIndex(h=>h.id===f),1)};return(p,f)=>{const h=e.resolveComponent("a-switch"),C=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),x=e.resolveComponent("a-input"),y=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-button"),T=e.resolveComponent("a-checkbox"),k=e.resolveComponent("icon-plus"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",HU,[e.createElementVNode("div",jU,[f[10]||(f[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":f[0]||(f[0]=D=>n.data.onlyShowPc=D)},null,8,["modelValue"])]),e.createElementVNode("div",zU,[f[15]||(f[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(w,{modelValue:n.data.width,"onUpdate:modelValue":f[1]||(f[1]=D=>n.data.width=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...f[11]||(f[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...f[12]||(f[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...f[13]||(f[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...f[14]||(f[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",qU,[f[16]||(f[16]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(x,{modelValue:n.data.colDesktop,"onUpdate:modelValue":f[2]||(f[2]=D=>n.data.colDesktop=D),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",WU,[f[17]||(f[17]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(x,{modelValue:n.data.colMobile,"onUpdate:modelValue":f[3]||(f[3]=D=>n.data.colMobile=D),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",GU,[f[29]||(f[29]=e.createElementVNode("p",{class:"item-title"},"Programme",-1)),e.createElementVNode("div",XU,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":f[6]||(f[6]=D=>n.data.data=D),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.data),onStart:f[7]||(f[7]=D=>a.value=!0),onEnd:f[8]||(f[8]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:D.id},[e.createElementVNode("div",YU,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",KU,[e.createVNode(y,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:N=>g(n.data.data,D.id)},null,8,["onClick"])]),f[24]||(f[24]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(x,{modelValue:D.title,"onUpdate:modelValue":N=>D.title=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[25]||(f[25]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(x,{modelValue:D.text,"onUpdate:modelValue":N=>D.text=N,placeholder:"请输入内容","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[26]||(f[26]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:D.imgSrc},null,8,QU),e.createElementVNode("div",ZU,[e.createVNode(x,{modelValue:D.imgSrc,"onUpdate:modelValue":N=>D.imgSrc=N,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:D.imgSrc,"onUpdate:modelValue":N=>D.imgSrc=N,name:`CardListProgramme_${D.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(x,{class:"mt-2",modelValue:D.alt,"onUpdate:modelValue":N=>D.alt=N,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[27]||(f[27]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:D.buttons,"onUpdate:modelValue":N=>D.buttons=N,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(D.buttons),onStart:f[4]||(f[4]=N=>a.value=!0),onEnd:f[5]||(f[5]=N=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item school-button",{"sortable-disabled":!l(D.buttons)}]),key:N.id},[e.createElementVNode("div",JU,[l(D.buttons)?(e.openBlock(),e.createElementBlock("div",eR,[e.createVNode(y,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:A=>d(D.buttons,N.id)},null,8,["onClick"])]),e.createVNode(V,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.text),1)]),_:2},1024),e.createElementVNode("div",tR,[e.createVNode(x,{class:"action-text",modelValue:N.text,"onUpdate:modelValue":A=>N.text=A,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(x,{modelValue:N.url,"onUpdate:modelValue":A=>N.url=A,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(w,{modelValue:N.type,"onUpdate:modelValue":A=>N.type=A,placeholder:"请选择按钮类型"},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...f[18]||(f[18]=[e.createTextVNode("默认按钮",-1)])]),_:1}),e.createVNode(C,{value:"white"},{default:e.withCtx(()=>[...f[19]||(f[19]=[e.createTextVNode("白色按钮",-1)])]),_:1}),e.createVNode(C,{value:"light"},{default:e.withCtx(()=>[...f[20]||(f[20]=[e.createTextVNode("亮色按钮",-1)])]),_:1}),e.createVNode(C,{value:"blue"},{default:e.withCtx(()=>[...f[21]||(f[21]=[e.createTextVNode("蓝色按钮",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(T,{modelValue:N.isExternal,"onUpdate:modelValue":A=>N.isExternal=A},{default:e.withCtx(()=>[...f[22]||(f[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:N=>m(D.buttons)},[e.createVNode(k),f[23]||(f[23]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,nR)],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:f[9]||(f[9]=D=>u(n.data.data))},[e.createVNode(k),f[28]||(f[28]=e.createElementVNode("span",{class:"btn-text"},"添加School",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-f57ffd0f"]]),aR=["id"],iR=["data-aos-delay","data-aos-anchor"],sR={class:"card-school"},lR={class:"school__head"},rR={class:"school__img img-fit"},dR=["src","alt"],cR={class:"school__body"},uR={key:0,class:"school__title"},mR=["innerHTML"],pR={key:2,class:"contact__link mt-3"},hR=["onClick"],fR={class:"btn-primary__text"},fd=J(e.defineComponent({name:"CardListSchool",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"CardListSchool",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:F(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1}]},{id:F(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]}]};a("update:modelValue",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=p=>{a("handlePaste",p)},m=p=>{!p||!o.isPreview||(p.startsWith("http")?typeof window<"u"&&window.open(p,"_blank"):a("handleClick",p))};i();const d=e.ref(Date.now());return(p,f)=>{var h,C,w,x,y,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:f[2]||(f[2]=V=>l.value=!0),onMouseleave:f[3]||(f[3]=V=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(h=n.modelValue)!=null&&h.width?`container-content-${(C=n.modelValue)==null?void 0:C.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-school",[`row-cols-${(w=n.modelValue)==null?void 0:w.colMobile}`,`row-cols-md-${(x=n.modelValue)==null?void 0:x.colDesktop}`,{"small-gap":((y=n.modelValue)==null?void 0:y.colDesktop)>4}]]),id:`card-list-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:V.id,"data-aos":"fade-up","data-aos-delay":T*100,"data-aos-anchor":`#card-list-${d.value}`},[e.createElementVNode("div",sR,[e.createElementVNode("div",lR,[e.createElementVNode("div",rR,[e.createElementVNode("img",{src:V.imgSrc,alt:V.alt},null,8,dR)])]),e.createElementVNode("div",cR,[V.title?(e.openBlock(),e.createElementBlock("h6",uR,e.toDisplayString(V.title),1)):e.createCommentVNode("",!0),V.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"school__content",innerHTML:V.text},null,8,mR)):e.createCommentVNode("",!0),V.buttons&&V.buttons.length>0?(e.openBlock(),e.createElementBlock("div",pR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.buttons,k=>(e.openBlock(),e.createElementBlock("button",{key:k.id,onClick:S=>m(k.url||""),class:e.normalizeClass(["card-programme__buttons size-normal btn-primary",[k.type?`btn-primary--${k.type}`:""]])},[e.createElementVNode("div",fR,e.toDisplayString(k.text),1),f[5]||(f[5]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,hR))),128))])):e.createCommentVNode("",!0)])])],8,iR))),128))],10,aR)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":f[0]||(f[0]=V=>l.value=V),onHandleEdit:f[1]||(f[1]=V=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oR,{key:1,show:r.value,"onUpdate:show":f[4]||(f[4]=V=>r.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b8adeae3"]]),gR=Object.freeze(Object.defineProperty({__proto__:null,default:fd},Symbol.toStringTag,{value:"Module"})),yR={class:"setting-content"},_R={class:"setting-header flex items-center"},wR=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",yR,[e.createElementVNode("div",_R,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),s[10]||(s[10]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[11]||(s[11]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(u,{modelValue:n.data.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[12]||(s[12]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(u,{modelValue:n.data.data.subTitle,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.subTitle=m),placeholder:"请输入副标题","allow-clear":""},null,8,["modelValue"]),s[13]||(s[13]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(u,{modelValue:n.data.data.link,"onUpdate:modelValue":s[4]||(s[4]=m=>n.data.data.link=m),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-560ffe06"]]),bR=["innerHTML"],CR={class:"d-flex"},VR=["innerHTML"],gd=J(e.defineComponent({name:"DetailLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=p=>{a("handleClick",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"DetailLink",onlyShowPc:!1,data:{width:"default",title:"这里是标题",subTitle:"这里是副标题",link:"https://www.baidu.com"}};a("update:modelValue",p)},r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return l(),(p,f)=>{var h,C,w,x,y,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"detailLink_wrap",onMouseenter:f[3]||(f[3]=V=>r.value=!0),onMouseleave:f[4]||(f[4]=V=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full",u.value])},[!((h=n.modelValue.data)!=null&&h.link)&&((C=n.modelValue.data)!=null&&C.title)?(e.openBlock(),e.createElementBlock("h6",{key:0,class:"detail-link__title",innerHTML:n.modelValue.data.title},null,8,bR)):e.createCommentVNode("",!0),(w=n.modelValue.data)!=null&&w.link&&((x=n.modelValue.data)!=null&&x.title)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:f[0]||(f[0]=V=>i(n.modelValue.data.link)),class:"nuxt-link-active detail-link__hover-underline"},e.toDisplayString((y=n.modelValue.data)==null?void 0:y.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",CR,[e.createElementVNode("div",{class:"detail-link__date",innerHTML:(b=n.modelValue.data)==null?void 0:b.subTitle},null,8,VR)])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[1]||(f[1]=V=>r.value=V),onHandleEdit:f[2]||(f[2]=V=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(wR,{key:1,show:c.value,"onUpdate:show":f[5]||(f[5]=V=>c.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b844cabd"]]),xR=Object.freeze(Object.defineProperty({__proto__:null,default:gd},Symbol.toStringTag,{value:"Module"})),kR={class:"setting-content"},ER={class:"setting-header flex items-center"},TR=["src"],NR={class:"item-uplaod flex items-center"},SR=["src"],BR={class:"item-uplaod flex items-center"},PR=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("Upload"),m=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(m,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",kR,[e.createElementVNode("div",ER,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=d=>n.data.onlyShowPc=d)},null,8,["modelValue"])]),s[18]||(s[18]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=d=>n.data.data.width=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[11]||(s[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[19]||(s[19]=e.createElementVNode("p",{class:"item-title"},"视频类型",-1)),e.createVNode(c,{modelValue:n.data.data.type,"onUpdate:modelValue":s[2]||(s[2]=d=>n.data.data.type=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"inner"},{default:e.withCtx(()=>[...s[12]||(s[12]=[e.createTextVNode("inner",-1)])]),_:1}),e.createVNode(r,{value:"youtube"},{default:e.withCtx(()=>[...s[13]||(s[13]=[e.createTextVNode("youtube",-1)])]),_:1}),e.createVNode(r,{value:"bilibili"},{default:e.withCtx(()=>[...s[14]||(s[14]=[e.createTextVNode("bilibili",-1)])]),_:1}),e.createVNode(r,{value:"youku"},{default:e.withCtx(()=>[...s[15]||(s[15]=[e.createTextVNode("youku",-1)])]),_:1}),e.createVNode(r,{value:"qq"},{default:e.withCtx(()=>[...s[16]||(s[16]=[e.createTextVNode("qq",-1)])]),_:1}),e.createVNode(r,{value:"facebook"},{default:e.withCtx(()=>[...s[17]||(s[17]=[e.createTextVNode("facebook",-1)])]),_:1})]),_:1},8,["modelValue"]),s[20]||(s[20]=e.createElementVNode("p",{class:"item-title"},"视频地址",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.videoSrc},null,8,TR),e.createElementVNode("div",NR,[e.createVNode(u,{modelValue:n.data.data.videoSrc,"onUpdate:modelValue":s[3]||(s[3]=d=>n.data.data.videoSrc=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(g,{modelValue:n.data.data.videoSrc,"onUpdate:modelValue":s[4]||(s[4]=d=>n.data.data.videoSrc=d),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),s[21]||(s[21]=e.createElementVNode("p",{class:"item-title"},"视频封面图",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.videoThumbnail},null,8,SR),e.createElementVNode("div",BR,[e.createVNode(u,{modelValue:n.data.data.videoThumbnail,"onUpdate:modelValue":s[5]||(s[5]=d=>n.data.data.videoThumbnail=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(g,{modelValue:n.data.data.videoThumbnail,"onUpdate:modelValue":s[6]||(s[6]=d=>n.data.data.videoThumbnail=d),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-b7a746d2"]]);var Ms;typeof window<"u"?Ms=window:typeof ca<"u"?Ms=ca:typeof self<"u"?Ms=self:Ms={};var yd=Ms;const K=Ua(yd),DR=Yh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var rf=typeof ca<"u"?ca:typeof window<"u"?window:{},$R=DR,Os;typeof document<"u"?Os=document:(Os=rf["__GLOBAL_DOCUMENT_CACHE@4"],Os||(Os=rf["__GLOBAL_DOCUMENT_CACHE@4"]=$R));var df=Os;const fe=Ua(df);var Du={exports:{}};function Et(){return Et=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},Et.apply(null,arguments)}const LR=Yh(Object.freeze(Object.defineProperty({__proto__:null,get default(){return Et}},Symbol.toStringTag,{value:"Module"})));var AR=vR,IR=Object.prototype.toString;function vR(n){if(!n)return!1;var t=IR.call(n);return t==="[object Function]"||typeof n=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)}function MR(n,t){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o)return(o=o.call(n)).next.bind(o);if(Array.isArray(n)||(o=OR(n))||t){o&&(n=o);var a=0;return function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
316
+ */var w$=function(n){return n!=null&&(Jh(n)||b$(n)||!!n._isBuffer)};function Jh(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function b$(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&Jh(n.slice(0,0))}(function(){var n=_$,t=Zh.utf8,o=w$,a=Zh.bin,i=function(s,l){s.constructor==String?l&&l.encoding==="binary"?s=a.stringToBytes(s):s=t.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var r=n.bytesToWords(s),c=s.length*8,u=1732584193,g=-271733879,m=-1732584194,d=271733878,p=0;p<r.length;p++)r[p]=(r[p]<<8|r[p]>>>24)&16711935|(r[p]<<24|r[p]>>>8)&4278255360;r[c>>>5]|=128<<c%32,r[(c+64>>>9<<4)+14]=c;for(var f=i._ff,h=i._gg,C=i._hh,w=i._ii,p=0;p<r.length;p+=16){var x=u,y=g,b=m,V=d;u=f(u,g,m,d,r[p+0],7,-680876936),d=f(d,u,g,m,r[p+1],12,-389564586),m=f(m,d,u,g,r[p+2],17,606105819),g=f(g,m,d,u,r[p+3],22,-1044525330),u=f(u,g,m,d,r[p+4],7,-176418897),d=f(d,u,g,m,r[p+5],12,1200080426),m=f(m,d,u,g,r[p+6],17,-1473231341),g=f(g,m,d,u,r[p+7],22,-45705983),u=f(u,g,m,d,r[p+8],7,1770035416),d=f(d,u,g,m,r[p+9],12,-1958414417),m=f(m,d,u,g,r[p+10],17,-42063),g=f(g,m,d,u,r[p+11],22,-1990404162),u=f(u,g,m,d,r[p+12],7,1804603682),d=f(d,u,g,m,r[p+13],12,-40341101),m=f(m,d,u,g,r[p+14],17,-1502002290),g=f(g,m,d,u,r[p+15],22,1236535329),u=h(u,g,m,d,r[p+1],5,-165796510),d=h(d,u,g,m,r[p+6],9,-1069501632),m=h(m,d,u,g,r[p+11],14,643717713),g=h(g,m,d,u,r[p+0],20,-373897302),u=h(u,g,m,d,r[p+5],5,-701558691),d=h(d,u,g,m,r[p+10],9,38016083),m=h(m,d,u,g,r[p+15],14,-660478335),g=h(g,m,d,u,r[p+4],20,-405537848),u=h(u,g,m,d,r[p+9],5,568446438),d=h(d,u,g,m,r[p+14],9,-1019803690),m=h(m,d,u,g,r[p+3],14,-187363961),g=h(g,m,d,u,r[p+8],20,1163531501),u=h(u,g,m,d,r[p+13],5,-1444681467),d=h(d,u,g,m,r[p+2],9,-51403784),m=h(m,d,u,g,r[p+7],14,1735328473),g=h(g,m,d,u,r[p+12],20,-1926607734),u=C(u,g,m,d,r[p+5],4,-378558),d=C(d,u,g,m,r[p+8],11,-2022574463),m=C(m,d,u,g,r[p+11],16,1839030562),g=C(g,m,d,u,r[p+14],23,-35309556),u=C(u,g,m,d,r[p+1],4,-1530992060),d=C(d,u,g,m,r[p+4],11,1272893353),m=C(m,d,u,g,r[p+7],16,-155497632),g=C(g,m,d,u,r[p+10],23,-1094730640),u=C(u,g,m,d,r[p+13],4,681279174),d=C(d,u,g,m,r[p+0],11,-358537222),m=C(m,d,u,g,r[p+3],16,-722521979),g=C(g,m,d,u,r[p+6],23,76029189),u=C(u,g,m,d,r[p+9],4,-640364487),d=C(d,u,g,m,r[p+12],11,-421815835),m=C(m,d,u,g,r[p+15],16,530742520),g=C(g,m,d,u,r[p+2],23,-995338651),u=w(u,g,m,d,r[p+0],6,-198630844),d=w(d,u,g,m,r[p+7],10,1126891415),m=w(m,d,u,g,r[p+14],15,-1416354905),g=w(g,m,d,u,r[p+5],21,-57434055),u=w(u,g,m,d,r[p+12],6,1700485571),d=w(d,u,g,m,r[p+3],10,-1894986606),m=w(m,d,u,g,r[p+10],15,-1051523),g=w(g,m,d,u,r[p+1],21,-2054922799),u=w(u,g,m,d,r[p+8],6,1873313359),d=w(d,u,g,m,r[p+15],10,-30611744),m=w(m,d,u,g,r[p+6],15,-1560198380),g=w(g,m,d,u,r[p+13],21,1309151649),u=w(u,g,m,d,r[p+4],6,-145523070),d=w(d,u,g,m,r[p+11],10,-1120210379),m=w(m,d,u,g,r[p+2],15,718787259),g=w(g,m,d,u,r[p+9],21,-343485551),u=u+x>>>0,g=g+y>>>0,m=m+b>>>0,d=d+V>>>0}return n.endian([u,g,m,d])};i._ff=function(s,l,r,c,u,g,m){var d=s+(l&r|~l&c)+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._gg=function(s,l,r,c,u,g,m){var d=s+(l&c|r&~c)+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._hh=function(s,l,r,c,u,g,m){var d=s+(l^r^c)+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._ii=function(s,l,r,c,u,g,m){var d=s+(r^(l|~c))+(u>>>0)+m;return(d<<g|d>>>32-g)+l},i._blocksize=16,i._digestsize=16,Kh.exports=function(s,l){if(s==null)throw new Error("Illegal argument "+s);var r=n.wordsToBytes(i(s,l));return l&&l.asBytes?r:l&&l.asString?a.bytesToString(r):n.bytesToHex(r)}})();var C$=Kh.exports;const V$=Ua(C$),x$={class:"setting-content"},k$={class:"setting-header flex items-center"},E$={class:"setting-header flex items-center"},T$={class:"setting-header flex items-center"},N$={class:"setting-header flex items-center"},S$={class:"setting-header flex items-center"},B$={class:"setting-header flex items-center"},P$=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",x$,[e.createElementVNode("div",k$,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=u=>n.data.onlyShowPc=u)},null,8,["modelValue"])]),e.createElementVNode("div",E$,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"表单名称",-1)),e.createVNode(r,{modelValue:n.data.data.title,"onUpdate:modelValue":s[1]||(s[1]=u=>n.data.data.title=u),placeholder:"请输入表单名称"},null,8,["modelValue"])]),e.createElementVNode("div",T$,[s[8]||(s[8]=e.createElementVNode("span",{class:"header-title"},"Event Code (Key)",-1)),e.createVNode(r,{modelValue:n.data.data.event_name,"onUpdate:modelValue":s[2]||(s[2]=u=>n.data.data.event_name=u),placeholder:"请输入Event Code (Key)"},null,8,["modelValue"])]),e.createElementVNode("div",N$,[s[9]||(s[9]=e.createElementVNode("span",{class:"header-title"},"同意复选框文本",-1)),e.createVNode(r,{modelValue:n.data.data.checkText,"onUpdate:modelValue":s[3]||(s[3]=u=>n.data.data.checkText=u),placeholder:"请输入同意复选框文本"},null,8,["modelValue"])]),e.createElementVNode("div",S$,[s[10]||(s[10]=e.createElementVNode("span",{class:"header-title"},"同意通知",-1)),e.createVNode(r,{modelValue:n.data.data.notice,"onUpdate:modelValue":s[4]||(s[4]=u=>n.data.data.notice=u),placeholder:"请输入同意通知"},null,8,["modelValue"])]),e.createElementVNode("div",B$,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"提交api",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[5]||(s[5]=u=>n.data.api=u),placeholder:"请输入提交api"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-cb758cdc"]]),D$=["innerHTML"],$$={class:"form-input-group"},L$=["placeholder","value","onInput"],A$={key:0,class:"input-error"},ef=J(e.defineComponent({name:"FormInput",__name:"index",props:{value:{default:()=>[]},line:{default:1},title:{default:""},placeholder:{default:""},styleType:{default:""},optional:{type:Boolean,default:!1},componentKey:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref([]),l=e.computed({get(){return a.value||new Array(a.line)},set(u){i("updateValue",u),e.nextTick(r)}}),r=()=>{if(a.optional)return;const u=l.value.some(m=>!!m),g=a.componentKey??"tempKey";!u&&s.value.indexOf(g)<0&&s.value.push(g),u&&s.value.indexOf(g)>-1&&s.value.splice(s.value.indexOf(g),1),i("updateError",{key:a.componentKey,isPass:u})},c=(u,g)=>{const m=g.target,d=JSON.parse(JSON.stringify(l.value));d.splice(u,1,m.value),l.value=d};return t({checkError:r}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input",{"--is-tight":n.styleType=="2"}])},[e.createElementVNode("div",{class:"tx-btn text-blue-dark mb-1",innerHTML:n.title},null,8,D$),e.createElementVNode("div",$$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.line,(m,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`input-${d}`},[e.createElementVNode("input",{class:e.normalizeClass(["default-input",{"has-error":s.value.length>0&&d==0}]),type:"text",placeholder:d==0?n.placeholder:"请输入",value:l.value[d],onInput:p=>c(d,p)},null,42,L$),d==0?(e.openBlock(),e.createElementBlock("div",A$,"此为必填项")):e.createCommentVNode("",!0)],64))),128))])],2))}}),[["__scopeId","data-v-c52c5e09"]]),I$={class:"tx-btn text-blue-dark mb-1"},v$=["placeholder"],M$={class:"form-select__menu"},O$={class:"form-select__list"},U$=["onClick"],R$={class:"input-error"},F$=J({__name:"index",props:{options:{type:Array,default:()=>[]},value:{type:String,default:""},title:{type:String,default:""},optionPlaceholder:{type:String,default:"请选择"},error:{type:Object,default:null},isEmptyFirst:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},componentKey:{type:String,default:null}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o;e.ref(Date.now());const s=e.ref(!1),l=e.ref([]),r=e.ref(null),c=e.computed({get(){return a.options.some(d=>d.value==a.value)?a.value:""},set(d){i("updateValue",d),u()}});function u(){if(a.optional)return;const d=c.value,p=a.componentKey??"tempKey",f=l.value.indexOf(p);!d&&f<0&&l.value.push(p),d&&f>-1&&l.value.splice(f,1),i("updateError",{key:a.componentKey,isPass:!!d})}function g(d){c.value=d,s.value=!1}function m(d){r.value&&!r.value.contains(d.target)&&(s.value=!1)}return e.onMounted(()=>{!c.value&&!a.isEmptyFirst&&a.options&&a.options[0]&&(i("updateValue",a.options[0].value),u()),document.addEventListener("click",m)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",m)}),t({checkError:u}),(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:"form-select",ref_key:"selectRef",ref:r},[e.createElementVNode("div",I$,e.toDisplayString(n.title),1),e.createElementVNode("div",{class:e.normalizeClass(["form-select__select",{"is-active":s.value,"has-error":l.value.length>0&&!n.optional}]),onClick:p[1]||(p[1]=f=>s.value=!s.value)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"form-select__btn",placeholder:n.optionPlaceholder,"onUpdate:modelValue":p[0]||(p[0]=f=>c.value=f),readonly:""},null,8,v$),[[e.vModelText,c.value]]),e.createElementVNode("div",M$,[e.createVNode(di,null,{default:e.withCtx(()=>[e.createElementVNode("ul",O$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,f=>(e.openBlock(),e.createElementBlock("li",{class:"form-select__option",key:f.key,onClick:h=>g(f.value)},e.toDisplayString(f.name),9,U$))),128))])]),_:1})])],2),e.withDirectives(e.createElementVNode("div",R$,"此为必填项",512),[[e.vShow,!n.optional]])],512))}},[["__scopeId","data-v-c2a92ed3"]]),H$={class:"tx-btn text-blue-dark mb-1"},j$=["onClick"],z$={class:"option-label text-teal"},q$={class:"option-name text-black"},W$={key:0,class:"input-error"},G$={key:1,class:"input-error"},X$=J(e.defineComponent({name:"FormPhone",__name:"index",props:{value:{default:()=>({})},title:{default:""},error:{default:()=>({})},optional:{type:Boolean,default:!1},componentKey:{default:""},host:{default:""},locale:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref(!1),l=e.ref(!1),r=e.ref([]),c=e.ref([]),u=e.ref(null),g=e.computed(()=>c.value),m=e.computed({get(){var w;return((w=a.value)==null?void 0:w.code)??""},set(w){i("updateValue",{code:w,number:d.value??""})}}),d=e.computed({get(){var w;return((w=a.value)==null?void 0:w.number)??""},set(w){i("updateValue",{code:m.value,number:w})}}),p=w=>/^[\d\s\-\(\)]+$/.test(w)&&w.replace(/\D/g,"").length>=7,f=()=>{if(a.optional)return;const w="myNumber";e.nextTick(()=>{const x=p(d.value);console.log("isValid",x);const y=d.value;console.log("numberValue",y),(!y||!x)&&r.value.indexOf(w)<0&&r.value.push(w),y&&x&&r.value.indexOf(w)>-1&&r.value.splice(r.value.indexOf(w),1),i("updateError",{key:a.componentKey,isPass:r.value.length<=0})})};t({checkError:f});const h=async()=>{try{const w={params:{host:a.host,langCode:a.locale}},x="/country/list",{data:y}=await zE.get(x,w);c.value=y.data.map(b=>({...b,key:b.dial,label:b.country,value:b.dial,name:`+${b.dial}`})),!m.value&&c.value.length>0&&(m.value=c.value[0].value)}catch(w){console.error("Failed to fetch country data:",w)}},C=w=>{u.value&&!u.value.contains(w.target)&&(s.value=!1)};return e.onMounted(()=>{h(),document.addEventListener("click",C)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C)}),(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:"form-phone",ref_key:"phoneRef",ref:u},[e.createElementVNode("div",H$,e.toDisplayString(n.title),1),e.createElementVNode("div",{class:e.normalizeClass(["form-phone-wrapper",[{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]])},[e.createElementVNode("div",{class:"form-select",onClick:x[1]||(x[1]=y=>s.value=!s.value)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:e.normalizeClass(["form-select-btn",[{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]]),"onUpdate:modelValue":x[0]||(x[0]=y=>m.value=y),readonly:""},null,2),[[e.vModelText,m.value]])]),e.createElementVNode("div",{class:"form-number",onClick:x[5]||(x[5]=y=>s.value=!1)},[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass([{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]),type:"text","onUpdate:modelValue":x[2]||(x[2]=y=>d.value=y),placeholder:"12345678",onChange:f,onFocus:x[3]||(x[3]=y=>l.value=!0),onBlur:x[4]||(x[4]=y=>l.value=!1)},null,34),[[e.vModelText,d.value]])]),e.createElementVNode("div",{class:e.normalizeClass(["form-phone-select-menu",[{"is-active":s.value}]])},[e.createVNode(di,null,{default:e.withCtx(()=>[e.createElementVNode("ul",{class:"form-select-list",onClick:x[6]||(x[6]=y=>s.value=!s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,y=>(e.openBlock(),e.createElementBlock("li",{class:"form-select-option flex-between",key:y.key,onClick:b=>m.value=y.value},[e.createElementVNode("div",z$,e.toDisplayString(y.label),1),e.createElementVNode("div",q$,e.toDisplayString(y.name),1)],8,j$))),128))])]),_:1})],2)],2),d.value?(e.openBlock(),e.createElementBlock("div",W$,"请输入正确的格式")):(e.openBlock(),e.createElementBlock("div",G$,e.toDisplayString(n.error.errorMsg),1))],512))}}),[["__scopeId","data-v-3596449b"]]),Y$={class:"form-email"},K$={class:"tx-btn text-blue-dark mb-1"},Q$={class:"form-email-input"},Z$={key:0,class:"input-error"},J$={key:1,class:"input-error"},eL=J(e.defineComponent({name:"FormEmail",__name:"index",props:{value:{default:""},title:{default:""},componentKey:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref([]),l=e.computed({get(){return a.value},set(u){i("updateValue",u)}}),r=u=>{const g=/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;return!!u.match(g)},c=()=>{const u="myNumber";e.nextTick(()=>{const g=r(l.value);!g&&s.value.indexOf(u)<0&&s.value.push(u),g&&s.value.indexOf(u)>-1&&s.value.splice(s.value.indexOf(u),1),i("updateError",{key:a.componentKey,isPass:s.value.length<=0})})};return t({checkError:c}),(u,g)=>(e.openBlock(),e.createElementBlock("div",Y$,[e.createElementVNode("div",K$,e.toDisplayString(n.title),1),e.createElementVNode("div",Q$,[e.withDirectives(e.createElementVNode("input",{type:"email",placeholder:"example@yourmail.com","onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),class:e.normalizeClass(["default-input",{"has-error":s.value.length>0}]),onChange:c},null,34),[[e.vModelText,l.value]]),l.value?(e.openBlock(),e.createElementBlock("div",Z$,"请输入正确的格式")):(e.openBlock(),e.createElementBlock("div",J$,"此为必填项"))])]))}}),[["__scopeId","data-v-9e818ea4"]]),tL={key:"loading",class:"btn-submit-wrapper"},nL={key:"success",class:"btn-submit-wrapper"},oL={key:"fail",class:"btn-submit-wrapper"},aL={key:"default",class:"btn-submit-wrapper"},iL={class:"btn-submit-text"},sL=J(e.defineComponent({name:"BtnSubmit",__name:"index",props:{text:{default:"Button"},isLoading:{type:Boolean,default:!1},isSuccess:{type:Boolean,default:!1},isFail:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["btn-submit btn-primary w-100 size-normal",{"is-fail":n.isFail}]),type:"button"},[e.createVNode(e.Transition,{name:"submit-btn-label",mode:"out-in"},{default:e.withCtx(()=>[n.isLoading?(e.openBlock(),e.createElementBlock("div",tL,[...o[0]||(o[0]=[e.createElementVNode("div",{class:"spinner"},null,-1)])])):n.isSuccess?(e.openBlock(),e.createElementBlock("div",nL,[...o[1]||(o[1]=[e.createElementVNode("div",{class:"btn-submit-text"}," 提交成功 ",-1)])])):n.isFail?(e.openBlock(),e.createElementBlock("div",oL,[...o[2]||(o[2]=[e.createElementVNode("div",{class:"btn-submit-text"}," 提交失败 ",-1)])])):(e.openBlock(),e.createElementBlock("div",aL,[e.createElementVNode("div",iL,e.toDisplayString(n.text),1),o[3]||(o[3]=e.createElementVNode("span",{class:"btn-submit-icon"},null,-1))]))]),_:1})],2))}}),[["__scopeId","data-v-da92fddf"]]),lL={key:0},rL={key:1,class:"register-form-container"},dL={key:0,class:"register-form-wrapper"},cL={class:"register-form-title mb-3"},uL={class:"row mb-6"},mL={class:"col col-12 col-md-6"},pL={class:"col col-12 col-md-6"},hL={class:"other-col-temp col col-12 col-md-6"},fL={class:"col col-12 col-md-6"},gL={class:"col col-12 col-md-6"},yL={class:"col col-12 col-md-6"},_L={class:"col col-12"},wL={class:"register-form-btn mb-6"},bL=["innerHTML"],Yr=J(e.defineComponent({name:"RegisterForm",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var O,H;if(o.modelValue&&o.modelValue.data)return;const q={id:((O=o.modelValue)==null?void 0:O.id)||F(),type:"RegisterForm",onlyShowPc:!1,data:{title:"注册表单",event_name:"12",checkText:"我同意接收来自官方的直接营销信息",notice:"注意:请勿在表单中填写任何个人身份信息,如身份证号、护照号等。"},api:((H=o.modelValue)==null?void 0:H.api)||"/event-registration/submit"};a("update:modelValue",q)},s=e.computed(()=>{var q;return o.isPreview?!((q=o.modelValue)!=null&&q.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=q=>{a("handlePaste",q)};i();const m=e.ref({name:[],youare:"",other_person_type:"",number:null,email:"",school_or_organisation_name:[],opt_out_direct_marketing:!1}),d=e.ref([]),p=e.ref(!0),f=e.ref(!1),h=e.ref(!1),C=e.ref(!1),w=e.ref(null),x=e.ref(null),y=e.ref(null),b=e.ref(null),V=e.ref(null),T=e.computed(()=>{var q;return((q=o.componentProps)==null?void 0:q.event_date)??""}),k=e.computed(()=>{var q;return((q=o.componentProps)==null?void 0:q.optionsYouare)??[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]}),S=e.computed(()=>{var O,H,R,M,W;const q={host:o.host,langCode:o.locale,eventCode:(H=(O=o.modelValue)==null?void 0:O.data)==null?void 0:H.event_name,name:(R=m.value.name)==null?void 0:R.join(" "),personType:(M=k.value.find(Z=>Z.value===m.value.youare))==null?void 0:M.key,otherPersonType:m.value.other_person_type,contactNumber:m.value.number?`+${m.value.number.code}${m.value.number.number}`:"",email:m.value.email,schoolOrOrganisationName:(W=m.value.school_or_organisation_name)==null?void 0:W.join(","),optOutDirectMarketing:+m.value.opt_out_direct_marketing,eventDate:T.value,timestamp:Date.now()};return Object.keys(q).forEach(Z=>{q[Z]||delete q[Z]}),q}),D=(q,O)=>{m.value[q]=O},N=({key:q,isPass:O})=>{console.log("updateErrorFromInput",q,O),!O&&d.value.indexOf(q)<0&&d.value.push(q),O&&d.value.indexOf(q)>-1&&d.value.splice(d.value.indexOf(q),1)},A=()=>{if(f.value||h.value||C.value)return;[w.value,x.value,y.value,b.value,V.value].forEach(O=>{var H;(H=O==null?void 0:O.checkError)==null||H.call(O)}),e.nextTick(()=>{d.value.length>0||I()})},$=q=>{const O=q||S.value,H={};for(const[W,Z]of Object.entries(O))Z!==""&&Z!==null&&Z!==void 0&&(H[W]=Z);const M=Object.keys(H).sort().map(W=>`${H[W]}`).join("");return V$(M)},I=async()=>{var H;f.value=!0;const q=$(S.value),O=JSON.stringify({...S.value,sign:q});try{const{data:R}=await en.post((H=o.modelValue)==null?void 0:H.api,O),M=R.data.ref_no;U(),a("handleClick",`/thank-you?ref=${M}`)}catch(R){console.log(R),Y()}finally{f.value=!1}},U=()=>{m.value={name:[],youare:"",other_person_type:"",number:null,email:"",school_or_organisation_name:[],opt_out_direct_marketing:!1},f.value=!1,h.value=!0,setTimeout(()=>{h.value=!1,G()},2500)},Y=()=>{f.value=!1,C.value=!0,setTimeout(()=>{C.value=!1},3500)},G=()=>{p.value=!1,e.nextTick(()=>{p.value=!0})};return(q,O)=>{var H,R,M,W,Z,ie,ge,Le;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"register-form",onMouseenter:O[9]||(O[9]=ae=>l.value=!0),onMouseleave:O[10]||(O[10]=ae=>l.value=!1)},[n.host?(e.openBlock(),e.createElementBlock("div",rL,[p.value?(e.openBlock(),e.createElementBlock("div",dL,[e.createElementVNode("div",cL,e.toDisplayString((R=(H=n.modelValue)==null?void 0:H.data)==null?void 0:R.title),1),e.createElementVNode("div",uL,[e.createElementVNode("div",mL,[e.createVNode(ef,{ref_key:"field1",ref:w,class:"mb-0",componentKey:"name",title:"姓名",placeholder:"你的名字",value:m.value.name,onUpdateValue:O[0]||(O[0]=ae=>D("name",ae)),onUpdateError:N},null,8,["value"])]),e.createElementVNode("div",pL,[e.createVNode(F$,{ref_key:"field2",ref:x,class:"mb-0",componentKey:"youare",title:"你是",options:k.value,placeholder:"Select",value:m.value.youare,optional:!m.value.youare,onUpdateValue:O[1]||(O[1]=ae=>D("youare",ae)),onUpdateError:N},null,8,["options","value","optional"])]),e.withDirectives(e.createElementVNode("div",hL,null,512),[[e.vShow,S.value.person_type=="others"]]),e.withDirectives(e.createElementVNode("div",fL,[e.withDirectives(e.createElementVNode("input",{type:"text",class:"default-input","onUpdate:modelValue":O[2]||(O[2]=ae=>m.value.other_person_type=ae),placeholder:"其他"},null,512),[[e.vModelText,m.value.other_person_type]])],512),[[e.vShow,S.value.person_type=="others"]]),e.createElementVNode("div",gL,[e.createVNode(X$,{ref_key:"field3",ref:y,class:"mb-0",componentKey:"number",title:"联系电话",value:m.value.number,error:{errorMsg:"此为必填项"},host:n.host,locale:n.locale,onUpdateValue:O[3]||(O[3]=ae=>D("number",ae)),onUpdateError:N},null,8,["value","host","locale"])]),e.createElementVNode("div",yL,[e.createVNode(eL,{ref_key:"field4",ref:b,class:"mb-0",componentKey:"email",title:"电邮",placeholder:"example@yourmail.com",value:m.value.email,onUpdateValue:O[4]||(O[4]=ae=>D("email",ae)),onUpdateError:N},null,8,["value"])]),e.createElementVNode("div",_L,[e.createVNode(ef,{ref_key:"field5",ref:V,class:"mb-0",componentKey:"school_or_organisation_name",title:"学校名称/组织",placeholder:"学校名称/组织",value:m.value.school_or_organisation_name,onUpdateValue:O[5]||(O[5]=ae=>D("school_or_organisation_name",ae)),onUpdateError:N},null,8,["value"])])]),e.createElementVNode("div",wL,[e.createVNode(sL,{text:"提交",onClick:A,isLoading:f.value,isSuccess:h.value,isFail:C.value},null,8,["isLoading","isSuccess","isFail"])]),e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"default-checkbox",id:"register-form-checkbox","onUpdate:modelValue":O[6]||(O[6]=ae=>m.value.opt_out_direct_marketing=ae)},null,512),[[e.vModelCheckbox,m.value.opt_out_direct_marketing]]),e.createElementVNode("label",{for:"register-form-checkbox",innerHTML:(W=(M=n.modelValue)==null?void 0:M.data)==null?void 0:W.checkText},null,8,bL)]),e.withDirectives(e.createElementVNode("div",{class:"register-form-notice mt-3"},e.toDisplayString((ie=(Z=n.modelValue)==null?void 0:Z.data)==null?void 0:ie.notice),513),[[e.vShow,(Le=(ge=n.modelValue)==null?void 0:ge.data)==null?void 0:Le.notice]])])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("p",lL,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":O[7]||(O[7]=ae=>l.value=ae),onHandleEdit:O[8]||(O[8]=ae=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P$,{key:1,show:r.value,"onUpdate:show":O[11]||(O[11]=ae=>r.value=ae),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-408a7930"]]),CL=Object.freeze(Object.defineProperty({__proto__:null,default:Yr},Symbol.toStringTag,{value:"Module"})),VL={class:"setting-content"},xL={class:"setting-header flex items-center"},kL={class:"setting-body"},EL={class:"setting-item"},TL={class:"btn-group"},NL={key:0,class:"drag-handle"},SL=["src"],BL={class:"item-uplaod flex items-center"},PL=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=()=>{if(l.data.data.length>=3){alert("最多只能添加3个");return}l.data.data.push({id:F(),title:"",subtitle:"",url:"",imgSrc:""})},g=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("icon-drag-arrow"),h=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-input"),w=e.resolveComponent("icon-plus"),x=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(x,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",VL,[e.createElementVNode("div",xL,[d[5]||(d[5]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=y=>n.data.onlyShowPc=y)},null,8,["modelValue"])]),e.createElementVNode("div",kL,[e.createElementVNode("div",EL,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[1]||(d[1]=y=>n.data.data=y),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[2]||(d[2]=y=>a.value=!0),onEnd:d[3]||(d[3]=y=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:y})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:y.id},[e.createElementVNode("div",TL,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",NL,[e.createVNode(f,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(h,{class:"btn-delete",onClick:b=>g(y.id)},null,8,["onClick"])]),d[6]||(d[6]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(C,{modelValue:y.title,"onUpdate:modelValue":b=>y.title=b,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[7]||(d[7]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(C,{modelValue:y.subtitle,"onUpdate:modelValue":b=>y.subtitle=b,placeholder:"请输入文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[8]||(d[8]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(C,{modelValue:y.url,"onUpdate:modelValue":b=>y.url=b,placeholder:"请输入链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[9]||(d[9]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:y.imgSrc},null,8,SL),e.createElementVNode("div",BL,[e.createVNode(C,{modelValue:y.imgSrc,"onUpdate:modelValue":b=>y.imgSrc=b,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:y.imgSrc,"onUpdate:modelValue":b=>y.imgSrc=b,name:`GalleryBlock_img_${y.id}`},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[4]||(d[4]=y=>u())},[e.createVNode(w),d[10]||(d[10]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-5c2714e9"]]),DL={class:"gallery-block-wrapper"},$L=["onClick"],LL={class:"gallery-block-image-content"},AL=["innerHTML"],IL=["innerHTML"],vL={class:"gallery-block-image-link"},ML={class:"circle-link circle-link--light"},OL=["href"],UL=["onClick"],Kr=J(e.defineComponent({name:"GalleryBlock",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"GalleryBlock",onlyShowPc:!1,data:[{id:F(),title:"标题",subtitle:"副标题",url:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"},{id:F(),title:"标题",subtitle:"副标题",url:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=d=>{a("handlePaste",d)};i();const m=d=>{if(!(!d.url||!o.isPreview)){if(d.url.includes("http")){const p=window.open(d.url,"_blank","noopener,noreferrer");p&&(p.opener=null);return}a("handleClick",d)}};return(d,p)=>{var f,h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-block",onMouseenter:p[2]||(p[2]=w=>l.value=!0),onMouseleave:p[3]||(p[3]=w=>l.value=!1)},[e.createElementVNode("div",DL,[e.createElementVNode("div",{class:e.normalizeClass(["gallery-block-row",`gallery-block-row-cols-1 gallery-block-row-cols-md-${(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.length}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=n.modelValue)==null?void 0:C.data,w=>(e.openBlock(),e.createElementBlock("div",{class:"gallery-block-col",key:w.id},[e.createElementVNode("div",{class:"gallery-block-image-block",onClick:x=>m(w)},[e.createElementVNode("div",{class:e.normalizeClass(["gallery-block-image-bg",{"gallery-block-image-bg-has-subtitle":w.subtitle}]),style:e.normalizeStyle({"--bg-image":`url('${w.imgSrc}')`})},null,6),e.createElementVNode("div",LL,[p[7]||(p[7]=e.createElementVNode("div",{class:"gallery-block-image-border"},null,-1)),e.createElementVNode("div",{class:"gallery-block-image-title",innerHTML:w.title},null,8,AL),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{class:"gallery-block-image-subtitle",innerHTML:w.subtitle},null,8,IL)],512),[[e.vShow,w.subtitle]]),e.createElementVNode("div",vL,[e.createElementVNode("div",ML,[w.url&&w.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:w.url,class:"nuxt-link-exact-active nuxt-link-active"},[...p[5]||(p[5]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1)])],8,OL)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:x=>m(w),class:"nuxt-link-exact-active nuxt-link-active"},[...p[6]||(p[6]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1)])],8,UL))])])])],8,$L)]))),128))],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=w=>l.value=w),onHandleEdit:p[1]||(p[1]=w=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PL,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=w=>r.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-682e436d"]]),RL=Object.freeze(Object.defineProperty({__proto__:null,default:Kr},Symbol.toStringTag,{value:"Module"})),FL={class:"seting-box"},HL={class:"setting-header flex items-center"},jL={key:0},zL={class:"draggable_box"},qL={class:"drag_top_box"},WL=["onClick"],GL={class:"line-clamp-2"},XL=["src"],YL={class:"item-uplaod flex items-center"},KL={class:"btn_group"},QL=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=f=>{const h={key:F(8),title:"新文章",description:"这是一个新的文章描述",image:"https://picsum.photos/800/600",date:new Date().toISOString().split("T")[0],label:"new",labelName:"新标签",category:"new"};f==="prepend"?a.data.list.unshift(h):f==="append"&&a.data.list.push(h)},s=f=>r.value.has(f.key),l=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.ref(new Set),c=f=>{a.data.list=a.data.list.filter(h=>h.key!==f)},u=f=>{if(!r.value.has(f.key))r.value.add(f.key);else{const h=[];a.data.list.forEach(C=>{C.key&&h.push(C.key)}),r.value=new Set(h),r.value.delete(f.key)}},g=e.ref(!1);e.watch(()=>{var f;return(f=a.data)==null?void 0:f.list},f=>{if(f&&Array.isArray(f)&&!g.value){g.value=!0;const h=f.map(C=>C.key);r.value=new Set(h)}},{immediate:!0,deep:!0});const m=t,d=e.ref(!1),p=()=>{m("update:show",!1)};return(f,h)=>{const C=e.resolveComponent("a-switch"),w=e.resolveComponent("a-option"),x=e.resolveComponent("a-select"),y=e.resolveComponent("a-input"),b=e.resolveComponent("icon-drag-dot"),V=e.resolveComponent("icon-drag-arrow"),T=e.resolveComponent("icon-delete"),k=e.resolveComponent("a-date-picker"),S=e.resolveComponent("a-button"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:p,unmountOnClose:""},{title:e.withCtx(()=>{var N;return[e.createTextVNode(e.toDisplayString((N=n.data)==null?void 0:N.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",FL,[e.createElementVNode("div",HL,[h[8]||(h[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(C,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),h[22]||(h[22]=e.createElementVNode("p",{class:"item-title"},"内容宽度",-1)),e.createVNode(x,{style:{width:"320px",background:"#ffffff",marginBottom:"20px"},modelValue:n.data.width,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.width=N),placeholder:"请选择宽度..."},{default:e.withCtx(()=>[e.createVNode(w,{value:"container-content-800"},{default:e.withCtx(()=>[...h[9]||(h[9]=[e.createTextVNode("小 ",-1)])]),_:1}),e.createVNode(w,{value:"container-content-952"},{default:e.withCtx(()=>[...h[10]||(h[10]=[e.createTextVNode("默认 ",-1)])]),_:1}),e.createVNode(w,{value:"container-content-1208"},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(w,{value:"container-content-1920"},{default:e.withCtx(()=>[...h[12]||(h[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),n.data.getDataType==="all"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[h[13]||(h[13]=e.createElementVNode("p",{class:"item-title"},"您希望展示的文章类别标签",-1)),e.createVNode(y,{modelValue:n.data.getDataType,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.getDataType=N)},null,8,["modelValue"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.data.list.length===0?(e.openBlock(),e.createElementBlock("div",jL,"暂无数据")):e.createCommentVNode("",!0),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":h[3]||(h[3]=N=>n.data.list=N),"component-data":{tag:"div",type:"transition-group",name:d.value?null:"flip-list"}},l.value,{disabled:!1,onStart:h[4]||(h[4]=N=>d.value=!0),onEnd:h[5]||(h[5]=N=>d.value=!1),"item-key":"key"}),{item:e.withCtx(({element:N,index:A})=>[e.createElementVNode("div",zL,[e.createElementVNode("div",qL,[e.createElementVNode("div",{style:{display:"flex","align-items":"center"},onClick:$=>u(N)},[e.createVNode(b,{style:{"margin-right":"10px"}}),e.createElementVNode("span",GL,e.toDisplayString(N.title),1)],8,WL),e.createElementVNode("div",null,[e.createVNode(V,{class:"icon_drag"}),e.createVNode(T,{class:"btn-delete",onClick:e.withModifiers($=>c(N.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[h[14]||(h[14]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.title,"onUpdate:modelValue":$=>N.title=$},null,8,["modelValue","onUpdate:modelValue"]),h[15]||(h[15]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.image},null,8,XL),e.createElementVNode("div",YL,[e.createVNode(y,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,placeholder:"请输入图片链接","allow-clear":"",style:{border:"1px solid #c0c0c0"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,name:`CardCarouselArticles_${N.key}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),h[16]||(h[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.link,"onUpdate:modelValue":$=>N.link=$},null,8,["modelValue","onUpdate:modelValue"]),h[17]||(h[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标签名称",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.labelName,"onUpdate:modelValue":$=>N.labelName=$},null,8,["modelValue","onUpdate:modelValue"]),h[18]||(h[18]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"描述",-1)),e.createVNode(y,{style:{border:"1px solid #f1eeee"},modelValue:N.desc,"onUpdate:modelValue":$=>N.desc=$},null,8,["modelValue","onUpdate:modelValue"]),h[19]||(h[19]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"日期",-1)),e.createVNode(k,{style:{width:"200px"},modelValue:N.date,"onUpdate:modelValue":$=>N.date=$},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!s(N)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createElementVNode("div",KL,[e.createVNode(S,{onClick:h[6]||(h[6]=N=>i("prepend")),type:"primary",style:{"margin-right":"20px"}},{default:e.withCtx(()=>[...h[20]||(h[20]=[e.createTextVNode("前置",-1)])]),_:1}),e.createVNode(S,{onClick:h[7]||(h[7]=N=>i("append")),type:"primary"},{default:e.withCtx(()=>[...h[21]||(h[21]=[e.createTextVNode("追加",-1)])]),_:1})])],64))])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-c52de08a"]]),ZL={key:0},JL={class:"slide-content"},eA={class:"mt-10 mt-md-12"},tA={key:1},nA={class:"row row-cols-1 row-cols-md-3 row-cols-lg-4 justify-content-center"},Qr=J(e.defineComponent({name:"CardCarouselArticles",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},c=M=>{a("handlePaste",M)},u=()=>{var W,Z,ie,ge;const M={id:((W=o.modelValue)==null?void 0:W.id)||F(),type:"CardCarouselArticles",onlyShowPc:!1,bgColor:((Z=o.modelValue)==null?void 0:Z.bgColor)||"#f8f9fa",width:((ie=o.modelValue)==null?void 0:ie.width)||"container-content-952",isLoop:((ge=o.modelValue)==null?void 0:ge.isLoop)??!0,getDataType:!1,list:[{key:"article-001",title:"探索人工智能的未来发展趋势",desc:"人工智能技术正在快速发展,从机器学习到深度学习,从自然语言处理到计算机视觉,AI正在改变我们的生活方式。本文将深入探讨AI技术的最新进展和未来发展方向。",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图",date:"2024-01-15",time:"2024-01-15T10:30:00Z",labelName:"科技前沿",category:"technology",link:"/articles/ai-future-trends"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"}]};a("update:modelValue",M)},g=e.computed(()=>{var M;return o.isPreview?!((M=o.modelValue)!=null&&M.onlyShowPc)||!D():!0}),m=e.ref([]),d=e.ref(0),p=e.ref([]),f=e.ref(0),h=e.ref(!1),C=e.ref(!0),w=e.ref(null),x=e.ref(1024),y=[ut.Navigation,ut.Pagination,ut.Autoplay],b=e.ref({centeredSlides:!1,speed:600,slidesPerView:1,slidesPerGroup:1,spaceBetween:16,shortSwipes:!0,longSwipesRatio:.3,loop:!0,autoHeight:!1,breakpoints:{768:{slidesPerView:3,slidesPerGroup:1,spaceBetween:16,shortSwipes:!1},1024:{slidesPerView:4,slidesPerGroup:1,spaceBetween:16}}}),V=()=>{x.value=typeof window<"u"?window.innerWidth:1024};e.onMounted(()=>{V(),typeof window<"u"&&window.addEventListener("resize",V)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",V)}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.classes)??null}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.style)??null});const T=e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.type)??"school"});e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.width)??null});const k=e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.isLoop)??!0}),S=e.computed(()=>{var M,W;return(M=o.modelValue)!=null&&M.getDataType?p.value:((W=o.modelValue)==null?void 0:W.list)||[]});e.computed(()=>x.value>=1024),e.computed(()=>x.value>=768&&x.value<1024);const D=e.computed(()=>x.value<768);e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.data)||[]}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.title)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.subtitle)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.description)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.link)||null}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.linkText)||"View More"});const N=e.computed(()=>x.value>=768?x.value>=1024?4:3:1);e.computed(()=>x.value<768?1:3);const A=e.computed(()=>{var M;return(M=o.modelValue)!=null&&M.getDataType?f.value:(console.log("总页数======",S.value.length),S.value.length)}),$=e.computed(()=>S.value.length>3&&x.value>=1024||S.value.length>2&&x.value>=768&&x.value<1024||x.value<768),I=async()=>{var M;if(!(!o.axiosInstance||!((M=o.modelValue)!=null&&M.apiEndpoint)))try{return(await o.axiosInstance.get(o.modelValue.apiEndpoint)).data}catch(W){return console.error("Error fetching data:",W),null}},U=M=>{d.value=M.realIndex},Y=M=>{w.value=M,h.value||e.nextTick(()=>{setTimeout(R,100)})},G=M=>{var W;(W=w.value)==null||W.slideToLoop(M,600)},q=()=>{var M;(M=w.value)==null||M.slidePrev(600)},O=()=>{var M;(M=w.value)==null||M.slideNext(600)},H=(M,W)=>{T.value=="profile"&&m.value[W].openLightbox()},R=()=>{C.value=!1,e.nextTick(()=>{var M;C.value=!0,(M=w.value)==null||M.destroy(),e.nextTick(()=>{var W;(W=w.value)==null||W.update(),h.value=!0})})};return e.onMounted(async()=>{var M;(M=o.modelValue)!=null&&M.autoFetch&&await I()}),u(),(M,W)=>{var Z,ie;return e.openBlock(),e.createElementBlock(e.Fragment,null,[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(Z=n.modelValue)==null?void 0:Z.bgColor}]),class:"cardcarouselarticles_container",onMouseenter:W[2]||(W[2]=ge=>i.value=!0),onMouseleave:W[3]||(W[3]=ge=>i.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-carousel__wrapper",[((ie=n.modelValue)==null?void 0:ie.width)||"container-content-952"]])},[$.value&&C.value?(e.openBlock(),e.createElementBlock("div",ZL,[e.createVNode(e.unref(kt.Swiper),{ref:"mySwiper",modules:y,"slides-per-view":b.value.slidesPerView,"space-between":b.value.spaceBetween,loop:b.value.loop,speed:b.value.speed,"centered-slides":b.value.centeredSlides,"auto-height":b.value.autoHeight,breakpoints:b.value.breakpoints,class:"swiper card-carousel__swiper",onSlideChange:U,onClickSlide:H,onSwiper:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(ge,Le)=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{class:"swiper-slide",key:`${ge.key}-${Le}`},{default:e.withCtx(()=>[e.createElementVNode("div",JL,[T.value=="article"?(e.openBlock(),e.createBlock(Is,{key:0,componentProps:ge,singleColumn:N.value==1},null,8,["componentProps","singleColumn"])):e.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["slides-per-view","space-between","loop","speed","centered-slides","auto-height","breakpoints"]),e.createElementVNode("div",eA,[e.createVNode(wi,{currentIndex:d.value,count:A.value,onUpdatePage:G,onSlidePrev:q,onSlideNext:O,dark:"",isLoop:k.value},null,8,["currentIndex","count","isLoop"])])])):(e.openBlock(),e.createElementBlock("div",tA,[e.createElementVNode("div",nA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(ge,Le)=>(e.openBlock(),e.createElementBlock("div",{style:{"margin-right":"10px"},class:"card-content",key:`${ge.key}-${Le}`},[T.value=="article"?(e.openBlock(),e.createBlock(Is,{key:0,componentProps:ge,singleColumn:N.value==1},null,8,["componentProps","singleColumn"])):e.createCommentVNode("",!0)]))),128))])]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:i.value,"onUpdate:show":W[0]||(W[0]=ge=>i.value=ge),onHandleEdit:W[1]||(W[1]=ge=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:c},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(QL,{key:1,show:s.value,"onUpdate:show":W[4]||(W[4]=ge=>s.value=ge),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-26b3b079"]]),oA=Object.freeze(Object.defineProperty({__proto__:null,default:Qr},Symbol.toStringTag,{value:"Module"})),aA={class:"seting-box"},iA={key:0},sA={class:"draggable_box"},lA={class:"drag_top_box"},rA=["onClick"],dA=["src"],cA={class:"item-uplaod flex items-center"},uA={class:"btn_group"},mA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=t,s=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=()=>{i("update:show",!1)},r=e.ref(!1),c=e.ref(new Set),u=f=>{if(!c.value.has(f.key))c.value.add(f.key);else{const h=[];a.data.list.forEach(C=>{C.key&&h.push(C.key)}),c.value=new Set(h),c.value.delete(f.key)}},g=f=>{a.data.list=a.data.list.filter(h=>h.key!==f)},m=f=>c.value.has(f.key),d=e.ref(!1);e.watch(()=>{var f;return(f=a.data)==null?void 0:f.list},f=>{if(f&&Array.isArray(f)&&!d.value){d.value=!0;const h=f.map(C=>C.key);c.value=new Set(h)}},{immediate:!0,deep:!0});const p=f=>{const h={key:F(8),title:"示例",desc:"描述",date:"2024-03-08",category:"news",link:"https://www.baidu.com",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"};f==="prepend"?a.data.list=[h,...a.data.list||[]]:f==="append"&&(a.data.list=[...a.data.list||[],h])};return(f,h)=>{const C=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),x=e.resolveComponent("a-slider"),y=e.resolveComponent("icon-drag-dot"),b=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),T=e.resolveComponent("a-input"),k=e.resolveComponent("a-date-picker"),S=e.resolveComponent("a-button"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:l,unmountOnClose:""},{title:e.withCtx(()=>{var N;return[e.createTextVNode(e.toDisplayString((N=n.data)==null?void 0:N.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",aA,[h[24]||(h[24]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(w,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.width,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.width=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...h[9]||(h[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...h[10]||(h[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...h[12]||(h[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),h[25]||(h[25]=e.createElementVNode("p",{class:"item-title"},"背景色",-1)),e.createVNode(w,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.bgColor,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.bgColor=N),placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(C,{value:"#ffffff"},{default:e.withCtx(()=>[...h[13]||(h[13]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(C,{value:"#f8f9fa"},{default:e.withCtx(()=>[...h[14]||(h[14]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),h[26]||(h[26]=e.createElementVNode("p",{class:"item-title"},"桌面显示的列数(最小:1,最大:4)",-1)),e.createVNode(x,{modelValue:n.data.row,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.row=N),min:1,max:4,"default-value":3,"show-input":""},null,8,["modelValue"]),h[27]||(h[27]=e.createElementVNode("p",{class:"item-title"},"移动端显示的列数(最小:1,最大:2)",-1)),e.createVNode(x,{modelValue:n.data.mobileRow,"onUpdate:modelValue":h[3]||(h[3]=N=>n.data.mobileRow=N),min:1,max:2,"default-value":2,"show-input":""},null,8,["modelValue"]),h[28]||(h[28]=e.createElementVNode("p",{class:"item-title"},"文章",-1)),n.data.list.length===0?(e.openBlock(),e.createElementBlock("div",iA,"暂无数据")):e.createCommentVNode("",!0),n.data.list.length?(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({key:1,modelValue:n.data.list,"onUpdate:modelValue":h[4]||(h[4]=N=>n.data.list=N),"component-data":{tag:"div",type:"transition-group",name:r.value?null:"flip-list"}},s.value,{disabled:!1,onStart:h[5]||(h[5]=N=>r.value=!0),onEnd:h[6]||(h[6]=N=>r.value=!1),"item-key":"key"}),{item:e.withCtx(({element:N,index:A})=>[e.createElementVNode("div",sA,[e.createElementVNode("div",lA,[e.createElementVNode("div",{onClick:$=>u(N)},[e.createVNode(y,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(N.title),1)],8,rA),e.createElementVNode("div",null,[e.createVNode(b,{class:"icon_drag"}),e.createVNode(V,{class:"btn-delete",onClick:e.withModifiers($=>g(N.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[h[15]||(h[15]=e.createElementVNode("h2",null,"照片",-1)),h[16]||(h[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(T,{modelValue:N.title,"onUpdate:modelValue":$=>N.title=$,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[17]||(h[17]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.image},null,8,dA),e.createElementVNode("div",cA,[e.createVNode(T,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:N.image,"onUpdate:modelValue":$=>N.image=$,name:"BannerPage","button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue"])]),h[18]||(h[18]=e.createElementVNode("p",{class:"item-title"},"网址",-1)),e.createVNode(T,{modelValue:N.link,"onUpdate:modelValue":$=>N.link=$,placeholder:"请输入网址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[19]||(h[19]=e.createElementVNode("p",{class:"item-title"},"标签名称",-1)),e.createVNode(T,{modelValue:N.labelName,"onUpdate:modelValue":$=>N.labelName=$,placeholder:"请输入标签名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[20]||(h[20]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(T,{modelValue:N.desc,"onUpdate:modelValue":$=>N.desc=$,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[21]||(h[21]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(k,{modelValue:N.date,"onUpdate:modelValue":$=>N.date=$,style:{width:"200px",background:"#ffffff"}},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!m(N)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])):e.createCommentVNode("",!0),e.createElementVNode("div",uA,[e.createVNode(S,{onClick:h[7]||(h[7]=N=>p("prepend")),type:"primary",style:{"margin-right":"20px"}},{default:e.withCtx(()=>[...h[22]||(h[22]=[e.createTextVNode("前置",-1)])]),_:1}),e.createVNode(S,{onClick:h[8]||(h[8]=N=>p("append")),type:"primary"},{default:e.withCtx(()=>[...h[23]||(h[23]=[e.createTextVNode("追加",-1)])]),_:1})])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-c90f3200"]]),pA={class:"mt-10 mt-md-12"},Zr=J(e.defineComponent({name:"CardCarouselMultiRowArticles",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightBoxImage"],setup(n,{emit:t}){const o=n,a=t,i=[ut.Navigation,ut.Pagination,ut.Autoplay],s=e.ref(!1),l=e.ref(!1),r=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},u=ae=>{a("handlePaste",ae)};(()=>{var ye;if(o.modelValue&&o.modelValue.data)return;const ae={id:((ye=o.modelValue)==null?void 0:ye.id)||F(),type:"CardCarouselMultiRowArticles",bgColor:"#ffffff",width:"default",row:4,mobileRow:2,list:[{key:"art-001",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-002",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-003",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-004",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-005",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"}]};a("update:modelValue",ae)})();const m=e.ref(!1),d=e.ref(null),p=e.ref(null),f=e.ref(null),h=ae=>{f.value=ae},C=e.ref(0),w=e.ref([]),x=e.ref({data:[],meta:{}}),y=e.ref([]);e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.classes)??null}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.style)??null}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.type)??"articles"}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.width)??null});const b=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.row)??2}),V=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.mobileRow)??2}),T=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.apiLink)??null});e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.website)??void 0??""}),e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.locale)??"en"});const k=e.ref(1024),S=e.computed(()=>k.value>=768?b.value:V.value),D=e.computed(()=>S.value*2),N=ae=>Math.min(2,Math.ceil(ae.length/S.value)),A=(ae,ye)=>{const ve=(ye-1)*S.value,_e=ve+S.value;return ae.slice(ve,_e)};e.computed(()=>b.value),e.computed(()=>k.value>=768?k.value>=1024?4:3:2);const $=e.computed(()=>{var ae,ye;return(ae=o.modelValue)!=null&&ae.getDataType?x.value.data:T.value?y.value:((ye=o.modelValue)==null?void 0:ye.list)??[]}),I=e.computed(()=>w.value.length>1);e.computed(()=>{var ae;return((ae=p.value)==null?void 0:ae.swiper)??null});const U={768:{slidesPerView:"auto",slidesPerGroup:1,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}};e.watch(C,()=>{Z(d.value)}),e.watch([$,D],()=>{G()});const Y=e.computed(()=>{var ye;const ae=(ye=o.modelValue)==null?void 0:ye.width;return!ae||ae==="default"?"container-content":typeof ae=="string"?ae.startsWith("container-content-")?ae:{small:"container-content-small",middle:"container-content-middle",medium:"container-content-middle",max:"container-content-max"}[ae]||"container-content":typeof ae=="number"?`container-content-${ae}`:"container-content"}),G=()=>{const ae=$.value,ye=[];ae.forEach((ve,_e)=>{const se=Math.floor(_e/D.value);ye[se]||(ye[se]=[]),ye[se].push(ve)}),w.value=ye},q=ae=>{var ye;C.value=(ae==null?void 0:ae.realIndex)??((ye=f.value)==null?void 0:ye.realIndex)??0,Le(),ge()},O=ae=>{var ye,ve;(ve=(ye=f.value)==null?void 0:ye.slideToLoop)==null||ve.call(ye,ae,600)},H=()=>{var ae,ye;(ye=(ae=f.value)==null?void 0:ae.slidePrev)==null||ye.call(ae,600)},R=()=>{var ae,ye;(ye=(ae=f.value)==null?void 0:ae.slideNext)==null||ye.call(ae,600)},M=ae=>{if(ae.video_type==="outer")return;const ye=$.value.filter(_e=>_e.video_type!=="outer"&&_e.type!=="photo"),ve=ye.findIndex(_e=>_e.slug===ae.slug);a("showLightboxVideo",{idx:ve,list:ye})},W=ae=>{const ye=$.value.filter(_e=>_e.type==="photo"),ve=ye.findIndex(_e=>_e.slug===ae.slug);a("showLightBoxImage",{idx:ve,url:ae.url,text:ae.text||ae.title,list:ye})},Z=ae=>{if(!ae||!m.value)return;const ye=k.value>=1024?170:150,_e=ae.getBoundingClientRect().top+window.pageYOffset-ye;window.scroll({top:_e,left:0,behavior:"smooth"})},ie=ae=>{const ye=ae.currentTarget,ve=ye==null?void 0:ye.dataset.slug,_e=ye==null?void 0:ye.dataset.type,se=$.value.find(pe=>pe.key==ve||pe.slug==ve);se&&(_e==="photo"?W(se):M(se))},ge=()=>{m.value&&(Array.from(document.getElementsByClassName("card-asset")).forEach(ae=>{ae.addEventListener("click",ie)}),Array.from(document.getElementsByClassName("card-video")).forEach(ae=>{ae.addEventListener("click",ie)}))},Le=()=>{m.value&&(Array.from(document.getElementsByClassName("card-asset")).forEach(ae=>{ae.removeEventListener("click",ie)}),Array.from(document.getElementsByClassName("card-video")).forEach(ae=>{ae.removeEventListener("click",ie)}))};return e.onMounted(()=>{m.value=!0,k.value=window.innerWidth,window.addEventListener("resize",()=>{k.value=window.innerWidth})}),e.onBeforeUnmount(()=>{Le()}),(ae,ye)=>{var _e;const ve=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"CardCarouselMultiRowArticles_wrap",ref_key:"parent",ref:d,style:e.normalizeStyle({backgroundColor:((_e=n.modelValue)==null?void 0:_e.bgColor)||"transparent"}),onMouseenter:ye[2]||(ye[2]=se=>s.value=!0),onMouseleave:ye[3]||(ye[3]=se=>s.value=!1)},[e.createElementVNode("div",{style:{marginTop:"30px",marginBottom:"30px"},class:e.normalizeClass(["CardCarouselMultiRowArticles_container",[Y.value]])},[e.createVNode(ve,null,{default:e.withCtx(()=>[e.createVNode(e.unref(kt.Swiper),{ref_key:"swiperRef",ref:p,modules:i,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group":1,"space-between":16,loop:!0,breakpoints:U,"auto-height":!0,class:"swiper card-carousel__swiper",onSwiper:h,onSlideChange:q},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(se,pe)=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{class:"swiper-slide",key:pe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N(se),le=>(e.openBlock(),e.createElementBlock("div",{key:le,class:e.normalizeClass(["row",[`row-cols-${S.value}`]]),style:e.normalizeStyle({"--cc-cols":S.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A(se,le),he=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:he.key||he.slug},[e.createVNode(Is,{componentProps:he},null,8,["componentProps"])]))),128))],6))),128))]),_:2},1024))),128))]),_:1},512)]),_:1}),e.withDirectives(e.createElementVNode("div",pA,[e.createVNode(wi,{currentIndex:C.value,onUpdatePage:O,count:w.value.length,onSlidePrev:H,onSlideNext:R,isLoop:!0,dark:""},null,8,["currentIndex","count"])],512),[[e.vShow,I.value]])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:s.value,"onUpdate:show":ye[0]||(ye[0]=se=>s.value=se),onHandleEdit:ye[1]||(ye[1]=se=>l.value=!0),onHandleDelete:r,onHandleCopy:c,onHandlePaste:u},null,8,["show"]))],36),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(mA,{key:0,show:l.value,"onUpdate:show":ye[4]||(ye[4]=se=>l.value=se),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-7475bd48"]]),hA=Object.freeze(Object.defineProperty({__proto__:null,default:Zr},Symbol.toStringTag,{value:"Module"})),fA={class:"setting-content"},gA={class:"setting-header flex items-center"},yA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),a=t,i=()=>{a("update:show",!1)};return e.ref(1),(s,l)=>{const r=e.resolveComponent("a-switch"),c=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",fA,[e.createElementVNode("div",gA,[l[5]||(l[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),l[12]||(l[12]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:""},{default:e.withCtx(()=>[...l[6]||(l[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(c,{value:"middle"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(c,{value:"max"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),l[13]||(l[13]=e.createElementVNode("p",{class:"item-title"},"背景颜色",-1)),e.createVNode(u,{modelValue:n.data.data.bgColor,"onUpdate:modelValue":l[2]||(l[2]=m=>n.data.data.bgColor=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:"#ffffff"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(c,{value:"#F7F7FA"},{default:e.withCtx(()=>[...l[11]||(l[11]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),l[14]||(l[14]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.title,"onUpdate:modelValue":l[3]||(l[3]=m=>n.data.data.title=m),name:"CustomText_editor_title"},null,8,["modelValue"]),l[15]||(l[15]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.description,"onUpdate:modelValue":l[4]||(l[4]=m=>n.data.data.description=m),name:"CustomText_editor_description"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-1611d103"]]),_A=["id"],wA=["innerHTML"],bA=["innerHTML"],Jr=J(e.defineComponent({name:"CustomText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"CustomText",onlyShowPc:!1,data:{width:1920,backgroundColor:"#ffffff",title:"这是标题",description:"这是描述"}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=e.computed(()=>{var f,h;const d=(h=(f=o.modelValue)==null?void 0:f.data)==null?void 0:h.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,p)=>{var f,h,C,w,x,y,b,V,T,k,S,D;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.id,class:"custom-text",style:e.normalizeStyle({backgroundColor:((w=(C=n.modelValue)==null?void 0:C.data)==null?void 0:w.bgColor)||"transparent"}),onMouseenter:p[2]||(p[2]=N=>l.value=!0),onMouseleave:p[3]||(p[3]=N=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["custom-text__container",[c.value,{"text-center":d.center}]])},[(y=(x=n.modelValue)==null?void 0:x.data)!=null&&y.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"custom-text__title",innerHTML:(V=(b=n.modelValue)==null?void 0:b.data)==null?void 0:V.title},null,8,wA)):e.createCommentVNode("",!0),(k=(T=n.modelValue)==null?void 0:T.data)!=null&&k.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:"custom-text__text",innerHTML:(D=(S=n.modelValue)==null?void 0:S.data)==null?void 0:D.description},null,8,bA)):e.createCommentVNode("",!0)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=N=>l.value=N),onHandleEdit:p[1]||(p[1]=N=>r.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],44,_A)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(yA,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=N=>r.value=N),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-418dea73"]]),CA=Object.freeze(Object.defineProperty({__proto__:null,default:Jr},Symbol.toStringTag,{value:"Module"})),VA={class:"setting-content"},xA={class:"setting-header flex items-center"},kA=["src"],EA={class:"item-uplaod flex items-center"},TA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),a=t,i=()=>{a("update:show",!1)};return(s,l)=>{const r=e.resolveComponent("a-switch"),c=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),g=e.resolveComponent("a-input"),m=e.resolveComponent("Upload"),d=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(d,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",VA,[e.createElementVNode("div",xA,[l[6]||(l[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=p=>n.data.onlyShowPc=p)},null,8,["modelValue"])]),l[11]||(l[11]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=p=>n.data.data.width=p),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:""},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(c,{value:"middle"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(c,{value:"max"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),l[12]||(l[12]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.image},null,8,kA),e.createElementVNode("div",EA,[e.createVNode(g,{modelValue:n.data.data.image,"onUpdate:modelValue":l[2]||(l[2]=p=>n.data.data.image=p),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(m,{modelValue:n.data.data.image,"onUpdate:modelValue":l[3]||(l[3]=p=>n.data.data.image=p),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),l[13]||(l[13]=e.createElementVNode("p",{class:"item-title"},"图片alt",-1)),e.createVNode(g,{modelValue:n.data.data.imgAlt,"onUpdate:modelValue":l[4]||(l[4]=p=>n.data.data.imgAlt=p),placeholder:"请输入图片alt","allow-clear":""},null,8,["modelValue"]),l[14]||(l[14]=e.createElementVNode("p",{class:"item-title"},"图片描述",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.text,"onUpdate:modelValue":l[5]||(l[5]=p=>n.data.data.text=p),name:"MediaImageFull_editor_text"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-7c5f1cd3"]]),NA=["id"],SA={class:"media-image-full"},BA={class:"img-fit"},PA=["src","alt"],DA=["innerHTML"],ed=J(e.defineComponent({name:"MediaImageFull",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"MediaImageFull",onlyShowPc:!1,data:{width:"default",image:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",imgAlt:"这是图片alt",text:"这是图片描述"}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=e.computed(()=>{var f,h;const d=(h=(f=o.modelValue)==null?void 0:f.data)==null?void 0:h.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,p)=>{var f,h,C,w,x,y,b,V,T,k;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaImageFull_wrap",id:(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.id,onMouseenter:p[2]||(p[2]=S=>l.value=!0),onMouseleave:p[3]||(p[3]=S=>l.value=!1)},[e.createElementVNode("div",SA,[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full__container",c.value])},[e.createElementVNode("div",BA,[e.createElementVNode("img",{style:{width:"100%",height:"auto"},src:(w=(C=n.modelValue)==null?void 0:C.data)==null?void 0:w.image,alt:(y=(x=n.modelValue)==null?void 0:x.data)==null?void 0:y.imgAlt},null,8,PA),(V=(b=n.modelValue)==null?void 0:b.data)!=null&&V.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"media-image-full__desc",innerHTML:(k=(T=n.modelValue)==null?void 0:T.data)==null?void 0:k.text},null,8,DA)):e.createCommentVNode("",!0)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=S=>l.value=S),onHandleEdit:p[1]||(p[1]=S=>r.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],40,NA)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(TA,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=S=>r.value=S),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-6483e262"]]),$A=Object.freeze(Object.defineProperty({__proto__:null,default:ed},Symbol.toStringTag,{value:"Module"})),LA={class:"setting-content"},AA={class:"setting-header flex items-center"},IA=["src"],vA={class:"item-uplaod flex items-center"},MA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("Upload"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",LA,[e.createElementVNode("div",AA,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=g=>n.data.onlyShowPc=g)},null,8,["modelValue"])]),s[5]||(s[5]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.image},null,8,IA),e.createElementVNode("div",vA,[e.createVNode(r,{modelValue:n.data.data.image,"onUpdate:modelValue":s[1]||(s[1]=g=>n.data.data.image=g),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(c,{modelValue:n.data.data.image,"onUpdate:modelValue":s[2]||(s[2]=g=>n.data.data.image=g),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),s[6]||(s[6]=e.createElementVNode("p",{class:"item-title"},"图片alt",-1)),e.createVNode(r,{modelValue:n.data.data.imgAlt,"onUpdate:modelValue":s[3]||(s[3]=g=>n.data.data.imgAlt=g),placeholder:"请输入图片alt","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-97710184"]]),OA=["id"],UA={class:"media-image-static"},RA={class:"img-fit"},FA=["src","alt"],td=J(e.defineComponent({name:"MediaImageStatic",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||F(),type:"MediaImageStatic",onlyShowPc:!1,data:{image:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",imgAlt:"这是图片alt"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1);e.computed(()=>{var p,f;const m=(f=(p=o.modelValue)==null?void 0:p.data)==null?void 0:f.width;return!m||m==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[m]||"container-content"});const c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=m=>{a("handlePaste",m)};return i(),(m,d)=>{var p,f,h,C,w,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaImageStatic_wrap",id:(f=(p=n.modelValue)==null?void 0:p.data)==null?void 0:f.id,onMouseenter:d[2]||(d[2]=y=>l.value=!0),onMouseleave:d[3]||(d[3]=y=>l.value=!1)},[e.createElementVNode("div",UA,[e.createElementVNode("div",RA,[e.createElementVNode("img",{style:{width:"100%",height:"auto"},src:(C=(h=n.modelValue)==null?void 0:h.data)==null?void 0:C.image,alt:(x=(w=n.modelValue)==null?void 0:w.data)==null?void 0:x.imgAlt},null,8,FA)])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=y=>l.value=y),onHandleEdit:d[1]||(d[1]=y=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],40,OA)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(MA,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=y=>r.value=y),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-3d6c1c77"]]),HA=Object.freeze(Object.defineProperty({__proto__:null,default:td},Symbol.toStringTag,{value:"Module"})),jA={class:"setting-content"},zA={class:"draggable_box"},qA={class:"drag_top_box"},WA=["onClick"],GA=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=e.ref(!1),s=t,l=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.ref(new Set),c=e.ref(!1);e.watch(()=>{var f;return[a.show,(f=a.data)==null?void 0:f.list]},([f,h])=>{c.value||(c.value=!0,f&&h&&Array.isArray(h)&&(r.value.clear(),h.forEach(C=>{C.id&&r.value.add(C.id)})))},{immediate:!0,deep:!0});const u=f=>{var h;if(!r.value.has(f.id))r.value.add(f.id);else{const C=[];(h=a.data)!=null&&h.list&&Array.isArray(a.data.list)&&a.data.list.forEach(w=>{w.id&&C.push(w.id)}),r.value=new Set(C),r.value.delete(f.id)}},g=f=>r.value.has(f.id),m=f=>{a.data.list=a.data.list.filter(h=>h.id!==f)},d=()=>{s("update:show",!1)},p=()=>{a.data.list.push({id:F(),title:"标题",description:"描述"})};return(f,h)=>{const C=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),x=e.resolveComponent("icon-drag-dot"),y=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),T=e.resolveComponent("icon-plus"),k=e.resolveComponent("a-button"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:d,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",jA,[h[11]||(h[11]=e.createElementVNode("div",{class:"item-title"},"宽度",-1)),e.createVNode(w,{style:{"margin-bottom":"20px"},modelValue:n.data.width,"onUpdate:modelValue":h[0]||(h[0]=D=>n.data.width=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...h[4]||(h[4]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...h[5]||(h[5]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...h[6]||(h[6]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...h[7]||(h[7]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":h[1]||(h[1]=D=>n.data.list=D),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!1,onStart:h[2]||(h[2]=D=>i.value=!0),onEnd:h[3]||(h[3]=D=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[e.createElementVNode("div",zA,[e.createElementVNode("div",qA,[e.createElementVNode("div",{class:"drag-handle",onClick:N=>u(D)},[e.createVNode(x,{style:{"margin-right":"10px"}}),e.createTextVNode("标题:"+e.toDisplayString(D.title),1)],8,WA),e.createElementVNode("div",null,[e.createVNode(y,{class:"icon_drag"}),e.createVNode(b,{class:"btn-delete",onClick:e.withModifiers(N=>m(D.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[h[8]||(h[8]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"40px"}},"标题",-1)),e.createVNode(V,{modelValue:D.title,"onUpdate:modelValue":N=>D.title=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[9]||(h[9]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"描述",-1)),e.createVNode(V,{modelValue:D.description,"onUpdate:modelValue":N=>D.description=N,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!g(D)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createVNode(k,{style:{"margin-top":"20px"},type:"primary",onClick:p},{icon:e.withCtx(()=>[e.createVNode(T)]),default:e.withCtx(()=>[h[10]||(h[10]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-d705e63f"]]),XA=["id"],YA={class:"article-list-pure-text"},KA={class:"article-group"},QA={class:"article-item__title"},ZA={class:"article-item__description"},nd=J(e.defineComponent({name:"ArticleListPureText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.list)return;const d={id:((p=o.modelValue)==null?void 0:p.id)||F(),type:"ArticleListPureText",width:"default",list:[{id:F(),title:"标题1",description:"描述1"},{id:F(),title:"标题2",description:"描述2"},{id:F(),title:"标题3",description:"描述3"},{id:F(),title:"标题4",description:"描述4"},{id:F(),title:"标题5",description:"描述5"}]};a("update:modelValue",d)},s=e.ref(!1),l=e.ref(!1),r=e.computed(()=>{var f;const d=(f=o.modelValue)==null?void 0:f.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),c=e.computed(()=>{var f,h;const d=(h=(f=o.modelValue)==null?void 0:f.data)==null?void 0:h.width;return!d||d==="default"?"row-cols-1 row-cols-md-2":{small:"row-cols-1 row-cols-md-2",middle:"row-cols-1 row-cols-md-2 row-cols-lg-3",max:"row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4"}[d]||"row-cols-1 row-cols-md-2"}),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,p)=>{var f,h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"articlePureText_wrap",id:(h=(f=n.modelValue)==null?void 0:f.data)==null?void 0:h.id,onMouseenter:p[2]||(p[2]=w=>s.value=!0),onMouseleave:p[3]||(p[3]=w=>s.value=!1)},[e.createElementVNode("div",YA,[e.createElementVNode("div",{class:e.normalizeClass(["article-list-pure-text__container",r.value])},[e.createElementVNode("div",KA,[e.createElementVNode("ul",{class:e.normalizeClass(["article-list row",c.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=n.modelValue)==null?void 0:C.list,(w,x)=>(e.openBlock(),e.createElementBlock("li",{key:x,class:"article-item col"},[e.createElementVNode("h4",QA,e.toDisplayString(w.title),1),e.createElementVNode("p",ZA,e.toDisplayString(w.description),1)]))),128))],2)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:s.value,"onUpdate:show":p[0]||(p[0]=w=>s.value=w),onHandleEdit:p[1]||(p[1]=w=>l.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],40,XA),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(GA,{key:0,show:l.value,"onUpdate:show":p[4]||(p[4]=w=>l.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-e817c868"]]),JA=Object.freeze(Object.defineProperty({__proto__:null,default:nd},Symbol.toStringTag,{value:"Module"})),eI={class:"setting-content"},tI={class:"setting-header flex items-center"},nI=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(r,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",eI,[e.createElementVNode("div",tI,[s[1]||(s[1]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-fe2132f5"]]),oI={key:0},aI={key:1,class:"tab-default__content mt-5 mt-md-13 container-content"},od=J(e.defineComponent({name:"AlummiCommunityList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","openPopup"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var y,b,V;if(o.modelValue&&o.modelValue.data)return;const x={id:((y=o.modelValue)==null?void 0:y.id)||F(),type:"AlummiCommunityList",onlyShowPc:Te(),api:((b=o.modelValue)==null?void 0:b.api)||"/article/newsList",category:((V=o.modelValue)==null?void 0:V.category)||"alumni-events"};a("update:modelValue",x)},s=e.computed(()=>{var x;return o.isPreview?!((x=o.modelValue)!=null&&x.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=x=>{a("handlePaste",x)},m=x=>{a("handleClick",x)},d=x=>{a("openPopup",x)};i();const p=e.ref([]),f=e.ref(1024),h=e.computed(()=>p.value),C=()=>{typeof window<"u"&&(f.value=window.innerWidth)},w=async()=>{var b,V;const x={params:{host:o.host,langCode:o.locale,per_page:4,page:1,category:(b=o.modelValue)==null?void 0:b.category}},y=await en.get((V=o.modelValue)==null?void 0:V.api,x);p.value=y.data.data.data};return e.onMounted(()=>{w(),C(),typeof window<"u"&&window.addEventListener("resize",C)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",C)}),(x,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"alummi-community-list news-list tab-default",ref:"parent",onMouseenter:y[2]||(y[2]=b=>l.value=!0),onMouseleave:y[3]||(y[3]=b=>l.value=!1)},[n.host?(e.openBlock(),e.createElementBlock("div",aI,[e.createElementVNode("div",{class:e.normalizeClass(["card-list row",["row-cols-2","row-cols-md-2","row-cols-lg-4"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,b=>(e.openBlock(),e.createElementBlock("div",{class:"card-item col",key:b.key},[e.createVNode(Is,{componentProps:b,singleColumn:f.value<768,onHandleClick:m,onOpenPopup:d},null,8,["componentProps","singleColumn"])]))),128))])])):(e.openBlock(),e.createElementBlock("p",oI,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":y[0]||(y[0]=b=>l.value=b),onHandleEdit:y[1]||(y[1]=b=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(nI,{key:1,show:r.value,"onUpdate:show":y[4]||(y[4]=b=>r.value=b),data:n.modelValue},null,8,["show","data"]))],64))}}),[["__scopeId","data-v-9434d33c"]]),iI=Object.freeze(Object.defineProperty({__proto__:null,default:od},Symbol.toStringTag,{value:"Module"})),sI={class:"message-card__wrapper"},lI={class:"message-card__head"},rI={class:"message-card__image"},dI=["src","alt"],cI=["innerHTML"],uI=["innerHTML"],mI=["innerHTML"],Su=J(e.defineComponent({name:"BlessingMessageCard",__name:"BlessingMessageCard",props:{image_url:{default:""},name:{default:""},person_type:{default:""},label:{default:""},message:{default:""},type:{default:0}},setup(n){const t=n,o=e.computed(()=>{const s=t.type%3;return[{"--bg-color":"#0032A0","--border-color":"#FF0044"},{"--bg-color":"#FF8200","--border-color":"#0032A0"},{"--bg-color":"#FF0044","--border-color":"#D2D6DC"}][s]}),a=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),i=e.computed(()=>{var s;return t.person_type==="others"?t.label:((s=a.value.find(l=>l.key===t.person_type))==null?void 0:s.name)??t.label});return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["blessing-message-card",{"has-image":!!n.image_url}]),"data-aos":"fade-up"},[e.createElementVNode("div",{class:"message-card",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",sI,[e.createElementVNode("div",lI,[e.withDirectives(e.createElementVNode("div",rI,[e.createElementVNode("img",{src:n.image_url,alt:n.name},null,8,dI)],512),[[e.vShow,n.image_url]]),e.createElementVNode("h5",{class:"message-card__name text-uppercase",innerHTML:n.name},null,8,cI),e.withDirectives(e.createElementVNode("div",{class:"message-card__label",innerHTML:i.value},null,8,uI),[[e.vShow,i.value]])]),e.createElementVNode("div",{class:"message-card__body",innerHTML:n.message},null,8,mI)])],4)],2))}}),[["__scopeId","data-v-ecf1d319"]]),pI={class:"blessing-message-pagination"},hI={class:"d-flex align-items-center h-100 justify-content-center justify-content-md-start"},fI={key:0,class:"page-ellipsis flex-center"},gI=["onClick"],yI=J(e.defineComponent({name:"BlessingMessagePagination",__name:"BlessingMessagePagination",props:{totalPage:{default:1},currentPage:{default:1}},emits:["changePage"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{const c=[];let u=!1;for(let g=1;g<=o.totalPage;g++)r(g)?(u=!1,c.push(g)):u||(c.push("Ellipsis"),u=!0);return c[0]==="Ellipsis"&&c.shift(),c}),s=c=>{a("changePage",c)},l=c=>{c<0?o.currentPage>1&&s(o.currentPage+c):o.currentPage<o.totalPage&&s(o.currentPage+c)},r=c=>o.totalPage<=6||c<=o.currentPage+2&&c>=o.currentPage||c===o.totalPage||o.currentPage>=o.totalPage-3&&(c>=o.totalPage-2||c===1);return(c,u)=>(e.openBlock(),e.createElementBlock("div",pI,[e.createElementVNode("ul",hI,[e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pr-3 pr-md-4",{"page-arrow--disable":n.currentPage===1}]),onClick:u[0]||(u[0]=g=>l(-1))},[...u[2]||(u[2]=[e.createElementVNode("div",{class:"i page-arrow__left"},null,-1)])],2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${g}-${m}`},[g==="Ellipsis"?(e.openBlock(),e.createElementBlock("li",fI)):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["page-item flex-center",{"page-item--active":g===n.currentPage}]),onClick:d=>s(g)},e.toDisplayString(g),11,gI))],64))),128)),e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pl-3 pl-md-4",{"page-arrow--disable":n.currentPage===n.totalPage}]),onClick:u[1]||(u[1]=g=>l(1))},[...u[3]||(u[3]=[e.createElementVNode("div",{class:"i page-arrow__right"},null,-1)])],2)])]))}}),[["__scopeId","data-v-36b31ee5"]]),_I={class:"lightbox__wrapper"},wI={class:"lightbox__content"},bI={class:"lightbox__content__body"},CI={class:"lightbox__content__top"},VI={class:"lightbox__content__image"},xI=["src","alt"],kI=["innerHTML"],EI=["innerHTML"],TI=["innerHTML"],tf=J(e.defineComponent({name:"LightboxBlessingMessage",__name:"index",props:{componentProps:{default:()=>({})},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>(window==null?void 0:window.innerWidth)>767.98?(window==null?void 0:window.innerWidth)>1100?"992px":"720px":"100%"),s=e.computed(()=>o.visible),l=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.image_url)??""}),r=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.image_alt)??u.value}),c=e.computed(()=>r.value),u=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.name)??""}),g=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.label)??""}),m=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.person_type)??""}),d=e.computed(()=>{var C;return((C=o.componentProps)==null?void 0:C.message)??""}),p=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),f=e.computed(()=>{var C;return m.value==="others"?g.value:((C=p.value.find(w=>w.key===m.value))==null?void 0:C.name)??g.value}),h=()=>{a("update:visible",!1)};return(C,w)=>{const x=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(x,{visible:s.value,"onUpdate:visible":w[0]||(w[0]=y=>s.value=y),class:"lightbox-custom lightbox-blessing",width:i.value,footer:!1,closable:!1},{default:e.withCtx(()=>[e.createElementVNode("div",_I,[e.createElementVNode("div",wI,[e.createElementVNode("div",{class:"lightbox__content__head"},[e.createElementVNode("div",{class:"lightbox__content__cross i i-cross-modal",onClick:h})]),e.createElementVNode("div",bI,[e.createElementVNode("div",CI,[e.withDirectives(e.createElementVNode("div",VI,[e.createElementVNode("img",{src:l.value,alt:c.value},null,8,xI)],512),[[e.vShow,l.value]]),e.createElementVNode("div",{class:"lightbox__content__name",innerHTML:u.value},null,8,kI),e.withDirectives(e.createElementVNode("div",{class:"lightbox__content__label",innerHTML:f.value},null,8,EI),[[e.vShow,f.value]])]),w[1]||(w[1]=e.createElementVNode("div",{class:"lightbox__content__title",innerHTML:"Blessing Message to YCYW"},null,-1)),e.createElementVNode("div",{class:"lightbox__content__content",innerHTML:d.value},null,8,TI)])])])]),_:1},8,["visible","width"])}}}),[["__scopeId","data-v-2868ec67"]]),NI={class:"setting-content"},SI={class:"setting-header flex items-center"},BI={class:"setting-header flex items-center"},PI=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",NI,[e.createElementVNode("div",SI,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=u=>n.data.onlyShowPc=u)},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",BI,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"组件标题",-1)),e.createVNode(r,{modelValue:n.data.title,"onUpdate:modelValue":s[1]||(s[1]=u=>n.data.title=u),placeholder:"请输入组件标题","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-797d5a08"]]),DI={class:"blessing-message__container container-content"},$I=["innerHTML"],LI={class:"d-none d-md-flex row row-cols-2"},AI={class:"col"},II={class:"blessing-message__card"},vI={class:"col"},MI={class:"blessing-message__card"},OI={class:"d-md-none row row-cols-1"},UI={class:"col"},RI={class:"blessing-message__card"},FI={key:0,class:"flex-center mt-9 mt-md-22"},ad=J(e.defineComponent({name:"BlessingMessage",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var S,D,N;if(o.modelValue&&o.modelValue.data)return;const k={id:((S=o.modelValue)==null?void 0:S.id)||F(),type:"BlessingMessage",onlyShowPc:!1,api:((D=o.modelValue)==null?void 0:D.api)||"/blessing-board/blessing-messages/list",title:((N=o.modelValue)==null?void 0:N.title)||"这里是标题"};a("update:modelValue",k)},s=e.computed(()=>{var k;return o.isPreview?!((k=o.modelValue)!=null&&k.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=k=>{a("handlePaste",k)};i();const m=e.ref(null),d=e.ref(1),p=e.ref(6),f=e.ref(1),h=e.ref([]),C=e.ref(null),w=e.computed(()=>h.value.filter((k,S)=>(S+1)%2)),x=e.computed(()=>h.value.filter((k,S)=>!((S+1)%2))),y=async()=>{var D;const k={headers:{website:`${o.website}-${o.locale}`}},S=`${(D=o.modelValue)==null?void 0:D.api}?per_page=${p.value}&page=${d.value}`;try{const{data:N}=await en.get(S,k);f.value=N.meta.last_page,h.value=N.data}catch{f.value=1,h.value=[]}},b=k=>{if(!k||typeof window>"u")return;const S=window.innerWidth,D=S>=768?S>=1024?170:120:100,A=k.getBoundingClientRect().top+window.pageYOffset-D;window.scroll({top:A,left:0,behavior:"smooth"})},V=e.ref(!1),T=k=>{C.value=k,V.value=!0};return e.watch(d,()=>{e.nextTick(()=>{y(),b(m.value)})}),e.onMounted(()=>{y()}),(k,S)=>{var D,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blessing-message",onMouseenter:S[4]||(S[4]=A=>l.value=!0),onMouseleave:S[5]||(S[5]=A=>l.value=!1),ref_key:"parent",ref:m},[e.createElementVNode("div",DI,[e.withDirectives(e.createElementVNode("div",{class:"blessing-message__title",innerHTML:(D=n.modelValue)==null?void 0:D.title},null,8,$I),[[e.vShow,(N=n.modelValue)==null?void 0:N.title]]),e.createElementVNode("div",LI,[e.createElementVNode("div",AI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${$}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",II,[e.createVNode(Su,e.mergeProps({onClick:I=>T(A)},{ref_for:!0},A,{type:Number($)*2}),null,16,["onClick","type"])])]))),128))]),e.createElementVNode("div",vI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${$}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",MI,[e.createVNode(Su,e.mergeProps({onClick:I=>T(A)},{ref_for:!0},A,{type:Number($)*2+1}),null,16,["onClick","type"])])]))),128))])]),e.createElementVNode("div",OI,[e.createElementVNode("div",UI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(A,$)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${$}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",RI,[e.createVNode(Su,e.mergeProps({onClick:I=>T(A)},{ref_for:!0},A,{type:$}),null,16,["onClick","type"])])]))),128))])]),f.value>0?(e.openBlock(),e.createElementBlock("div",FI,[e.createVNode(yI,{totalPage:f.value,currentPage:d.value,onChangePage:S[0]||(S[0]=A=>d.value=A)},null,8,["totalPage","currentPage"])])):e.createCommentVNode("",!0)]),e.createVNode(tf,{visible:V.value,"onUpdate:visible":S[1]||(S[1]=A=>V.value=A),componentProps:C.value},null,8,["visible","componentProps"]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":S[2]||(S[2]=A=>l.value=A),onHandleEdit:S[3]||(S[3]=A=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PI,{key:1,show:r.value,"onUpdate:show":S[6]||(S[6]=A=>r.value=A),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-ee9ca31d"]]),HI=Object.freeze(Object.defineProperty({__proto__:null,default:ad},Symbol.toStringTag,{value:"Module"})),jI={class:"setting-content"},zI={class:"setting-header flex items-center"},qI=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(r,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",jI,[e.createElementVNode("div",zI,[s[2]||(s[2]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-0db87e14"]]),WI={class:"container-content"},GI={class:"blessing-wrapper position-relative"},XI=["src","alt"],YI={class:"slide-card__wrapper"},KI={class:"slide-card__head"},QI=["innerHTML"],ZI=["innerHTML"],JI=["innerHTML"],ev=["src","alt"],tv=["src","alt"],id=J(e.defineComponent({name:"BlessingSlider",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var O,H;if(o.modelValue&&o.modelValue.data)return;const q={id:((O=o.modelValue)==null?void 0:O.id)||F(),type:"BlessingSlider",onlyShowPc:!1,api:((H=o.modelValue)==null?void 0:H.api)||"/blessing-board/blessing-messages/featured?count=6"};a("update:modelValue",q)},s=e.computed(()=>{var q;return o.isPreview?!((q=o.modelValue)!=null&&q.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=q=>{a("handlePaste",q)};i();const m=e.ref([]),d=e.ref(0),p=e.ref(1),f=e.ref(0),h=e.ref(0),C=e.ref(null),w=e.ref(!1),x=e.computed(()=>m.value.length),y=e.computed(()=>m.value[d.value]),b=e.computed(()=>d.value-1<0?x.value-1:d.value-1),V=e.computed(()=>d.value+1>=x.value?0:d.value+1),T=e.computed(()=>d.value%3),k=e.computed(()=>[{"--bg-color":"#0032A0","--border-color":"#FF0044"},{"--bg-color":"#FF8200","--border-color":"#0032A0"},{"--bg-color":"#FF0044","--border-color":"#D2D6DC"}][T.value]),S=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),D=e.computed(()=>{var q,O,H;return y.value?y.value.person_type==="others"?(q=y.value)==null?void 0:q.label:((O=S.value.find(R=>{var M;return R.key===((M=y.value)==null?void 0:M.person_type)}))==null?void 0:O.name)??((H=y.value)==null?void 0:H.label):null}),N=q=>{p.value=q>d.value?1:-1,d.value=(q+x.value)%x.value},A=()=>{h.value<f.value&&N(d.value+1),h.value>f.value&&N(d.value-1)},$=q=>{f.value=q.changedTouches[0].screenX},I=q=>{h.value=q.changedTouches[0].screenX,A()},U=e.ref(!1),Y=q=>{C.value=q,U.value=!0},G=async()=>{var H;const q={headers:{website:`${o.website}-${o.locale}`}},O=`${(H=o.modelValue)==null?void 0:H.api}`;try{const{data:R}=await en.get(O,q);m.value=R.data}catch{m.value=[]}};return e.onMounted(()=>{G()}),(q,O)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blessing-slider",onMouseenter:O[13]||(O[13]=H=>l.value=!0),onMouseleave:O[14]||(O[14]=H=>l.value=!1)},[e.createElementVNode("div",WI,[e.createElementVNode("div",GI,[e.createVNode(e.TransitionGroup,{tag:"div",name:p.value>0?"slide":"slide-invert",class:"slide-block",onTouchstart:$,onTouchend:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(H,R)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${H.name}-${H.label}-${H.image_url}-${R}`,ref_for:!0,ref:"image",onTransitionstart:O[0]||(O[0]=M=>w.value=!0),onTransitionend:O[1]||(O[1]=M=>w.value=!1)},[e.createElementVNode("img",{src:H.image_url,alt:H.name},null,8,XI)],32)),[[e.vShow,R===d.value]])),128)),e.createElementVNode("div",{class:"i page-arrow__left",key:"arrow__left",onClick:O[2]||(O[2]=H=>N(d.value-1))}),e.createElementVNode("div",{class:"i page-arrow__right",key:"arrow__right",onClick:O[3]||(O[3]=H=>N(d.value+1))})]),_:1},8,["name"]),y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-card",style:e.normalizeStyle(k.value),onTouchstart:$,onTouchend:I,onClick:O[4]||(O[4]=H=>Y(y.value))},[e.createElementVNode("div",YI,[e.createElementVNode("div",KI,[e.createElementVNode("h5",{class:"slide-card__name text-uppercase",innerHTML:y.value.name},null,8,QI),e.createElementVNode("div",{class:"slide-card__label",innerHTML:D.value},null,8,ZI)]),e.createElementVNode("div",{class:"slide-card__body",innerHTML:y.value.message},null,8,JI)])],36)):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"div",name:p.value>0?"slide":"slide-invert",class:"slide-block slide-block__prev"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(H,R)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${H.name}-${H.label}-${H.image_url}-${R}`,ref_for:!0,ref:"image",onTransitionstart:O[5]||(O[5]=M=>w.value=!0),onTransitionend:O[6]||(O[6]=M=>w.value=!1)},[e.createElementVNode("img",{src:H.image_url,alt:H.name},null,8,ev)],32)),[[e.vShow,R===b.value]])),128))]),_:1},8,["name"]),e.createVNode(e.TransitionGroup,{tag:"div",name:p.value>0?"slide":"slide-invert",class:"slide-block slide-block__next"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(H,R)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${H.name}-${H.label}-${H.image_url}-${R}`,ref_for:!0,ref:"image",onTransitionstart:O[7]||(O[7]=M=>w.value=!0),onTransitionend:O[8]||(O[8]=M=>w.value=!1)},[e.createElementVNode("img",{src:H.image_url,alt:H.name},null,8,tv)],32)),[[e.vShow,R===V.value]])),128))]),_:1},8,["name"]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"blessing-btn blessing-btn--prev",onClick:O[9]||(O[9]=H=>N(d.value-1))},[...O[16]||(O[16]=[e.createElementVNode("div",{class:"i"},null,-1)])],512),[[e.vShow,m.value.length>1]]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"blessing-btn blessing-btn--next",onClick:O[10]||(O[10]=H=>N(d.value+1))},[...O[17]||(O[17]=[e.createElementVNode("div",{class:"i"},null,-1)])],512),[[e.vShow,m.value.length>1]])])]),e.createVNode(tf,{visible:U.value,"onUpdate:visible":O[11]||(O[11]=H=>U.value=H),componentProps:C.value},null,8,["visible","componentProps"]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,onHandleEdit:O[12]||(O[12]=H=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g}))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(qI,{key:1,show:r.value,"onUpdate:show":O[15]||(O[15]=H=>r.value=H),data:n.modelValue},null,8,["show","data"]))],64))}}),[["__scopeId","data-v-a8c8eb07"]]),nv=Object.freeze(Object.defineProperty({__proto__:null,default:id},Symbol.toStringTag,{value:"Module"})),ov={class:"setting-content"},av={class:"setting-header flex items-center"},iv={class:"setting-header flex items-center"},sv=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},slugList:{type:Array,default:()=>[]}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ov,[e.createElementVNode("div",av,[s[2]||(s[2]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=u=>n.data.onlyShowPc=u)},null,8,["modelValue"])]),e.createElementVNode("div",iv,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"文章类别",-1)),e.createVNode(r,{modelValue:n.data.slug,"onUpdate:modelValue":s[1]||(s[1]=u=>n.data.slug=u),placeholder:"请输入文章类别","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-b9179ef4"]]),lv={key:0},rv={key:1,class:"card-showcase__container container-content-middle",ref:"cardShowcase"},dv=["onClick"],cv={class:"img-wrapper"},uv=["src","alt"],mv=["src","alt"],pv={class:"slide-content__box bg-white shadow-lg"},hv={class:"slide-content__box__title"},fv=["innerHTML"],gv={key:1,class:"slide-content__box__subtitle"},yv={key:2,class:"slide-content__box__subtitle"},_v=["href"],wv=["onClick"],bv=["onClick"],Cv={class:"img-wrapper"},Vv=["src","alt"],xv=["src","alt"],kv={class:"slide-content__box bg-white shadow-lg"},Ev={class:"slide-content__box__title"},Tv=["innerHTML"],Nv={key:1,class:"slide-content__box__subtitle"},Sv={key:2,class:"slide-content__box__subtitle"},Bv=["href"],Pv=["onClick"],sd=J(e.defineComponent({name:"CardShowcase",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.ref([]),s=()=>{var A,$,I;if(o.modelValue&&o.modelValue.data)return;const N={id:((A=o.modelValue)==null?void 0:A.id)||F(),type:"CardShowcase",onlyShowPc:!1,api:(($=o.modelValue)==null?void 0:$.api)||"/article/newsList",getDataType:((I=o.modelValue)==null?void 0:I.getDataType)||"alumni"};a("update:modelValue",N)},l=e.computed(()=>{var N;return o.isPreview?!((N=o.modelValue)!=null&&N.onlyShowPc)||!Te():!0}),r=e.ref(!1),c=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},m=N=>{a("handlePaste",N)};s();const d=[ut.Navigation,ut.Pagination,ut.Autoplay],p={768:{spaceBetween:-100},1024:{spaceBetween:-130}},f=e.ref([]),h=e.ref(typeof window<"u"?window.innerWidth:1024);let C=null,w=null;const x=async()=>{var $;en.get("/article/category/listForWeb",{params:{langCode:o.locale,host:o.host}}).then(I=>{i.value=I.data.data});const N={params:{host:o.host,langCode:o.locale,category:($=o.modelValue)==null?void 0:$.getDataType,per_page:5,page:1}};let A=await en.get(o.modelValue.api,N);f.value=A.data.data.data},y=N=>{w=N,S()},b=N=>{var A;typeof window<"u"&&window.scroll({top:0,left:0,behavior:"smooth"}),a("handleClick",`/article/${(A=o.modelValue)==null?void 0:A.getDataType}/${N}`)},V=N=>i.value.filter(A=>A.key===N)[0].name,T=N=>{const A=f.value.filter(I=>I.video_type!=="outer"),$=A.findIndex(I=>I.key==N);a("showLightboxVideo",{idx:$,list:A})},k=N=>{var $,I,U;if(!w)return;const A=((U=(I=($=N.path)==null?void 0:$[0])==null?void 0:I.className)==null?void 0:U.split(" "))||[];A.includes("swiper-slide-next")?w.slideNext():A.includes("swiper-slide-prev")&&w.slidePrev()},S=()=>{typeof document>"u"||(C=document.querySelectorAll(".swiper-slide"),C==null||C.forEach(N=>{N.addEventListener("mouseenter",k)}))},D=()=>{typeof window<"u"&&(h.value=window.innerWidth)};return e.onMounted(()=>{x(),typeof window<"u"&&window.addEventListener("resize",D),e.nextTick(()=>{var N;(N=o.modelValue)!=null&&N.getBackendData&&w&&setTimeout(()=>{w.slideTo(3)},300)})}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",D),C==null||C.forEach(N=>{N.removeEventListener("mouseenter",k)})}),(N,A)=>{const $=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-showcase",onMouseenter:A[2]||(A[2]=I=>r.value=!0),onMouseleave:A[3]||(A[3]=I=>r.value=!1)},[n.host?(e.openBlock(),e.createElementBlock("div",rv,[h.value>767.98?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(kt.Swiper),{ref:"swiperRef",modules:d,"centered-slides":!0,"slides-per-view":2.7,speed:600,loop:!0,"space-between":-80,breakpoints:p,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},class:"swiper showcaseSlide swiper--desktop",onSwiper:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,I=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{key:I.key,"data-swiper-key":I.key},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"slide-content",onClick:U=>b(I.key)},[e.createElementVNode("div",cv,[I.poster?(e.openBlock(),e.createElementBlock("img",{key:0,class:"img-static",src:I.poster,alt:I.alt||I.title},null,8,uv)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"img-static",src:I.image||I.meta.image,alt:I.alt||I.title},null,8,mv))]),e.createElementVNode("div",pv,[e.createElementVNode("h6",hv,e.toDisplayString(I.title),1),I.content||I.desc||I.meta.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-content__box__content",innerHTML:I.content||I.desc||I.meta.description},null,8,fv)):e.createCommentVNode("",!0),I.subtitle||I.label?(e.openBlock(),e.createElementBlock("h6",gv,e.toDisplayString(I.subtitle||I.label),1)):(e.openBlock(),e.createElementBlock("h6",yv,e.toDisplayString(V(I.category)),1))]),I.video_type&&I.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview&&I.video_type==="outer"?(e.openBlock(),e.createElementBlock("a",{key:0,href:I.link,target:"_blank",rel:"noopener noreferrer",class:"slide-content__play"},null,8,_v)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"slide-content__play",onClick:e.withModifiers(U=>T(I.key),["stop"])},null,8,wv))],64)):e.createCommentVNode("",!0)],8,dv)]),_:2},1032,["data-swiper-key"]))),128))]),_:1},512),A[5]||(A[5]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next"})],-1))]),_:1})):(e.openBlock(),e.createBlock($,{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(kt.Swiper),{ref:"swiperRefMobile",modules:d,"centered-slides":!0,"slides-per-view":1,speed:600,effect:"fade","fade-effect":{crossFade:!0},loop:!0,pagination:{el:".swiper-pagination__mobile",clickable:!0},navigation:{nextEl:".swiper-button-next__mobile",prevEl:".swiper-button-prev__mobile"},class:"swiper showcaseSlide swiper--mobile",onSwiper:y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,I=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{key:I.key,"data-swiper-key":I.key},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"slide-content",onClick:U=>b(I.key)},[e.createElementVNode("div",Cv,[I.poster?(e.openBlock(),e.createElementBlock("img",{key:0,class:"img-static",src:I.poster,alt:I.alt||I.title},null,8,Vv)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"img-static",src:I.image||I.meta.image,alt:I.alt||I.title},null,8,xv))]),e.createElementVNode("div",kv,[e.createElementVNode("h6",Ev,e.toDisplayString(I.title),1),I.content||I.desc||I.meta.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-content__box__content",innerHTML:I.content||I.desc||I.meta.description},null,8,Tv)):e.createCommentVNode("",!0),I.subtitle||I.label?(e.openBlock(),e.createElementBlock("h6",Nv,e.toDisplayString(I.subtitle||I.label),1)):(e.openBlock(),e.createElementBlock("h6",Sv,e.toDisplayString(V(I.category)),1))]),I.video_type&&I.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview&&I.video_type==="outer"?(e.openBlock(),e.createElementBlock("a",{key:0,href:I.link,target:"_blank",rel:"noopener noreferrer",class:"slide-content__play"},null,8,Bv)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"slide-content__play",onClick:e.withModifiers(U=>T(I.key),["stop"])},null,8,Pv))],64)):e.createCommentVNode("",!0)],8,bv)]),_:2},1032,["data-swiper-key"]))),128))]),_:1},512),A[6]||(A[6]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev__mobile swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination__mobile swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next__mobile swiper-button-next"})],-1))]),_:1}))],512)):(e.openBlock(),e.createElementBlock("p",lv,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:r.value,"onUpdate:show":A[0]||(A[0]=I=>r.value=I),onHandleEdit:A[1]||(A[1]=I=>c.value=!0),onHandleDelete:u,onHandleCopy:g,onHandlePaste:m},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sv,{key:1,show:c.value,"onUpdate:show":A[4]||(A[4]=I=>c.value=I),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b7107bd6"]]),Dv=Object.freeze(Object.defineProperty({__proto__:null,default:sd},Symbol.toStringTag,{value:"Module"})),$v={class:"setting-content"},Lv={class:"setting-header flex items-center"},Av={class:"setting-header flex items-center"},Iv={class:"setting-header flex items-center"},vv=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",$v,[e.createElementVNode("div",Lv,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=g=>n.data.onlyShowPc=g)},null,8,["modelValue"])]),e.createElementVNode("div",Av,[s[8]||(s[8]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=g=>n.data.width=g),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[4]||(s[4]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",Iv,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(c,{modelValue:n.data.bgColor,"onUpdate:modelValue":s[2]||(s[2]=g=>n.data.bgColor=g),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"#ffffff"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(r,{value:"#F7F7FA"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-33aa6b59"]]),Mv={key:0},Ov={class:"explore-links__list row row-cols-1 row-cols-md-3"},ld=J(e.defineComponent({name:"ExploreLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var C,w,x,y,b;if(o.modelValue&&o.modelValue.data)return;const h={id:((C=o.modelValue)==null?void 0:C.id)||F(),type:"ExploreLinks",onlyShowPc:!1,width:((w=o.modelValue)==null?void 0:w.width)||"",bgColor:((x=o.modelValue)==null?void 0:x.bgColor)||"",api:((y=o.modelValue)==null?void 0:y.api)||"/section-link/explore/random",count:((b=o.modelValue)==null?void 0:b.count)||6};a("update:modelValue",h)},s=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=h=>{a("handlePaste",h)},m=h=>{a("handleClick",h)};i();const d=e.ref([]),p=h=>{if(!h||!o.isPreview)return{tag:"div",props:{}};if(h.startsWith("http"))return{tag:"a",props:{href:h,target:"_blank"}};if(h.startsWith("?")||h.startsWith("#")||h.startsWith("/")){const C=h.startsWith("?")?(window==null?void 0:window.location.href.split("?")[0])+h:h.startsWith("#")?(window==null?void 0:window.location.href.split("#")[0])+h:h;return{tag:"div",props:{onClick:()=>m(C)}}}return{tag:"a",props:{href:h,target:"_blank"}}},f=async()=>{var x,y;const h={params:{host:o.host,langCode:o.locale}},C=`${(x=o.modelValue)==null?void 0:x.api}?count=${(y=o.modelValue)==null?void 0:y.count}`,{data:w}=await en.get(C,h);d.value=w.data};return e.onMounted(()=>{f()}),(h,C)=>{var w,x,y;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"explore-links",onMouseenter:C[2]||(C[2]=b=>l.value=!0),onMouseleave:C[3]||(C[3]=b=>l.value=!1),style:e.normalizeStyle({backgroundColor:((w=n.modelValue)==null?void 0:w.bgColor)||"transparent"})},[n.host?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",Mv,"api组件,请在门户端查看")),d.value.length>0&&n.host?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["explore-links__container",[(x=n.modelValue)!=null&&x.width?`container-content-${(y=n.modelValue)==null?void 0:y.width}`:"container-content"]])},[C[5]||(C[5]=e.createElementVNode("h6",{class:"explore-links__title"},"更多",-1)),e.createElementVNode("ul",Ov,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,b=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:"col explore-links__item"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(b.link).tag),e.mergeProps({ref_for:!0},p(b.link).props,{class:"explore-links__link link-body-p link--udrline"}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.name),1)]),_:2},1040))]))),128))])],2)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":C[0]||(C[0]=b=>l.value=b),onHandleEdit:C[1]||(C[1]=b=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(vv,{key:1,show:r.value,"onUpdate:show":C[4]||(C[4]=b=>r.value=b),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-f2ef19cd"]]),Uv=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),Rv=["id","value"],Fv=["for"],Hv=J(e.defineComponent({name:"TabTag",__name:"index",props:{tabList:{default:()=>[]},currentIdx:{default:0}},emits:["updateFilter"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(null),l=e.ref(0),r=e.ref(0),c=e.ref(0),u=e.ref("all"),g=e.ref(!1),m=e.ref(1024),d=e.computed(()=>l.value>0),p=e.computed(()=>{if(!g.value||typeof window>"u")return 24;const y=i.value;if(!y)return 24;const b=window.getComputedStyle(y,null).getPropertyValue("padding-right").split("px")[0];return Number(b)*2}),f=e.computed(()=>r.value-l.value+p.value>c.value),h=()=>{typeof window<"u"&&(m.value=window.innerWidth)},C=()=>{if(o.tabList.length<=0)return;const y=s.value;y&&(l.value=y.scrollLeft,r.value=y.scrollWidth);const b=i.value;b&&(c.value=b.getBoundingClientRect().width)},w=y=>{s.value&&(y==="next"?s.value.scrollLeft+=200:s.value.scrollLeft-=200)},x=()=>{C()};return e.watch(u,()=>{a("updateFilter",u.value)}),e.watch(m,()=>{C()}),e.onMounted(()=>{g.value=!0,h(),typeof window<"u"&&window.addEventListener("resize",h),e.nextTick(x),e.nextTick(()=>{setTimeout(x,1e3)})}),(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"wrapper",ref:i},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:s,onScroll:x},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:b[0]||(b[0]=V=>w("prev"))},null,512),[[e.vShow,d.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,V=>(e.openBlock(),e.createElementBlock("li",{key:V.key,class:"tab-tag__item"},[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"tab-tag__checkbox d-none",id:`check-${V.key}`,value:V.key,"onUpdate:modelValue":b[1]||(b[1]=T=>u.value=T)},null,8,Rv),[[e.vModelRadio,u.value]]),e.createElementVNode("label",{class:"tab-tag__btn",for:`check-${V.key}`,ref_for:!0,ref:"btn"},e.toDisplayString(V.name),9,Fv)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:b[2]||(b[2]=V=>w("next"))},null,512),[[e.vShow,f.value]])],544)],512))}}),[["__scopeId","data-v-2d0c8438"]]),jv={class:"card-school"},zv={class:"school__head"},qv=["src","alt"],Wv={key:1,class:"school__img img-fit"},Gv=["src","alt"],Xv={key:2,class:"school__watermark"},Yv=["src","alt"],Kv={class:"school__body"},Qv={key:0,class:"school__cat-list"},Zv={key:1,class:"school__title"},Jv=["innerHTML"],eM={class:"school__cta"},tM={key:0},nM=["href"],oM={key:1},aM=["href"],iM={key:3,class:"contact__link mt-3"},sM={key:4,class:"contact__link mt-3"},nf=J(e.defineComponent({name:"CardSchool",__name:"index",props:{componentProps:{default:()=>({})}},emits:["handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.image)||((x=o.componentProps)==null?void 0:x.photo_url)}),s=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.cat)||((x=o.componentProps)==null?void 0:x.tags)}),l=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.title)||((x=o.componentProps)==null?void 0:x.name)}),r=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.text)||((x=o.componentProps)==null?void 0:x.description)}),c=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.watermark)??null}),u=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.phone)??null}),g=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.email)??null}),m=e.computed(()=>{var w,x;return((w=o.componentProps)==null?void 0:w.link)||((x=o.componentProps)==null?void 0:x.website)}),d=e.computed(()=>{var w;return(w=o.componentProps)==null?void 0:w.linkText}),p=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.buttons)??null}),f=e.computed(()=>{var w;return((w=o.componentProps)==null?void 0:w.alt)||l.value}),h=w=>w!=null&&w.startsWith("http")?{tag:"a",props:{href:w,target:"_blank",rel:"noopener noreferrer"}}:{tag:"a",props:{href:w}},C=w=>{a("handleClick",w)};return(w,x)=>(e.openBlock(),e.createElementBlock("div",jv,[e.createElementVNode("div",zv,[m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(m.value).tag),e.mergeProps({key:0},h(m.value).props,{class:"school__img img-fit"}),{default:e.withCtx(()=>[e.createElementVNode("img",{src:i.value,alt:f.value},null,8,qv)]),_:1},16)):(e.openBlock(),e.createElementBlock("div",Wv,[e.createElementVNode("img",{src:i.value,alt:f.value},null,8,Gv)])),c.value?(e.openBlock(),e.createElementBlock("div",Xv,[e.createElementVNode("img",{src:c.value,alt:f.value},null,8,Yv)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Kv,[s.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("ul",Qv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,y=>(e.openBlock(),e.createElementBlock("li",{key:y,class:"tx-overline text-blue"},e.toDisplayString(y),1))),128))])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("h6",Zv,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"school__content",innerHTML:r.value},null,8,Jv)):e.createCommentVNode("",!0),e.createElementVNode("ul",eM,[u.value?(e.openBlock(),e.createElementBlock("li",tM,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`tel:${u.value}`},e.toDisplayString(u.value),9,nM)])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("li",oM,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`mailto:${g.value}`},e.toDisplayString(g.value),9,aM)])):e.createCommentVNode("",!0)]),m.value?(e.openBlock(),e.createElementBlock("div",iM,[e.createVNode(Mo,{type:"link",data:{text:d.value||"访问学校网页",url:m.value},isPreview:w.isPreview,onHandleClick:C},null,8,["data","isPreview"])])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",sM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(y,b)=>(e.openBlock(),e.createBlock(Mo,{key:b,type:"button",data:{text:y.text,url:y.url},isPreview:w.isPreview,onHandleClick:C},null,8,["data","isPreview"]))),128))])):e.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-bd1748ce"]]),lM={class:"school-list"},rM={key:0,class:"school-list__filter"},dM={key:0,class:"school-list__title"},cM=["id"],uM=["data-aos-delay","data-aos-anchor"],mM=J(e.defineComponent({name:"SchoolList",__name:"SchoolList",props:{componentProps:{type:Object,default:()=>({})},schoolLocations:{type:Array,default:()=>[]},schoolCategories:{type:Array,default:()=>[]},host:{type:String,default:()=>""},locale:{type:String,default:()=>""}},setup(n){const t=n,o=e.ref("all"),a=Date.now(),i=e.ref([]),s=e.computed(()=>t.schoolLocations),l=e.computed(()=>t.schoolCategories),r=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.width)??null}),c=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.title)??null}),u=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.colDesktop)??3}),g=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.colMobile)??1}),m=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.slug)??"all"}),d=e.computed(()=>{const y=l.value.find(b=>b.slug===m.value);return(y==null?void 0:y.id)??NaN}),p=e.computed(()=>{let y=[{id:"all",name:"全部"}];return y.push(...s.value),y.map(V=>({...V,key:V.id}))}),f=e.computed(()=>{var y;return((y=t.componentProps)==null?void 0:y.list)??[]}),h=e.computed(()=>isNaN(d.value)?i.value:f.value),C=y=>{o.value=y},w=async()=>{try{const y={params:{host:t.host,langCode:t.locale}},b="/school/listForComponent",{data:V}=await en.get(b,y);i.value=V.data}catch(y){console.error("Error fetching school list:",y)}},x=async y=>{try{const b={params:{host:t.host,langCode:t.locale,locationId:y}},V="/school/location",{data:T}=await en.get(V,b);i.value=T.data}catch(b){console.error("Error fetching location list:",b)}};return e.watch(o,y=>{console.log("filter changed:",y),y==="all"?w():x(y)},{immediate:!0}),e.onMounted(()=>{isNaN(d.value)&&w()}),(y,b)=>(e.openBlock(),e.createElementBlock("div",lM,[p.value&&p.value.length>0&&isNaN(d.value)?(e.openBlock(),e.createElementBlock("div",rM,[e.createVNode(Hv,{tabList:p.value,onUpdateFilter:C},null,8,["tabList"])])):e.createCommentVNode("",!0),h.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["school-list__wrapper",[r.value]])},[c.value?(e.openBlock(),e.createElementBlock("h4",dM,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${g.value}`,`row-cols-md-${u.value}`,{"small-gap":u.value>4}]]),id:`school-list-${e.unref(a)}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:V.name,"data-aos":"fade-up","data-aos-delay":Number(T)*100,"data-aos-anchor":`#school-list-${e.unref(a)}`},[e.createVNode(nf,{componentProps:V},null,8,["componentProps"])],8,uM))),128))],10,cM)],2)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ebd2a9a9"]]),pM={class:"setting-content"},hM={class:"setting-header flex items-center"},fM={class:"setting-header flex items-center"},gM={class:"setting-header flex items-center"},yM=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},slugList:{type:Array,default:()=>[]}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",pM,[e.createElementVNode("div",hM,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",fM,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"学校类别",-1)),e.createVNode(c,{modelValue:n.data.slug,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.slug=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.slugList,m=>(e.openBlock(),e.createBlock(r,{key:m.slug,value:m.slug},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",gM,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(u,{modelValue:n.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-1a76979f"]]);var of={exports:{}},St=of.exports={},wo,bo;function Bu(){throw new Error("setTimeout has not been defined")}function Pu(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?wo=setTimeout:wo=Bu}catch{wo=Bu}try{typeof clearTimeout=="function"?bo=clearTimeout:bo=Pu}catch{bo=Pu}})();function af(n){if(wo===setTimeout)return setTimeout(n,0);if((wo===Bu||!wo)&&setTimeout)return wo=setTimeout,setTimeout(n,0);try{return wo(n,0)}catch{try{return wo.call(null,n,0)}catch{return wo.call(this,n,0)}}}function _M(n){if(bo===clearTimeout)return clearTimeout(n);if((bo===Pu||!bo)&&clearTimeout)return bo=clearTimeout,clearTimeout(n);try{return bo(n)}catch{try{return bo.call(null,n)}catch{return bo.call(this,n)}}}var Fo=[],Vi=!1,Ra,rd=-1;function wM(){!Vi||!Ra||(Vi=!1,Ra.length?Fo=Ra.concat(Fo):rd=-1,Fo.length&&sf())}function sf(){if(!Vi){var n=af(wM);Vi=!0;for(var t=Fo.length;t;){for(Ra=Fo,Fo=[];++rd<t;)Ra&&Ra[rd].run();rd=-1,t=Fo.length}Ra=null,Vi=!1,_M(n)}}St.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];Fo.push(new lf(n,t)),Fo.length===1&&!Vi&&af(sf)};function lf(n,t){this.fun=n,this.array=t}lf.prototype.run=function(){this.fun.apply(null,this.array)},St.title="browser",St.browser=!0,St.env={},St.argv=[],St.version="",St.versions={};function Ho(){}St.on=Ho,St.addListener=Ho,St.once=Ho,St.off=Ho,St.removeListener=Ho,St.removeAllListeners=Ho,St.emit=Ho,St.prependListener=Ho,St.prependOnceListener=Ho,St.listeners=function(n){return[]},St.binding=function(n){throw new Error("process.binding is not supported")},St.cwd=function(){return"/"},St.chdir=function(n){throw new Error("process.chdir is not supported")},St.umask=function(){return 0};var bM=of.exports;const CM={key:0},VM={key:0,class:"school-layout__logo"},xM={key:1,class:"school-layout__article"},dd=J(e.defineComponent({name:"SchoolLayout",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i={schoolCategories:"/school/category/listForWeb",schoolLocations:"/location/listForWeb"},s=e.ref([]),l=e.ref([]),r=()=>{Promise.all([en.get(i.schoolCategories,{params:{langCode:o.locale,host:o.host}}),en.get(i.schoolLocations)]).then(([T,k])=>{s.value=T.data.data,l.value=k.data.data,bM.nextTick(()=>{console.log("slugId",b.value),isNaN(b.value)||V()})})},c=()=>{var k,S,D,N,A,$;if(o.modelValue&&o.modelValue.data)return;const T={id:((k=o.modelValue)==null?void 0:k.id)||F(),type:"SchoolLayout",onlyShowPc:!1,api:((S=o.modelValue)==null?void 0:S.api)||"/school/getByCategoryId",title:((N=(D=o.modelValue)==null?void 0:D.data)==null?void 0:N.title)||"这里是标题",slug:(($=(A=o.modelValue)==null?void 0:A.data)==null?void 0:$.slug)||"ywiek"};a("update:modelValue",T)},u=e.computed(()=>{var T;return o.isPreview?!((T=o.modelValue)!=null&&T.onlyShowPc)||!Te():!0}),g=e.ref(!1),m=e.ref(!1),d=()=>{a("handleDelete",o.modelValue.id)},p=()=>{a("handleCopy",o.modelValue)},f=T=>{a("handlePaste",T)};r(),c();const h=e.ref([]),C=e.ref([]),w=e.ref([]),x=e.ref({id:F(),type:"MediaLogo",bgColor:"",width:"",data:[]}),y=e.ref({id:F(),type:"ArticleList",bgColor:"",width:"",data:[]}),b=e.computed(()=>{const T=s.value.find(k=>k.slug===o.modelValue.slug);return(T==null?void 0:T.id)??NaN}),V=async()=>{try{const T={params:{host:o.host,langCode:o.locale,categoryId:b.value}},{data:k}=await en.get(o.modelValue.api,T);w.value=k.data.schools;const S=k.data.logo_url;S&&(h.value=Array.isArray(S)?S.map(U=>({id:F(),url:U.url})):[{id:F(),imgSrc:S}],x.value.data=h.value,console.log("logo_list",h.value));const D=k.data.photo_url,N=k.data.name,A=k.data.description,$=k.data.caption,I=k.data.buttons;A&&C.value.push({id:F(),type:"Article",title:N||null,content:A,buttonList:I==null?void 0:I.map(U=>({id:F(),...U}))}),D&&C.value.push({id:F(),type:"Image",imgSrc:D,caption:$?N:null}),y.value.data=C.value}catch(T){console.error("Error fetching category list:",T)}};return(T,k)=>{var S,D;return e.openBlock(),e.createElementBlock(e.Fragment,null,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"school-layout",onMouseenter:k[4]||(k[4]=N=>g.value=!0),onMouseleave:k[5]||(k[5]=N=>g.value=!1)},[n.host?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value.length>0?(e.openBlock(),e.createElementBlock("div",VM,[e.createVNode(vs,{isPreview:!1,modelValue:x.value,"onUpdate:modelValue":k[0]||(k[0]=N=>x.value=N)},null,8,["modelValue"])])):e.createCommentVNode("",!0),C.value.length>0?(e.openBlock(),e.createElementBlock("div",xM,[e.createVNode(fs,{isPreview:!1,modelValue:y.value,"onUpdate:modelValue":k[1]||(k[1]=N=>y.value=N)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["school-layout__school",{"mt-0":w.value.length<=0}])},[e.createVNode(mM,{componentProps:{title:(S=n.modelValue)==null?void 0:S.title,list:w.value,slug:(D=n.modelValue)==null?void 0:D.slug,width:"container-content"},schoolLocations:l.value,schoolCategories:s.value,host:n.host,locale:n.locale},null,8,["componentProps","schoolLocations","schoolCategories","host","locale"])],2)],64)):(e.openBlock(),e.createElementBlock("p",CM,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:g.value,"onUpdate:show":k[2]||(k[2]=N=>g.value=N),onHandleEdit:k[3]||(k[3]=N=>m.value=!0),onHandleDelete:d,onHandleCopy:p,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(yM,{key:1,show:m.value,"onUpdate:show":k[6]||(k[6]=N=>m.value=N),data:n.modelValue,slugList:s.value},null,8,["show","data","slugList"]))],64)}}}),[["__scopeId","data-v-3e22366c"]]),kM=Object.freeze(Object.defineProperty({__proto__:null,default:dd},Symbol.toStringTag,{value:"Module"})),EM={class:"setting-content"},TM={class:"setting-header flex items-center"},NM={class:"setting-header flex items-center"},SM={class:"setting-header flex items-center"},BM={class:"setting-header flex items-center"},PM=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",EM,[e.createElementVNode("div",TM,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},{default:e.withCtx(()=>[...s[4]||(s[4]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",NM,[s[10]||(s[10]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",SM,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(u,{modelValue:n.data.desktopCol,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.desktopCol=m),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",BM,[s[12]||(s[12]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(u,{modelValue:n.data.mobileCol,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.mobileCol=m),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-6465c19c"]]),DM={key:0},$M={class:"mt-10 mt-md-12"},cd=J(e.defineComponent({name:"CardCarouselMultiRowPublications",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:""},locale:{type:String,default:""}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var M,W,Z;if(o.modelValue&&o.modelValue.data)return;const R={id:((M=o.modelValue)==null?void 0:M.id)||F(),type:"CardCarouselMultiRowPublications",onlyShowPc:!1,width:((W=o.modelValue)==null?void 0:W.width)||"",api:((Z=o.modelValue)==null?void 0:Z.api)||"/publication/listForComponent",desktopCol:4,mobileCol:2};a("update:modelValue",R)},s=e.computed(()=>{var R;return o.isPreview?!((R=o.modelValue)!=null&&R.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=R=>{a("handlePaste",R)},m=R=>{a("handleClick",R)};i();const d=[ut.Navigation,ut.Pagination],p={768:{slidesPerView:"auto",slidesPerGroup:1,slidesPerGroupAuto:!0,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}},f=e.ref(null),h=e.ref(null),C=e.ref(0),w=e.ref([]),x=e.ref([]),y=e.ref(1024),b=e.computed(()=>(y.value>=768&&y.value>=1024?4:3)*2),V=e.computed(()=>y.value>=768?y.value>=1024?4:3:2),T=e.computed(()=>x.value.length>1);e.watch(C,()=>{const R=f.value;G(R)});const k=()=>{typeof window<"u"&&(y.value=window.innerWidth)},S=async()=>{var R,M;if((R=o.modelValue)!=null&&R.api){const W=`${(M=o.modelValue)==null?void 0:M.api}`,Z={params:{host:o.host,langCode:o.locale}},{data:ie}=await en.get(W,Z);x.value=ie.data}D()},D=()=>{const R=x.value.reduce((M,W,Z)=>{const ie=Math.floor(Z/b.value);return M[ie]||(M[ie]=[]),M[ie].push(W),M},[]);w.value=R},N=R=>{h.value=R},A=()=>{h.value&&(C.value=h.value.realIndex,H(),O())},$=R=>{h.value&&h.value.slideToLoop(R,600)},I=R=>{if(R.video_type==="outer")return;const M=x.value.filter(Z=>Z.video_type!=="outer"&&Z.type!=="photo"),W=M.findIndex(Z=>Z.slug===R.slug);a("showLightboxVideo",{idx:W,list:M})},U=R=>{const M=x.value.filter(Z=>Z.type==="photo"),W=M.findIndex(Z=>Z.slug===R.slug);a("showLightboxImage",{idx:W,url:R.url,text:R.text||R.title,list:M})},Y=R=>{const M=R.getBoundingClientRect();return{x:M.left+window.pageXOffset,y:M.top+window.pageYOffset}},G=R=>{if(!R||typeof window>"u")return;const M=y.value>=1024?170:150,W=Y(R).y-M;window.scroll({top:W,left:0,behavior:"smooth"})},q=R=>{const M=R.currentTarget,W=M.dataset.slug,Z=M.dataset.type,ie=x.value.find(ge=>ge.key==W||ge.slug==W);ie&&(Z==="photo"?U(ie):I(ie))},O=()=>{typeof document>"u"||(Object.values(document.getElementsByClassName("card-asset")).forEach(R=>{R.addEventListener("click",q)}),Object.values(document.getElementsByClassName("card-video")).forEach(R=>{R.addEventListener("click",q)}))},H=()=>{typeof document>"u"||(Object.values(document.getElementsByClassName("card-asset")).forEach(R=>{R.removeEventListener("click",q)}),Object.values(document.getElementsByClassName("card-video")).forEach(R=>{R.removeEventListener("click",q)}))};return e.onMounted(()=>{k(),typeof window<"u"&&window.addEventListener("resize",k),S()}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",k),H()}),(R,M)=>{var W,Z;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-carousel-multi-row",onMouseenter:M[2]||(M[2]=ie=>l.value=!0),onMouseleave:M[3]||(M[3]=ie=>l.value=!1),ref_key:"parent",ref:f},[n.host?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["card-carousel__wrapper",[(W=n.modelValue)!=null&&W.width?`container-content-${(Z=n.modelValue)==null?void 0:Z.width}`:"container-content"]])},[w.value.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(kt.Swiper),{ref_key:"swiperRef",ref:h,modules:d,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group-skip":1,"space-between":16,loop:!0,breakpoints:p,class:"swiper card-carousel__swiper",onSlideChange:A,onSwiper:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ie,ge)=>(e.openBlock(),e.createBlock(e.unref(kt.SwiperSlide),{class:"swiper-slide",key:ge},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${V.value}`]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie,Le=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:Le.key||Le.slug},[e.createVNode(nf,{componentProps:Le,onHandleClick:m},null,8,["componentProps"])]))),128))],2)]),_:2},1024))),128))]),_:1},512),e.withDirectives(e.createElementVNode("div",$M,[e.createVNode(wi,{currentIndex:C.value,onUpdatePage:$,count:w.value.length,dark:""},null,8,["currentIndex","count"])],512),[[e.vShow,T.value]])],64)):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("p",DM,"api组件,请在门户端查看")),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:2,show:l.value,"onUpdate:show":M[0]||(M[0]=ie=>l.value=ie),onHandleEdit:M[1]||(M[1]=ie=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PM,{key:1,show:r.value,"onUpdate:show":M[4]||(M[4]=ie=>r.value=ie),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-3c68e4bd"]]),LM=Object.freeze(Object.defineProperty({__proto__:null,default:cd},Symbol.toStringTag,{value:"Module"})),AM=[{label:"Common",key:"common",image:"",children:[{label:"CustomSpace",name:"CustomSpace",key:"custom_space",image:"../../assets/images/CustomSpace.png"},{label:"CustomText",name:"CustomText",key:"custom_text",image:""},{label:"QuoteText",name:"QuoteText",key:"quote_text",image:"../../assets/images/QuoteText.png"},{label:"ArticleList",name:"ArticleList",key:"article_list",image:"../../assets/images/ArticleList.png"},{label:"ArticleListPureText",name:"ArticleListPureText",key:"article_list_pure_text",image:""}]},{label:"Media",key:"media",image:"",children:[{label:"MedialmageFull",name:"MediaImageFull",key:"media_image_full",image:""},{label:"MedialmageStatic",name:"MediaImageStatic",key:"media_image_static",image:""},{label:"MediaVideo",name:"MediaVideo",key:"media_video",image:""}]},{label:"Links",key:"links",image:"",children:[{label:"BtnList",name:"BtnList",key:"btn_list",image:"../../assets/images/BtnList.png"},{label:"LinkList",name:"LinkList",key:"link_list",image:"../../assets/images/LinkList.png"},{label:"DonorLinks",name:"DonorLinks",key:"donor_links",image:"../../assets/images/DonorLinks.png"},{label:"GridLinks",name:"GridLinks",key:"grid_links",image:""},{label:"DetailLink",name:"DetailLink",key:"detail_link",image:""},{label:"InformationLink",name:"InformationLink",key:"information_link",image:""}]},{label:"Headers",key:"headers",image:"",children:[{label:"BannerPage",name:"BannerPage",key:"banner_page",image:"../../assets/images/BannerPage.png"},{label:"BannerImage",name:"BannerImage",key:"banner_image",image:"../../assets/images/BannerImage.png"},{label:"MapStatic",name:"MapStatic",key:"map_static",image:"../../assets/images/MapStatic.png"},{label:"VrTour",name:"VrTour",key:"vr_tour",image:""}]},{label:"Collections",key:"collections",image:"",children:[{label:"HeroSlide",name:"HeroSlide",key:"hero_slide",image:"../../assets/images/HeroSlide.png"},{label:"AccordionText",name:"AccordionText",key:"accordion_text",image:""},{label:"CardCarousel (Profiles)",name:"CardCarousel",key:"card_carousel_profiles",image:"../../assets/images/CardCarousel.png"},{label:"CardCarouselMultiRow (Profiles)",name:"CardCarouselMultiRow",key:"card_carousel_multi_row_profiles",image:"../../assets/images/CardCarouselMultiRow.png"},{label:"CardList (Circle)",name:"CardListCircle",key:"card_list_circle",image:""},{label:"CardList (Programme)",name:"CardListProgramme",key:"card_list_programme",image:""},{label:"CardList (School)",name:"CardListSchool",key:"card_list_school",image:""},{label:"CardShowcaseProfile",name:"CardShowcaseProfile",key:"card_showcase_profile",image:"../../assets/images/CardShowcaseProfile.png"},{label:"CarouselLogo",name:"CarouselLogo",key:"carousel_logo",image:"../../assets/images/CarouselLogo.png"},{label:"Resources",name:"Resources",key:"resources",image:""},{label:"ResourcesTwo",name:"ResourcesTwo",key:"resources_two",image:""},{label:"Process",name:"Process",key:"process",image:"../../assets/images/Process.png"},{label:"TableTwo",name:"TableTwo",key:"table_two",image:"../../assets/images/TableTwo.png"},{label:"GalleryList (Default)",name:"GalleryDefault",key:"gallery_list_default",image:"../../assets/images/GalleryDefault.png"},{label:"GalleryList (Caption)",name:"GalleryList",key:"gallery_list_caption",image:"../../assets/images/GalleryList.png"},{label:"GalleryList (Caption - Round)",name:"GalleryCaptionRound",key:"gallery_list_caption_round",image:"../../assets/images/GalleryCaptionRound.png"},{label:"GalleryList (Timeline - One Column)",name:"GalleryTimeline",key:"gallery_list_timeline_one_column",image:"../../assets/images/GalleryTimeline.png"},{label:"GalleryList (Timeline - Two Columns)",name:"GalleryTimelineCol",key:"gallery_list_timeline_two_columns",image:"../../assets/images/GalleryTimelineCol.png"},{label:"TabDefault",name:"TabDefault",key:"tab_default",image:""},{label:"TabTimeLine",name:"TabTimeLine",key:"tab_time_line",image:""},{label:"Disc",name:"Disc",key:"disc",image:""},{label:"BasicCollapse",name:"BasicCollapse",key:"basic_collapse",image:""},{label:"TableCollapse",name:"TableCollapse",key:"table_collapse",image:""},{label:"MediaLogo",name:"MediaLogo",key:"media_logo",image:""},{label:"CollapseCustom",name:"CollapseCustom",key:"collapse_custom",image:""},{label:"ScrollKeyInfo",name:"ScrollKeyInfo",key:"scroll_key_info",image:"../../assets/images/ScrollKeyInfo.png"},{label:"CardCarouselMultiRow (Articles)",name:"CardCarouselMultiRowArticles",key:"card_carousel_multi_row_articles",image:""},{label:"Publications",name:"Publications",key:"publications",image:"../../assets/images/Publications.png"}]},{label:"Contact Information",key:"contact_information",image:"",children:[{label:"ContactUsInfo",name:"ContactUsInfo",key:"contact_us_info",image:"../../assets/images/ContactUsInfo.png"},{label:"ContactUsList",name:"ContactUsList",key:"contact_us_list",image:"../../assets/images/ContactUsList.png"}]},{label:"Sections",key:"sections",image:"",children:[{label:"TabPage",name:"TabPage",key:"tab_page",image:""},{label:"TabLogo",name:"TabLogo",key:"tab_page",image:""}]},{label:"Others",key:"others",image:"",children:[{label:"Articleitem",name:"ArticleItem",key:"article_item",image:"../../assets/images/ArticleItem.png"},{label:"CountDown",name:"CountDown",key:"count_down",image:"../../assets/images/CountDown.png"},{label:"Customlframe",name:"CustomIframe",key:"custom_iframe",image:"../../assets/images/CustomIframe.png"},{label:"TheHistoryCarousel",name:"TheHistoryCarousel",key:"the_history_carousel",image:"../../assets/images/TheHistoryCarousel.png"},{label:"TimelineStory",name:"TimelineStory",key:"timeline_story",image:"../../assets/images/TimelineStory.png"},{label:"RegisterForm (Event)",name:"RegisterForm",key:"register_form_event",image:""}]},{label:"YCYW 90th",key:"ycyw_90th",image:"",children:[{label:"BackgroundWrapper",name:"BackgroundWrapper",key:"background_wrapper",image:""},{label:"BannerQuote",name:"BannerQuote",key:"banner_quote",image:"../../assets/images/BannerQuote.png"},{label:"BannerlmageWithLink",name:"BannerImageWithLink",key:"banner_image_with_link",image:"../../assets/images/BannerImageWithLink.png"},{label:"BlessingMessage",name:"BlessingMessage",key:"blessing_message",image:""},{label:"BlessingSlider",name:"BlessingSlider",key:"blessing_slider",image:""},{label:"GalleryBlock",name:"GalleryBlock",key:"gallery_block",image:""},{label:"RibbonBlock",name:"RibbonBlock",key:"ribbon_block",image:"../../assets/images/RibbonBlock.png"}]},{label:"API-related Components",key:"api_related_components",image:"",children:[{label:"NewsList",name:"NewsList",key:"news_list",image:"../../assets/images/NewsList.png"},{label:"ExploreLinks",name:"ExploreLinks",key:"explore_links",image:""},{label:"CardShowcase",name:"CardShowcase",key:"card_showcase",image:""},{label:"CardCarousel (Articles)",name:"CardCarouselArticles",key:"card_carousel_articles",image:"../../assets/images/CardCarouselArticles.png"},{label:"CardCarouselMultiRow (Publications)",name:"CardCarouselMultiRowPublications",key:"card_carousel_multi_row_publications",image:""},{label:"Alumni Community List",name:"AlummiCommunityList",key:"alumni_community_list",image:""},{label:"School Layout",name:"SchoolLayout",key:"school_layout",image:""}]}],IM={class:"search-box"},vM={class:"component-section"},MM={class:"section-title"},OM={class:"section-description"},UM={class:"component-grid"},RM=["onClick"],FM={class:"thumbnail-placeholder"},HM={class:"component-name"},jM=J({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","ok","cancel"],setup(n,{emit:t}){const o=n,a=t,i=e.reactive({}),s=e.ref(["common"]),l=e.ref(AM),r=e.ref({}),c=e.computed(()=>r.value.children||[]);e.watch(c,d=>{d.forEach(p=>{i[p.label]||(i[p.label]=null)})},{immediate:!0}),e.watch(s,d=>{r.value=l.value.find(p=>p.key===d[0])||{}},{immediate:!0});const u=d=>{a("ok",JSON.parse(JSON.stringify({type:d.label,id:F()})))},g=e.computed({get:()=>o.visible,set:d=>a("update:visible",d)}),m=()=>{const d=["#3498db","#2ecc71","#e74c3c","#f1c40f","#9b59b6","#1abc9c"];return d[Math.floor(Math.random()*d.length)]};return(d,p)=>{const f=e.resolveComponent("a-input-search"),h=e.resolveComponent("a-menu-item"),C=e.resolveComponent("a-menu"),w=e.resolveComponent("a-layout-sider"),x=e.resolveComponent("a-layout-content"),y=e.resolveComponent("a-layout"),b=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(b,{visible:g.value,"onUpdate:visible":p[1]||(p[1]=V=>g.value=V),title:"添加组件",width:"90%",footer:!1},{default:e.withCtx(()=>[e.createVNode(y,{class:"component-library-container",style:{display:"flex"}},{default:e.withCtx(()=>[e.createVNode(w,{width:240,style:{background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)"}},{default:e.withCtx(()=>[e.createElementVNode("div",IM,[e.createVNode(f,{placeholder:"Search components..."})]),e.createVNode(C,{"selected-keys":s.value,"onUpdate:selectedKeys":p[0]||(p[0]=V=>s.value=V),style:{height:"100%",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,V=>(e.openBlock(),e.createBlock(h,{key:V.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1024))),128))]),_:1},8,["selected-keys"])]),_:1}),e.createVNode(x,{style:{padding:"24px 40px 24px 24px",background:"#f5f5f5"}},{default:e.withCtx(()=>[e.createElementVNode("div",vM,[e.createElementVNode("h2",MM,e.toDisplayString(r.value.label),1),e.createElementVNode("p",OM,e.toDisplayString(r.value.description),1),e.createElementVNode("div",UM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(V,T)=>(e.openBlock(),e.createElementBlock("div",{key:T,class:"component-card",onClick:k=>u(V)},[e.createElementVNode("div",FM,[e.createElementVNode("div",{class:"thumbnail-color",style:e.normalizeStyle({backgroundColor:m()})},null,4)]),e.createElementVNode("div",HM,e.toDisplayString(V.label),1)],8,RM))),128))])])]),_:1})]),_:1})]),_:1},8,["visible"])}}},[["__scopeId","data-v-72c80758"]]),Co=e.defineComponent({__name:"DynamicComponentLoader",props:{type:{},propsData:{}},emits:["handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=Object.assign({"/src/components/AccordionText/index.vue":()=>Promise.resolve().then(()=>zQ),"/src/components/AlummiCommunityList/index.vue":()=>Promise.resolve().then(()=>iI),"/src/components/ArticleItem/index.vue":()=>Promise.resolve().then(()=>K3),"/src/components/ArticleList/index.vue":()=>Promise.resolve().then(()=>dw),"/src/components/ArticleListPureText/index.vue":()=>Promise.resolve().then(()=>JA),"/src/components/BackgroundWrapper/index.vue":()=>Promise.resolve().then(()=>$Y),"/src/components/BannerImage/index.vue":()=>Promise.resolve().then(()=>gw),"/src/components/BannerImageWithLink/index.vue":()=>Promise.resolve().then(()=>vN),"/src/components/BannerPage/index.vue":()=>Promise.resolve().then(()=>Tw),"/src/components/BannerQuote/index.vue":()=>Promise.resolve().then(()=>I3),"/src/components/BasicCollapse/index.vue":()=>Promise.resolve().then(()=>ED),"/src/components/BlessingMessage/index.vue":()=>Promise.resolve().then(()=>HI),"/src/components/BlessingSlider/index.vue":()=>Promise.resolve().then(()=>nv),"/src/components/BtnList/index.vue":()=>Promise.resolve().then(()=>Hw),"/src/components/CardCarousel/index.vue":()=>Promise.resolve().then(()=>n3),"/src/components/CardCarouselArticles/index.vue":()=>Promise.resolve().then(()=>oA),"/src/components/CardCarouselMultiRow/index.vue":()=>Promise.resolve().then(()=>V3),"/src/components/CardCarouselMultiRowArticles/index.vue":()=>Promise.resolve().then(()=>hA),"/src/components/CardCarouselMultiRowPublications/index.vue":()=>Promise.resolve().then(()=>LM),"/src/components/CardListCircle/index.vue":()=>Promise.resolve().then(()=>hU),"/src/components/CardListProgramme/index.vue":()=>Promise.resolve().then(()=>FU),"/src/components/CardListSchool/index.vue":()=>Promise.resolve().then(()=>gR),"/src/components/CardShowcase/index.vue":()=>Promise.resolve().then(()=>Dv),"/src/components/CardShowcaseProfile/index.vue":()=>Promise.resolve().then(()=>u5),"/src/components/CarouselLogo/index.vue":()=>Promise.resolve().then(()=>k7),"/src/components/CollapseCustom/index.vue":()=>Promise.resolve().then(()=>uK),"/src/components/ContactUsInfo/index.vue":()=>Promise.resolve().then(()=>_S),"/src/components/ContactUsList/index.vue":()=>Promise.resolve().then(()=>tN),"/src/components/CountDown/index.vue":()=>Promise.resolve().then(()=>N5),"/src/components/CustomIframe/index.vue":()=>Promise.resolve().then(()=>v5),"/src/components/CustomSpace/index.vue":()=>Promise.resolve().then(()=>ux),"/src/components/CustomText/index.vue":()=>Promise.resolve().then(()=>CA),"/src/components/DetailLink/index.vue":()=>Promise.resolve().then(()=>xR),"/src/components/Disc/index.vue":()=>Promise.resolve().then(()=>pD),"/src/components/DonorLinks/index.vue":()=>Promise.resolve().then(()=>T8),"/src/components/ExploreLinks/index.vue":()=>Promise.resolve().then(()=>Uv),"/src/components/GalleryBlock/index.vue":()=>Promise.resolve().then(()=>RL),"/src/components/GalleryCaptionRound/index.vue":()=>Promise.resolve().then(()=>$b),"/src/components/GalleryDefault/index.vue":()=>Promise.resolve().then(()=>rb),"/src/components/GalleryList/index.vue":()=>Promise.resolve().then(()=>ck),"/src/components/GalleryTimeline/index.vue":()=>Promise.resolve().then(()=>kC),"/src/components/GalleryTimelineCol/index.vue":()=>Promise.resolve().then(()=>iV),"/src/components/GridLinks/index.vue":()=>Promise.resolve().then(()=>kQ),"/src/components/HeroSlide/index.vue":()=>Promise.resolve().then(()=>zk),"/src/components/InformationLink/index.vue":()=>Promise.resolve().then(()=>CX),"/src/components/LinkLIst/index.vue":()=>Promise.resolve().then(()=>t8),"/src/components/MapStatic/index.vue":()=>Promise.resolve().then(()=>Z9),"/src/components/MediaImageFull/index.vue":()=>Promise.resolve().then(()=>$A),"/src/components/MediaImageStatic/index.vue":()=>Promise.resolve().then(()=>HA),"/src/components/MediaLogo/index.vue":()=>Promise.resolve().then(()=>y$),"/src/components/MediaVideo/index.vue":()=>Promise.resolve().then(()=>mX),"/src/components/NewsList/index.vue":()=>Promise.resolve().then(()=>v4),"/src/components/Process/index.vue":()=>Promise.resolve().then(()=>sx),"/src/components/Publications/index.vue":()=>Promise.resolve().then(()=>u9),"/src/components/QuoteText/index.vue":()=>Promise.resolve().then(()=>u8),"/src/components/RegisterForm/index.vue":()=>Promise.resolve().then(()=>CL),"/src/components/Resources/index.vue":()=>Promise.resolve().then(()=>VP),"/src/components/ResourcesTwo/index.vue":()=>Promise.resolve().then(()=>OP),"/src/components/RibbonBlock/index.vue":()=>Promise.resolve().then(()=>iE),"/src/components/SchoolLayout/index.vue":()=>Promise.resolve().then(()=>kM),"/src/components/ScrollKeyInfo/index.vue":()=>Promise.resolve().then(()=>B6),"/src/components/TabDefault/index.vue":()=>Promise.resolve().then(()=>gO),"/src/components/TabLogo/index.vue":()=>Promise.resolve().then(()=>gY),"/src/components/TabPage/index.vue":()=>Promise.resolve().then(()=>KX),"/src/components/TabTimeLine/index.vue":()=>Promise.resolve().then(()=>qO),"/src/components/TableCollapse/index.vue":()=>Promise.resolve().then(()=>JD),"/src/components/TableTwo/index.vue":()=>Promise.resolve().then(()=>VN),"/src/components/TheHistoryCarousel/index.vue":()=>Promise.resolve().then(()=>LT),"/src/components/TimelineStory/index.vue":()=>Promise.resolve().then(()=>jE),"/src/components/VrTour/index.vue":()=>Promise.resolve().then(()=>lQ)}),a={};for(const g in o)try{const m=g.split("/"),d=m[m.length-2];a[d]=e.defineAsyncComponent(o[g])}catch(m){console.error("组件注册失败:",g,m)}a.DynamicComponentLoader=Co;const i=g=>a[g]||"div",s=t,l=g=>{s("handleDelete",g)},r=g=>{s("handleCopy",g)},c=g=>{s("handlePaste",g)},u=g=>{s("handleClick",g)};return(g,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(n.type)),e.mergeProps(n.propsData,{onHandleDelete:l,onHandleCopy:r,onHandlePaste:c,onHandleClick:u}),null,16))}}),zM={class:"page-content"},qM={key:0,style:{width:"100%"}},WM={class:"add-btn"},GM={key:1},Fa=J({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["update"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=n,s=t,l=e.ref(!1),r=e.ref(0),c=e.ref([...i.data]);e.watch(()=>i.data,h=>{c.value=[...h]},{deep:!0});const u=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),g=h=>h&&h.length>1,m=(h=0)=>{r.value=h,l.value=!0},d=(h,C)=>{console.log("===================updateComponentValue=================="),c.value[h]=C,s("update",[...c.value]),console.log("组件更新:",c.value)},p=()=>{a.value=!1,s("update",[...c.value])},f=h=>{l.value=!1,c.value.splice(r.value+1,0,h),s("update",[...c.value])};return(h,C)=>{const w=e.resolveComponent("icon-plus"),x=e.resolveComponent("a-button");return e.openBlock(),e.createElementBlock("div",zM,[c.value&&c.value.length>0?(e.openBlock(),e.createElementBlock("div",qM,[e.createVNode(e.unref(o),e.mergeProps({modelValue:c.value,"onUpdate:modelValue":C[0]||(C[0]=y=>c.value=y),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},u.value,{disabled:!g(c.value),onStart:C[1]||(C[1]=y=>a.value=!0),onEnd:p,"item-key":"id"}),{item:e.withCtx(({element:y,index:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item component-wrapper",{"sortable-disabled":!g(c.value)}]),key:y.id},[e.createVNode(Co,{type:y.type,"props-data":{isPreview:!1,modelValue:y,"onUpdate:modelValue":V=>d(b,V)}},null,8,["type","props-data"]),e.createElementVNode("div",WM,[e.createVNode(x,{type:"primary",onClick:V=>m(b)},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" Add Component ",-1))]),_:1},8,["onClick"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])):(e.openBlock(),e.createElementBlock("div",GM,[e.createVNode(x,{type:"primary",class:"add-component-btn",onClick:m},{default:e.withCtx(()=>[...C[4]||(C[4]=[e.createTextVNode(" 添加组件 ",-1)])]),_:1})])),e.createVNode(jM,{visible:l.value,"onUpdate:visible":C[2]||(C[2]=y=>l.value=y),onOk:f},null,8,["visible"])])}}},[["__scopeId","data-v-0a011a71"]]),XM={class:"setting-content"},YM={class:"setting-header flex items-center"},KM={class:"setting-header flex items-center"},QM={class:"setting-header flex items-center"},ZM={class:"setting-header flex items-center"},JM={class:"setting-body"},eO={class:"setting-toolbar"},tO={class:"tools"},nO={class:"setting-item"},oO={class:"item-header"},aO={class:"btn-group"},iO={key:0,class:"drag-handle"},sO={class:"components-content"},lO=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=m=>{l.data.data.push({id:F(),type:"Video",videoSrc:"",imgSrc:"",name:"",key:"",componentsDataJson:[]})},g=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("a-option"),h=e.resolveComponent("a-select"),C=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),x=e.resolveComponent("icon-drag-arrow"),y=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",XM,[e.createElementVNode("div",YM,[d[10]||(d[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=T=>n.data.onlyShowPc=T)},null,8,["modelValue"])]),e.createElementVNode("div",KM,[d[15]||(d[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(h,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=T=>n.data.width=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:""},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(f,{value:"small"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(f,{value:"middle"},{default:e.withCtx(()=>[...d[13]||(d[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(f,{value:"max"},{default:e.withCtx(()=>[...d[14]||(d[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",QM,[d[18]||(d[18]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(h,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[2]||(d[2]=T=>n.data.bgColor=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:"white"},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(f,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",ZM,[d[21]||(d[21]=e.createElementVNode("span",{class:"header-title"},"居中",-1)),e.createVNode(h,{modelValue:n.data.center,"onUpdate:modelValue":d[3]||(d[3]=T=>n.data.center=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:!0},{default:e.withCtx(()=>[...d[19]||(d[19]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(f,{value:!1},{default:e.withCtx(()=>[...d[20]||(d[20]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",JM,[e.createElementVNode("div",eO,[d[24]||(d[24]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",tO,[e.createVNode(w,{type:"primary",onClick:d[4]||(d[4]=T=>u())},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[d[22]||(d[22]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(w,{type:"primary",onClick:d[5]||(d[5]=T=>u())},{default:e.withCtx(()=>[...d[23]||(d[23]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",nO,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[7]||(d[7]=T=>n.data.data=T),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[8]||(d[8]=T=>a.value=!0),onEnd:d[9]||(d[9]=T=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:T})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:T.id},[e.createElementVNode("div",oO,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(T.name),1),e.createElementVNode("span",null,e.toDisplayString(T.key),1)]),e.createElementVNode("div",aO,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",iO,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:k=>g(T.id)},null,8,["onClick"]),e.createVNode(w,{size:"mini",type:"primary",onClick:d[6]||(d[6]=k=>u())},{default:e.withCtx(()=>[...d[25]||(d[25]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[26]||(d[26]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(b,{modelValue:T.name,"onUpdate:modelValue":k=>T.name=k,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[27]||(d[27]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(b,{modelValue:T.key,"onUpdate:modelValue":k=>T.key=k,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[28]||(d[28]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",sO,[e.createVNode(Fa,{data:T.componentsDataJson,onUpdate:k=>T.componentsDataJson=k},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-6024d07e"]]),rO={class:"tab-default__tab"},dO={class:"tab-blue__wrapper flex-center"},cO={class:"tab-blue__nav justify-content-center"},uO=["id"],mO=["id","onClick"],pO={class:"tab-default__content"},hO={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},fO={class:"component-wrapper"},ud=J(e.defineComponent({name:"TabDefault",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=(N,A)=>{N&&(p.value[A]=N)},a=n,i=t,s=e.ref(!1),l=e.ref(0),r=e.ref(0),c=e.ref(0),u=e.ref(0),g=e.ref(F()),m=e.ref(""),d=e.ref(0),p=e.ref([]);function f(N){var $;const A=($=p.value)==null?void 0:$.findIndex(I=>I.id===N);m.value=N,r.value=d.value,c.value=A,s.value=!0,l.value=1,setTimeout(()=>{l.value=2,d.value=A,setTimeout(()=>{s.value=!1,l.value=0},300)},300)}const h=e.ref(!1),C=e.ref(!1),w=e.computed(()=>{var A;if(!((A=a.modelValue)!=null&&A.data)||!Array.isArray(a.modelValue.data))return[];const N=a.modelValue.data[d.value];return N?N.componentsDataJson||[]:[]}),x=()=>{var A;if(a.modelValue&&a.modelValue.data){setTimeout(()=>{var $;f(($=a.modelValue)==null?void 0:$.data[0].id)},0);return}const N={id:((A=a.modelValue)==null?void 0:A.id)||F(),type:"TabDefault",onlyShowPc:!1,containerWidth:"",bgColor:"",center:!0,width:"",data:[{id:F(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:F(),key:"2222",name:"tab2",componentsDataJson:[]}]};i("update:modelValue",N),m.value=N.data[0].id},y=e.computed(()=>{var N;return a.isPreview?!((N=a.modelValue)!=null&&N.onlyShowPc)||!Te():!0}),b=e.computed(()=>{var N;return(N=a.modelValue)==null?void 0:N.data});x();const V=(N,A)=>{debugger;i("handleDelete",N||a.modelValue.id,A)},T=N=>{debugger;i("handleCopy",N||a.modelValue)},k=(N,A,$)=>{debugger;i("handlePaste",N,A,$)},S=e.computed(()=>{if(u.value,!p.value.length)return{};let N=0,A=0;if(s.value){if(l.value===1){const $=Math.min(r.value,c.value),I=Math.max(r.value,c.value),U=p.value[$],Y=p.value[I];if(!U||!Y)return{};const G=typeof window>"u"?{paddingLeft:"0"}:window.getComputedStyle(U),q=typeof window>"u"?{paddingRight:"0"}:window.getComputedStyle(Y);N=U.offsetLeft+parseInt(G.paddingLeft),A=Y.offsetLeft+Y.clientWidth-parseInt(q.paddingRight)-(U.offsetLeft+parseInt(G.paddingLeft))}else if(l.value===2){const $=p.value[c.value];if(!$)return{};const I=typeof window>"u"?{paddingLeft:"0",paddingRight:"0"}:window.getComputedStyle($);N=$.offsetLeft+parseInt(I.paddingLeft),A=$.clientWidth-parseInt(I.paddingLeft)-parseInt(I.paddingRight)}}else{const $=p.value[d.value];if(!$)return{};const I=typeof window>"u"?{paddingLeft:"0",paddingRight:"0"}:window.getComputedStyle($);N=$.offsetLeft+parseInt(I.paddingLeft),A=$.clientWidth-parseInt(I.paddingLeft)-parseInt(I.paddingRight)}return{"--strip-left":`${N}px`,"--strip-width":`${A}px`,"--tab-strip-color":"#0032a0",transition:s.value?"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none"}}),D=()=>{s.value||u.value++};return e.watch(b,N=>{setTimeout(()=>{if(typeof document>"u")return;p.value=[];const A=document.getElementById(g.value);if(!A)return;const $=A.querySelectorAll(".tab-blue__list__item");p.value=Array.from($),N&&N[0]&&f(N[0].id)},0)},{deep:!0}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",D),e.nextTick(()=>{d.value=d.value})}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",D)}),(N,A)=>{var $,I,U,Y;return y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tab-default__container bg-neutral-light",style:e.normalizeStyle({backgroundColor:($=n.modelValue)==null?void 0:$.bgColor}),onMouseover:A[5]||(A[5]=G=>C.value=!0),onMouseout:A[6]||(A[6]=G=>C.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["container-content-small",[(I=n.modelValue)!=null&&I.width?`container-content-${(U=n.modelValue)==null?void 0:U.width}`:"container-content"]])},[e.createElementVNode("div",rO,[e.createElementVNode("div",{class:"tab-blue bg-neutral-light",style:e.normalizeStyle({backgroundColor:(Y=n.modelValue)==null?void 0:Y.bgColor})},[e.createElementVNode("div",dO,[e.createElementVNode("div",cO,[A[7]||(A[7]=e.createElementVNode("div",{class:"tab-blue__nav__prev",style:{display:"none"}},null,-1)),e.createElementVNode("ul",{class:"tab-blue__list px-4",id:g.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(G,q)=>(e.openBlock(),e.createElementBlock("li",{id:G.id,key:G.id,class:"tab-blue__list__item",ref_for:!0,ref:O=>o(O,q),onClick:O=>f(G.id)},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-blue__btn",{"tab-blue__btn--active":m.value===G.id}])},e.toDisplayString(G.name),3)],8,mO))),128)),e.createElementVNode("span",{class:"tab-blue__strip",style:e.normalizeStyle(S.value)},null,4)],8,uO),A[8]||(A[8]=e.createElementVNode("div",{class:"tab-blue__nav__next",style:{display:"none"}},null,-1))]),A[9]||(A[9]=e.createElementVNode("div",{class:"tab-blue__filter mt-5 mt-md-3",style:{"--width":"338px"}},null,-1))])],4)]),e.createElementVNode("div",pO,[e.createElementVNode("div",hO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(G,q)=>(e.openBlock(),e.createElementBlock("div",{key:G.id,class:"page-item"},[e.createElementVNode("div",fO,[e.createVNode(Co,{type:G.type,"props-data":{modelValue:G,isPreview:n.isPreview},onHandleDelete:A[0]||(A[0]=O=>V(O,w.value)),onHandleCopy:A[1]||(A[1]=O=>T(O)),onHandlePaste:O=>k(O,w.value,q)},null,8,["type","props-data","onHandlePaste"])])]))),128))])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:C.value,"onUpdate:show":A[2]||(A[2]=G=>C.value=G),onHandleEdit:A[3]||(A[3]=G=>h.value=!0),onHandleDelete:V,onHandleCopy:T,onHandlePaste:k},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(lO,{key:0,show:h.value,"onUpdate:show":A[4]||(A[4]=G=>h.value=G),data:n.modelValue},null,8,["show","data"]))],36)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-32b1fd78"]]),gO=Object.freeze(Object.defineProperty({__proto__:null,default:ud},Symbol.toStringTag,{value:"Module"})),yO={class:"tab__wrapper"},_O=["onClick"],wO=["id","onClick"],bO=J({__name:"TabTimeLineTab",props:{list:{type:Array,default:()=>null},currentIdx:{type:Number,default:()=>0},isFixed:{type:Boolean,default:()=>!1}},emits:["updateIdx"],setup(n,{emit:t}){const o=n,a=t,{proxy:i}=e.getCurrentInstance(),s=e.ref(null),l=e.ref(null),r=e.ref(null),c=e.ref(0),u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(0),p=e.computed(()=>o.isFixed),f=e.computed({get:()=>o.currentIdx,set:k=>a("updateIdx",k)}),h=e.computed(()=>g.value>30),C=e.computed(()=>m.value>d.value),w=e.computed(()=>{var k;return(k=o.list)!=null&&k.length?o.list.length-1:0}),x=e.computed(()=>{var S;const k=(S=o.list)==null?void 0:S.length;return`${f.value/(k-1)*100}%`}),y=()=>{var A;const k=(A=r.value)==null?void 0:A[f.value],S=(k==null?void 0:k.clientWidth)/2,D=i.$_vsWidth/2;c.value=(k==null?void 0:k.getBoundingClientRect().right)-S;const N=l.value;N&&(N.scrollLeft-=D-c.value)},b=()=>{var k;u.value=(k=l.value)==null?void 0:k.scrollWidth},V=k=>{l.value.scrollLeft=g.value+k},T=()=>{var D,N;g.value=(D=l.value)==null?void 0:D.scrollLeft;const k=(N=r.value)==null?void 0:N[r.value.length-1];m.value=k==null?void 0:k.getBoundingClientRect().right;const S=s.value;d.value=S==null?void 0:S.getBoundingClientRect().right};return e.watch(f,()=>{y()}),e.watch(p,()=>{b(),T(),e.nextTick(y),setTimeout(b,300)}),e.nextTick(()=>{y(),b(),T()}),(k,S)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-timeline-tab",ref_key:"wrapper",ref:s},[e.createElementVNode("div",yO,[e.createElementVNode("div",{class:e.normalizeClass(["tab__nav",{"is-smaller":p.value}])},[e.withDirectives(e.createElementVNode("div",{class:"nav__prev",onClick:S[0]||(S[0]=D=>V(-100))},null,512),[[e.vShow,h.value]]),e.createElementVNode("ul",{class:"tab__list",ref_key:"listRef",ref:l,onScroll:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(D,N)=>(e.openBlock(),e.createElementBlock("li",{key:D.key,class:e.normalizeClass(["tab__item",{"is-active":f.value>=N}])},[e.createElementVNode("div",{class:e.normalizeClass(["tab__dot",{"is-active":f.value==N}]),onClick:A=>f.value=N},null,10,_O),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab__btn tx-body",{"is-active":f.value==N}]),id:D.id,ref_for:!0,ref_key:"btn",ref:r,onClick:A=>f.value=N},e.toDisplayString(D.name),11,wO)],2))),128)),e.createElementVNode("div",{class:e.normalizeClass(["progress",{"is-smaller":p.value}]),style:e.normalizeStyle([{"--progress-width":`${u.value}px`,"--count":w.value,"--bar-width":x.value}])},[...S[2]||(S[2]=[e.createElementVNode("div",{class:"progress-bar",role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":"100"},null,-1)])],6)],544),e.withDirectives(e.createElementVNode("div",{class:"nav__next",onClick:S[1]||(S[1]=D=>V(100))},null,512),[[e.vShow,C.value]])],2)])],512))}},[["__scopeId","data-v-4a77a08e"]]),CO=["id"],VO=["id"],xO=["data-bs-target","aria-expanded","aria-controls","onClick"],kO={class:"d-flex align-items-center"},EO={class:"py-2 text-blue-dark"},TO=["id","aria-labelledby","data-bs-parent"],NO={class:"acc-content"},SO=J({__name:"TabTimelineAccordion",props:{modelValue:{type:Object,default:()=>null}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a;console.log("$_vsWidth",a);const c=t,u=e.ref(null),g=e.ref([]),m=e.ref(null);e.ref(null);const d=(A,$)=>{A&&(g.value[$]=A)},p=e.ref(Date.now());e.ref(!1);const f=e.ref(0),h=e.ref(!1);e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.classes)??null}),e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.style)??null});const C=e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.data)??[]}),w=A=>{setTimeout(S,300);const $=g.value[A];setTimeout(()=>{k($)},400)},x=(A,$)=>{c("handleDelete",A||o.modelValue.id,$)},y=A=>{c("handleCopy",A||o.modelValue)},b=(A,$)=>{c("handlePaste",A,$)},V=(A,$)=>+window.getComputedStyle(document.body).getPropertyValue(A).split($)[0],T=()=>{const A=V("--header-height-calc","px"),$=V("--alert-height","px");return A+$},k=A=>{const $=T(),I=ri(A).y-$;window.scroll({top:I,left:0,behavior:"smooth"})},S=()=>{u.value&&(f.value=u.value.getBoundingClientRect().height)},D=()=>{const A=u.value,$=A.getBoundingClientRect().top,I=A.getBoundingClientRect().bottom,U=T()+40;h.value=$<U&&I>U},N=()=>{const A=m.value;console.log("========== checkBtnFixed",A,g.value),A&&A.forEach(($,I)=>{const U=g.value[I],Y=ri(U).y,G=ri(U).y+U.clientHeight,q=s.value+T()+80,O={top:Y,bottom:G};q<O.top?($.classList.add("is-btn-top"),$.classList.remove("is-btn-fixed"),$.classList.remove("is-btn-bottom")):q>O.bottom?($.classList.add("is-btn-bottom"),$.classList.remove("is-btn-fixed"),$.classList.remove("is-btn-top")):($.classList.add("is-btn-fixed"),$.classList.remove("is-btn-top"),$.classList.remove("is-btn-bottom"))})};return e.watch(()=>s==null?void 0:s.value,()=>{console.log("========== $_vsScrollY.value"),D(),N()}),(A,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-timeline-accordion",{"is-in-front":h.value}])},[e.createElementVNode("div",{class:"acc__wrapper",ref_key:"wrapper",ref:u,style:e.normalizeStyle({minHeight:`${f.value}px`})},[e.createElementVNode("ul",{class:"acc__list accordion",id:`acc-parent-${p.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(I,U)=>(e.openBlock(),e.createElementBlock("li",{class:"acc__item",key:I.key,ref_for:!0,ref:Y=>d(Y,U)},[e.createElementVNode("div",{class:"acc-header",id:`acc-${p.value}-${I.key}`},[e.createElementVNode("button",{class:e.normalizeClass(["acc-button",{collapsed:U!==0}]),type:"button",ref_for:!0,ref_key:"timeLine",ref:m,"data-bs-toggle":"collapse","data-bs-target":`#acc-${p.value}-collapse-${I.key}`,"aria-expanded":U==0,"aria-controls":`#acc-${p.value}-collapse-${I.key}`,onClick:Y=>w(U)},[e.createElementVNode("div",kO,[e.createElementVNode("div",{class:e.normalizeClass(["acc-button__line",{"is-first":U==0,"is-last":U==C.value.length-1}])},[...$[3]||($[3]=[e.createElementVNode("div",{class:"acc-button__dot"},null,-1)])],2),e.createElementVNode("h6",EO,e.toDisplayString(I.name),1)]),$[4]||($[4]=e.createElementVNode("span",{class:"acc-button__icon i"},null,-1))],10,xO)],8,VO),e.createElementVNode("div",{id:`acc-${p.value}-collapse-${I.key}`,class:e.normalizeClass(["acc-body collapse",{show:U==0}]),"aria-labelledby":`acc-${p.value}-${I.key}`,"data-bs-parent":`#acc-parent-${p.value}`},[e.createElementVNode("div",NO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.componentsDataJson,(Y,G)=>(e.openBlock(),e.createElementBlock("div",{key:Y.id,class:"page-item"},[e.createVNode(Co,{type:Y.type,"props-data":{modelValue:Y,isPreview:!1},onHandleDelete:$[0]||($[0]=q=>x(q,A.pageJsonData)),onHandleCopy:$[1]||($[1]=q=>y(q)),onHandlePaste:$[2]||($[2]=q=>b(q,A.pageJsonData))},null,8,["type","props-data"])]))),128))])],10,TO)]))),128))],8,CO)],4)],2))}},[["__scopeId","data-v-09678a58"]]),BO={class:"setting-content"},PO={class:"setting-header flex items-center"},DO={class:"setting-header flex items-center"},$O={class:"setting-body"},LO={class:"setting-toolbar"},AO={class:"tools"},IO={class:"setting-item"},vO={class:"item-header"},MO={class:"btn-group"},OO={key:0,class:"drag-handle"},UO={class:"components-content"},RO=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=m=>{l.data.data.push({id:F(),key:F(),name:"New Tab",componentsDataJson:[]})},g=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("a-option"),h=e.resolveComponent("a-select"),C=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),x=e.resolveComponent("icon-drag-arrow"),y=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",BO,[e.createElementVNode("div",PO,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=T=>n.data.onlyShowPc=T)},null,8,["modelValue"])]),e.createElementVNode("div",DO,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(h,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=T=>n.data.width=T),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:""},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(f,{value:"small"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(f,{value:"middle"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(f,{value:"max"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",$O,[e.createElementVNode("div",LO,[d[16]||(d[16]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",AO,[e.createVNode(w,{type:"primary",onClick:d[2]||(d[2]=T=>u())},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[d[14]||(d[14]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(w,{type:"primary",onClick:d[3]||(d[3]=T=>u())},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",IO,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[5]||(d[5]=T=>n.data.data=T),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[6]||(d[6]=T=>a.value=!0),onEnd:d[7]||(d[7]=T=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:T})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:T.id},[e.createElementVNode("div",vO,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(T.name),1),e.createElementVNode("span",null,e.toDisplayString(T.key),1)]),e.createElementVNode("div",MO,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",OO,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:k=>g(T.id)},null,8,["onClick"]),e.createVNode(w,{size:"mini",type:"primary",onClick:d[4]||(d[4]=k=>u())},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[18]||(d[18]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(b,{modelValue:T.name,"onUpdate:modelValue":k=>T.name=k,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[19]||(d[19]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(b,{modelValue:T.key,"onUpdate:modelValue":k=>T.key=k,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[20]||(d[20]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",UO,[e.createVNode(Fa,{data:T.componentsDataJson,onUpdate:k=>T.componentsDataJson=k},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-e62b8371"]]),FO={class:"tab-default__content"},HO={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},jO={class:"component-wrapper"},zO={class:"tab-timeline__mobile"},md=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=e.ref(null),g=e.ref(null),m=e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.data}),d=e.ref(0),p=e.ref(!1),f=e.ref(!1),h=e.ref(!1),C=e.computed(()=>{var Y;return((Y=r.modelValue)==null?void 0:Y.classes)??null}),w=e.computed(()=>{var Y;return((Y=r.modelValue)==null?void 0:Y.style)??null});e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.width});const x=e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.id}),y=e.computed(()=>{var Y;return(Y=r.modelValue)!=null&&Y.bgColor?r.modelValue.bgColor:a.value>=768?"bg-neutral-lightest":null}),b=e.computed(()=>{var G;if(!((G=r.modelValue)!=null&&G.data)||!Array.isArray(r.modelValue.data))return[];const Y=r.modelValue.data[d.value];return Y?Y.componentsDataJson||[]:[]}),V=()=>{var G;if(r.modelValue&&r.modelValue.data)return;const Y={id:((G=r.modelValue)==null?void 0:G.id)||F(),type:"TabTimeLine",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",data:[{id:F(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:F(),key:"2222",name:"tab2",componentsDataJson:[]},{id:F(),key:"33333",name:"tab3",componentsDataJson:[]}]};c("update:modelValue",Y),d.value=0},T=e.computed(()=>{var Y;return r.isPreview?!((Y=r.modelValue)!=null&&Y.onlyShowPc)||!Te():!0}),k=(Y,G)=>{debugger;c("handleDelete",Y||r.modelValue.id,G)},S=Y=>{debugger;c("handleCopy",Y||r.modelValue)},D=(Y,G)=>{debugger;c("handlePaste",Y,G)},N=()=>{var H,R;if(!g.value||!u.value)return;const Y=g.value.getBoundingClientRect().top,G=u.value.getBoundingClientRect().top,q=u.value.getBoundingClientRect().bottom,O=+((R=(H=window.getComputedStyle(document.body))==null?void 0:H.getPropertyValue("--header-height-calc"))==null?void 0:R.split("px")[0])||72;if(G>O||q<O){p.value=!1;return}Y<=O&&(p.value=!0)},A=()=>{if(a.value<=768)return;const Y=u.value,q=ri(Y).y-150;window.scroll({top:q,left:0,behavior:"smooth"})},$=e.ref(""),I=()=>{var G;const Y=(G=m.value)==null?void 0:G.findIndex(q=>q.key==$.value);Y>-1?d.value=Y:d.value=0},U=Y=>{d.value=Y,$.value=m.value[Y].key};return e.watch(()=>i.value,()=>{N()}),e.watch(d,()=>{A()}),V(),e.onMounted(()=>{I()}),(Y,G)=>{var q,O;return T.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tab-timeline",C.value]),ref_key:"wrapper",ref:u,style:e.normalizeStyle(w.value),onMouseover:G[6]||(G[6]=H=>h.value=!0),onMouseout:G[7]||(G[7]=H=>h.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__wrapper",[(q=n.modelValue)!=null&&q.width?`container-content-${(O=n.modelValue)==null?void 0:O.width}`:"container-content"]])},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__desktop",[y.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__hold",{"is-fixed":p.value}])},[e.createElementVNode("div",{class:"tab-timeline__nav",ref_key:"tab",ref:g},[e.createVNode(bO,{list:m.value,isFixed:p.value,currentIdx:d.value,onUpdateIdx:U,componentKey:x.value},null,8,["list","isFixed","currentIdx","componentKey"])],512)],2),e.createElementVNode("div",FO,[e.createElementVNode("div",HO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(H,R)=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:"page-item"},[e.createElementVNode("div",jO,[e.createVNode(Co,{type:H.type,"props-data":{modelValue:H,isPreview:n.isPreview},onHandleDelete:G[0]||(G[0]=M=>k(M,b.value)),onHandleCopy:G[1]||(G[1]=M=>S(M)),onHandlePaste:G[2]||(G[2]=M=>D(M,b.value))},null,8,["type","props-data"])])]))),128))])])],2),[[e.vShow,e.unref(a)>=768]]),e.withDirectives(e.createElementVNode("div",zO,[e.createVNode(SO,{modelValue:n.modelValue,componentKey:x.value},null,8,["modelValue","componentKey"])],512),[[e.vShow,e.unref(a)<768]]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:h.value,"onUpdate:show":G[3]||(G[3]=H=>h.value=H),onHandleEdit:G[4]||(G[4]=H=>f.value=!0),onHandleDelete:k,onHandleCopy:S,onHandlePaste:D},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(RO,{key:0,show:f.value,"onUpdate:show":G[5]||(G[5]=H=>f.value=H),data:n.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}}},[["__scopeId","data-v-09323fe0"]]),qO=Object.freeze(Object.defineProperty({__proto__:null,default:md},Symbol.toStringTag,{value:"Module"})),WO={class:"setting-content"},GO={class:"setting-header flex items-center"},XO={class:"setting-header flex items-center"},YO={class:"setting-header flex items-center"},KO={class:"setting-header flex items-center"},QO={class:"setting-body"},ZO={class:"setting-item"},JO={class:"btn-group"},eU={key:0,class:"drag-handle"},tU=["src"],nU={class:"item-uplaod flex items-center"},oU=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"circles",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=g=>g&&g.length>1,l=t,r=()=>{l("update:show",!1)},c=g=>{g.push({id:F(),title:"这里是标题",subtitle:"这里是副标题",subtitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""})},u=(g,m)=>{g.splice(g.findIndex(d=>d.id===m),1)};return(g,m)=>{const d=e.resolveComponent("a-switch"),p=e.resolveComponent("a-option"),f=e.resolveComponent("a-select"),h=e.resolveComponent("a-input"),C=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),x=e.resolveComponent("icon-plus"),y=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(y,{width:500,visible:n.show,footer:!1,onCancel:r,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",WO,[e.createElementVNode("div",GO,[m[8]||(m[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(d,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":m[0]||(m[0]=b=>n.data.onlyShowPc=b)},null,8,["modelValue"])]),e.createElementVNode("div",XO,[m[13]||(m[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(f,{modelValue:n.data.width,"onUpdate:modelValue":m[1]||(m[1]=b=>n.data.width=b),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(p,{value:""},{default:e.withCtx(()=>[...m[9]||(m[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(p,{value:"small"},{default:e.withCtx(()=>[...m[10]||(m[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(p,{value:"middle"},{default:e.withCtx(()=>[...m[11]||(m[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(p,{value:"max"},{default:e.withCtx(()=>[...m[12]||(m[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",YO,[m[14]||(m[14]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(h,{modelValue:n.data.colDesktop,"onUpdate:modelValue":m[2]||(m[2]=b=>n.data.colDesktop=b),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",KO,[m[15]||(m[15]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(h,{modelValue:n.data.colMobile,"onUpdate:modelValue":m[3]||(m[3]=b=>n.data.colMobile=b),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",QO,[m[22]||(m[22]=e.createElementVNode("p",{class:"item-title"},"Circles",-1)),e.createElementVNode("div",ZO,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":m[4]||(m[4]=b=>n.data.data=b),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:m[5]||(m[5]=b=>a.value=!0),onEnd:m[6]||(m[6]=b=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:b.id},[e.createElementVNode("div",JO,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",eU,[e.createVNode(C,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:V=>u(n.data.data,b.id)},null,8,["onClick"])]),m[16]||(m[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(h,{modelValue:b.title,"onUpdate:modelValue":V=>b.title=V,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[17]||(m[17]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(h,{modelValue:b.subtitle,"onUpdate:modelValue":V=>b.subtitle=V,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[18]||(m[18]=e.createElementVNode("p",{class:"item-title"},"第二个子标题",-1)),e.createVNode(h,{modelValue:b.subtitle2,"onUpdate:modelValue":V=>b.subtitle2=V,placeholder:"请输入第二个子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[19]||(m[19]=e.createElementVNode("p",{class:"item-title"},"引言",-1)),e.createVNode(h,{modelValue:b.text,"onUpdate:modelValue":V=>b.text=V,placeholder:"请输入引言","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[20]||(m[20]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:b.imgSrc},null,8,tU),e.createElementVNode("div",nU,[e.createVNode(h,{modelValue:b.imgSrc,"onUpdate:modelValue":V=>b.imgSrc=V,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:b.imgSrc,"onUpdate:modelValue":V=>b.imgSrc=V,name:`CardListCircle_${b.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(h,{class:"mt-2",modelValue:b.alt,"onUpdate:modelValue":V=>b.alt=V,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:m[7]||(m[7]=b=>c(n.data.data))},[e.createVNode(x),m[21]||(m[21]=e.createElementVNode("span",{class:"btn-text"},"添加Circle",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-059f39c9"]]),aU=["id"],iU=["data-aos-delay","data-aos-anchor"],sU={class:"card-circle"},lU={class:"circle__head"},rU={class:"circle__img img-fit"},dU=["src","alt"],cU={key:0,class:"circle__title mt-3"},uU={key:1,class:"circle__subtitle"},mU={key:2,class:"circle__subtitle"},pU={key:3,class:"circle__text mt-3"},pd=J(e.defineComponent({name:"CardListCircle",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||F(),type:"CardListCircle",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:F(),title:"这里是标题",subtitle:"这里是副标题",subtitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""},{id:F(),title:"这里是标题",subTitle:"这里是副标题",subTitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""}]};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=m=>{a("handlePaste",m)};return i(),(m,d)=>{var p,f,h,C,w,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:d[2]||(d[2]=y=>l.value=!0),onMouseleave:d[3]||(d[3]=y=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(p=n.modelValue)!=null&&p.width?`container-content-${(f=n.modelValue)==null?void 0:f.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-circle",[`row-cols-${(h=n.modelValue)==null?void 0:h.colMobile}`,`row-cols-md-${(C=n.modelValue)==null?void 0:C.colDesktop}`,{"small-gap":((w=n.modelValue)==null?void 0:w.colDesktop)>4}]]),id:`card-list-${m.timestamp}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((x=n.modelValue)==null?void 0:x.data,(y,b)=>{var V;return e.openBlock(),e.createElementBlock("div",{class:"col",key:y.id,"data-aos":"fade-up","data-aos-delay":b*100,"data-aos-anchor":`#card-list-${m.timestamp}`},[e.createElementVNode("div",sU,[e.createElementVNode("div",lU,[e.createElementVNode("div",rU,[e.createElementVNode("img",{src:y.imgSrc,alt:y.alt},null,8,dU)])]),e.createElementVNode("div",{class:e.normalizeClass(["circle__body",{"is-single-column":((V=n.modelValue)==null?void 0:V.colMobile)===1}])},[y.title?(e.openBlock(),e.createElementBlock("h4",cU,e.toDisplayString(y.title),1)):e.createCommentVNode("",!0),y.subtitle?(e.openBlock(),e.createElementBlock("div",uU,e.toDisplayString(y.subtitle),1)):e.createCommentVNode("",!0),y.subtitle2?(e.openBlock(),e.createElementBlock("div",mU,e.toDisplayString(y.subtitle2),1)):e.createCommentVNode("",!0),y.text?(e.openBlock(),e.createElementBlock("div",pU,e.toDisplayString(y.text),1)):e.createCommentVNode("",!0)],2)])],8,iU)}),128))],10,aU)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=y=>l.value=y),onHandleEdit:d[1]||(d[1]=y=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oU,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=y=>r.value=y),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-78d7177c"]]),hU=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),fU={class:"setting-content"},gU={class:"setting-header flex items-center"},yU={class:"setting-header flex items-center"},_U={class:"setting-header flex items-center"},wU={class:"setting-header flex items-center"},bU={class:"setting-body"},CU={class:"setting-item"},VU={class:"btn-group"},xU={key:0,class:"drag-handle"},kU=["src"],EU={class:"item-uplaod flex items-center"},TU={class:"btn-group"},NU={key:0,class:"drag-handle"},SU={class:"item-action flex items-center"},BU=["onClick"],PU=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"programmes",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=f=>f&&f.length>1,c=t,u=()=>{c("update:show",!1)},g=f=>{f.push({id:F(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]})},m=(f,h)=>{f.splice(f.findIndex(C=>C.id===h),1)},d=f=>{f.push({id:F(),type:"",text:"按钮",url:"",isExternal:!1})},p=(f,h)=>{f.splice(f.findIndex(C=>C.id===h),1)};return(f,h)=>{const C=e.resolveComponent("a-switch"),w=e.resolveComponent("a-option"),x=e.resolveComponent("a-select"),y=e.resolveComponent("a-input"),b=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),T=e.resolveComponent("a-button"),k=e.resolveComponent("a-checkbox"),S=e.resolveComponent("icon-plus"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",fU,[e.createElementVNode("div",gU,[h[10]||(h[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(C,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),e.createElementVNode("div",yU,[h[15]||(h[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(x,{modelValue:n.data.width,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.width=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(w,{value:""},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(w,{value:"small"},{default:e.withCtx(()=>[...h[12]||(h[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(w,{value:"middle"},{default:e.withCtx(()=>[...h[13]||(h[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(w,{value:"max"},{default:e.withCtx(()=>[...h[14]||(h[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",_U,[h[16]||(h[16]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(y,{modelValue:n.data.colDesktop,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.colDesktop=N),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",wU,[h[17]||(h[17]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(y,{modelValue:n.data.colMobile,"onUpdate:modelValue":h[3]||(h[3]=N=>n.data.colMobile=N),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",bU,[h[30]||(h[30]=e.createElementVNode("p",{class:"item-title"},"Programme",-1)),e.createElementVNode("div",CU,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":h[6]||(h[6]=N=>n.data.data=N),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!r(n.data.data),onStart:h[7]||(h[7]=N=>i.value=!0),onEnd:h[8]||(h[8]=N=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:N.id},[e.createElementVNode("div",VU,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",xU,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:A=>m(n.data.data,N.id)},null,8,["onClick"])]),h[24]||(h[24]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(y,{modelValue:N.title,"onUpdate:modelValue":A=>N.title=A,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[25]||(h[25]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(y,{modelValue:N.subtitle,"onUpdate:modelValue":A=>N.subtitle=A,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[26]||(h[26]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:N.description,"onUpdate:modelValue":A=>N.description=A,name:`CardListProgramme_editor_${N.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),h[27]||(h[27]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.imgSrc},null,8,kU),e.createElementVNode("div",EU,[e.createVNode(y,{modelValue:N.imgSrc,"onUpdate:modelValue":A=>N.imgSrc=A,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:N.imgSrc,"onUpdate:modelValue":A=>N.imgSrc=A,name:`CardListProgramme_${N.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(y,{class:"mt-2",modelValue:N.alt,"onUpdate:modelValue":A=>N.alt=A,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[28]||(h[28]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:N.buttons,"onUpdate:modelValue":A=>N.buttons=A,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!r(N.buttons),onStart:h[4]||(h[4]=A=>i.value=!0),onEnd:h[5]||(h[5]=A=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:A})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item school-button",{"sortable-disabled":!r(N.buttons)}]),key:A.id},[e.createElementVNode("div",TU,[r(N.buttons)?(e.openBlock(),e.createElementBlock("div",NU,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:$=>p(N.buttons,A.id)},null,8,["onClick"])]),e.createVNode(T,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.text),1)]),_:2},1024),e.createElementVNode("div",SU,[e.createVNode(y,{class:"action-text",modelValue:A.text,"onUpdate:modelValue":$=>A.text=$,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(y,{modelValue:A.url,"onUpdate:modelValue":$=>A.url=$,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(x,{modelValue:A.type,"onUpdate:modelValue":$=>A.type=$,placeholder:"请选择按钮类型"},{default:e.withCtx(()=>[e.createVNode(w,{value:""},{default:e.withCtx(()=>[...h[18]||(h[18]=[e.createTextVNode("默认按钮",-1)])]),_:1}),e.createVNode(w,{value:"white"},{default:e.withCtx(()=>[...h[19]||(h[19]=[e.createTextVNode("白色按钮",-1)])]),_:1}),e.createVNode(w,{value:"light"},{default:e.withCtx(()=>[...h[20]||(h[20]=[e.createTextVNode("亮色按钮",-1)])]),_:1}),e.createVNode(w,{value:"blue"},{default:e.withCtx(()=>[...h[21]||(h[21]=[e.createTextVNode("蓝色按钮",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(k,{modelValue:A.isExternal,"onUpdate:modelValue":$=>A.isExternal=$},{default:e.withCtx(()=>[...h[22]||(h[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:A=>d(N.buttons)},[e.createVNode(S),h[23]||(h[23]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,BU)],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:h[9]||(h[9]=N=>g(n.data.data))},[e.createVNode(S),h[29]||(h[29]=e.createElementVNode("span",{class:"btn-text"},"添加Programme",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-f720c331"]]),DU=["id"],$U=["data-aos-delay","data-aos-anchor"],LU={class:"card-programme"},AU={class:"card-image"},IU=["src","alt"],vU={class:"card-body"},MU=["innerHTML"],OU={class:"card-programme__buttons"},UU=["onClick"],RU={class:"btn-primary__text"},hd=J(e.defineComponent({name:"CardListProgramme",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"CardListProgramme",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:F(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1}]},{id:F(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]}]};a("update:modelValue",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=p=>{a("handlePaste",p)},m=p=>{!p||!o.isPreview||(p.startsWith("http")?typeof window<"u"&&window.open(p,"_blank"):a("handleClick",p))};i();const d=e.ref(Date.now());return(p,f)=>{var h,C,w,x,y,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:f[2]||(f[2]=V=>l.value=!0),onMouseleave:f[3]||(f[3]=V=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(h=n.modelValue)!=null&&h.width?`container-content-${(C=n.modelValue)==null?void 0:C.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-programme",[`row-cols-${(w=n.modelValue)==null?void 0:w.colMobile}`,`row-cols-md-${(x=n.modelValue)==null?void 0:x.colDesktop}`,{"small-gap":((y=n.modelValue)==null?void 0:y.colDesktop)>4}]]),id:`card-list-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:V.id,"data-aos":"fade-up","data-aos-delay":T*100,"data-aos-anchor":`#card-list-${d.value}`},[e.createElementVNode("div",LU,[e.createElementVNode("div",AU,[e.createElementVNode("img",{src:V.imgSrc,alt:V.alt},null,8,IU)]),e.createElementVNode("div",vU,[e.withDirectives(e.createElementVNode("div",{class:"card-body__title"},e.toDisplayString(V.title),513),[[e.vShow,V.title]]),e.withDirectives(e.createElementVNode("div",{class:"card-body__subtitle"},e.toDisplayString(V.subtitle),513),[[e.vShow,V.subtitle]]),e.withDirectives(e.createElementVNode("div",{class:"card-body__description",innerHTML:V.description},null,8,MU),[[e.vShow,V.description]]),e.withDirectives(e.createElementVNode("div",OU,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.buttons,k=>(e.openBlock(),e.createElementBlock("button",{key:k.id,onClick:S=>m(k.url||""),class:e.normalizeClass(["card-programme__buttons size-normal btn-primary",[k.type?`btn-primary--${k.type}`:""]])},[e.createElementVNode("div",RU,e.toDisplayString(k.text),1),f[5]||(f[5]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,UU))),128))],512),[[e.vShow,V.buttons&&V.buttons.length>0]])]),f[6]||(f[6]=e.createElementVNode("div",{class:"card-hover-border card-hover-border--y"},null,-1)),f[7]||(f[7]=e.createElementVNode("div",{class:"card-hover-border card-hover-border--x"},null,-1))])],8,$U))),128))],10,DU)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":f[0]||(f[0]=V=>l.value=V),onHandleEdit:f[1]||(f[1]=V=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PU,{key:1,show:r.value,"onUpdate:show":f[4]||(f[4]=V=>r.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-2a9f09d9"]]),FU=Object.freeze(Object.defineProperty({__proto__:null,default:hd},Symbol.toStringTag,{value:"Module"})),HU={class:"setting-content"},jU={class:"setting-header flex items-center"},zU={class:"setting-header flex items-center"},qU={class:"setting-header flex items-center"},WU={class:"setting-header flex items-center"},GU={class:"setting-body"},XU={class:"setting-item"},YU={class:"btn-group"},KU={key:0,class:"drag-handle"},QU=["src"],ZU={class:"item-uplaod flex items-center"},JU={class:"btn-group"},eR={key:0,class:"drag-handle"},tR={class:"item-action flex items-center"},nR=["onClick"],oR=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"schools",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=p=>p&&p.length>1,r=t,c=()=>{r("update:show",!1)},u=p=>{p.push({id:F(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]})},g=(p,f)=>{p.splice(p.findIndex(h=>h.id===f),1)},m=p=>{p.push({id:F(),type:"",text:"按钮",url:"",isExternal:!1})},d=(p,f)=>{p.splice(p.findIndex(h=>h.id===f),1)};return(p,f)=>{const h=e.resolveComponent("a-switch"),C=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),x=e.resolveComponent("a-input"),y=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-button"),T=e.resolveComponent("a-checkbox"),k=e.resolveComponent("icon-plus"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",HU,[e.createElementVNode("div",jU,[f[10]||(f[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":f[0]||(f[0]=D=>n.data.onlyShowPc=D)},null,8,["modelValue"])]),e.createElementVNode("div",zU,[f[15]||(f[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(w,{modelValue:n.data.width,"onUpdate:modelValue":f[1]||(f[1]=D=>n.data.width=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...f[11]||(f[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...f[12]||(f[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...f[13]||(f[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...f[14]||(f[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",qU,[f[16]||(f[16]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(x,{modelValue:n.data.colDesktop,"onUpdate:modelValue":f[2]||(f[2]=D=>n.data.colDesktop=D),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",WU,[f[17]||(f[17]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(x,{modelValue:n.data.colMobile,"onUpdate:modelValue":f[3]||(f[3]=D=>n.data.colMobile=D),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",GU,[f[29]||(f[29]=e.createElementVNode("p",{class:"item-title"},"Programme",-1)),e.createElementVNode("div",XU,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":f[6]||(f[6]=D=>n.data.data=D),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.data),onStart:f[7]||(f[7]=D=>a.value=!0),onEnd:f[8]||(f[8]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:D.id},[e.createElementVNode("div",YU,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",KU,[e.createVNode(y,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:N=>g(n.data.data,D.id)},null,8,["onClick"])]),f[24]||(f[24]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(x,{modelValue:D.title,"onUpdate:modelValue":N=>D.title=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[25]||(f[25]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(x,{modelValue:D.text,"onUpdate:modelValue":N=>D.text=N,placeholder:"请输入内容","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[26]||(f[26]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:D.imgSrc},null,8,QU),e.createElementVNode("div",ZU,[e.createVNode(x,{modelValue:D.imgSrc,"onUpdate:modelValue":N=>D.imgSrc=N,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:D.imgSrc,"onUpdate:modelValue":N=>D.imgSrc=N,name:`CardListProgramme_${D.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(x,{class:"mt-2",modelValue:D.alt,"onUpdate:modelValue":N=>D.alt=N,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[27]||(f[27]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:D.buttons,"onUpdate:modelValue":N=>D.buttons=N,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(D.buttons),onStart:f[4]||(f[4]=N=>a.value=!0),onEnd:f[5]||(f[5]=N=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item school-button",{"sortable-disabled":!l(D.buttons)}]),key:N.id},[e.createElementVNode("div",JU,[l(D.buttons)?(e.openBlock(),e.createElementBlock("div",eR,[e.createVNode(y,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:A=>d(D.buttons,N.id)},null,8,["onClick"])]),e.createVNode(V,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.text),1)]),_:2},1024),e.createElementVNode("div",tR,[e.createVNode(x,{class:"action-text",modelValue:N.text,"onUpdate:modelValue":A=>N.text=A,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(x,{modelValue:N.url,"onUpdate:modelValue":A=>N.url=A,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(w,{modelValue:N.type,"onUpdate:modelValue":A=>N.type=A,placeholder:"请选择按钮类型"},{default:e.withCtx(()=>[e.createVNode(C,{value:""},{default:e.withCtx(()=>[...f[18]||(f[18]=[e.createTextVNode("默认按钮",-1)])]),_:1}),e.createVNode(C,{value:"white"},{default:e.withCtx(()=>[...f[19]||(f[19]=[e.createTextVNode("白色按钮",-1)])]),_:1}),e.createVNode(C,{value:"light"},{default:e.withCtx(()=>[...f[20]||(f[20]=[e.createTextVNode("亮色按钮",-1)])]),_:1}),e.createVNode(C,{value:"blue"},{default:e.withCtx(()=>[...f[21]||(f[21]=[e.createTextVNode("蓝色按钮",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(T,{modelValue:N.isExternal,"onUpdate:modelValue":A=>N.isExternal=A},{default:e.withCtx(()=>[...f[22]||(f[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:N=>m(D.buttons)},[e.createVNode(k),f[23]||(f[23]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,nR)],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:f[9]||(f[9]=D=>u(n.data.data))},[e.createVNode(k),f[28]||(f[28]=e.createElementVNode("span",{class:"btn-text"},"添加School",-1))])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-f57ffd0f"]]),aR=["id"],iR=["data-aos-delay","data-aos-anchor"],sR={class:"card-school"},lR={class:"school__head"},rR={class:"school__img img-fit"},dR=["src","alt"],cR={class:"school__body"},uR={key:0,class:"school__title"},mR=["innerHTML"],pR={key:2,class:"contact__link mt-3"},hR=["onClick"],fR={class:"btn-primary__text"},fd=J(e.defineComponent({name:"CardListSchool",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"CardListSchool",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:F(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:F(),type:"",text:"按钮名称",url:"",isExternal:!1}]},{id:F(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]}]};a("update:modelValue",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=e.ref(!1),r=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},g=p=>{a("handlePaste",p)},m=p=>{!p||!o.isPreview||(p.startsWith("http")?typeof window<"u"&&window.open(p,"_blank"):a("handleClick",p))};i();const d=e.ref(Date.now());return(p,f)=>{var h,C,w,x,y,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:f[2]||(f[2]=V=>l.value=!0),onMouseleave:f[3]||(f[3]=V=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(h=n.modelValue)!=null&&h.width?`container-content-${(C=n.modelValue)==null?void 0:C.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-school",[`row-cols-${(w=n.modelValue)==null?void 0:w.colMobile}`,`row-cols-md-${(x=n.modelValue)==null?void 0:x.colDesktop}`,{"small-gap":((y=n.modelValue)==null?void 0:y.colDesktop)>4}]]),id:`card-list-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:V.id,"data-aos":"fade-up","data-aos-delay":T*100,"data-aos-anchor":`#card-list-${d.value}`},[e.createElementVNode("div",sR,[e.createElementVNode("div",lR,[e.createElementVNode("div",rR,[e.createElementVNode("img",{src:V.imgSrc,alt:V.alt},null,8,dR)])]),e.createElementVNode("div",cR,[V.title?(e.openBlock(),e.createElementBlock("h6",uR,e.toDisplayString(V.title),1)):e.createCommentVNode("",!0),V.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"school__content",innerHTML:V.text},null,8,mR)):e.createCommentVNode("",!0),V.buttons&&V.buttons.length>0?(e.openBlock(),e.createElementBlock("div",pR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.buttons,k=>(e.openBlock(),e.createElementBlock("button",{key:k.id,onClick:S=>m(k.url||""),class:e.normalizeClass(["card-programme__buttons size-normal btn-primary",[k.type?`btn-primary--${k.type}`:""]])},[e.createElementVNode("div",fR,e.toDisplayString(k.text),1),f[5]||(f[5]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,hR))),128))])):e.createCommentVNode("",!0)])])],8,iR))),128))],10,aR)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:l.value,"onUpdate:show":f[0]||(f[0]=V=>l.value=V),onHandleEdit:f[1]||(f[1]=V=>r.value=!0),onHandleDelete:c,onHandleCopy:u,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oR,{key:1,show:r.value,"onUpdate:show":f[4]||(f[4]=V=>r.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b8adeae3"]]),gR=Object.freeze(Object.defineProperty({__proto__:null,default:fd},Symbol.toStringTag,{value:"Module"})),yR={class:"setting-content"},_R={class:"setting-header flex items-center"},wR=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",yR,[e.createElementVNode("div",_R,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),s[10]||(s[10]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[11]||(s[11]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(u,{modelValue:n.data.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[12]||(s[12]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(u,{modelValue:n.data.data.subTitle,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.subTitle=m),placeholder:"请输入副标题","allow-clear":""},null,8,["modelValue"]),s[13]||(s[13]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(u,{modelValue:n.data.data.link,"onUpdate:modelValue":s[4]||(s[4]=m=>n.data.data.link=m),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-560ffe06"]]),bR=["innerHTML"],CR={class:"d-flex"},VR=["innerHTML"],gd=J(e.defineComponent({name:"DetailLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=p=>{a("handleClick",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"DetailLink",onlyShowPc:!1,data:{width:"default",title:"这里是标题",subTitle:"这里是副标题",link:"https://www.baidu.com"}};a("update:modelValue",p)},r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return l(),(p,f)=>{var h,C,w,x,y,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"detailLink_wrap",onMouseenter:f[3]||(f[3]=V=>r.value=!0),onMouseleave:f[4]||(f[4]=V=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full",u.value])},[!((h=n.modelValue.data)!=null&&h.link)&&((C=n.modelValue.data)!=null&&C.title)?(e.openBlock(),e.createElementBlock("h6",{key:0,class:"detail-link__title",innerHTML:n.modelValue.data.title},null,8,bR)):e.createCommentVNode("",!0),(w=n.modelValue.data)!=null&&w.link&&((x=n.modelValue.data)!=null&&x.title)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:f[0]||(f[0]=V=>i(n.modelValue.data.link)),class:"nuxt-link-active detail-link__hover-underline"},e.toDisplayString((y=n.modelValue.data)==null?void 0:y.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",CR,[e.createElementVNode("div",{class:"detail-link__date",innerHTML:(b=n.modelValue.data)==null?void 0:b.subTitle},null,8,VR)])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[1]||(f[1]=V=>r.value=V),onHandleEdit:f[2]||(f[2]=V=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(wR,{key:1,show:c.value,"onUpdate:show":f[5]||(f[5]=V=>c.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b844cabd"]]),xR=Object.freeze(Object.defineProperty({__proto__:null,default:gd},Symbol.toStringTag,{value:"Module"})),kR={class:"setting-content"},ER={class:"setting-header flex items-center"},TR=["src"],NR={class:"item-uplaod flex items-center"},SR=["src"],BR={class:"item-uplaod flex items-center"},PR=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("Upload"),m=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(m,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",kR,[e.createElementVNode("div",ER,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=d=>n.data.onlyShowPc=d)},null,8,["modelValue"])]),s[18]||(s[18]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=d=>n.data.data.width=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[11]||(s[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[19]||(s[19]=e.createElementVNode("p",{class:"item-title"},"视频类型",-1)),e.createVNode(c,{modelValue:n.data.data.type,"onUpdate:modelValue":s[2]||(s[2]=d=>n.data.data.type=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"inner"},{default:e.withCtx(()=>[...s[12]||(s[12]=[e.createTextVNode("inner",-1)])]),_:1}),e.createVNode(r,{value:"youtube"},{default:e.withCtx(()=>[...s[13]||(s[13]=[e.createTextVNode("youtube",-1)])]),_:1}),e.createVNode(r,{value:"bilibili"},{default:e.withCtx(()=>[...s[14]||(s[14]=[e.createTextVNode("bilibili",-1)])]),_:1}),e.createVNode(r,{value:"youku"},{default:e.withCtx(()=>[...s[15]||(s[15]=[e.createTextVNode("youku",-1)])]),_:1}),e.createVNode(r,{value:"qq"},{default:e.withCtx(()=>[...s[16]||(s[16]=[e.createTextVNode("qq",-1)])]),_:1}),e.createVNode(r,{value:"facebook"},{default:e.withCtx(()=>[...s[17]||(s[17]=[e.createTextVNode("facebook",-1)])]),_:1})]),_:1},8,["modelValue"]),s[20]||(s[20]=e.createElementVNode("p",{class:"item-title"},"视频地址",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.videoSrc},null,8,TR),e.createElementVNode("div",NR,[e.createVNode(u,{modelValue:n.data.data.videoSrc,"onUpdate:modelValue":s[3]||(s[3]=d=>n.data.data.videoSrc=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(g,{modelValue:n.data.data.videoSrc,"onUpdate:modelValue":s[4]||(s[4]=d=>n.data.data.videoSrc=d),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),s[21]||(s[21]=e.createElementVNode("p",{class:"item-title"},"视频封面图",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.videoThumbnail},null,8,SR),e.createElementVNode("div",BR,[e.createVNode(u,{modelValue:n.data.data.videoThumbnail,"onUpdate:modelValue":s[5]||(s[5]=d=>n.data.data.videoThumbnail=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(g,{modelValue:n.data.data.videoThumbnail,"onUpdate:modelValue":s[6]||(s[6]=d=>n.data.data.videoThumbnail=d),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-b7a746d2"]]);var Ms;typeof window<"u"?Ms=window:typeof ca<"u"?Ms=ca:typeof self<"u"?Ms=self:Ms={};var yd=Ms;const K=Ua(yd),DR=Yh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var rf=typeof ca<"u"?ca:typeof window<"u"?window:{},$R=DR,Os;typeof document<"u"?Os=document:(Os=rf["__GLOBAL_DOCUMENT_CACHE@4"],Os||(Os=rf["__GLOBAL_DOCUMENT_CACHE@4"]=$R));var df=Os;const fe=Ua(df);var Du={exports:{}};function Et(){return Et=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},Et.apply(null,arguments)}const LR=Yh(Object.freeze(Object.defineProperty({__proto__:null,get default(){return Et}},Symbol.toStringTag,{value:"Module"})));var AR=vR,IR=Object.prototype.toString;function vR(n){if(!n)return!1;var t=IR.call(n);return t==="[object Function]"||typeof n=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)}function MR(n,t){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o)return(o=o.call(n)).next.bind(o);if(Array.isArray(n)||(o=OR(n))||t){o&&(n=o);var a=0;return function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
317
317
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OR(n,t){if(n){if(typeof n=="string")return cf(n,t);var o=Object.prototype.toString.call(n).slice(8,-1);if(o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set")return Array.from(n);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return cf(n,t)}}function cf(n,t){(t==null||t>n.length)&&(t=n.length);for(var o=0,a=new Array(t);o<t;o++)a[o]=n[o];return a}var UR=function(){function n(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=n.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(a,i){this.typeToInterceptorsMap_.has(a)||this.typeToInterceptorsMap_.set(a,new Set);var s=this.typeToInterceptorsMap_.get(a);return s.has(i)?!1:(s.add(i),!0)},t.removeInterceptor=function(a,i){var s=this.typeToInterceptorsMap_.get(a);return s&&s.has(i)?(s.delete(i),!0):!1},t.clearInterceptorsByType=function(a){var i=this.typeToInterceptorsMap_.get(a);return i?(this.typeToInterceptorsMap_.delete(a),this.typeToInterceptorsMap_.set(a,new Set),!0):!1},t.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},t.getForType=function(a){return this.typeToInterceptorsMap_.get(a)||new Set},t.execute=function(a,i){for(var s=this.getForType(a),l=MR(s),r;!(r=l()).done;){var c=r.value;try{i=c(i)}catch{}}return i},n}(),RR=UR,FR=function(){function n(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=n.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(a){this.maxAttempts_=a},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(a){this.delayFactor_=a},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(a){this.fuzzFactor_=a},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(a){this.initialDelay_=a},t.createRetry=function(a){var i=a===void 0?{}:a,s=i.maxAttempts,l=i.delayFactor,r=i.fuzzFactor,c=i.initialDelay;return new HR({maxAttempts:s||this.maxAttempts_,delayFactor:l||this.delayFactor_,fuzzFactor:r||this.fuzzFactor_,initialDelay:c||this.initialDelay_})},n}(),HR=function(){function n(o){this.maxAttempts_=o.maxAttempts,this.delayFactor_=o.delayFactor,this.fuzzFactor_=o.fuzzFactor,this.currentDelay_=o.initialDelay,this.currentAttempt_=1}var t=n.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var a=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+a},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var a=this.getCurrentMinPossibleDelay(),i=this.getCurrentMaxPossibleDelay();return a+Math.random()*(i-a)},n}(),jR=FR,zR=yd,qR=function(t,o){return o===void 0&&(o=!1),function(a,i,s){if(a){t(a);return}if(i.statusCode>=400&&i.statusCode<=599){var l=s;if(o)if(zR.TextDecoder){var r=WR(i.headers&&i.headers["content-type"]);try{l=new TextDecoder(r).decode(s)}catch{}}else l=String.fromCharCode.apply(null,new Uint8Array(s));t({cause:l});return}t(null,s)}};function WR(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(t,o){var a=o.split("="),i=a[0],s=a[1];return i.trim()==="charset"?s.trim():t},"utf-8")}var GR=qR,uf=yd,XR=LR,YR=AR,mf=RR,KR=jR;Bt.httpHandler=GR,Bt.requestInterceptorsStorage=new mf,Bt.responseInterceptorsStorage=new mf,Bt.retryManager=new KR;/**
318
318
  * @license
319
319
  * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
@@ -531,4 +531,4 @@ ${ls(t)}`),o.map&&!o.map.bytes&&(this.logger_("going to request init segment."),
531
531
  `.split("").map(n=>n.charCodeAt(0)));class HW extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class jW extends xp{constructor(t,o={}){super(t,o),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=t.featuresNativeTextTracks,this.loadVttJs=t.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return jt();const t=this.subtitlesTrack_.cues,o=t[0].startTime,a=t[t.length-1].startTime;return jt([[o,a]])}initSegmentForMap(t,o=!1){if(!t)return null;const a=_c(t);let i=this.initSegments_[a];if(o&&!i&&t.bytes){const s=M2.byteLength+t.bytes.byteLength,l=new Uint8Array(s);l.set(t.bytes),l.set(M2,t.bytes.byteLength),this.initSegments_[a]=i={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:l}}return i||t}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(t){return typeof t>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=t,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(t,o){bl(t,o,this.subtitlesTrack_)}fillBuffer_(){const t=this.chooseNextRequest_();if(t){if(this.syncController_.timestampOffsetForTimeline(t.timeline)===null){const o=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",o),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(t)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(t){for(;t&&t.segment.empty;){if(t.mediaIndex+1>=t.playlist.segments.length){t=null;break}t=this.generateSegmentInfo_({playlist:t.playlist,mediaIndex:t.mediaIndex+1,startOfSegment:t.startOfSegment+t.duration,isSyncRequest:t.isSyncRequest})}return t}stopForError(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(t,o,a){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(o.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(t){t.code===$o.TIMEOUT&&this.handleTimeout_(),t.code===$o.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(t);return}const i=this.pendingSegment_,s=a.mp4VttCues&&a.mp4VttCues.length;s&&(i.mp4VttCues=a.mp4VttCues),this.saveBandwidthRelatedStats_(i.duration,o.stats),o.key&&this.segmentKey(o.key,!0),this.state="APPENDING",this.trigger("appending");const l=i.segment;if(l.map&&(l.map.bytes=o.map.bytes),i.bytes=o.bytes,typeof K.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(t,o,a),()=>this.stopForError({message:"Error loading vtt.js"}));return}l.requested=!0;try{this.parseVTTCues_(i)}catch(r){this.stopForError({message:r.message,metadata:{errorType:oe.Error.StreamingVttParserError,error:r}});return}if(s||this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=l.duration,i.cues.forEach(r=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new K.VTTCue(r.startTime,r.endTime,r.text):r)}),EW(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(t,o){const a=t&&t.type==="vtt",i=o&&o.type==="text";a&&i&&super.handleData_(t,o)}updateTimingInfoEnd_(){}parseMp4VttCues_(t){const o=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();t.mp4VttCues.forEach(a=>{const i=a.start+o,s=a.end+o,l=new K.VTTCue(i,s,a.cueText);a.settings&&a.settings.split(" ").forEach(r=>{const c=r.split(":"),u=c[0],g=c[1];l[u]=isNaN(g)?g:Number(g)}),t.cues.push(l)})}parseVTTCues_(t){let o,a=!1;if(typeof K.WebVTT!="function")throw new HW;if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},t.mp4VttCues){this.parseMp4VttCues_(t);return}typeof K.TextDecoder=="function"?o=new K.TextDecoder("utf8"):(o=K.WebVTT.StringDecoder(),a=!0);const i=new K.WebVTT.Parser(K,K.vttjs,o);if(i.oncue=t.cues.push.bind(t.cues),i.ontimestampmap=l=>{t.timestampmap=l},i.onparsingerror=l=>{oe.log.warn("Error encountered when parsing cues: "+l.message)},t.segment.map){let l=t.segment.map.bytes;a&&(l=v2(l)),i.parse(l)}let s=t.bytes;a&&(s=v2(s)),i.parse(s),i.flush()}updateTimeMapping_(t,o,a){const i=t.segment;if(!o)return;if(!t.cues.length){i.empty=!0;return}const{MPEGTS:s,LOCAL:l}=t.timestampmap,c=s/qa.ONE_SECOND_IN_TS-l+o.mapping;if(t.cues.forEach(u=>{const g=u.endTime-u.startTime,m=this.handleRollover_(u.startTime+c,o.time);u.startTime=Math.max(m,0),u.endTime=Math.max(m+g,0)}),!a.syncInfo){const u=t.cues[0].startTime,g=t.cues[t.cues.length-1].startTime;a.syncInfo={mediaSequence:a.mediaSequence+t.mediaIndex,time:Math.min(u,g-i.duration)}}}handleRollover_(t,o){if(o===null)return t;let a=t*qa.ONE_SECOND_IN_TS;const i=o*qa.ONE_SECOND_IN_TS;let s;for(i<a?s=-8589934592:s=8589934592;Math.abs(a-i)>4294967296;)a+=s;return a/qa.ONE_SECOND_IN_TS}}const zW=function(n,t){const o=n.cues;for(let a=0;a<o.length;a++){const i=o[a];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},qW=function(n,t,o=0){if(!n.segments)return;let a=o,i;for(let s=0;s<n.segments.length;s++){const l=n.segments[s];if(i||(i=zW(t,a+l.duration/2)),i){if("cueIn"in l){i.endTime=a,i.adEndTime=a,a+=l.duration,i=null;continue}if(a<i.endTime){a+=l.duration;continue}i.endTime+=l.duration}else if("cueOut"in l&&(i=new K.VTTCue(a,a+l.duration,l.cueOut),i.adStartTime=a,i.adEndTime=a+parseFloat(l.cueOut),t.addCue(i)),"cueOutCont"in l){const[r,c]=l.cueOutCont.split("/").map(parseFloat);i=new K.VTTCue(a,a+l.duration,""),i.adStartTime=a-r,i.adEndTime=i.adStartTime+c,t.addCue(i)}a+=l.duration}};class O2{constructor({start:t,end:o,segmentIndex:a,partIndex:i=null,appended:s=!1}){this.start_=t,this.end_=o,this.segmentIndex_=a,this.partIndex_=i,this.appended_=s}isInRange(t){return t>=this.start&&t<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class WW{constructor(t,o=[]){this.segmentSyncInfo_=t,this.partsSyncInfo_=o}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(t=>t.resetAppendedStatus())}}class U2{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(t=>t.resetAppendStatus())}update(t,o){const{mediaSequence:a,segments:i}=t;if(this.isReliable_=this.isReliablePlaylist_(a,i),!!this.isReliable_)return this.updateStorage_(i,a,this.calculateBaseTime_(a,i,o))}getSyncInfoForTime(t){for(const{segmentSyncInfo:o,partsSyncInfo:a}of this.storage_.values())if(a.length){for(const i of a)if(i.isInRange(t))return i}else if(o.isInRange(t))return o;return null}getSyncInfoForMediaSequence(t){return this.storage_.get(t)}updateStorage_(t,o,a){const i=new Map;let s=`
532
532
  `,l=a,r=o;this.start_=l,t.forEach((c,u)=>{const g=this.storage_.get(r),m=l,d=m+c.duration,p=!!(g&&g.segmentSyncInfo&&g.segmentSyncInfo.isAppended),f=new O2({start:m,end:d,appended:p,segmentIndex:u});c.syncInfo=f;let h=l;const C=(c.parts||[]).map((w,x)=>{const y=h,b=h+w.duration,V=!!(g&&g.partsSyncInfo&&g.partsSyncInfo[x]&&g.partsSyncInfo[x].isAppended),T=new O2({start:y,end:b,appended:V,segmentIndex:u,partIndex:x});return h=b,s+=`Media Sequence: ${r}.${x} | Range: ${y} --> ${b} | Appended: ${V}
533
533
  `,w.syncInfo=T,T});i.set(r,new WW(f,C)),s+=`${N2(c.resolvedUri)} | Media Sequence: ${r} | Range: ${m} --> ${d} | Appended: ${p}
534
- `,r++,l=d}),this.end_=l,this.storage_=i,this.diagnostics_=s}calculateBaseTime_(t,o,a){if(!this.storage_.size)return 0;if(this.storage_.has(t))return this.storage_.get(t).segmentSyncInfo.start;const i=Math.min(...this.storage_.keys());if(t<i){const s=i-t;let l=this.storage_.get(i).segmentSyncInfo.start;for(let r=0;r<s;r++){const c=o[r];l-=c.duration}return l}return a}isReliablePlaylist_(t,o){return t!=null&&Array.isArray(o)&&o.length}}class R2 extends U2{constructor(t){super(),this.parent_=t}calculateBaseTime_(t,o,a){if(!this.storage_.size){const i=this.parent_.getSyncInfoForMediaSequence(t);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(t,o,a)}}const GW=86400,Ep=[{name:"VOD",run:(n,t,o,a,i)=>o!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(n,t,o,a,i,s)=>{const l=n.getMediaSequenceSync(s);if(!l||!l.isReliable)return null;const r=l.getSyncInfoForTime(i);return r?{time:r.start,partIndex:r.partIndex,segmentIndex:r.segmentIndex}:null}},{name:"ProgramDateTime",run:(n,t,o,a,i)=>{if(!Object.keys(n.timelineToDatetimeMappings).length)return null;let s=null,l=null;const r=rp(t);i=i||0;for(let c=0;c<r.length;c++){const u=t.endList||i===0?c:r.length-(c+1),g=r[u],m=g.segment,d=n.timelineToDatetimeMappings[m.timeline];if(!d||!m.dateTimeObject)continue;let f=m.dateTimeObject.getTime()/1e3+d;if(m.parts&&typeof g.partIndex=="number")for(let C=0;C<g.partIndex;C++)f+=m.parts[C].duration;const h=Math.abs(i-f);if(l!==null&&(h===0||l<h))break;l=h,s={time:f,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}return s}},{name:"Segment",run:(n,t,o,a,i)=>{let s=null,l=null;i=i||0;const r=rp(t);for(let c=0;c<r.length;c++){const u=t.endList||i===0?c:r.length-(c+1),g=r[u],m=g.segment,d=g.part&&g.part.start||m&&m.start;if(m.timeline===a&&typeof d<"u"){const p=Math.abs(i-d);if(l!==null&&l<p)break;(!s||l===null||l>=p)&&(l=p,s={time:d,segmentIndex:g.segmentIndex,partIndex:g.partIndex})}}return s}},{name:"Discontinuity",run:(n,t,o,a,i)=>{let s=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length){let l=null;for(let r=0;r<t.discontinuityStarts.length;r++){const c=t.discontinuityStarts[r],u=t.discontinuitySequence+r+1,g=n.discontinuities[u];if(g){const m=Math.abs(i-g.time);if(l!==null&&l<m)break;(!s||l===null||l>=m)&&(l=m,s={time:g.time,segmentIndex:c,partIndex:null})}}}return s}},{name:"Playlist",run:(n,t,o,a,i)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class XW extends oe.EventTarget{constructor(t={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const o=new U2,a=new R2(o),i=new R2(o);this.mediaSequenceStorage_={main:o,audio:a,vtt:i},this.logger_=no("SyncController")}getMediaSequenceSync(t){return this.mediaSequenceStorage_[t]||null}getSyncPoint(t,o,a,i,s){if(o!==1/0)return Ep.find(({name:c})=>c==="VOD").run(this,t,o);const l=this.runStrategies_(t,o,a,i,s);if(!l.length)return null;for(const r of l){const{syncPoint:c,strategy:u}=r,{segmentIndex:g,time:m}=c;if(g<0)continue;const d=t.segments[g],p=m,f=p+d.duration;if(this.logger_(`Strategy: ${u}. Current time: ${i}. selected segment: ${g}. Time: [${p} -> ${f}]}`),i>=p&&i<f)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(l,{key:"time",value:i})}getExpiredTime(t,o){if(!t||!t.segments)return null;const a=this.runStrategies_(t,o,t.discontinuitySequence,0);if(!a.length)return null;const i=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+gl({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(t,o,a,i,s){const l=[];for(let r=0;r<Ep.length;r++){const c=Ep[r],u=c.run(this,t,o,a,i,s);u&&(u.strategy=c.name,l.push({strategy:c.name,syncPoint:u}))}return l}selectSyncPoint_(t,o){let a=t[0].syncPoint,i=Math.abs(t[0].syncPoint[o.key]-o.value),s=t[0].strategy;for(let l=1;l<t.length;l++){const r=Math.abs(t[l].syncPoint[o.key]-o.value);r<i&&(i=r,a=t[l].syncPoint,s=t[l].strategy)}return this.logger_(`syncPoint for [${o.key}: ${o.value}] chosen with strategy [${s}]: [time:${a.time}, segmentIndex:${a.segmentIndex}`+(typeof a.partIndex=="number"?`,partIndex:${a.partIndex}`:"")+"]"),a}saveExpiredSegmentInfo(t,o){const a=o.mediaSequence-t.mediaSequence;if(a>GW){oe.log.warn(`Not saving expired segment info. Media sequence gap ${a} is too large.`);return}for(let i=a-1;i>=0;i--){const s=t.segments[i];if(s&&typeof s.start<"u"){o.syncInfo={mediaSequence:t.mediaSequence+i,time:s.start},this.logger_(`playlist refresh sync: [time:${o.syncInfo.time}, mediaSequence: ${o.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(t){if(this.timelineToDatetimeMappings={},t.segments&&t.segments.length&&t.segments[0].dateTimeObject){const o=t.segments[0],a=o.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[o.timeline]=-a}}saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:o}){const a=this.calculateSegmentTimeMapping_(t,t.timingInfo,o),i=t.segment;a&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));const s=i.dateTimeObject;i.discontinuity&&o&&s&&(this.timelineToDatetimeMappings[i.timeline]=-(s.getTime()/1e3))}timestampOffsetForTimeline(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].time}mappingForTimeline(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].mapping}calculateSegmentTimeMapping_(t,o,a){const i=t.segment,s=t.part;let l=this.timelines[t.timeline],r,c;if(typeof t.timestampOffset=="number")l={time:t.startOfSegment,mapping:t.startOfSegment-o.start},a&&(this.timelines[t.timeline]=l,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${t.timeline}: [time: ${l.time}] [mapping: ${l.mapping}]`)),r=t.startOfSegment,c=o.end+l.mapping;else if(l)r=o.start+l.mapping,c=o.end+l.mapping;else return!1;return s&&(s.start=r,s.end=c),(!i.start||r<i.start)&&(i.start=r),i.end=c,!0}saveDiscontinuitySyncInfo_(t){const o=t.playlist,a=t.segment;if(a.discontinuity)this.discontinuities[a.timeline]={time:a.start,accuracy:0};else if(o.discontinuityStarts&&o.discontinuityStarts.length)for(let i=0;i<o.discontinuityStarts.length;i++){const s=o.discontinuityStarts[i],l=o.discontinuitySequence+i+1,r=s-t.mediaIndex,c=Math.abs(r);if(!this.discontinuities[l]||this.discontinuities[l].accuracy>c){let u;r<0?u=a.start-gl({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex,endIndex:s}):u=a.end+gl({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex+1,endIndex:s}),this.discontinuities[l]={time:u,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class YW extends oe.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:t,from:o,to:a}){return typeof o=="number"&&typeof a=="number"&&(this.pendingTimelineChanges_[t]={type:t,from:o,to:a},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]}lastTimelineChange({type:t,from:o,to:a}){if(typeof o=="number"&&typeof a=="number"){this.lastTimelineChanges_[t]={type:t,from:o,to:a},delete this.pendingTimelineChanges_[t];const i={timelineChangeInfo:{from:o,to:a}};this.trigger({type:"timelinechange",metadata:i})}return this.lastTimelineChanges_[t]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const KW=m2(p2(function(){var n=function(){function h(){this.listeners={}}var C=h.prototype;return C.on=function(x,y){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push(y)},C.off=function(x,y){if(!this.listeners[x])return!1;var b=this.listeners[x].indexOf(y);return this.listeners[x]=this.listeners[x].slice(0),this.listeners[x].splice(b,1),b>-1},C.trigger=function(x){var y=this.listeners[x];if(y)if(arguments.length===2)for(var b=y.length,V=0;V<b;++V)y[V].call(this,arguments[1]);else for(var T=Array.prototype.slice.call(arguments,1),k=y.length,S=0;S<k;++S)y[S].apply(this,T)},C.dispose=function(){this.listeners={}},C.pipe=function(x){this.on("data",function(y){x.push(y)})},h}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function t(h){return h.subarray(0,h.byteLength-h[h.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const o=function(){const h=[[[],[],[],[],[]],[[],[],[],[],[]]],C=h[0],w=h[1],x=C[4],y=w[4];let b,V,T;const k=[],S=[];let D,N,A,$,I,U;for(b=0;b<256;b++)S[(k[b]=b<<1^(b>>7)*283)^b]=b;for(V=T=0;!x[V];V^=D||1,T=S[T]||1)for($=T^T<<1^T<<2^T<<3^T<<4,$=$>>8^$&255^99,x[V]=$,y[$]=V,A=k[N=k[D=k[V]]],U=A*16843009^N*65537^D*257^V*16843008,I=k[$]*257^$*16843008,b=0;b<4;b++)C[b][V]=I=I<<24^I>>>8,w[b][$]=U=U<<24^U>>>8;for(b=0;b<5;b++)C[b]=C[b].slice(0),w[b]=w[b].slice(0);return h};let a=null;class i{constructor(C){a||(a=o()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];let w,x,y;const b=this._tables[0][4],V=this._tables[1],T=C.length;let k=1;if(T!==4&&T!==6&&T!==8)throw new Error("Invalid aes key size");const S=C.slice(0),D=[];for(this._key=[S,D],w=T;w<4*T+28;w++)y=S[w-1],(w%T===0||T===8&&w%T===4)&&(y=b[y>>>24]<<24^b[y>>16&255]<<16^b[y>>8&255]<<8^b[y&255],w%T===0&&(y=y<<8^y>>>24^k<<24,k=k<<1^(k>>7)*283)),S[w]=S[w-T]^y;for(x=0;w;x++,w--)y=S[x&3?w:w-4],w<=4||x<4?D[x]=y:D[x]=V[0][b[y>>>24]]^V[1][b[y>>16&255]]^V[2][b[y>>8&255]]^V[3][b[y&255]]}decrypt(C,w,x,y,b,V){const T=this._key[1];let k=C^T[0],S=y^T[1],D=x^T[2],N=w^T[3],A,$,I;const U=T.length/4-2;let Y,G=4;const q=this._tables[1],O=q[0],H=q[1],R=q[2],M=q[3],W=q[4];for(Y=0;Y<U;Y++)A=O[k>>>24]^H[S>>16&255]^R[D>>8&255]^M[N&255]^T[G],$=O[S>>>24]^H[D>>16&255]^R[N>>8&255]^M[k&255]^T[G+1],I=O[D>>>24]^H[N>>16&255]^R[k>>8&255]^M[S&255]^T[G+2],N=O[N>>>24]^H[k>>16&255]^R[S>>8&255]^M[D&255]^T[G+3],G+=4,k=A,S=$,D=I;for(Y=0;Y<4;Y++)b[(3&-Y)+V]=W[k>>>24]<<24^W[S>>16&255]<<16^W[D>>8&255]<<8^W[N&255]^T[G++],A=k,k=S,S=D,D=N,N=A}}class s extends n{constructor(){super(n),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(C){this.jobs.push(C),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const l=function(h){return h<<24|(h&65280)<<8|(h&16711680)>>8|h>>>24},r=function(h,C,w){const x=new Int32Array(h.buffer,h.byteOffset,h.byteLength>>2),y=new i(Array.prototype.slice.call(C)),b=new Uint8Array(h.byteLength),V=new Int32Array(b.buffer);let T,k,S,D,N,A,$,I,U;for(T=w[0],k=w[1],S=w[2],D=w[3],U=0;U<x.length;U+=4)N=l(x[U]),A=l(x[U+1]),$=l(x[U+2]),I=l(x[U+3]),y.decrypt(N,A,$,I,V,U),V[U]=l(V[U]^T),V[U+1]=l(V[U+1]^k),V[U+2]=l(V[U+2]^S),V[U+3]=l(V[U+3]^D),T=N,k=A,S=$,D=I;return b};class c{constructor(C,w,x,y){const b=c.STEP,V=new Int32Array(C.buffer),T=new Uint8Array(C.byteLength);let k=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(V.subarray(k,k+b),w,x,T)),k=b;k<V.length;k+=b)x=new Uint32Array([l(V[k-4]),l(V[k-3]),l(V[k-2]),l(V[k-1])]),this.asyncStream_.push(this.decryptChunk_(V.subarray(k,k+b),w,x,T));this.asyncStream_.push(function(){y(null,t(T))})}static get STEP(){return 32e3}decryptChunk_(C,w,x,y){return function(){const b=r(C,w,x);y.set(b,C.byteOffset)}}}var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g;typeof window<"u"?g=window:typeof u<"u"?g=u:typeof self<"u"?g=self:g={};var m=g,d=function(C){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(C):C&&C.buffer instanceof ArrayBuffer},p=m.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000"),function(){var h=new Uint16Array([65484]),C=new Uint8Array(h.buffer,h.byteOffset,h.byteLength);return C[0]===255?"big":C[0]===204?"little":"unknown"}();const f=function(h){const C={};return Object.keys(h).forEach(w=>{const x=h[w];d(x)?C[w]={bytes:x.buffer,byteOffset:x.byteOffset,byteLength:x.byteLength}:C[w]=x}),C};self.onmessage=function(h){const C=h.data,w=new Uint8Array(C.encrypted.bytes,C.encrypted.byteOffset,C.encrypted.byteLength),x=new Uint32Array(C.key.bytes,C.key.byteOffset,C.key.byteLength/4),y=new Uint32Array(C.iv.bytes,C.iv.byteOffset,C.iv.byteLength/4);new c(w,x,y,function(b,V){self.postMessage(f({source:C.source,decrypted:V}),[V.buffer])})}}));var QW=u2(KW);const ZW=n=>{let t=n.default?"main":"alternative";return n.characteristics&&n.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},F2=(n,t)=>{n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Tp=(n,t)=>{t.activePlaylistLoader=n,n.load()},JW=(n,t)=>()=>{const{segmentLoaders:{[n]:o,main:a},mediaTypes:{[n]:i}}=t,s=i.activeTrack(),l=i.getActiveGroup(),r=i.activePlaylistLoader,c=i.lastGroup_;if(!(l&&c&&l.id===c.id)&&(i.lastGroup_=l,i.lastTrack_=s,F2(o,i),!(!l||l.isMainPlaylist))){if(!l.playlistLoader){r&&a.resetEverything();return}o.resyncLoader(),Tp(l.playlistLoader,i)}},eG=(n,t)=>()=>{const{segmentLoaders:{[n]:o},mediaTypes:{[n]:a}}=t;a.lastGroup_=null,o.abort(),o.pause()},tG=(n,t)=>()=>{const{mainPlaylistLoader:o,segmentLoaders:{[n]:a,main:i},mediaTypes:{[n]:s}}=t,l=s.activeTrack(),r=s.getActiveGroup(),c=s.activePlaylistLoader,u=s.lastTrack_;if(!(u&&l&&u.id===l.id)&&(s.lastGroup_=r,s.lastTrack_=l,F2(a,s),!!r)){if(r.isMainPlaylist){if(!l||!u||l.id===u.id)return;const g=t.vhs.playlistController_,m=g.selectPlaylist();if(g.media()===m)return;s.logger_(`track change. Switching main audio from ${u.id} to ${l.id}`),o.pause(),i.resetEverything(),g.fastQualityChange_(m);return}if(n==="AUDIO"){if(!r.playlistLoader){i.setAudio(!0),i.resetEverything();return}a.setAudio(!0),i.setAudio(!1)}if(c===r.playlistLoader){Tp(r.playlistLoader,s);return}a.track&&a.track(l),a.resetEverything(),Tp(r.playlistLoader,s)}},Cc={AUDIO:(n,t)=>()=>{const{mediaTypes:{[n]:o},excludePlaylist:a}=t,i=o.activeTrack(),s=o.activeGroup(),l=(s.filter(c=>c.default)[0]||s[0]).id,r=o.tracks[l];if(i===r){a({error:{message:"Problem encountered loading the default audio track."}});return}oe.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in o.tracks)o.tracks[c].enabled=o.tracks[c]===r;o.onTrackChanged()},SUBTITLES:(n,t)=>()=>{const{mediaTypes:{[n]:o}}=t;oe.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const a=o.activeTrack();a&&(a.mode="disabled"),o.onTrackChanged()}},H2={AUDIO:(n,t,o)=>{if(!t)return;const{tech:a,requestOptions:i,segmentLoaders:{[n]:s}}=o;t.on("loadedmetadata",()=>{const l=t.media();s.playlist(l,i),(!a.paused()||l.endList&&a.preload()!=="none")&&s.load()}),t.on("loadedplaylist",()=>{s.playlist(t.media(),i),a.paused()||s.load()}),t.on("error",Cc[n](n,o))},SUBTITLES:(n,t,o)=>{const{tech:a,requestOptions:i,segmentLoaders:{[n]:s},mediaTypes:{[n]:l}}=o;t.on("loadedmetadata",()=>{const r=t.media();s.playlist(r,i),s.track(l.activeTrack()),(!a.paused()||r.endList&&a.preload()!=="none")&&s.load()}),t.on("loadedplaylist",()=>{s.playlist(t.media(),i),a.paused()||s.load()}),t.on("error",Cc[n](n,o))}},nG={AUDIO:(n,t)=>{const{vhs:o,sourceType:a,segmentLoaders:{[n]:i},requestOptions:s,main:{mediaGroups:l},mediaTypes:{[n]:{groups:r,tracks:c,logger_:u}},mainPlaylistLoader:g}=t,m=yl(g.main);(!l[n]||Object.keys(l[n]).length===0)&&(l[n]={main:{default:{default:!0}}},m&&(l[n].main.default.playlists=g.main.playlists));for(const d in l[n]){r[d]||(r[d]=[]);for(const p in l[n][d]){let f=l[n][d][p],h;if(m?(u(`AUDIO group '${d}' label '${p}' is a main playlist`),f.isMainPlaylist=!0,h=null):a==="vhs-json"&&f.playlists?h=new os(f.playlists[0],o,s):f.resolvedUri?h=new os(f.resolvedUri,o,s):f.playlists&&a==="dash"?h=new yp(f.playlists[0],o,s,g):h=null,f=at({id:p,playlistLoader:h},f),H2[n](n,f.playlistLoader,t),r[d].push(f),typeof c[p]>"u"){const C=new oe.AudioTrack({id:p,kind:ZW(f),enabled:!1,language:f.language,default:f.default,label:p});c[p]=C}}}i.on("error",Cc[n](n,t))},SUBTITLES:(n,t)=>{const{tech:o,vhs:a,sourceType:i,segmentLoaders:{[n]:s},requestOptions:l,main:{mediaGroups:r},mediaTypes:{[n]:{groups:c,tracks:u}},mainPlaylistLoader:g}=t;for(const m in r[n]){c[m]||(c[m]=[]);for(const d in r[n][m]){if(!a.options_.useForcedSubtitles&&r[n][m][d].forced)continue;let p=r[n][m][d],f;if(i==="hls")f=new os(p.resolvedUri,a,l);else if(i==="dash"){if(!p.playlists.filter(C=>C.excludeUntil!==1/0).length)return;f=new yp(p.playlists[0],a,l,g)}else i==="vhs-json"&&(f=new os(p.playlists?p.playlists[0]:p.resolvedUri,a,l));if(p=at({id:d,playlistLoader:f},p),H2[n](n,p.playlistLoader,t),c[m].push(p),typeof u[d]>"u"){const h=o.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;u[d]=h}}}s.on("error",Cc[n](n,t))},"CLOSED-CAPTIONS":(n,t)=>{const{tech:o,main:{mediaGroups:a},mediaTypes:{[n]:{groups:i,tracks:s}}}=t;for(const l in a[n]){i[l]||(i[l]=[]);for(const r in a[n][l]){const c=a[n][l][r];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const u=o.options_.vhs&&o.options_.vhs.captionServices||{};let g={label:r,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(u[g.instreamId]&&(g=at(g,u[g.instreamId])),g.default===void 0&&delete g.default,i[l].push(at({id:r},c)),typeof s[r]>"u"){const m=o.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;s[r]=m}}}}},j2=(n,t)=>{for(let o=0;o<n.length;o++)if(up(t,n[o])||n[o].playlists&&j2(n[o].playlists,t))return!0;return!1},oG=(n,t)=>o=>{const{mainPlaylistLoader:a,mediaTypes:{[n]:{groups:i}}}=t,s=a.media();if(!s)return null;let l=null;s.attributes[n]&&(l=i[s.attributes[n]]);const r=Object.keys(i);if(!l)if(n==="AUDIO"&&r.length>1&&yl(t.main))for(let c=0;c<r.length;c++){const u=i[r[c]];if(j2(u,s)){l=u;break}}else i.main?l=i.main:r.length===1&&(l=i[r[0]]);return typeof o>"u"?l:o===null||!l?null:l.filter(c=>c.id===o.id)[0]||null},aG={AUDIO:(n,t)=>()=>{const{mediaTypes:{[n]:{tracks:o}}}=t;for(const a in o)if(o[a].enabled)return o[a];return null},SUBTITLES:(n,t)=>()=>{const{mediaTypes:{[n]:{tracks:o}}}=t;for(const a in o)if(o[a].mode==="showing"||o[a].mode==="hidden")return o[a];return null}},iG=(n,{mediaTypes:t})=>()=>{const o=t[n].activeTrack();return o?t[n].activeGroup(o):null},sG=n=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{nG[u](u,n)});const{mediaTypes:t,mainPlaylistLoader:o,tech:a,vhs:i,segmentLoaders:{["AUDIO"]:s,main:l}}=n;["AUDIO","SUBTITLES"].forEach(u=>{t[u].activeGroup=oG(u,n),t[u].activeTrack=aG[u](u,n),t[u].onGroupChanged=JW(u,n),t[u].onGroupChanging=eG(u,n),t[u].onTrackChanged=tG(u,n),t[u].getActiveGroup=iG(u,n)});const r=t.AUDIO.activeGroup();if(r){const u=(r.filter(m=>m.default)[0]||r[0]).id;t.AUDIO.tracks[u].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(l.setAudio(!1),s.setAudio(!0)):l.setAudio(!0)}o.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(u=>t[u].onGroupChanged())}),o.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(u=>t[u].onGroupChanging())});const c=()=>{t.AUDIO.onTrackChanged(),a.trigger({type:"usage",name:"vhs-audio-change"})};a.audioTracks().addEventListener("change",c),a.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",()=>{a.audioTracks().removeEventListener("change",c),a.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),a.clearTracks("audio");for(const u in t.AUDIO.tracks)a.audioTracks().addTrack(t.AUDIO.tracks[u])},lG=()=>{const n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Qo,activeTrack:Qo,getActiveGroup:Qo,onGroupChanged:Qo,onTrackChanged:Qo,lastTrack_:null,logger_:no(`MediaGroups[${t}]`)}}),n};class z2{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(t){t===1&&(this.version_=t)}set ttl(t){this.ttl_=t||300}set reloadUri(t){t&&(this.reloadUri_=Nn(this.reloadUri_,t))}set priority(t){t&&t.length&&(this.priority_=t)}set pathwayClones(t){t&&t.length&&(this.pathwayClones_=new Map(t.map(o=>[o.ID,o])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class rG extends oe.EventTarget{constructor(t,o){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new z2,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=no("Content Steering"),this.xhr_=t,this.getBandwidth_=o}assignTagProperties(t,o){this.manifestType_=o.serverUri?"HLS":"DASH";const a=o.serverUri||o.serverURL;if(!a){this.logger_(`steering manifest URL is ${a}, cannot request steering manifest.`),this.trigger("error");return}if(a.startsWith("data:")){this.decodeDataUriManifest_(a.substring(a.indexOf(",")+1));return}this.steeringManifest.reloadUri=Nn(t,a),this.defaultPathway=o.pathwayId||o.defaultServiceLocation,this.queryBeforeStart=o.queryBeforeStart,this.proxyServerUrl_=o.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(t){const o=this.steeringManifest.reloadUri;if(!o)return;const a=t?o:this.getRequestURI(o);if(!a){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const i={contentSteeringInfo:{uri:a}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:a,requestType:"content-steering-manifest"},(s,l)=>{if(s){if(l.status===410){this.logger_(`manifest request 410 ${s}.`),this.logger_(`There will be no more content steering requests to ${a} this session.`),this.excludedSteeringManifestURLs.add(a);return}if(l.status===429){const u=l.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${s}.`),this.logger_(`content steering will retry in ${u} seconds.`),this.startTTLTimeout_(parseInt(u,10));return}this.logger_(`manifest failed to load ${s}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:i});let r;try{r=JSON.parse(this.request_.responseText)}catch(u){const g={errorType:oe.Error.StreamingContentSteeringParserError,error:u};this.trigger({type:"error",metadata:g})}this.assignSteeringProperties_(r);const c={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(t){const o=new K.URL(t),a=new K.URL(this.proxyServerUrl_);return a.searchParams.set("url",encodeURI(o.toString())),this.setSteeringParams_(a.toString())}decodeDataUriManifest_(t){const o=JSON.parse(K.atob(t));this.assignSteeringProperties_(o)}setSteeringParams_(t){const o=new K.URL(t),a=this.getPathway(),i=this.getBandwidth_();if(a){const s=`_${this.manifestType_}_pathway`;o.searchParams.set(s,a)}if(i){const s=`_${this.manifestType_}_throughput`;o.searchParams.set(s,i)}return o.toString()}assignSteeringProperties_(t){if(this.steeringManifest.version=t.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${t.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=t.TTL,this.steeringManifest.reloadUri=t["RELOAD-URI"],this.steeringManifest.priority=t["PATHWAY-PRIORITY"]||t["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=t["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const a=(i=>{for(const s of i)if(this.availablePathways_.has(s))return s;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==a&&(this.currentPathway=a,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(t){if(!t)return null;const o=i=>this.excludedSteeringManifestURLs.has(i);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(t);if(!o(i))return i}const a=this.setSteeringParams_(t);return o(a)?null:a}startTTLTimeout_(t=this.steeringManifest.ttl){const o=t*1e3;this.ttlTimeout_=K.setTimeout(()=>{this.requestSteeringManifest()},o)}clearTTLTimeout_(){K.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new z2}addAvailablePathway(t){t&&this.availablePathways_.add(t)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(t){return this.availablePathways_.delete(t)}didDASHTagChange(t,o){return!o&&this.steeringManifest.reloadUri||o&&(Nn(t,o.serverURL)!==this.steeringManifest.reloadUri||o.defaultServiceLocation!==this.defaultPathway||o.queryBeforeStart!==this.queryBeforeStart||o.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const dG=(n,t)=>{let o=null;return(...a)=>{clearTimeout(o),o=setTimeout(()=>{n.apply(null,a)},t)}},cG=10;let Ca;const uG=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],mG=function(n){return this.audioSegmentLoader_[n]+this.mainSegmentLoader_[n]},pG=function({currentPlaylist:n,buffered:t,currentTime:o,nextPlaylist:a,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:l,bufferBasedABR:r,log:c}){if(!a)return oe.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${n&&n.id||"null"} -> ${a.id}`;if(!n)return c(`${u} as current playlist is not set`),!0;if(a.id===n.id)return!1;const g=!!es(t,o).length;if(!n.endList)return!g&&typeof n.partTargetDuration=="number"?(c(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${u} as current playlist is live`),!0);const m=sp(t,o),d=r?zt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:zt.MAX_BUFFER_LOW_WATER_LINE;if(l<d)return c(`${u} as duration < max low water line (${l} < ${d})`),!0;const p=a.attributes.BANDWIDTH,f=n.attributes.BANDWIDTH;if(p<f&&(!r||m<s)){let h=`${u} as next bandwidth < current bandwidth (${p} < ${f})`;return r&&(h+=` and forwardBuffer < bufferHighWaterLine (${m} < ${s})`),c(h),!0}if((!r||p>f)&&m>=i){let h=`${u} as forwardBuffer >= bufferLowWaterLine (${m} >= ${i})`;return r&&(h+=` and next bandwidth > current bandwidth (${p} > ${f})`),c(h),!0}return c(`not ${u} as no switching criteria met`),!1};class hG extends oe.EventTarget{constructor(t){super(),this.fastQualityChange_=dG(this.fastQualityChange_.bind(this),100);const{src:o,withCredentials:a,tech:i,bandwidth:s,externVhs:l,useCueTags:r,playlistExclusionDuration:c,enableLowInitialPlaylist:u,sourceType:g,cacheEncryptionKeys:m,bufferBasedABR:d,leastPixelDiffSelector:p,captionServices:f,experimentalUseMMS:h}=t;if(!o)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:C}=t;(C===null||typeof C>"u")&&(C=1/0),Ca=l,this.bufferBasedABR=!!d,this.leastPixelDiffSelector=!!p,this.withCredentials=a,this.tech_=i,this.vhs_=i.vhs,this.player_=t.player_,this.sourceType_=g,this.useCueTags_=r,this.playlistExclusionDuration=c,this.maxPlaylistRetries=C,this.enableLowInitialPlaylist=u,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:a,maxPlaylistRetries:C,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=lG(),h&&K.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new K.ManagedMediaSource,this.usingManagedMediaSource_=!0,oe.log("Using ManagedMediaSource")):K.MediaSource&&(this.mediaSource=new K.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=jt(),this.hasPlayed_=!1,this.syncController_=new XW(t),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new QW,this.sourceUpdater_=new I2(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new YW,this.keyStatusMap_=new Map;const w={vhs:this.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:t.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new yp(o,this.vhs_,at(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new os(o,this.vhs_,at(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new xp(at(w,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),t),this.audioSegmentLoader_=new xp(at(w,{loaderType:"audio"}),t),this.subtitleSegmentLoader_=new jW(at(w,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((b,V)=>{function T(){i.off("vttjserror",k),b()}function k(){i.off("vttjsloaded",T),V()}i.one("vttjsloaded",T),i.one("vttjserror",k),i.addWebVttScript_()})}),t);const x=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new rG(this.vhs_.xhr,x),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),uG.forEach(b=>{this[b+"_"]=mG.bind(this,b)}),this.logger_=no("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(y,()=>{const b=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-b,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const t=this.mainAppendsToLoadedData_(),o=this.audioAppendsToLoadedData_();return t===-1||o===-1?-1:t+o}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(t="abr"){const o=this.selectPlaylist();o&&this.shouldSwitchToMedia_(o)&&this.switchMedia_(o,t)}switchMedia_(t,o,a){const i=this.media(),s=i&&(i.id||i.uri),l=t&&(t.id||t.uri);if(s&&s!==l){this.logger_(`switch media ${s} -> ${l} from ${o}`);const r={renditionInfo:{id:l,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:o};this.trigger({type:"renditionselected",metadata:r}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${o}`})}this.mainPlaylistLoader_.media(t,a)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{const o=this.mediaTypes_[t],a=o?o.activeGroup():null,i=this.contentSteeringController_.getPathway();if(a&&i){const l=(a.length?a[0].playlists:a.playlists).filter(r=>r.attributes.serviceLocation===i);l.length&&this.mediaTypes_[t].activePlaylistLoader.media(l[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=K.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(K.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const t=this.main(),o=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return o;const a=t.mediaGroups.AUDIO,i=Object.keys(a);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const r=a.main||i.length&&a[i[0]];for(const c in r)if(r[c].default){s={label:c};break}}if(!s)return o;const l=[];for(const r in a)if(a[r][s.label]){const c=a[r][s.label];if(c.playlists&&c.playlists.length)l.push.apply(l,c.playlists);else if(c.uri)l.push(c);else if(t.playlists.length)for(let u=0;u<t.playlists.length;u++){const g=t.playlists[u];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===r&&l.push(g)}}return l.length?l:o}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const o=this.mainPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;cp(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,o.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(o,this.requestOptions_),this.mainSegmentLoader_.load()),sG({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),o),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let o=this.mainPlaylistLoader_.media();if(!o){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let a;if(this.enableLowInitialPlaylist&&(a=this.selectInitialPlaylist()),a||(a=this.selectPlaylist()),!a||!this.shouldSwitchToMedia_(a)||(this.initialMedia_=a,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;o=this.initialMedia_}this.handleUpdatedMediaPlaylist(o)}),this.mainPlaylistLoader_.on("error",()=>{const o=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:o.playlist,error:o})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const o=this.mainPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;cp(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(o,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const o=this.mainPlaylistLoader_.media();if(o.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(o)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(o=>{this.mainPlaylistLoader_.on(o,a=>{this.player_.trigger(Et({},a))})})}handleUpdatedMediaPlaylist(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(t,o){const a=t.mediaGroups||{};let i=!0;const s=Object.keys(a.AUDIO);for(const l in a.AUDIO)for(const r in a.AUDIO[l])a.AUDIO[l][r].uri||(i=!1);i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(a.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Ca.Playlist.isAes(o)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(a.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(t){const o=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),i=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),l=this.tech_.buffered();return pG({buffered:l,currentTime:a,currentPlaylist:o,nextPlaylist:t,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const a=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:a.playlist,error:a})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const a=this.audioSegmentLoader_.pendingSegment_;if(!a||!a.segment||!a.segment.syncInfo)return;const i=a.segment.syncInfo.end+.01;this.tech_.setCurrentTime(i)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",a=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:cG}))});const t=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const a=this.getCodecsOrExclude_();a&&this.sourceUpdater_.addOrChangeSourceBuffers(a)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(a=>{this.mainSegmentLoader_.on(a,i=>{this.player_.trigger(Et({},i))}),this.audioSegmentLoader_.on(a,i=>{this.player_.trigger(Et({},i))}),this.subtitleSegmentLoader_.on(a,i=>{this.player_.trigger(Et({},i))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(t=this.selectPlaylist()){if(t&&t===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(t,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const t=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0))return this.tech_.setCurrentTime(t.end(t.length-1))}setupFirstPlay(){const t=this.mainPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList||t.start){const o=this.seekable();if(!o.length)return!1;const a=o.end(0);let i=a;if(t.start){const s=t.start.timeOffset;s<0?i=Math.max(a+s,o.start(0)):i=Math.min(a,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const t=this.tech_.play();typeof t<"u"&&typeof t.then=="function"&&t.then(null,o=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const t=this.inbandTextTracks_.metadataTrack_.cues;if(!t||!t.length)return;const o=this.duration();t[t.length-1].endTime=isNaN(o)||Math.abs(o)===1/0?Number.MAX_VALUE:o}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const o=this.mainSegmentLoader_.getCurrentMediaInfo_();!o||o.hasVideo?t=t&&this.audioSegmentLoader_.ended_:t=this.audioSegmentLoader_.ended_}t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(t){if(!this.seekable().length)return!1;const a=this.syncController_.getExpiredTime(t,this.duration());if(a===null)return!1;const i=Ca.Playlist.playlistEnd(t,a),s=this.tech_.currentTime(),l=this.tech_.buffered();if(!l.length)return i-s<=Do;const r=l.end(l.length-1);return r-s<=Do&&i-r<=Do}excludePlaylist({playlistToExclude:t=this.mainPlaylistLoader_.media(),error:o={},playlistExclusionDuration:a}){if(t=t||this.mainPlaylistLoader_.media(),a=a||o.playlistExclusionDuration||this.playlistExclusionDuration,!t){this.error=o,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}t.playlistErrors_++;const i=this.mainPlaylistLoader_.main.playlists,s=i.filter(yc),l=s.length===1&&s[0]===t;if(i.length===1&&a!==1/0)return oe.log.warn(`Problem encountered with playlist ${t.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(l);if(l){if(this.main().contentSteering){const f=this.pathwayAttribute_(t),h=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(f),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(f)},h);return}let p=!1;i.forEach(f=>{if(f===t)return;const h=f.excludeUntil;typeof h<"u"&&h!==1/0&&(p=!0,delete f.excludeUntil)}),p&&(oe.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let r;t.playlistErrors_>this.maxPlaylistRetries?r=1/0:r=Date.now()+a*1e3,t.excludeUntil=r,o.reason&&(t.lastExcludeReason_=o.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const u=o.internal?this.logger_:oe.log.warn,g=o.message?" "+o.message:"";u(`${o.internal?"Internal problem":"Problem"} encountered with playlist ${t.id}.${g} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==t.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==t.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const m=c.targetDuration/2*1e3||5*1e3,d=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=m;return this.switchMedia_(c,"exclude",l||d)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(t,o){const a=[],i=t==="all";(i||t==="main")&&a.push(this.mainPlaylistLoader_);const s=[];(i||t==="audio")&&s.push("AUDIO"),(i||t==="subtitle")&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(l=>{const r=this.mediaTypes_[l]&&this.mediaTypes_[l].activePlaylistLoader;r&&a.push(r)}),["main","audio","subtitle"].forEach(l=>{const r=this[`${l}SegmentLoader_`];r&&(t===l||t==="all")&&a.push(r)}),a.forEach(l=>o.forEach(r=>{typeof l[r]=="function"&&l[r]()}))}setCurrentTime(t){const o=es(this.tech_.buffered(),t);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(o&&o.length)return t;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const t=this.mainPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:Ca.Playlist.duration(t):1/0:0}seekable(){return this.seekable_}getSeekableRange_(t,o){const a=t.media();if(!a)return null;const i=this.syncController_.getMediaSequenceSync(o);if(i&&i.isReliable){const r=i.start,c=i.end;if(!isFinite(r)||!isFinite(c))return null;const u=Ca.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a),g=Math.max(r,c-u);return jt([[r,g]])}const s=this.syncController_.getExpiredTime(a,this.duration());if(s===null)return null;const l=Ca.Playlist.seekable(a,s,Ca.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a));return l.length?l:null}computeFinalSeekable_(t,o){if(!o)return t;const a=t.start(0),i=t.end(0),s=o.start(0),l=o.end(0);return s>i||a>l?t:jt([[Math.max(a,s),Math.min(i,l)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const t=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!t)return;let o;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(o=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!o))return;const a=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(t,o),!this.seekable_||a&&a.length&&this.seekable_.length&&a.start(0)===this.seekable_.start(0)&&a.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${L0(this.seekable_)}]`);const i={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:i}),this.tech_.trigger("seekablechanged")}updateDuration(t){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,t),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(t){const i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}const o=this.tech_.buffered();let a=Ca.Playlist.duration(this.mainPlaylistLoader_.media());o.length>0&&(a=Math.max(a,o.end(o.length-1))),this.mediaSource.duration!==a&&this.sourceUpdater_.setDuration(a)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(t=>{const o=this.mediaTypes_[t].groups;for(const a in o)o[a].forEach(i=>{i.playlistLoader&&i.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const t=!!this.mediaTypes_.AUDIO.activePlaylistLoader,o=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=t?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!o||!a)}getCodecsOrExclude_(){const t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},o=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;const a=wl(this.main(),o),i={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=a.video||t.main.videoCodec||OF),t.main.isMuxed&&(i.video+=`,${a.audio||t.main.audioCodec||Bf}`),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||s)&&(i.audio=a.audio||t.main.audioCodec||t.audio.audioCodec||Bf,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),!i.audio&&!i.video){this.excludePlaylist({playlistToExclude:o,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const l=(u,g)=>u?Hs(g,this.usingManagedMediaSource_):Ru(g),r={};let c;if(["video","audio"].forEach(function(u){if(i.hasOwnProperty(u)&&!l(t[u].isFmp4,i[u])){const g=t[u].isFmp4?"browser":"muxer";r[g]=r[g]||[],r[g].push(i[u]),u==="audio"&&(c=g)}}),s&&c&&o.attributes.AUDIO){const u=o.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===u&&g!==o&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${u} as ${c} does not support codec(s): "${i.audio}"`)}if(Object.keys(r).length){const u=Object.keys(r).reduce((g,m)=>(g&&(g+=", "),g+=`${m} does not support codec(s): "${r[m].join(",")}"`,g),"")+".";this.excludePlaylist({playlistToExclude:o,error:{internal:!0,message:u},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const u=[];if(["video","audio"].forEach(g=>{const m=(Vo(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,d=(Vo(i[g]||"")[0]||{}).type;m&&d&&m.toLowerCase()!==d.toLowerCase()&&u.push(`"${this.sourceUpdater_.codecs[g]}" -> "${i[g]}"`)}),u.length){this.excludePlaylist({playlistToExclude:o,error:{message:`Codec switching not supported: ${u.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return i}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const t=this.getCodecsOrExclude_();if(!t)return;this.sourceUpdater_.createSourceBuffers(t);const o=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(o)}excludeUnsupportedVariants_(){const t=this.main().playlists,o=[];Object.keys(t).forEach(a=>{const i=t[a];if(o.indexOf(i.id)!==-1)return;o.push(i.id);const s=wl(this.main,i),l=[];s.audio&&!Ru(s.audio)&&!Hs(s.audio,this.usingManagedMediaSource_)&&l.push(`audio codec ${s.audio}`),s.video&&!Ru(s.video)&&!Hs(s.video,this.usingManagedMediaSource_)&&l.push(`video codec ${s.video}`),s.text&&s.text==="stpp.ttml.im1t"&&l.push(`text codec ${s.text}`),l.length&&(i.excludeUntil=1/0,this.logger_(`excluding ${i.id} for unsupported: ${l.join(", ")}`))})}excludeIncompatibleVariants_(t){const o=[],a=this.main().playlists,i=_l(Vo(t)),s=Q0(i),l=i.video&&Vo(i.video)[0]||null,r=i.audio&&Vo(i.audio)[0]||null;Object.keys(a).forEach(c=>{const u=a[c];if(o.indexOf(u.id)!==-1||u.excludeUntil===1/0)return;o.push(u.id);const g=[],m=wl(this.mainPlaylistLoader_.main,u),d=Q0(m);if(!(!m.audio&&!m.video)){if(d!==s&&g.push(`codec count "${d}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const p=m.video&&Vo(m.video)[0]||null,f=m.audio&&Vo(m.audio)[0]||null;p&&l&&p.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`video codec "${p.type}" !== "${l.type}"`),f&&r&&f.type.toLowerCase()!==r.type.toLowerCase()&&g.push(`audio codec "${f.type}" !== "${r.type}"`)}g.length&&(u.excludeUntil=1/0,this.logger_(`excluding ${u.id}: ${g.join(" && ")}`))}})}updateAdCues_(t){let o=0;const a=this.seekable();a.length&&(o=a.start(0)),qW(t,this.cueTagsTrack_,o)}goalBufferLength(){const t=this.tech_.currentTime(),o=zt.GOAL_BUFFER_LENGTH,a=zt.GOAL_BUFFER_LENGTH_RATE,i=Math.max(o,zt.MAX_GOAL_BUFFER_LENGTH);return Math.min(o+t*a,i)}bufferLowWaterLine(){const t=this.tech_.currentTime(),o=zt.BUFFER_LOW_WATER_LINE,a=zt.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(o,zt.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(o,zt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(o+t*a,this.bufferBasedABR?s:i)}bufferHighWaterLine(){return zt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(t){S2(this.inbandTextTracks_,"com.apple.streaming",this.tech_),kW({inbandTextTracks:this.inbandTextTracks_,dateRanges:t})}addMetadataToTextTrack(t,o,a){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();S2(this.inbandTextTracks_,t,this.tech_),CW({inbandTextTracks:this.inbandTextTracks_,metadataArray:o,timestampOffset:i,videoDuration:a})}pathwayAttribute_(t){return t.attributes["PATHWAY-ID"]||t.attributes.serviceLocation}initContentSteeringController_(){const t=this.main();if(t.contentSteering){for(const o of t.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(o));if(this.contentSteeringController_.assignTagProperties(t.uri,t.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(o=>{this.contentSteeringController_.on(o,a=>{this.trigger(Et({},a))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const o=this.main();(this.contentSteeringController_.didDASHTagChange(o.uri,o.contentSteering)||(()=>{const s=this.contentSteeringController_.getAvailablePathways(),l=[];for(const r of o.playlists){const c=r.attributes.serviceLocation;if(c&&(l.push(c),!s.has(c)))return!0}return!!(!l.length&&s.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const t=this.contentSteeringController_.getPathway();if(!t)return;this.handlePathwayClones_();const a=this.main().playlists,i=new Set;let s=!1;Object.keys(a).forEach(l=>{const r=a[l],c=this.pathwayAttribute_(r),u=c&&t!==c;r.excludeUntil===1/0&&r.lastExcludeReason_==="content-steering"&&!u&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const m=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&u&&m&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(l=>{const r=this.mediaTypes_[l];if(r.activePlaylistLoader){const c=r.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==t&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const o=this.main().playlists,a=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(a&&a.size||i&&i.size){for(const[l,r]of a.entries())i.get(l)||(this.mainPlaylistLoader_.updateOrDeleteClone(r),this.contentSteeringController_.excludePathway(l));for(const[l,r]of i.entries()){const c=a.get(l);if(!c){o.filter(g=>g.attributes["PATHWAY-ID"]===r["BASE-ID"]).forEach(g=>{this.mainPlaylistLoader_.addClonePathway(r,g)}),this.contentSteeringController_.addAvailablePathway(l);continue}this.equalPathwayClones_(c,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(l))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(t,o){if(t["BASE-ID"]!==o["BASE-ID"]||t.ID!==o.ID||t["URI-REPLACEMENT"].HOST!==o["URI-REPLACEMENT"].HOST)return!1;const a=t["URI-REPLACEMENT"].PARAMS,i=o["URI-REPLACEMENT"].PARAMS;for(const s in a)if(a[s]!==i[s])return!1;for(const s in i)if(a[s]!==i[s])return!1;return!0}changeSegmentPathway_(){const t=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(t,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let t=0;const o="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(a=>{const i=this.mainPlaylistLoader_.getKeyIdSet(a);!i||!i.size||i.forEach(s=>{const l="usable",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===l,c=a.lastExcludeReason_===o&&a.excludeUntil===1/0;r?r&&c&&(delete a.excludeUntil,delete a.lastExcludeReason_,this.logger_(`enabling playlist ${a.id} because key ID ${s} is ${l}`)):(a.excludeUntil!==1/0&&a.lastExcludeReason_!==o&&(a.excludeUntil=1/0,a.lastExcludeReason_=o,this.logger_(`excluding playlist ${a.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${l}`)),t++)})}),t>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(a=>{const i=a&&a.attributes&&a.attributes.RESOLUTION&&a.attributes.RESOLUTION.height<720,s=a.excludeUntil===1/0&&a.lastExcludeReason_===o;i&&s&&(delete a.excludeUntil,oe.log.warn(`enabling non-HD playlist ${a.id} because all playlists were excluded due to ${o} key IDs`))})}addKeyStatus_(t,o){const s=(typeof t=="string"?t:FW(t)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${o}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,o)}updatePlaylistByKeyStatus(t,o){this.addKeyStatus_(t,o),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const fG=(n,t,o)=>a=>{const i=n.main.playlists[t],s=dp(i),l=yc(i);if(typeof a>"u")return l;a?delete i.disabled:i.disabled=!0;const r={renditionInfo:{id:t,bandwidth:i.attributes.BANDWIDTH,resolution:i.attributes.RESOLUTION,codecs:i.attributes.CODECS},cause:"fast-quality"};return a!==l&&!s&&(a?(o(i),n.trigger({type:"renditionenabled",metadata:r})):n.trigger({type:"renditiondisabled",metadata:r})),a};class gG{constructor(t,o,a){const{playlistController_:i}=t,s=i.fastQualityChange_.bind(i);if(o.attributes){const l=o.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=o.attributes.BANDWIDTH,this.frameRate=o.attributes["FRAME-RATE"]}this.codecs=wl(i.main(),o),this.playlist=o,this.id=a,this.enabled=fG(t.playlists,o.id,s)}}const yG=function(n){n.representations=()=>{const t=n.playlistController_.main(),o=yl(t)?n.playlistController_.getAudioTrackPlaylists_():t.playlists;return o?o.filter(a=>!dp(a)).map((a,i)=>new gG(n,a,a.id)):[]}},q2=["seeking","seeked","pause","playing","error"];class _G extends oe.EventTarget{constructor(t){super(),this.playlistController_=t.playlistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=no("PlaybackWatcher"),this.logger_("initialize");const o=()=>this.monitorCurrentTime_(),a=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),l=this.playlistController_,r=["main","subtitle","audio"],c={};r.forEach(g=>{c[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},l[`${g}SegmentLoader_`].on("appendsdone",c[g].updateend),l[`${g}SegmentLoader_`].on("playlistupdate",c[g].reset),this.tech_.on(["seeked","seeking"],c[g].reset)});const u=g=>{["main","audio"].forEach(m=>{l[`${m}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(q2,s),this.tech_.on("canplay",a),this.tech_.one("play",o),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(q2,s),this.tech_.off("canplay",a),this.tech_.off("play",o),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),r.forEach(g=>{l[`${g}SegmentLoader_`].off("appendsdone",c[g].updateend),l[`${g}SegmentLoader_`].off("playlistupdate",c[g].reset),this.tech_.off(["seeked","seeking"],c[g].reset)}),this.checkCurrentTimeTimeout_&&K.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&K.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=K.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(t){const o=this.playlistController_[`${t}SegmentLoader_`];this[`${t}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${t} loader`),this[`${t}StalledDownloads_`]=0,this[`${t}Buffered_`]=o.buffered_()}checkSegmentDownloads_(t){const o=this.playlistController_,a=o[`${t}SegmentLoader_`],i=a.buffered_(),s=sq(this[`${t}Buffered_`],i);if(this[`${t}Buffered_`]=i,s){const l={bufferedRanges:i};o.trigger({type:"bufferedrangeschanged",metadata:l}),this.resetSegmentDownloads_(t);return}this[`${t}StalledDownloads_`]++,this.logger_(`found #${this[`${t}StalledDownloads_`]} ${t} appends that did not increase buffer (possible stalled download)`,{playlistId:a.playlist_&&a.playlist_.id,buffered:Ja(i)}),!(this[`${t}StalledDownloads_`]<10)&&(this.logger_(`${t} loader stalled download exclusion`),this.resetSegmentDownloads_(t),this.tech_.trigger({type:"usage",name:`vhs-${t}-download-exclusion`}),t!=="subtitle"&&o.excludePlaylist({error:{message:`Excessive ${t} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const t=this.tech_.currentTime(),o=this.tech_.buffered();if(this.lastRecordedTime===t&&(!o.length||t+Do>=o.end(o.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&t===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(t===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(jt([this.lastRecordedTime,t]));const a={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:a}),this.consecutiveUpdates=0,this.lastRecordedTime=t}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const o=this.seekable(),a=this.tech_.currentTime(),i=this.afterSeekableWindow_(o,a,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let s;if(i&&(s=o.end(o.length-1)),this.beforeSeekableWindow_(o,a)){const f=o.start(0);s=f+(f===o.end(0)?0:Do)}if(typeof s<"u")return this.logger_(`Trying to seek outside of seekable at time ${a} with seekable range ${L0(o)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;const l=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),c=l.audioBuffer?l.audioBuffered():null,u=l.videoBuffer?l.videoBuffered():null,g=this.media(),m=g.partTargetDuration?g.partTargetDuration:(g.targetDuration-Po)*2,d=[c,u];for(let f=0;f<d.length;f++){if(!d[f])continue;if(sp(d[f],a)<m)return!1}const p=gc(r,a);return p.length===0?!1:(s=p.start(0)+Do,this.logger_(`Buffered region starts (${p.start(0)}) just beyond seek point (${a}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;const t=this.tech_.currentTime(),o=this.tech_.buffered(),a=es(o,t);if(a.length&&t+3<=a.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.logger_(`Stopped at ${t} while inside a buffered region [${a.start(0)} -> ${a.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const t=this.seekable(),o=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(t,o)){const r=t.end(t.length-1);return this.logger_(`Fell out of live window at time ${o}. Seeking to live point (seekable end) ${r}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(r),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const a=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:o}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const l=gc(i,o);return l.length>0?(this.logger_(`Stopped at ${o} and seeking to ${l.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(o),!0):!1}afterSeekableWindow_(t,o,a,i=!1){if(!t.length)return!1;let s=t.end(t.length-1)+Do;const l=!a.endList,r=typeof a.partTargetDuration=="number";return l&&(r||i)&&(s=t.end(t.length-1)+a.targetDuration*3),o>s}beforeSeekableWindow_(t,o){return!!(t.length&&t.start(0)>0&&o<t.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:t,audioBuffered:o,currentTime:a}){if(!t)return;let i;if(t.length&&o.length){const s=es(t,a-3),l=es(t,a),r=es(o,a);r.length&&!l.length&&s.length&&(i={start:s.end(0),end:r.end(0)})}else gc(t,a).length||(i=this.gapFromVideoUnderflow_(t,a));return i?(this.logger_(`Encountered a gap in video from ${i.start} to ${i.end}. Seeking to current time ${a}`),!0):!1}skipTheGap_(t){const o=this.tech_.buffered(),a=this.tech_.currentTime(),i=gc(o,a);if(this.resetTimeUpdate_(),i.length===0||a!==t)return;this.logger_("skipTheGap_:","currentTime:",a,"scheduled currentTime:",t,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+Po);const s={gapInfo:{from:a,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(t,o){const a=oq(t);for(let i=0;i<a.length;i++){const s=a.start(i),l=a.end(i);if(o-s<4&&o-s>2)return{start:s,end:l}}return null}}const wG={errorInterval:30,getSource(n){const o=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return n(o)}},W2=function(n,t){let o=0,a=0;const i=at(wG,t);n.ready(()=>{n.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const s=function(){a&&n.currentTime(a)},l=function(g){g!=null&&(a=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",s),n.src(g),n.trigger({type:"usage",name:"vhs-error-reload"}),n.play())},r=function(){if(Date.now()-o<i.errorInterval*1e3){n.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){oe.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return o=Date.now(),i.getSource.call(n,l)},c=function(){n.off("loadedmetadata",s),n.off("error",r),n.off("dispose",c)},u=function(g){c(),W2(n,g)};n.on("error",r),n.on("dispose",c),n.reloadSourceOnError=u},bG=function(n){W2(this,n)};var G2="3.17.2",CG="7.1.0",VG="1.3.1",xG="7.2.0",kG="4.0.2";const Vt={PlaylistLoader:os,Playlist:Sn,utils:Pq,STANDARD_PLAYLIST_SELECTOR:T2,INITIAL_PLAYLIST_SELECTOR:gW,lastBandwidthSelector:T2,movingAverageBandwidthSelector:hW,comparePlaylistBandwidth:Cp,comparePlaylistResolution:pW,xhr:n2()};Object.keys(zt).forEach(n=>{Object.defineProperty(Vt,n,{get(){return oe.log.warn(`using Vhs.${n} is UNSAFE be sure you know what you are doing`),zt[n]},set(t){if(oe.log.warn(`using Vhs.${n} is UNSAFE be sure you know what you are doing`),typeof t!="number"||t<0){oe.log.warn(`value of Vhs.${n} must be greater than or equal to 0`);return}zt[n]=t}})});const X2="videojs-vhs",Y2=function(n,t){const o=t.media();let a=-1;for(let i=0;i<n.length;i++)if(n[i].id===o.id){a=i;break}n.selectedIndex_=a,n.trigger({selectedIndex:a,type:"change"})},EG=function(n,t){t.representations().forEach(o=>{n.addQualityLevel(o)}),Y2(n,t.playlists)};Vt.canPlaySource=function(){return oe.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const TG=(n,t,o)=>{if(!n)return n;let a={};t&&t.attributes&&t.attributes.CODECS&&(a=_l(Vo(t.attributes.CODECS))),o&&o.attributes&&o.attributes.CODECS&&(a.audio=o.attributes.CODECS);const i=ki(a.video),s=ki(a.audio),l={};for(const r in n)l[r]={},s&&(l[r].audioContentType=s),i&&(l[r].videoContentType=i),t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(l[r].pssh=t.contentProtection[r].pssh),typeof n[r]=="string"&&(l[r].url=n[r]);return at(n,l)},NG=(n,t)=>n.reduce((o,a)=>{if(!a.contentProtection)return o;const i=t.reduce((s,l)=>{const r=a.contentProtection[l];return r&&r.pssh&&(s[l]={pssh:r.pssh}),s},{});return Object.keys(i).length&&o.push(i),o},[]),SG=({player:n,sourceKeySystems:t,audioMedia:o,mainPlaylists:a})=>{if(!n.eme.initializeMediaKeys)return Promise.resolve();const i=o?a.concat([o]):a,s=NG(i,Object.keys(t)),l=[],r=[];return s.forEach(c=>{r.push(new Promise((u,g)=>{n.tech_.one("keysessioncreated",u)})),l.push(new Promise((u,g)=>{n.eme.initializeMediaKeys({keySystems:c},m=>{if(m){g(m);return}u()})}))}),Promise.race([Promise.all(l),Promise.race(r)])},BG=({player:n,sourceKeySystems:t,media:o,audioMedia:a})=>{const i=TG(t,o,a);return i?(n.currentSource().keySystems=i,i&&!n.eme?(oe.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},K2=()=>{if(!K.localStorage)return null;const n=K.localStorage.getItem(X2);if(!n)return null;try{return JSON.parse(n)}catch{return null}},PG=n=>{if(!K.localStorage)return!1;let t=K2();t=t?at(t,n):n;try{K.localStorage.setItem(X2,JSON.stringify(t))}catch{return!1}return t},DG=n=>n.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(n.substring(n.indexOf(",")+1)):n,Q2=(n,t)=>{n._requestCallbackSet||(n._requestCallbackSet=new Set),n._requestCallbackSet.add(t)},Z2=(n,t)=>{n._responseCallbackSet||(n._responseCallbackSet=new Set),n._responseCallbackSet.add(t)},J2=(n,t)=>{n._requestCallbackSet&&(n._requestCallbackSet.delete(t),n._requestCallbackSet.size||delete n._requestCallbackSet)},ey=(n,t)=>{n._responseCallbackSet&&(n._responseCallbackSet.delete(t),n._responseCallbackSet.size||delete n._responseCallbackSet)};Vt.supportsNativeHls=function(){if(!fe||!fe.createElement)return!1;const n=fe.createElement("video");return oe.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(o){return/maybe|probably/i.test(n.canPlayType(o))}):!1}(),Vt.supportsNativeDash=function(){return!fe||!fe.createElement||!oe.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(fe.createElement("video").canPlayType("application/dash+xml"))}(),Vt.supportsTypeNatively=n=>n==="hls"?Vt.supportsNativeHls:n==="dash"?Vt.supportsNativeDash:!1,Vt.isSupported=function(){return oe.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Vt.xhr.onRequest=function(n){Q2(Vt.xhr,n)},Vt.xhr.onResponse=function(n){Z2(Vt.xhr,n)},Vt.xhr.offRequest=function(n){J2(Vt.xhr,n)},Vt.xhr.offResponse=function(n){ey(Vt.xhr,n)};const $G=oe.getComponent("Component");class ty extends $G{constructor(t,o,a){if(super(o,a.vhs),typeof a.initialBandwidth=="number"&&(this.options_.bandwidth=a.initialBandwidth),this.logger_=no("VhsHandler"),o.options_&&o.options_.playerId){const i=oe.getPlayer(o.options_.playerId);this.player_=i}if(this.tech_=o,this.source_=t,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&o.overrideNativeAudioTracks&&o.overrideNativeVideoTracks)o.overrideNativeAudioTracks(!0),o.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(o.featuresNativeVideoTracks||o.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(fe,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],i=>{const s=fe.fullscreenElement||fe.webkitFullscreenElement||fe.mozFullScreenElement||fe.msFullscreenElement;s&&s.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(t={}){if(this.options_=at(this.options_,t),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const a=K2();a&&a.bandwidth&&(this.options_.bandwidth=a.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),a&&a.throughput&&(this.options_.throughput=a.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=zt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===zt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(a=>{typeof this.source_[a]<"u"&&(this.options_[a]=this.source_[a])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const o=this.options_.customPixelRatio;typeof o=="number"&&o>=0&&(this.customPixelRatio=o)}setOptions(t={}){this.setOptions_(t)}src(t,o){if(!t)return;this.setOptions_(),this.options_.src=DG(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Vt,this.options_.sourceType=Pf(o),this.options_.seekTo=s=>{this.tech_.setCurrentTime(s)},this.options_.player_=this.player_,this.playlistController_=new hG(this.options_);const a=at({liveRangeSafeTimeDelta:Do},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new _G(a),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const s=oe.players[this.tech_.options_.playerId];let l=this.playlistController_.error;typeof l=="object"&&!l.code?l.code=3:typeof l=="string"&&(l={message:l,code:3}),s.error(l)});const i=this.options_.bufferBasedABR?Vt.movingAverageBandwidthSelector(.55):Vt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):i.bind(this),this.playlistController_.selectInitialPlaylist=Vt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(s){this.playlistController_.selectPlaylist=s.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(s){this.playlistController_.mainSegmentLoader_.throughput.rate=s,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let s=this.playlistController_.mainSegmentLoader_.bandwidth;const l=K.navigator.connection||K.navigator.mozConnection||K.navigator.webkitConnection,r=1e7;if(this.options_.useNetworkInformationApi&&l){const c=l.downlink*1e3*1e3;c>=r&&s>=r?s=Math.max(s,c):s=c}return s},set(s){this.playlistController_.mainSegmentLoader_.bandwidth=s,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const s=1/(this.bandwidth||1);let l;return this.throughput>0?l=1/this.throughput:l=0,Math.floor(1/(s+l))},set(){oe.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Ja(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Ja(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&PG({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{yG(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=K.URL.createObjectURL(this.playlistController_.mediaSource),(oe.browser.IS_ANY_SAFARI||oe.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),SG({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(o=>{this.logger_("error while creating EME key session",o),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,o=BG({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});if(this.player_.tech_.on("keystatuschange",a=>{this.playlistController_.updatePlaylistByKeyStatus(a.keyId,a.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!o){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const t=oe.players[this.tech_.options_.playerId];!t||!t.qualityLevels||this.qualityLevels_||(this.qualityLevels_=t.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{EG(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Y2(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":G2,"mux.js":CG,"mpd-parser":VG,"m3u8-parser":xG,"aes-decrypter":kG}}version(){return this.constructor.version()}canChangeType(){return I2.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(t){this.playlistController_.setCurrentTime(t)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&K.URL.revokeObjectURL&&(K.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(t,o){return Mq({playlist:this.playlistController_.media(),time:t,callback:o})}seekToProgramTime(t,o,a=!0,i=2){return l2({programTime:t,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:o})}setupXhrHooks_(){this.xhr.onRequest=t=>{Q2(this.xhr,t)},this.xhr.onResponse=t=>{Z2(this.xhr,t)},this.xhr.offRequest=t=>{J2(this.xhr,t)},this.xhr.offResponse=t=>{ey(this.xhr,t)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const t=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],o=["gapjumped","playedrangeschanged"];t.forEach(a=>{this.playlistController_.on(a,i=>{this.player_.trigger(Et({},i))})}),o.forEach(a=>{this.playbackWatcher_.on(a,i=>{this.player_.trigger(Et({},i))})})}}const Vc={name:"videojs-http-streaming",VERSION:G2,canHandleSource(n,t={}){const o=at(oe.options,t);return!o.vhs.experimentalUseMMS&&!Hs("avc1.4d400d,mp4a.40.2",!1)?!1:Vc.canPlayType(n.type,o)},handleSource(n,t,o={}){const a=at(oe.options,o);return t.vhs=new ty(n,t,a),t.vhs.xhr=n2(),t.vhs.setupXhrHooks_(),t.vhs.src(n.src,n.type),t.vhs},canPlayType(n,t){const o=Pf(n);if(!o)return"";const a=Vc.getOverrideNative(t);return!Vt.supportsTypeNatively(o)||a?"maybe":""},getOverrideNative(n={}){const{vhs:t={}}=n,o=!(oe.browser.IS_ANY_SAFARI||oe.browser.IS_IOS),{overrideNative:a=o}=t;return a}};Hs("avc1.4d400d,mp4a.40.2",!0)&&oe.getTech("Html5").registerSourceHandler(Vc,0),oe.VhsHandler=ty,oe.VhsSourceHandler=Vc,oe.Vhs=Vt,oe.use||oe.registerComponent("Vhs",Vt),oe.options.vhs=oe.options.vhs||{},(!oe.getPlugin||!oe.getPlugin("reloadSourceOnError"))&&oe.registerPlugin("reloadSourceOnError",bG);const LG={name:"MediaVideoPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""}},data(){return{player:null}},mounted(){this.player=oe(this.$refs.videoPlayer,{autoplay:!1,controls:!0,muted:!0,fluid:!0,sources:[{src:this.url,type:"video/mp4"}],poster:this.poster})},beforeDestroy(){this.player&&this.player.dispose()}},AG={ref:"videoPlayer",class:"video-js"};function IG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("video",AG,null,512)}const vG=J(LG,[["render",IG],["__scopeId","data-v-3e044975"]]),MG={name:"YoutubePlayer",props:{url:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},control:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,player:null}},watch:{isPlaying(){this.resetVideo()}},methods:{resetVideo(){this.player=null,this.isRender=!1,this.$nextTick(()=>{this.isRender=!0,this.$nextTick(()=>{setTimeout(this.initPlayer,300)})})},initPlayer(){if(!YT||!document.getElementById(`yt-player-${this.timestamp}`)){setTimeout(this.initPlayer,3e3);return}this.player||(this.player=new YT.Player(`yt-player-${this.timestamp}`,{origin:"http://localhost:3000/",events:{onStateChange:this.onPlayerStateChange}}))},onPlayerStateChange(){this.player.getPlayerState()==0&&this.$emit("playEnd")}},mounted(){this.$nextTick(()=>{setTimeout(this.initPlayer,300)})}},OG={class:"youtube-player"},UG=["id","src"];function RG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",OG,[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["video-foreground",{"show-control-n-fit":o.control}])},[e.createElementVNode("iframe",{id:`yt-player-${i.timestamp}`,ref:"player",width:"1280",height:"537",src:`${o.url}?enablejsapi=1&controls=${o.control?1:0}&autoplay=${o.autoplay||o.isPlaying}&mute=${o.mute?1:0}`,title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",sandbox:"allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"},null,8,UG)],2)):e.createCommentVNode("",!0)])}const FG=J(MG,[["render",RG],["__scopeId","data-v-ca2b2fbb"]]),HG={name:"BilibiliPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,wrapperRatio:1}},computed:{isVideoWider(){return this.wrapperRatio>1}},watch:{isPlaying(n,t){this.resetVideo()}},methods:{resetVideo(){this.isRender=!1,this.$nextTick(()=>{this.isRender=!0})}},mounted(){this.$nextTick(()=>{this.wrapperRatio=this.$refs.wrapper.clientWidth/this.$refs.wrapper.clientHeight})}},jG={class:"bilibili-player",ref:"wrapper"},zG=["id","src"];function qG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",jG,[e.createElementVNode("div",{class:e.normalizeClass(["video-foreground",[{"video-foreground--wider":s.isVideoWider,"video-foreground--higher":!s.isVideoWider}]])},[i.isRender?(e.openBlock(),e.createElementBlock("iframe",{key:0,id:`bilibili-player-${i.timestamp}`,scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",src:`${o.url}&high_quality=1&danmaku=0&as_wide=1`},null,8,zG)):e.createCommentVNode("",!0)],2)],512)}const WG=J(HG,[["render",qG],["__scopeId","data-v-40e15401"]]),GG={name:"YoukuPlayer",props:{url:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0}},methods:{resetVideo(){this.isRender=!1,this.$nextTick(()=>{this.isRender=!0})}}},XG={class:"youku-player"},YG=["src","id"];function KG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",XG,[e.createElementVNode("iframe",{width:"1280",height:"537",src:`${o.url}?rel=0&autoplay=${o.isPlaying}`,frameborder:"0",allowfullscreen:"",id:`youku-player-${i.timestamp}`,sandbox:"allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"},null,8,YG)])}const QG=J(GG,[["render",KG],["__scopeId","data-v-cf32c3a0"]]),ZG={name:"QqPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,player:null,wrapperRatio:1}},computed:{isVideoWider(){return this.wrapperRatio>1}},watch:{isPlaying(){this.resetVideo()}},methods:{resetVideo(){this.player=null,this.isRender=!1,this.$nextTick(()=>{this.isRender=!0,this.$nextTick(()=>{setTimeout(this.initPlayer,300)})})},initPlayer(){const n=document.getElementById(`qq-player-${this.timestamp}`);if(!Txp||!n){setTimeout(this.initPlayer,3e3);return}if(this.player)return;this.player=new Txp.Player({containerId:`qq-player-${this.timestamp}`,vid:this.url,width:"100%",height:"100%",autoplay:this.autoplay||this.$_vsWidth>=768||this.isPlaying,mini:!0,muted:this.mute,volume:this.mute?0:50});const t=n.querySelector("iframe");t.sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation",this.player.on("playStateChange",this.onPlayerStateChange)},onPlayerStateChange(n){n.state==0&&this.$emit("playEnd")}},mounted(){this.$nextTick(()=>{this.wrapperRatio=this.$refs.wrapper.clientWidth/this.$refs.wrapper.clientHeight,setTimeout(this.initPlayer,300)})}},JG={class:"qq-player",ref:"wrapper"},eX=["id"],tX={class:"qq-player__poster"},nX=["src"];function oX(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",JG,[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["video-foreground",[{"video-foreground--wider":s.isVideoWider,"video-foreground--higher":!s.isVideoWider}]])},[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iframe",id:`qq-player-${i.timestamp}`},null,8,eX)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",tX,[e.createElementVNode("img",{src:o.poster,alt:"poster"},null,8,nX)],512),[[e.vShow,!o.isPlaying&&!o.autoplay]])],512)}const aX=J(ZG,[["render",oX],["__scopeId","data-v-719611b1"]]),iX={name:"FbPlayer",props:{html:{type:String,default:()=>""}},mounted(){this.loadFacebookSDK()},methods:{loadFacebookSDK(){if(document.querySelector('script[src*="connect.facebook.net"]'))return;const n=document.createElement("script");n.async=!0,n.defer=!0,n.crossOrigin="anonymous",n.src="https://connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v14.0",n.nonce="5tyirFAy",document.body.appendChild(n)}}},sX={class:"fb-player",ref:"wrapper"},lX=["innerHTML"];function rX(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",sX,[t[0]||(t[0]=e.createElementVNode("div",{id:"fb-root"},null,-1)),e.createElementVNode("div",{innerHTML:o.html},null,8,lX)],512)}const dX=J(iX,[["render",rX],["__scopeId","data-v-c5a2a3ed"]]),cX={class:"media_video_wrap"},uX={class:"img-wrapper"},xc=J(e.defineComponent({name:"MediaVideo",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(!1),s=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"MediaVideo",onlyShowPc:!1,data:{width:"default",type:"inner",videoSrc:"https://mvideo.ycyw.com/2e1a9441vodgzp1253458132/a31402d51397757891052265568/SW8B19vOtzMA.mp4",videoThumbnail:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}};a("update:modelValue",p)},l=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return s(),(p,f)=>{var h,C,w,x,y,b,V,T,k,S,D,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaVideo_wrap_box",onMouseenter:f[2]||(f[2]=A=>r.value=!0),onMouseleave:f[3]||(f[3]=A=>r.value=!1)},[e.createElementVNode("div",cX,[e.createElementVNode("div",{class:e.normalizeClass(["media-video__container",u.value])},[e.createElementVNode("div",uX,[((C=(h=n.modelValue)==null?void 0:h.data)==null?void 0:C.type)==="inner"?(e.openBlock(),e.createBlock(vG,{key:0,url:n.modelValue.data.videoSrc,poster:n.modelValue.data.videoThumbnail},null,8,["url","poster"])):e.createCommentVNode("",!0),((x=(w=n.modelValue)==null?void 0:w.data)==null?void 0:x.type)==="youtube"?(e.openBlock(),e.createBlock(FG,{key:1,url:n.modelValue.data.videoSrc,isPlaying:i.value,control:!0,autoplay:i.value},null,8,["url","isPlaying","autoplay"])):e.createCommentVNode("",!0),((b=(y=n.modelValue)==null?void 0:y.data)==null?void 0:b.type)==="bilibili"?(e.openBlock(),e.createBlock(WG,{key:2,url:n.modelValue.data.videoSrc,isPlaying:i.value},null,8,["url","isPlaying"])):e.createCommentVNode("",!0),((T=(V=n.modelValue)==null?void 0:V.data)==null?void 0:T.type)==="youku"?(e.openBlock(),e.createBlock(QG,{key:3,url:n.modelValue.data.videoSrc,isPlaying:i.value},null,8,["url","isPlaying"])):e.createCommentVNode("",!0),((S=(k=n.modelValue)==null?void 0:k.data)==null?void 0:S.type)==="qq"?(e.openBlock(),e.createBlock(aX,{key:4,url:n.modelValue.data.videoSrc,isPlaying:i.value,autoplay:i.value},null,8,["url","isPlaying","autoplay"])):e.createCommentVNode("",!0),((N=(D=n.modelValue)==null?void 0:D.data)==null?void 0:N.type)==="facebook"?(e.openBlock(),e.createBlock(dX,{key:5,html:n.modelValue.data.videoSrc},null,8,["html"])):e.createCommentVNode("",!0)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[0]||(f[0]=A=>r.value=A),onHandleEdit:f[1]||(f[1]=A=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PR,{key:1,show:c.value,"onUpdate:show":f[4]||(f[4]=A=>c.value=A),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-79406f1a"]]),mX=Object.freeze(Object.defineProperty({__proto__:null,default:xc},Symbol.toStringTag,{value:"Module"})),pX={class:"setting-content"},hX={class:"setting-header flex items-center"},fX=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",pX,[e.createElementVNode("div",hX,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),s[9]||(s[9]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[10]||(s[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(u,{modelValue:n.data.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[11]||(s[11]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(u,{modelValue:n.data.data.link,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.link=m),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-ba14f699"]]),gX={class:"information-link__wrapper"},yX={key:0},_X=["innerHTML"],wX={key:1,class:"information-link__btn btn p-0",type:"button"},bX=["innerHTML"],kc=J(e.defineComponent({name:"InformationLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=p=>{a("handleClick",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"InformationLink",onlyShowPc:!1,data:{width:"default",title:"这里是标题",link:"https://www.baidu.com"}};a("update:modelValue",p)},r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return l(),(p,f)=>{var h,C,w,x,y,b,V,T;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"informationLink_wrap",onMouseenter:f[3]||(f[3]=k=>r.value=!0),onMouseleave:f[4]||(f[4]=k=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full",u.value])},[e.createElementVNode("div",gX,[(C=(h=n.modelValue)==null?void 0:h.data)!=null&&C.link?(e.openBlock(),e.createElementBlock("div",yX,[(x=(w=n.modelValue)==null?void 0:w.data)!=null&&x.link?(e.openBlock(),e.createElementBlock("div",{key:0,target:"_blank",class:"information-link__btn btn p-0",onClick:f[0]||(f[0]=k=>{var S,D;return i((D=(S=n.modelValue)==null?void 0:S.data)==null?void 0:D.link)})},[e.createElementVNode("h6",{class:"information-link__title",innerHTML:(b=(y=n.modelValue)==null?void 0:y.data)==null?void 0:b.title},null,8,_X),f[6]||(f[6]=e.createElementVNode("div",{class:"i i-arrow-next"},null,-1))])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",wX,[e.createElementVNode("h6",{class:"information-link__title",innerHTML:(T=(V=n.modelValue)==null?void 0:V.data)==null?void 0:T.title},null,8,bX),f[7]||(f[7]=e.createElementVNode("div",{class:"i i-arrow-next"},null,-1))]))])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[1]||(f[1]=k=>r.value=k),onHandleEdit:f[2]||(f[2]=k=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fX,{key:1,show:c.value,"onUpdate:show":f[5]||(f[5]=k=>c.value=k),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b42edfbc"]]),CX=Object.freeze(Object.defineProperty({__proto__:null,default:kc},Symbol.toStringTag,{value:"Module"})),VX={key:0,class:"tab-primary__btn__img flex-center"},xX=["src","alt"],kX={key:1},EX=J({__name:"TabPrimary",props:{tabList:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:()=>0},isFixed:{type:Boolean,default:()=>!1},fullWidth:{type:Boolean,default:()=>!1}},emits:["updateCurrentIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=e.ref(null),g=e.ref(null),m=e.ref([]),d=e.ref(0),p=e.ref(.5*a.value),f=e.ref(0),h=e.ref(!0),C=e.ref(!0),w=e.ref(0),x=e.ref(!1),y=e.ref(0),b=e.ref(0),V=e.ref(0);e.ref(0);const T=e.ref(null),k=e.ref(null),S=e.ref(null),D=e.ref(null),N=e.ref(null),A=e.computed(()=>d.value-p.value),$=e.computed(()=>[{"--strip-width":`${A.value}px`},{"--strip-left":`${p.value}px`},{"--fix-left":`${f.value}px`},{transition:C.value?"left 0.2s ease-in-out, width 0.2s ease-in-out":""}]),I=e.computed(()=>y.value>0),U=e.computed(()=>b.value-y.value+Y.value>V.value),Y=e.computed(()=>{if(!x.value)return 24;const _e=u.value;return _e?window.getComputedStyle(_e,null).getPropertyValue("padding-right").split("px")[0]*2:24}),G=e.computed(()=>!1);e.watch(a,()=>{R(),M()}),e.watch(()=>r.currentIdx,(_e,se)=>{h.value=_e>se,e.nextTick(q),e.nextTick(ie)}),e.watch(()=>r.tabList,(_e,se)=>{M(),e.nextTick(()=>{q(0)})},{deep:!0}),e.watch(()=>r.isFixed,()=>{a.value>1200&&R(),e.nextTick(M)});const q=_e=>{const se=_e??250;h.value?(O(),D.value=setTimeout(H,se)):(H(),D.value=setTimeout(O,se)),N.value=setTimeout(()=>{C.value=!0},se)},O=()=>{const _e=m.value;let se=null;_e&&_e[r.currentIdx]&&(se=_e[r.currentIdx]),se&&se.getBoundingClientRect&&(d.value=se.getBoundingClientRect().right)},H=()=>{const _e=m.value;let se=null;_e&&_e[r.currentIdx]&&(se=_e[r.currentIdx]),se&&se.getBoundingClientRect&&(p.value=se.getBoundingClientRect().left)},R=()=>{C.value=!1,e.nextTick(()=>q(0)),e.nextTick(W)},M=()=>{const _e=u.value;if(_e){let se=_e.getBoundingClientRect().left;f.value=(_e.offsetWidth-_e.getBoundingClientRect().width)/2+se}},W=()=>{if(r.tabList.length<=0)return;const _e=g.value;_e&&(y.value=_e.scrollLeft,b.value=_e.scrollWidth);const se=u.value;se&&(V.value=se.getBoundingClientRect().width)},Z=_e=>{g.value&&(_e=="next"?g.value.scrollLeft+=9999:g.value.scrollLeft-=9999)},ie=()=>{const _e=m.value[r.currentIdx];if(!_e)return;const se=_e.clientWidth/2,pe=a.value/2;w.value=_e.getBoundingClientRect().right-se,g.value&&(g.value.scrollLeft-=pe-w.value)},ge=(_e,se)=>{_e||c("updateCurrentIdx",se)},Le=_e=>_e?_e.includes("http")?"a":"RouterLink":"button",ae=_e=>_e&&!_e.includes("http")?_e:null,ye=_e=>_e&&_e.includes("http")?_e:null,ve=_e=>_e&&_e.includes("http")?"_blank":null;return e.onMounted(()=>{x.value=!0,e.nextTick(()=>{q(0),T.value=setTimeout(R,300),M(),e.nextTick(()=>{k.value=setTimeout(ie,300)})})}),e.onBeforeUnmount(()=>{clearTimeout(T.value),clearTimeout(k.value),clearTimeout(S.value),clearTimeout(D.value),clearTimeout(N.value),window.removeEventListener("resize",()=>{a.value=window.innerWidth})}),(_e,se)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-primary",[{"is-fixed":n.isFixed},{"is-campus":!G.value},{"is-full-width":n.fullWidth}]]),ref_key:"wrapper",ref:u},[e.createElementVNode("ul",{class:"tab-primary__list",ref_key:"list",ref:g,onScroll:R},[e.withDirectives(e.createElementVNode("div",{class:"tab-primary__nav__prev",onClick:se[0]||(se[0]=pe=>Z("prev"))},null,512),[[e.vShow,I.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,(pe,le)=>(e.openBlock(),e.createElementBlock("li",{key:le,class:e.normalizeClass(["tab-primary__item",[{"is-img":!!pe.img}]])},[e.createElementVNode("div",{ref_for:!0,ref_key:"btnRefs",ref:m,class:"flex-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Le(pe.link)),{type:pe.link?null:"button",to:ae(pe.link),href:ye(pe.link),target:ve(pe.link),class:e.normalizeClass(["tab-primary__btn",[{"is-active":n.currentIdx==le}]]),onClick:he=>ge(pe.link,le)},{default:e.withCtx(()=>[pe.img?(e.openBlock(),e.createElementBlock("div",VX,[e.createElementVNode("img",{src:pe.img,alt:pe.alt||pe.name},null,8,xX)])):(e.openBlock(),e.createElementBlock("div",kX,e.toDisplayString(pe.name),1))]),_:2},1032,["type","to","href","target","class","onClick"]))],512)],2))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-primary__nav__next",onClick:se[1]||(se[1]=pe=>Z("next"))},null,512),[[e.vShow,U.value]])],544),e.createElementVNode("span",{class:"tab-primary__strip",style:e.normalizeStyle($.value)},null,4)],2))}},[["__scopeId","data-v-8d9081ac"]]),TX={class:"setting-content"},NX={class:"setting-header flex items-center"},SX={class:"setting-body"},BX={class:"setting-toolbar"},PX={class:"tools"},DX={class:"setting-item"},$X={class:"item-header"},LX={class:"btn-group"},AX={key:0,class:"drag-handle"},IX={class:"components-content"},vX={class:"setting-body"},MX={class:"setting-toolbar"},OX={class:"tools"},UX={class:"setting-item"},RX={class:"item-header"},FX={class:"btn-group"},HX={key:0,class:"drag-handle"},jX={class:"components-content"},zX=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,c=t,u=()=>{c("update:show",!1)},g=d=>{var f;debugger;const p=r.data;d==="listAbove"?p.listAbove.push({id:F(),key:F(),name:"New Tab",componentsDataJson:[{id:((f=r.modelValue)==null?void 0:f.id)||F(),type:"BannerImage",onlyShowPc:!1,data:{title:"这里是标题",imgSrc:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/about-ywies/01_About_YWIES_1_Header.jpg"}}]}):p.data.push({id:F(),key:F(),name:"New Tab",link:"",componentsDataJson:[]})},m=(d,p)=>{p==="listAbove"?r.data.listAbove=r.data.listAbove.filter(f=>f.id!==d):r.data.data=r.data.data.filter(f=>f.id!==d)};return(d,p)=>{const f=e.resolveComponent("a-switch"),h=e.resolveComponent("icon-plus"),C=e.resolveComponent("a-button"),w=e.resolveComponent("icon-drag-arrow"),x=e.resolveComponent("icon-delete"),y=e.resolveComponent("a-input"),b=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(b,{width:"60%",visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",TX,[e.createElementVNode("div",NX,[p[13]||(p[13]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(f,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=V=>n.data.onlyShowPc=V)},null,8,["modelValue"])]),e.createElementVNode("div",SX,[e.createElementVNode("div",BX,[p[16]||(p[16]=e.createElementVNode("h1",null,"List Above",-1)),e.createElementVNode("div",PX,[e.createVNode(C,{type:"primary",onClick:p[1]||(p[1]=V=>g("listAbove"))},{icon:e.withCtx(()=>[e.createVNode(h)]),default:e.withCtx(()=>[p[14]||(p[14]=e.createTextVNode(" 添加 List Above ",-1))]),_:1}),e.createVNode(C,{type:"primary",onClick:p[2]||(p[2]=V=>g("listAbove"))},{default:e.withCtx(()=>[...p[15]||(p[15]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",DX,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.listAbove,"onUpdate:modelValue":p[4]||(p[4]=V=>n.data.listAbove=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:p[5]||(p[5]=V=>a.value=!0),onEnd:p[6]||(p[6]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:V.id},[e.createElementVNode("div",$X,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(V.name),1),e.createElementVNode("span",null,e.toDisplayString(V.key),1)]),e.createElementVNode("div",LX,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",AX,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(x,{class:"btn-delete",onClick:T=>m(V.id,"listAbove")},null,8,["onClick"]),e.createVNode(C,{size:"mini",type:"primary",onClick:p[3]||(p[3]=T=>g("Video"))},{default:e.withCtx(()=>[...p[17]||(p[17]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),p[18]||(p[18]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(y,{modelValue:V.name,"onUpdate:modelValue":T=>V.name=T,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[19]||(p[19]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(y,{modelValue:V.key,"onUpdate:modelValue":T=>V.key=T,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[20]||(p[20]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",IX,[e.createVNode(Fa,{data:V.componentsDataJson,onUpdate:T=>V.componentsDataJson=T},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])]),e.createElementVNode("div",vX,[e.createElementVNode("div",MX,[p[23]||(p[23]=e.createElementVNode("h1",null,"List",-1)),e.createElementVNode("div",OX,[e.createVNode(C,{type:"primary",onClick:p[7]||(p[7]=V=>g("Video"))},{icon:e.withCtx(()=>[e.createVNode(h)]),default:e.withCtx(()=>[p[21]||(p[21]=e.createTextVNode(" 添加 List ",-1))]),_:1}),e.createVNode(C,{type:"primary",onClick:p[8]||(p[8]=V=>g("Video"))},{default:e.withCtx(()=>[...p[22]||(p[22]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",UX,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":p[10]||(p[10]=V=>n.data.data=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.data),onStart:p[11]||(p[11]=V=>a.value=!0),onEnd:p[12]||(p[12]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:V.id},[e.createElementVNode("div",RX,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(V.name),1),e.createElementVNode("span",null,e.toDisplayString(V.key),1)]),e.createElementVNode("div",FX,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",HX,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(x,{class:"btn-delete",onClick:T=>m(V.id,"list")},null,8,["onClick"]),e.createVNode(C,{size:"mini",type:"primary",onClick:p[9]||(p[9]=T=>g("Video"))},{default:e.withCtx(()=>[...p[24]||(p[24]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),p[25]||(p[25]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(y,{modelValue:V.name,"onUpdate:modelValue":T=>V.name=T,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[26]||(p[26]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(y,{modelValue:V.key,"onUpdate:modelValue":T=>V.key=T,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[27]||(p[27]=e.createElementVNode("p",{class:"item-title"},"Link",-1)),e.createVNode(y,{modelValue:V.link,"onUpdate:modelValue":T=>V.link=T,placeholder:"请输入link","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[28]||(p[28]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",jX,[e.createVNode(Fa,{data:V.componentsDataJson,onUpdate:T=>V.componentsDataJson=T},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-63c63489"]]),qX={class:"tab-page__above"},WX={key:0},GX={class:"tab-page__content"},XX={key:0},YX="",Ec=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=t,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a,c=n,u=e.ref(0),g=e.ref(!1),m=e.ref(!0),d=e.ref(null),p=e.ref(null),f=e.ref(!1),h=e.ref(!1),C=H=>{if(!H)return{top:0,left:0};const R=H.getBoundingClientRect(),M=window.pageYOffset||document.documentElement.scrollTop,W=window.pageXOffset||document.documentElement.scrollLeft;return{top:R.top+M,left:R.left+W}},w=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.classes)??null}),x=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.style)??null});e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.type)??"TabPrimary"});const y=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.listAbove)??[]}),b=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.data)??[]}),V=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.fixed)??!0}),T=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.resetToTop)??!0}),k=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.scrollToTop)??!0}),S=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.fullWidth)??!1});e.computed(()=>0),e.computed(()=>!1);const D=e.computed(()=>b.value.some(H=>H.img)),N=e.computed(()=>{var H;return((H=b.value[u.value])==null?void 0:H.key)??null}),A=e.computed(()=>{var R;if(!((R=c.modelValue)!=null&&R.data)||!Array.isArray(c.modelValue.data))return[];const H=c.modelValue.data[u.value];return H?H.componentsDataJson||[]:[]}),$=()=>{var R;if(c.modelValue&&c.modelValue.data)return;const H={id:((R=c.modelValue)==null?void 0:R.id)||F(),type:"TabPage",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",listAbove:[],data:[{id:F(),key:F(),name:"New Tab1",componentsDataJson:[]},{id:F(),key:F(),name:"New Tab2",componentsDataJson:[]}]};o("update:modelValue",H),u.value=0},I=()=>{var ie,ge;const H=p.value;if(!H)return;const R=H.getBoundingClientRect().top,M=d.value;if(!M)return;const W=M.getBoundingClientRect().top,Z=+((ge=(ie=window.getComputedStyle(document.body))==null?void 0:ie.getPropertyValue("--header-height-calc"))==null?void 0:ge.split("px")[0])||0;if(W>Z){g.value=!1;return}R<=Z&&(g.value=!0)},U=()=>{if(!k.value)return;let H=0;T.value||(H=C(d.value).top-170),window.scroll({top:H,left:0,behavior:"smooth"})},Y=H=>{sessionStorage.setItem(YX,H)},G=(H,R)=>{debugger;o("handleDelete",H||c.modelValue.id,R)},q=H=>{debugger;o("handleCopy",H||c.modelValue)},O=(H,R,M)=>{debugger;o("handlePaste",H,R,M)};return e.watch(()=>s.value,()=>{I()}),e.watch(u,()=>{Y(N.value),m.value&&U(),m.value=!0}),e.watch(N,H=>{H||(u.value=0)}),e.onMounted(()=>{$(),e.nextTick(I),setTimeout(()=>{e.nextTick(I)},200),setTimeout(()=>{},1e3)}),(H,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-page",w.value]),style:e.normalizeStyle(x.value),onMouseover:R[8]||(R[8]=M=>h.value=!0),onMouseout:R[9]||(R[9]=M=>h.value=!1)},[e.createElementVNode("div",qX,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("div",{key:N.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,M=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[N.value==M.key?(e.openBlock(),e.createElementBlock("div",WX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.componentsDataJson,(W,Z)=>(e.openBlock(),e.createBlock(Co,{key:W.id,type:W.type,"props-data":{modelValue:W,isPreview:!1},onHandleDelete:R[0]||(R[0]=ie=>G(ie,A.value)),onHandleCopy:R[1]||(R[1]=ie=>q(ie)),onHandlePaste:ie=>O(ie,A.value,Z)},null,8,["type","props-data","onHandlePaste"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["tab-page__hold",[{"is-fixed":g.value&&V.value},{"is-thick":D.value}]]),ref_key:"hold",ref:d},[e.createElementVNode("div",{class:"tab-page__nav",ref_key:"tab",ref:p},[e.createVNode(EX,{tabList:b.value,currentIdx:u.value,isFixed:g.value&&V.value,fullWidth:S.value,onUpdateCurrentIdx:R[2]||(R[2]=M=>u.value=M)},null,8,["tabList","currentIdx","isFixed","fullWidth"])],512)],2),e.createElementVNode("div",GX,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("div",{key:N.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,M=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[N.value==M.key?(e.openBlock(),e.createElementBlock("div",XX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.componentsDataJson,(W,Z)=>(e.openBlock(),e.createBlock(Co,{key:W.id,type:W.type,"props-data":{modelValue:W,isPreview:!1},onHandleDelete:R[3]||(R[3]=ie=>G(ie,A.value)),onHandleCopy:R[4]||(R[4]=ie=>q(ie)),onHandlePaste:ie=>O(ie,A.value,Z)},null,8,["type","props-data","onHandlePaste"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:h.value,"onUpdate:show":R[5]||(R[5]=M=>h.value=M),onHandleEdit:R[6]||(R[6]=M=>f.value=!0),onHandleDelete:G,onHandleCopy:q,onHandlePaste:O,style:{top:"-22px"}},null,8,["show"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(zX,{key:1,show:f.value,"onUpdate:show":R[7]||(R[7]=M=>f.value=M),data:n.modelValue},null,8,["show","data"]))],38))}},[["__scopeId","data-v-e4479cfa"]]),KX=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"})),QX={class:"tab-logo__btn__img flex-center"},ZX=["src","alt"],JX=J({__name:"TabLogo",props:{tabList:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0},isFixed:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},emits:["updateCurrentIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=e.ref(0),g=e.ref(.5*a.value),m=e.ref(0),d=e.ref(!0),p=e.ref(!0),f=e.ref(0),h=e.ref(!1),C=e.ref(0),w=e.ref(0),x=e.ref(0),y=e.ref(null),b=e.ref(null),V=e.ref([]),T=W=>W||"",k=e.computed(()=>u.value-g.value),S=e.computed(()=>[{"--strip-width":`${k.value}px`},{"--strip-left":`${g.value}px`},{"--fix-left":`${m.value}px`},{transition:p.value?"left 0.2s ease-in-out, width 0.2s ease-in-out":""}]),D=e.computed(()=>C.value>0),N=e.computed(()=>w.value-C.value+A.value>x.value),A=e.computed(()=>{if(!h.value)return 24;const W=y.value;if(!W)return 24;const Z=window.getComputedStyle(W,null).getPropertyValue("padding-right").split("px")[0];return Number(Z)*2}),$=e.computed(()=>!1);e.watch(a,()=>{G(),q()}),e.watch(()=>r.currentIdx,(W,Z)=>{d.value=W>Z,e.nextTick(()=>I()),e.nextTick(()=>R())}),e.watch(()=>r.isFixed,()=>{a.value>1200&&G(),e.nextTick(()=>q())}),e.watch(()=>r.tabList,(W,Z)=>{q(),e.nextTick(()=>{I(0)})},{deep:!0});const I=W=>{const Z=W??250;d.value?(U(),setTimeout(Y,Z)):(Y(),setTimeout(U,Z)),setTimeout(()=>{p.value=!0},Z)},U=()=>{const W=V.value[r.currentIdx];W&&W.getBoundingClientRect&&(u.value=W.getBoundingClientRect().right)},Y=()=>{const W=V.value[r.currentIdx];W&&W.getBoundingClientRect&&(g.value=W.getBoundingClientRect().left)},G=()=>{p.value=!1,e.nextTick(()=>I(0)),e.nextTick(()=>O())},q=()=>{const W=y.value;if(W){let Z=W.getBoundingClientRect().left;m.value=(W.offsetWidth-W.getBoundingClientRect().width)/2-Z}},O=()=>{r.tabList.length<=0||(b.value&&(C.value=b.value.scrollLeft,w.value=b.value.scrollWidth),y.value&&(x.value=y.value.getBoundingClientRect().width))},H=W=>{b.value&&(W=="next"?b.value.scrollLeft+=9999:b.value.scrollLeft-=9999)},R=()=>{const W=V.value[r.currentIdx];if(!W)return;const Z=W.clientWidth/2,ie=a.value/2;f.value=W.getBoundingClientRect().right-Z,b.value&&(b.value.scrollLeft-=ie-f.value)},M=W=>{c("updateCurrentIdx",W)};return e.onMounted(()=>{h.value=!0,e.nextTick(()=>{I(0),setTimeout(G,300),q(),e.nextTick(()=>{setTimeout(R,300)})})}),(W,Z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-logo",[{"is-fixed":n.isFixed},{"is-campus":!$.value},{"is-full-width":n.fullWidth}]]),ref_key:"wrapper",ref:y},[e.createElementVNode("ul",{class:"tab-logo__list",ref_key:"list",ref:b,onScroll:G},[e.withDirectives(e.createElementVNode("div",{class:"tab-logo__nav__prev",onClick:Z[0]||(Z[0]=ie=>H("prev"))},null,512),[[e.vShow,D.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,(ie,ge)=>(e.openBlock(),e.createElementBlock("li",{key:ge,class:e.normalizeClass(["tab-logo__item",[{"tab-logo__item--img":!!ie.img}]])},[e.createElementVNode("div",{ref_for:!0,ref_key:"btn",ref:V,class:"flex-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie.link?"nuxt-link":"button"),{type:ie.link?null:"button",to:T(ie.link),class:e.normalizeClass(["tab-logo__btn",[{"is-active":n.currentIdx==ge}]]),onClick:Le=>M(ge)},{default:e.withCtx(()=>[e.createElementVNode("div",QX,[e.createElementVNode("img",{src:ie.img,alt:ie.alt},null,8,ZX)])]),_:2},1032,["type","to","class","onClick"]))],512)],2))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-logo__nav__next",onClick:Z[1]||(Z[1]=ie=>H("next"))},null,512),[[e.vShow,N.value]])],544),e.createElementVNode("span",{class:"tab-logo__strip",style:e.normalizeStyle(S.value)},null,4)],2))}},[["__scopeId","data-v-25fd5872"]]),eY={class:"setting-content"},tY={class:"setting-header flex items-center"},nY={class:"setting-body"},oY={class:"setting-toolbar"},aY={class:"tools"},iY={class:"setting-item"},sY={class:"item-header"},lY={class:"btn-group"},rY={key:0,class:"drag-handle"},dY=["src"],cY={class:"item-uplaod flex items-center"},uY={class:"components-content"},mY=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1}));e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1}));const s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=m=>{debugger;l.data.data.push({id:F(),key:F(),name:"New Tab",img:"https://osswebsite-test.cedim.cn/media-library/shared/24-25%E5%BC%80%E5%AD%A6/640-5.jpg",alt:"yew-chung-international-school",componentsDataJson:[]})},g=(m,d)=>{l.data.data=l.data.data.filter(p=>p.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("icon-plus"),h=e.resolveComponent("a-button"),C=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),x=e.resolveComponent("a-input"),y=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(y,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",eY,[e.createElementVNode("div",tY,[d[7]||(d[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=b=>n.data.onlyShowPc=b)},null,8,["modelValue"])]),e.createElementVNode("div",nY,[e.createElementVNode("div",oY,[d[10]||(d[10]=e.createElementVNode("h1",null,"List",-1)),e.createElementVNode("div",aY,[e.createVNode(h,{type:"primary",onClick:d[1]||(d[1]=b=>u())},{icon:e.withCtx(()=>[e.createVNode(f)]),default:e.withCtx(()=>[d[8]||(d[8]=e.createTextVNode(" 添加 List ",-1))]),_:1}),e.createVNode(h,{type:"primary",onClick:d[2]||(d[2]=b=>u())},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",iY,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[4]||(d[4]=b=>n.data.data=b),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[5]||(d[5]=b=>a.value=!0),onEnd:d[6]||(d[6]=b=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:b.id},[e.createElementVNode("div",sY,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(b.name),1),e.createElementVNode("span",null,e.toDisplayString(b.key),1)]),e.createElementVNode("div",lY,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",rY,[e.createVNode(C,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:V=>g(b.id)},null,8,["onClick"]),e.createVNode(h,{size:"mini",type:"primary",onClick:d[3]||(d[3]=V=>u())},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[12]||(d[12]=e.createElementVNode("p",{class:"item-title"},"Alt",-1)),e.createVNode(x,{modelValue:b.alt,"onUpdate:modelValue":V=>b.alt=V,placeholder:"请输入alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[13]||(d[13]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(x,{modelValue:b.key,"onUpdate:modelValue":V=>b.key=V,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[14]||(d[14]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:b.img},null,8,dY),e.createElementVNode("div",cY,[e.createVNode(x,{modelValue:b.img,"onUpdate:modelValue":V=>b.img=V,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:b.img,"onUpdate:modelValue":V=>b.img=V,name:b.key},null,8,["modelValue","onUpdate:modelValue","name"])]),d[15]||(d[15]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",uY,[e.createVNode(Fa,{data:b.componentsDataJson,onUpdate:V=>b.componentsDataJson=V},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-c52189f2"]]),pY={class:"tab-page__content"},hY={key:0},fY="",Tc=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=t,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a,c=n,u=e.ref(0),g=e.ref(!1),m=e.ref(!0),d=e.ref(null),p=e.ref(null),f=e.ref(!1),h=e.ref(!1),C=O=>{if(!O)return{top:0,left:0};const H=O.getBoundingClientRect(),R=window.pageYOffset||document.documentElement.scrollTop,M=window.pageXOffset||document.documentElement.scrollLeft;return{top:H.top+R,left:H.left+M}},w=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.classes)??null}),x=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.style)??null});e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.type)??"TabPrimary"});const y=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.data)??[]}),b=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.fixed)??!0}),V=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.resetToTop)??!0}),T=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.scrollToTop)??!0}),k=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.fullWidth)??!1});e.computed(()=>0),e.computed(()=>!1);const S=e.computed(()=>y.value.some(O=>O.img)),D=e.computed(()=>{var O;return((O=y.value[u.value])==null?void 0:O.key)??null}),N=e.computed(()=>{var H;if(!((H=c.modelValue)!=null&&H.data)||!Array.isArray(c.modelValue.data))return[];const O=c.modelValue.data[u.value];return O?O.componentsDataJson||[]:[]}),A=()=>{var H;if(c.modelValue&&c.modelValue.data)return;const O={id:((H=c.modelValue)==null?void 0:H.id)||F(),type:"TabLogo",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",resetToTop:!1,fullWidth:!0,fixed:!1,scrollToTop:!1,data:[{id:F(),key:F(),img:"https://osswebsite-test.cedim.cn/media-library/shared/24-25%E5%BC%80%E5%AD%A6/640-5.jpg",alt:"yew-chung-international-school",name:"New Tab1",componentsDataJson:[]},{id:F(),key:F(),img:"https://osswebsite-test.cedim.cn/media-library/shared/24-25%E5%BC%80%E5%AD%A6/640-5.jpg",alt:"yew-chung-international-school",name:"New Tab2",componentsDataJson:[]}]};o("update:modelValue",O),u.value=0},$=()=>{var Z,ie;const O=p.value;if(!O)return;const H=O.getBoundingClientRect().top,R=d.value;if(!R)return;const M=R.getBoundingClientRect().top,W=+((ie=(Z=window.getComputedStyle(document.body))==null?void 0:Z.getPropertyValue("--header-height-calc"))==null?void 0:ie.split("px")[0])||0;if(M>W){g.value=!1;return}H<=W&&(g.value=!0)},I=()=>{if(!T.value)return;let O=0;V.value||(O=C(d.value).top-170),window.scroll({top:O,left:0,behavior:"smooth"})},U=O=>{sessionStorage.setItem(fY,O)},Y=(O,H)=>{debugger;o("handleDelete",O||c.modelValue.id,H)},G=O=>{debugger;o("handleCopy",O||c.modelValue)},q=(O,H,R)=>{debugger;o("handlePaste",O,H,R)};return e.watch(()=>s.value,()=>{$()}),e.watch(u,()=>{U(D.value),m.value&&I(),m.value=!0}),e.watch(D,O=>{O||(u.value=0)}),e.onMounted(()=>{A(),e.nextTick($),setTimeout(()=>{e.nextTick($)},200),setTimeout(()=>{},1e3)}),(O,H)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-page",w.value]),style:e.normalizeStyle(x.value),onMouseover:H[6]||(H[6]=R=>h.value=!0),onMouseout:H[7]||(H[7]=R=>h.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-page__hold",[{"is-fixed":g.value&&b.value},{"is-thick":S.value}]]),ref_key:"hold",ref:d},[e.createElementVNode("div",{class:"tab-page__nav",ref_key:"tab",ref:p},[e.createVNode(JX,{tabList:y.value,currentIdx:u.value,isFixed:g.value&&b.value,fullWidth:k.value,onUpdateCurrentIdx:H[0]||(H[0]=R=>u.value=R)},null,8,["tabList","currentIdx","isFixed","fullWidth"])],512)],2),e.createElementVNode("div",pY,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[D.value?(e.openBlock(),e.createElementBlock("div",{key:D.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,R=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.value==R.key?(e.openBlock(),e.createElementBlock("div",hY,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.componentsDataJson,(M,W)=>(e.openBlock(),e.createBlock(Co,{key:M.id,type:M.type,"props-data":{modelValue:M,isPreview:!1},onHandleDelete:H[1]||(H[1]=Z=>Y(Z,N.value)),onHandleCopy:H[2]||(H[2]=Z=>G(Z)),onHandlePaste:Z=>q(Z,N.value,W)},null,8,["type","props-data","onHandlePaste"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:h.value,"onUpdate:show":H[3]||(H[3]=R=>h.value=R),onHandleEdit:H[4]||(H[4]=R=>f.value=!0),onHandleDelete:Y,onHandleCopy:G,onHandlePaste:q,style:{top:"-22px"}},null,8,["show"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(mY,{key:1,show:f.value,"onUpdate:show":H[5]||(H[5]=R=>f.value=R),data:n.modelValue},null,8,["show","data"]))],38))}},[["__scopeId","data-v-72434efb"]]),gY=Object.freeze(Object.defineProperty({__proto__:null,default:Tc},Symbol.toStringTag,{value:"Module"})),yY={class:"setting-content"},_Y={class:"setting-header flex items-center"},wY={class:"setting-header flex items-center"},bY={class:"setting-header flex items-center"},CY={class:"setting-header flex items-center"},VY={class:"setting-header flex items-center"},xY={class:"setting-header flex items-center"},kY={class:"preview-container"},EY=["src"],TY={key:1,class:"no-preview"},NY={class:"setting-body"},SY={class:"setting-item"},BY={class:"components-content"},PY=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=n,a=e.ref([{id:"preset-1",name:"YCCECE Background 1",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",size:"cover",position:"center center"},{id:"preset-2",name:"YCCECE Background 2",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-02.svg",size:"",position:""},{id:"preset-3",name:"YCCECE Background 3",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",size:"cover",position:""},{id:"preset-4",name:"YCCECE Background 4",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",size:"cover",position:""}]),i=e.ref(),s=a.value.find(u=>u.image===o.data.backgroundImage);i.value=s?s.id:"";const l=()=>{const u=a.value.find(g=>g.id===i.value);u&&(o.data.backgroundImage=`${u.image}`,o.data.backgroundSize=u.size,o.data.backgroundPosition=u.position)},r=t,c=()=>{r("update:show",!1)};return(u,g)=>{const m=e.resolveComponent("a-switch"),d=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-input"),C=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(C,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",yY,[e.createElementVNode("div",_Y,[g[6]||(g[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(m,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":g[0]||(g[0]=w=>n.data.onlyShowPc=w)},null,8,["modelValue"])]),e.createElementVNode("div",wY,[g[8]||(g[8]=e.createElementVNode("span",{class:"header-title"},"Background Preset",-1)),e.createVNode(p,{modelValue:i.value,"onUpdate:modelValue":g[1]||(g[1]=w=>i.value=w),style:{width:"300px","margin-right":"8px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,w=>(e.openBlock(),e.createBlock(d,{value:w.id,key:w.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(f,{type:"primary",onClick:l},{default:e.withCtx(()=>[...g[7]||(g[7]=[e.createTextVNode("Apply",-1)])]),_:1})]),e.createElementVNode("div",bY,[g[9]||(g[9]=e.createElementVNode("span",{class:"header-title"},"Image",-1)),e.createVNode(h,{modelValue:n.data.backgroundImage,"onUpdate:modelValue":g[2]||(g[2]=w=>n.data.backgroundImage=w),disabled:!0,placeholder:"图片路径",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",CY,[g[10]||(g[10]=e.createElementVNode("span",{class:"header-title"},"Size",-1)),e.createVNode(h,{modelValue:n.data.backgroundSize,"onUpdate:modelValue":g[3]||(g[3]=w=>n.data.backgroundSize=w),disabled:!0,placeholder:"尺寸",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",VY,[g[11]||(g[11]=e.createElementVNode("span",{class:"header-title"},"Position",-1)),e.createVNode(h,{modelValue:n.data.backgroundPosition,"onUpdate:modelValue":g[4]||(g[4]=w=>n.data.backgroundPosition=w),disabled:!0,placeholder:"位置",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",xY,[g[13]||(g[13]=e.createElementVNode("span",{class:"header-title"},"Preview",-1)),e.createElementVNode("div",kY,[n.data.backgroundImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.data.backgroundImage,style:e.normalizeStyle({"object-fit":n.data.backgroundSize||"cover","background-position":n.data.backgroundPosition||"center center",width:"100%",height:"100px",border:"1px solid #ddd"}),alt:"Background Preview"},null,12,EY)):(e.openBlock(),e.createElementBlock("div",TY,"No preview available")),g[12]||(g[12]=e.createElementVNode("p",{class:"preview-note"}," A light grey background has been applied for previewing and will not be reflected on website. ",-1))])]),e.createElementVNode("div",NY,[g[14]||(g[14]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",SY,[e.createElementVNode("div",BY,[e.createVNode(Fa,{data:n.data.data,onUpdate:g[5]||(g[5]=w=>n.data.data=w)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-f43efd7b"]]),DY={class:"component-wrapper"},Nc=J({__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{var b,V;return!((b=o.modelValue)!=null&&b.data)||!Array.isArray(o.modelValue.data)?[]:(V=o.modelValue)==null?void 0:V.data}),s=(b,V)=>{debugger;a("handleDelete",b||o.modelValue.id,V)},l=b=>{debugger;a("handleCopy",b||o.modelValue)},r=(b,V,T)=>{debugger;a("handlePaste",b,V,T)},c=e.ref(!1),u=e.ref(!1),g=()=>{var V,T;if(o.modelValue&&o.modelValue.data)return;const b={id:((V=o.modelValue)==null?void 0:V.id)||F(),type:"BackgroundWrapper",onlyShowPc:!1,backgroundImage:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",backgroundSize:"cover",backgroundPosition:"center center",data:[{id:((T=o.modelValue)==null?void 0:T.id)||F(),type:"CustomText",onlyShowPc:!1,data:{width:1920,backgroundColor:"#ffffff",title:"这是标题",description:"这是描述"}}]};a("update:modelValue",b)},m=e.computed(()=>{var b;return o.isPreview?!((b=o.modelValue)!=null&&b.onlyShowPc)||!Te():!0}),d=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.classes)??null}),p=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.style)??null}),f=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.width)??null}),h=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundImage)??""}),C=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundColor)??"transparent"}),w=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundSize)??"contain"}),x=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundPosition)??"center"}),y=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundRepeat)??"no-repeat"});return g(),(b,V)=>m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["background-wrapper",d.value]),style:e.normalizeStyle(p.value)},[e.createElementVNode("div",{class:e.normalizeClass(f.value),style:{position:"relative"},onMouseover:V[4]||(V[4]=T=>c.value=!0),onMouseout:V[5]||(V[5]=T=>c.value=!1)},[e.createElementVNode("div",{class:"background-wrapper__bg",style:e.normalizeStyle({"background-image":`url('${h.value}')`,"background-color":`${C.value}`,"background-size":`${w.value}`,"background-position":`${x.value}`,"background-repeat":`${y.value}`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(T,k)=>(e.openBlock(),e.createElementBlock("div",{key:T.id,class:"page-item"},[e.createElementVNode("div",DY,[e.createVNode(Co,{type:T.type,"props-data":{modelValue:T,isPreview:!1},onHandleDelete:V[0]||(V[0]=S=>s(S,i.value)),onHandleCopy:V[1]||(V[1]=S=>l(S)),onHandlePaste:S=>r(S,i.value,k)},null,8,["type","props-data","onHandlePaste"])])]))),128))],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:c.value,"onUpdate:show":V[2]||(V[2]=T=>c.value=T),onHandleEdit:V[3]||(V[3]=T=>u.value=!0),onHandleDelete:s,onHandleCopy:l,onHandlePaste:r},null,8,["show"]))],34),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PY,{key:0,show:u.value,"onUpdate:show":V[6]||(V[6]=T=>u.value=T),data:n.modelValue},null,8,["show","data"]))],6)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-633c372c"]]),$Y=Object.freeze(Object.defineProperty({__proto__:null,default:Nc},Symbol.toStringTag,{value:"Module"}));var ny="Expected a function",oy=NaN,LY="[object Symbol]",AY=/^\s+|\s+$/g,IY=/^[-+]0x[0-9a-f]+$/i,vY=/^0b[01]+$/i,MY=/^0o[0-7]+$/i,OY=parseInt,UY=typeof ca=="object"&&ca&&ca.Object===Object&&ca,RY=typeof self=="object"&&self&&self.Object===Object&&self,FY=UY||RY||Function("return this")(),HY=Object.prototype,jY=HY.toString,zY=Math.max,qY=Math.min,Np=function(){return FY.Date.now()};function WY(n,t,o){var a,i,s,l,r,c,u=0,g=!1,m=!1,d=!0;if(typeof n!="function")throw new TypeError(ny);t=ay(t)||0,Sc(o)&&(g=!!o.leading,m="maxWait"in o,s=m?zY(ay(o.maxWait)||0,t):s,d="trailing"in o?!!o.trailing:d);function p(T){var k=a,S=i;return a=i=void 0,u=T,l=n.apply(S,k),l}function f(T){return u=T,r=setTimeout(w,t),g?p(T):l}function h(T){var k=T-c,S=T-u,D=t-k;return m?qY(D,s-S):D}function C(T){var k=T-c,S=T-u;return c===void 0||k>=t||k<0||m&&S>=s}function w(){var T=Np();if(C(T))return x(T);r=setTimeout(w,h(T))}function x(T){return r=void 0,d&&a?p(T):(a=i=void 0,l)}function y(){r!==void 0&&clearTimeout(r),u=0,a=c=i=r=void 0}function b(){return r===void 0?l:x(Np())}function V(){var T=Np(),k=C(T);if(a=arguments,i=this,c=T,k){if(r===void 0)return f(c);if(m)return r=setTimeout(w,t),p(c)}return r===void 0&&(r=setTimeout(w,t)),l}return V.cancel=y,V.flush=b,V}function GY(n,t,o){var a=!0,i=!0;if(typeof n!="function")throw new TypeError(ny);return Sc(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),WY(n,t,{leading:a,maxWait:t,trailing:i})}function Sc(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function XY(n){return!!n&&typeof n=="object"}function YY(n){return typeof n=="symbol"||XY(n)&&jY.call(n)==LY}function ay(n){if(typeof n=="number")return n;if(YY(n))return oy;if(Sc(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Sc(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(AY,"");var o=vY.test(n);return o||MY.test(n)?OY(n.slice(2),o?2:8):IY.test(n)?oy:+n}var KY=GY;const QY=Ua(KY),ZY={class:"setting-content"},JY={class:"setting-header flex items-center"},eK={class:"setting-header flex items-center"},tK={class:"setting-header flex items-center"},nK={class:"setting-header flex items-center"},oK={class:"setting-body"},aK={class:"setting-item"},iK={class:"components-content"},sK=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>import("vuedraggable"));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:"60%",visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ZY,[e.createElementVNode("div",JY,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",eK,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(r,{modelValue:n.data.title,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",tK,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.width,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:""},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(c,{value:"middle"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(c,{value:"max"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",nK,[s[14]||(s[14]=e.createElementVNode("span",{class:"header-title"},"Opened by default",-1)),e.createVNode(u,{modelValue:n.data.openFirst,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.openFirst=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:!0},{default:e.withCtx(()=>[...s[12]||(s[12]=[e.createTextVNode("yes",-1)])]),_:1}),e.createVNode(c,{value:!1},{default:e.withCtx(()=>[...s[13]||(s[13]=[e.createTextVNode("No",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",oK,[s[15]||(s[15]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",aK,[e.createElementVNode("div",iK,[e.createVNode(Fa,{data:n.data.data,onUpdate:s[4]||(s[4]=m=>n.data.data=m)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-97f379ed"]]),lK={class:"collapse-custom__wrapper"},rK=["innerHTML"],dK={class:"collapse-custom__content__wrapper"},cK={class:"component-wrapper"},Bc=J({__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(0),l=e.ref(!1),r=e.ref(null),c=e.ref(!1),u=e.ref(!1),g=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.classes)??""}),m=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.style)??""});e.computed(()=>{var V;return(V=o.modelValue)==null?void 0:V.width});const d=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.title)??[]}),p=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.openFirst)??!1}),f=e.computed(()=>{var V,T;return!((V=o.modelValue)!=null&&V.data)||!Array.isArray(o.modelValue.data)?[]:(T=o.modelValue)==null?void 0:T.data}),h=()=>{var T;if(o.modelValue&&o.modelValue.data)return;const V={id:((T=o.modelValue)==null?void 0:T.id)||F(),type:"CollapseCustom",onlyShowPc:!1,title:"我是标题collaspse",openFirst:!1,width:"",style:{},data:[]};a("update:modelValue",V)},C=e.computed(()=>{var V;return o.isPreview?!((V=o.modelValue)!=null&&V.onlyShowPc)||!Te():!0}),w=()=>{const V=i.value;V&&(s.value=V.scrollHeight)},x=(V,T)=>{debugger;a("handleDelete",V||o.modelValue.id,T)},y=V=>{debugger;a("handleCopy",V||o.modelValue)},b=(V,T,k)=>{debugger;a("handlePaste",V,T,k)};return e.onMounted(()=>{l.value=p.value,e.nextTick(w);const V=QY(()=>{w()},250);r.value=new ResizeObserver(V),r.value.observe(i.value)}),e.onBeforeUnmount(()=>{i.value&&r.value&&r.value.unobserve(i.value)}),h(),(V,T)=>{var k,S;return C.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["collapse-custom",g.value]),style:e.normalizeStyle(m.value),onMouseover:T[6]||(T[6]=D=>c.value=!0),onMouseout:T[7]||(T[7]=D=>c.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom_container",[(k=n.modelValue)!=null&&k.width?`container-content-${(S=n.modelValue)==null?void 0:S.width}`:"container-content"]])},[e.createElementVNode("div",lK,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["collapse-custom__btn",{"--is-collapsed":!l.value}]),onClick:T[0]||(T[0]=D=>l.value=!l.value)},[e.createElementVNode("h4",{class:"collapse-custom__btn__title",innerHTML:d.value},null,8,rK),T[8]||(T[8]=e.createElementVNode("span",{class:"collapse-custom__btn__icon"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom__content",{"--is-open":l.value}]),ref_key:"content",ref:i,style:e.normalizeStyle({"--scroll-height":`${s.value}px`})},[e.createElementVNode("div",dK,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(D,N)=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:"page-item"},[e.createElementVNode("div",cK,[e.createVNode(Co,{type:D.type,"props-data":{modelValue:D,isPreview:!1},onHandleDelete:T[1]||(T[1]=A=>x(A,f.value)),onHandleCopy:T[2]||(T[2]=A=>y(A)),onHandlePaste:A=>b(A,f.value,N)},null,8,["type","props-data","onHandlePaste"])])]))),128))])],6)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:c.value,"onUpdate:show":T[3]||(T[3]=D=>c.value=D),onHandleEdit:T[4]||(T[4]=D=>u.value=!0),onHandleDelete:x,onHandleCopy:y,onHandlePaste:b,style:{top:"-20px"}},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sK,{key:0,show:u.value,"onUpdate:show":T[5]||(T[5]=D=>u.value=D),data:n.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}}},[["__scopeId","data-v-283d3413"]]),uK=Object.freeze(Object.defineProperty({__proto__:null,default:Bc},Symbol.toStringTag,{value:"Module"})),mK=["onClick"],pK=J({__name:"VrTourTab",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a}=o,i=n,s=t,l=e.ref(0),r=e.ref(0),c=e.ref(0),u=e.ref(0),g=e.ref(null),m=e.ref(null),d=e.ref([]),p=e.computed(()=>l.value>40),f=e.computed(()=>c.value+u.value<r.value+40),h=e.computed({get(){return i.currentIdx??0},set(y){s("updateIdx",y)}});e.watch(a,()=>{C()});const C=()=>{if(i.list.length<=0)return;m.value&&(l.value=m.value.scrollLeft),g.value&&(c.value=g.value.getBoundingClientRect().left,u.value=g.value.getBoundingClientRect().width);let y=null;d.value.length>0&&(y=Array.isArray(d.value)?d.value[d.value.length-1]:d.value),y&&y.getBoundingClientRect&&(r.value=y.getBoundingClientRect().left)},w=y=>{m.value&&(y==="next"?m.value.scrollLeft+=200:m.value.scrollLeft-=200)},x=()=>{C()};return e.onMounted(()=>{e.nextTick(()=>{x()})}),(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"VrtourWrapper",ref:g},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"VrtourList",ref:m,onScroll:x},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:b[0]||(b[0]=V=>w("prev"))},null,512),[[e.vShow,p.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(V,T)=>(e.openBlock(),e.createElementBlock("li",{key:T},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":h.value==T}]),ref_for:!0,ref_key:"VrtourBtn",ref:d,onClick:k=>h.value=T},e.toDisplayString(V.name),11,mK)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:b[1]||(b[1]=V=>w("next"))},null,512),[[e.vShow,f.value]])],544)],512))}},[["__scopeId","data-v-efdafd78"]]),hK=["onClick"],iy=J({__name:"VrTourCat",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),a=n,i=t,s=e.ref(null),l=e.ref(null),r=e.ref(null),c=e.ref(0),u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(0),p=e.computed(()=>c.value>40),f=e.computed(()=>g.value+m.value<u.value+40),h=e.computed({get(){return a.currentIdx??0},set(b){i("updateIdx",b),e.nextTick(y)}}),C=()=>{if(a.list.length<=0)return;l.value&&(c.value=l.value.scrollLeft),s.value&&(g.value=s.value.getBoundingClientRect().left,m.value=s.value.getBoundingClientRect().width);let b=null;r.value&&(b=Array.isArray(r.value)?r.value[r.value.length-1]:r.value),b&&b.getBoundingClientRect&&(u.value=b.getBoundingClientRect().left)},w=b=>{b=="next"?l.value.scrollLeft+=200:l.value.scrollLeft-=200},x=()=>{l.value&&(c.value=l.value.scrollLeft),C()},y=async()=>{if(await e.nextTick(),!r.value||!r.value[h.value])return;const b=r.value[h.value],V=b.clientWidth/2,T=o.$_vsWidth/2;d.value=b.getBoundingClientRect().right-V,l.value.scrollLeft-=T-d.value};return e.watch(()=>o.$_vsWidth,()=>{C()}),e.watch(()=>a.list,()=>{e.nextTick(C),l.value&&l.value.scrollLeft&&(l.value.scrollLeft=0)},{deep:!0}),e.onMounted(()=>{e.nextTick(x)}),(b,V)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"wrapper",ref:s},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:l,onScroll:x},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:V[0]||(V[0]=T=>w("prev"))},null,512),[[e.vShow,p.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(T,k)=>(e.openBlock(),e.createElementBlock("li",{key:k,class:"tab-tag__item"},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":h.value==k}]),ref_for:!0,ref_key:"btnRef",ref:r,onClick:S=>h.value=k},e.toDisplayString(T.name),11,hK)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:V[1]||(V[1]=T=>w("next"))},null,512),[[e.vShow,f.value]])],544)],512))}},[["__scopeId","data-v-6dd36752"]]),fK={class:"tab-tag__nav__prev"},gK=["onClick"],yK=["src","alt"],_K={class:"tab-tag__btn__title"},wK={class:"tab-tag__nav__next"},bK=J({__name:"VrTourChoose",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a}=o,i=n,s=t,l=e.ref(null),r=e.ref(null),c=e.ref(null),u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(0),p=e.ref(0),f=e.computed(()=>u.value>0),h=e.computed(()=>g.value-40>d.value),C=e.computed({get(){return i.currentIdx??0},set(V){s("updateIdx",V),e.nextTick(y)}}),w=()=>{var T,k,S;if(i.list.length<=0)return;u.value=(T=r.value)==null?void 0:T.scrollLeft,m.value=(k=l.value)==null?void 0:k.getBoundingClientRect().left,d.value=(S=l.value)==null?void 0:S.getBoundingClientRect().right;let V=null;c.value&&(V=Array.isArray(c.value)?c.value[c.value.length-1]:c.value),g.value=V==null?void 0:V.getBoundingClientRect().right},x=V=>{V==="next"?r.value.scrollLeft+=200:r.value.scrollLeft-=200},y=()=>{const V=c.value[C.value];if(!V)return;const T=V.clientWidth/2,k=a.value/2;p.value=V.getBoundingClientRect().right-T,r.value.scrollLeft-=k-p.value},b=()=>{w()};return e.watch(()=>a.value,()=>{w()}),e.watch(()=>i.list,()=>{e.nextTick(w),r.value&&r.value.scrollLeft&&(r.value.scrollLeft=0)}),e.onMounted(()=>{e.nextTick(b)}),(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"vr-tour-choose tab-tag",ref_key:"wrapper",ref:l},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:r,onScroll:b},[e.withDirectives(e.createElementVNode("div",fK,[e.createElementVNode("button",{type:"button",class:"nav__btn",onClick:T[0]||(T[0]=k=>x("prev"))})],512),[[e.vShow,f.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(k,S)=>(e.openBlock(),e.createElementBlock("li",{key:S,class:"tab-tag__item"},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":C.value===S}]),ref_for:!0,ref_key:"btn",ref:c,onClick:D=>C.value=S},[e.createElementVNode("img",{src:k.url,alt:k.name},null,8,yK),e.createElementVNode("div",_K,e.toDisplayString(k.name),1)],10,gK)]))),128)),e.withDirectives(e.createElementVNode("div",wK,[e.createElementVNode("button",{type:"button",class:"nav__btn",onClick:T[1]||(T[1]=k=>x("next"))})],512),[[e.vShow,h.value]])],544)],512))}},[["__scopeId","data-v-ebb85a22"]]),CK={class:"vr-tour-scene"},VK=["src"],xK={key:1,class:"vr-tour-scene__img"},kK=["src","alt"],EK=J({__name:"VrTourScene",props:{scene:{type:Object,default:()=>({})}},setup(n){const t=n,o=e.computed(()=>{var s;return(s=t.scene)==null?void 0:s.embed}),a=e.computed(()=>{var s;return(s=t.scene)==null?void 0:s.url}),i=e.computed(()=>{var s;return(s=t.scene)==null?void 0:s.name});return(s,l)=>(e.openBlock(),e.createElementBlock("div",CK,[o.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:o.value,frameborder:"0"},null,8,VK)):(e.openBlock(),e.createElementBlock("div",xK,[e.createElementVNode("img",{src:a.value,alt:i.value},null,8,kK)]))]))}},[["__scopeId","data-v-c07507d5"]]),TK={class:"vr-tour-select"},NK={class:"select-btn__focus-name line-clamp-1"},SK={class:"select-list"},BK=["onClick"],sy=J({__name:"VrTourSelect",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a}=o,i={mounted(h,C){h.clickOutsideEvent=w=>{h===w.target||h.contains(w.target)||C.value(w)},document.body.addEventListener("click",h.clickOutsideEvent)},unmounted(h){document.body.removeEventListener("click",h.clickOutsideEvent)}},s=n,l=t,r=e.ref(!1),c=e.ref(-8),u=e.ref(null),g=e.computed({get(){return s.currentIdx??0},set(h){l("updateIdx",h)}}),m=e.computed(()=>{var h;return((h=s.list[g.value])==null?void 0:h.name)||""});e.watch(r,()=>{p()}),e.onMounted(()=>{window.addEventListener("resize",()=>{a.value=window.innerWidth,r.value&&p()})});const d=()=>{r.value=!1},p=()=>{const h=u.value;if(!h)return;const C=ri(h).x+h.clientWidth;C>a.value&&(c.value=c.value-C+a.value-4)},f=h=>{g.value=h,d()};return(h,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",TK,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["select-btn",{"is-open":r.value}]),onClick:C[0]||(C[0]=w=>r.value=!r.value)},[e.createElementVNode("div",NK,e.toDisplayString(m.value),1),C[1]||(C[1]=e.createElementVNode("div",{class:"select-btn__arrow"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["select-block",{"is-open":r.value}]),style:e.normalizeStyle({"--left":`${c.value}px`}),ref_key:"blockRef",ref:u},[e.createElementVNode("ul",SK,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(w,x)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["select-item line-clamp-1",{"is-active":g.value===x}]),key:x,onClick:y=>f(x)},e.toDisplayString(w.name),11,BK))),128))])],6)])),[[i,d]])}},[["__scopeId","data-v-536804a2"]]),PK={class:"setting-content"},DK={class:"setting-header flex items-center"},$K={class:"setting-body"},LK={class:"setting-toolbar"},AK={class:"tools"},IK={class:"setting-item"},vK={class:"item-header"},MK={class:"btn-group"},OK={key:0,class:"drag-handle"},UK={key:0},RK={class:"item-header"},FK={class:"btn-group"},HK={key:0,class:"drag-handle"},jK={class:"item-header"},zK={class:"btn-group"},qK={key:0,class:"drag-handle"},WK=["src"],GK={class:"item-uplaod flex items-center"},XK={style:{"text-align":"center"}},YK={style:{"text-align":"center","margin-top":"20px"}},KK=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"gallerys-Categories",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=p=>p&&p.length>1,c=n,u=t,g=()=>{u("update:show",!1)},m=(p,f)=>{debugger;const h=c.data;p==="Campus"?h.data.push({key:F(),name:"New Campus",categoriesList:[]}):p==="Category"?f.categoriesList.push(JSON.parse(JSON.stringify({key:F(),name:"New Category",facilitiesList:[]}))):p==="facilitiy"?f.facilitiesList.push({key:F(),name:"New facilitiy",url:"",scene:null,embed:""}):h.data.push({id:F(),key:F(),name:"New Tab",link:"/",componentsDataJson:[]})},d=(p,f,h)=>{debugger;if(f==="Campuses")c.data.data=c.data.data.filter(C=>C.key!==p);else if(f==="facilitiy"){const C=h.findIndex(w=>w.key===p);C!==-1&&h.splice(C,1)}else if(f==="categories"){const C=h.findIndex(w=>w.key===p);C!==-1&&h.splice(C,1)}};return(p,f)=>{const h=e.resolveComponent("a-switch"),C=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),x=e.resolveComponent("icon-drag-arrow"),y=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:g,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",PK,[e.createElementVNode("div",DK,[f[9]||(f[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":f[0]||(f[0]=T=>n.data.onlyShowPc=T)},null,8,["modelValue"])]),e.createElementVNode("div",$K,[e.createElementVNode("div",LK,[f[11]||(f[11]=e.createElementVNode("h1",null,"Campuses",-1)),e.createElementVNode("div",AK,[e.createVNode(w,{type:"primary",onClick:f[1]||(f[1]=T=>m("Campus"))},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[f[10]||(f[10]=e.createTextVNode(" 添加 Campus ",-1))]),_:1})])]),e.createElementVNode("div",IK,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":f[6]||(f[6]=T=>n.data.data=T),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!r(n.data.data),onStart:f[7]||(f[7]=T=>a.value=!0),onEnd:f[8]||(f[8]=T=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:T})=>{var k;return[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:T.key},[e.createElementVNode("div",vK,[e.createElementVNode("div",null,[e.createElementVNode("h4",null,e.toDisplayString(T.name),1)]),e.createElementVNode("div",MK,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",OK,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:S=>d(T.key,"Campuses")},null,8,["onClick"])])]),f[19]||(f[19]=e.createElementVNode("p",{class:"item-title"},"Name",-1)),e.createVNode(b,{modelValue:T.name,"onUpdate:modelValue":S=>T.name=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[20]||(f[20]=e.createElementVNode("p",{class:"item-title"},"Categories",-1)),e.createElementVNode("div",null,[(k=T.categoriesList)!=null&&k.length?(e.openBlock(),e.createElementBlock("div",UK,[e.createVNode(e.unref(o),e.mergeProps({modelValue:T.categoriesList,"onUpdate:modelValue":S=>T.categoriesList=S,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},l.value,{disabled:!r(T.categoriesList),onStart:f[4]||(f[4]=S=>a.value=!0),onEnd:f[5]||(f[5]=S=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:S})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(T.categoriesList)}]),key:S.id,style:{border:"1px solid #d9d9d9","border-radius":"8px"}},[e.createElementVNode("div",RK,[e.createElementVNode("div",null,[e.createElementVNode("h4",null,e.toDisplayString(S.name),1)]),e.createElementVNode("div",FK,[r(T.categoriesList)?(e.openBlock(),e.createElementBlock("div",HK,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:D=>d(S.key,"categories",T.categoriesList)},null,8,["onClick"])])]),f[16]||(f[16]=e.createElementVNode("p",null,"Name",-1)),e.createVNode(b,{modelValue:S.name,"onUpdate:modelValue":D=>S.name=D,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[17]||(f[17]=e.createElementVNode("p",{class:"item-title"},"Facilities",-1)),e.createElementVNode("div",null,[e.createVNode(e.unref(o),e.mergeProps({modelValue:S.facilitiesList,"onUpdate:modelValue":D=>S.facilitiesList=D,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!r(S.facilitiesList),onStart:f[2]||(f[2]=D=>a.value=!0),onEnd:f[3]||(f[3]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(S.facilitiesList)}]),key:D.key,style:{border:"1px solid #d9d9d9","border-radius":"8px"}},[e.createElementVNode("div",jK,[e.createElementVNode("div",null,[e.createElementVNode("h4",null,e.toDisplayString(D.name),1)]),e.createElementVNode("div",zK,[r(S.facilitiesList)?(e.openBlock(),e.createElementBlock("div",qK,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:N=>d(D.key,"facilitiy",S.facilitiesList)},null,8,["onClick"])])]),f[12]||(f[12]=e.createElementVNode("p",{class:"item-title"},"Name",-1)),e.createVNode(b,{modelValue:D.name,"onUpdate:modelValue":N=>D.name=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[13]||(f[13]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:D.url},null,8,WK),e.createElementVNode("div",GK,[e.createVNode(b,{modelValue:D.url,"onUpdate:modelValue":N=>D.url=N,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:D.url,"onUpdate:modelValue":N=>D.url=N,name:D.key},null,8,["modelValue","onUpdate:modelValue","name"])]),f[14]||(f[14]=e.createElementVNode("p",{class:"item-title"},"VR Embed URL",-1)),e.createVNode(b,{modelValue:D.embed,"onUpdate:modelValue":N=>D.embed=N,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"])]),e.createElementVNode("div",XK,[e.createVNode(w,{type:"primary",onClick:D=>m("facilitiy",S)},{default:e.withCtx(()=>[...f[15]||(f[15]=[e.createTextVNode("添加Facilities",-1)])]),_:1},8,["onClick"])])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",YK,[e.createVNode(w,{type:"primary",onClick:S=>m("Category",T)},{default:e.withCtx(()=>[...f[18]||(f[18]=[e.createTextVNode("添加Category ",-1)])]),_:1},8,["onClick"])])],2))]}),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-73361da3"]]),QK={class:"vr-tour__wrapper"},ZK={key:0,class:"vr-tour__tabs"},JK={class:"container-content-middle"},eQ={key:1,class:"vr-tour__selects"},tQ={class:"container-content"},nQ={class:"vr-tour__selects__list"},oQ={class:"vr-tour__scene"},aQ={key:2,class:"vr-tour__cats"},iQ={class:"pt-2"},sQ={key:3,class:"vr-tour__chooses"},Pc=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=t,c=n,u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(!1),p=e.ref(!1),f=e.computed(()=>{var y;return((y=c.modelValue)==null?void 0:y.data)??null}),h=e.computed(()=>{var y,b;return(b=(y=f.value)==null?void 0:y[u.value])==null?void 0:b.categoriesList}),C=e.computed(()=>{var y,b;return(b=(y=h.value)==null?void 0:y[g.value])==null?void 0:b.facilitiesList}),w=e.computed(()=>{var y;return(y=C.value)==null?void 0:y[m.value]}),x=()=>{var b;if(c.modelValue&&c.modelValue.data)return;const y={id:((b=c.modelValue)==null?void 0:b.id)||F(),type:"VrTour",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",data:[{key:F(),name:"SecondarySchool",categoriesList:[{key:F(),name:"Facilities",facilitiesList:[{key:F(),name:"ECE Learning Communities",url:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt/multi_floor_plans/853_floorplan.png",scene:null,embed:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt-2026/en/index.html"}]}]}]};r("update:modelValue",y),u.value=0};return e.watch(u,()=>{g.value=0}),e.watch(g,()=>{m.value=0}),x(),(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vr-tour bg-neutral-lightest",{"pb-0":C.value&&C.value.length<=1}]),onMouseover:b[9]||(b[9]=V=>p.value=!0),onMouseout:b[10]||(b[10]=V=>p.value=!1)},[e.createElementVNode("div",QK,[f.value&&f.value.length>1&&e.unref(a)>=768?(e.openBlock(),e.createElementBlock("div",ZK,[e.createElementVNode("div",JK,[e.createVNode(pK,{list:f.value,onUpdateIdx:b[0]||(b[0]=V=>u.value=V),currentIdx:u.value},null,8,["list","currentIdx"])])])):e.createCommentVNode("",!0),e.unref(a)<768?(e.openBlock(),e.createElementBlock("div",eQ,[e.createElementVNode("div",tQ,[e.createElementVNode("div",nQ,[f.value.length>1?(e.openBlock(),e.createBlock(sy,{key:0,list:f.value,onUpdateIdx:b[1]||(b[1]=V=>u.value=V),currentIdx:u.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0),h.value.length>1?(e.openBlock(),e.createBlock(sy,{key:1,list:h.value,onUpdateIdx:b[2]||(b[2]=V=>g.value=V),currentIdx:g.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0)])]),C.value.length>1?(e.openBlock(),e.createBlock(iy,{key:0,list:C.value,onUpdateIdx:b[3]||(b[3]=V=>m.value=V),currentIdx:m.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",oQ,[e.createVNode(EK,{scene:w.value},null,8,["scene"])]),h.value&&e.unref(a)>=768?(e.openBlock(),e.createElementBlock("div",aQ,[e.withDirectives(e.createElementVNode("div",iQ,null,512),[[e.vShow,h.value.length<=1&&C.value&&C.value.length>1]]),e.withDirectives(e.createVNode(iy,{list:h.value,onUpdateIdx:b[4]||(b[4]=V=>g.value=V),currentIdx:g.value},null,8,["list","currentIdx"]),[[e.vShow,h.value.length>1]])])):e.createCommentVNode("",!0),C.value&&C.value.length>1&&e.unref(a)>=768?(e.openBlock(),e.createElementBlock("div",sQ,[e.createVNode(bK,{list:C.value,onUpdateIdx:b[5]||(b[5]=V=>m.value=V),currentIdx:m.value},null,8,["list","currentIdx"])])):e.createCommentVNode("",!0)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:p.value,"onUpdate:show":b[6]||(b[6]=V=>p.value=V),onHandleEdit:b[7]||(b[7]=V=>d.value=!0),onHandleDelete:y.handleDelete,onHandleCopy:y.handleCopy,onHandlePaste:y.handlePaste},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(KK,{key:1,show:d.value,"onUpdate:show":b[8]||(b[8]=V=>d.value=V),data:n.modelValue},null,8,["show","data"]))],34))}},[["__scopeId","data-v-6a9a09ae"]]),lQ=Object.freeze(Object.defineProperty({__proto__:null,default:Pc},Symbol.toStringTag,{value:"Module"})),rQ={class:"seting-box"},dQ={class:"setting-header flex items-center"},cQ={key:0},uQ={class:"setting-header items-center"},mQ={class:"draggable_box"},pQ={class:"drag_top_box"},hQ=["onClick"],fQ={key:0},gQ={class:"draggable_link_box"},yQ={class:"drag_link_top_box"},_Q=["onClick"],wQ=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.computed(()=>({animation:200,group:"gridLinks",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),i=e.computed(()=>({animation:200,group:"gridLinkItems",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.ref(!1),l=e.ref(!1),r=n,c=e.ref(new Set),u=e.ref(new Set),g=()=>{var T,k;(k=(T=r.data)==null?void 0:T.data)!=null&&k.list&&Array.isArray(r.data.data.list)&&(c.value.clear(),u.value.clear(),r.data.data.list.forEach(S=>{S.id&&c.value.add(S.id),S.links&&Array.isArray(S.links)&&S.links.length>0&&S.links.forEach(D=>{D.id&&u.value.add(D.id)})}))},m=e.ref(!1);e.watch(()=>r.show,T=>{T&&!m.value?(m.value=!0,e.nextTick(()=>{g()})):T||(m.value=!1)},{immediate:!0});const d=T=>{var k,S;c.value.has(T.id)?(c.value.clear(),(S=(k=r.data)==null?void 0:k.data)!=null&&S.list&&r.data.data.list.forEach(D=>{D.id!==T.id&&c.value.add(D.id)})):c.value.add(T.id)},p=T=>c.value.has(T.id),f=T=>{r.data.data.list=r.data.data.list.filter(k=>k.id!==T)},h=()=>{var S,D;const T=r.data.data,k=F();T.list.push({id:k,title:"这里是标题",links:[]}),c.value.clear(),(D=(S=r.data)==null?void 0:S.data)!=null&&D.list&&r.data.data.list.forEach(N=>{N.id!==k&&c.value.add(N.id)}),e.nextTick(()=>{if(typeof document<"u"){const N=document.querySelector(".arco-drawer-body");N&&(N.scrollTop=N.scrollHeight)}})},C=T=>{u.value.has(T.id)?u.value.delete(T.id):u.value.add(T.id)},w=T=>u.value.has(T.id),x=T=>{const k=r.data.data.list.find(S=>S.id===T);if(k){const S=F();k.links.push({id:S,name:"这里是名称",link:""}),k.links&&Array.isArray(k.links)&&k.links.forEach(D=>{D.id!==S?u.value.add(D.id):u.value.delete(D.id)})}},y=(T,k)=>{const S=r.data.data.list.find(D=>D.id===T);S&&S.links&&(S.links=S.links.filter(D=>D.id!==k))},b=t,V=()=>{b("update:show",!1)};return(T,k)=>{const S=e.resolveComponent("a-switch"),D=e.resolveComponent("a-option"),N=e.resolveComponent("a-select"),A=e.resolveComponent("icon-drag-dot"),$=e.resolveComponent("icon-drag-arrow"),I=e.resolveComponent("icon-delete"),U=e.resolveComponent("a-input"),Y=e.resolveComponent("icon-plus"),G=e.resolveComponent("a-button"),q=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(q,{width:500,visible:n.show,footer:!1,onCancel:V,unmountOnClose:""},{title:e.withCtx(()=>{var O;return[e.createTextVNode(e.toDisplayString((O=n.data)==null?void 0:O.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",rQ,[e.createElementVNode("div",dQ,[k[7]||(k[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(S,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":k[0]||(k[0]=O=>n.data.onlyShowPc=O)},null,8,["modelValue"])]),k[19]||(k[19]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(N,{modelValue:n.data.data.width,"onUpdate:modelValue":k[1]||(k[1]=O=>n.data.data.width=O),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(D,{value:""},{default:e.withCtx(()=>[...k[8]||(k[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(D,{value:"small"},{default:e.withCtx(()=>[...k[9]||(k[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(D,{value:"middle"},{default:e.withCtx(()=>[...k[10]||(k[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(D,{value:"max"},{default:e.withCtx(()=>[...k[11]||(k[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),k[20]||(k[20]=e.createElementVNode("div",{class:"part_title",style:{"margin-top":"20px"}},"链接列表",-1)),n.data.data.list.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",cQ,"暂无数据")),e.createElementVNode("div",uQ,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data.list,"onUpdate:modelValue":k[4]||(k[4]=O=>n.data.data.list=O),"component-data":{tag:"div",type:"transition-group",name:s.value?null:"flip-list"}},a.value,{disabled:!1,onStart:k[5]||(k[5]=O=>s.value=!0),onEnd:k[6]||(k[6]=O=>s.value=!1),"item-key":"id"}),{item:e.withCtx(({element:O})=>[e.createElementVNode("div",mQ,[e.createElementVNode("div",pQ,[e.createElementVNode("div",{class:"drag-handle",onClick:H=>d(O)},[e.createVNode(A,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(O.title),1)],8,hQ),e.createElementVNode("div",null,[e.createVNode($,{class:"icon_drag"}),e.createVNode(I,{class:"btn-delete",onClick:e.withModifiers(H=>f(O.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[k[16]||(k[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(U,{modelValue:O.title,"onUpdate:modelValue":H=>O.title=H,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),k[17]||(k[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),O.links.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fQ,"暂无数据")),e.createVNode(e.unref(o),e.mergeProps({modelValue:O.links,"onUpdate:modelValue":H=>O.links=H,"component-data":{tag:"div",type:"transition-group",name:l.value?null:"flip-list"}},i.value,{disabled:!1,onStart:k[2]||(k[2]=H=>l.value=!0),onEnd:k[3]||(k[3]=H=>l.value=!1),"item-key":"id"}),{item:e.withCtx(({element:H})=>[e.createElementVNode("div",gQ,[e.createElementVNode("div",yQ,[e.createElementVNode("div",{class:"drag-handle",onClick:R=>C(H)},[e.createVNode(A,{style:{"margin-right":"10px"}}),k[12]||(k[12]=e.createTextVNode("链接 ",-1))],8,_Q),e.createElementVNode("div",null,[e.createVNode($,{class:"icon_drag"}),e.createVNode(I,{class:"btn-delete",onClick:e.withModifiers(R=>y(O.id,H.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[k[13]||(k[13]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 名称 ",-1)),e.createVNode(U,{modelValue:H.name,"onUpdate:modelValue":R=>H.name=R,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),k[14]||(k[14]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 链接地址 ",-1)),e.createVNode(U,{modelValue:H.link,"onUpdate:modelValue":R=>H.link=R,placeholder:"请输入链接地址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!w(H)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),e.createVNode(G,{style:{"margin-top":"20px"},size:"mini",type:"primary",onClick:H=>x(O.id)},{icon:e.withCtx(()=>[e.createVNode(Y)]),default:e.withCtx(()=>[k[15]||(k[15]=e.createTextVNode(" 链接 ",-1))]),_:1},8,["onClick"])],512),[[e.vShow,!p(O)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(G,{type:"primary",onClick:h,style:{"margin-top":"20px"}},{icon:e.withCtx(()=>[e.createVNode(Y)]),default:e.withCtx(()=>[k[18]||(k[18]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-d7dd61f5"]]),bQ=["innerHTML"],CQ={key:0,class:"grid-links__sublist"},VQ=["onClick"],xQ={key:1,class:"grid-links__subitem__link"},Sp=J(e.defineComponent({name:"GridLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=p=>{a("handleClick",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"GridLinks",onlyShowPc:!1,data:{width:"default",bgColor:"white",list:[{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:""},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]}]}};a("update:modelValue",p)},r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return l(),(p,f)=>{var h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gridLinks_wrap",onMouseenter:f[2]||(f[2]=w=>r.value=!0),onMouseleave:f[3]||(f[3]=w=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.createElementVNode("div",{class:"grid-links__row",style:e.normalizeStyle({"--grid-columns-mobile":p.mobileCol,"--grid-columns-desktop":p.desktopCol})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=(h=n.modelValue)==null?void 0:h.data)==null?void 0:C.list,(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:"grid-links__item",key:`${w.title}-${x}`},[e.createElementVNode("h6",{class:"grid-links__item__title",innerHTML:w.title},null,8,bQ),w.links?(e.openBlock(),e.createElementBlock("ul",CQ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.links,(y,b)=>(e.openBlock(),e.createElementBlock("li",{key:`${y.name}-${b}`,class:"grid-links__subitem"},[y.link?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:V=>i(y.link),class:"link_text"},[e.createTextVNode(e.toDisplayString(y.name)+" ",1),f[5]||(f[5]=e.createElementVNode("span",{class:"link_text__underline"},null,-1))],8,VQ)):(e.openBlock(),e.createElementBlock("div",xQ,e.toDisplayString(y.name),1))]))),128))])):e.createCommentVNode("",!0)]))),128))],4)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[0]||(f[0]=w=>r.value=w),onHandleEdit:f[1]||(f[1]=w=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(wQ,{key:1,show:c.value,"onUpdate:show":f[4]||(f[4]=w=>c.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-ed90ae1e"]]),kQ=Object.freeze(Object.defineProperty({__proto__:null,default:Sp},Symbol.toStringTag,{value:"Module"})),EQ={class:"setting-content"},TQ={class:"setting-header flex items-center"},NQ={class:"setting-header flex items-center"},SQ={class:"setting-body"},BQ={class:"setting-toolbar"},PQ={class:"tools"},DQ={class:"setting-item"},$Q={class:"item-header"},LQ={class:"btn-group"},AQ={key:0,class:"drag-handle"},IQ=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,c=t,u=()=>{c("update:show",!1)},g=d=>{r.data.data.push({key:F(),title:"[[TITLE]]",content:""})},m=d=>{r.data.data=r.data.data.filter(p=>p.key!==d)};return(d,p)=>{const f=e.resolveComponent("a-switch"),h=e.resolveComponent("a-option"),C=e.resolveComponent("a-select"),w=e.resolveComponent("icon-plus"),x=e.resolveComponent("a-button"),y=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),T=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(T,{width:"60%",visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",EQ,[e.createElementVNode("div",TQ,[p[7]||(p[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(f,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=k=>n.data.onlyShowPc=k)},null,8,["modelValue"])]),e.createElementVNode("div",NQ,[p[12]||(p[12]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(C,{modelValue:n.data.width,"onUpdate:modelValue":p[1]||(p[1]=k=>n.data.width=k),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(h,{value:""},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(h,{value:"small"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(h,{value:"middle"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(h,{value:"max"},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",SQ,[e.createElementVNode("div",BQ,[p[15]||(p[15]=e.createElementVNode("h4",null,"Topics",-1)),e.createElementVNode("div",PQ,[e.createVNode(x,{type:"primary",onClick:p[2]||(p[2]=k=>g())},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[p[13]||(p[13]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(x,{type:"primary",onClick:p[3]||(p[3]=k=>g())},{default:e.withCtx(()=>[...p[14]||(p[14]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",DQ,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":p[4]||(p[4]=k=>n.data.data=k),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:p[5]||(p[5]=k=>i.value=!0),onEnd:p[6]||(p[6]=k=>i.value=!1),"item-key":"key"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:k.key},[e.createElementVNode("div",$Q,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(k.title),1)]),e.createElementVNode("div",LQ,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",AQ,[e.createVNode(y,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:S=>m(k.key)},null,8,["onClick"])])]),p[16]||(p[16]=e.createElementVNode("p",{class:"item-title"},"title",-1)),e.createVNode(V,{modelValue:k.title,"onUpdate:modelValue":S=>k.title=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[17]||(p[17]=e.createElementVNode("p",{class:"item-title"},"Content",-1)),e.createVNode(e.unref(a),{modelValue:k.content,"onUpdate:modelValue":S=>k.content=S,name:`AccordionText_${k.key}`},null,8,["modelValue","onUpdate:modelValue","name"])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-a711b39a"]]),vQ=["id"],MQ=["id"],OQ=["onClick"],UQ={class:"accordion-button__title"},RQ=["id","aria-expanded","aria-labelledby"],FQ={class:"accordion-body"},HQ=["innerHTML"],jQ={class:"flex-center mt-10"},Dc=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=()=>{var U;if(r.modelValue&&r.modelValue.data){r.modelValue.openFirst&&r.modelValue.data.length>0&&p.value.size===0&&p.value.add(r.modelValue.data[0].key);return}const I={id:((U=r.modelValue)==null?void 0:U.id)||F(),type:"AccordionText",onlyShowPc:!1,openFirst:!1,width:"",style:{},data:[{key:F(),title:"tab1",content:"这是内容"}]};c("update:modelValue",I)},g=e.ref(Date.now()),m=e.ref(6),d=e.ref(6),p=e.ref(new Set),f=e.ref([]),h=e.ref(!1),C=e.ref(!1),w=e.computed(()=>{var I;return(I=r.modelValue)!=null&&I.hasOwnProperty("classes")?r.modelValue.classes:null}),x=e.computed(()=>{var I;return(I=r.modelValue)!=null&&I.hasOwnProperty("style")?r.modelValue.style:null});e.computed(()=>{var I;return(I=r.modelValue)!=null&&I.hasOwnProperty("width")?r.modelValue.width:null});const y=e.computed(()=>{var I;return((I=r.modelValue)==null?void 0:I.data)||[]}),b=e.computed(()=>y.value.slice(0,m.value)),V=I=>{var U;p.value.has(I)?p.value.delete(I):((U=r.modelValue)!=null&&U.allowMultiple||p.value.clear(),p.value.add(I)),setTimeout(()=>{k(document.getElementById(`accordion-${g.value}-${I}`))},350)},T=I=>p.value.has(I),k=I=>{if(a.value>=768)return;const Y=ri(I).y-150;window.scroll({top:Y,left:0,behavior:"smooth"})},S=()=>{a.value>=768?(m.value=6,d.value=6):(m.value=4,d.value=4)},D=(I,U)=>{debugger;c("handleDelete",I||r.modelValue.id,U)},N=I=>{debugger;c("handleCopy",I||r.modelValue)},A=(I,U)=>{debugger;c("handlePaste",I,U)},$=()=>{};return e.watch(y,(I,U)=>{var Y;S(),(Y=r.modelValue)!=null&&Y.openFirst&&I.length>0&&p.value.size===0&&p.value.add(I[0].key)},{deep:!0,immediate:!0}),e.watch(b,()=>{e.nextTick($)},{immediate:!1}),e.onMounted(()=>{var I;e.nextTick(S),(I=r.modelValue)!=null&&I.openFirst&&y.value.length>0&&p.value.size===0&&p.value.add(y.value[0].key)}),u(),(I,U)=>{var Y,G;return e.openBlock(),e.createElementBlock("div",{onMouseover:U[4]||(U[4]=q=>C.value=!0),onMouseout:U[5]||(U[5]=q=>C.value=!1),class:e.normalizeClass(["accordion-text",w.value]),id:`accordion-parent-${g.value}`,style:e.normalizeStyle(x.value)},[e.createElementVNode("div",{class:e.normalizeClass(["accordion-text__container",[(Y=n.modelValue)!=null&&Y.width?`container-content-${(G=n.modelValue)==null?void 0:G.width}`:"container-content"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(q,O)=>(e.openBlock(),e.createElementBlock("div",{key:q.key,class:"accordion-item",ref_for:!0,ref_key:"itemRefs",ref:f,"data-aos":"fade-in"},[e.createElementVNode("div",{class:"accordion-header",id:`accordion-${g.value}-${q.key}`},[e.createElementVNode("button",{class:e.normalizeClass(["accordion-button",{collapsed:!T(q.key)}]),type:"button",onClick:H=>V(q.key)},[e.createElementVNode("div",null,[e.createElementVNode("div",UQ,e.toDisplayString(q.title),1)]),U[6]||(U[6]=e.createElementVNode("span",{class:"accordion-button__icon"},null,-1))],10,OQ)],8,MQ),e.createElementVNode("div",{id:`accordion-${g.value}-collapse-${q.key}`,class:e.normalizeClass(["accordion-collapse collapse",{show:T(q.key)}]),"aria-expanded":T(q.key),"aria-labelledby":`accordion-${g.value}-${q.key}`,style:e.normalizeStyle({height:T(q.key)?"auto":"0",overflow:"hidden"})},[e.createElementVNode("div",FQ,[e.createElementVNode("div",{class:"accordion__content",innerHTML:q.content},null,8,HQ)])],14,RQ)]))),128)),e.withDirectives(e.createElementVNode("div",jQ,[e.createElementVNode("button",{type:"button",class:"btn btn__load-more",onClick:U[0]||(U[0]=q=>m.value+=d.value)},[...U[7]||(U[7]=[e.createElementVNode("span",{class:"i i-load-more"},null,-1)])])],512),[[e.vShow,m.value<y.value.length]]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:C.value,"onUpdate:show":U[1]||(U[1]=q=>C.value=q),onHandleEdit:U[2]||(U[2]=q=>h.value=!0),onHandleDelete:D,onHandleCopy:N,onHandlePaste:A,style:{top:"-10px"}},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(IQ,{key:0,show:h.value,"onUpdate:show":U[3]||(U[3]=q=>h.value=q),data:n.modelValue},null,8,["show","data"]))],46,vQ)}}},[["__scopeId","data-v-5293c86a"]]),zQ=Object.freeze(Object.defineProperty({__proto__:null,default:Dc},Symbol.toStringTag,{value:"Module"})),qQ={install:n=>{n.component("RibbonBlock",Br)}},WQ={install:n=>{n.component("TimelineStory",Pr)}},GQ={install:n=>{n.component("NewsList",Dr)}},XQ={install:n=>{n.component("TheHistoryCarousel",$r)}},YQ={install:n=>{n.component("CardShowcaseProfile",Lr)}},KQ={install:n=>{n.component("ArticleList",fs)}},QQ={install:n=>{n.component("BannerImage",Rl)}},ZQ={install:n=>{n.component("BannerPage",Fl)}},JQ={install:n=>{n.component("BtnList",gs)}},eZ={install:n=>{n.component("GalleryDefault",Hl)}},tZ={install:n=>{n.component("GalleryCaptionRound",jl)}},nZ={install:n=>{n.component("GalleryTimeline",hr)}},oZ={install:n=>{n.component("GalleryTimelineCol",fr)}},aZ={install:n=>{n.component("Process",gr)}},iZ={install:n=>{n.component("CustomSpace",yr)}},sZ={install:n=>{n.component("GalleryList",br)}},lZ={install:n=>{n.component("HeroSlide",Cr)}},rZ={install:n=>{n.component("LinkList",Vr)}},dZ={install:n=>{n.component("QuoteText",xr)}},cZ={install:n=>{n.component("DonorLinks",kr)}},uZ={install:n=>{n.component("CardCarousel",Er)}},mZ={install:n=>{n.component("CardCarouselMultiRow",Tr)}},pZ={install:n=>{n.component("BannerQuote",Nr)}},hZ={install:n=>{n.component("ArticleItem",Sr)}},fZ={install:n=>{n.component("CountDown",Ar)}},gZ={install:n=>{n.component("CustomIframe",Ir)}},yZ={install:n=>{n.component("BannerImageWithLink",Or)}},_Z={install:n=>{n.component("ContactUsList",vr)}},wZ={install:n=>{n.component("TableTwo",Mr)}},bZ={install:n=>{n.component("ScrollKeyInfo",Ur)}},CZ={install:n=>{n.component("ContactUsInfo",Rr)}},VZ={install:n=>{n.component("Publications",Fr)}},xZ={install:n=>{n.component("MapStatic",Hr)}},kZ={install:n=>{n.component("CardCarouselArticles",Qr)}},EZ={install:n=>{n.component("CarouselLogo",jr)}},TZ={install:n=>{n.component("Resources",zr)}},NZ={install:n=>{n.component("ResourcesTwo",qr)}},SZ={install:n=>{n.component("Disc",Wr)}},BZ={install:n=>{n.component("BasicCollapse",Gr)}},PZ={install:n=>{n.component("TableCollapse",Xr)}},DZ={install:n=>{n.component("MediaLogo",vs)}},$Z={install:n=>{n.component("RegisterForm",Yr)}},LZ={install:n=>{n.component("GalleryBlock",Kr)}},AZ={install:n=>{n.component("CardCarouselMultiRowArticles",Zr)}},IZ={install:n=>{n.component("AlummiCommunityList",od)}},vZ={install:n=>{n.component("BlessingMessage",ad)}},MZ={install:n=>{n.component("BlessingSlider",id)}},OZ={install:n=>{n.component("CardShowcase",sd)}},UZ={install:n=>{n.component("ExploreLinks",ld)}},RZ={install:n=>{n.component("SchoolLayout",dd)}},FZ={install:n=>{n.component("CardCarouselMultiRowPublications",cd)}},HZ={install:n=>{n.component("CustomText",Jr)}},jZ={install:n=>{n.component("MediaImageFull",ed)}},zZ={install:n=>{n.component("MediaImageStatic",td)}},qZ={install:n=>{n.component("ArticleListPureText",nd)}},WZ={install:n=>{n.component("TabDefault",ud)}},GZ={install:n=>{n.component("TabTimeLine",md)}},XZ={install:n=>{n.component("CardListProgramme",hd)}},YZ={install:n=>{n.component("CardListCircle",pd)}},KZ={install:n=>{n.component("CardListSchool",fd)}},QZ={install:n=>{n.component("MediaVideo",xc)}},ZZ={install:n=>{n.component("DetailLink",gd)}},JZ={install:n=>{n.component("InformationLink",kc)}},eJ={install:n=>{n.component("TabPage",Ec)}},tJ={install:n=>{n.component("AccordionText",Dc)}},nJ={install:n=>{n.component("TabLogo",Tc)}},oJ={install:n=>{n.component("BackgroundWrapper",Nc)}},aJ={install:n=>{n.component("CollapseCustom",Bc)}},iJ={install:n=>{n.component("VrTour",Pc)}},Bp={default:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"14px",fontFamily:"Inter, sans-serif",borderRadius:"6px",spacing:"16px"},dark:{primaryColor:"#60a5fa",secondaryColor:"#c084fc",fontSize:"14px",fontFamily:"Inter, sans-serif",borderRadius:"6px",spacing:"16px"},compact:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"12px",fontFamily:"Inter, sans-serif",borderRadius:"4px",spacing:"12px"},large:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"16px",fontFamily:"Inter, sans-serif",borderRadius:"8px",spacing:"20px"}},Bn=e.ref(Bp.default),Ao=e.ref(!1);function sJ(){const n=f=>{typeof f=="string"?Bn.value={...Bp[f]}:Bn.value={...f},a()},t=f=>{Bn.value={...Bn.value,...f},a()},o=()=>{Ao.value=!Ao.value,typeof document<"u"&&document.documentElement.classList.toggle("dark",Ao.value)},a=()=>{if(typeof document>"u")return;const f=document.documentElement,h=Bn.value;f.style.setProperty("--theme-primary",h.primaryColor),f.style.setProperty("--theme-secondary",h.secondaryColor),f.style.setProperty("--font-size-default",h.fontSize),f.style.setProperty("--radius-md",h.borderRadius),f.style.setProperty("--spacing-md",h.spacing)},i=f=>e.computed(()=>f==="primary"?Bn.value.primaryColor:Bn.value.secondaryColor),s=()=>e.computed(()=>Bn.value.fontSize),l=()=>e.computed(()=>Bn.value.fontFamily),r=()=>e.computed(()=>Bn.value.borderRadius),c=()=>e.computed(()=>Bn.value.spacing),u=()=>{n("default"),Ao.value=!1,typeof document<"u"&&document.documentElement.classList.remove("dark")},g=()=>JSON.stringify(Bn.value,null,2),m=f=>{try{const h=JSON.parse(f);return n(h),!0}catch(h){return console.error("Invalid theme configuration:",h),!1}},d=()=>{const f=typeof window<"u"&&typeof localStorage<"u",h=f?localStorage.getItem("officialblock-theme"):null,C=f?localStorage.getItem("officialblock-dark-mode"):null;if(h)try{const w=JSON.parse(h);n(w)}catch(w){console.error("Failed to restore theme:",w)}if(C&&(Ao.value=C==="true",typeof document<"u"&&document.documentElement.classList.toggle("dark",Ao.value)),typeof window<"u"&&typeof window.matchMedia=="function"){const w=window.matchMedia("(prefers-color-scheme: dark)"),x=y=>{(!f||!localStorage.getItem("officialblock-dark-mode"))&&(Ao.value=y.matches,typeof document<"u"&&document.documentElement.classList.toggle("dark",Ao.value))};w.addEventListener("change",x)}a()},p=()=>{typeof window<"u"&&typeof localStorage<"u"&&(localStorage.setItem("officialblock-theme",JSON.stringify(Bn.value)),localStorage.setItem("officialblock-dark-mode",Ao.value.toString()))};return{currentTheme:e.computed(()=>Bn.value),isDarkMode:e.computed(()=>Ao.value),themePresets:Bp,setTheme:n,updateTheme:t,toggleDarkMode:o,resetTheme:u,exportTheme:g,importTheme:m,initTheme:d,saveTheme:p,getThemeColor:i,getFontSize:s,getFontFamily:l,getBorderRadius:r,getSpacing:c}}class lJ{static hexToRgb(t){const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:null}static rgbToHex(t,o,a){return"#"+((1<<24)+(t<<16)+(o<<8)+a).toString(16).slice(1)}static adjustBrightness(t,o){const a=this.hexToRgb(t);if(!a)return t;const i=s=>{const l=Math.round(s*(1+o/100));return Math.max(0,Math.min(255,l))};return this.rgbToHex(i(a.r),i(a.g),i(a.b))}static generateColorScale(t){const o=[50,100,200,300,400,500,600,700,800,900,950],a={};return o.forEach((i,s)=>{let l;i<=500?l=80-s*16:l=-20-(s-5)*12,a[i.toString()]=this.adjustBrightness(t,l)}),a}static getContrastRatio(t,o){const a=c=>{const u=this.hexToRgb(c);if(!u)return 0;const g=m=>{const d=m/255;return d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)};return .2126*g(u.r)+.7152*g(u.g)+.0722*g(u.b)},i=a(t),s=a(o),l=Math.max(i,s),r=Math.min(i,s);return(l+.05)/(r+.05)}static isDarkColor(t){const o=this.hexToRgb(t);return o?(o.r*299+o.g*587+o.b*114)/1e3<128:!1}static getBestTextColor(t){return this.isDarkColor(t)?"#ffffff":"#000000"}static mixColors(t,o,a=.5){const i=this.hexToRgb(t),s=this.hexToRgb(o);if(!i||!s)return t;const l=(r,c)=>Math.round(r*(1-a)+c*a);return this.rgbToHex(l(i.r,s.r),l(i.g,s.g),l(i.b,s.b))}}class rJ{static getCurrentBreakpoint(){if(typeof window>"u")return"xl";const t=window.innerWidth;return t<475?"xs":t<640?"sm":t<768?"md":t<1024?"lg":t<1280?"xl":"2xl"}static isMobile(){return typeof window>"u"?!1:window.innerWidth<768}static isTablet(){if(typeof window>"u")return!1;const t=window.innerWidth;return t>=768&&t<1024}static isDesktop(){return typeof window>"u"?!0:window.innerWidth>=1024}static onBreakpointChange(t){if(typeof window>"u")return()=>{};let o=this.getCurrentBreakpoint();const a=()=>{const i=this.getCurrentBreakpoint();i!==o&&(o=i,t(i))};return window.addEventListener("resize",a),()=>{typeof window<"u"&&window.removeEventListener("resize",a)}}}class ly{static animate(t,o,a,i,s=this.easing.easeOutQuad){if(typeof window>"u"||typeof requestAnimationFrame>"u"||typeof performance>"u")return i(o),()=>{};const l=performance.now();let r;const c=u=>{const g=u-l,m=Math.min(g/a,1),d=s(m),p=t+(o-t)*d;i(p),m<1&&(r=requestAnimationFrame(c))};return r=requestAnimationFrame(c),()=>{r&&cancelAnimationFrame(r)}}static scrollTo(t,o,a=300,i=this.easing.easeOutQuad){return new Promise(s=>{if(typeof window>"u"){s();return}const l=t===window,r=l?window.pageYOffset:t.scrollTop;this.animate(r,o,a,c=>{l?window.scrollTo(0,c):t.scrollTop=c},i),setTimeout(s,a)})}}oa(ly,"easing",{linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:-1+(4-2*t)*t,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1});class dJ{static setItem(t,o){if(typeof window>"u"||typeof localStorage>"u")return!1;try{return localStorage.setItem(t,JSON.stringify(o)),!0}catch(a){return console.warn("Failed to save to localStorage:",a),!1}}static getItem(t,o){if(typeof window>"u"||typeof localStorage>"u")return o||null;try{const a=localStorage.getItem(t);return a?JSON.parse(a):o||null}catch(a){return console.warn("Failed to read from localStorage:",a),o||null}}static removeItem(t){if(typeof window>"u"||typeof localStorage>"u")return!1;try{return localStorage.removeItem(t),!0}catch(o){return console.warn("Failed to remove from localStorage:",o),!1}}static cleanExpired(){if(typeof window>"u"||typeof localStorage>"u")return;const t=Date.now(),o=[];for(let a=0;a<localStorage.length;a++){const i=localStorage.key(a);if(i&&i.startsWith("officialblock-"))try{const s=JSON.parse(localStorage.getItem(i)||"{}");s.expires&&s.expires<t&&o.push(i)}catch{}}o.forEach(a=>localStorage.removeItem(a))}}if(typeof globalThis<"u"&&!globalThis.FormData){class n{constructor(){oa(this,"data",new Map)}append(o,a,i){this.data.set(o,{value:a,filename:i})}get(o){const a=this.data.get(o);return a?a.value:null}has(o){return this.data.has(o)}delete(o){this.data.delete(o)}entries(){return this.data.entries()}keys(){return this.data.keys()}values(){return this.data.values()}[Symbol.iterator](){return this.data.entries()}}globalThis.FormData=n}const cJ={install:n=>{n.use(Kp),n.config.globalProperties.$device={get isMobile(){return typeof window<"u"?window.innerWidth<768:!1},get isTablet(){return typeof window<"u"?window.innerWidth>=768&&window.innerWidth<1024:!1},get isMobileOrTablet(){return typeof window<"u"?window.innerWidth<1024:!1},get isDesktop(){return typeof window<"u"?window.innerWidth>=1024:!0}},n.component("ArticleList",fs),n.component("BannerImage",Rl),n.component("BannerPage",Fl),n.component("BtnList",gs),n.component("GalleryDefault",Hl),n.component("GalleryCaptionRound",jl),n.component("GalleryTimeline",hr),n.component("GalleryTimelineCol",fr),n.component("Process",gr),n.component("CustomSpace",yr),n.component("GalleryList",br),n.component("HeroSlide",Cr),n.component("LinkList",Vr),n.component("QuoteText",xr),n.component("DonorLinks",kr),n.component("CardCarousel",Er),n.component("CardCarouselMultiRow",Tr),n.component("BannerQuote",Nr),n.component("ArticleItem",Sr),n.component("RibbonBlock",Br),n.component("TimelineStory",Pr),n.component("NewsList",Dr),n.component("TheHistoryCarousel",$r),n.component("CardShowcaseProfile",Lr),n.component("CountDown",Ar),n.component("ContactUsList",vr),n.component("CustomIframe",Ir),n.component("TableTwo",Mr),n.component("ScrollKeyInfo",Ur),n.component("BannerImageWithLink",Or),n.component("ContactUsInfo",Rr),n.component("Publications",Fr),n.component("MapStatic",Hr),n.component("CardCarouselArticles",Qr),n.component("CarouselLogo",jr),n.component("Resources",zr),n.component("ResourcesTwo",qr),n.component("Disc",Wr),n.component("BasicCollapse",Gr),n.component("TableCollapse",Xr),n.component("MediaLogo",vs),n.component("RegisterForm",Yr),n.component("GalleryBlock",Kr),n.component("CardCarouselMultiRowArticles",Zr),n.component("AlummiCommunityList",od),n.component("BlessingMessage",ad),n.component("BlessingSlider",id),n.component("CardShowcase",sd),n.component("ExploreLinks",ld),n.component("SchoolLayout",dd),n.component("CardCarouselMultiRowPublications",cd),n.component("CustomText",Jr),n.component("MediaImageFull",ed),n.component("MediaImageStatic",td),n.component("ArticleListPureText",nd),n.component("TabDefault",ud),n.component("CardListProgramme",hd),n.component("CardListCircle",pd),n.component("CardListSchool",fd),n.component("MediaVideo",xc),n.component("DetailLink",gd),n.component("InformationLink",kc),n.component("TabTimeLine",md),n.component("TabPage",Ec),n.component("TabLogo",Tc),n.component("BackgroundWrapper",Nc),n.component("CollapseCustom",Bc),n.component("VrTour",Pc),n.component("AccordionText",Dc),n.component("GridLinks",Sp)}},uJ={class:"rich-text-editor"},_t=Object.freeze(Object.defineProperty({__proto__:null,default:J(e.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"请输入内容..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.shallowRef(),l=e.ref(""),r=e.computed(()=>typeof a.height=="number"?`${a.height}px`:a.height),c=e.inject("handleUpload",()=>{}),u=e.inject("fileUrl",null),g=e.inject("chooseName",null),m=e.ref(""),d=e.ref(null),p=N=>{if(!c){console.warn("Upload: handleUpload function not provided by ancestor");return}if(m.value=N,s.value)try{const $=s.value.selection;$&&(d.value={anchor:{path:[...$.anchor.path],offset:$.anchor.offset},focus:{path:[...$.focus.path],offset:$.focus.offset}})}catch($){console.warn("保存光标位置失败:",$)}const A=a.name+"_"+N;c(!0,A)};e.watch(()=>a.name,()=>{u.value=null},{deep:!0,immediate:!0}),e.watch(()=>[u==null?void 0:u.value],([N])=>{const A=a.name+"_"+m.value;!N||!g.value||g.value!==A||s.value&&e.nextTick(()=>{var $,I;if(s.value){try{if(s.value.focus(),d.value)try{s.value.select(d.value)}catch(U){console.warn("恢复光标位置失败,使用默认位置:",U)}}catch(U){console.warn("聚焦编辑器失败:",U)}if(m.value==="img"){const Y=`<img src="${N}" alt="图片" style="max-width: 100%;">`;($=s.value)==null||$.dangerouslyInsertHtml(Y)}else{const Y=`<video src="${N}" controls style="max-width: 100%;"></video>`;(I=s.value)==null||I.dangerouslyInsertHtml(Y)}d.value=null,m.value=""}})},{immediate:!1});function f(N){return class{constructor(){oa(this,"title");oa(this,"tag");oa(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){e.nextTick(()=>{console.log("点击了自定义上传图片菜单"),N("img")})}}}function h(N){return class{constructor(){oa(this,"title");oa(this,"tag");oa(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){e.nextTick(()=>{console.log("点击了自定义上传视频菜单"),N("video")})}}}const C={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},w={placeholder:a.placeholder,readOnly:a.disabled,maxLength:a.maxLength,MENU_CONF:{},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},x=Math.random().toString(36).substring(2,9),y=`CustomImageMenu_${x}`,b=`CustomVideoMenu_${x}`,V=N=>{s.value=N;try{const A=f(p),$=h(p),I={key:y,factory(){return new A}},U={key:b,factory(){return new $}};qp.Boot.registerMenu(I),qp.Boot.registerMenu(U)}catch(A){console.warn("菜单注册失败:",A)}C.insertKeys={index:0,keys:[y,b]},i("created",N)};e.onBeforeUnmount(()=>{const N=s.value;N!=null&&N.destroy()}),e.watch(()=>a.modelValue,N=>{N!==l.value&&(l.value=N||"")},{immediate:!0});const T=N=>{i("update:modelValue",l.value),i("change",N)},k=()=>{s.value=void 0},S=N=>{i("focus",N)},D=N=>{i("blur",N)};return t({editor:s,getHtml:()=>l.value,getText:()=>{var N;return((N=s.value)==null?void 0:N.getText())||""},isEmpty:()=>{var N;return((N=s.value)==null?void 0:N.isEmpty())||!0},clear:()=>{var N;return(N=s.value)==null?void 0:N.clear()},focus:()=>{var N;return(N=s.value)==null?void 0:N.focus()},blur:()=>{var N;return(N=s.value)==null?void 0:N.blur()},disable:()=>{var N;return(N=s.value)==null?void 0:N.disable()},enable:()=>{var N;return(N=s.value)==null?void 0:N.enable()}}),(N,A)=>(e.openBlock(),e.createElementBlock("div",uJ,[e.createVNode(e.unref(zp.Toolbar),{class:"editor-toolbar",editor:s.value,defaultConfig:C,mode:n.mode},null,8,["editor","mode"]),e.createVNode(e.unref(zp.Editor),{class:"editor-content",style:e.normalizeStyle({height:r.value}),modelValue:l.value,"onUpdate:modelValue":A[0]||(A[0]=$=>l.value=$),defaultConfig:w,mode:n.mode,onOnCreated:V,onOnChange:T,onOnDestroyed:k,onOnFocus:S,onOnBlur:D},null,8,["style","modelValue","mode"])]))}}),[["__scopeId","data-v-55807020"]])},Symbol.toStringTag,{value:"Module"}));ne.AccordionText=Dc,ne.AccordionTextPlugin=tJ,ne.AlummiCommunityList=od,ne.AlummiCommunityListPlugin=IZ,ne.AnimationUtils=ly,ne.ArticleItem=Sr,ne.ArticleItemPlugin=hZ,ne.ArticleList=fs,ne.ArticleListPlugin=KQ,ne.ArticleListPureText=nd,ne.ArticleListPureTextPlugin=qZ,ne.BackgroundWrapper=Nc,ne.BackgroundWrapperPlugin=oJ,ne.BannerImage=Rl,ne.BannerImagePlugin=QQ,ne.BannerImageWithLink=Or,ne.BannerImageWithLinkPlugin=yZ,ne.BannerPage=Fl,ne.BannerPagePlugin=ZQ,ne.BannerQuote=Nr,ne.BannerQuotePlugin=pZ,ne.BasicCollapse=Gr,ne.BasicCollapsePlugin=BZ,ne.BlessingMessage=ad,ne.BlessingMessagePlugin=vZ,ne.BlessingSlider=id,ne.BlessingSliderPlugin=MZ,ne.BtnList=gs,ne.BtnListPlugin=JQ,ne.CardCarousel=Er,ne.CardCarouselArticles=Qr,ne.CardCarouselArticlesPlugin=kZ,ne.CardCarouselMultiRow=Tr,ne.CardCarouselMultiRowArticles=Zr,ne.CardCarouselMultiRowArticlesPlugin=AZ,ne.CardCarouselMultiRowPlugin=mZ,ne.CardCarouselMultiRowPublications=cd,ne.CardCarouselMultiRowPublicationsPlugin=FZ,ne.CardCarouselPlugin=uZ,ne.CardListCircle=pd,ne.CardListCirclePlugin=YZ,ne.CardListProgramme=hd,ne.CardListProgrammePlugin=XZ,ne.CardListSchool=fd,ne.CardListSchoolPlugin=KZ,ne.CardShowcase=sd,ne.CardShowcasePlugin=OZ,ne.CardShowcaseProfile=Lr,ne.CardShowcaseProfilePlugin=YQ,ne.CarouselLogo=jr,ne.CarouselLogoPlugin=EZ,ne.CollapseCustom=Bc,ne.CollapseCustomPlugin=aJ,ne.ContactUsInfo=Rr,ne.ContactUsInfoPlugin=CZ,ne.ContactUsList=vr,ne.ContactUsListPlugin=_Z,ne.CountDown=Ar,ne.CountDownPlugin=fZ,ne.CustomIframe=Ir,ne.CustomIframePlugin=gZ,ne.CustomSpace=yr,ne.CustomSpacePlugin=iZ,ne.CustomText=Jr,ne.CustomTextPlugin=HZ,ne.DetailLink=gd,ne.DetailLinkPlugin=ZZ,ne.Disc=Wr,ne.DiscPlugin=SZ,ne.DonorLinks=kr,ne.DonorLinksPlugin=cZ,ne.ExploreLinks=ld,ne.ExploreLinksPlugin=UZ,ne.GalleryBlock=Kr,ne.GalleryBlockPlugin=LZ,ne.GalleryCaptionRound=jl,ne.GalleryCaptionRoundPlugin=tZ,ne.GalleryDefault=Hl,ne.GalleryDefaultPlugin=eZ,ne.GalleryList=br,ne.GalleryListPlugin=sZ,ne.GalleryTimeline=hr,ne.GalleryTimelineCol=fr,ne.GalleryTimelineColPlugin=oZ,ne.GalleryTimelinePlugin=nZ,ne.GridLinks=Sp,ne.HeroSlide=Cr,ne.HeroSlidePlugin=lZ,ne.InformationLink=kc,ne.InformationLinkPlugin=JZ,ne.LinkList=Vr,ne.LinkListPlugin=rZ,ne.MapStatic=Hr,ne.MapStaticPlugin=xZ,ne.MediaImageFull=ed,ne.MediaImageFullPlugin=jZ,ne.MediaImageStatic=td,ne.MediaImageStaticPlugin=zZ,ne.MediaLogo=vs,ne.MediaLogoPlugin=DZ,ne.MediaVideo=xc,ne.MediaVideoPlugin=QZ,ne.NewsList=Dr,ne.NewsListPlugin=GQ,ne.Process=gr,ne.ProcessPlugin=aZ,ne.Publications=Fr,ne.PublicationsPlugin=VZ,ne.QuoteText=xr,ne.QuoteTextPlugin=dZ,ne.RegisterForm=Yr,ne.RegisterFormPlugin=$Z,ne.Resources=zr,ne.ResourcesPlugin=TZ,ne.ResourcesTwo=qr,ne.ResourcesTwoPlugin=NZ,ne.ResponsiveUtils=rJ,ne.RibbonBlock=Br,ne.RibbonBlockPlugin=qQ,ne.SchoolLayout=dd,ne.SchoolLayoutPlugin=RZ,ne.ScrollKeyInfo=Ur,ne.ScrollKeyInfoPlugin=bZ,ne.StorageUtils=dJ,ne.TabDefault=ud,ne.TabDefaultPlugin=WZ,ne.TabLogo=Tc,ne.TabLogoPlugin=nJ,ne.TabPage=Ec,ne.TabPagePlugin=eJ,ne.TabTimeLine=md,ne.TabTimeLinePlugin=GZ,ne.TableCollapse=Xr,ne.TableCollapsePlugin=PZ,ne.TableTwo=Mr,ne.TableTwoPlugin=wZ,ne.TheHistoryCarousel=$r,ne.TheHistoryCarouselPlugin=XQ,ne.ThemeUtils=lJ,ne.TimelineStory=Pr,ne.TimelineStoryPlugin=WQ,ne.VrTour=Pc,ne.VrTourPlugin=iJ,ne.VueScreenPlugin=Kp,ne.default=cJ,ne.useTheme=sJ,ne.useVueScreen=Xy,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
534
+ `,r++,l=d}),this.end_=l,this.storage_=i,this.diagnostics_=s}calculateBaseTime_(t,o,a){if(!this.storage_.size)return 0;if(this.storage_.has(t))return this.storage_.get(t).segmentSyncInfo.start;const i=Math.min(...this.storage_.keys());if(t<i){const s=i-t;let l=this.storage_.get(i).segmentSyncInfo.start;for(let r=0;r<s;r++){const c=o[r];l-=c.duration}return l}return a}isReliablePlaylist_(t,o){return t!=null&&Array.isArray(o)&&o.length}}class R2 extends U2{constructor(t){super(),this.parent_=t}calculateBaseTime_(t,o,a){if(!this.storage_.size){const i=this.parent_.getSyncInfoForMediaSequence(t);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(t,o,a)}}const GW=86400,Ep=[{name:"VOD",run:(n,t,o,a,i)=>o!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(n,t,o,a,i,s)=>{const l=n.getMediaSequenceSync(s);if(!l||!l.isReliable)return null;const r=l.getSyncInfoForTime(i);return r?{time:r.start,partIndex:r.partIndex,segmentIndex:r.segmentIndex}:null}},{name:"ProgramDateTime",run:(n,t,o,a,i)=>{if(!Object.keys(n.timelineToDatetimeMappings).length)return null;let s=null,l=null;const r=rp(t);i=i||0;for(let c=0;c<r.length;c++){const u=t.endList||i===0?c:r.length-(c+1),g=r[u],m=g.segment,d=n.timelineToDatetimeMappings[m.timeline];if(!d||!m.dateTimeObject)continue;let f=m.dateTimeObject.getTime()/1e3+d;if(m.parts&&typeof g.partIndex=="number")for(let C=0;C<g.partIndex;C++)f+=m.parts[C].duration;const h=Math.abs(i-f);if(l!==null&&(h===0||l<h))break;l=h,s={time:f,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}return s}},{name:"Segment",run:(n,t,o,a,i)=>{let s=null,l=null;i=i||0;const r=rp(t);for(let c=0;c<r.length;c++){const u=t.endList||i===0?c:r.length-(c+1),g=r[u],m=g.segment,d=g.part&&g.part.start||m&&m.start;if(m.timeline===a&&typeof d<"u"){const p=Math.abs(i-d);if(l!==null&&l<p)break;(!s||l===null||l>=p)&&(l=p,s={time:d,segmentIndex:g.segmentIndex,partIndex:g.partIndex})}}return s}},{name:"Discontinuity",run:(n,t,o,a,i)=>{let s=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length){let l=null;for(let r=0;r<t.discontinuityStarts.length;r++){const c=t.discontinuityStarts[r],u=t.discontinuitySequence+r+1,g=n.discontinuities[u];if(g){const m=Math.abs(i-g.time);if(l!==null&&l<m)break;(!s||l===null||l>=m)&&(l=m,s={time:g.time,segmentIndex:c,partIndex:null})}}}return s}},{name:"Playlist",run:(n,t,o,a,i)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class XW extends oe.EventTarget{constructor(t={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const o=new U2,a=new R2(o),i=new R2(o);this.mediaSequenceStorage_={main:o,audio:a,vtt:i},this.logger_=no("SyncController")}getMediaSequenceSync(t){return this.mediaSequenceStorage_[t]||null}getSyncPoint(t,o,a,i,s){if(o!==1/0)return Ep.find(({name:c})=>c==="VOD").run(this,t,o);const l=this.runStrategies_(t,o,a,i,s);if(!l.length)return null;for(const r of l){const{syncPoint:c,strategy:u}=r,{segmentIndex:g,time:m}=c;if(g<0)continue;const d=t.segments[g],p=m,f=p+d.duration;if(this.logger_(`Strategy: ${u}. Current time: ${i}. selected segment: ${g}. Time: [${p} -> ${f}]}`),i>=p&&i<f)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(l,{key:"time",value:i})}getExpiredTime(t,o){if(!t||!t.segments)return null;const a=this.runStrategies_(t,o,t.discontinuitySequence,0);if(!a.length)return null;const i=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+gl({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(t,o,a,i,s){const l=[];for(let r=0;r<Ep.length;r++){const c=Ep[r],u=c.run(this,t,o,a,i,s);u&&(u.strategy=c.name,l.push({strategy:c.name,syncPoint:u}))}return l}selectSyncPoint_(t,o){let a=t[0].syncPoint,i=Math.abs(t[0].syncPoint[o.key]-o.value),s=t[0].strategy;for(let l=1;l<t.length;l++){const r=Math.abs(t[l].syncPoint[o.key]-o.value);r<i&&(i=r,a=t[l].syncPoint,s=t[l].strategy)}return this.logger_(`syncPoint for [${o.key}: ${o.value}] chosen with strategy [${s}]: [time:${a.time}, segmentIndex:${a.segmentIndex}`+(typeof a.partIndex=="number"?`,partIndex:${a.partIndex}`:"")+"]"),a}saveExpiredSegmentInfo(t,o){const a=o.mediaSequence-t.mediaSequence;if(a>GW){oe.log.warn(`Not saving expired segment info. Media sequence gap ${a} is too large.`);return}for(let i=a-1;i>=0;i--){const s=t.segments[i];if(s&&typeof s.start<"u"){o.syncInfo={mediaSequence:t.mediaSequence+i,time:s.start},this.logger_(`playlist refresh sync: [time:${o.syncInfo.time}, mediaSequence: ${o.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(t){if(this.timelineToDatetimeMappings={},t.segments&&t.segments.length&&t.segments[0].dateTimeObject){const o=t.segments[0],a=o.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[o.timeline]=-a}}saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:o}){const a=this.calculateSegmentTimeMapping_(t,t.timingInfo,o),i=t.segment;a&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));const s=i.dateTimeObject;i.discontinuity&&o&&s&&(this.timelineToDatetimeMappings[i.timeline]=-(s.getTime()/1e3))}timestampOffsetForTimeline(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].time}mappingForTimeline(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].mapping}calculateSegmentTimeMapping_(t,o,a){const i=t.segment,s=t.part;let l=this.timelines[t.timeline],r,c;if(typeof t.timestampOffset=="number")l={time:t.startOfSegment,mapping:t.startOfSegment-o.start},a&&(this.timelines[t.timeline]=l,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${t.timeline}: [time: ${l.time}] [mapping: ${l.mapping}]`)),r=t.startOfSegment,c=o.end+l.mapping;else if(l)r=o.start+l.mapping,c=o.end+l.mapping;else return!1;return s&&(s.start=r,s.end=c),(!i.start||r<i.start)&&(i.start=r),i.end=c,!0}saveDiscontinuitySyncInfo_(t){const o=t.playlist,a=t.segment;if(a.discontinuity)this.discontinuities[a.timeline]={time:a.start,accuracy:0};else if(o.discontinuityStarts&&o.discontinuityStarts.length)for(let i=0;i<o.discontinuityStarts.length;i++){const s=o.discontinuityStarts[i],l=o.discontinuitySequence+i+1,r=s-t.mediaIndex,c=Math.abs(r);if(!this.discontinuities[l]||this.discontinuities[l].accuracy>c){let u;r<0?u=a.start-gl({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex,endIndex:s}):u=a.end+gl({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex+1,endIndex:s}),this.discontinuities[l]={time:u,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class YW extends oe.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:t,from:o,to:a}){return typeof o=="number"&&typeof a=="number"&&(this.pendingTimelineChanges_[t]={type:t,from:o,to:a},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]}lastTimelineChange({type:t,from:o,to:a}){if(typeof o=="number"&&typeof a=="number"){this.lastTimelineChanges_[t]={type:t,from:o,to:a},delete this.pendingTimelineChanges_[t];const i={timelineChangeInfo:{from:o,to:a}};this.trigger({type:"timelinechange",metadata:i})}return this.lastTimelineChanges_[t]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const KW=m2(p2(function(){var n=function(){function h(){this.listeners={}}var C=h.prototype;return C.on=function(x,y){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push(y)},C.off=function(x,y){if(!this.listeners[x])return!1;var b=this.listeners[x].indexOf(y);return this.listeners[x]=this.listeners[x].slice(0),this.listeners[x].splice(b,1),b>-1},C.trigger=function(x){var y=this.listeners[x];if(y)if(arguments.length===2)for(var b=y.length,V=0;V<b;++V)y[V].call(this,arguments[1]);else for(var T=Array.prototype.slice.call(arguments,1),k=y.length,S=0;S<k;++S)y[S].apply(this,T)},C.dispose=function(){this.listeners={}},C.pipe=function(x){this.on("data",function(y){x.push(y)})},h}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function t(h){return h.subarray(0,h.byteLength-h[h.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const o=function(){const h=[[[],[],[],[],[]],[[],[],[],[],[]]],C=h[0],w=h[1],x=C[4],y=w[4];let b,V,T;const k=[],S=[];let D,N,A,$,I,U;for(b=0;b<256;b++)S[(k[b]=b<<1^(b>>7)*283)^b]=b;for(V=T=0;!x[V];V^=D||1,T=S[T]||1)for($=T^T<<1^T<<2^T<<3^T<<4,$=$>>8^$&255^99,x[V]=$,y[$]=V,A=k[N=k[D=k[V]]],U=A*16843009^N*65537^D*257^V*16843008,I=k[$]*257^$*16843008,b=0;b<4;b++)C[b][V]=I=I<<24^I>>>8,w[b][$]=U=U<<24^U>>>8;for(b=0;b<5;b++)C[b]=C[b].slice(0),w[b]=w[b].slice(0);return h};let a=null;class i{constructor(C){a||(a=o()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];let w,x,y;const b=this._tables[0][4],V=this._tables[1],T=C.length;let k=1;if(T!==4&&T!==6&&T!==8)throw new Error("Invalid aes key size");const S=C.slice(0),D=[];for(this._key=[S,D],w=T;w<4*T+28;w++)y=S[w-1],(w%T===0||T===8&&w%T===4)&&(y=b[y>>>24]<<24^b[y>>16&255]<<16^b[y>>8&255]<<8^b[y&255],w%T===0&&(y=y<<8^y>>>24^k<<24,k=k<<1^(k>>7)*283)),S[w]=S[w-T]^y;for(x=0;w;x++,w--)y=S[x&3?w:w-4],w<=4||x<4?D[x]=y:D[x]=V[0][b[y>>>24]]^V[1][b[y>>16&255]]^V[2][b[y>>8&255]]^V[3][b[y&255]]}decrypt(C,w,x,y,b,V){const T=this._key[1];let k=C^T[0],S=y^T[1],D=x^T[2],N=w^T[3],A,$,I;const U=T.length/4-2;let Y,G=4;const q=this._tables[1],O=q[0],H=q[1],R=q[2],M=q[3],W=q[4];for(Y=0;Y<U;Y++)A=O[k>>>24]^H[S>>16&255]^R[D>>8&255]^M[N&255]^T[G],$=O[S>>>24]^H[D>>16&255]^R[N>>8&255]^M[k&255]^T[G+1],I=O[D>>>24]^H[N>>16&255]^R[k>>8&255]^M[S&255]^T[G+2],N=O[N>>>24]^H[k>>16&255]^R[S>>8&255]^M[D&255]^T[G+3],G+=4,k=A,S=$,D=I;for(Y=0;Y<4;Y++)b[(3&-Y)+V]=W[k>>>24]<<24^W[S>>16&255]<<16^W[D>>8&255]<<8^W[N&255]^T[G++],A=k,k=S,S=D,D=N,N=A}}class s extends n{constructor(){super(n),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(C){this.jobs.push(C),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const l=function(h){return h<<24|(h&65280)<<8|(h&16711680)>>8|h>>>24},r=function(h,C,w){const x=new Int32Array(h.buffer,h.byteOffset,h.byteLength>>2),y=new i(Array.prototype.slice.call(C)),b=new Uint8Array(h.byteLength),V=new Int32Array(b.buffer);let T,k,S,D,N,A,$,I,U;for(T=w[0],k=w[1],S=w[2],D=w[3],U=0;U<x.length;U+=4)N=l(x[U]),A=l(x[U+1]),$=l(x[U+2]),I=l(x[U+3]),y.decrypt(N,A,$,I,V,U),V[U]=l(V[U]^T),V[U+1]=l(V[U+1]^k),V[U+2]=l(V[U+2]^S),V[U+3]=l(V[U+3]^D),T=N,k=A,S=$,D=I;return b};class c{constructor(C,w,x,y){const b=c.STEP,V=new Int32Array(C.buffer),T=new Uint8Array(C.byteLength);let k=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(V.subarray(k,k+b),w,x,T)),k=b;k<V.length;k+=b)x=new Uint32Array([l(V[k-4]),l(V[k-3]),l(V[k-2]),l(V[k-1])]),this.asyncStream_.push(this.decryptChunk_(V.subarray(k,k+b),w,x,T));this.asyncStream_.push(function(){y(null,t(T))})}static get STEP(){return 32e3}decryptChunk_(C,w,x,y){return function(){const b=r(C,w,x);y.set(b,C.byteOffset)}}}var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g;typeof window<"u"?g=window:typeof u<"u"?g=u:typeof self<"u"?g=self:g={};var m=g,d=function(C){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(C):C&&C.buffer instanceof ArrayBuffer},p=m.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000"),function(){var h=new Uint16Array([65484]),C=new Uint8Array(h.buffer,h.byteOffset,h.byteLength);return C[0]===255?"big":C[0]===204?"little":"unknown"}();const f=function(h){const C={};return Object.keys(h).forEach(w=>{const x=h[w];d(x)?C[w]={bytes:x.buffer,byteOffset:x.byteOffset,byteLength:x.byteLength}:C[w]=x}),C};self.onmessage=function(h){const C=h.data,w=new Uint8Array(C.encrypted.bytes,C.encrypted.byteOffset,C.encrypted.byteLength),x=new Uint32Array(C.key.bytes,C.key.byteOffset,C.key.byteLength/4),y=new Uint32Array(C.iv.bytes,C.iv.byteOffset,C.iv.byteLength/4);new c(w,x,y,function(b,V){self.postMessage(f({source:C.source,decrypted:V}),[V.buffer])})}}));var QW=u2(KW);const ZW=n=>{let t=n.default?"main":"alternative";return n.characteristics&&n.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},F2=(n,t)=>{n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Tp=(n,t)=>{t.activePlaylistLoader=n,n.load()},JW=(n,t)=>()=>{const{segmentLoaders:{[n]:o,main:a},mediaTypes:{[n]:i}}=t,s=i.activeTrack(),l=i.getActiveGroup(),r=i.activePlaylistLoader,c=i.lastGroup_;if(!(l&&c&&l.id===c.id)&&(i.lastGroup_=l,i.lastTrack_=s,F2(o,i),!(!l||l.isMainPlaylist))){if(!l.playlistLoader){r&&a.resetEverything();return}o.resyncLoader(),Tp(l.playlistLoader,i)}},eG=(n,t)=>()=>{const{segmentLoaders:{[n]:o},mediaTypes:{[n]:a}}=t;a.lastGroup_=null,o.abort(),o.pause()},tG=(n,t)=>()=>{const{mainPlaylistLoader:o,segmentLoaders:{[n]:a,main:i},mediaTypes:{[n]:s}}=t,l=s.activeTrack(),r=s.getActiveGroup(),c=s.activePlaylistLoader,u=s.lastTrack_;if(!(u&&l&&u.id===l.id)&&(s.lastGroup_=r,s.lastTrack_=l,F2(a,s),!!r)){if(r.isMainPlaylist){if(!l||!u||l.id===u.id)return;const g=t.vhs.playlistController_,m=g.selectPlaylist();if(g.media()===m)return;s.logger_(`track change. Switching main audio from ${u.id} to ${l.id}`),o.pause(),i.resetEverything(),g.fastQualityChange_(m);return}if(n==="AUDIO"){if(!r.playlistLoader){i.setAudio(!0),i.resetEverything();return}a.setAudio(!0),i.setAudio(!1)}if(c===r.playlistLoader){Tp(r.playlistLoader,s);return}a.track&&a.track(l),a.resetEverything(),Tp(r.playlistLoader,s)}},Cc={AUDIO:(n,t)=>()=>{const{mediaTypes:{[n]:o},excludePlaylist:a}=t,i=o.activeTrack(),s=o.activeGroup(),l=(s.filter(c=>c.default)[0]||s[0]).id,r=o.tracks[l];if(i===r){a({error:{message:"Problem encountered loading the default audio track."}});return}oe.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in o.tracks)o.tracks[c].enabled=o.tracks[c]===r;o.onTrackChanged()},SUBTITLES:(n,t)=>()=>{const{mediaTypes:{[n]:o}}=t;oe.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const a=o.activeTrack();a&&(a.mode="disabled"),o.onTrackChanged()}},H2={AUDIO:(n,t,o)=>{if(!t)return;const{tech:a,requestOptions:i,segmentLoaders:{[n]:s}}=o;t.on("loadedmetadata",()=>{const l=t.media();s.playlist(l,i),(!a.paused()||l.endList&&a.preload()!=="none")&&s.load()}),t.on("loadedplaylist",()=>{s.playlist(t.media(),i),a.paused()||s.load()}),t.on("error",Cc[n](n,o))},SUBTITLES:(n,t,o)=>{const{tech:a,requestOptions:i,segmentLoaders:{[n]:s},mediaTypes:{[n]:l}}=o;t.on("loadedmetadata",()=>{const r=t.media();s.playlist(r,i),s.track(l.activeTrack()),(!a.paused()||r.endList&&a.preload()!=="none")&&s.load()}),t.on("loadedplaylist",()=>{s.playlist(t.media(),i),a.paused()||s.load()}),t.on("error",Cc[n](n,o))}},nG={AUDIO:(n,t)=>{const{vhs:o,sourceType:a,segmentLoaders:{[n]:i},requestOptions:s,main:{mediaGroups:l},mediaTypes:{[n]:{groups:r,tracks:c,logger_:u}},mainPlaylistLoader:g}=t,m=yl(g.main);(!l[n]||Object.keys(l[n]).length===0)&&(l[n]={main:{default:{default:!0}}},m&&(l[n].main.default.playlists=g.main.playlists));for(const d in l[n]){r[d]||(r[d]=[]);for(const p in l[n][d]){let f=l[n][d][p],h;if(m?(u(`AUDIO group '${d}' label '${p}' is a main playlist`),f.isMainPlaylist=!0,h=null):a==="vhs-json"&&f.playlists?h=new os(f.playlists[0],o,s):f.resolvedUri?h=new os(f.resolvedUri,o,s):f.playlists&&a==="dash"?h=new yp(f.playlists[0],o,s,g):h=null,f=at({id:p,playlistLoader:h},f),H2[n](n,f.playlistLoader,t),r[d].push(f),typeof c[p]>"u"){const C=new oe.AudioTrack({id:p,kind:ZW(f),enabled:!1,language:f.language,default:f.default,label:p});c[p]=C}}}i.on("error",Cc[n](n,t))},SUBTITLES:(n,t)=>{const{tech:o,vhs:a,sourceType:i,segmentLoaders:{[n]:s},requestOptions:l,main:{mediaGroups:r},mediaTypes:{[n]:{groups:c,tracks:u}},mainPlaylistLoader:g}=t;for(const m in r[n]){c[m]||(c[m]=[]);for(const d in r[n][m]){if(!a.options_.useForcedSubtitles&&r[n][m][d].forced)continue;let p=r[n][m][d],f;if(i==="hls")f=new os(p.resolvedUri,a,l);else if(i==="dash"){if(!p.playlists.filter(C=>C.excludeUntil!==1/0).length)return;f=new yp(p.playlists[0],a,l,g)}else i==="vhs-json"&&(f=new os(p.playlists?p.playlists[0]:p.resolvedUri,a,l));if(p=at({id:d,playlistLoader:f},p),H2[n](n,p.playlistLoader,t),c[m].push(p),typeof u[d]>"u"){const h=o.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;u[d]=h}}}s.on("error",Cc[n](n,t))},"CLOSED-CAPTIONS":(n,t)=>{const{tech:o,main:{mediaGroups:a},mediaTypes:{[n]:{groups:i,tracks:s}}}=t;for(const l in a[n]){i[l]||(i[l]=[]);for(const r in a[n][l]){const c=a[n][l][r];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const u=o.options_.vhs&&o.options_.vhs.captionServices||{};let g={label:r,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(u[g.instreamId]&&(g=at(g,u[g.instreamId])),g.default===void 0&&delete g.default,i[l].push(at({id:r},c)),typeof s[r]>"u"){const m=o.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;s[r]=m}}}}},j2=(n,t)=>{for(let o=0;o<n.length;o++)if(up(t,n[o])||n[o].playlists&&j2(n[o].playlists,t))return!0;return!1},oG=(n,t)=>o=>{const{mainPlaylistLoader:a,mediaTypes:{[n]:{groups:i}}}=t,s=a.media();if(!s)return null;let l=null;s.attributes[n]&&(l=i[s.attributes[n]]);const r=Object.keys(i);if(!l)if(n==="AUDIO"&&r.length>1&&yl(t.main))for(let c=0;c<r.length;c++){const u=i[r[c]];if(j2(u,s)){l=u;break}}else i.main?l=i.main:r.length===1&&(l=i[r[0]]);return typeof o>"u"?l:o===null||!l?null:l.filter(c=>c.id===o.id)[0]||null},aG={AUDIO:(n,t)=>()=>{const{mediaTypes:{[n]:{tracks:o}}}=t;for(const a in o)if(o[a].enabled)return o[a];return null},SUBTITLES:(n,t)=>()=>{const{mediaTypes:{[n]:{tracks:o}}}=t;for(const a in o)if(o[a].mode==="showing"||o[a].mode==="hidden")return o[a];return null}},iG=(n,{mediaTypes:t})=>()=>{const o=t[n].activeTrack();return o?t[n].activeGroup(o):null},sG=n=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{nG[u](u,n)});const{mediaTypes:t,mainPlaylistLoader:o,tech:a,vhs:i,segmentLoaders:{["AUDIO"]:s,main:l}}=n;["AUDIO","SUBTITLES"].forEach(u=>{t[u].activeGroup=oG(u,n),t[u].activeTrack=aG[u](u,n),t[u].onGroupChanged=JW(u,n),t[u].onGroupChanging=eG(u,n),t[u].onTrackChanged=tG(u,n),t[u].getActiveGroup=iG(u,n)});const r=t.AUDIO.activeGroup();if(r){const u=(r.filter(m=>m.default)[0]||r[0]).id;t.AUDIO.tracks[u].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(l.setAudio(!1),s.setAudio(!0)):l.setAudio(!0)}o.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(u=>t[u].onGroupChanged())}),o.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(u=>t[u].onGroupChanging())});const c=()=>{t.AUDIO.onTrackChanged(),a.trigger({type:"usage",name:"vhs-audio-change"})};a.audioTracks().addEventListener("change",c),a.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",()=>{a.audioTracks().removeEventListener("change",c),a.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),a.clearTracks("audio");for(const u in t.AUDIO.tracks)a.audioTracks().addTrack(t.AUDIO.tracks[u])},lG=()=>{const n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Qo,activeTrack:Qo,getActiveGroup:Qo,onGroupChanged:Qo,onTrackChanged:Qo,lastTrack_:null,logger_:no(`MediaGroups[${t}]`)}}),n};class z2{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(t){t===1&&(this.version_=t)}set ttl(t){this.ttl_=t||300}set reloadUri(t){t&&(this.reloadUri_=Nn(this.reloadUri_,t))}set priority(t){t&&t.length&&(this.priority_=t)}set pathwayClones(t){t&&t.length&&(this.pathwayClones_=new Map(t.map(o=>[o.ID,o])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class rG extends oe.EventTarget{constructor(t,o){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new z2,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=no("Content Steering"),this.xhr_=t,this.getBandwidth_=o}assignTagProperties(t,o){this.manifestType_=o.serverUri?"HLS":"DASH";const a=o.serverUri||o.serverURL;if(!a){this.logger_(`steering manifest URL is ${a}, cannot request steering manifest.`),this.trigger("error");return}if(a.startsWith("data:")){this.decodeDataUriManifest_(a.substring(a.indexOf(",")+1));return}this.steeringManifest.reloadUri=Nn(t,a),this.defaultPathway=o.pathwayId||o.defaultServiceLocation,this.queryBeforeStart=o.queryBeforeStart,this.proxyServerUrl_=o.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(t){const o=this.steeringManifest.reloadUri;if(!o)return;const a=t?o:this.getRequestURI(o);if(!a){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const i={contentSteeringInfo:{uri:a}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:a,requestType:"content-steering-manifest"},(s,l)=>{if(s){if(l.status===410){this.logger_(`manifest request 410 ${s}.`),this.logger_(`There will be no more content steering requests to ${a} this session.`),this.excludedSteeringManifestURLs.add(a);return}if(l.status===429){const u=l.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${s}.`),this.logger_(`content steering will retry in ${u} seconds.`),this.startTTLTimeout_(parseInt(u,10));return}this.logger_(`manifest failed to load ${s}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:i});let r;try{r=JSON.parse(this.request_.responseText)}catch(u){const g={errorType:oe.Error.StreamingContentSteeringParserError,error:u};this.trigger({type:"error",metadata:g})}this.assignSteeringProperties_(r);const c={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(t){const o=new K.URL(t),a=new K.URL(this.proxyServerUrl_);return a.searchParams.set("url",encodeURI(o.toString())),this.setSteeringParams_(a.toString())}decodeDataUriManifest_(t){const o=JSON.parse(K.atob(t));this.assignSteeringProperties_(o)}setSteeringParams_(t){const o=new K.URL(t),a=this.getPathway(),i=this.getBandwidth_();if(a){const s=`_${this.manifestType_}_pathway`;o.searchParams.set(s,a)}if(i){const s=`_${this.manifestType_}_throughput`;o.searchParams.set(s,i)}return o.toString()}assignSteeringProperties_(t){if(this.steeringManifest.version=t.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${t.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=t.TTL,this.steeringManifest.reloadUri=t["RELOAD-URI"],this.steeringManifest.priority=t["PATHWAY-PRIORITY"]||t["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=t["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const a=(i=>{for(const s of i)if(this.availablePathways_.has(s))return s;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==a&&(this.currentPathway=a,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(t){if(!t)return null;const o=i=>this.excludedSteeringManifestURLs.has(i);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(t);if(!o(i))return i}const a=this.setSteeringParams_(t);return o(a)?null:a}startTTLTimeout_(t=this.steeringManifest.ttl){const o=t*1e3;this.ttlTimeout_=K.setTimeout(()=>{this.requestSteeringManifest()},o)}clearTTLTimeout_(){K.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new z2}addAvailablePathway(t){t&&this.availablePathways_.add(t)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(t){return this.availablePathways_.delete(t)}didDASHTagChange(t,o){return!o&&this.steeringManifest.reloadUri||o&&(Nn(t,o.serverURL)!==this.steeringManifest.reloadUri||o.defaultServiceLocation!==this.defaultPathway||o.queryBeforeStart!==this.queryBeforeStart||o.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const dG=(n,t)=>{let o=null;return(...a)=>{clearTimeout(o),o=setTimeout(()=>{n.apply(null,a)},t)}},cG=10;let Ca;const uG=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],mG=function(n){return this.audioSegmentLoader_[n]+this.mainSegmentLoader_[n]},pG=function({currentPlaylist:n,buffered:t,currentTime:o,nextPlaylist:a,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:l,bufferBasedABR:r,log:c}){if(!a)return oe.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${n&&n.id||"null"} -> ${a.id}`;if(!n)return c(`${u} as current playlist is not set`),!0;if(a.id===n.id)return!1;const g=!!es(t,o).length;if(!n.endList)return!g&&typeof n.partTargetDuration=="number"?(c(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${u} as current playlist is live`),!0);const m=sp(t,o),d=r?zt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:zt.MAX_BUFFER_LOW_WATER_LINE;if(l<d)return c(`${u} as duration < max low water line (${l} < ${d})`),!0;const p=a.attributes.BANDWIDTH,f=n.attributes.BANDWIDTH;if(p<f&&(!r||m<s)){let h=`${u} as next bandwidth < current bandwidth (${p} < ${f})`;return r&&(h+=` and forwardBuffer < bufferHighWaterLine (${m} < ${s})`),c(h),!0}if((!r||p>f)&&m>=i){let h=`${u} as forwardBuffer >= bufferLowWaterLine (${m} >= ${i})`;return r&&(h+=` and next bandwidth > current bandwidth (${p} > ${f})`),c(h),!0}return c(`not ${u} as no switching criteria met`),!1};class hG extends oe.EventTarget{constructor(t){super(),this.fastQualityChange_=dG(this.fastQualityChange_.bind(this),100);const{src:o,withCredentials:a,tech:i,bandwidth:s,externVhs:l,useCueTags:r,playlistExclusionDuration:c,enableLowInitialPlaylist:u,sourceType:g,cacheEncryptionKeys:m,bufferBasedABR:d,leastPixelDiffSelector:p,captionServices:f,experimentalUseMMS:h}=t;if(!o)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:C}=t;(C===null||typeof C>"u")&&(C=1/0),Ca=l,this.bufferBasedABR=!!d,this.leastPixelDiffSelector=!!p,this.withCredentials=a,this.tech_=i,this.vhs_=i.vhs,this.player_=t.player_,this.sourceType_=g,this.useCueTags_=r,this.playlistExclusionDuration=c,this.maxPlaylistRetries=C,this.enableLowInitialPlaylist=u,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:a,maxPlaylistRetries:C,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=lG(),h&&K.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new K.ManagedMediaSource,this.usingManagedMediaSource_=!0,oe.log("Using ManagedMediaSource")):K.MediaSource&&(this.mediaSource=new K.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=jt(),this.hasPlayed_=!1,this.syncController_=new XW(t),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new QW,this.sourceUpdater_=new I2(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new YW,this.keyStatusMap_=new Map;const w={vhs:this.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:t.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new yp(o,this.vhs_,at(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new os(o,this.vhs_,at(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new xp(at(w,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),t),this.audioSegmentLoader_=new xp(at(w,{loaderType:"audio"}),t),this.subtitleSegmentLoader_=new jW(at(w,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((b,V)=>{function T(){i.off("vttjserror",k),b()}function k(){i.off("vttjsloaded",T),V()}i.one("vttjsloaded",T),i.one("vttjserror",k),i.addWebVttScript_()})}),t);const x=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new rG(this.vhs_.xhr,x),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),uG.forEach(b=>{this[b+"_"]=mG.bind(this,b)}),this.logger_=no("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(y,()=>{const b=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-b,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const t=this.mainAppendsToLoadedData_(),o=this.audioAppendsToLoadedData_();return t===-1||o===-1?-1:t+o}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(t="abr"){const o=this.selectPlaylist();o&&this.shouldSwitchToMedia_(o)&&this.switchMedia_(o,t)}switchMedia_(t,o,a){const i=this.media(),s=i&&(i.id||i.uri),l=t&&(t.id||t.uri);if(s&&s!==l){this.logger_(`switch media ${s} -> ${l} from ${o}`);const r={renditionInfo:{id:l,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:o};this.trigger({type:"renditionselected",metadata:r}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${o}`})}this.mainPlaylistLoader_.media(t,a)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{const o=this.mediaTypes_[t],a=o?o.activeGroup():null,i=this.contentSteeringController_.getPathway();if(a&&i){const l=(a.length?a[0].playlists:a.playlists).filter(r=>r.attributes.serviceLocation===i);l.length&&this.mediaTypes_[t].activePlaylistLoader.media(l[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=K.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(K.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const t=this.main(),o=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return o;const a=t.mediaGroups.AUDIO,i=Object.keys(a);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const r=a.main||i.length&&a[i[0]];for(const c in r)if(r[c].default){s={label:c};break}}if(!s)return o;const l=[];for(const r in a)if(a[r][s.label]){const c=a[r][s.label];if(c.playlists&&c.playlists.length)l.push.apply(l,c.playlists);else if(c.uri)l.push(c);else if(t.playlists.length)for(let u=0;u<t.playlists.length;u++){const g=t.playlists[u];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===r&&l.push(g)}}return l.length?l:o}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const o=this.mainPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;cp(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,o.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(o,this.requestOptions_),this.mainSegmentLoader_.load()),sG({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),o),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let o=this.mainPlaylistLoader_.media();if(!o){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let a;if(this.enableLowInitialPlaylist&&(a=this.selectInitialPlaylist()),a||(a=this.selectPlaylist()),!a||!this.shouldSwitchToMedia_(a)||(this.initialMedia_=a,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;o=this.initialMedia_}this.handleUpdatedMediaPlaylist(o)}),this.mainPlaylistLoader_.on("error",()=>{const o=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:o.playlist,error:o})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const o=this.mainPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;cp(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(o,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const o=this.mainPlaylistLoader_.media();if(o.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(o)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(o=>{this.mainPlaylistLoader_.on(o,a=>{this.player_.trigger(Et({},a))})})}handleUpdatedMediaPlaylist(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(t,o){const a=t.mediaGroups||{};let i=!0;const s=Object.keys(a.AUDIO);for(const l in a.AUDIO)for(const r in a.AUDIO[l])a.AUDIO[l][r].uri||(i=!1);i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(a.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Ca.Playlist.isAes(o)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(a.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(t){const o=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),i=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),l=this.tech_.buffered();return pG({buffered:l,currentTime:a,currentPlaylist:o,nextPlaylist:t,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const a=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:a.playlist,error:a})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const a=this.audioSegmentLoader_.pendingSegment_;if(!a||!a.segment||!a.segment.syncInfo)return;const i=a.segment.syncInfo.end+.01;this.tech_.setCurrentTime(i)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",a=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:cG}))});const t=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const a=this.getCodecsOrExclude_();a&&this.sourceUpdater_.addOrChangeSourceBuffers(a)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(a=>{this.mainSegmentLoader_.on(a,i=>{this.player_.trigger(Et({},i))}),this.audioSegmentLoader_.on(a,i=>{this.player_.trigger(Et({},i))}),this.subtitleSegmentLoader_.on(a,i=>{this.player_.trigger(Et({},i))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(t=this.selectPlaylist()){if(t&&t===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(t,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const t=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0))return this.tech_.setCurrentTime(t.end(t.length-1))}setupFirstPlay(){const t=this.mainPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList||t.start){const o=this.seekable();if(!o.length)return!1;const a=o.end(0);let i=a;if(t.start){const s=t.start.timeOffset;s<0?i=Math.max(a+s,o.start(0)):i=Math.min(a,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const t=this.tech_.play();typeof t<"u"&&typeof t.then=="function"&&t.then(null,o=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const t=this.inbandTextTracks_.metadataTrack_.cues;if(!t||!t.length)return;const o=this.duration();t[t.length-1].endTime=isNaN(o)||Math.abs(o)===1/0?Number.MAX_VALUE:o}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const o=this.mainSegmentLoader_.getCurrentMediaInfo_();!o||o.hasVideo?t=t&&this.audioSegmentLoader_.ended_:t=this.audioSegmentLoader_.ended_}t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(t){if(!this.seekable().length)return!1;const a=this.syncController_.getExpiredTime(t,this.duration());if(a===null)return!1;const i=Ca.Playlist.playlistEnd(t,a),s=this.tech_.currentTime(),l=this.tech_.buffered();if(!l.length)return i-s<=Do;const r=l.end(l.length-1);return r-s<=Do&&i-r<=Do}excludePlaylist({playlistToExclude:t=this.mainPlaylistLoader_.media(),error:o={},playlistExclusionDuration:a}){if(t=t||this.mainPlaylistLoader_.media(),a=a||o.playlistExclusionDuration||this.playlistExclusionDuration,!t){this.error=o,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}t.playlistErrors_++;const i=this.mainPlaylistLoader_.main.playlists,s=i.filter(yc),l=s.length===1&&s[0]===t;if(i.length===1&&a!==1/0)return oe.log.warn(`Problem encountered with playlist ${t.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(l);if(l){if(this.main().contentSteering){const f=this.pathwayAttribute_(t),h=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(f),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(f)},h);return}let p=!1;i.forEach(f=>{if(f===t)return;const h=f.excludeUntil;typeof h<"u"&&h!==1/0&&(p=!0,delete f.excludeUntil)}),p&&(oe.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let r;t.playlistErrors_>this.maxPlaylistRetries?r=1/0:r=Date.now()+a*1e3,t.excludeUntil=r,o.reason&&(t.lastExcludeReason_=o.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const u=o.internal?this.logger_:oe.log.warn,g=o.message?" "+o.message:"";u(`${o.internal?"Internal problem":"Problem"} encountered with playlist ${t.id}.${g} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==t.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==t.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const m=c.targetDuration/2*1e3||5*1e3,d=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=m;return this.switchMedia_(c,"exclude",l||d)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(t,o){const a=[],i=t==="all";(i||t==="main")&&a.push(this.mainPlaylistLoader_);const s=[];(i||t==="audio")&&s.push("AUDIO"),(i||t==="subtitle")&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(l=>{const r=this.mediaTypes_[l]&&this.mediaTypes_[l].activePlaylistLoader;r&&a.push(r)}),["main","audio","subtitle"].forEach(l=>{const r=this[`${l}SegmentLoader_`];r&&(t===l||t==="all")&&a.push(r)}),a.forEach(l=>o.forEach(r=>{typeof l[r]=="function"&&l[r]()}))}setCurrentTime(t){const o=es(this.tech_.buffered(),t);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(o&&o.length)return t;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const t=this.mainPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:Ca.Playlist.duration(t):1/0:0}seekable(){return this.seekable_}getSeekableRange_(t,o){const a=t.media();if(!a)return null;const i=this.syncController_.getMediaSequenceSync(o);if(i&&i.isReliable){const r=i.start,c=i.end;if(!isFinite(r)||!isFinite(c))return null;const u=Ca.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a),g=Math.max(r,c-u);return jt([[r,g]])}const s=this.syncController_.getExpiredTime(a,this.duration());if(s===null)return null;const l=Ca.Playlist.seekable(a,s,Ca.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a));return l.length?l:null}computeFinalSeekable_(t,o){if(!o)return t;const a=t.start(0),i=t.end(0),s=o.start(0),l=o.end(0);return s>i||a>l?t:jt([[Math.max(a,s),Math.min(i,l)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const t=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!t)return;let o;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(o=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!o))return;const a=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(t,o),!this.seekable_||a&&a.length&&this.seekable_.length&&a.start(0)===this.seekable_.start(0)&&a.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${L0(this.seekable_)}]`);const i={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:i}),this.tech_.trigger("seekablechanged")}updateDuration(t){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,t),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(t){const i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}const o=this.tech_.buffered();let a=Ca.Playlist.duration(this.mainPlaylistLoader_.media());o.length>0&&(a=Math.max(a,o.end(o.length-1))),this.mediaSource.duration!==a&&this.sourceUpdater_.setDuration(a)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(t=>{const o=this.mediaTypes_[t].groups;for(const a in o)o[a].forEach(i=>{i.playlistLoader&&i.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const t=!!this.mediaTypes_.AUDIO.activePlaylistLoader,o=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=t?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!o||!a)}getCodecsOrExclude_(){const t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},o=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;const a=wl(this.main(),o),i={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=a.video||t.main.videoCodec||OF),t.main.isMuxed&&(i.video+=`,${a.audio||t.main.audioCodec||Bf}`),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||s)&&(i.audio=a.audio||t.main.audioCodec||t.audio.audioCodec||Bf,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),!i.audio&&!i.video){this.excludePlaylist({playlistToExclude:o,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const l=(u,g)=>u?Hs(g,this.usingManagedMediaSource_):Ru(g),r={};let c;if(["video","audio"].forEach(function(u){if(i.hasOwnProperty(u)&&!l(t[u].isFmp4,i[u])){const g=t[u].isFmp4?"browser":"muxer";r[g]=r[g]||[],r[g].push(i[u]),u==="audio"&&(c=g)}}),s&&c&&o.attributes.AUDIO){const u=o.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===u&&g!==o&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${u} as ${c} does not support codec(s): "${i.audio}"`)}if(Object.keys(r).length){const u=Object.keys(r).reduce((g,m)=>(g&&(g+=", "),g+=`${m} does not support codec(s): "${r[m].join(",")}"`,g),"")+".";this.excludePlaylist({playlistToExclude:o,error:{internal:!0,message:u},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const u=[];if(["video","audio"].forEach(g=>{const m=(Vo(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,d=(Vo(i[g]||"")[0]||{}).type;m&&d&&m.toLowerCase()!==d.toLowerCase()&&u.push(`"${this.sourceUpdater_.codecs[g]}" -> "${i[g]}"`)}),u.length){this.excludePlaylist({playlistToExclude:o,error:{message:`Codec switching not supported: ${u.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return i}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const t=this.getCodecsOrExclude_();if(!t)return;this.sourceUpdater_.createSourceBuffers(t);const o=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(o)}excludeUnsupportedVariants_(){const t=this.main().playlists,o=[];Object.keys(t).forEach(a=>{const i=t[a];if(o.indexOf(i.id)!==-1)return;o.push(i.id);const s=wl(this.main,i),l=[];s.audio&&!Ru(s.audio)&&!Hs(s.audio,this.usingManagedMediaSource_)&&l.push(`audio codec ${s.audio}`),s.video&&!Ru(s.video)&&!Hs(s.video,this.usingManagedMediaSource_)&&l.push(`video codec ${s.video}`),s.text&&s.text==="stpp.ttml.im1t"&&l.push(`text codec ${s.text}`),l.length&&(i.excludeUntil=1/0,this.logger_(`excluding ${i.id} for unsupported: ${l.join(", ")}`))})}excludeIncompatibleVariants_(t){const o=[],a=this.main().playlists,i=_l(Vo(t)),s=Q0(i),l=i.video&&Vo(i.video)[0]||null,r=i.audio&&Vo(i.audio)[0]||null;Object.keys(a).forEach(c=>{const u=a[c];if(o.indexOf(u.id)!==-1||u.excludeUntil===1/0)return;o.push(u.id);const g=[],m=wl(this.mainPlaylistLoader_.main,u),d=Q0(m);if(!(!m.audio&&!m.video)){if(d!==s&&g.push(`codec count "${d}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const p=m.video&&Vo(m.video)[0]||null,f=m.audio&&Vo(m.audio)[0]||null;p&&l&&p.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`video codec "${p.type}" !== "${l.type}"`),f&&r&&f.type.toLowerCase()!==r.type.toLowerCase()&&g.push(`audio codec "${f.type}" !== "${r.type}"`)}g.length&&(u.excludeUntil=1/0,this.logger_(`excluding ${u.id}: ${g.join(" && ")}`))}})}updateAdCues_(t){let o=0;const a=this.seekable();a.length&&(o=a.start(0)),qW(t,this.cueTagsTrack_,o)}goalBufferLength(){const t=this.tech_.currentTime(),o=zt.GOAL_BUFFER_LENGTH,a=zt.GOAL_BUFFER_LENGTH_RATE,i=Math.max(o,zt.MAX_GOAL_BUFFER_LENGTH);return Math.min(o+t*a,i)}bufferLowWaterLine(){const t=this.tech_.currentTime(),o=zt.BUFFER_LOW_WATER_LINE,a=zt.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(o,zt.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(o,zt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(o+t*a,this.bufferBasedABR?s:i)}bufferHighWaterLine(){return zt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(t){S2(this.inbandTextTracks_,"com.apple.streaming",this.tech_),kW({inbandTextTracks:this.inbandTextTracks_,dateRanges:t})}addMetadataToTextTrack(t,o,a){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();S2(this.inbandTextTracks_,t,this.tech_),CW({inbandTextTracks:this.inbandTextTracks_,metadataArray:o,timestampOffset:i,videoDuration:a})}pathwayAttribute_(t){return t.attributes["PATHWAY-ID"]||t.attributes.serviceLocation}initContentSteeringController_(){const t=this.main();if(t.contentSteering){for(const o of t.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(o));if(this.contentSteeringController_.assignTagProperties(t.uri,t.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(o=>{this.contentSteeringController_.on(o,a=>{this.trigger(Et({},a))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const o=this.main();(this.contentSteeringController_.didDASHTagChange(o.uri,o.contentSteering)||(()=>{const s=this.contentSteeringController_.getAvailablePathways(),l=[];for(const r of o.playlists){const c=r.attributes.serviceLocation;if(c&&(l.push(c),!s.has(c)))return!0}return!!(!l.length&&s.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const t=this.contentSteeringController_.getPathway();if(!t)return;this.handlePathwayClones_();const a=this.main().playlists,i=new Set;let s=!1;Object.keys(a).forEach(l=>{const r=a[l],c=this.pathwayAttribute_(r),u=c&&t!==c;r.excludeUntil===1/0&&r.lastExcludeReason_==="content-steering"&&!u&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const m=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&u&&m&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(l=>{const r=this.mediaTypes_[l];if(r.activePlaylistLoader){const c=r.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==t&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const o=this.main().playlists,a=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(a&&a.size||i&&i.size){for(const[l,r]of a.entries())i.get(l)||(this.mainPlaylistLoader_.updateOrDeleteClone(r),this.contentSteeringController_.excludePathway(l));for(const[l,r]of i.entries()){const c=a.get(l);if(!c){o.filter(g=>g.attributes["PATHWAY-ID"]===r["BASE-ID"]).forEach(g=>{this.mainPlaylistLoader_.addClonePathway(r,g)}),this.contentSteeringController_.addAvailablePathway(l);continue}this.equalPathwayClones_(c,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(l))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(t,o){if(t["BASE-ID"]!==o["BASE-ID"]||t.ID!==o.ID||t["URI-REPLACEMENT"].HOST!==o["URI-REPLACEMENT"].HOST)return!1;const a=t["URI-REPLACEMENT"].PARAMS,i=o["URI-REPLACEMENT"].PARAMS;for(const s in a)if(a[s]!==i[s])return!1;for(const s in i)if(a[s]!==i[s])return!1;return!0}changeSegmentPathway_(){const t=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(t,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let t=0;const o="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(a=>{const i=this.mainPlaylistLoader_.getKeyIdSet(a);!i||!i.size||i.forEach(s=>{const l="usable",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===l,c=a.lastExcludeReason_===o&&a.excludeUntil===1/0;r?r&&c&&(delete a.excludeUntil,delete a.lastExcludeReason_,this.logger_(`enabling playlist ${a.id} because key ID ${s} is ${l}`)):(a.excludeUntil!==1/0&&a.lastExcludeReason_!==o&&(a.excludeUntil=1/0,a.lastExcludeReason_=o,this.logger_(`excluding playlist ${a.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${l}`)),t++)})}),t>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(a=>{const i=a&&a.attributes&&a.attributes.RESOLUTION&&a.attributes.RESOLUTION.height<720,s=a.excludeUntil===1/0&&a.lastExcludeReason_===o;i&&s&&(delete a.excludeUntil,oe.log.warn(`enabling non-HD playlist ${a.id} because all playlists were excluded due to ${o} key IDs`))})}addKeyStatus_(t,o){const s=(typeof t=="string"?t:FW(t)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${o}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,o)}updatePlaylistByKeyStatus(t,o){this.addKeyStatus_(t,o),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const fG=(n,t,o)=>a=>{const i=n.main.playlists[t],s=dp(i),l=yc(i);if(typeof a>"u")return l;a?delete i.disabled:i.disabled=!0;const r={renditionInfo:{id:t,bandwidth:i.attributes.BANDWIDTH,resolution:i.attributes.RESOLUTION,codecs:i.attributes.CODECS},cause:"fast-quality"};return a!==l&&!s&&(a?(o(i),n.trigger({type:"renditionenabled",metadata:r})):n.trigger({type:"renditiondisabled",metadata:r})),a};class gG{constructor(t,o,a){const{playlistController_:i}=t,s=i.fastQualityChange_.bind(i);if(o.attributes){const l=o.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=o.attributes.BANDWIDTH,this.frameRate=o.attributes["FRAME-RATE"]}this.codecs=wl(i.main(),o),this.playlist=o,this.id=a,this.enabled=fG(t.playlists,o.id,s)}}const yG=function(n){n.representations=()=>{const t=n.playlistController_.main(),o=yl(t)?n.playlistController_.getAudioTrackPlaylists_():t.playlists;return o?o.filter(a=>!dp(a)).map((a,i)=>new gG(n,a,a.id)):[]}},q2=["seeking","seeked","pause","playing","error"];class _G extends oe.EventTarget{constructor(t){super(),this.playlistController_=t.playlistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=no("PlaybackWatcher"),this.logger_("initialize");const o=()=>this.monitorCurrentTime_(),a=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),l=this.playlistController_,r=["main","subtitle","audio"],c={};r.forEach(g=>{c[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},l[`${g}SegmentLoader_`].on("appendsdone",c[g].updateend),l[`${g}SegmentLoader_`].on("playlistupdate",c[g].reset),this.tech_.on(["seeked","seeking"],c[g].reset)});const u=g=>{["main","audio"].forEach(m=>{l[`${m}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(q2,s),this.tech_.on("canplay",a),this.tech_.one("play",o),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(q2,s),this.tech_.off("canplay",a),this.tech_.off("play",o),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),r.forEach(g=>{l[`${g}SegmentLoader_`].off("appendsdone",c[g].updateend),l[`${g}SegmentLoader_`].off("playlistupdate",c[g].reset),this.tech_.off(["seeked","seeking"],c[g].reset)}),this.checkCurrentTimeTimeout_&&K.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&K.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=K.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(t){const o=this.playlistController_[`${t}SegmentLoader_`];this[`${t}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${t} loader`),this[`${t}StalledDownloads_`]=0,this[`${t}Buffered_`]=o.buffered_()}checkSegmentDownloads_(t){const o=this.playlistController_,a=o[`${t}SegmentLoader_`],i=a.buffered_(),s=sq(this[`${t}Buffered_`],i);if(this[`${t}Buffered_`]=i,s){const l={bufferedRanges:i};o.trigger({type:"bufferedrangeschanged",metadata:l}),this.resetSegmentDownloads_(t);return}this[`${t}StalledDownloads_`]++,this.logger_(`found #${this[`${t}StalledDownloads_`]} ${t} appends that did not increase buffer (possible stalled download)`,{playlistId:a.playlist_&&a.playlist_.id,buffered:Ja(i)}),!(this[`${t}StalledDownloads_`]<10)&&(this.logger_(`${t} loader stalled download exclusion`),this.resetSegmentDownloads_(t),this.tech_.trigger({type:"usage",name:`vhs-${t}-download-exclusion`}),t!=="subtitle"&&o.excludePlaylist({error:{message:`Excessive ${t} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const t=this.tech_.currentTime(),o=this.tech_.buffered();if(this.lastRecordedTime===t&&(!o.length||t+Do>=o.end(o.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&t===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(t===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(jt([this.lastRecordedTime,t]));const a={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:a}),this.consecutiveUpdates=0,this.lastRecordedTime=t}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const o=this.seekable(),a=this.tech_.currentTime(),i=this.afterSeekableWindow_(o,a,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let s;if(i&&(s=o.end(o.length-1)),this.beforeSeekableWindow_(o,a)){const f=o.start(0);s=f+(f===o.end(0)?0:Do)}if(typeof s<"u")return this.logger_(`Trying to seek outside of seekable at time ${a} with seekable range ${L0(o)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;const l=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),c=l.audioBuffer?l.audioBuffered():null,u=l.videoBuffer?l.videoBuffered():null,g=this.media(),m=g.partTargetDuration?g.partTargetDuration:(g.targetDuration-Po)*2,d=[c,u];for(let f=0;f<d.length;f++){if(!d[f])continue;if(sp(d[f],a)<m)return!1}const p=gc(r,a);return p.length===0?!1:(s=p.start(0)+Do,this.logger_(`Buffered region starts (${p.start(0)}) just beyond seek point (${a}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;const t=this.tech_.currentTime(),o=this.tech_.buffered(),a=es(o,t);if(a.length&&t+3<=a.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.logger_(`Stopped at ${t} while inside a buffered region [${a.start(0)} -> ${a.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const t=this.seekable(),o=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(t,o)){const r=t.end(t.length-1);return this.logger_(`Fell out of live window at time ${o}. Seeking to live point (seekable end) ${r}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(r),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const a=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:o}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const l=gc(i,o);return l.length>0?(this.logger_(`Stopped at ${o} and seeking to ${l.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(o),!0):!1}afterSeekableWindow_(t,o,a,i=!1){if(!t.length)return!1;let s=t.end(t.length-1)+Do;const l=!a.endList,r=typeof a.partTargetDuration=="number";return l&&(r||i)&&(s=t.end(t.length-1)+a.targetDuration*3),o>s}beforeSeekableWindow_(t,o){return!!(t.length&&t.start(0)>0&&o<t.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:t,audioBuffered:o,currentTime:a}){if(!t)return;let i;if(t.length&&o.length){const s=es(t,a-3),l=es(t,a),r=es(o,a);r.length&&!l.length&&s.length&&(i={start:s.end(0),end:r.end(0)})}else gc(t,a).length||(i=this.gapFromVideoUnderflow_(t,a));return i?(this.logger_(`Encountered a gap in video from ${i.start} to ${i.end}. Seeking to current time ${a}`),!0):!1}skipTheGap_(t){const o=this.tech_.buffered(),a=this.tech_.currentTime(),i=gc(o,a);if(this.resetTimeUpdate_(),i.length===0||a!==t)return;this.logger_("skipTheGap_:","currentTime:",a,"scheduled currentTime:",t,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+Po);const s={gapInfo:{from:a,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(t,o){const a=oq(t);for(let i=0;i<a.length;i++){const s=a.start(i),l=a.end(i);if(o-s<4&&o-s>2)return{start:s,end:l}}return null}}const wG={errorInterval:30,getSource(n){const o=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return n(o)}},W2=function(n,t){let o=0,a=0;const i=at(wG,t);n.ready(()=>{n.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const s=function(){a&&n.currentTime(a)},l=function(g){g!=null&&(a=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",s),n.src(g),n.trigger({type:"usage",name:"vhs-error-reload"}),n.play())},r=function(){if(Date.now()-o<i.errorInterval*1e3){n.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){oe.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return o=Date.now(),i.getSource.call(n,l)},c=function(){n.off("loadedmetadata",s),n.off("error",r),n.off("dispose",c)},u=function(g){c(),W2(n,g)};n.on("error",r),n.on("dispose",c),n.reloadSourceOnError=u},bG=function(n){W2(this,n)};var G2="3.17.2",CG="7.1.0",VG="1.3.1",xG="7.2.0",kG="4.0.2";const Vt={PlaylistLoader:os,Playlist:Sn,utils:Pq,STANDARD_PLAYLIST_SELECTOR:T2,INITIAL_PLAYLIST_SELECTOR:gW,lastBandwidthSelector:T2,movingAverageBandwidthSelector:hW,comparePlaylistBandwidth:Cp,comparePlaylistResolution:pW,xhr:n2()};Object.keys(zt).forEach(n=>{Object.defineProperty(Vt,n,{get(){return oe.log.warn(`using Vhs.${n} is UNSAFE be sure you know what you are doing`),zt[n]},set(t){if(oe.log.warn(`using Vhs.${n} is UNSAFE be sure you know what you are doing`),typeof t!="number"||t<0){oe.log.warn(`value of Vhs.${n} must be greater than or equal to 0`);return}zt[n]=t}})});const X2="videojs-vhs",Y2=function(n,t){const o=t.media();let a=-1;for(let i=0;i<n.length;i++)if(n[i].id===o.id){a=i;break}n.selectedIndex_=a,n.trigger({selectedIndex:a,type:"change"})},EG=function(n,t){t.representations().forEach(o=>{n.addQualityLevel(o)}),Y2(n,t.playlists)};Vt.canPlaySource=function(){return oe.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const TG=(n,t,o)=>{if(!n)return n;let a={};t&&t.attributes&&t.attributes.CODECS&&(a=_l(Vo(t.attributes.CODECS))),o&&o.attributes&&o.attributes.CODECS&&(a.audio=o.attributes.CODECS);const i=ki(a.video),s=ki(a.audio),l={};for(const r in n)l[r]={},s&&(l[r].audioContentType=s),i&&(l[r].videoContentType=i),t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(l[r].pssh=t.contentProtection[r].pssh),typeof n[r]=="string"&&(l[r].url=n[r]);return at(n,l)},NG=(n,t)=>n.reduce((o,a)=>{if(!a.contentProtection)return o;const i=t.reduce((s,l)=>{const r=a.contentProtection[l];return r&&r.pssh&&(s[l]={pssh:r.pssh}),s},{});return Object.keys(i).length&&o.push(i),o},[]),SG=({player:n,sourceKeySystems:t,audioMedia:o,mainPlaylists:a})=>{if(!n.eme.initializeMediaKeys)return Promise.resolve();const i=o?a.concat([o]):a,s=NG(i,Object.keys(t)),l=[],r=[];return s.forEach(c=>{r.push(new Promise((u,g)=>{n.tech_.one("keysessioncreated",u)})),l.push(new Promise((u,g)=>{n.eme.initializeMediaKeys({keySystems:c},m=>{if(m){g(m);return}u()})}))}),Promise.race([Promise.all(l),Promise.race(r)])},BG=({player:n,sourceKeySystems:t,media:o,audioMedia:a})=>{const i=TG(t,o,a);return i?(n.currentSource().keySystems=i,i&&!n.eme?(oe.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},K2=()=>{if(!K.localStorage)return null;const n=K.localStorage.getItem(X2);if(!n)return null;try{return JSON.parse(n)}catch{return null}},PG=n=>{if(!K.localStorage)return!1;let t=K2();t=t?at(t,n):n;try{K.localStorage.setItem(X2,JSON.stringify(t))}catch{return!1}return t},DG=n=>n.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(n.substring(n.indexOf(",")+1)):n,Q2=(n,t)=>{n._requestCallbackSet||(n._requestCallbackSet=new Set),n._requestCallbackSet.add(t)},Z2=(n,t)=>{n._responseCallbackSet||(n._responseCallbackSet=new Set),n._responseCallbackSet.add(t)},J2=(n,t)=>{n._requestCallbackSet&&(n._requestCallbackSet.delete(t),n._requestCallbackSet.size||delete n._requestCallbackSet)},ey=(n,t)=>{n._responseCallbackSet&&(n._responseCallbackSet.delete(t),n._responseCallbackSet.size||delete n._responseCallbackSet)};Vt.supportsNativeHls=function(){if(!fe||!fe.createElement)return!1;const n=fe.createElement("video");return oe.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(o){return/maybe|probably/i.test(n.canPlayType(o))}):!1}(),Vt.supportsNativeDash=function(){return!fe||!fe.createElement||!oe.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(fe.createElement("video").canPlayType("application/dash+xml"))}(),Vt.supportsTypeNatively=n=>n==="hls"?Vt.supportsNativeHls:n==="dash"?Vt.supportsNativeDash:!1,Vt.isSupported=function(){return oe.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Vt.xhr.onRequest=function(n){Q2(Vt.xhr,n)},Vt.xhr.onResponse=function(n){Z2(Vt.xhr,n)},Vt.xhr.offRequest=function(n){J2(Vt.xhr,n)},Vt.xhr.offResponse=function(n){ey(Vt.xhr,n)};const $G=oe.getComponent("Component");class ty extends $G{constructor(t,o,a){if(super(o,a.vhs),typeof a.initialBandwidth=="number"&&(this.options_.bandwidth=a.initialBandwidth),this.logger_=no("VhsHandler"),o.options_&&o.options_.playerId){const i=oe.getPlayer(o.options_.playerId);this.player_=i}if(this.tech_=o,this.source_=t,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&o.overrideNativeAudioTracks&&o.overrideNativeVideoTracks)o.overrideNativeAudioTracks(!0),o.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(o.featuresNativeVideoTracks||o.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(fe,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],i=>{const s=fe.fullscreenElement||fe.webkitFullscreenElement||fe.mozFullScreenElement||fe.msFullscreenElement;s&&s.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(t={}){if(this.options_=at(this.options_,t),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const a=K2();a&&a.bandwidth&&(this.options_.bandwidth=a.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),a&&a.throughput&&(this.options_.throughput=a.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=zt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===zt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(a=>{typeof this.source_[a]<"u"&&(this.options_[a]=this.source_[a])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const o=this.options_.customPixelRatio;typeof o=="number"&&o>=0&&(this.customPixelRatio=o)}setOptions(t={}){this.setOptions_(t)}src(t,o){if(!t)return;this.setOptions_(),this.options_.src=DG(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Vt,this.options_.sourceType=Pf(o),this.options_.seekTo=s=>{this.tech_.setCurrentTime(s)},this.options_.player_=this.player_,this.playlistController_=new hG(this.options_);const a=at({liveRangeSafeTimeDelta:Do},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new _G(a),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const s=oe.players[this.tech_.options_.playerId];let l=this.playlistController_.error;typeof l=="object"&&!l.code?l.code=3:typeof l=="string"&&(l={message:l,code:3}),s.error(l)});const i=this.options_.bufferBasedABR?Vt.movingAverageBandwidthSelector(.55):Vt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):i.bind(this),this.playlistController_.selectInitialPlaylist=Vt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(s){this.playlistController_.selectPlaylist=s.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(s){this.playlistController_.mainSegmentLoader_.throughput.rate=s,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let s=this.playlistController_.mainSegmentLoader_.bandwidth;const l=K.navigator.connection||K.navigator.mozConnection||K.navigator.webkitConnection,r=1e7;if(this.options_.useNetworkInformationApi&&l){const c=l.downlink*1e3*1e3;c>=r&&s>=r?s=Math.max(s,c):s=c}return s},set(s){this.playlistController_.mainSegmentLoader_.bandwidth=s,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const s=1/(this.bandwidth||1);let l;return this.throughput>0?l=1/this.throughput:l=0,Math.floor(1/(s+l))},set(){oe.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Ja(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Ja(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&PG({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{yG(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=K.URL.createObjectURL(this.playlistController_.mediaSource),(oe.browser.IS_ANY_SAFARI||oe.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),SG({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(o=>{this.logger_("error while creating EME key session",o),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,o=BG({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});if(this.player_.tech_.on("keystatuschange",a=>{this.playlistController_.updatePlaylistByKeyStatus(a.keyId,a.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!o){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const t=oe.players[this.tech_.options_.playerId];!t||!t.qualityLevels||this.qualityLevels_||(this.qualityLevels_=t.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{EG(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Y2(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":G2,"mux.js":CG,"mpd-parser":VG,"m3u8-parser":xG,"aes-decrypter":kG}}version(){return this.constructor.version()}canChangeType(){return I2.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(t){this.playlistController_.setCurrentTime(t)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&K.URL.revokeObjectURL&&(K.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(t,o){return Mq({playlist:this.playlistController_.media(),time:t,callback:o})}seekToProgramTime(t,o,a=!0,i=2){return l2({programTime:t,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:o})}setupXhrHooks_(){this.xhr.onRequest=t=>{Q2(this.xhr,t)},this.xhr.onResponse=t=>{Z2(this.xhr,t)},this.xhr.offRequest=t=>{J2(this.xhr,t)},this.xhr.offResponse=t=>{ey(this.xhr,t)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const t=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],o=["gapjumped","playedrangeschanged"];t.forEach(a=>{this.playlistController_.on(a,i=>{this.player_.trigger(Et({},i))})}),o.forEach(a=>{this.playbackWatcher_.on(a,i=>{this.player_.trigger(Et({},i))})})}}const Vc={name:"videojs-http-streaming",VERSION:G2,canHandleSource(n,t={}){const o=at(oe.options,t);return!o.vhs.experimentalUseMMS&&!Hs("avc1.4d400d,mp4a.40.2",!1)?!1:Vc.canPlayType(n.type,o)},handleSource(n,t,o={}){const a=at(oe.options,o);return t.vhs=new ty(n,t,a),t.vhs.xhr=n2(),t.vhs.setupXhrHooks_(),t.vhs.src(n.src,n.type),t.vhs},canPlayType(n,t){const o=Pf(n);if(!o)return"";const a=Vc.getOverrideNative(t);return!Vt.supportsTypeNatively(o)||a?"maybe":""},getOverrideNative(n={}){const{vhs:t={}}=n,o=!(oe.browser.IS_ANY_SAFARI||oe.browser.IS_IOS),{overrideNative:a=o}=t;return a}};Hs("avc1.4d400d,mp4a.40.2",!0)&&oe.getTech("Html5").registerSourceHandler(Vc,0),oe.VhsHandler=ty,oe.VhsSourceHandler=Vc,oe.Vhs=Vt,oe.use||oe.registerComponent("Vhs",Vt),oe.options.vhs=oe.options.vhs||{},(!oe.getPlugin||!oe.getPlugin("reloadSourceOnError"))&&oe.registerPlugin("reloadSourceOnError",bG);const LG={name:"MediaVideoPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""}},data(){return{player:null}},mounted(){this.player=oe(this.$refs.videoPlayer,{autoplay:!1,controls:!0,muted:!0,fluid:!0,sources:[{src:this.url,type:"video/mp4"}],poster:this.poster})},beforeDestroy(){this.player&&this.player.dispose()}},AG={ref:"videoPlayer",class:"video-js"};function IG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("video",AG,null,512)}const vG=J(LG,[["render",IG],["__scopeId","data-v-3e044975"]]),MG={name:"YoutubePlayer",props:{url:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},control:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,player:null}},watch:{isPlaying(){this.resetVideo()}},methods:{resetVideo(){this.player=null,this.isRender=!1,this.$nextTick(()=>{this.isRender=!0,this.$nextTick(()=>{setTimeout(this.initPlayer,300)})})},initPlayer(){if(!YT||!document.getElementById(`yt-player-${this.timestamp}`)){setTimeout(this.initPlayer,3e3);return}this.player||(this.player=new YT.Player(`yt-player-${this.timestamp}`,{origin:"http://localhost:3000/",events:{onStateChange:this.onPlayerStateChange}}))},onPlayerStateChange(){this.player.getPlayerState()==0&&this.$emit("playEnd")}},mounted(){this.$nextTick(()=>{setTimeout(this.initPlayer,300)})}},OG={class:"youtube-player"},UG=["id","src"];function RG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",OG,[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["video-foreground",{"show-control-n-fit":o.control}])},[e.createElementVNode("iframe",{id:`yt-player-${i.timestamp}`,ref:"player",width:"1280",height:"537",src:`${o.url}?enablejsapi=1&controls=${o.control?1:0}&autoplay=${o.autoplay||o.isPlaying}&mute=${o.mute?1:0}`,title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",sandbox:"allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"},null,8,UG)],2)):e.createCommentVNode("",!0)])}const FG=J(MG,[["render",RG],["__scopeId","data-v-ca2b2fbb"]]),HG={name:"BilibiliPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,wrapperRatio:1}},computed:{isVideoWider(){return this.wrapperRatio>1}},watch:{isPlaying(n,t){this.resetVideo()}},methods:{resetVideo(){this.isRender=!1,this.$nextTick(()=>{this.isRender=!0})}},mounted(){this.$nextTick(()=>{this.wrapperRatio=this.$refs.wrapper.clientWidth/this.$refs.wrapper.clientHeight})}},jG={class:"bilibili-player",ref:"wrapper"},zG=["id","src"];function qG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",jG,[e.createElementVNode("div",{class:e.normalizeClass(["video-foreground",[{"video-foreground--wider":s.isVideoWider,"video-foreground--higher":!s.isVideoWider}]])},[i.isRender?(e.openBlock(),e.createElementBlock("iframe",{key:0,id:`bilibili-player-${i.timestamp}`,scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",src:`${o.url}&high_quality=1&danmaku=0&as_wide=1`},null,8,zG)):e.createCommentVNode("",!0)],2)],512)}const WG=J(HG,[["render",qG],["__scopeId","data-v-40e15401"]]),GG={name:"YoukuPlayer",props:{url:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0}},methods:{resetVideo(){this.isRender=!1,this.$nextTick(()=>{this.isRender=!0})}}},XG={class:"youku-player"},YG=["src","id"];function KG(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",XG,[e.createElementVNode("iframe",{width:"1280",height:"537",src:`${o.url}?rel=0&autoplay=${o.isPlaying}`,frameborder:"0",allowfullscreen:"",id:`youku-player-${i.timestamp}`,sandbox:"allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"},null,8,YG)])}const QG=J(GG,[["render",KG],["__scopeId","data-v-cf32c3a0"]]),ZG={name:"QqPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,player:null,wrapperRatio:1}},computed:{isVideoWider(){return this.wrapperRatio>1}},watch:{isPlaying(){this.resetVideo()}},methods:{resetVideo(){this.player=null,this.isRender=!1,this.$nextTick(()=>{this.isRender=!0,this.$nextTick(()=>{setTimeout(this.initPlayer,300)})})},initPlayer(){const n=document.getElementById(`qq-player-${this.timestamp}`);if(!Txp||!n){setTimeout(this.initPlayer,3e3);return}if(this.player)return;this.player=new Txp.Player({containerId:`qq-player-${this.timestamp}`,vid:this.url,width:"100%",height:"100%",autoplay:this.autoplay||this.$_vsWidth>=768||this.isPlaying,mini:!0,muted:this.mute,volume:this.mute?0:50});const t=n.querySelector("iframe");t.sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation",this.player.on("playStateChange",this.onPlayerStateChange)},onPlayerStateChange(n){n.state==0&&this.$emit("playEnd")}},mounted(){this.$nextTick(()=>{this.wrapperRatio=this.$refs.wrapper.clientWidth/this.$refs.wrapper.clientHeight,setTimeout(this.initPlayer,300)})}},JG={class:"qq-player",ref:"wrapper"},eX=["id"],tX={class:"qq-player__poster"},nX=["src"];function oX(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",JG,[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["video-foreground",[{"video-foreground--wider":s.isVideoWider,"video-foreground--higher":!s.isVideoWider}]])},[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iframe",id:`qq-player-${i.timestamp}`},null,8,eX)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",tX,[e.createElementVNode("img",{src:o.poster,alt:"poster"},null,8,nX)],512),[[e.vShow,!o.isPlaying&&!o.autoplay]])],512)}const aX=J(ZG,[["render",oX],["__scopeId","data-v-719611b1"]]),iX={name:"FbPlayer",props:{html:{type:String,default:()=>""}},mounted(){this.loadFacebookSDK()},methods:{loadFacebookSDK(){if(document.querySelector('script[src*="connect.facebook.net"]'))return;const n=document.createElement("script");n.async=!0,n.defer=!0,n.crossOrigin="anonymous",n.src="https://connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v14.0",n.nonce="5tyirFAy",document.body.appendChild(n)}}},sX={class:"fb-player",ref:"wrapper"},lX=["innerHTML"];function rX(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",sX,[t[0]||(t[0]=e.createElementVNode("div",{id:"fb-root"},null,-1)),e.createElementVNode("div",{innerHTML:o.html},null,8,lX)],512)}const dX=J(iX,[["render",rX],["__scopeId","data-v-c5a2a3ed"]]),cX={class:"media_video_wrap"},uX={class:"img-wrapper"},xc=J(e.defineComponent({name:"MediaVideo",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(!1),s=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"MediaVideo",onlyShowPc:!1,data:{width:"default",type:"inner",videoSrc:"https://mvideo.ycyw.com/2e1a9441vodgzp1253458132/a31402d51397757891052265568/SW8B19vOtzMA.mp4",videoThumbnail:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}};a("update:modelValue",p)},l=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return s(),(p,f)=>{var h,C,w,x,y,b,V,T,k,S,D,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaVideo_wrap_box",onMouseenter:f[2]||(f[2]=A=>r.value=!0),onMouseleave:f[3]||(f[3]=A=>r.value=!1)},[e.createElementVNode("div",cX,[e.createElementVNode("div",{class:e.normalizeClass(["media-video__container",u.value])},[e.createElementVNode("div",uX,[((C=(h=n.modelValue)==null?void 0:h.data)==null?void 0:C.type)==="inner"?(e.openBlock(),e.createBlock(vG,{key:0,url:n.modelValue.data.videoSrc,poster:n.modelValue.data.videoThumbnail},null,8,["url","poster"])):e.createCommentVNode("",!0),((x=(w=n.modelValue)==null?void 0:w.data)==null?void 0:x.type)==="youtube"?(e.openBlock(),e.createBlock(FG,{key:1,url:n.modelValue.data.videoSrc,isPlaying:i.value,control:!0,autoplay:i.value},null,8,["url","isPlaying","autoplay"])):e.createCommentVNode("",!0),((b=(y=n.modelValue)==null?void 0:y.data)==null?void 0:b.type)==="bilibili"?(e.openBlock(),e.createBlock(WG,{key:2,url:n.modelValue.data.videoSrc,isPlaying:i.value},null,8,["url","isPlaying"])):e.createCommentVNode("",!0),((T=(V=n.modelValue)==null?void 0:V.data)==null?void 0:T.type)==="youku"?(e.openBlock(),e.createBlock(QG,{key:3,url:n.modelValue.data.videoSrc,isPlaying:i.value},null,8,["url","isPlaying"])):e.createCommentVNode("",!0),((S=(k=n.modelValue)==null?void 0:k.data)==null?void 0:S.type)==="qq"?(e.openBlock(),e.createBlock(aX,{key:4,url:n.modelValue.data.videoSrc,isPlaying:i.value,autoplay:i.value},null,8,["url","isPlaying","autoplay"])):e.createCommentVNode("",!0),((N=(D=n.modelValue)==null?void 0:D.data)==null?void 0:N.type)==="facebook"?(e.openBlock(),e.createBlock(dX,{key:5,html:n.modelValue.data.videoSrc},null,8,["html"])):e.createCommentVNode("",!0)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[0]||(f[0]=A=>r.value=A),onHandleEdit:f[1]||(f[1]=A=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PR,{key:1,show:c.value,"onUpdate:show":f[4]||(f[4]=A=>c.value=A),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-79406f1a"]]),mX=Object.freeze(Object.defineProperty({__proto__:null,default:xc},Symbol.toStringTag,{value:"Module"})),pX={class:"setting-content"},hX={class:"setting-header flex items-center"},fX=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),u=e.resolveComponent("a-input"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",pX,[e.createElementVNode("div",hX,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),s[9]||(s[9]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:""},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[10]||(s[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(u,{modelValue:n.data.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[11]||(s[11]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(u,{modelValue:n.data.data.link,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.link=m),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-ba14f699"]]),gX={class:"information-link__wrapper"},yX={key:0},_X=["innerHTML"],wX={key:1,class:"information-link__btn btn p-0",type:"button"},bX=["innerHTML"],kc=J(e.defineComponent({name:"InformationLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=p=>{a("handleClick",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"InformationLink",onlyShowPc:!1,data:{width:"default",title:"这里是标题",link:"https://www.baidu.com"}};a("update:modelValue",p)},r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return l(),(p,f)=>{var h,C,w,x,y,b,V,T;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"informationLink_wrap",onMouseenter:f[3]||(f[3]=k=>r.value=!0),onMouseleave:f[4]||(f[4]=k=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full",u.value])},[e.createElementVNode("div",gX,[(C=(h=n.modelValue)==null?void 0:h.data)!=null&&C.link?(e.openBlock(),e.createElementBlock("div",yX,[(x=(w=n.modelValue)==null?void 0:w.data)!=null&&x.link?(e.openBlock(),e.createElementBlock("div",{key:0,target:"_blank",class:"information-link__btn btn p-0",onClick:f[0]||(f[0]=k=>{var S,D;return i((D=(S=n.modelValue)==null?void 0:S.data)==null?void 0:D.link)})},[e.createElementVNode("h6",{class:"information-link__title",innerHTML:(b=(y=n.modelValue)==null?void 0:y.data)==null?void 0:b.title},null,8,_X),f[6]||(f[6]=e.createElementVNode("div",{class:"i i-arrow-next"},null,-1))])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",wX,[e.createElementVNode("h6",{class:"information-link__title",innerHTML:(T=(V=n.modelValue)==null?void 0:V.data)==null?void 0:T.title},null,8,bX),f[7]||(f[7]=e.createElementVNode("div",{class:"i i-arrow-next"},null,-1))]))])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[1]||(f[1]=k=>r.value=k),onHandleEdit:f[2]||(f[2]=k=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fX,{key:1,show:c.value,"onUpdate:show":f[5]||(f[5]=k=>c.value=k),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-b42edfbc"]]),CX=Object.freeze(Object.defineProperty({__proto__:null,default:kc},Symbol.toStringTag,{value:"Module"})),VX={key:0,class:"tab-primary__btn__img flex-center"},xX=["src","alt"],kX={key:1},EX=J({__name:"TabPrimary",props:{tabList:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:()=>0},isFixed:{type:Boolean,default:()=>!1},fullWidth:{type:Boolean,default:()=>!1}},emits:["updateCurrentIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=e.ref(null),g=e.ref(null),m=e.ref([]),d=e.ref(0),p=e.ref(.5*a.value),f=e.ref(0),h=e.ref(!0),C=e.ref(!0),w=e.ref(0),x=e.ref(!1),y=e.ref(0),b=e.ref(0),V=e.ref(0);e.ref(0);const T=e.ref(null),k=e.ref(null),S=e.ref(null),D=e.ref(null),N=e.ref(null),A=e.computed(()=>d.value-p.value),$=e.computed(()=>[{"--strip-width":`${A.value}px`},{"--strip-left":`${p.value}px`},{"--fix-left":`${f.value}px`},{transition:C.value?"left 0.2s ease-in-out, width 0.2s ease-in-out":""}]),I=e.computed(()=>y.value>0),U=e.computed(()=>b.value-y.value+Y.value>V.value),Y=e.computed(()=>{if(!x.value)return 24;const _e=u.value;return _e?window.getComputedStyle(_e,null).getPropertyValue("padding-right").split("px")[0]*2:24}),G=e.computed(()=>!1);e.watch(a,()=>{R(),M()}),e.watch(()=>r.currentIdx,(_e,se)=>{h.value=_e>se,e.nextTick(q),e.nextTick(ie)}),e.watch(()=>r.tabList,(_e,se)=>{M(),e.nextTick(()=>{q(0)})},{deep:!0}),e.watch(()=>r.isFixed,()=>{a.value>1200&&R(),e.nextTick(M)});const q=_e=>{const se=_e??250;h.value?(O(),D.value=setTimeout(H,se)):(H(),D.value=setTimeout(O,se)),N.value=setTimeout(()=>{C.value=!0},se)},O=()=>{const _e=m.value;let se=null;_e&&_e[r.currentIdx]&&(se=_e[r.currentIdx]),se&&se.getBoundingClientRect&&(d.value=se.getBoundingClientRect().right)},H=()=>{const _e=m.value;let se=null;_e&&_e[r.currentIdx]&&(se=_e[r.currentIdx]),se&&se.getBoundingClientRect&&(p.value=se.getBoundingClientRect().left)},R=()=>{C.value=!1,e.nextTick(()=>q(0)),e.nextTick(W)},M=()=>{const _e=u.value;if(_e){let se=_e.getBoundingClientRect().left;f.value=(_e.offsetWidth-_e.getBoundingClientRect().width)/2+se}},W=()=>{if(r.tabList.length<=0)return;const _e=g.value;_e&&(y.value=_e.scrollLeft,b.value=_e.scrollWidth);const se=u.value;se&&(V.value=se.getBoundingClientRect().width)},Z=_e=>{g.value&&(_e=="next"?g.value.scrollLeft+=9999:g.value.scrollLeft-=9999)},ie=()=>{const _e=m.value[r.currentIdx];if(!_e)return;const se=_e.clientWidth/2,pe=a.value/2;w.value=_e.getBoundingClientRect().right-se,g.value&&(g.value.scrollLeft-=pe-w.value)},ge=(_e,se)=>{_e||c("updateCurrentIdx",se)},Le=_e=>_e?_e.includes("http")?"a":"RouterLink":"button",ae=_e=>_e&&!_e.includes("http")?_e:null,ye=_e=>_e&&_e.includes("http")?_e:null,ve=_e=>_e&&_e.includes("http")?"_blank":null;return e.onMounted(()=>{x.value=!0,e.nextTick(()=>{q(0),T.value=setTimeout(R,300),M(),e.nextTick(()=>{k.value=setTimeout(ie,300)})})}),e.onBeforeUnmount(()=>{clearTimeout(T.value),clearTimeout(k.value),clearTimeout(S.value),clearTimeout(D.value),clearTimeout(N.value),window.removeEventListener("resize",()=>{a.value=window.innerWidth})}),(_e,se)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-primary",[{"is-fixed":n.isFixed},{"is-campus":!G.value},{"is-full-width":n.fullWidth}]]),ref_key:"wrapper",ref:u},[e.createElementVNode("ul",{class:"tab-primary__list",ref_key:"list",ref:g,onScroll:R},[e.withDirectives(e.createElementVNode("div",{class:"tab-primary__nav__prev",onClick:se[0]||(se[0]=pe=>Z("prev"))},null,512),[[e.vShow,I.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,(pe,le)=>(e.openBlock(),e.createElementBlock("li",{key:le,class:e.normalizeClass(["tab-primary__item",[{"is-img":!!pe.img}]])},[e.createElementVNode("div",{ref_for:!0,ref_key:"btnRefs",ref:m,class:"flex-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Le(pe.link)),{type:pe.link?null:"button",to:ae(pe.link),href:ye(pe.link),target:ve(pe.link),class:e.normalizeClass(["tab-primary__btn",[{"is-active":n.currentIdx==le}]]),onClick:he=>ge(pe.link,le)},{default:e.withCtx(()=>[pe.img?(e.openBlock(),e.createElementBlock("div",VX,[e.createElementVNode("img",{src:pe.img,alt:pe.alt||pe.name},null,8,xX)])):(e.openBlock(),e.createElementBlock("div",kX,e.toDisplayString(pe.name),1))]),_:2},1032,["type","to","href","target","class","onClick"]))],512)],2))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-primary__nav__next",onClick:se[1]||(se[1]=pe=>Z("next"))},null,512),[[e.vShow,U.value]])],544),e.createElementVNode("span",{class:"tab-primary__strip",style:e.normalizeStyle($.value)},null,4)],2))}},[["__scopeId","data-v-8d9081ac"]]),TX={class:"setting-content"},NX={class:"setting-header flex items-center"},SX={class:"setting-body"},BX={class:"setting-toolbar"},PX={class:"tools"},DX={class:"setting-item"},$X={class:"item-header"},LX={class:"btn-group"},AX={key:0,class:"drag-handle"},IX={class:"components-content"},vX={class:"setting-body"},MX={class:"setting-toolbar"},OX={class:"tools"},UX={class:"setting-item"},RX={class:"item-header"},FX={class:"btn-group"},HX={key:0,class:"drag-handle"},jX={class:"components-content"},zX=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,c=t,u=()=>{c("update:show",!1)},g=d=>{var f;debugger;const p=r.data;d==="listAbove"?p.listAbove.push({id:F(),key:F(),name:"New Tab",componentsDataJson:[{id:((f=r.modelValue)==null?void 0:f.id)||F(),type:"BannerImage",onlyShowPc:!1,data:{title:"这里是标题",imgSrc:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/about-ywies/01_About_YWIES_1_Header.jpg"}}]}):p.data.push({id:F(),key:F(),name:"New Tab",link:"",componentsDataJson:[]})},m=(d,p)=>{p==="listAbove"?r.data.listAbove=r.data.listAbove.filter(f=>f.id!==d):r.data.data=r.data.data.filter(f=>f.id!==d)};return(d,p)=>{const f=e.resolveComponent("a-switch"),h=e.resolveComponent("icon-plus"),C=e.resolveComponent("a-button"),w=e.resolveComponent("icon-drag-arrow"),x=e.resolveComponent("icon-delete"),y=e.resolveComponent("a-input"),b=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(b,{width:"60%",visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",TX,[e.createElementVNode("div",NX,[p[13]||(p[13]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(f,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=V=>n.data.onlyShowPc=V)},null,8,["modelValue"])]),e.createElementVNode("div",SX,[e.createElementVNode("div",BX,[p[16]||(p[16]=e.createElementVNode("h1",null,"List Above",-1)),e.createElementVNode("div",PX,[e.createVNode(C,{type:"primary",onClick:p[1]||(p[1]=V=>g("listAbove"))},{icon:e.withCtx(()=>[e.createVNode(h)]),default:e.withCtx(()=>[p[14]||(p[14]=e.createTextVNode(" 添加 List Above ",-1))]),_:1}),e.createVNode(C,{type:"primary",onClick:p[2]||(p[2]=V=>g("listAbove"))},{default:e.withCtx(()=>[...p[15]||(p[15]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",DX,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.listAbove,"onUpdate:modelValue":p[4]||(p[4]=V=>n.data.listAbove=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:p[5]||(p[5]=V=>a.value=!0),onEnd:p[6]||(p[6]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:V.id},[e.createElementVNode("div",$X,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(V.name),1),e.createElementVNode("span",null,e.toDisplayString(V.key),1)]),e.createElementVNode("div",LX,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",AX,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(x,{class:"btn-delete",onClick:T=>m(V.id,"listAbove")},null,8,["onClick"]),e.createVNode(C,{size:"mini",type:"primary",onClick:p[3]||(p[3]=T=>g("Video"))},{default:e.withCtx(()=>[...p[17]||(p[17]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),p[18]||(p[18]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(y,{modelValue:V.name,"onUpdate:modelValue":T=>V.name=T,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[19]||(p[19]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(y,{modelValue:V.key,"onUpdate:modelValue":T=>V.key=T,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[20]||(p[20]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",IX,[e.createVNode(Fa,{data:V.componentsDataJson,onUpdate:T=>V.componentsDataJson=T},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])]),e.createElementVNode("div",vX,[e.createElementVNode("div",MX,[p[23]||(p[23]=e.createElementVNode("h1",null,"List",-1)),e.createElementVNode("div",OX,[e.createVNode(C,{type:"primary",onClick:p[7]||(p[7]=V=>g("Video"))},{icon:e.withCtx(()=>[e.createVNode(h)]),default:e.withCtx(()=>[p[21]||(p[21]=e.createTextVNode(" 添加 List ",-1))]),_:1}),e.createVNode(C,{type:"primary",onClick:p[8]||(p[8]=V=>g("Video"))},{default:e.withCtx(()=>[...p[22]||(p[22]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",UX,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":p[10]||(p[10]=V=>n.data.data=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.data),onStart:p[11]||(p[11]=V=>a.value=!0),onEnd:p[12]||(p[12]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:V.id},[e.createElementVNode("div",RX,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(V.name),1),e.createElementVNode("span",null,e.toDisplayString(V.key),1)]),e.createElementVNode("div",FX,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",HX,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(x,{class:"btn-delete",onClick:T=>m(V.id,"list")},null,8,["onClick"]),e.createVNode(C,{size:"mini",type:"primary",onClick:p[9]||(p[9]=T=>g("Video"))},{default:e.withCtx(()=>[...p[24]||(p[24]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),p[25]||(p[25]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(y,{modelValue:V.name,"onUpdate:modelValue":T=>V.name=T,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[26]||(p[26]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(y,{modelValue:V.key,"onUpdate:modelValue":T=>V.key=T,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[27]||(p[27]=e.createElementVNode("p",{class:"item-title"},"Link",-1)),e.createVNode(y,{modelValue:V.link,"onUpdate:modelValue":T=>V.link=T,placeholder:"请输入link","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[28]||(p[28]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",jX,[e.createVNode(Fa,{data:V.componentsDataJson,onUpdate:T=>V.componentsDataJson=T},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-63c63489"]]),qX={class:"tab-page__above"},WX={key:0},GX={class:"tab-page__content"},XX={key:0},YX="",Ec=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=t,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a,c=n,u=e.ref(0),g=e.ref(!1),m=e.ref(!0),d=e.ref(null),p=e.ref(null),f=e.ref(!1),h=e.ref(!1),C=H=>{if(!H)return{top:0,left:0};const R=H.getBoundingClientRect(),M=window.pageYOffset||document.documentElement.scrollTop,W=window.pageXOffset||document.documentElement.scrollLeft;return{top:R.top+M,left:R.left+W}},w=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.classes)??null}),x=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.style)??null});e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.type)??"TabPrimary"});const y=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.listAbove)??[]}),b=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.data)??[]}),V=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.fixed)??!0}),T=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.resetToTop)??!0}),k=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.scrollToTop)??!0}),S=e.computed(()=>{var H;return((H=c.modelValue)==null?void 0:H.fullWidth)??!1});e.computed(()=>0),e.computed(()=>!1);const D=e.computed(()=>b.value.some(H=>H.img)),N=e.computed(()=>{var H;return((H=b.value[u.value])==null?void 0:H.key)??null}),A=e.computed(()=>{var R;if(!((R=c.modelValue)!=null&&R.data)||!Array.isArray(c.modelValue.data))return[];const H=c.modelValue.data[u.value];return H?H.componentsDataJson||[]:[]}),$=()=>{var R;if(c.modelValue&&c.modelValue.data)return;const H={id:((R=c.modelValue)==null?void 0:R.id)||F(),type:"TabPage",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",listAbove:[],data:[{id:F(),key:F(),name:"New Tab1",componentsDataJson:[]},{id:F(),key:F(),name:"New Tab2",componentsDataJson:[]}]};o("update:modelValue",H),u.value=0},I=()=>{var ie,ge;const H=p.value;if(!H)return;const R=H.getBoundingClientRect().top,M=d.value;if(!M)return;const W=M.getBoundingClientRect().top,Z=+((ge=(ie=window.getComputedStyle(document.body))==null?void 0:ie.getPropertyValue("--header-height-calc"))==null?void 0:ge.split("px")[0])||0;if(W>Z){g.value=!1;return}R<=Z&&(g.value=!0)},U=()=>{if(!k.value)return;let H=0;T.value||(H=C(d.value).top-170),window.scroll({top:H,left:0,behavior:"smooth"})},Y=H=>{sessionStorage.setItem(YX,H)},G=(H,R)=>{debugger;o("handleDelete",H||c.modelValue.id,R)},q=H=>{debugger;o("handleCopy",H||c.modelValue)},O=(H,R,M)=>{debugger;o("handlePaste",H,R,M)};return e.watch(()=>s.value,()=>{I()}),e.watch(u,()=>{Y(N.value),m.value&&U(),m.value=!0}),e.watch(N,H=>{H||(u.value=0)}),e.onMounted(()=>{$(),e.nextTick(I),setTimeout(()=>{e.nextTick(I)},200),setTimeout(()=>{},1e3)}),(H,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-page",w.value]),style:e.normalizeStyle(x.value),onMouseover:R[8]||(R[8]=M=>h.value=!0),onMouseout:R[9]||(R[9]=M=>h.value=!1)},[e.createElementVNode("div",qX,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("div",{key:N.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,M=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[N.value==M.key?(e.openBlock(),e.createElementBlock("div",WX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.componentsDataJson,(W,Z)=>(e.openBlock(),e.createBlock(Co,{key:W.id,type:W.type,"props-data":{modelValue:W,isPreview:n.isPreview},onHandleDelete:R[0]||(R[0]=ie=>G(ie,A.value)),onHandleCopy:R[1]||(R[1]=ie=>q(ie)),onHandlePaste:ie=>O(ie,A.value,Z)},null,8,["type","props-data","onHandlePaste"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["tab-page__hold",[{"is-fixed":g.value&&V.value},{"is-thick":D.value}]]),ref_key:"hold",ref:d},[e.createElementVNode("div",{class:"tab-page__nav",ref_key:"tab",ref:p},[e.createVNode(EX,{tabList:b.value,currentIdx:u.value,isFixed:g.value&&V.value,fullWidth:S.value,onUpdateCurrentIdx:R[2]||(R[2]=M=>u.value=M)},null,8,["tabList","currentIdx","isFixed","fullWidth"])],512)],2),e.createElementVNode("div",GX,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("div",{key:N.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,M=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[N.value==M.key?(e.openBlock(),e.createElementBlock("div",XX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.componentsDataJson,(W,Z)=>(e.openBlock(),e.createBlock(Co,{key:W.id,type:W.type,"props-data":{modelValue:W,isPreview:n.isPreview},onHandleDelete:R[3]||(R[3]=ie=>G(ie,A.value)),onHandleCopy:R[4]||(R[4]=ie=>q(ie)),onHandlePaste:ie=>O(ie,A.value,Z)},null,8,["type","props-data","onHandlePaste"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:h.value,"onUpdate:show":R[5]||(R[5]=M=>h.value=M),onHandleEdit:R[6]||(R[6]=M=>f.value=!0),onHandleDelete:G,onHandleCopy:q,onHandlePaste:O,style:{top:"-22px"}},null,8,["show"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(zX,{key:1,show:f.value,"onUpdate:show":R[7]||(R[7]=M=>f.value=M),data:n.modelValue},null,8,["show","data"]))],38))}},[["__scopeId","data-v-48305b22"]]),KX=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"})),QX={class:"tab-logo__btn__img flex-center"},ZX=["src","alt"],JX=J({__name:"TabLogo",props:{tabList:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0},isFixed:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},emits:["updateCurrentIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=e.ref(0),g=e.ref(.5*a.value),m=e.ref(0),d=e.ref(!0),p=e.ref(!0),f=e.ref(0),h=e.ref(!1),C=e.ref(0),w=e.ref(0),x=e.ref(0),y=e.ref(null),b=e.ref(null),V=e.ref([]),T=W=>W||"",k=e.computed(()=>u.value-g.value),S=e.computed(()=>[{"--strip-width":`${k.value}px`},{"--strip-left":`${g.value}px`},{"--fix-left":`${m.value}px`},{transition:p.value?"left 0.2s ease-in-out, width 0.2s ease-in-out":""}]),D=e.computed(()=>C.value>0),N=e.computed(()=>w.value-C.value+A.value>x.value),A=e.computed(()=>{if(!h.value)return 24;const W=y.value;if(!W)return 24;const Z=window.getComputedStyle(W,null).getPropertyValue("padding-right").split("px")[0];return Number(Z)*2}),$=e.computed(()=>!1);e.watch(a,()=>{G(),q()}),e.watch(()=>r.currentIdx,(W,Z)=>{d.value=W>Z,e.nextTick(()=>I()),e.nextTick(()=>R())}),e.watch(()=>r.isFixed,()=>{a.value>1200&&G(),e.nextTick(()=>q())}),e.watch(()=>r.tabList,(W,Z)=>{q(),e.nextTick(()=>{I(0)})},{deep:!0});const I=W=>{const Z=W??250;d.value?(U(),setTimeout(Y,Z)):(Y(),setTimeout(U,Z)),setTimeout(()=>{p.value=!0},Z)},U=()=>{const W=V.value[r.currentIdx];W&&W.getBoundingClientRect&&(u.value=W.getBoundingClientRect().right)},Y=()=>{const W=V.value[r.currentIdx];W&&W.getBoundingClientRect&&(g.value=W.getBoundingClientRect().left)},G=()=>{p.value=!1,e.nextTick(()=>I(0)),e.nextTick(()=>O())},q=()=>{const W=y.value;if(W){let Z=W.getBoundingClientRect().left;m.value=(W.offsetWidth-W.getBoundingClientRect().width)/2-Z}},O=()=>{r.tabList.length<=0||(b.value&&(C.value=b.value.scrollLeft,w.value=b.value.scrollWidth),y.value&&(x.value=y.value.getBoundingClientRect().width))},H=W=>{b.value&&(W=="next"?b.value.scrollLeft+=9999:b.value.scrollLeft-=9999)},R=()=>{const W=V.value[r.currentIdx];if(!W)return;const Z=W.clientWidth/2,ie=a.value/2;f.value=W.getBoundingClientRect().right-Z,b.value&&(b.value.scrollLeft-=ie-f.value)},M=W=>{c("updateCurrentIdx",W)};return e.onMounted(()=>{h.value=!0,e.nextTick(()=>{I(0),setTimeout(G,300),q(),e.nextTick(()=>{setTimeout(R,300)})})}),(W,Z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-logo",[{"is-fixed":n.isFixed},{"is-campus":!$.value},{"is-full-width":n.fullWidth}]]),ref_key:"wrapper",ref:y},[e.createElementVNode("ul",{class:"tab-logo__list",ref_key:"list",ref:b,onScroll:G},[e.withDirectives(e.createElementVNode("div",{class:"tab-logo__nav__prev",onClick:Z[0]||(Z[0]=ie=>H("prev"))},null,512),[[e.vShow,D.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,(ie,ge)=>(e.openBlock(),e.createElementBlock("li",{key:ge,class:e.normalizeClass(["tab-logo__item",[{"tab-logo__item--img":!!ie.img}]])},[e.createElementVNode("div",{ref_for:!0,ref_key:"btn",ref:V,class:"flex-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie.link?"nuxt-link":"button"),{type:ie.link?null:"button",to:T(ie.link),class:e.normalizeClass(["tab-logo__btn",[{"is-active":n.currentIdx==ge}]]),onClick:Le=>M(ge)},{default:e.withCtx(()=>[e.createElementVNode("div",QX,[e.createElementVNode("img",{src:ie.img,alt:ie.alt},null,8,ZX)])]),_:2},1032,["type","to","class","onClick"]))],512)],2))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-logo__nav__next",onClick:Z[1]||(Z[1]=ie=>H("next"))},null,512),[[e.vShow,N.value]])],544),e.createElementVNode("span",{class:"tab-logo__strip",style:e.normalizeStyle(S.value)},null,4)],2))}},[["__scopeId","data-v-25fd5872"]]),eY={class:"setting-content"},tY={class:"setting-header flex items-center"},nY={class:"setting-body"},oY={class:"setting-toolbar"},aY={class:"tools"},iY={class:"setting-item"},sY={class:"item-header"},lY={class:"btn-group"},rY={key:0,class:"drag-handle"},dY=["src"],cY={class:"item-uplaod flex items-center"},uY={class:"components-content"},mY=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1}));e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1}));const s=m=>m&&m.length>1,l=n,r=t,c=()=>{r("update:show",!1)},u=m=>{debugger;l.data.data.push({id:F(),key:F(),name:"New Tab",img:"https://osswebsite-test.cedim.cn/media-library/shared/24-25%E5%BC%80%E5%AD%A6/640-5.jpg",alt:"yew-chung-international-school",componentsDataJson:[]})},g=(m,d)=>{l.data.data=l.data.data.filter(p=>p.id!==m)};return(m,d)=>{const p=e.resolveComponent("a-switch"),f=e.resolveComponent("icon-plus"),h=e.resolveComponent("a-button"),C=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),x=e.resolveComponent("a-input"),y=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(y,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",eY,[e.createElementVNode("div",tY,[d[7]||(d[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=b=>n.data.onlyShowPc=b)},null,8,["modelValue"])]),e.createElementVNode("div",nY,[e.createElementVNode("div",oY,[d[10]||(d[10]=e.createElementVNode("h1",null,"List",-1)),e.createElementVNode("div",aY,[e.createVNode(h,{type:"primary",onClick:d[1]||(d[1]=b=>u())},{icon:e.withCtx(()=>[e.createVNode(f)]),default:e.withCtx(()=>[d[8]||(d[8]=e.createTextVNode(" 添加 List ",-1))]),_:1}),e.createVNode(h,{type:"primary",onClick:d[2]||(d[2]=b=>u())},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",iY,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[4]||(d[4]=b=>n.data.data=b),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[5]||(d[5]=b=>a.value=!0),onEnd:d[6]||(d[6]=b=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:b})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:b.id},[e.createElementVNode("div",sY,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(b.name),1),e.createElementVNode("span",null,e.toDisplayString(b.key),1)]),e.createElementVNode("div",lY,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",rY,[e.createVNode(C,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:V=>g(b.id)},null,8,["onClick"]),e.createVNode(h,{size:"mini",type:"primary",onClick:d[3]||(d[3]=V=>u())},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[12]||(d[12]=e.createElementVNode("p",{class:"item-title"},"Alt",-1)),e.createVNode(x,{modelValue:b.alt,"onUpdate:modelValue":V=>b.alt=V,placeholder:"请输入alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[13]||(d[13]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(x,{modelValue:b.key,"onUpdate:modelValue":V=>b.key=V,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[14]||(d[14]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:b.img},null,8,dY),e.createElementVNode("div",cY,[e.createVNode(x,{modelValue:b.img,"onUpdate:modelValue":V=>b.img=V,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:b.img,"onUpdate:modelValue":V=>b.img=V,name:b.key},null,8,["modelValue","onUpdate:modelValue","name"])]),d[15]||(d[15]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",uY,[e.createVNode(Fa,{data:b.componentsDataJson,onUpdate:V=>b.componentsDataJson=V},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-c52189f2"]]),pY={class:"tab-page__content"},hY={key:0},fY="",Tc=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=t,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a,c=n,u=e.ref(0),g=e.ref(!1),m=e.ref(!0),d=e.ref(null),p=e.ref(null),f=e.ref(!1),h=e.ref(!1),C=O=>{if(!O)return{top:0,left:0};const H=O.getBoundingClientRect(),R=window.pageYOffset||document.documentElement.scrollTop,M=window.pageXOffset||document.documentElement.scrollLeft;return{top:H.top+R,left:H.left+M}},w=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.classes)??null}),x=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.style)??null});e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.type)??"TabPrimary"});const y=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.data)??[]}),b=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.fixed)??!0}),V=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.resetToTop)??!0}),T=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.scrollToTop)??!0}),k=e.computed(()=>{var O;return((O=c.modelValue)==null?void 0:O.fullWidth)??!1});e.computed(()=>0),e.computed(()=>!1);const S=e.computed(()=>y.value.some(O=>O.img)),D=e.computed(()=>{var O;return((O=y.value[u.value])==null?void 0:O.key)??null}),N=e.computed(()=>{var H;if(!((H=c.modelValue)!=null&&H.data)||!Array.isArray(c.modelValue.data))return[];const O=c.modelValue.data[u.value];return O?O.componentsDataJson||[]:[]}),A=()=>{var H;if(c.modelValue&&c.modelValue.data)return;const O={id:((H=c.modelValue)==null?void 0:H.id)||F(),type:"TabLogo",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",resetToTop:!1,fullWidth:!0,fixed:!1,scrollToTop:!1,data:[{id:F(),key:F(),img:"https://osswebsite-test.cedim.cn/media-library/shared/24-25%E5%BC%80%E5%AD%A6/640-5.jpg",alt:"yew-chung-international-school",name:"New Tab1",componentsDataJson:[]},{id:F(),key:F(),img:"https://osswebsite-test.cedim.cn/media-library/shared/24-25%E5%BC%80%E5%AD%A6/640-5.jpg",alt:"yew-chung-international-school",name:"New Tab2",componentsDataJson:[]}]};o("update:modelValue",O),u.value=0},$=()=>{var Z,ie;const O=p.value;if(!O)return;const H=O.getBoundingClientRect().top,R=d.value;if(!R)return;const M=R.getBoundingClientRect().top,W=+((ie=(Z=window.getComputedStyle(document.body))==null?void 0:Z.getPropertyValue("--header-height-calc"))==null?void 0:ie.split("px")[0])||0;if(M>W){g.value=!1;return}H<=W&&(g.value=!0)},I=()=>{if(!T.value)return;let O=0;V.value||(O=C(d.value).top-170),window.scroll({top:O,left:0,behavior:"smooth"})},U=O=>{sessionStorage.setItem(fY,O)},Y=(O,H)=>{debugger;o("handleDelete",O||c.modelValue.id,H)},G=O=>{debugger;o("handleCopy",O||c.modelValue)},q=(O,H,R)=>{debugger;o("handlePaste",O,H,R)};return e.watch(()=>s.value,()=>{$()}),e.watch(u,()=>{U(D.value),m.value&&I(),m.value=!0}),e.watch(D,O=>{O||(u.value=0)}),e.onMounted(()=>{A(),e.nextTick($),setTimeout(()=>{e.nextTick($)},200),setTimeout(()=>{},1e3)}),(O,H)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-page",w.value]),style:e.normalizeStyle(x.value),onMouseover:H[6]||(H[6]=R=>h.value=!0),onMouseout:H[7]||(H[7]=R=>h.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-page__hold",[{"is-fixed":g.value&&b.value},{"is-thick":S.value}]]),ref_key:"hold",ref:d},[e.createElementVNode("div",{class:"tab-page__nav",ref_key:"tab",ref:p},[e.createVNode(JX,{tabList:y.value,currentIdx:u.value,isFixed:g.value&&b.value,fullWidth:k.value,onUpdateCurrentIdx:H[0]||(H[0]=R=>u.value=R)},null,8,["tabList","currentIdx","isFixed","fullWidth"])],512)],2),e.createElementVNode("div",pY,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[D.value?(e.openBlock(),e.createElementBlock("div",{key:D.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,R=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.value==R.key?(e.openBlock(),e.createElementBlock("div",hY,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.componentsDataJson,(M,W)=>(e.openBlock(),e.createBlock(Co,{key:M.id,type:M.type,"props-data":{modelValue:M,isPreview:n.isPreview},onHandleDelete:H[1]||(H[1]=Z=>Y(Z,N.value)),onHandleCopy:H[2]||(H[2]=Z=>G(Z)),onHandlePaste:Z=>q(Z,N.value,W)},null,8,["type","props-data","onHandlePaste"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:h.value,"onUpdate:show":H[3]||(H[3]=R=>h.value=R),onHandleEdit:H[4]||(H[4]=R=>f.value=!0),onHandleDelete:Y,onHandleCopy:G,onHandlePaste:q,style:{top:"-22px"}},null,8,["show"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(mY,{key:1,show:f.value,"onUpdate:show":H[5]||(H[5]=R=>f.value=R),data:n.modelValue},null,8,["show","data"]))],38))}},[["__scopeId","data-v-1a934b09"]]),gY=Object.freeze(Object.defineProperty({__proto__:null,default:Tc},Symbol.toStringTag,{value:"Module"})),yY={class:"setting-content"},_Y={class:"setting-header flex items-center"},wY={class:"setting-header flex items-center"},bY={class:"setting-header flex items-center"},CY={class:"setting-header flex items-center"},VY={class:"setting-header flex items-center"},xY={class:"setting-header flex items-center"},kY={class:"preview-container"},EY=["src"],TY={key:1,class:"no-preview"},NY={class:"setting-body"},SY={class:"setting-item"},BY={class:"components-content"},PY=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=n,a=e.ref([{id:"preset-1",name:"YCCECE Background 1",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",size:"cover",position:"center center"},{id:"preset-2",name:"YCCECE Background 2",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-02.svg",size:"",position:""},{id:"preset-3",name:"YCCECE Background 3",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",size:"cover",position:""},{id:"preset-4",name:"YCCECE Background 4",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",size:"cover",position:""}]),i=e.ref(),s=a.value.find(u=>u.image===o.data.backgroundImage);i.value=s?s.id:"";const l=()=>{const u=a.value.find(g=>g.id===i.value);u&&(o.data.backgroundImage=`${u.image}`,o.data.backgroundSize=u.size,o.data.backgroundPosition=u.position)},r=t,c=()=>{r("update:show",!1)};return(u,g)=>{const m=e.resolveComponent("a-switch"),d=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-input"),C=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(C,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",yY,[e.createElementVNode("div",_Y,[g[6]||(g[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(m,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":g[0]||(g[0]=w=>n.data.onlyShowPc=w)},null,8,["modelValue"])]),e.createElementVNode("div",wY,[g[8]||(g[8]=e.createElementVNode("span",{class:"header-title"},"Background Preset",-1)),e.createVNode(p,{modelValue:i.value,"onUpdate:modelValue":g[1]||(g[1]=w=>i.value=w),style:{width:"300px","margin-right":"8px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,w=>(e.openBlock(),e.createBlock(d,{value:w.id,key:w.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(f,{type:"primary",onClick:l},{default:e.withCtx(()=>[...g[7]||(g[7]=[e.createTextVNode("Apply",-1)])]),_:1})]),e.createElementVNode("div",bY,[g[9]||(g[9]=e.createElementVNode("span",{class:"header-title"},"Image",-1)),e.createVNode(h,{modelValue:n.data.backgroundImage,"onUpdate:modelValue":g[2]||(g[2]=w=>n.data.backgroundImage=w),disabled:!0,placeholder:"图片路径",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",CY,[g[10]||(g[10]=e.createElementVNode("span",{class:"header-title"},"Size",-1)),e.createVNode(h,{modelValue:n.data.backgroundSize,"onUpdate:modelValue":g[3]||(g[3]=w=>n.data.backgroundSize=w),disabled:!0,placeholder:"尺寸",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",VY,[g[11]||(g[11]=e.createElementVNode("span",{class:"header-title"},"Position",-1)),e.createVNode(h,{modelValue:n.data.backgroundPosition,"onUpdate:modelValue":g[4]||(g[4]=w=>n.data.backgroundPosition=w),disabled:!0,placeholder:"位置",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",xY,[g[13]||(g[13]=e.createElementVNode("span",{class:"header-title"},"Preview",-1)),e.createElementVNode("div",kY,[n.data.backgroundImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.data.backgroundImage,style:e.normalizeStyle({"object-fit":n.data.backgroundSize||"cover","background-position":n.data.backgroundPosition||"center center",width:"100%",height:"100px",border:"1px solid #ddd"}),alt:"Background Preview"},null,12,EY)):(e.openBlock(),e.createElementBlock("div",TY,"No preview available")),g[12]||(g[12]=e.createElementVNode("p",{class:"preview-note"}," A light grey background has been applied for previewing and will not be reflected on website. ",-1))])]),e.createElementVNode("div",NY,[g[14]||(g[14]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",SY,[e.createElementVNode("div",BY,[e.createVNode(Fa,{data:n.data.data,onUpdate:g[5]||(g[5]=w=>n.data.data=w)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-f43efd7b"]]),DY={class:"component-wrapper"},Nc=J({__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{var b,V;return!((b=o.modelValue)!=null&&b.data)||!Array.isArray(o.modelValue.data)?[]:(V=o.modelValue)==null?void 0:V.data}),s=(b,V)=>{debugger;a("handleDelete",b||o.modelValue.id,V)},l=b=>{debugger;a("handleCopy",b||o.modelValue)},r=(b,V,T)=>{debugger;a("handlePaste",b,V,T)},c=e.ref(!1),u=e.ref(!1),g=()=>{var V,T;if(o.modelValue&&o.modelValue.data)return;const b={id:((V=o.modelValue)==null?void 0:V.id)||F(),type:"BackgroundWrapper",onlyShowPc:!1,backgroundImage:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",backgroundSize:"cover",backgroundPosition:"center center",data:[{id:((T=o.modelValue)==null?void 0:T.id)||F(),type:"CustomText",onlyShowPc:!1,data:{width:1920,backgroundColor:"#ffffff",title:"这是标题",description:"这是描述"}}]};a("update:modelValue",b)},m=e.computed(()=>{var b;return o.isPreview?!((b=o.modelValue)!=null&&b.onlyShowPc)||!Te():!0}),d=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.classes)??null}),p=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.style)??null}),f=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.width)??null}),h=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundImage)??""}),C=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundColor)??"transparent"}),w=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundSize)??"contain"}),x=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundPosition)??"center"}),y=e.computed(()=>{var b;return((b=o.modelValue)==null?void 0:b.backgroundRepeat)??"no-repeat"});return g(),(b,V)=>m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["background-wrapper",d.value]),style:e.normalizeStyle(p.value)},[e.createElementVNode("div",{class:e.normalizeClass(f.value),style:{position:"relative"},onMouseover:V[4]||(V[4]=T=>c.value=!0),onMouseout:V[5]||(V[5]=T=>c.value=!1)},[e.createElementVNode("div",{class:"background-wrapper__bg",style:e.normalizeStyle({"background-image":`url('${h.value}')`,"background-color":`${C.value}`,"background-size":`${w.value}`,"background-position":`${x.value}`,"background-repeat":`${y.value}`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(T,k)=>(e.openBlock(),e.createElementBlock("div",{key:T.id,class:"page-item"},[e.createElementVNode("div",DY,[e.createVNode(Co,{type:T.type,"props-data":{modelValue:T,isPreview:n.isPreview},onHandleDelete:V[0]||(V[0]=S=>s(S,i.value)),onHandleCopy:V[1]||(V[1]=S=>l(S)),onHandlePaste:S=>r(S,i.value,k)},null,8,["type","props-data","onHandlePaste"])])]))),128))],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:c.value,"onUpdate:show":V[2]||(V[2]=T=>c.value=T),onHandleEdit:V[3]||(V[3]=T=>u.value=!0),onHandleDelete:s,onHandleCopy:l,onHandlePaste:r},null,8,["show"]))],34),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PY,{key:0,show:u.value,"onUpdate:show":V[6]||(V[6]=T=>u.value=T),data:n.modelValue},null,8,["show","data"]))],6)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-9a67cbbf"]]),$Y=Object.freeze(Object.defineProperty({__proto__:null,default:Nc},Symbol.toStringTag,{value:"Module"}));var ny="Expected a function",oy=NaN,LY="[object Symbol]",AY=/^\s+|\s+$/g,IY=/^[-+]0x[0-9a-f]+$/i,vY=/^0b[01]+$/i,MY=/^0o[0-7]+$/i,OY=parseInt,UY=typeof ca=="object"&&ca&&ca.Object===Object&&ca,RY=typeof self=="object"&&self&&self.Object===Object&&self,FY=UY||RY||Function("return this")(),HY=Object.prototype,jY=HY.toString,zY=Math.max,qY=Math.min,Np=function(){return FY.Date.now()};function WY(n,t,o){var a,i,s,l,r,c,u=0,g=!1,m=!1,d=!0;if(typeof n!="function")throw new TypeError(ny);t=ay(t)||0,Sc(o)&&(g=!!o.leading,m="maxWait"in o,s=m?zY(ay(o.maxWait)||0,t):s,d="trailing"in o?!!o.trailing:d);function p(T){var k=a,S=i;return a=i=void 0,u=T,l=n.apply(S,k),l}function f(T){return u=T,r=setTimeout(w,t),g?p(T):l}function h(T){var k=T-c,S=T-u,D=t-k;return m?qY(D,s-S):D}function C(T){var k=T-c,S=T-u;return c===void 0||k>=t||k<0||m&&S>=s}function w(){var T=Np();if(C(T))return x(T);r=setTimeout(w,h(T))}function x(T){return r=void 0,d&&a?p(T):(a=i=void 0,l)}function y(){r!==void 0&&clearTimeout(r),u=0,a=c=i=r=void 0}function b(){return r===void 0?l:x(Np())}function V(){var T=Np(),k=C(T);if(a=arguments,i=this,c=T,k){if(r===void 0)return f(c);if(m)return r=setTimeout(w,t),p(c)}return r===void 0&&(r=setTimeout(w,t)),l}return V.cancel=y,V.flush=b,V}function GY(n,t,o){var a=!0,i=!0;if(typeof n!="function")throw new TypeError(ny);return Sc(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),WY(n,t,{leading:a,maxWait:t,trailing:i})}function Sc(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function XY(n){return!!n&&typeof n=="object"}function YY(n){return typeof n=="symbol"||XY(n)&&jY.call(n)==LY}function ay(n){if(typeof n=="number")return n;if(YY(n))return oy;if(Sc(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Sc(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(AY,"");var o=vY.test(n);return o||MY.test(n)?OY(n.slice(2),o?2:8):IY.test(n)?oy:+n}var KY=GY;const QY=Ua(KY),ZY={class:"setting-content"},JY={class:"setting-header flex items-center"},eK={class:"setting-header flex items-center"},tK={class:"setting-header flex items-center"},nK={class:"setting-header flex items-center"},oK={class:"setting-body"},aK={class:"setting-item"},iK={class:"components-content"},sK=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>import("vuedraggable"));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),c=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:"60%",visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ZY,[e.createElementVNode("div",JY,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",eK,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(r,{modelValue:n.data.title,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",tK,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.width,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:""},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(c,{value:"middle"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(c,{value:"max"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",nK,[s[14]||(s[14]=e.createElementVNode("span",{class:"header-title"},"Opened by default",-1)),e.createVNode(u,{modelValue:n.data.openFirst,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.openFirst=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(c,{value:!0},{default:e.withCtx(()=>[...s[12]||(s[12]=[e.createTextVNode("yes",-1)])]),_:1}),e.createVNode(c,{value:!1},{default:e.withCtx(()=>[...s[13]||(s[13]=[e.createTextVNode("No",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",oK,[s[15]||(s[15]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",aK,[e.createElementVNode("div",iK,[e.createVNode(Fa,{data:n.data.data,onUpdate:s[4]||(s[4]=m=>n.data.data=m)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-97f379ed"]]),lK={class:"collapse-custom__wrapper"},rK=["innerHTML"],dK={class:"collapse-custom__content__wrapper"},cK={class:"component-wrapper"},Bc=J({__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(0),l=e.ref(!1),r=e.ref(null),c=e.ref(!1),u=e.ref(!1),g=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.classes)??""}),m=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.style)??""});e.computed(()=>{var V;return(V=o.modelValue)==null?void 0:V.width});const d=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.title)??[]}),p=e.computed(()=>{var V;return((V=o.modelValue)==null?void 0:V.openFirst)??!1}),f=e.computed(()=>{var V,T;return!((V=o.modelValue)!=null&&V.data)||!Array.isArray(o.modelValue.data)?[]:(T=o.modelValue)==null?void 0:T.data}),h=()=>{var T;if(o.modelValue&&o.modelValue.data)return;const V={id:((T=o.modelValue)==null?void 0:T.id)||F(),type:"CollapseCustom",onlyShowPc:!1,title:"我是标题collaspse",openFirst:!1,width:"",style:{},data:[]};a("update:modelValue",V)},C=e.computed(()=>{var V;return o.isPreview?!((V=o.modelValue)!=null&&V.onlyShowPc)||!Te():!0}),w=()=>{const V=i.value;V&&(s.value=V.scrollHeight)},x=(V,T)=>{debugger;a("handleDelete",V||o.modelValue.id,T)},y=V=>{debugger;a("handleCopy",V||o.modelValue)},b=(V,T,k)=>{debugger;a("handlePaste",V,T,k)};return e.onMounted(()=>{l.value=p.value,e.nextTick(w);const V=QY(()=>{w()},250);r.value=new ResizeObserver(V),r.value.observe(i.value)}),e.onBeforeUnmount(()=>{i.value&&r.value&&r.value.unobserve(i.value)}),h(),(V,T)=>{var k,S;return C.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["collapse-custom",g.value]),style:e.normalizeStyle(m.value),onMouseover:T[6]||(T[6]=D=>c.value=!0),onMouseout:T[7]||(T[7]=D=>c.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom_container",[(k=n.modelValue)!=null&&k.width?`container-content-${(S=n.modelValue)==null?void 0:S.width}`:"container-content"]])},[e.createElementVNode("div",lK,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["collapse-custom__btn",{"--is-collapsed":!l.value}]),onClick:T[0]||(T[0]=D=>l.value=!l.value)},[e.createElementVNode("h4",{class:"collapse-custom__btn__title",innerHTML:d.value},null,8,rK),T[8]||(T[8]=e.createElementVNode("span",{class:"collapse-custom__btn__icon"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom__content",{"--is-open":l.value}]),ref_key:"content",ref:i,style:e.normalizeStyle({"--scroll-height":`${s.value}px`})},[e.createElementVNode("div",dK,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(D,N)=>(e.openBlock(),e.createElementBlock("div",{key:D.id,class:"page-item"},[e.createElementVNode("div",cK,[e.createVNode(Co,{type:D.type,"props-data":{modelValue:D,isPreview:n.isPreview},onHandleDelete:T[1]||(T[1]=A=>x(A,f.value)),onHandleCopy:T[2]||(T[2]=A=>y(A)),onHandlePaste:A=>b(A,f.value,N)},null,8,["type","props-data","onHandlePaste"])])]))),128))])],6)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:c.value,"onUpdate:show":T[3]||(T[3]=D=>c.value=D),onHandleEdit:T[4]||(T[4]=D=>u.value=!0),onHandleDelete:x,onHandleCopy:y,onHandlePaste:b,style:{top:"-20px"}},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sK,{key:0,show:u.value,"onUpdate:show":T[5]||(T[5]=D=>u.value=D),data:n.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}}},[["__scopeId","data-v-bf06e617"]]),uK=Object.freeze(Object.defineProperty({__proto__:null,default:Bc},Symbol.toStringTag,{value:"Module"})),mK=["onClick"],pK=J({__name:"VrTourTab",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a}=o,i=n,s=t,l=e.ref(0),r=e.ref(0),c=e.ref(0),u=e.ref(0),g=e.ref(null),m=e.ref(null),d=e.ref([]),p=e.computed(()=>l.value>40),f=e.computed(()=>c.value+u.value<r.value+40),h=e.computed({get(){return i.currentIdx??0},set(y){s("updateIdx",y)}});e.watch(a,()=>{C()});const C=()=>{if(i.list.length<=0)return;m.value&&(l.value=m.value.scrollLeft),g.value&&(c.value=g.value.getBoundingClientRect().left,u.value=g.value.getBoundingClientRect().width);let y=null;d.value.length>0&&(y=Array.isArray(d.value)?d.value[d.value.length-1]:d.value),y&&y.getBoundingClientRect&&(r.value=y.getBoundingClientRect().left)},w=y=>{m.value&&(y==="next"?m.value.scrollLeft+=200:m.value.scrollLeft-=200)},x=()=>{C()};return e.onMounted(()=>{e.nextTick(()=>{x()})}),(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"VrtourWrapper",ref:g},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"VrtourList",ref:m,onScroll:x},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:b[0]||(b[0]=V=>w("prev"))},null,512),[[e.vShow,p.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(V,T)=>(e.openBlock(),e.createElementBlock("li",{key:T},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":h.value==T}]),ref_for:!0,ref_key:"VrtourBtn",ref:d,onClick:k=>h.value=T},e.toDisplayString(V.name),11,mK)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:b[1]||(b[1]=V=>w("next"))},null,512),[[e.vShow,f.value]])],544)],512))}},[["__scopeId","data-v-efdafd78"]]),hK=["onClick"],iy=J({__name:"VrTourCat",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),a=n,i=t,s=e.ref(null),l=e.ref(null),r=e.ref(null),c=e.ref(0),u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(0),p=e.computed(()=>c.value>40),f=e.computed(()=>g.value+m.value<u.value+40),h=e.computed({get(){return a.currentIdx??0},set(b){i("updateIdx",b),e.nextTick(y)}}),C=()=>{if(a.list.length<=0)return;l.value&&(c.value=l.value.scrollLeft),s.value&&(g.value=s.value.getBoundingClientRect().left,m.value=s.value.getBoundingClientRect().width);let b=null;r.value&&(b=Array.isArray(r.value)?r.value[r.value.length-1]:r.value),b&&b.getBoundingClientRect&&(u.value=b.getBoundingClientRect().left)},w=b=>{b=="next"?l.value.scrollLeft+=200:l.value.scrollLeft-=200},x=()=>{l.value&&(c.value=l.value.scrollLeft),C()},y=async()=>{if(await e.nextTick(),!r.value||!r.value[h.value])return;const b=r.value[h.value],V=b.clientWidth/2,T=o.$_vsWidth/2;d.value=b.getBoundingClientRect().right-V,l.value.scrollLeft-=T-d.value};return e.watch(()=>o.$_vsWidth,()=>{C()}),e.watch(()=>a.list,()=>{e.nextTick(C),l.value&&l.value.scrollLeft&&(l.value.scrollLeft=0)},{deep:!0}),e.onMounted(()=>{e.nextTick(x)}),(b,V)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"wrapper",ref:s},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:l,onScroll:x},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:V[0]||(V[0]=T=>w("prev"))},null,512),[[e.vShow,p.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(T,k)=>(e.openBlock(),e.createElementBlock("li",{key:k,class:"tab-tag__item"},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":h.value==k}]),ref_for:!0,ref_key:"btnRef",ref:r,onClick:S=>h.value=k},e.toDisplayString(T.name),11,hK)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:V[1]||(V[1]=T=>w("next"))},null,512),[[e.vShow,f.value]])],544)],512))}},[["__scopeId","data-v-6dd36752"]]),fK={class:"tab-tag__nav__prev"},gK=["onClick"],yK=["src","alt"],_K={class:"tab-tag__btn__title"},wK={class:"tab-tag__nav__next"},bK=J({__name:"VrTourChoose",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a}=o,i=n,s=t,l=e.ref(null),r=e.ref(null),c=e.ref(null),u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(0),p=e.ref(0),f=e.computed(()=>u.value>0),h=e.computed(()=>g.value-40>d.value),C=e.computed({get(){return i.currentIdx??0},set(V){s("updateIdx",V),e.nextTick(y)}}),w=()=>{var T,k,S;if(i.list.length<=0)return;u.value=(T=r.value)==null?void 0:T.scrollLeft,m.value=(k=l.value)==null?void 0:k.getBoundingClientRect().left,d.value=(S=l.value)==null?void 0:S.getBoundingClientRect().right;let V=null;c.value&&(V=Array.isArray(c.value)?c.value[c.value.length-1]:c.value),g.value=V==null?void 0:V.getBoundingClientRect().right},x=V=>{V==="next"?r.value.scrollLeft+=200:r.value.scrollLeft-=200},y=()=>{const V=c.value[C.value];if(!V)return;const T=V.clientWidth/2,k=a.value/2;p.value=V.getBoundingClientRect().right-T,r.value.scrollLeft-=k-p.value},b=()=>{w()};return e.watch(()=>a.value,()=>{w()}),e.watch(()=>i.list,()=>{e.nextTick(w),r.value&&r.value.scrollLeft&&(r.value.scrollLeft=0)}),e.onMounted(()=>{e.nextTick(b)}),(V,T)=>(e.openBlock(),e.createElementBlock("div",{class:"vr-tour-choose tab-tag",ref_key:"wrapper",ref:l},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:r,onScroll:b},[e.withDirectives(e.createElementVNode("div",fK,[e.createElementVNode("button",{type:"button",class:"nav__btn",onClick:T[0]||(T[0]=k=>x("prev"))})],512),[[e.vShow,f.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(k,S)=>(e.openBlock(),e.createElementBlock("li",{key:S,class:"tab-tag__item"},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-tag__btn",{"is-active":C.value===S}]),ref_for:!0,ref_key:"btn",ref:c,onClick:D=>C.value=S},[e.createElementVNode("img",{src:k.url,alt:k.name},null,8,yK),e.createElementVNode("div",_K,e.toDisplayString(k.name),1)],10,gK)]))),128)),e.withDirectives(e.createElementVNode("div",wK,[e.createElementVNode("button",{type:"button",class:"nav__btn",onClick:T[1]||(T[1]=k=>x("next"))})],512),[[e.vShow,h.value]])],544)],512))}},[["__scopeId","data-v-ebb85a22"]]),CK={class:"vr-tour-scene"},VK=["src"],xK={key:1,class:"vr-tour-scene__img"},kK=["src","alt"],EK=J({__name:"VrTourScene",props:{scene:{type:Object,default:()=>({})}},setup(n){const t=n,o=e.computed(()=>{var s;return(s=t.scene)==null?void 0:s.embed}),a=e.computed(()=>{var s;return(s=t.scene)==null?void 0:s.url}),i=e.computed(()=>{var s;return(s=t.scene)==null?void 0:s.name});return(s,l)=>(e.openBlock(),e.createElementBlock("div",CK,[o.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:o.value,frameborder:"0"},null,8,VK)):(e.openBlock(),e.createElementBlock("div",xK,[e.createElementVNode("img",{src:a.value,alt:i.value},null,8,kK)]))]))}},[["__scopeId","data-v-c07507d5"]]),TK={class:"vr-tour-select"},NK={class:"select-btn__focus-name line-clamp-1"},SK={class:"select-list"},BK=["onClick"],sy=J({__name:"VrTourSelect",props:{list:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:0}},emits:["updateIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a}=o,i={mounted(h,C){h.clickOutsideEvent=w=>{h===w.target||h.contains(w.target)||C.value(w)},document.body.addEventListener("click",h.clickOutsideEvent)},unmounted(h){document.body.removeEventListener("click",h.clickOutsideEvent)}},s=n,l=t,r=e.ref(!1),c=e.ref(-8),u=e.ref(null),g=e.computed({get(){return s.currentIdx??0},set(h){l("updateIdx",h)}}),m=e.computed(()=>{var h;return((h=s.list[g.value])==null?void 0:h.name)||""});e.watch(r,()=>{p()}),e.onMounted(()=>{window.addEventListener("resize",()=>{a.value=window.innerWidth,r.value&&p()})});const d=()=>{r.value=!1},p=()=>{const h=u.value;if(!h)return;const C=ri(h).x+h.clientWidth;C>a.value&&(c.value=c.value-C+a.value-4)},f=h=>{g.value=h,d()};return(h,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",TK,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["select-btn",{"is-open":r.value}]),onClick:C[0]||(C[0]=w=>r.value=!r.value)},[e.createElementVNode("div",NK,e.toDisplayString(m.value),1),C[1]||(C[1]=e.createElementVNode("div",{class:"select-btn__arrow"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["select-block",{"is-open":r.value}]),style:e.normalizeStyle({"--left":`${c.value}px`}),ref_key:"blockRef",ref:u},[e.createElementVNode("ul",SK,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(w,x)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["select-item line-clamp-1",{"is-active":g.value===x}]),key:x,onClick:y=>f(x)},e.toDisplayString(w.name),11,BK))),128))])],6)])),[[i,d]])}},[["__scopeId","data-v-536804a2"]]),PK={class:"setting-content"},DK={class:"setting-header flex items-center"},$K={class:"setting-body"},LK={class:"setting-toolbar"},AK={class:"tools"},IK={class:"setting-item"},vK={class:"item-header"},MK={class:"btn-group"},OK={key:0,class:"drag-handle"},UK={key:0},RK={class:"item-header"},FK={class:"btn-group"},HK={key:0,class:"drag-handle"},jK={class:"item-header"},zK={class:"btn-group"},qK={key:0,class:"drag-handle"},WK=["src"],GK={class:"item-uplaod flex items-center"},XK={style:{"text-align":"center"}},YK={style:{"text-align":"center","margin-top":"20px"}},KK=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"gallerys-Categories",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=p=>p&&p.length>1,c=n,u=t,g=()=>{u("update:show",!1)},m=(p,f)=>{debugger;const h=c.data;p==="Campus"?h.data.push({key:F(),name:"New Campus",categoriesList:[]}):p==="Category"?f.categoriesList.push(JSON.parse(JSON.stringify({key:F(),name:"New Category",facilitiesList:[]}))):p==="facilitiy"?f.facilitiesList.push({key:F(),name:"New facilitiy",url:"",scene:null,embed:""}):h.data.push({id:F(),key:F(),name:"New Tab",link:"/",componentsDataJson:[]})},d=(p,f,h)=>{debugger;if(f==="Campuses")c.data.data=c.data.data.filter(C=>C.key!==p);else if(f==="facilitiy"){const C=h.findIndex(w=>w.key===p);C!==-1&&h.splice(C,1)}else if(f==="categories"){const C=h.findIndex(w=>w.key===p);C!==-1&&h.splice(C,1)}};return(p,f)=>{const h=e.resolveComponent("a-switch"),C=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),x=e.resolveComponent("icon-drag-arrow"),y=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:g,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",PK,[e.createElementVNode("div",DK,[f[9]||(f[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":f[0]||(f[0]=T=>n.data.onlyShowPc=T)},null,8,["modelValue"])]),e.createElementVNode("div",$K,[e.createElementVNode("div",LK,[f[11]||(f[11]=e.createElementVNode("h1",null,"Campuses",-1)),e.createElementVNode("div",AK,[e.createVNode(w,{type:"primary",onClick:f[1]||(f[1]=T=>m("Campus"))},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[f[10]||(f[10]=e.createTextVNode(" 添加 Campus ",-1))]),_:1})])]),e.createElementVNode("div",IK,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":f[6]||(f[6]=T=>n.data.data=T),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!r(n.data.data),onStart:f[7]||(f[7]=T=>a.value=!0),onEnd:f[8]||(f[8]=T=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:T})=>{var k;return[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:T.key},[e.createElementVNode("div",vK,[e.createElementVNode("div",null,[e.createElementVNode("h4",null,e.toDisplayString(T.name),1)]),e.createElementVNode("div",MK,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",OK,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:S=>d(T.key,"Campuses")},null,8,["onClick"])])]),f[19]||(f[19]=e.createElementVNode("p",{class:"item-title"},"Name",-1)),e.createVNode(b,{modelValue:T.name,"onUpdate:modelValue":S=>T.name=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[20]||(f[20]=e.createElementVNode("p",{class:"item-title"},"Categories",-1)),e.createElementVNode("div",null,[(k=T.categoriesList)!=null&&k.length?(e.openBlock(),e.createElementBlock("div",UK,[e.createVNode(e.unref(o),e.mergeProps({modelValue:T.categoriesList,"onUpdate:modelValue":S=>T.categoriesList=S,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},l.value,{disabled:!r(T.categoriesList),onStart:f[4]||(f[4]=S=>a.value=!0),onEnd:f[5]||(f[5]=S=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:S})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(T.categoriesList)}]),key:S.id,style:{border:"1px solid #d9d9d9","border-radius":"8px"}},[e.createElementVNode("div",RK,[e.createElementVNode("div",null,[e.createElementVNode("h4",null,e.toDisplayString(S.name),1)]),e.createElementVNode("div",FK,[r(T.categoriesList)?(e.openBlock(),e.createElementBlock("div",HK,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:D=>d(S.key,"categories",T.categoriesList)},null,8,["onClick"])])]),f[16]||(f[16]=e.createElementVNode("p",null,"Name",-1)),e.createVNode(b,{modelValue:S.name,"onUpdate:modelValue":D=>S.name=D,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[17]||(f[17]=e.createElementVNode("p",{class:"item-title"},"Facilities",-1)),e.createElementVNode("div",null,[e.createVNode(e.unref(o),e.mergeProps({modelValue:S.facilitiesList,"onUpdate:modelValue":D=>S.facilitiesList=D,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!r(S.facilitiesList),onStart:f[2]||(f[2]=D=>a.value=!0),onEnd:f[3]||(f[3]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(S.facilitiesList)}]),key:D.key,style:{border:"1px solid #d9d9d9","border-radius":"8px"}},[e.createElementVNode("div",jK,[e.createElementVNode("div",null,[e.createElementVNode("h4",null,e.toDisplayString(D.name),1)]),e.createElementVNode("div",zK,[r(S.facilitiesList)?(e.openBlock(),e.createElementBlock("div",qK,[e.createVNode(x,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(y,{class:"btn-delete",onClick:N=>d(D.key,"facilitiy",S.facilitiesList)},null,8,["onClick"])])]),f[12]||(f[12]=e.createElementVNode("p",{class:"item-title"},"Name",-1)),e.createVNode(b,{modelValue:D.name,"onUpdate:modelValue":N=>D.name=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),f[13]||(f[13]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:D.url},null,8,WK),e.createElementVNode("div",GK,[e.createVNode(b,{modelValue:D.url,"onUpdate:modelValue":N=>D.url=N,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(je,{modelValue:D.url,"onUpdate:modelValue":N=>D.url=N,name:D.key},null,8,["modelValue","onUpdate:modelValue","name"])]),f[14]||(f[14]=e.createElementVNode("p",{class:"item-title"},"VR Embed URL",-1)),e.createVNode(b,{modelValue:D.embed,"onUpdate:modelValue":N=>D.embed=N,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"])]),e.createElementVNode("div",XK,[e.createVNode(w,{type:"primary",onClick:D=>m("facilitiy",S)},{default:e.withCtx(()=>[...f[15]||(f[15]=[e.createTextVNode("添加Facilities",-1)])]),_:1},8,["onClick"])])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",YK,[e.createVNode(w,{type:"primary",onClick:S=>m("Category",T)},{default:e.withCtx(()=>[...f[18]||(f[18]=[e.createTextVNode("添加Category ",-1)])]),_:1},8,["onClick"])])],2))]}),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-73361da3"]]),QK={class:"vr-tour__wrapper"},ZK={key:0,class:"vr-tour__tabs"},JK={class:"container-content-middle"},eQ={key:1,class:"vr-tour__selects"},tQ={class:"container-content"},nQ={class:"vr-tour__selects__list"},oQ={class:"vr-tour__scene"},aQ={key:2,class:"vr-tour__cats"},iQ={class:"pt-2"},sQ={key:3,class:"vr-tour__chooses"},Pc=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=t,c=n,u=e.ref(0),g=e.ref(0),m=e.ref(0),d=e.ref(!1),p=e.ref(!1),f=e.computed(()=>{var y;return((y=c.modelValue)==null?void 0:y.data)??null}),h=e.computed(()=>{var y,b;return(b=(y=f.value)==null?void 0:y[u.value])==null?void 0:b.categoriesList}),C=e.computed(()=>{var y,b;return(b=(y=h.value)==null?void 0:y[g.value])==null?void 0:b.facilitiesList}),w=e.computed(()=>{var y;return(y=C.value)==null?void 0:y[m.value]}),x=()=>{var b;if(c.modelValue&&c.modelValue.data)return;const y={id:((b=c.modelValue)==null?void 0:b.id)||F(),type:"VrTour",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",data:[{key:F(),name:"SecondarySchool",categoriesList:[{key:F(),name:"Facilities",facilitiesList:[{key:F(),name:"ECE Learning Communities",url:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt/multi_floor_plans/853_floorplan.png",scene:null,embed:"https://osswebsite.ycyw.com/ycis-qd/res/qd/vt-2026/en/index.html"}]}]}]};r("update:modelValue",y),u.value=0};return e.watch(u,()=>{g.value=0}),e.watch(g,()=>{m.value=0}),x(),(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vr-tour bg-neutral-lightest",{"pb-0":C.value&&C.value.length<=1}]),onMouseover:b[9]||(b[9]=V=>p.value=!0),onMouseout:b[10]||(b[10]=V=>p.value=!1)},[e.createElementVNode("div",QK,[f.value&&f.value.length>1&&e.unref(a)>=768?(e.openBlock(),e.createElementBlock("div",ZK,[e.createElementVNode("div",JK,[e.createVNode(pK,{list:f.value,onUpdateIdx:b[0]||(b[0]=V=>u.value=V),currentIdx:u.value},null,8,["list","currentIdx"])])])):e.createCommentVNode("",!0),e.unref(a)<768?(e.openBlock(),e.createElementBlock("div",eQ,[e.createElementVNode("div",tQ,[e.createElementVNode("div",nQ,[f.value.length>1?(e.openBlock(),e.createBlock(sy,{key:0,list:f.value,onUpdateIdx:b[1]||(b[1]=V=>u.value=V),currentIdx:u.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0),h.value.length>1?(e.openBlock(),e.createBlock(sy,{key:1,list:h.value,onUpdateIdx:b[2]||(b[2]=V=>g.value=V),currentIdx:g.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0)])]),C.value.length>1?(e.openBlock(),e.createBlock(iy,{key:0,list:C.value,onUpdateIdx:b[3]||(b[3]=V=>m.value=V),currentIdx:m.value},null,8,["list","currentIdx"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",oQ,[e.createVNode(EK,{scene:w.value},null,8,["scene"])]),h.value&&e.unref(a)>=768?(e.openBlock(),e.createElementBlock("div",aQ,[e.withDirectives(e.createElementVNode("div",iQ,null,512),[[e.vShow,h.value.length<=1&&C.value&&C.value.length>1]]),e.withDirectives(e.createVNode(iy,{list:h.value,onUpdateIdx:b[4]||(b[4]=V=>g.value=V),currentIdx:g.value},null,8,["list","currentIdx"]),[[e.vShow,h.value.length>1]])])):e.createCommentVNode("",!0),C.value&&C.value.length>1&&e.unref(a)>=768?(e.openBlock(),e.createElementBlock("div",sQ,[e.createVNode(bK,{list:C.value,onUpdateIdx:b[5]||(b[5]=V=>m.value=V),currentIdx:m.value},null,8,["list","currentIdx"])])):e.createCommentVNode("",!0)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:p.value,"onUpdate:show":b[6]||(b[6]=V=>p.value=V),onHandleEdit:b[7]||(b[7]=V=>d.value=!0),onHandleDelete:y.handleDelete,onHandleCopy:y.handleCopy,onHandlePaste:y.handlePaste},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(KK,{key:1,show:d.value,"onUpdate:show":b[8]||(b[8]=V=>d.value=V),data:n.modelValue},null,8,["show","data"]))],34))}},[["__scopeId","data-v-6a9a09ae"]]),lQ=Object.freeze(Object.defineProperty({__proto__:null,default:Pc},Symbol.toStringTag,{value:"Module"})),rQ={class:"seting-box"},dQ={class:"setting-header flex items-center"},cQ={key:0},uQ={class:"setting-header items-center"},mQ={class:"draggable_box"},pQ={class:"drag_top_box"},hQ=["onClick"],fQ={key:0},gQ={class:"draggable_link_box"},yQ={class:"drag_link_top_box"},_Q=["onClick"],wQ=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.computed(()=>({animation:200,group:"gridLinks",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),i=e.computed(()=>({animation:200,group:"gridLinkItems",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.ref(!1),l=e.ref(!1),r=n,c=e.ref(new Set),u=e.ref(new Set),g=()=>{var T,k;(k=(T=r.data)==null?void 0:T.data)!=null&&k.list&&Array.isArray(r.data.data.list)&&(c.value.clear(),u.value.clear(),r.data.data.list.forEach(S=>{S.id&&c.value.add(S.id),S.links&&Array.isArray(S.links)&&S.links.length>0&&S.links.forEach(D=>{D.id&&u.value.add(D.id)})}))},m=e.ref(!1);e.watch(()=>r.show,T=>{T&&!m.value?(m.value=!0,e.nextTick(()=>{g()})):T||(m.value=!1)},{immediate:!0});const d=T=>{var k,S;c.value.has(T.id)?(c.value.clear(),(S=(k=r.data)==null?void 0:k.data)!=null&&S.list&&r.data.data.list.forEach(D=>{D.id!==T.id&&c.value.add(D.id)})):c.value.add(T.id)},p=T=>c.value.has(T.id),f=T=>{r.data.data.list=r.data.data.list.filter(k=>k.id!==T)},h=()=>{var S,D;const T=r.data.data,k=F();T.list.push({id:k,title:"这里是标题",links:[]}),c.value.clear(),(D=(S=r.data)==null?void 0:S.data)!=null&&D.list&&r.data.data.list.forEach(N=>{N.id!==k&&c.value.add(N.id)}),e.nextTick(()=>{if(typeof document<"u"){const N=document.querySelector(".arco-drawer-body");N&&(N.scrollTop=N.scrollHeight)}})},C=T=>{u.value.has(T.id)?u.value.delete(T.id):u.value.add(T.id)},w=T=>u.value.has(T.id),x=T=>{const k=r.data.data.list.find(S=>S.id===T);if(k){const S=F();k.links.push({id:S,name:"这里是名称",link:""}),k.links&&Array.isArray(k.links)&&k.links.forEach(D=>{D.id!==S?u.value.add(D.id):u.value.delete(D.id)})}},y=(T,k)=>{const S=r.data.data.list.find(D=>D.id===T);S&&S.links&&(S.links=S.links.filter(D=>D.id!==k))},b=t,V=()=>{b("update:show",!1)};return(T,k)=>{const S=e.resolveComponent("a-switch"),D=e.resolveComponent("a-option"),N=e.resolveComponent("a-select"),A=e.resolveComponent("icon-drag-dot"),$=e.resolveComponent("icon-drag-arrow"),I=e.resolveComponent("icon-delete"),U=e.resolveComponent("a-input"),Y=e.resolveComponent("icon-plus"),G=e.resolveComponent("a-button"),q=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(q,{width:500,visible:n.show,footer:!1,onCancel:V,unmountOnClose:""},{title:e.withCtx(()=>{var O;return[e.createTextVNode(e.toDisplayString((O=n.data)==null?void 0:O.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",rQ,[e.createElementVNode("div",dQ,[k[7]||(k[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(S,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":k[0]||(k[0]=O=>n.data.onlyShowPc=O)},null,8,["modelValue"])]),k[19]||(k[19]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(N,{modelValue:n.data.data.width,"onUpdate:modelValue":k[1]||(k[1]=O=>n.data.data.width=O),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(D,{value:""},{default:e.withCtx(()=>[...k[8]||(k[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(D,{value:"small"},{default:e.withCtx(()=>[...k[9]||(k[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(D,{value:"middle"},{default:e.withCtx(()=>[...k[10]||(k[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(D,{value:"max"},{default:e.withCtx(()=>[...k[11]||(k[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),k[20]||(k[20]=e.createElementVNode("div",{class:"part_title",style:{"margin-top":"20px"}},"链接列表",-1)),n.data.data.list.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",cQ,"暂无数据")),e.createElementVNode("div",uQ,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data.list,"onUpdate:modelValue":k[4]||(k[4]=O=>n.data.data.list=O),"component-data":{tag:"div",type:"transition-group",name:s.value?null:"flip-list"}},a.value,{disabled:!1,onStart:k[5]||(k[5]=O=>s.value=!0),onEnd:k[6]||(k[6]=O=>s.value=!1),"item-key":"id"}),{item:e.withCtx(({element:O})=>[e.createElementVNode("div",mQ,[e.createElementVNode("div",pQ,[e.createElementVNode("div",{class:"drag-handle",onClick:H=>d(O)},[e.createVNode(A,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(O.title),1)],8,hQ),e.createElementVNode("div",null,[e.createVNode($,{class:"icon_drag"}),e.createVNode(I,{class:"btn-delete",onClick:e.withModifiers(H=>f(O.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[k[16]||(k[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(U,{modelValue:O.title,"onUpdate:modelValue":H=>O.title=H,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),k[17]||(k[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),O.links.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fQ,"暂无数据")),e.createVNode(e.unref(o),e.mergeProps({modelValue:O.links,"onUpdate:modelValue":H=>O.links=H,"component-data":{tag:"div",type:"transition-group",name:l.value?null:"flip-list"}},i.value,{disabled:!1,onStart:k[2]||(k[2]=H=>l.value=!0),onEnd:k[3]||(k[3]=H=>l.value=!1),"item-key":"id"}),{item:e.withCtx(({element:H})=>[e.createElementVNode("div",gQ,[e.createElementVNode("div",yQ,[e.createElementVNode("div",{class:"drag-handle",onClick:R=>C(H)},[e.createVNode(A,{style:{"margin-right":"10px"}}),k[12]||(k[12]=e.createTextVNode("链接 ",-1))],8,_Q),e.createElementVNode("div",null,[e.createVNode($,{class:"icon_drag"}),e.createVNode(I,{class:"btn-delete",onClick:e.withModifiers(R=>y(O.id,H.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[k[13]||(k[13]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 名称 ",-1)),e.createVNode(U,{modelValue:H.name,"onUpdate:modelValue":R=>H.name=R,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),k[14]||(k[14]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 链接地址 ",-1)),e.createVNode(U,{modelValue:H.link,"onUpdate:modelValue":R=>H.link=R,placeholder:"请输入链接地址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!w(H)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),e.createVNode(G,{style:{"margin-top":"20px"},size:"mini",type:"primary",onClick:H=>x(O.id)},{icon:e.withCtx(()=>[e.createVNode(Y)]),default:e.withCtx(()=>[k[15]||(k[15]=e.createTextVNode(" 链接 ",-1))]),_:1},8,["onClick"])],512),[[e.vShow,!p(O)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(G,{type:"primary",onClick:h,style:{"margin-top":"20px"}},{icon:e.withCtx(()=>[e.createVNode(Y)]),default:e.withCtx(()=>[k[18]||(k[18]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-d7dd61f5"]]),bQ=["innerHTML"],CQ={key:0,class:"grid-links__sublist"},VQ=["onClick"],xQ={key:1,class:"grid-links__subitem__link"},Sp=J(e.defineComponent({name:"GridLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=p=>{a("handleClick",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Te():!0}),l=()=>{var f;if(o.modelValue&&o.modelValue.data)return;const p={id:((f=o.modelValue)==null?void 0:f.id)||F(),type:"GridLinks",onlyShowPc:!1,data:{width:"default",bgColor:"white",list:[{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:""},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:F(),title:"这里是标题",links:[{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"},{id:F(),name:"这里是名称",link:"https://www.baidu.com"}]}]}};a("update:modelValue",p)},r=e.ref(!1),c=e.ref(!1),u=e.computed(()=>{var h,C;const p=(C=(h=o.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!p||p==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[p]||"container-content"}),g=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=p=>{a("handlePaste",p)};return l(),(p,f)=>{var h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gridLinks_wrap",onMouseenter:f[2]||(f[2]=w=>r.value=!0),onMouseleave:f[3]||(f[3]=w=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.createElementVNode("div",{class:"grid-links__row",style:e.normalizeStyle({"--grid-columns-mobile":p.mobileCol,"--grid-columns-desktop":p.desktopCol})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=(h=n.modelValue)==null?void 0:h.data)==null?void 0:C.list,(w,x)=>(e.openBlock(),e.createElementBlock("div",{class:"grid-links__item",key:`${w.title}-${x}`},[e.createElementVNode("h6",{class:"grid-links__item__title",innerHTML:w.title},null,8,bQ),w.links?(e.openBlock(),e.createElementBlock("ul",CQ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.links,(y,b)=>(e.openBlock(),e.createElementBlock("li",{key:`${y.name}-${b}`,class:"grid-links__subitem"},[y.link?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:V=>i(y.link),class:"link_text"},[e.createTextVNode(e.toDisplayString(y.name)+" ",1),f[5]||(f[5]=e.createElementVNode("span",{class:"link_text__underline"},null,-1))],8,VQ)):(e.openBlock(),e.createElementBlock("div",xQ,e.toDisplayString(y.name),1))]))),128))])):e.createCommentVNode("",!0)]))),128))],4)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:r.value,"onUpdate:show":f[0]||(f[0]=w=>r.value=w),onHandleEdit:f[1]||(f[1]=w=>c.value=!0),onHandleDelete:g,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(wQ,{key:1,show:c.value,"onUpdate:show":f[4]||(f[4]=w=>c.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),[["__scopeId","data-v-ed90ae1e"]]),kQ=Object.freeze(Object.defineProperty({__proto__:null,default:Sp},Symbol.toStringTag,{value:"Module"})),EQ={class:"setting-content"},TQ={class:"setting-header flex items-center"},NQ={class:"setting-header flex items-center"},SQ={class:"setting-body"},BQ={class:"setting-toolbar"},PQ={class:"tools"},DQ={class:"setting-item"},$Q={class:"item-header"},LQ={class:"btn-group"},AQ={key:0,class:"drag-handle"},IQ=J(e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_t)),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,c=t,u=()=>{c("update:show",!1)},g=d=>{r.data.data.push({key:F(),title:"[[TITLE]]",content:""})},m=d=>{r.data.data=r.data.data.filter(p=>p.key!==d)};return(d,p)=>{const f=e.resolveComponent("a-switch"),h=e.resolveComponent("a-option"),C=e.resolveComponent("a-select"),w=e.resolveComponent("icon-plus"),x=e.resolveComponent("a-button"),y=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),T=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(T,{width:"60%",visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",EQ,[e.createElementVNode("div",TQ,[p[7]||(p[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(f,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=k=>n.data.onlyShowPc=k)},null,8,["modelValue"])]),e.createElementVNode("div",NQ,[p[12]||(p[12]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(C,{modelValue:n.data.width,"onUpdate:modelValue":p[1]||(p[1]=k=>n.data.width=k),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(h,{value:""},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(h,{value:"small"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(h,{value:"middle"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(h,{value:"max"},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",SQ,[e.createElementVNode("div",BQ,[p[15]||(p[15]=e.createElementVNode("h4",null,"Topics",-1)),e.createElementVNode("div",PQ,[e.createVNode(x,{type:"primary",onClick:p[2]||(p[2]=k=>g())},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[p[13]||(p[13]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(x,{type:"primary",onClick:p[3]||(p[3]=k=>g())},{default:e.withCtx(()=>[...p[14]||(p[14]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",DQ,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":p[4]||(p[4]=k=>n.data.data=k),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:p[5]||(p[5]=k=>i.value=!0),onEnd:p[6]||(p[6]=k=>i.value=!1),"item-key":"key"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:k.key},[e.createElementVNode("div",$Q,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(k.title),1)]),e.createElementVNode("div",LQ,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",AQ,[e.createVNode(y,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:S=>m(k.key)},null,8,["onClick"])])]),p[16]||(p[16]=e.createElementVNode("p",{class:"item-title"},"title",-1)),e.createVNode(V,{modelValue:k.title,"onUpdate:modelValue":S=>k.title=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[17]||(p[17]=e.createElementVNode("p",{class:"item-title"},"Content",-1)),e.createVNode(e.unref(a),{modelValue:k.content,"onUpdate:modelValue":S=>k.content=S,name:`AccordionText_${k.key}`},null,8,["modelValue","onUpdate:modelValue","name"])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-a711b39a"]]),vQ=["id"],MQ=["id"],OQ=["onClick"],UQ={class:"accordion-button__title"},RQ=["id","aria-expanded","aria-labelledby"],FQ={class:"accordion-body"},HQ=["innerHTML"],jQ={class:"flex-center mt-10"},Dc=J({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,c=t,u=()=>{var U;if(r.modelValue&&r.modelValue.data){r.modelValue.openFirst&&r.modelValue.data.length>0&&p.value.size===0&&p.value.add(r.modelValue.data[0].key);return}const I={id:((U=r.modelValue)==null?void 0:U.id)||F(),type:"AccordionText",onlyShowPc:!1,openFirst:!1,width:"",style:{},data:[{key:F(),title:"tab1",content:"这是内容"}]};c("update:modelValue",I)},g=e.ref(Date.now()),m=e.ref(6),d=e.ref(6),p=e.ref(new Set),f=e.ref([]),h=e.ref(!1),C=e.ref(!1),w=e.computed(()=>{var I;return(I=r.modelValue)!=null&&I.hasOwnProperty("classes")?r.modelValue.classes:null}),x=e.computed(()=>{var I;return(I=r.modelValue)!=null&&I.hasOwnProperty("style")?r.modelValue.style:null});e.computed(()=>{var I;return(I=r.modelValue)!=null&&I.hasOwnProperty("width")?r.modelValue.width:null});const y=e.computed(()=>{var I;return((I=r.modelValue)==null?void 0:I.data)||[]}),b=e.computed(()=>y.value.slice(0,m.value)),V=I=>{var U;p.value.has(I)?p.value.delete(I):((U=r.modelValue)!=null&&U.allowMultiple||p.value.clear(),p.value.add(I)),setTimeout(()=>{k(document.getElementById(`accordion-${g.value}-${I}`))},350)},T=I=>p.value.has(I),k=I=>{if(a.value>=768)return;const Y=ri(I).y-150;window.scroll({top:Y,left:0,behavior:"smooth"})},S=()=>{a.value>=768?(m.value=6,d.value=6):(m.value=4,d.value=4)},D=(I,U)=>{debugger;c("handleDelete",I||r.modelValue.id,U)},N=I=>{debugger;c("handleCopy",I||r.modelValue)},A=(I,U)=>{debugger;c("handlePaste",I,U)},$=()=>{};return e.watch(y,(I,U)=>{var Y;S(),(Y=r.modelValue)!=null&&Y.openFirst&&I.length>0&&p.value.size===0&&p.value.add(I[0].key)},{deep:!0,immediate:!0}),e.watch(b,()=>{e.nextTick($)},{immediate:!1}),e.onMounted(()=>{var I;e.nextTick(S),(I=r.modelValue)!=null&&I.openFirst&&y.value.length>0&&p.value.size===0&&p.value.add(y.value[0].key)}),u(),(I,U)=>{var Y,G;return e.openBlock(),e.createElementBlock("div",{onMouseover:U[4]||(U[4]=q=>C.value=!0),onMouseout:U[5]||(U[5]=q=>C.value=!1),class:e.normalizeClass(["accordion-text",w.value]),id:`accordion-parent-${g.value}`,style:e.normalizeStyle(x.value)},[e.createElementVNode("div",{class:e.normalizeClass(["accordion-text__container",[(Y=n.modelValue)!=null&&Y.width?`container-content-${(G=n.modelValue)==null?void 0:G.width}`:"container-content"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(q,O)=>(e.openBlock(),e.createElementBlock("div",{key:q.key,class:"accordion-item",ref_for:!0,ref_key:"itemRefs",ref:f,"data-aos":"fade-in"},[e.createElementVNode("div",{class:"accordion-header",id:`accordion-${g.value}-${q.key}`},[e.createElementVNode("button",{class:e.normalizeClass(["accordion-button",{collapsed:!T(q.key)}]),type:"button",onClick:H=>V(q.key)},[e.createElementVNode("div",null,[e.createElementVNode("div",UQ,e.toDisplayString(q.title),1)]),U[6]||(U[6]=e.createElementVNode("span",{class:"accordion-button__icon"},null,-1))],10,OQ)],8,MQ),e.createElementVNode("div",{id:`accordion-${g.value}-collapse-${q.key}`,class:e.normalizeClass(["accordion-collapse collapse",{show:T(q.key)}]),"aria-expanded":T(q.key),"aria-labelledby":`accordion-${g.value}-${q.key}`,style:e.normalizeStyle({height:T(q.key)?"auto":"0",overflow:"hidden"})},[e.createElementVNode("div",FQ,[e.createElementVNode("div",{class:"accordion__content",innerHTML:q.content},null,8,HQ)])],14,RQ)]))),128)),e.withDirectives(e.createElementVNode("div",jQ,[e.createElementVNode("button",{type:"button",class:"btn btn__load-more",onClick:U[0]||(U[0]=q=>m.value+=d.value)},[...U[7]||(U[7]=[e.createElementVNode("span",{class:"i i-load-more"},null,-1)])])],512),[[e.vShow,m.value<y.value.length]]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke,{key:0,show:C.value,"onUpdate:show":U[1]||(U[1]=q=>C.value=q),onHandleEdit:U[2]||(U[2]=q=>h.value=!0),onHandleDelete:D,onHandleCopy:N,onHandlePaste:A,style:{top:"-10px"}},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(IQ,{key:0,show:h.value,"onUpdate:show":U[3]||(U[3]=q=>h.value=q),data:n.modelValue},null,8,["show","data"]))],46,vQ)}}},[["__scopeId","data-v-5293c86a"]]),zQ=Object.freeze(Object.defineProperty({__proto__:null,default:Dc},Symbol.toStringTag,{value:"Module"})),qQ={install:n=>{n.component("RibbonBlock",Br)}},WQ={install:n=>{n.component("TimelineStory",Pr)}},GQ={install:n=>{n.component("NewsList",Dr)}},XQ={install:n=>{n.component("TheHistoryCarousel",$r)}},YQ={install:n=>{n.component("CardShowcaseProfile",Lr)}},KQ={install:n=>{n.component("ArticleList",fs)}},QQ={install:n=>{n.component("BannerImage",Rl)}},ZQ={install:n=>{n.component("BannerPage",Fl)}},JQ={install:n=>{n.component("BtnList",gs)}},eZ={install:n=>{n.component("GalleryDefault",Hl)}},tZ={install:n=>{n.component("GalleryCaptionRound",jl)}},nZ={install:n=>{n.component("GalleryTimeline",hr)}},oZ={install:n=>{n.component("GalleryTimelineCol",fr)}},aZ={install:n=>{n.component("Process",gr)}},iZ={install:n=>{n.component("CustomSpace",yr)}},sZ={install:n=>{n.component("GalleryList",br)}},lZ={install:n=>{n.component("HeroSlide",Cr)}},rZ={install:n=>{n.component("LinkList",Vr)}},dZ={install:n=>{n.component("QuoteText",xr)}},cZ={install:n=>{n.component("DonorLinks",kr)}},uZ={install:n=>{n.component("CardCarousel",Er)}},mZ={install:n=>{n.component("CardCarouselMultiRow",Tr)}},pZ={install:n=>{n.component("BannerQuote",Nr)}},hZ={install:n=>{n.component("ArticleItem",Sr)}},fZ={install:n=>{n.component("CountDown",Ar)}},gZ={install:n=>{n.component("CustomIframe",Ir)}},yZ={install:n=>{n.component("BannerImageWithLink",Or)}},_Z={install:n=>{n.component("ContactUsList",vr)}},wZ={install:n=>{n.component("TableTwo",Mr)}},bZ={install:n=>{n.component("ScrollKeyInfo",Ur)}},CZ={install:n=>{n.component("ContactUsInfo",Rr)}},VZ={install:n=>{n.component("Publications",Fr)}},xZ={install:n=>{n.component("MapStatic",Hr)}},kZ={install:n=>{n.component("CardCarouselArticles",Qr)}},EZ={install:n=>{n.component("CarouselLogo",jr)}},TZ={install:n=>{n.component("Resources",zr)}},NZ={install:n=>{n.component("ResourcesTwo",qr)}},SZ={install:n=>{n.component("Disc",Wr)}},BZ={install:n=>{n.component("BasicCollapse",Gr)}},PZ={install:n=>{n.component("TableCollapse",Xr)}},DZ={install:n=>{n.component("MediaLogo",vs)}},$Z={install:n=>{n.component("RegisterForm",Yr)}},LZ={install:n=>{n.component("GalleryBlock",Kr)}},AZ={install:n=>{n.component("CardCarouselMultiRowArticles",Zr)}},IZ={install:n=>{n.component("AlummiCommunityList",od)}},vZ={install:n=>{n.component("BlessingMessage",ad)}},MZ={install:n=>{n.component("BlessingSlider",id)}},OZ={install:n=>{n.component("CardShowcase",sd)}},UZ={install:n=>{n.component("ExploreLinks",ld)}},RZ={install:n=>{n.component("SchoolLayout",dd)}},FZ={install:n=>{n.component("CardCarouselMultiRowPublications",cd)}},HZ={install:n=>{n.component("CustomText",Jr)}},jZ={install:n=>{n.component("MediaImageFull",ed)}},zZ={install:n=>{n.component("MediaImageStatic",td)}},qZ={install:n=>{n.component("ArticleListPureText",nd)}},WZ={install:n=>{n.component("TabDefault",ud)}},GZ={install:n=>{n.component("TabTimeLine",md)}},XZ={install:n=>{n.component("CardListProgramme",hd)}},YZ={install:n=>{n.component("CardListCircle",pd)}},KZ={install:n=>{n.component("CardListSchool",fd)}},QZ={install:n=>{n.component("MediaVideo",xc)}},ZZ={install:n=>{n.component("DetailLink",gd)}},JZ={install:n=>{n.component("InformationLink",kc)}},eJ={install:n=>{n.component("TabPage",Ec)}},tJ={install:n=>{n.component("AccordionText",Dc)}},nJ={install:n=>{n.component("TabLogo",Tc)}},oJ={install:n=>{n.component("BackgroundWrapper",Nc)}},aJ={install:n=>{n.component("CollapseCustom",Bc)}},iJ={install:n=>{n.component("VrTour",Pc)}},Bp={default:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"14px",fontFamily:"Inter, sans-serif",borderRadius:"6px",spacing:"16px"},dark:{primaryColor:"#60a5fa",secondaryColor:"#c084fc",fontSize:"14px",fontFamily:"Inter, sans-serif",borderRadius:"6px",spacing:"16px"},compact:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"12px",fontFamily:"Inter, sans-serif",borderRadius:"4px",spacing:"12px"},large:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"16px",fontFamily:"Inter, sans-serif",borderRadius:"8px",spacing:"20px"}},Bn=e.ref(Bp.default),Ao=e.ref(!1);function sJ(){const n=f=>{typeof f=="string"?Bn.value={...Bp[f]}:Bn.value={...f},a()},t=f=>{Bn.value={...Bn.value,...f},a()},o=()=>{Ao.value=!Ao.value,typeof document<"u"&&document.documentElement.classList.toggle("dark",Ao.value)},a=()=>{if(typeof document>"u")return;const f=document.documentElement,h=Bn.value;f.style.setProperty("--theme-primary",h.primaryColor),f.style.setProperty("--theme-secondary",h.secondaryColor),f.style.setProperty("--font-size-default",h.fontSize),f.style.setProperty("--radius-md",h.borderRadius),f.style.setProperty("--spacing-md",h.spacing)},i=f=>e.computed(()=>f==="primary"?Bn.value.primaryColor:Bn.value.secondaryColor),s=()=>e.computed(()=>Bn.value.fontSize),l=()=>e.computed(()=>Bn.value.fontFamily),r=()=>e.computed(()=>Bn.value.borderRadius),c=()=>e.computed(()=>Bn.value.spacing),u=()=>{n("default"),Ao.value=!1,typeof document<"u"&&document.documentElement.classList.remove("dark")},g=()=>JSON.stringify(Bn.value,null,2),m=f=>{try{const h=JSON.parse(f);return n(h),!0}catch(h){return console.error("Invalid theme configuration:",h),!1}},d=()=>{const f=typeof window<"u"&&typeof localStorage<"u",h=f?localStorage.getItem("officialblock-theme"):null,C=f?localStorage.getItem("officialblock-dark-mode"):null;if(h)try{const w=JSON.parse(h);n(w)}catch(w){console.error("Failed to restore theme:",w)}if(C&&(Ao.value=C==="true",typeof document<"u"&&document.documentElement.classList.toggle("dark",Ao.value)),typeof window<"u"&&typeof window.matchMedia=="function"){const w=window.matchMedia("(prefers-color-scheme: dark)"),x=y=>{(!f||!localStorage.getItem("officialblock-dark-mode"))&&(Ao.value=y.matches,typeof document<"u"&&document.documentElement.classList.toggle("dark",Ao.value))};w.addEventListener("change",x)}a()},p=()=>{typeof window<"u"&&typeof localStorage<"u"&&(localStorage.setItem("officialblock-theme",JSON.stringify(Bn.value)),localStorage.setItem("officialblock-dark-mode",Ao.value.toString()))};return{currentTheme:e.computed(()=>Bn.value),isDarkMode:e.computed(()=>Ao.value),themePresets:Bp,setTheme:n,updateTheme:t,toggleDarkMode:o,resetTheme:u,exportTheme:g,importTheme:m,initTheme:d,saveTheme:p,getThemeColor:i,getFontSize:s,getFontFamily:l,getBorderRadius:r,getSpacing:c}}class lJ{static hexToRgb(t){const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:null}static rgbToHex(t,o,a){return"#"+((1<<24)+(t<<16)+(o<<8)+a).toString(16).slice(1)}static adjustBrightness(t,o){const a=this.hexToRgb(t);if(!a)return t;const i=s=>{const l=Math.round(s*(1+o/100));return Math.max(0,Math.min(255,l))};return this.rgbToHex(i(a.r),i(a.g),i(a.b))}static generateColorScale(t){const o=[50,100,200,300,400,500,600,700,800,900,950],a={};return o.forEach((i,s)=>{let l;i<=500?l=80-s*16:l=-20-(s-5)*12,a[i.toString()]=this.adjustBrightness(t,l)}),a}static getContrastRatio(t,o){const a=c=>{const u=this.hexToRgb(c);if(!u)return 0;const g=m=>{const d=m/255;return d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)};return .2126*g(u.r)+.7152*g(u.g)+.0722*g(u.b)},i=a(t),s=a(o),l=Math.max(i,s),r=Math.min(i,s);return(l+.05)/(r+.05)}static isDarkColor(t){const o=this.hexToRgb(t);return o?(o.r*299+o.g*587+o.b*114)/1e3<128:!1}static getBestTextColor(t){return this.isDarkColor(t)?"#ffffff":"#000000"}static mixColors(t,o,a=.5){const i=this.hexToRgb(t),s=this.hexToRgb(o);if(!i||!s)return t;const l=(r,c)=>Math.round(r*(1-a)+c*a);return this.rgbToHex(l(i.r,s.r),l(i.g,s.g),l(i.b,s.b))}}class rJ{static getCurrentBreakpoint(){if(typeof window>"u")return"xl";const t=window.innerWidth;return t<475?"xs":t<640?"sm":t<768?"md":t<1024?"lg":t<1280?"xl":"2xl"}static isMobile(){return typeof window>"u"?!1:window.innerWidth<768}static isTablet(){if(typeof window>"u")return!1;const t=window.innerWidth;return t>=768&&t<1024}static isDesktop(){return typeof window>"u"?!0:window.innerWidth>=1024}static onBreakpointChange(t){if(typeof window>"u")return()=>{};let o=this.getCurrentBreakpoint();const a=()=>{const i=this.getCurrentBreakpoint();i!==o&&(o=i,t(i))};return window.addEventListener("resize",a),()=>{typeof window<"u"&&window.removeEventListener("resize",a)}}}class ly{static animate(t,o,a,i,s=this.easing.easeOutQuad){if(typeof window>"u"||typeof requestAnimationFrame>"u"||typeof performance>"u")return i(o),()=>{};const l=performance.now();let r;const c=u=>{const g=u-l,m=Math.min(g/a,1),d=s(m),p=t+(o-t)*d;i(p),m<1&&(r=requestAnimationFrame(c))};return r=requestAnimationFrame(c),()=>{r&&cancelAnimationFrame(r)}}static scrollTo(t,o,a=300,i=this.easing.easeOutQuad){return new Promise(s=>{if(typeof window>"u"){s();return}const l=t===window,r=l?window.pageYOffset:t.scrollTop;this.animate(r,o,a,c=>{l?window.scrollTo(0,c):t.scrollTop=c},i),setTimeout(s,a)})}}oa(ly,"easing",{linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:-1+(4-2*t)*t,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1});class dJ{static setItem(t,o){if(typeof window>"u"||typeof localStorage>"u")return!1;try{return localStorage.setItem(t,JSON.stringify(o)),!0}catch(a){return console.warn("Failed to save to localStorage:",a),!1}}static getItem(t,o){if(typeof window>"u"||typeof localStorage>"u")return o||null;try{const a=localStorage.getItem(t);return a?JSON.parse(a):o||null}catch(a){return console.warn("Failed to read from localStorage:",a),o||null}}static removeItem(t){if(typeof window>"u"||typeof localStorage>"u")return!1;try{return localStorage.removeItem(t),!0}catch(o){return console.warn("Failed to remove from localStorage:",o),!1}}static cleanExpired(){if(typeof window>"u"||typeof localStorage>"u")return;const t=Date.now(),o=[];for(let a=0;a<localStorage.length;a++){const i=localStorage.key(a);if(i&&i.startsWith("officialblock-"))try{const s=JSON.parse(localStorage.getItem(i)||"{}");s.expires&&s.expires<t&&o.push(i)}catch{}}o.forEach(a=>localStorage.removeItem(a))}}if(typeof globalThis<"u"&&!globalThis.FormData){class n{constructor(){oa(this,"data",new Map)}append(o,a,i){this.data.set(o,{value:a,filename:i})}get(o){const a=this.data.get(o);return a?a.value:null}has(o){return this.data.has(o)}delete(o){this.data.delete(o)}entries(){return this.data.entries()}keys(){return this.data.keys()}values(){return this.data.values()}[Symbol.iterator](){return this.data.entries()}}globalThis.FormData=n}const cJ={install:n=>{n.use(Kp),n.config.globalProperties.$device={get isMobile(){return typeof window<"u"?window.innerWidth<768:!1},get isTablet(){return typeof window<"u"?window.innerWidth>=768&&window.innerWidth<1024:!1},get isMobileOrTablet(){return typeof window<"u"?window.innerWidth<1024:!1},get isDesktop(){return typeof window<"u"?window.innerWidth>=1024:!0}},n.component("ArticleList",fs),n.component("BannerImage",Rl),n.component("BannerPage",Fl),n.component("BtnList",gs),n.component("GalleryDefault",Hl),n.component("GalleryCaptionRound",jl),n.component("GalleryTimeline",hr),n.component("GalleryTimelineCol",fr),n.component("Process",gr),n.component("CustomSpace",yr),n.component("GalleryList",br),n.component("HeroSlide",Cr),n.component("LinkList",Vr),n.component("QuoteText",xr),n.component("DonorLinks",kr),n.component("CardCarousel",Er),n.component("CardCarouselMultiRow",Tr),n.component("BannerQuote",Nr),n.component("ArticleItem",Sr),n.component("RibbonBlock",Br),n.component("TimelineStory",Pr),n.component("NewsList",Dr),n.component("TheHistoryCarousel",$r),n.component("CardShowcaseProfile",Lr),n.component("CountDown",Ar),n.component("ContactUsList",vr),n.component("CustomIframe",Ir),n.component("TableTwo",Mr),n.component("ScrollKeyInfo",Ur),n.component("BannerImageWithLink",Or),n.component("ContactUsInfo",Rr),n.component("Publications",Fr),n.component("MapStatic",Hr),n.component("CardCarouselArticles",Qr),n.component("CarouselLogo",jr),n.component("Resources",zr),n.component("ResourcesTwo",qr),n.component("Disc",Wr),n.component("BasicCollapse",Gr),n.component("TableCollapse",Xr),n.component("MediaLogo",vs),n.component("RegisterForm",Yr),n.component("GalleryBlock",Kr),n.component("CardCarouselMultiRowArticles",Zr),n.component("AlummiCommunityList",od),n.component("BlessingMessage",ad),n.component("BlessingSlider",id),n.component("CardShowcase",sd),n.component("ExploreLinks",ld),n.component("SchoolLayout",dd),n.component("CardCarouselMultiRowPublications",cd),n.component("CustomText",Jr),n.component("MediaImageFull",ed),n.component("MediaImageStatic",td),n.component("ArticleListPureText",nd),n.component("TabDefault",ud),n.component("CardListProgramme",hd),n.component("CardListCircle",pd),n.component("CardListSchool",fd),n.component("MediaVideo",xc),n.component("DetailLink",gd),n.component("InformationLink",kc),n.component("TabTimeLine",md),n.component("TabPage",Ec),n.component("TabLogo",Tc),n.component("BackgroundWrapper",Nc),n.component("CollapseCustom",Bc),n.component("VrTour",Pc),n.component("AccordionText",Dc),n.component("GridLinks",Sp)}},uJ={class:"rich-text-editor"},_t=Object.freeze(Object.defineProperty({__proto__:null,default:J(e.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"请输入内容..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.shallowRef(),l=e.ref(""),r=e.computed(()=>typeof a.height=="number"?`${a.height}px`:a.height),c=e.inject("handleUpload",()=>{}),u=e.inject("fileUrl",null),g=e.inject("chooseName",null),m=e.ref(""),d=e.ref(null),p=N=>{if(!c){console.warn("Upload: handleUpload function not provided by ancestor");return}if(m.value=N,s.value)try{const $=s.value.selection;$&&(d.value={anchor:{path:[...$.anchor.path],offset:$.anchor.offset},focus:{path:[...$.focus.path],offset:$.focus.offset}})}catch($){console.warn("保存光标位置失败:",$)}const A=a.name+"_"+N;c(!0,A)};e.watch(()=>a.name,()=>{u.value=null},{deep:!0,immediate:!0}),e.watch(()=>[u==null?void 0:u.value],([N])=>{const A=a.name+"_"+m.value;!N||!g.value||g.value!==A||s.value&&e.nextTick(()=>{var $,I;if(s.value){try{if(s.value.focus(),d.value)try{s.value.select(d.value)}catch(U){console.warn("恢复光标位置失败,使用默认位置:",U)}}catch(U){console.warn("聚焦编辑器失败:",U)}if(m.value==="img"){const Y=`<img src="${N}" alt="图片" style="max-width: 100%;">`;($=s.value)==null||$.dangerouslyInsertHtml(Y)}else{const Y=`<video src="${N}" controls style="max-width: 100%;"></video>`;(I=s.value)==null||I.dangerouslyInsertHtml(Y)}d.value=null,m.value=""}})},{immediate:!1});function f(N){return class{constructor(){oa(this,"title");oa(this,"tag");oa(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){e.nextTick(()=>{console.log("点击了自定义上传图片菜单"),N("img")})}}}function h(N){return class{constructor(){oa(this,"title");oa(this,"tag");oa(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){e.nextTick(()=>{console.log("点击了自定义上传视频菜单"),N("video")})}}}const C={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},w={placeholder:a.placeholder,readOnly:a.disabled,maxLength:a.maxLength,MENU_CONF:{},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},x=Math.random().toString(36).substring(2,9),y=`CustomImageMenu_${x}`,b=`CustomVideoMenu_${x}`,V=N=>{s.value=N;try{const A=f(p),$=h(p),I={key:y,factory(){return new A}},U={key:b,factory(){return new $}};qp.Boot.registerMenu(I),qp.Boot.registerMenu(U)}catch(A){console.warn("菜单注册失败:",A)}C.insertKeys={index:0,keys:[y,b]},i("created",N)};e.onBeforeUnmount(()=>{const N=s.value;N!=null&&N.destroy()}),e.watch(()=>a.modelValue,N=>{N!==l.value&&(l.value=N||"")},{immediate:!0});const T=N=>{i("update:modelValue",l.value),i("change",N)},k=()=>{s.value=void 0},S=N=>{i("focus",N)},D=N=>{i("blur",N)};return t({editor:s,getHtml:()=>l.value,getText:()=>{var N;return((N=s.value)==null?void 0:N.getText())||""},isEmpty:()=>{var N;return((N=s.value)==null?void 0:N.isEmpty())||!0},clear:()=>{var N;return(N=s.value)==null?void 0:N.clear()},focus:()=>{var N;return(N=s.value)==null?void 0:N.focus()},blur:()=>{var N;return(N=s.value)==null?void 0:N.blur()},disable:()=>{var N;return(N=s.value)==null?void 0:N.disable()},enable:()=>{var N;return(N=s.value)==null?void 0:N.enable()}}),(N,A)=>(e.openBlock(),e.createElementBlock("div",uJ,[e.createVNode(e.unref(zp.Toolbar),{class:"editor-toolbar",editor:s.value,defaultConfig:C,mode:n.mode},null,8,["editor","mode"]),e.createVNode(e.unref(zp.Editor),{class:"editor-content",style:e.normalizeStyle({height:r.value}),modelValue:l.value,"onUpdate:modelValue":A[0]||(A[0]=$=>l.value=$),defaultConfig:w,mode:n.mode,onOnCreated:V,onOnChange:T,onOnDestroyed:k,onOnFocus:S,onOnBlur:D},null,8,["style","modelValue","mode"])]))}}),[["__scopeId","data-v-55807020"]])},Symbol.toStringTag,{value:"Module"}));ne.AccordionText=Dc,ne.AccordionTextPlugin=tJ,ne.AlummiCommunityList=od,ne.AlummiCommunityListPlugin=IZ,ne.AnimationUtils=ly,ne.ArticleItem=Sr,ne.ArticleItemPlugin=hZ,ne.ArticleList=fs,ne.ArticleListPlugin=KQ,ne.ArticleListPureText=nd,ne.ArticleListPureTextPlugin=qZ,ne.BackgroundWrapper=Nc,ne.BackgroundWrapperPlugin=oJ,ne.BannerImage=Rl,ne.BannerImagePlugin=QQ,ne.BannerImageWithLink=Or,ne.BannerImageWithLinkPlugin=yZ,ne.BannerPage=Fl,ne.BannerPagePlugin=ZQ,ne.BannerQuote=Nr,ne.BannerQuotePlugin=pZ,ne.BasicCollapse=Gr,ne.BasicCollapsePlugin=BZ,ne.BlessingMessage=ad,ne.BlessingMessagePlugin=vZ,ne.BlessingSlider=id,ne.BlessingSliderPlugin=MZ,ne.BtnList=gs,ne.BtnListPlugin=JQ,ne.CardCarousel=Er,ne.CardCarouselArticles=Qr,ne.CardCarouselArticlesPlugin=kZ,ne.CardCarouselMultiRow=Tr,ne.CardCarouselMultiRowArticles=Zr,ne.CardCarouselMultiRowArticlesPlugin=AZ,ne.CardCarouselMultiRowPlugin=mZ,ne.CardCarouselMultiRowPublications=cd,ne.CardCarouselMultiRowPublicationsPlugin=FZ,ne.CardCarouselPlugin=uZ,ne.CardListCircle=pd,ne.CardListCirclePlugin=YZ,ne.CardListProgramme=hd,ne.CardListProgrammePlugin=XZ,ne.CardListSchool=fd,ne.CardListSchoolPlugin=KZ,ne.CardShowcase=sd,ne.CardShowcasePlugin=OZ,ne.CardShowcaseProfile=Lr,ne.CardShowcaseProfilePlugin=YQ,ne.CarouselLogo=jr,ne.CarouselLogoPlugin=EZ,ne.CollapseCustom=Bc,ne.CollapseCustomPlugin=aJ,ne.ContactUsInfo=Rr,ne.ContactUsInfoPlugin=CZ,ne.ContactUsList=vr,ne.ContactUsListPlugin=_Z,ne.CountDown=Ar,ne.CountDownPlugin=fZ,ne.CustomIframe=Ir,ne.CustomIframePlugin=gZ,ne.CustomSpace=yr,ne.CustomSpacePlugin=iZ,ne.CustomText=Jr,ne.CustomTextPlugin=HZ,ne.DetailLink=gd,ne.DetailLinkPlugin=ZZ,ne.Disc=Wr,ne.DiscPlugin=SZ,ne.DonorLinks=kr,ne.DonorLinksPlugin=cZ,ne.ExploreLinks=ld,ne.ExploreLinksPlugin=UZ,ne.GalleryBlock=Kr,ne.GalleryBlockPlugin=LZ,ne.GalleryCaptionRound=jl,ne.GalleryCaptionRoundPlugin=tZ,ne.GalleryDefault=Hl,ne.GalleryDefaultPlugin=eZ,ne.GalleryList=br,ne.GalleryListPlugin=sZ,ne.GalleryTimeline=hr,ne.GalleryTimelineCol=fr,ne.GalleryTimelineColPlugin=oZ,ne.GalleryTimelinePlugin=nZ,ne.GridLinks=Sp,ne.HeroSlide=Cr,ne.HeroSlidePlugin=lZ,ne.InformationLink=kc,ne.InformationLinkPlugin=JZ,ne.LinkList=Vr,ne.LinkListPlugin=rZ,ne.MapStatic=Hr,ne.MapStaticPlugin=xZ,ne.MediaImageFull=ed,ne.MediaImageFullPlugin=jZ,ne.MediaImageStatic=td,ne.MediaImageStaticPlugin=zZ,ne.MediaLogo=vs,ne.MediaLogoPlugin=DZ,ne.MediaVideo=xc,ne.MediaVideoPlugin=QZ,ne.NewsList=Dr,ne.NewsListPlugin=GQ,ne.Process=gr,ne.ProcessPlugin=aZ,ne.Publications=Fr,ne.PublicationsPlugin=VZ,ne.QuoteText=xr,ne.QuoteTextPlugin=dZ,ne.RegisterForm=Yr,ne.RegisterFormPlugin=$Z,ne.Resources=zr,ne.ResourcesPlugin=TZ,ne.ResourcesTwo=qr,ne.ResourcesTwoPlugin=NZ,ne.ResponsiveUtils=rJ,ne.RibbonBlock=Br,ne.RibbonBlockPlugin=qQ,ne.SchoolLayout=dd,ne.SchoolLayoutPlugin=RZ,ne.ScrollKeyInfo=Ur,ne.ScrollKeyInfoPlugin=bZ,ne.StorageUtils=dJ,ne.TabDefault=ud,ne.TabDefaultPlugin=WZ,ne.TabLogo=Tc,ne.TabLogoPlugin=nJ,ne.TabPage=Ec,ne.TabPagePlugin=eJ,ne.TabTimeLine=md,ne.TabTimeLinePlugin=GZ,ne.TableCollapse=Xr,ne.TableCollapsePlugin=PZ,ne.TableTwo=Mr,ne.TableTwoPlugin=wZ,ne.TheHistoryCarousel=$r,ne.TheHistoryCarouselPlugin=XQ,ne.ThemeUtils=lJ,ne.TimelineStory=Pr,ne.TimelineStoryPlugin=WQ,ne.VrTour=Pc,ne.VrTourPlugin=iJ,ne.VueScreenPlugin=Kp,ne.default=cJ,ne.useTheme=sJ,ne.useVueScreen=Xy,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});