mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-04 04:08:13 +00:00
9 lines
68 KiB
JavaScript
9 lines
68 KiB
JavaScript
import{_ as e}from"./u-icon.f5369555.js";import{d as t,u as o,r,c as n,an as a,p as i,q as l,h as s,i as d,w as u,M as c,O as p,N as h,F as m,n as g,l as f,x as v,j as b,m as y,D as x,E as w,R as _,t as S,H as D,K as E,a1 as R,aG as C,aH as k,S as T,U as I,aI as N,am as O,aJ as W,aq as A,J as M,X as H,aK as P,aL as B,aM as j}from"./index-15eacd31.js";import{_ as z,a as F}from"./tabbar.e67e4875.js";import{c as X}from"./article.0307362e.js";import{_ as Y}from"./_plugin-vue_export-helper.1b428a4d.js";import{_ as G}from"./app-link.vue_vue_type_script_setup_true_lang.18597de0.js";import{_ as U}from"./u-avatar.ddef1faa.js";const L=Y(t({__name:"index",props:["component","index","pullDownRefresh"],setup(t){const E=t,R=o(),C=r([]),k=n((()=>"decorate"==R.mode?R.value[E.index]:E.component)),T=n((()=>{var e="";return k.value.componentBgColor&&(e+="background-color:"+k.value.componentBgColor+";"),k.value.topRounded&&(e+="border-top-left-radius:"+2*k.value.topRounded+"rpx;"),k.value.topRounded&&(e+="border-top-right-radius:"+2*k.value.topRounded+"rpx;"),k.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*k.value.bottomRounded+"rpx;"),k.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*k.value.bottomRounded+"rpx;"),e})),I=n((()=>{var e="";return k.value.elementBgColor&&(e+="background-color:"+k.value.elementBgColor+";"),k.value.topElementRounded&&(e+="border-top-left-radius:"+2*k.value.topElementRounded+"rpx;"),k.value.topElementRounded&&(e+="border-top-right-radius:"+2*k.value.topElementRounded+"rpx;"),k.value.bottomElementRounded&&(e+="border-bottom-left-radius:"+2*k.value.bottomElementRounded+"rpx;"),k.value.bottomElementRounded&&(e+="border-bottom-right-radius:"+2*k.value.bottomElementRounded+"rpx;"),e}));a((()=>E.pullDownRefresh),((e,t)=>{}));(()=>{if("decorate"==R.mode){let e={image:"",summary:"文章摘要",title:"文章标题",create_time:"2023-03-28 09:00:00"};C.value.push(e),C.value.push(e)}else(()=>{let e={};"diy"==k.value.sources?e.ids=k.value.articleIds:e.limit=k.value.count,X(e).then((e=>{C.value=e.data}))})()})();return(t,o)=>{const r=i(l("u-icon"),e),n=i(l("u--image"),z),a=S,E=D;return s(),d(a,{style:g(f(T))},{default:u((()=>[(s(!0),c(p,null,h(C.value,((e,t)=>(s(),d(a,{key:e.id,class:m(["item flex align-center p-[20rpx]",{"border-solid border-t-0 border-l-0 border-r-0 border-b border-gray-200 mb-[20rpx]":C.value.length-1!==t}]),onClick:t=>{return o=e.id,void _({url:"/pages/article/detail",param:{id:o}});var o},style:g(f(I))},{default:u((()=>[e.image?(s(),d(n,{key:0,width:"260rpx",height:"200rpx",src:f(v)(e.image),model:"aspectFill"},{error:u((()=>[b(r,{name:"photo",color:"#999",size:"50"})])),_:2},1032,["src"])):y("",!0),b(a,{class:"flex-1 flex flex-col justify-between ml-[20rpx]"},{default:u((()=>[b(a,{class:"text-[32rpx] leading-[1.3] multi-hidden mt-[4rpx]"},{default:u((()=>[x(w(e.title),1)])),_:2},1024),b(a,{class:"text-[28rpx] using-hidden mb-[auto] mt-[20rpx] text-gray-500"},{default:u((()=>[x(w(e.summary),1)])),_:2},1024),b(a,{class:"text-[24rpx] text-gray-400 flex justify-between mt-[10rpx]"},{default:u((()=>[b(E,null,{default:u((()=>[x(w(e.create_time),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["class","onClick","style"])))),128))])),_:1},8,["style"])}}}),[["__scopeId","data-v-e40f9828"]]),q=Y(t({__name:"index",props:["component","index","pullDownRefresh"],setup(t){const _=t,I=o(),N=n((()=>"decorate"==I.mode?I.value[_.index]:_.component)),O=n((()=>{var e="";return N.value.componentBgColor&&(e+="background-color:"+N.value.componentBgColor+";"),N.value.topRounded&&(e+="border-top-left-radius:"+2*N.value.topRounded+"rpx;"),N.value.topRounded&&(e+="border-top-right-radius:"+2*N.value.topRounded+"rpx;"),N.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*N.value.bottomRounded+"rpx;"),N.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*N.value.bottomRounded+"rpx;"),e}));a((()=>_.pullDownRefresh),((e,t)=>{}));const W=r(0),A=e=>{W.value=e.detail.current},M=(e,t)=>{let o=N.value.pageCount*N.value.rowCount,r=!0;return r=e>=[(t-1)*o]&&e<[t*o],r},H=r("");E((()=>{P(),"decorate"==I.mode&&a((()=>N.value),((e,t)=>{e&&"GraphicNav"==e.componentName&&P()}))}));const P=()=>{var e;"decorate"==I.mode&&N.value.list.forEach(((e,t)=>{""==e.imageUrl&&(e.imageUrl="static/resource/images/diy/figure.png")})),e=0,"graphic"==N.value.mode?e=(49+N.value.imageSize)*N.value.pageCount:"img"==N.value.mode?e=(22+N.value.imageSize)*N.value.pageCount:"text"==N.value.mode&&(e=43*N.value.pageCount),H.value=2*e+"rpx"};return(t,o)=>{const r=R,n=D,a=S,_=i(l("u-icon"),e),E=i(l("app-link"),G),I=C,W=k,P=T;return s(),d(a,{style:g(f(O))},{default:u((()=>[f(N).navTitle?(s(),c("div",{key:0,class:"py-[30rpx] px-[32rpx] text-[30rpx]",style:g({fontWeight:f(N).font.weight,color:f(N).font.color})},w(f(N).navTitle),5)):y("",!0),"vertical"==f(N).layout?(s(),d(a,{key:1,class:"graphic-nav"},{default:u((()=>[(s(!0),c(p,null,h(f(N).list,((e,t)=>(s(),d(a,{class:"graphic-nav-item",key:e.id},{default:u((()=>[b(E,{data:e.link,class:m(["flex items-center justify-between py-[30rpx] px-[32rpx]",[0==t?"border-t-0":"border-t"]])},{default:u((()=>["text"!=f(N).mode?(s(),d(a,{key:0,class:"graphic-img relative flex items-center w-10 h-10 mr-[20rpx]",style:g({width:2*f(N).imageSize+"rpx",height:2*f(N).imageSize+"rpx"})},{default:u((()=>[b(r,{src:f(v)(e.imageUrl),mode:"aspectFill",style:g({maxWidth:2*f(N).imageSize+"rpx",maxHeight:2*f(N).imageSize+"rpx",borderRadius:2*f(N).aroundRadius+"rpx"})},null,8,["src","style"]),e.label.control?(s(),d(n,{key:0,class:"tag absolute -top-[10rpx] -right-[24rpx] text-white rounded-[24rpx] rounded-bl-none transform scale-80 py-1 px-2 text-xs",style:g({color:e.label.textColor,backgroundImage:"linear-gradient("+e.label.bgColorStart+","+e.label.bgColorEnd+")"})},{default:u((()=>[x(w(e.label.text),1)])),_:2},1032,["style"])):y("",!0)])),_:2},1032,["style"])):y("",!0),"img"!=f(N).mode?(s(),d(n,{key:1,class:"graphic-text w-full truncate leading-normal",style:g({fontSize:2*f(N).font.size+"rpx",fontWeight:f(N).font.weight,color:f(N).font.color})},{default:u((()=>[x(w(e.title),1)])),_:2},1032,["style"])):y("",!0),b(_,{name:"arrow-right",color:"#CACACA"})])),_:2},1032,["data","class"])])),_:2},1024)))),128))])),_:1})):"horizontal"==f(N).layout&&"pageSlide"==f(N).showStyle?(s(),d(W,{key:2,class:"graphic-nav p-2 box-border relative",circular:"","indicator-dots":!1,style:g({height:H.value}),onChange:A},{default:u((()=>[(s(!0),c(p,null,h(Math.ceil(f(N).list.length/(f(N).pageCount*f(N).rowCount)),((e,t)=>(s(),d(I,{class:"graphic-nav-wrap flex flex-wrap"},{default:u((()=>[(s(!0),c(p,null,h(f(N).list,((t,o)=>(s(),c(p,null,[M(o,e)?(s(),d(a,{class:m(["graphic-nav-item",[f(N).mode]]),key:t.id,style:g({width:100/f(N).rowCount+"%"})},{default:u((()=>[b(E,{data:t.link,class:"flex flex-col items-center box-border py-2"},{default:u((()=>["text"!=f(N).mode?(s(),d(a,{key:0,class:"graphic-img relative flex items-center justify-center w-10 h-10",style:g({width:2*f(N).imageSize+"rpx",height:2*f(N).imageSize+"rpx"})},{default:u((()=>[b(r,{src:f(v)(t.imageUrl),mode:"aspectFill",style:g({maxWidth:2*f(N).imageSize+"rpx",maxHeight:2*f(N).imageSize+"rpx",borderRadius:2*f(N).aroundRadius+"rpx"})},null,8,["src","style"]),t.label.control?(s(),d(n,{key:0,class:"tag absolute -top-[10rpx] -right-[24rpx] text-white rounded-[24rpx] rounded-bl-none transform scale-80 py-1 px-2 text-xs",style:g({color:t.label.textColor,backgroundImage:"linear-gradient("+t.label.bgColorStart+","+t.label.bgColorEnd+")"})},{default:u((()=>[x(w(t.label.text),1)])),_:2},1032,["style"])):y("",!0)])),_:2},1032,["style"])):y("",!0),"img"!=f(N).mode?(s(),d(n,{key:1,class:m(["graphic-text w-full text-center truncate leading-normal",{"pt-1.5":"text"!=f(N).mode}]),style:g({fontSize:2*f(N).font.size+"rpx",fontWeight:f(N).font.weight,color:f(N).font.color})},{default:u((()=>[x(w(t.title),1)])),_:2},1032,["class","style"])):y("",!0)])),_:2},1032,["data"])])),_:2},1032,["class","style"])):y("",!0)],64)))),256))])),_:2},1024)))),256))])),_:1},8,["style"])):(s(),d(P,{key:3,"scroll-x":"singleSlide"==f(N).showStyle,class:m(["graphic-nav","graphic-nav-"+f(N).showStyle])},{default:u((()=>[(s(!0),c(p,null,h(f(N).list,((e,t)=>(s(),d(a,{class:m(["graphic-nav-item",{"flex-shrink-0":"singleSlide"==f(N).showStyle}]),key:e.id,style:g({width:100/f(N).rowCount+"%"})},{default:u((()=>[b(E,{data:e.link,class:"flex flex-col items-center box-border py-2"},{default:u((()=>["text"!=f(N).mode?(s(),d(a,{key:0,class:"graphic-img relative flex items-center justify-center w-10 h-10",style:g({width:2*f(N).imageSize+"rpx",height:2*f(N).imageSize+"rpx"})},{default:u((()=>[b(r,{src:f(v)(e.imageUrl),mode:"aspectFill",style:g({maxWidth:2*f(N).imageSize+"rpx",maxHeight:2*f(N).imageSize+"rpx",borderRadius:2*f(N).aroundRadius+"rpx"})},null,8,["src","style"]),e.label.control?(s(),d(n,{key:0,class:m(["tag absolute -top-[10rpx] -right-[24rpx] text-white rounded-[24rpx] rounded-bl-none transform scale-80 py-1 px-2 text-xs"]),style:g({color:e.label.textColor,backgroundImage:"linear-gradient("+e.label.bgColorStart+","+e.label.bgColorEnd+")"})},{default:u((()=>[x(w(e.label.text),1)])),_:2},1032,["style"])):y("",!0)])),_:2},1032,["style"])):y("",!0),"img"!=f(N).mode?(s(),d(n,{key:1,class:m(["graphic-text w-full text-center truncate leading-normal",{"pt-1.5":"text"!=f(N).mode}]),style:g({fontSize:2*f(N).font.size+"rpx",fontWeight:f(N).font.weight,color:f(N).font.color})},{default:u((()=>[x(w(e.title),1)])),_:2},1032,["class","style"])):y("",!0)])),_:2},1032,["data"])])),_:2},1032,["class","style"])))),128))])),_:1},8,["scroll-x","class"]))])),_:1},8,["style"])}}}),[["__scopeId","data-v-b36514a1"]]),$=t({__name:"index",props:["component","index","pullDownRefresh"],setup(e){const t=e,r=o(),i=n((()=>"decorate"==r.mode?r.value[t.index]:t.component)),l=n((()=>{var e="";return e+="height:"+2*i.value.height+"rpx;",i.value.componentBgColor&&(e+="background-color:"+i.value.componentBgColor+";"),e}));return a((()=>t.pullDownRefresh),((e,t)=>{})),(e,t)=>{const o=S;return s(),d(o,{style:g(f(l))},null,8,["style"])}}}),V=t({__name:"index",props:["component","index","pullDownRefresh"],setup(e){const t=e,m=o(),y=n((()=>"decorate"==m.mode?m.value[t.index]:t.component)),x=n((()=>{var e="";return y.value.componentBgColor&&(e+="background-color:"+y.value.componentBgColor+";"),e})),w=n((()=>{var e="";return y.value.topRounded&&(e+="border-top-left-radius:"+2*y.value.topRounded+"rpx;"),y.value.topRounded&&(e+="border-top-right-radius:"+2*y.value.topRounded+"rpx;"),y.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*y.value.bottomRounded+"rpx;"),y.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*y.value.bottomRounded+"rpx;"),e}));a((()=>t.pullDownRefresh),((e,t)=>{}));const _=n((()=>2*y.value.imageHeight+"rpx")),D=r(0),T=e=>{D.value=e.detail.current};E((()=>{I(),"decorate"==m.mode&&a((()=>y.value),((e,t)=>{e&&"ImageAds"==e.componentName&&I()}))}));const I=()=>{"decorate"==m.mode&&y.value.list.forEach(((e,t)=>{""==e.imageUrl&&(e.imageUrl="static/resource/images/diy/figure.png",e.imgWidth=690,e.imgHeight=330)}))};return(e,t)=>{const o=R,r=i(l("app-link"),G),n=S,a=C,m=k;return s(),d(n,{class:"image-ads",style:g(f(x))},{default:u((()=>[1==f(y).list.length?(s(),d(n,{key:0,class:"leading-0 overflow-hidden",style:g(f(w))},{default:u((()=>[b(r,{data:f(y).list[0].link},{default:u((()=>[b(o,{src:f(v)(f(y).list[0].imageUrl),style:g({height:f(_)}),mode:"heightFix",class:"w-full","show-menu-by-longpress":!0},null,8,["src","style"])])),_:1},8,["data"])])),_:1},8,["style"])):(s(),d(m,{key:1,class:"swiper",style:g({height:f(_)}),autoplay:"true",circular:"true",onChange:T},{default:u((()=>[(s(!0),c(p,null,h(f(y).list,(e=>(s(),d(a,{class:"swiper-item",key:e.id,style:g(f(w))},{default:u((()=>[b(r,{data:e.link},{default:u((()=>[b(n,{class:"item",style:g({height:f(_)})},{default:u((()=>[b(o,{src:f(v)(e.imageUrl),mode:"scaleToFill",class:"w-full h-full","show-menu-by-longpress":!0},null,8,["src"])])),_:2},1032,["style"])])),_:2},1032,["data"])])),_:2},1032,["style"])))),128))])),_:1},8,["style"]))])),_:1},8,["style"])}}}),K=Y(t({__name:"index",props:["component","index","pullDownRefresh"],setup(e){const t=e,c=o(),p=n((()=>"decorate"==c.mode?c.value[t.index]:t.component)),h=n((()=>{var e="";return p.value.componentBgColor&&(e+="background-color:"+p.value.componentBgColor+";"),p.value.bgUrl&&(e+="background-image:url("+v(p.value.bgUrl)+");",e+="background-size: 100%;",e+="background-repeat: no-repeat;"),p.value.topRounded&&(e+="border-top-left-radius:"+2*p.value.topRounded+"rpx;"),p.value.topRounded&&(e+="border-top-right-radius:"+2*p.value.topRounded+"rpx;"),p.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*p.value.bottomRounded+"rpx;"),p.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*p.value.bottomRounded+"rpx;"),e}));a((()=>t.pullDownRefresh),((e,t)=>{}));const m=I(),{query:y}=N(location.href);y.code&&O()&&W({code:y.code}).then((e=>{m.getMemberInfo()}));const E=n((()=>"decorate"==c.mode?{headimg:"",nickname:"昵称",balance:0,point:0,money:0,member_no:"NIU0000021"}:m.info)),R=n((()=>{if(E.value){let e=parseFloat(E.value.balance)+parseFloat(E.value.money);return A(e.toString())}return 0})),C=()=>{H().setLoginBack({url:"/pages/member/index"})};r(!1);const k=()=>{O()?H().getAuthCode("snsapi_userinfo"):_({url:"/pages/member/personal"})};return(e,t)=>{const o=i(l("u-avatar"),U),r=S,n=D,a=i(l("app-link"),G);return s(),d(r,{style:g(f(h))},{default:u((()=>[b(r,{class:"pt-[34rpx] member-info"},{default:u((()=>[f(E)?(s(),d(r,{key:0,class:"flex ml-[32rpx] mr-[52rpx] items-center relative"},{default:u((()=>[b(o,{src:f(v)(f(E).headimg),size:"55",leftIcon:"none",onClick:k},null,8,["src"]),b(r,{class:"ml-[22rpx]"},{default:u((()=>[b(r,{class:"text-[#222222] truncate w-[430rpx] font-bold text-lg",style:g({color:f(p).textColor})},{default:u((()=>[x(w(f(E).nickname),1)])),_:1},8,["style"]),b(r,{class:"text-[#696B70] text-[24rpx] mt-[10rpx]",style:g({color:f(p).textColor})},{default:u((()=>[x(" UID:"+w(f(E).member_no),1)])),_:1},8,["style"])])),_:1}),b(r,{class:"set-icon flex items-center absolute right-0 top-2"},{default:u((()=>[b(a,{url:"/pages/setting/index"},{default:u((()=>[b(n,{class:"iconfont iconshezhi text-[1.6rem] ml-[10rpx]",style:g({color:f(p).textColor})},null,8,["style"])])),_:1})])),_:1})])),_:1})):(s(),d(r,{key:1,class:"flex ml-[32rpx] mr-[52rpx] items-center relative",onClick:C},{default:u((()=>[b(o,{src:"",size:"55"}),b(r,{class:"ml-[22rpx]"},{default:u((()=>[b(r,{class:"text-[#222222] font-bold text-lg",style:g({color:f(p).textColor})},{default:u((()=>[x(w(f(M)("login"))+"/"+w(f(M)("register")),1)])),_:1},8,["style"])])),_:1}),b(r,{class:"set-icon flex items-center absolute right-0 top-2"},{default:u((()=>[b(a,{url:"/pages/setting/index"},{default:u((()=>[b(n,{class:"iconfont iconshezhi text-[1.6rem] ml-[10rpx]",style:g({color:f(p).textColor})},null,8,["style"])])),_:1})])),_:1})])),_:1})),b(r,{class:"flex m-[30rpx] mb-0 py-[30rpx] items-center"},{default:u((()=>[b(r,{class:"flex-1 text-center"},{default:u((()=>[b(r,{class:"font-bold"},{default:u((()=>[b(a,{url:f(E)?"/pages/member/balance":"",style:g({color:f(p).textColor})},{default:u((()=>[x(w(f(R)),1)])),_:1},8,["url","style"])])),_:1}),b(r,{class:"text-sm mt-[10rpx]"},{default:u((()=>[b(a,{url:f(E)?"/pages/member/balance":"",style:g({color:f(p).textColor})},{default:u((()=>[x(w(f(M)("balance")),1)])),_:1},8,["url","style"])])),_:1})])),_:1}),b(r,{class:"border-solid border-white border-l border-b-0 border-t-0 border-r-0 h-[60rpx]"}),b(r,{class:"flex-1 text-center"},{default:u((()=>[b(r,{class:"font-bold"},{default:u((()=>[b(a,{url:f(E)?"/pages/member/point":"",style:g({color:f(p).textColor})},{default:u((()=>{var e;return[x(w(parseInt(null==(e=f(E))?void 0:e.point)||0),1)]})),_:1},8,["url","style"])])),_:1}),b(r,{class:"text-sm mt-[10rpx]"},{default:u((()=>[b(a,{url:f(E)?"/pages/member/point":"",style:g({color:f(p).textColor})},{default:u((()=>[x(w(f(M)("point")),1)])),_:1},8,["url","style"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["style"])}}}),[["__scopeId","data-v-1e679529"]]),J=Y(t({__name:"index",props:["component","index","pullDownRefresh"],setup(t){const r=t,c=o(),p=n((()=>"decorate"==c.mode?c.value[r.index]:r.component)),h=n((()=>{var e="";return p.value.componentBgColor&&(e+="background-color:"+p.value.componentBgColor+";"),p.value.topRounded&&(e+="border-top-left-radius:"+2*p.value.topRounded+"rpx;"),p.value.topRounded&&(e+="border-top-right-radius:"+2*p.value.topRounded+"rpx;"),p.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*p.value.bottomRounded+"rpx;"),p.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*p.value.bottomRounded+"rpx;"),e}));return a((()=>r.pullDownRefresh),((e,t)=>{})),(t,o)=>{const r=S,n=i(l("app-link"),G),a=D,c=i(l("u-icon"),e);return s(),d(r,{class:"diy-text",style:g(f(h))},{default:u((()=>["style-1"==f(p).style?(s(),d(r,{key:0,class:"p-[20rpx]"},{default:u((()=>[b(n,{data:f(p).link},{default:u((()=>[b(r,{style:g({fontSize:2*f(p).fontSize+"rpx",color:f(p).textColor,fontWeight:f(p).fontWeight,textAlign:f(p).textAlign})},{default:u((()=>[x(w(f(p).text),1)])),_:1},8,["style"])])),_:1},8,["data"])])),_:1})):y("",!0),"style-2"==f(p).style?(s(),d(r,{key:1,class:"p-[20rpx] flex items-center"},{default:u((()=>[b(n,{data:f(p).link},{default:u((()=>[b(r,{class:"max-w-[200rpx] truncate",style:g({fontSize:2*f(p).fontSize+"rpx",color:f(p).textColor,fontWeight:f(p).fontWeight})},{default:u((()=>[x(w(f(p).text),1)])),_:1},8,["style"])])),_:1},8,["data"]),b(a,{class:"ml-[16rpx] max-w-[300rpx] truncate",style:g({color:f(p).subTitle.color,fontSize:2*f(p).subTitle.fontSize+"rpx"})},{default:u((()=>[x(w(f(p).subTitle.text),1)])),_:1},8,["style"]),f(p).more.isShow?(s(),d(r,{key:0,class:"ml-auto text-right",style:g({color:f(p).more.color})},{default:u((()=>[b(n,{data:f(p).more.link,class:"flex items-center"},{default:u((()=>[b(a,{class:"max-w-[200rpx] truncate text-[24rpx] mr-[8rpx]"},{default:u((()=>[x(w(f(p).more.text),1)])),_:1}),b(c,{name:"arrow-right",size:"12",style:g({color:f(p).more.color})},null,8,["style"])])),_:1},8,["data"])])),_:1},8,["style"])):y("",!0)])),_:1})):y("",!0)])),_:1},8,["style"])}}}),[["__scopeId","data-v-7fc5a7a3"]]),Z=Y(t({__name:"index",props:["component","index","pullDownRefresh"],setup(e){const t=e,r=o(),x=n((()=>"decorate"==r.mode?r.value[t.index]:t.component)),w=n((()=>{var e="";return x.value.componentBgColor&&(e+="background-color:"+x.value.componentBgColor+";"),x.value.topRounded&&(e+="border-top-left-radius:"+2*x.value.topRounded+"rpx;"),x.value.topRounded&&(e+="border-top-right-radius:"+2*x.value.topRounded+"rpx;"),x.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*x.value.bottomRounded+"rpx;"),x.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*x.value.bottomRounded+"rpx;"),e}));a((()=>t.pullDownRefresh),((e,t)=>{})),E((()=>{_(),a((()=>x.value),((e,t)=>{e&&"RubikCube"==e.componentName&&_()}))}));const _=()=>{"decorate"==r.mode&&x.value.list.forEach(((e,t)=>{""==e.imageUrl&&(e.imageUrl="static/resource/images/diy/figure.png",e.imgWidth=690,e.imgHeight=330)})),D()},D=()=>{var e={"row1-of2":{ratio:2,width:"calc((100% - "+P(2*x.value.imageGap)+"px) / 2)"},"row1-of3":{ratio:3,width:"calc((100% - "+P(4*x.value.imageGap)+"px) / 3)"},"row1-of4":{ratio:4,width:"calc((100% - "+P(6*x.value.imageGap)+"px) / 4)"}};x.value.list.forEach(((e,t)=>{e.pageItemStyle=((e,t)=>{var o="";return"right"==x.value.elementAngle||{"row1-lt-of2-rt":[["border-top-right-radius","border-bottom-right-radius"],["border-top-left-radius","border-bottom-left-radius","border-bottom-right-radius"],["border-top-left-radius","border-bottom-left-radius","border-top-right-radius"]],"row1-lt-of1-tp-of2-bm":[["border-top-right-radius","border-bottom-right-radius"],["border-top-left-radius","border-bottom-left-radius","border-bottom-right-radius"],["border-radius"],["border-top-left-radius","border-bottom-left-radius","border-top-right-radius"]],"row1-tp-of2-bm":[["border-bottom-left-radius","border-bottom-right-radius"],["border-top-left-radius","border-bottom-right-radius","border-top-right-radius"],["border-top-left-radius","border-bottom-left-radius","border-top-right-radius"]],"row2-lt-of2-rt":[["border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"],["border-top-left-radius","border-bottom-right-radius","border-bottom-left-radius"],["border-top-left-radius","border-bottom-right-radius","border-top-right-radius"],["border-top-left-radius","border-bottom-left-radius","border-top-right-radius"]],"row1-of4":[["border-top-right-radius","border-bottom-right-radius"],["border-radius"],["border-radius"],["border-top-left-radius","border-bottom-left-radius"]],"row1-of3":[["border-top-right-radius","border-bottom-right-radius"],["border-radius"],["border-top-left-radius","border-bottom-left-radius"]],"row1-of2":[["border-top-right-radius","border-bottom-right-radius"],["border-top-left-radius","border-bottom-left-radius"]]}[e][t].forEach(((e,t)=>{o+="border-top-left-radius:"+2*x.value.topElementRounded+"rpx;",o+="border-top-right-radius:"+2*x.value.topElementRounded+"rpx;",o+="border-bottom-left-radius:"+2*x.value.bottomElementRounded+"rpx;",o+="border-bottom-right-radius:"+2*x.value.bottomElementRounded+"rpx;"})),o})(x.value.mode,t)})),e[x.value.mode]?C(e[x.value.mode]):"row2-lt-of2-rt"==x.value.mode?k():"row1-lt-of2-rt"==x.value.mode?T():"row1-tp-of2-bm"==x.value.mode?I():"row1-lt-of1-tp-of2-bm"==x.value.mode&&N()},C=e=>{B({success:t=>{let o=0;x.value.list.forEach(((r,n)=>{var a=r.imgHeight/r.imgWidth;let i=t.windowWidth-P(2*x.value.margin.both);x.value.imageGap>0&&(i-=P(e.ratio*x.value.imageGap*2)),r.imgWidth=i/e.ratio,r.imgHeight=r.imgWidth*a,(0==o||o<r.imgHeight)&&(o=r.imgHeight)})),x.value.list.forEach(((t,r)=>{t.widthStyle=e.width,t.imgHeight=o}))}})},k=()=>{B({success:e=>{let t=0,o=0;x.value.list.forEach(((r,n)=>{var a=r.imgHeight/r.imgWidth;r.imgWidth=e.windowWidth,r.imgWidth-=P(4*x.value.margin.both),x.value.imageGap>0&&(r.imgWidth-=P(2*x.value.imageGap)),r.imgWidth=r.imgWidth/2,r.imgHeight=r.imgWidth*a,n<=1?(0==t||t<r.imgHeight)&&(t=r.imgHeight):n>1&&(0==o||o<r.imgHeight)&&(o=r.imgHeight)})),x.value.list.forEach(((e,r)=>{e.imgWidth="calc((100% - "+P(2*x.value.imageGap)+"px) / 2)",e.widthStyle=e.imgWidth,r<=1?e.imgHeight=t:r>1&&(e.imgHeight=o)}))}})},T=()=>{let e=0;x.value.list[1].imgWidth,x.value.list[2].imgWidth,B({success:t=>{x.value.list.forEach(((o,r)=>{if(0==r){var n=o.imgHeight/o.imgWidth;o.imgWidth=t.windowWidth-P(4*x.value.margin.both)-P(2*x.value.imageGap),o.imgWidth=o.imgWidth/2,o.imgHeight=o.imgWidth*n,e=(o.imgHeight-P(2*x.value.imageGap))/2,o.imgWidth+="px"}else o.imgWidth=x.value.list[0].imgWidth,o.imgHeight=e}))}})},I=()=>{var e=0;B({success:t=>{x.value.list.forEach(((o,r)=>{var n=o.imgHeight/o.imgWidth;0==r?o.imgWidth=t.windowWidth-P(4*x.value.margin.both):r>0&&(o.imgWidth=t.windowWidth-P(4*x.value.margin.both)-P(2*x.value.imageGap),o.imgWidth=o.imgWidth/2),o.imgHeight=o.imgWidth*n,r>0&&(0==e||e<o.imgHeight)&&(e=o.imgHeight)})),x.value.list.forEach(((t,o)=>{t.imgWidth+="px",t.widthStyle=t.imgWidth,o>0&&(t.imgHeight=e)}))}})},N=()=>{B({success:e=>{x.value.list.forEach(((t,o)=>{if(0==o){var r=t.imgHeight/t.imgWidth;t.imgWidth=e.windowWidth-P(4*x.value.margin.both)-P(2*x.value.imageGap),t.imgWidth=t.imgWidth/2,t.imgHeight=t.imgWidth*r}else 1==o?(t.imgWidth=x.value.list[0].imgWidth,t.imgHeight=(x.value.list[0].imgHeight-P(2*x.value.imageGap))/2):o>1&&(t.imgWidth=(x.value.list[0].imgWidth-P(2*x.value.imageGap))/2,t.imgHeight=x.value.list[1].imgHeight)})),x.value.list.forEach(((e,t)=>{e.imgWidth+="px",e.imgHeight}))}})};return(e,t)=>{const o=R,n=i(l("app-link"),G),a=S;return s(),d(a,{class:m(["rubik-cube",f(r).mode]),style:g(f(w))},{default:u((()=>["row1-lt-of2-rt"==f(x).mode?(s(),c(p,{key:0},[b(a,{class:"template-left"},{default:u((()=>[b(n,{data:f(x).list[0].link,class:m(["item",f(x).mode]),style:g({marginRight:2*f(x).imageGap+"rpx",width:f(x).list[0].imgWidth,height:f(x).list[0].imgHeight+"px"})},{default:u((()=>[b(o,{src:f(v)(f(x).list[0].imageUrl),mode:"scaleToFill",style:g(f(x).list[0].pageItemStyle),"show-menu-by-longpress":!0},null,8,["src","style"])])),_:1},8,["data","class","style"])])),_:1}),b(a,{class:"template-right"},{default:u((()=>[(s(!0),c(p,null,h(f(x).list,((e,t)=>(s(),c(p,{key:t},[t>0?(s(),d(n,{key:0,data:e.link,class:m(["item",f(x).mode]),style:g({marginBottom:2*f(x).imageGap+"rpx",width:e.imgWidth,height:e.imgHeight+"px"})},{default:u((()=>[b(o,{src:f(v)(e.imageUrl),mode:"scaleToFill",style:g(e.pageItemStyle),"show-menu-by-longpress":!0},null,8,["src","style"])])),_:2},1032,["data","class","style"])):y("",!0)],64)))),128))])),_:1})],64)):"row1-lt-of1-tp-of2-bm"==f(x).mode?(s(),c(p,{key:1},[b(a,{class:"template-left"},{default:u((()=>[b(n,{data:f(x).list[0].link,class:m(["item",f(x).mode]),style:g({marginRight:2*f(x).imageGap+"rpx",width:f(x).list[0].imgWidth,height:f(x).list[0].imgHeight+"px"})},{default:u((()=>[b(o,{src:f(v)(f(x).list[0].imageUrl),mode:"scaleToFill",style:g(f(x).list[0].pageItemStyle),"show-menu-by-longpress":!0},null,8,["src","style"])])),_:1},8,["data","class","style"])])),_:1}),b(a,{class:"template-right"},{default:u((()=>[b(n,{data:f(x).list[1].link,class:m(["item",f(x).mode]),style:g({marginBottom:2*f(x).imageGap+"rpx",width:f(x).list[1].imgWidth,height:f(x).list[1].imgHeight+"px"})},{default:u((()=>[b(o,{src:f(v)(f(x).list[1].imageUrl),mode:"scaleToFill",style:g(f(x).list[1].pageItemStyle),"show-menu-by-longpress":!0},null,8,["src","style"])])),_:1},8,["data","class","style"]),b(a,{class:"template-bottom"},{default:u((()=>[(s(!0),c(p,null,h(f(x).list,((e,t)=>(s(),c(p,{key:t},[t>1?(s(),d(n,{key:0,data:e.link,class:m(["item",f(x).mode]),style:g({marginRight:2*f(x).imageGap+"rpx",width:e.imgWidth,height:e.imgHeight+"px"})},{default:u((()=>[b(o,{src:f(v)(e.imageUrl),mode:"scaleToFill",style:g(e.pageItemStyle),"show-menu-by-longpress":!0},null,8,["src","style"])])),_:2},1032,["data","class","style"])):y("",!0)],64)))),128))])),_:1})])),_:1})],64)):(s(!0),c(p,{key:2},h(f(x).list,((e,t)=>(s(),d(n,{class:m(["item",f(x).mode]),key:t,data:e.link,style:g({marginRight:2*f(x).imageGap+"rpx",marginBottom:2*f(x).imageGap+"rpx",width:e.widthStyle,height:e.imgHeight+"px"})},{default:u((()=>[b(o,{src:f(v)(e.imageUrl),mode:"scaleToFill",style:g(e.pageItemStyle),"show-menu-by-longpress":!0},null,8,["src","style"])])),_:2},1032,["class","data","style"])))),128))])),_:1},8,["class","style"])}}}),[["__scopeId","data-v-5d671723"]]),Q=t({__name:"index",props:["component","index","pullDownRefresh"],setup(e){const t=e,r=o(),m=n((()=>"decorate"==r.mode?r.value[t.index]:t.component)),x=n((()=>{var e="";return m.value.componentBgColor&&(e+="background-color:"+m.value.componentBgColor+";"),m.value.topRounded&&(e+="border-top-left-radius:"+2*m.value.topRounded+"rpx;"),m.value.topRounded&&(e+="border-top-right-radius:"+2*m.value.topRounded+"rpx;"),m.value.bottomRounded&&(e+="border-bottom-left-radius:"+2*m.value.bottomRounded+"rpx;"),m.value.bottomRounded&&(e+="border-bottom-right-radius:"+2*m.value.bottomRounded+"rpx;"),e}));E((()=>{w(),a((()=>m.value),((e,t)=>{e&&"HotArea"==e.componentName&&w()}))}));const w=()=>{"decorate"==r.mode&&""==m.value.imageUrl&&(m.value.imageUrl="static/resource/images/diy/figure.png",m.value.imgWidth=690,m.value.imgHeight=330)};return a((()=>t.pullDownRefresh),((e,t)=>{})),(e,t)=>{const o=R,n=i(l("app-link"),G),a=S;return s(),d(a,{style:g(f(x))},{default:u((()=>[b(a,{class:"simple-graph-wrap overflow-hidden relative leading-0"},{default:u((()=>[b(o,{style:g({height:f(m).imgHeight}),src:f(v)(f(m).imageUrl),mode:"widthFix","show-menu-by-longpress":!0,class:"w-full"},null,8,["style","src"]),"decorate"!=f(r).mode?(s(!0),c(p,{key:0},h(f(m).heatMapData,((e,t)=>(s(),d(n,{data:e.link,class:"absolute",key:t,style:g({width:e.width+"%",height:e.height+"%",left:e.left+"%",top:e.top+"%"})},null,8,["data","style"])))),128)):y("",!0)])),_:1})])),_:1},8,["style"])}}});
|
||
/**!
|
||
* Sortable 1.15.0
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/
|
||
function ee(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function te(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(o),!0).forEach((function(t){re(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ne(){return ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},ne.apply(this,arguments)}function ae(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},a=Object.keys(e);for(r=0;r<a.length;r++)o=a[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)o=a[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function ie(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var le=ie(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),se=ie(/Edge/i),de=ie(/firefox/i),ue=ie(/safari/i)&&!ie(/chrome/i)&&!ie(/android/i),ce=ie(/iP(ad|od|hone)/i),pe=ie(/chrome/i)&&ie(/android/i),he={capture:!1,passive:!1};function me(e,t,o){e.addEventListener(t,o,!le&&he)}function ge(e,t,o){e.removeEventListener(t,o,!le&&he)}function fe(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(o){return!1}return!1}}function ve(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function be(e,t,o,r){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&fe(e,t):fe(e,t))||r&&e===o)return e;if(e===o)break}while(e=ve(e))}return null}var ye,xe=/\s+/g;function we(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(xe," ").replace(" "+t+" "," ");e.className=(r+(o?" "+t:"")).replace(xe," ")}}function _e(e,t,o){var r=e&&e.style;if(r){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=o+("string"==typeof o?"":"px")}}function Se(e,t){var o="";if("string"==typeof e)o=e;else do{var r=_e(e,"transform");r&&"none"!==r&&(o=r+" "+o)}while(!t&&(e=e.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function De(e,t,o){if(e){var r=e.getElementsByTagName(t),n=0,a=r.length;if(o)for(;n<a;n++)o(r[n],n);return r}return[]}function Ee(){var e=document.scrollingElement;return e||document.documentElement}function Re(e,t,o,r,n){if(e.getBoundingClientRect||e===window){var a,i,l,s,d,u,c;if(e!==window&&e.parentNode&&e!==Ee()?(i=(a=e.getBoundingClientRect()).top,l=a.left,s=a.bottom,d=a.right,u=a.height,c=a.width):(i=0,l=0,s=window.innerHeight,d=window.innerWidth,u=window.innerHeight,c=window.innerWidth),(t||o)&&e!==window&&(n=n||e.parentNode,!le))do{if(n&&n.getBoundingClientRect&&("none"!==_e(n,"transform")||o&&"static"!==_e(n,"position"))){var p=n.getBoundingClientRect();i-=p.top+parseInt(_e(n,"border-top-width")),l-=p.left+parseInt(_e(n,"border-left-width")),s=i+a.height,d=l+a.width;break}}while(n=n.parentNode);if(r&&e!==window){var h=Se(n||e),m=h&&h.a,g=h&&h.d;h&&(s=(i/=g)+(u/=g),d=(l/=m)+(c/=m))}return{top:i,left:l,bottom:s,right:d,width:c,height:u}}}function Ce(e,t,o){for(var r=Oe(e,!0),n=Re(e)[t];r;){var a=Re(r)[o];if(!("top"===o||"left"===o?n>=a:n<=a))return r;if(r===Ee())break;r=Oe(r,!1)}return!1}function ke(e,t,o,r){for(var n=0,a=0,i=e.children;a<i.length;){if("none"!==i[a].style.display&&i[a]!==Mt.ghost&&(r||i[a]!==Mt.dragged)&&be(i[a],o.draggable,e,!1)){if(n===t)return i[a];n++}a++}return null}function Te(e,t){for(var o=e.lastElementChild;o&&(o===Mt.ghost||"none"===_e(o,"display")||t&&!fe(o,t));)o=o.previousElementSibling;return o||null}function Ie(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Mt.clone||t&&!fe(e,t)||o++;return o}function Ne(e){var t=0,o=0,r=Ee();if(e)do{var n=Se(e),a=n.a,i=n.d;t+=e.scrollLeft*a,o+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,o]}function Oe(e,t){if(!e||!e.getBoundingClientRect)return Ee();var o=e,r=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var n=_e(o);if(o.clientWidth<o.scrollWidth&&("auto"==n.overflowX||"scroll"==n.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==n.overflowY||"scroll"==n.overflowY)){if(!o.getBoundingClientRect||o===document.body)return Ee();if(r||t)return o;r=!0}}}while(o=o.parentNode);return Ee()}function We(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Ae(e,t){return function(){if(!ye){var o=arguments,r=this;1===o.length?e.call(r,o[0]):e.apply(r,o),ye=setTimeout((function(){ye=void 0}),t)}}}function Me(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function He(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}var Pe="Sortable"+(new Date).getTime();function Be(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==_e(e,"display")&&e!==Mt.ghost){t.push({target:e,rect:Re(e)});var o=te({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=Se(e,!0);r&&(o.top-=r.f,o.left-=r.e)}e.fromRect=o}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[o][r])return Number(o);return-1}(t,{target:e}),1)},animateAll:function(o){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof o&&o());var n=!1,a=0;t.forEach((function(e){var t=0,o=e.target,i=o.fromRect,l=Re(o),s=o.prevFromRect,d=o.prevToRect,u=e.rect,c=Se(o,!0);c&&(l.top-=c.f,l.left-=c.e),o.toRect=l,o.thisAnimationDuration&&We(s,l)&&!We(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(t=function(e,t,o,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*r.animation}(u,s,d,r.options)),We(l,i)||(o.prevFromRect=i,o.prevToRect=l,t||(t=r.options.animation),r.animate(o,u,l,t)),t&&(n=!0,a=Math.max(a,t),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),t),o.thisAnimationDuration=t)})),clearTimeout(e),n?e=setTimeout((function(){"function"==typeof o&&o()}),a):"function"==typeof o&&o(),t=[]},animate:function(e,t,o,r){if(r){_e(e,"transition",""),_e(e,"transform","");var n=Se(this.el),a=n&&n.a,i=n&&n.d,l=(t.left-o.left)/(a||1),s=(t.top-o.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,_e(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),_e(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),_e(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){_e(e,"transition",""),_e(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}}var je=[],ze={initializeByDefault:!0},Fe={mount:function(e){for(var t in ze)ze.hasOwnProperty(t)&&!(t in e)&&(e[t]=ze[t]);je.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),je.push(e)},pluginEvent:function(e,t,o){var r=this;this.eventCanceled=!1,o.cancel=function(){r.eventCanceled=!0};var n=e+"Global";je.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][n]&&t[r.pluginName][n](te({sortable:t},o)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](te({sortable:t},o)))}))},initializePlugins:function(e,t,o,r){for(var n in je.forEach((function(r){var n=r.pluginName;if(e.options[n]||r.initializeByDefault){var a=new r(e,t,e.options);a.sortable=e,a.options=e.options,e[n]=a,ne(o,a.defaults)}})),e.options)if(e.options.hasOwnProperty(n)){var a=this.modifyOption(e,n,e.options[n]);void 0!==a&&(e.options[n]=a)}},getEventProperties:function(e,t){var o={};return je.forEach((function(r){"function"==typeof r.eventProperties&&ne(o,r.eventProperties.call(t[r.pluginName],e))})),o},modifyOption:function(e,t,o){var r;return je.forEach((function(n){e[n.pluginName]&&n.optionListeners&&"function"==typeof n.optionListeners[t]&&(r=n.optionListeners[t].call(e[n.pluginName],o))})),r}};var Xe=["evt"],Ye=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o.evt,n=ae(o,Xe);Fe.pluginEvent.bind(Mt)(e,t,te({dragEl:Ue,parentEl:Le,ghostEl:qe,rootEl:$e,nextEl:Ve,lastDownEl:Ke,cloneEl:Je,cloneHidden:Ze,dragStarted:ct,putSortable:nt,activeSortable:Mt.active,originalEvent:r,oldIndex:Qe,oldDraggableIndex:tt,newIndex:et,newDraggableIndex:ot,hideGhostForTarget:Nt,unhideGhostForTarget:Ot,cloneNowHidden:function(){Ze=!0},cloneNowShown:function(){Ze=!1},dispatchSortableEvent:function(e){Ge({sortable:t,name:e,originalEvent:r})}},n))};function Ge(e){!function(e){var t=e.sortable,o=e.rootEl,r=e.name,n=e.targetEl,a=e.cloneEl,i=e.toEl,l=e.fromEl,s=e.oldIndex,d=e.newIndex,u=e.oldDraggableIndex,c=e.newDraggableIndex,p=e.originalEvent,h=e.putSortable,m=e.extraEventProperties;if(t=t||o&&o[Pe]){var g,f=t.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||le||se?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=i||o,g.from=l||o,g.item=n||o,g.clone=a,g.oldIndex=s,g.newIndex=d,g.oldDraggableIndex=u,g.newDraggableIndex=c,g.originalEvent=p,g.pullMode=h?h.lastPutMode:void 0;var b=te(te({},m),Fe.getEventProperties(r,t));for(var y in b)g[y]=b[y];o&&o.dispatchEvent(g),f[v]&&f[v].call(t,g)}}(te({putSortable:nt,cloneEl:Je,targetEl:Ue,rootEl:$e,oldIndex:Qe,oldDraggableIndex:tt,newIndex:et,newDraggableIndex:ot},e))}var Ue,Le,qe,$e,Ve,Ke,Je,Ze,Qe,et,tt,ot,rt,nt,at,it,lt,st,dt,ut,ct,pt,ht,mt,gt,ft=!1,vt=!1,bt=[],yt=!1,xt=!1,wt=[],_t=!1,St=[],Dt="undefined"!=typeof document,Et=ce,Rt=se||le?"cssFloat":"float",Ct=Dt&&!pe&&!ce&&"draggable"in document.createElement("div"),kt=function(){if(Dt){if(le)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Tt=function(e,t){var o=_e(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),n=ke(e,0,t),a=ke(e,1,t),i=n&&_e(n),l=a&&_e(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Re(n).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Re(a).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return n&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=r&&"none"===o[Rt]||a&&"none"===o[Rt]&&s+d>r)?"vertical":"horizontal"},It=function(e){function t(e,o){return function(r,n,a,i){var l=r.options.group.name&&n.options.group.name&&r.options.group.name===n.options.group.name;if(null==e&&(o||l))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(r,n,a,i),o)(r,n,a,i);var s=(o?r:n).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var o={},r=e.group;r&&"object"==oe(r)||(r={name:r}),o.name=r.name,o.checkPull=t(r.pull,!0),o.checkPut=t(r.put),o.revertClone=r.revertClone,e.group=o},Nt=function(){!kt&&qe&&_e(qe,"display","none")},Ot=function(){!kt&&qe&&_e(qe,"display","")};Dt&&!pe&&document.addEventListener("click",(function(e){if(vt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),vt=!1,!1}),!0);var Wt=function(e){if(Ue){e=e.touches?e.touches[0]:e;var t=(n=e.clientX,a=e.clientY,bt.some((function(e){var t=e[Pe].options.emptyInsertThreshold;if(t&&!Te(e)){var o=Re(e),r=n>=o.left-t&&n<=o.right+t,l=a>=o.top-t&&a<=o.bottom+t;return r&&l?i=e:void 0}})),i);if(t){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[Pe]._onDragOver(o)}}var n,a,i},At=function(e){Ue&&Ue.parentNode[Pe]._isOutsideThisEl(e.target)};function Mt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ne({},t),e[Pe]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Tt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Mt.supportPointer&&"PointerEvent"in window&&!ue,emptyInsertThreshold:5};for(var r in Fe.initializePlugins(this,e,o),o)!(r in t)&&(t[r]=o[r]);for(var n in It(t),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!t.forceFallback&&Ct,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?me(e,"pointerdown",this._onTapStart):(me(e,"mousedown",this._onTapStart),me(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(me(e,"dragover",this),me(e,"dragenter",this)),bt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ne(this,Be())}function Ht(e,t,o,r,n,a,i,l){var s,d,u=e[Pe],c=u.options.onMove;return!window.CustomEvent||le||se?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=o,s.draggedRect=r,s.related=n||t,s.relatedRect=a||Re(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),c&&(d=c.call(u,s,i)),d}function Pt(e){e.draggable=!1}function Bt(){_t=!1}function jt(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,r=0;o--;)r+=t.charCodeAt(o);return r.toString(36)}function zt(e){return setTimeout(e,0)}function Ft(e){return clearTimeout(e)}Mt.prototype={constructor:Mt,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(pt=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ue):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,r=this.options,n=r.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,d=r.filter;if(function(e){St.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var r=t[o];r.checked&&St.push(r)}}(o),!Ue&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||r.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!ue||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=be(l,r.draggable,o,!1))&&l.animated||Ke===l)){if(Qe=Ie(l),tt=Ie(l,r.draggable),"function"==typeof d){if(d.call(this,e,l,this))return Ge({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),Ye("filter",t,{evt:e}),void(n&&e.cancelable&&e.preventDefault())}else if(d&&(d=d.split(",").some((function(r){if(r=be(s,r.trim(),o,!1))return Ge({sortable:t,rootEl:r,name:"filter",targetEl:l,fromEl:o,toEl:o}),Ye("filter",t,{evt:e}),!0}))))return void(n&&e.cancelable&&e.preventDefault());r.handle&&!be(s,r.handle,o,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,o){var r,n=this,a=n.el,i=n.options,l=a.ownerDocument;if(o&&!Ue&&o.parentNode===a){var s=Re(o);if($e=a,Le=(Ue=o).parentNode,Ve=Ue.nextSibling,Ke=o,rt=i.group,Mt.dragged=Ue,at={target:Ue,clientX:(t||e).clientX,clientY:(t||e).clientY},dt=at.clientX-s.left,ut=at.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ue.style["will-change"]="all",r=function(){Ye("delayEnded",n,{evt:e}),Mt.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!de&&n.nativeDraggable&&(Ue.draggable=!0),n._triggerDragStart(e,t),Ge({sortable:n,name:"choose",originalEvent:e}),we(Ue,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){De(Ue,e.trim(),Pt)})),me(l,"dragover",Wt),me(l,"mousemove",Wt),me(l,"touchmove",Wt),me(l,"mouseup",n._onDrop),me(l,"touchend",n._onDrop),me(l,"touchcancel",n._onDrop),de&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ue.draggable=!0),Ye("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(se||le))r();else{if(Mt.eventCanceled)return void this._onDrop();me(l,"mouseup",n._disableDelayedDrag),me(l,"touchend",n._disableDelayedDrag),me(l,"touchcancel",n._disableDelayedDrag),me(l,"mousemove",n._delayedDragTouchMoveHandler),me(l,"touchmove",n._delayedDragTouchMoveHandler),i.supportPointer&&me(l,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ue&&Pt(Ue),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ge(e,"mouseup",this._disableDelayedDrag),ge(e,"touchend",this._disableDelayedDrag),ge(e,"touchcancel",this._disableDelayedDrag),ge(e,"mousemove",this._delayedDragTouchMoveHandler),ge(e,"touchmove",this._delayedDragTouchMoveHandler),ge(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?me(document,"pointermove",this._onTouchMove):me(document,t?"touchmove":"mousemove",this._onTouchMove):(me(Ue,"dragend",this),me($e,"dragstart",this._onDragStart));try{document.selection?zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,t){if(ft=!1,$e&&Ue){Ye("dragStarted",this,{evt:t}),this.nativeDraggable&&me(document,"dragover",At);var o=this.options;!e&&we(Ue,o.dragClass,!1),we(Ue,o.ghostClass,!0),Mt.active=this,e&&this._appendGhost(),Ge({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(it){this._lastX=it.clientX,this._lastY=it.clientY,Nt();for(var e=document.elementFromPoint(it.clientX,it.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(it.clientX,it.clientY))!==t;)t=e;if(Ue.parentNode[Pe]._isOutsideThisEl(e),t)do{if(t[Pe]){if(t[Pe]._onDragOver({clientX:it.clientX,clientY:it.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ot()}},_onTouchMove:function(e){if(at){var t=this.options,o=t.fallbackTolerance,r=t.fallbackOffset,n=e.touches?e.touches[0]:e,a=qe&&Se(qe,!0),i=qe&&a&&a.a,l=qe&&a&&a.d,s=Et&>&&Ne(gt),d=(n.clientX-at.clientX+r.x)/(i||1)+(s?s[0]-wt[0]:0)/(i||1),u=(n.clientY-at.clientY+r.y)/(l||1)+(s?s[1]-wt[1]:0)/(l||1);if(!Mt.active&&!ft){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(qe){a?(a.e+=d-(lt||0),a.f+=u-(st||0)):a={a:1,b:0,c:0,d:1,e:d,f:u};var c="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");_e(qe,"webkitTransform",c),_e(qe,"mozTransform",c),_e(qe,"msTransform",c),_e(qe,"transform",c),lt=d,st=u,it=n}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!qe){var e=this.options.fallbackOnBody?document.body:$e,t=Re(Ue,!0,Et,!0,e),o=this.options;if(Et){for(gt=e;"static"===_e(gt,"position")&&"none"===_e(gt,"transform")&>!==document;)gt=gt.parentNode;gt!==document.body&>!==document.documentElement?(gt===document&&(gt=Ee()),t.top+=gt.scrollTop,t.left+=gt.scrollLeft):gt=Ee(),wt=Ne(gt)}we(qe=Ue.cloneNode(!0),o.ghostClass,!1),we(qe,o.fallbackClass,!0),we(qe,o.dragClass,!0),_e(qe,"transition",""),_e(qe,"transform",""),_e(qe,"box-sizing","border-box"),_e(qe,"margin",0),_e(qe,"top",t.top),_e(qe,"left",t.left),_e(qe,"width",t.width),_e(qe,"height",t.height),_e(qe,"opacity","0.8"),_e(qe,"position",Et?"absolute":"fixed"),_e(qe,"zIndex","100000"),_e(qe,"pointerEvents","none"),Mt.ghost=qe,e.appendChild(qe),_e(qe,"transform-origin",dt/parseInt(qe.style.width)*100+"% "+ut/parseInt(qe.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,r=e.dataTransfer,n=o.options;Ye("dragStart",this,{evt:e}),Mt.eventCanceled?this._onDrop():(Ye("setupClone",this),Mt.eventCanceled||((Je=He(Ue)).removeAttribute("id"),Je.draggable=!1,Je.style["will-change"]="",this._hideClone(),we(Je,this.options.chosenClass,!1),Mt.clone=Je),o.cloneId=zt((function(){Ye("clone",o),Mt.eventCanceled||(o.options.removeCloneOnHide||$e.insertBefore(Je,Ue),o._hideClone(),Ge({sortable:o,name:"clone"}))})),!t&&we(Ue,n.dragClass,!0),t?(vt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(ge(document,"mouseup",o._onDrop),ge(document,"touchend",o._onDrop),ge(document,"touchcancel",o._onDrop),r&&(r.effectAllowed="move",n.setData&&n.setData.call(o,r,Ue)),me(document,"drop",o),_e(Ue,"transform","translateZ(0)")),ft=!0,o._dragStartId=zt(o._dragStarted.bind(o,t,e)),me(document,"selectstart",o),ct=!0,ue&&_e(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,r,n,a=this.el,i=e.target,l=this.options,s=l.group,d=Mt.active,u=rt===s,c=l.sort,p=nt||d,h=this,m=!1;if(!_t){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=be(i,l.draggable,a,!0),T("dragOver"),Mt.eventCanceled)return m;if(Ue.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||h._ignoreWhileAnimating===i)return N(!1);if(vt=!1,d&&!l.disabled&&(u?c||(r=Le!==$e):nt===this||(this.lastPutMode=rt.checkPull(this,d,Ue,e))&&s.checkPut(this,d,Ue,e))){if(n="vertical"===this._getDirection(e,i),t=Re(Ue),T("dragOverValid"),Mt.eventCanceled)return m;if(r)return Le=$e,I(),this._hideClone(),T("revert"),Mt.eventCanceled||(Ve?$e.insertBefore(Ue,Ve):$e.appendChild(Ue)),N(!0);var g=Te(a,l.draggable);if(!g||function(e,t,o){var r=Re(Te(o.el,o.options.draggable)),n=10;return t?e.clientX>r.right+n||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+n}(e,n,this)&&!g.animated){if(g===Ue)return N(!1);if(g&&a===e.target&&(i=g),i&&(o=Re(i)),!1!==Ht($e,a,Ue,t,i,o,e,!!i))return I(),g&&g.nextSibling?a.insertBefore(Ue,g.nextSibling):a.appendChild(Ue),Le=a,O(),N(!0)}else if(g&&function(e,t,o){var r=Re(ke(o.el,0,o.options,!0)),n=10;return t?e.clientX<r.left-n||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-n||e.clientY<r.bottom&&e.clientX<r.left}(e,n,this)){var f=ke(a,0,l,!0);if(f===Ue)return N(!1);if(o=Re(i=f),!1!==Ht($e,a,Ue,t,i,o,e,!1))return I(),a.insertBefore(Ue,f),Le=a,O(),N(!0)}else if(i.parentNode===a){o=Re(i);var v,b,y,x=Ue.parentNode!==a,w=!function(e,t,o){var r=o?e.left:e.top,n=o?e.right:e.bottom,a=o?e.width:e.height,i=o?t.left:t.top,l=o?t.right:t.bottom,s=o?t.width:t.height;return r===i||n===l||r+a/2===i+s/2}(Ue.animated&&Ue.toRect||t,i.animated&&i.toRect||o,n),_=n?"top":"left",S=Ce(i,"top","top")||Ce(Ue,"top","top"),D=S?S.scrollTop:void 0;if(pt!==i&&(b=o[_],yt=!1,xt=!w&&l.invertSwap||x),v=function(e,t,o,r,n,a,i,l){var s=r?e.clientY:e.clientX,d=r?o.height:o.width,u=r?o.top:o.left,c=r?o.bottom:o.right,p=!1;if(!i)if(l&&mt<d*n){if(!yt&&(1===ht?s>u+d*a/2:s<c-d*a/2)&&(yt=!0),yt)p=!0;else if(1===ht?s<u+mt:s>c-mt)return-ht}else if(s>u+d*(1-n)/2&&s<c-d*(1-n)/2)return function(e){return Ie(Ue)<Ie(e)?1:-1}(t);if((p=p||i)&&(s<u+d*a/2||s>c-d*a/2))return s>u+d/2?1:-1;return 0}(e,i,o,n,w?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,xt,pt===i),0!==v){var E=Ie(Ue);do{E-=v,y=Le.children[E]}while(y&&("none"===_e(y,"display")||y===qe))}if(0===v||y===i)return N(!1);pt=i,ht=v;var R=i.nextElementSibling,C=!1,k=Ht($e,a,Ue,t,i,o,e,C=1===v);if(!1!==k)return 1!==k&&-1!==k||(C=1===k),_t=!0,setTimeout(Bt,30),I(),C&&!R?a.appendChild(Ue):i.parentNode.insertBefore(Ue,C?R:i),S&&Me(S,0,D-S.scrollTop),Le=Ue.parentNode,void 0===b||xt||(mt=Math.abs(b-Re(i)[_])),O(),N(!0)}if(a.contains(Ue))return N(!1)}return!1}function T(l,s){Ye(l,h,te({evt:e,isOwner:u,axis:n?"vertical":"horizontal",revert:r,dragRect:t,targetRect:o,canSort:c,fromSortable:p,target:i,completed:N,onMove:function(o,r){return Ht($e,a,Ue,t,o,Re(o),e,r)},changed:O},s))}function I(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function N(t){return T("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(h),h!==p&&(we(Ue,nt?nt.options.ghostClass:d.options.ghostClass,!1),we(Ue,l.ghostClass,!0)),nt!==h&&h!==Mt.active?nt=h:h===Mt.active&&nt&&(nt=null),p===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===Ue&&!Ue.animated||i===a&&!i.animated)&&(pt=null),l.dragoverBubble||e.rootEl||i===document||(Ue.parentNode[Pe]._isOutsideThisEl(e.target),!t&&Wt(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function O(){et=Ie(Ue),ot=Ie(Ue,l.draggable),Ge({sortable:h,name:"change",toEl:a,newIndex:et,newDraggableIndex:ot,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ge(document,"mousemove",this._onTouchMove),ge(document,"touchmove",this._onTouchMove),ge(document,"pointermove",this._onTouchMove),ge(document,"dragover",Wt),ge(document,"mousemove",Wt),ge(document,"touchmove",Wt)},_offUpEvents:function(){var e=this.el.ownerDocument;ge(e,"mouseup",this._onDrop),ge(e,"touchend",this._onDrop),ge(e,"pointerup",this._onDrop),ge(e,"touchcancel",this._onDrop),ge(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;et=Ie(Ue),ot=Ie(Ue,o.draggable),Ye("drop",this,{evt:e}),Le=Ue&&Ue.parentNode,et=Ie(Ue),ot=Ie(Ue,o.draggable),Mt.eventCanceled||(ft=!1,xt=!1,yt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ft(this.cloneId),Ft(this._dragStartId),this.nativeDraggable&&(ge(document,"drop",this),ge(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ue&&_e(document.body,"user-select",""),_e(Ue,"transform",""),e&&(ct&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),qe&&qe.parentNode&&qe.parentNode.removeChild(qe),($e===Le||nt&&"clone"!==nt.lastPutMode)&&Je&&Je.parentNode&&Je.parentNode.removeChild(Je),Ue&&(this.nativeDraggable&&ge(Ue,"dragend",this),Pt(Ue),Ue.style["will-change"]="",ct&&!ft&&we(Ue,nt?nt.options.ghostClass:this.options.ghostClass,!1),we(Ue,this.options.chosenClass,!1),Ge({sortable:this,name:"unchoose",toEl:Le,newIndex:null,newDraggableIndex:null,originalEvent:e}),$e!==Le?(et>=0&&(Ge({rootEl:Le,name:"add",toEl:Le,fromEl:$e,originalEvent:e}),Ge({sortable:this,name:"remove",toEl:Le,originalEvent:e}),Ge({rootEl:Le,name:"sort",toEl:Le,fromEl:$e,originalEvent:e}),Ge({sortable:this,name:"sort",toEl:Le,originalEvent:e})),nt&&nt.save()):et!==Qe&&et>=0&&(Ge({sortable:this,name:"update",toEl:Le,originalEvent:e}),Ge({sortable:this,name:"sort",toEl:Le,originalEvent:e})),Mt.active&&(null!=et&&-1!==et||(et=Qe,ot=tt),Ge({sortable:this,name:"end",toEl:Le,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Ye("nulling",this),$e=Ue=Le=qe=Ve=Je=Ke=Ze=at=it=ct=et=ot=Qe=tt=pt=ht=nt=rt=Mt.dragged=Mt.ghost=Mt.clone=Mt.active=null,St.forEach((function(e){e.checked=!0})),St.length=lt=st=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ue&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,r=0,n=o.length,a=this.options;r<n;r++)be(e=o[r],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||jt(e));return t},sort:function(e,t){var o={},r=this.el;this.toArray().forEach((function(e,t){var n=r.children[t];be(n,this.options.draggable,r,!1)&&(o[e]=n)}),this),t&&this.captureAnimationState(),e.forEach((function(e){o[e]&&(r.removeChild(o[e]),r.appendChild(o[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return be(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var r=Fe.modifyOption(this,e,t);o[e]=void 0!==r?r:t,"group"===e&&It(o)},destroy:function(){Ye("destroy",this);var e=this.el;e[Pe]=null,ge(e,"mousedown",this._onTapStart),ge(e,"touchstart",this._onTapStart),ge(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(ge(e,"dragover",this),ge(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ze){if(Ye("hideClone",this),Mt.eventCanceled)return;_e(Je,"display","none"),this.options.removeCloneOnHide&&Je.parentNode&&Je.parentNode.removeChild(Je),Ze=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Ze){if(Ye("showClone",this),Mt.eventCanceled)return;Ue.parentNode!=$e||this.options.group.revertClone?Ve?$e.insertBefore(Je,Ve):$e.appendChild(Je):$e.insertBefore(Je,Ue),this.options.group.revertClone&&this.animate(Ue,Je),_e(Je,"display",""),Ze=!1}}else this._hideClone()}},Dt&&me(document,"touchmove",(function(e){(Mt.active||ft)&&e.cancelable&&e.preventDefault()})),Mt.utils={on:me,off:ge,css:_e,find:De,is:function(e,t){return!!be(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:Ae,closest:be,toggleClass:we,clone:He,index:Ie,nextTick:zt,cancelNextTick:Ft,detectDirection:Tt,getChild:ke},Mt.get=function(e){return e[Pe]},Mt.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Mt.utils=te(te({},Mt.utils),e.utils)),Fe.mount(e)}))},Mt.create=function(e,t){return new Mt(e,t)},Mt.version="1.15.0";var Xt,Yt,Gt,Ut,Lt,qt,$t=[],Vt=!1;function Kt(){$t.forEach((function(e){clearInterval(e.pid)})),$t=[]}function Jt(){clearInterval(qt)}var Zt=Ae((function(e,t,o,r){if(t.scroll){var n,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,d=Ee(),u=!1;Yt!==o&&(Yt=o,Kt(),Xt=t.scroll,n=t.scrollFn,!0===Xt&&(Xt=Oe(o,!0)));var c=0,p=Xt;do{var h=p,m=Re(h),g=m.top,f=m.bottom,v=m.left,b=m.right,y=m.width,x=m.height,w=void 0,_=void 0,S=h.scrollWidth,D=h.scrollHeight,E=_e(h),R=h.scrollLeft,C=h.scrollTop;h===d?(w=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),_=x<D&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(w=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX),_=x<D&&("auto"===E.overflowY||"scroll"===E.overflowY));var k=w&&(Math.abs(b-a)<=l&&R+y<S)-(Math.abs(v-a)<=l&&!!R),T=_&&(Math.abs(f-i)<=l&&C+x<D)-(Math.abs(g-i)<=l&&!!C);if(!$t[c])for(var I=0;I<=c;I++)$t[I]||($t[I]={});$t[c].vx==k&&$t[c].vy==T&&$t[c].el===h||($t[c].el=h,$t[c].vx=k,$t[c].vy=T,clearInterval($t[c].pid),0==k&&0==T||(u=!0,$t[c].pid=setInterval(function(){r&&0===this.layer&&Mt.active._onTouchMove(Lt);var t=$t[this.layer].vy?$t[this.layer].vy*s:0,o=$t[this.layer].vx?$t[this.layer].vx*s:0;"function"==typeof n&&"continue"!==n.call(Mt.dragged.parentNode[Pe],o,t,e,Lt,$t[this.layer].el)||Me($t[this.layer].el,o,t)}.bind({layer:c}),24))),c++}while(t.bubbleScroll&&p!==d&&(p=Oe(p,!1)));Vt=u}}),30),Qt=function(e){var t=e.originalEvent,o=e.putSortable,r=e.dragEl,n=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=o||n;i();var d=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(d.clientX,d.clientY);l(),s&&!s.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:o}))}};function eo(){}function to(){}eo.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var r=ke(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:Qt},ne(eo,{pluginName:"revertOnSpill"}),to.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:Qt},ne(to,{pluginName:"removeOnSpill"}),Mt.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?me(document,"dragover",this._handleAutoScroll):this.options.supportPointer?me(document,"pointermove",this._handleFallbackAutoScroll):t.touches?me(document,"touchmove",this._handleFallbackAutoScroll):me(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?ge(document,"dragover",this._handleAutoScroll):(ge(document,"pointermove",this._handleFallbackAutoScroll),ge(document,"touchmove",this._handleFallbackAutoScroll),ge(document,"mousemove",this._handleFallbackAutoScroll)),Jt(),Kt(),clearTimeout(ye),ye=void 0},nulling:function(){Lt=Yt=Xt=Vt=qt=Gt=Ut=null,$t.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,r=(e.touches?e.touches[0]:e).clientX,n=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,n);if(Lt=e,t||this.options.forceAutoScrollFallback||se||le||ue){Zt(e,this.options,a,t);var i=Oe(a,!0);!Vt||qt&&r===Gt&&n===Ut||(qt&&Jt(),qt=setInterval((function(){var a=Oe(document.elementFromPoint(r,n),!0);a!==i&&(i=a,Kt()),Zt(e,o.options,a,t)}),10),Gt=r,Ut=n)}else{if(!this.options.bubbleScroll||Oe(a,!0)===Ee())return void Kt();Zt(e,this.options,Oe(a,!1),!1)}}},ne(e,{pluginName:"scroll",initializeByDefault:!0})}),Mt.mount(to,eo);const oo="object"==typeof global&&global&&global.Object===Object&&global;var ro="object"==typeof self&&self&&self.Object===Object&&self;const no=(oo||ro||Function("return this")()).Symbol;var ao=Object.prototype,io=ao.hasOwnProperty,lo=ao.toString,so=no?no.toStringTag:void 0;var uo=Object.prototype.toString;var co=no?no.toStringTag:void 0;function po(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":co&&co in Object(e)?function(e){var t=io.call(e,so),o=e[so];try{e[so]=void 0;var r=!0}catch(a){}var n=lo.call(e);return r&&(t?e[so]=o:delete e[so]),n}(e):function(e){return uo.call(e)}(e)}var ho=/\s/;var mo=/^\s+/;function go(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&ho.test(e.charAt(t)););return t}(e)+1).replace(mo,""):e}function fo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var vo=/^[-+]0x[0-9a-f]+$/i,bo=/^0b[01]+$/i,yo=/^0o[0-7]+$/i,xo=parseInt;function wo(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==po(e)}(e))return NaN;if(fo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=fo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=go(e);var o=bo.test(e);return o||yo.test(e)?xo(e.slice(2),o?2:8):vo.test(e)?NaN:+e}function _o(e){return e?Infinity===(e=wo(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var So=/^(?:0|[1-9]\d*)$/;function Do(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){if(!fo(e))return!1;var t=po(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}function Eo(e,t,o){if(!fo(o))return!1;var r=typeof t;return!!("number"==r?Do(o)&&function(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&So.test(e))&&e>-1&&e%1==0&&e<t}(t,o.length):"string"==r&&t in o)&&function(e,t){return e===t||e!=e&&t!=t}(o[t],e)}var Ro=Math.ceil,Co=Math.max;var ko,To=function(e,t,o){return o&&"number"!=typeof o&&Eo(e,t,o)&&(t=o=void 0),e=_o(e),void 0===t?(t=e,e=0):t=_o(t),function(e,t,o,r){for(var n=-1,a=Co(Ro((t-e)/(o||1)),0),i=Array(a);a--;)i[r?a:++n]=e,e+=o;return i}(e,t,o=void 0===o?e<t?1:-1:_o(o),ko)};const Io=To,No=Y(t({__name:"index",props:["data","pullDownRefresh"],setup(e){const t=e,r=o(),a=n((()=>"decorate"==r.mode?r:t.data));return E((()=>{if("decorate"==r.mode){var e=document.getElementById("componentList");const t=Mt.create(e,{group:"draggable-element",animation:200,onEnd:e=>{let o=r.value[e.oldIndex];r.value.splice(e.oldIndex,1),r.value.splice(e.newIndex,0,o),j((()=>{t.sort(Io(r.value.length).map((e=>e.toString()))),r.postMessage(e.newIndex,r.value[e.newIndex])}))}})}})),(e,o)=>{const n=i(l("diy-article"),L),v=i(l("diy-graphic-nav"),q),x=i(l("diy-horz-blank"),$),w=i(l("diy-image-ads"),V),_=i(l("diy-member-info"),K),D=i(l("diy-text"),J),E=i(l("diy-rubik-cube"),Z),R=i(l("diy-hot-area"),Q),C=S,k=i(l("tabbar"),F);return s(),d(C,{class:"diy-group",id:"componentList"},{default:u((()=>[(s(!0),c(p,null,h(f(a).value,((e,o)=>(s(),d(C,{key:e.id,onClick:t=>f(r).changeCurrentIndex(o,e),class:m(["draggable-element relative cursor-move",{selected:f(r).currentIndex==o,decorate:"decorate"==f(r).mode}]),style:g(e.pageStyle)},{default:u((()=>["Article"==e.componentName?(s(),d(n,{key:0,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"GraphicNav"==e.componentName?(s(),d(v,{key:1,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"HorzBlank"==e.componentName?(s(),d(x,{key:2,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"ImageAds"==e.componentName?(s(),d(w,{key:3,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"MemberInfo"==e.componentName?(s(),d(_,{key:4,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"Text"==e.componentName?(s(),d(D,{key:5,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"RubikCube"==e.componentName?(s(),d(E,{key:6,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0),"HotArea"==e.componentName?(s(),d(R,{key:7,component:e,index:o,pullDownRefresh:t.pullDownRefresh},null,8,["component","index","pullDownRefresh"])):y("",!0)])),_:2},1032,["onClick","class","style"])))),128)),"decorate"!=f(r).mode&&f(a).global.bottomTabBarSwitch?(s(),c(p,{key:0},[b(C,{class:"pt-[20rpx]"}),b(k)],64)):y("",!0)])),_:1})}}}),[["__scopeId","data-v-26c6536e"]]),Oo=t({__name:"index",props:["data","pullDownRefresh"],setup(e){const t=e;return(e,o)=>{const r=i(l("diy-group"),No),n=S;return s(),d(n,null,{default:u((()=>[x(" 固定模板示例,我也可以装修 "),b(r,{data:t.data,pullDownRefresh:t.pullDownRefresh},null,8,["data","pullDownRefresh"])])),_:1})}}}),Wo=Y(t({__name:"index",props:["data","pullDownRefresh"],setup(e){const t=e;return(e,o)=>{const r=i(l("fixed-demo-index"),Oo),n=S;return s(),d(n,{class:"fixed-group"},{default:u((()=>["demo-index"==t.data.global.component?(s(),d(r,{key:0,data:t.data,pullDownRefresh:t.pullDownRefresh},null,8,["data","pullDownRefresh"])):y("",!0)])),_:1})}}}),[["__scopeId","data-v-3b1723ce"]]);export{No as _,Wo as a};
|