1 |
- !function(){function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var a,r,l=[],o=!0,i=!1;try{for(t=t.call(e);!(o=(a=t.next()).done)&&(l.push(a.value),!n||l.length!==n);o=!0);}catch(c){i=!0,r=c}finally{try{o||null==t.return||t.return()}finally{if(i)throw r}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}var t=document.createElement("style");t.innerHTML=':root{--van-collapse-item-transition-duration: var(--van-animation-duration-base);--van-collapse-item-content-padding: var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size: var(--van-font-size-md);--van-collapse-item-content-line-height: 1.5;--van-collapse-item-content-text-color: var(--van-text-color-2);--van-collapse-item-content-background-color: var(--van-background-color-light);--van-collapse-item-title-disabled-color: var(--van-text-color-3)}.van-collapse-item{position:relative}.van-collapse-item--border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:.02667rem solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon:before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-transition-duration)}.van-collapse-item__title:after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon:before{transform:rotate(-90deg)}.van-collapse-item__title--expanded:after{display:block}.van-collapse-item__title--borderless:after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-transition-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background:var(--van-collapse-item-content-background-color)}\n',document.head.appendChild(t),System.register(["./index-legacy.f8641610.js","./index-legacy.fc510843.js"],(function(n){"use strict";var t,a,r,l,o,i,c,d,u,s,v,p,f,m,g,b,h,y,_,x,k,w,S,j;return{setters:[function(e){t=e.E,a=e.H,r=e.d,l=e.aj,o=e.i,i=e.ay,c=e.O,d=e.J,u=e.G,s=e.U,v=e.at,p=e.W,f=e.bA,m=e.a3,g=e.ar,b=e.ak,h=e.X,y=e.au,_=e.aB,x=e.a8,k=e.a6,w=e.aF},function(e){S=e.c,j=e.C}],execute:function(){var A=e(t("collapse"),2),z=A[0],C=A[1],E=Symbol(z),O={border:a,accordion:Boolean,modelValue:{type:[String,Number,Array],default:""}},V=r({name:z,props:O,emits:["change","update:modelValue"],setup:function(e,n){var t=n.emit,a=n.slots,r=l(E).linkChildren,c=function(e){t("change",e),t("update:modelValue",e)};return r({toggle:function(n,t){var a=e.accordion,r=e.modelValue;c(a?n===r?"":n:t?r.concat(n):r.filter((function(e){return e!==n})))},isExpanded:function(n){var t=e.accordion,a=e.modelValue;return t?a===n:a.includes(n)}}),function(){var n,t,r,l;return o("div",{class:[C(),(t={},r=i,l=e.border,r in t?Object.defineProperty(t,r,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[r]=l,t)]},[null==(n=a.default)?void 0:n.call(a)])}}}),B=(n("C",c(V)),e(t("collapse-item"),2)),H=B[0],I=B[1],L=["icon","title","value","label","right-icon"],T=d({},S,{name:u,isLink:a,disabled:Boolean,readonly:Boolean,lazyRender:a}),M=r({name:H,props:T,setup:function(e,n){var t=n.slots,a=s(),r=s(),l=v(E),i=l.parent,c=l.index;if(i){var d=p((function(){var n;return null!=(n=e.name)?n:c.value})),u=p((function(){return i.isExpanded(d.value)})),A=s(u.value),z=f((function(){return A.value||!e.lazyRender})),C=function(){u.value?a.value&&(a.value.style.height=""):A.value=!1};m(u,(function(e,n){null!==n&&(e&&(A.value=!0),(e?h:y)((function(){if(r.value&&a.value){var n=r.value.offsetHeight;if(n){var t="".concat(n,"px");a.value.style.height=e?"0":t,g((function(){a.value&&(a.value.style.height=e?t:"0")}))}else C()}})))}));var O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!u.value;i.toggle(d.value,e)},V=function(){e.disabled||e.readonly||O()},B=z((function(){var e;return k(o("div",{ref:a,class:I("wrapper"),onTransitionend:C},[o("div",{ref:r,class:I("content")},[null==(e=t.default)?void 0:e.call(t)])]),[[w,A.value]])}));return b({toggle:O}),function(){return o("div",{class:[I({border:c.value&&e.border})]},[(n=e.border,a=e.disabled,r=e.readonly,l=_(e,Object.keys(S)),r&&(l.isLink=!1),(a||r)&&(l.clickable=!1),o(j,x({role:"button",class:I("title",{disabled:a,expanded:u.value,borderless:!n}),"aria-expanded":String(u.value),onClick:V},l),_(t,L))),B()]);var n,a,r,l}}}});n("a",c(M))}}}))}();
|