1 |
- !function(){function n(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null==t)return;var r,a,o=[],i=!0,c=!1;try{for(t=t.call(n);!(i=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);i=!0);}catch(l){c=!0,a=l}finally{try{i||null==t.return||t.return()}finally{if(c)throw a}}return o}(n,t)||function(n,t){if(!n)return;if("string"==typeof n)return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(n);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(n,t)}(n,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 e(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var t=document.createElement("style");t.innerHTML=":root{--van-notice-bar-height: 1.06667rem;--van-notice-bar-padding: 0 var(--van-padding-md);--van-notice-bar-wrapable-padding: var(--van-padding-xs) var(--van-padding-md);--van-notice-bar-text-color: var(--van-orange-dark);--van-notice-bar-font-size: var(--van-font-size-md);--van-notice-bar-line-height: .64rem;--van-notice-bar-background-color: var(--van-orange-light);--van-notice-bar-icon-size: .42667rem;--van-notice-bar-icon-min-width: .64rem}.van-notice-bar{position:relative;display:flex;align-items:center;height:var(--van-notice-bar-height);padding:var(--van-notice-bar-padding);color:var(--van-notice-bar-text-color);font-size:var(--van-notice-bar-font-size);line-height:var(--van-notice-bar-line-height);background:var(--van-notice-bar-background-color)}.van-notice-bar__left-icon,.van-notice-bar__right-icon{min-width:var(--van-notice-bar-icon-min-width);font-size:var(--van-notice-bar-icon-size)}.van-notice-bar__right-icon{text-align:right;cursor:pointer}.van-notice-bar__wrap{position:relative;display:flex;flex:1;align-items:center;height:100%;overflow:hidden}.van-notice-bar__content{position:absolute;white-space:nowrap;transition-timing-function:linear}.van-notice-bar__content.van-ellipsis{max-width:100%}.van-notice-bar--wrapable{height:auto;padding:var(--van-notice-bar-wrapable-padding)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal;word-wrap:break-word}\n",document.head.appendChild(t),System.register(["./ResizeObserver.es-legacy.8d60aee1.js"],(function(e){"use strict";var t,r,a,o,i,c,l,s,u,d,f,v,p,b,g,w,h,m,y;return{setters:[function(n){t=n.E,r=n.ab,a=n.d,o=n.U,i=n.S,c=n.ap,l=n.aa,s=n.af,u=n.ak,d=n.a3,f=n.a6,v=n.aF,p=n.j,b=n.N,g=n.Y,w=n.ar,h=n.au,m=n.M,y=n.O}],execute:function(){var x=n(t("notice-bar"),2),_=x[0],k=x[1],S={text:String,mode:String,color:String,delay:r(1),speed:r(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}},z=a({name:_,props:S,emits:["close","replay"],setup:function(n,e){var t,r=e.emit,a=e.slots,y=0,x=0,_=o(),S=o(),z=i({show:!0,offset:0,duration:0}),I=function(e){"closeable"===n.mode&&(z.show=!1,r("close",e))},E=function(){if(a["right-icon"])return a["right-icon"]();var e="closeable"===n.mode?"cross":"link"===n.mode?"arrow":void 0;return e?p(b,{name:e,class:k("right-icon"),onClick:I},null):void 0},T=function(){z.offset=y,z.duration=0,h((function(){w((function(){z.offset=-x,z.duration=(x+y)/+n.speed,r("replay")}))}))},A=function(){var e=n.delay,r=n.speed,a=n.scrollable,o=m(e)?1e3*+e:0;y=0,x=0,z.offset=0,z.duration=0,clearTimeout(t),t=setTimeout((function(){if(_.value&&S.value&&!1!==a){var n=g(_).width,e=g(S).width;(a||e>n)&&w((function(){y=n,x=e,z.offset=-x,z.duration=x/+r}))}}),o)};return c(A),l(A),s("pageshow",A),u({reset:A}),d((function(){return[n.text,n.scrollable]}),A),function(){var e,t,r=n.color,o=n.wrapable,i=n.background;return f(p("div",{role:"alert",class:k({wrapable:o}),style:{color:r,background:i}},[a["left-icon"]?a["left-icon"]():n.leftIcon?p(b,{class:k("left-icon"),name:n.leftIcon},null):void 0,(e=!1===n.scrollable&&!n.wrapable,t={transform:z.offset?"translateX(".concat(z.offset,"px)"):"",transitionDuration:"".concat(z.duration,"s")},p("div",{ref:_,role:"marquee",class:k("wrap")},[p("div",{ref:S,style:t,class:[k("content"),{"van-ellipsis":e}],onTransitionend:T},[a.default?a.default():n.text])])),E()]),[[v,z.show]])}}}),I=(e("N",y(z)),e("b",{exports:{}}).exports={});I.nextTick=function(){var n="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(n)return function(n){return window.setImmediate(n)};if(e){var t=[];return window.addEventListener("message",(function(n){var e=n.source;e!==window&&null!==e||"process-tick"!==n.data||(n.stopPropagation(),t.length>0&&t.shift()())}),!0),function(n){t.push(n),window.postMessage("process-tick","*")}}return function(n){setTimeout(n,0)}}(),I.title="browser",I.browser=!0,I.env={},I.argv=[],I.binding=function(n){throw new Error("process.binding is not supported")},I.cwd=function(){return"/"},I.chdir=function(n){throw new Error("process.chdir is not supported")}}}}))}();
|