index-legacy-df9165dd.js 3.1 KB

1
  1. !function(){const t=["window"];function e(t,e){if(null==t)return{};var o,n,i=function(t,e){if(null==t)return{};var o,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)o=r[n],e.indexOf(o)>=0||(i[o]=t[o]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n<r.length;n++)o=r[n],e.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(i[o]=t[o])}return i}System.register(["./index-legacy-f74d0852.js"],(function(o,n){"use strict";var i,r,s,d,c,l,a,f,u,m,p;return{setters:[t=>{i=t.d,r=t.c,s=t.t,d=t.v,c=t.w,l=t.b,a=t.x,f=t.y,u=t.z,m=t.o,p=t.r}],execute:function(){var y=document.createElement("style");y.textContent="._loading_xbdvm_1{display:flex;align-items:center;flex-direction:column;justify-content:center;font-size:.37333rem;height:1.46667rem!important}._loading_xbdvm_1 img{height:.8rem;width:3.2rem;margin-top:.53333rem;-o-object-fit:contain;object-fit:contain}._loading_xbdvm_1 ._des_xbdvm_15{margin-top:.53333rem}._sticky_4d2w6_1{position:sticky;top:0;z-index:99}._white_4d2w6_6{background-color:#fff}._white_4d2w6_6>div{padding-top:.4rem;box-shadow:0 0 .26667rem rgba(216,216,216,.5)}\n",document.head.appendChild(y);const v=""+new URL("loading-9729222e.gif",n.meta.url).href,g="_loading_xbdvm_1",h=(o("a",i({name:"o-loading",setup:()=>()=>r("div",{"class":g},[r("img",{"class":g,src:v},null)])})),"_sticky_4d2w6_1");function _(t){var e;const o="function"==typeof(n=t)?n():c(n);var n;return null!=(e=null==o?void 0:o.$el)?e:o}const b="undefined"!=typeof window&&"undefined"!=typeof document?window:void 0;function x(t){const e=function(){const t=f(!1);return u()&&m((()=>{t.value=!0})),t}();return l((()=>(e.value,Boolean(t()))))}function w(o,n,i={}){const{window:r=b}=i,c=e(i,t);let f;const u=x((()=>r&&"ResizeObserver"in r)),m=()=>{f&&(f.disconnect(),f=void 0)},p=l((()=>Array.isArray(o)?o.map((t=>_(t))):[_(o)])),y=a(p,(t=>{if(m(),u.value&&r){f=new ResizeObserver(n);for(const e of t)e&&f.observe(e,c)}}),{immediate:!0,flush:"post",deep:!0}),v=()=>{m(),y()};var g;return g=v,s()&&d(g),{isSupported:u,stop:v}}o("O",i({name:"m-sticky",props:{position:{type:String,"default":"top"},mode:{type:String,"default":"fixed"},offsetTop:{type:String,"default":"0px"},offsetBottom:{"default":"0px"},varName:{type:String,"default":"--header-height"}},emits:["barHeight"],setup(t,{slots:e,emit:o}){const n=p({divStyle:{},heightV:0,sectionStyle:{width:"100%",height:"auto",left:"0"}}),i=f(),s=f();return m((()=>{"top"===t.position?n.divStyle.top=t.offsetTop||"0px":n.divStyle.bottom=t.offsetBottom||"0px";try{w(i.value,(e=>{const i=e[0],{height:r}=i.contentRect;Math.abs(r-n.heightV)>1&&setTimeout((()=>{(e=>{n.sectionStyle.height=`${e}px`,n.heightV=e,document.documentElement.style.setProperty(t.varName,`${e}px`),o("barHeight",e)})(r)}),10)}))}catch(e){}})),a((()=>t.offsetTop),(()=>{n.divStyle.top=t.offsetTop})),a((()=>t.offsetBottom),(()=>{n.divStyle.bottom=t.offsetBottom})),()=>r("div",{style:[n.sectionStyle],"class":"sticky"===t.mode&&h},[r("div",{ref:i,"class":["van-sticky","fixed"===t.mode?"van-sticky--fixed":""],style:[n.divStyle,n.sectionStyle]},[r("div",{ref:s},[e["default"]&&e["default"]()])])])}}))}}}))}();