import{g as jt,a as Rt,L as De,N as Ne,J as Me,D as Ft,i as Vt}from"./index-4942d7e6.js";function Ze(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&(_.children=arguments.length>3?ke.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)_[o]===void 0&&(_[o]=e.defaultProps[o]);return he(e,_,r,l,null)}function he(e,t,n,r,l){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:l==null?++bt:l};return l==null&&m.vnode!=null&&m.vnode(o),o}function V(e){return e.children}function q(e,t){this.props=e,this.context=t}function le(e,t){if(t==null)return e.__?le(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&K.sort(We));ye.__r=0}function xt(e,t,n,r,l,o,_,a,c,f){var i,v,d,s,y,N,S,T=r&&r.__k||kt,I=T.length;for(n.__k=[],i=0;i0?he(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null){if(s.__=n,s.__b=n.__b+1,(d=T[i])===null||d&&s.key==d.key&&s.type===d.type)T[i]=void 0;else for(v=0;v=0;t--)if((n=e.__k[t])&&(r=Nt(n)))return r}return null}function Jt(e,t,n,r,l){var o;for(o in n)o==="children"||o==="key"||o in t||be(e,o,null,n[o],r);for(o in t)l&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||be(e,o,t[o],n[o],r)}function Je(e,t,n){t[0]==="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||Gt.test(t)?n:n+"px"}function be(e,t,n,r,l){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Je(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Je(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Qe:Ke,o):e.removeEventListener(t,o?Qe:Ke,o);else if(t!=="dangerouslySetInnerHTML"){if(l)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n==null?"":n;break e}catch(_){}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Ke(e){return this.l[e.type+!1](m.event?m.event(e):e)}function Qe(e){return this.l[e.type+!0](m.event?m.event(e):e)}function Ve(e,t,n,r,l,o,_,a,c){var f,i,v,d,s,y,N,S,T,I,U,B,P,A,W,O=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(f=m.__b)&&f(t);try{e:if(typeof O=="function"){if(S=t.props,T=(f=O.contextType)&&r[f.__c],I=f?T?T.props.value:f.__:r,n.__c?N=(i=t.__c=n.__c).__=i.__E:("prototype"in O&&O.prototype.render?t.__c=i=new O(S,I):(t.__c=i=new q(S,I),i.constructor=O,i.render=Qt),T&&T.sub(i),i.props=S,i.state||(i.state={}),i.context=I,i.__n=r,v=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),O.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=J({},i.__s)),J(i.__s,O.getDerivedStateFromProps(S,i.__s))),d=i.props,s=i.state,i.__v=t,v)O.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(O.getDerivedStateFromProps==null&&S!==d&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(S,I),!i.__e&&i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(S,i.__s,I)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(i.props=S,i.state=i.__s,i.__d=!1),i.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(D){D&&(D.__=t)}),U=0;U=n.__.length&&n.__.push({__V:pe}),n.__[e]}function $e(e){return _e=1,en(Et,e)}function en(e,t,n){var r=we(ee++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Et(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],f=r.t(c,a);c!==f&&(r.__N=[f,r.__[1]],r.__c.setState({}))}],r.__c=L,!L.u)){var l=function(a,c,f){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(d){return d.__c});if(i.every(function(d){return!d.__N}))return!o||o.call(this,a,c,f);var v=!1;return i.forEach(function(d){if(d.__N){var s=d.__[0];d.__=d.__N,d.__N=void 0,s!==d.__[0]&&(v=!0)}}),!(!v&&r.__c.props===a)&&(!o||o.call(this,a,c,f))};L.u=!0;var o=L.shouldComponentUpdate,_=L.componentWillUpdate;L.componentWillUpdate=function(a,c,f){if(this.__e){var i=o;o=void 0,l(a,c,f),o=i}_&&_.call(this,a,c,f)},L.shouldComponentUpdate=l}return r.__N||r.__}function xe(e,t){var n=we(ee++,3);!m.__s&&qe(n.__H,t)&&(n.__=e,n.i=t,L.__H.__h.push(n))}function tn(e,t){var n=we(ee++,4);!m.__s&&qe(n.__H,t)&&(n.__=e,n.i=t,L.__h.push(n))}function nn(e){return _e=5,F(function(){return{current:e}},[])}function F(e,t){var n=we(ee++,7);return qe(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ye(e,t){return _e=8,F(function(){return e},t)}function rn(){for(var e;e=It.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ve),e.__H.__h.forEach(Re),e.__H.__h=[]}catch(t){e.__H.__h=[],m.__e(t,e.__v)}}m.__b=function(e){L=null,tt&&tt(e)},m.__r=function(e){nt&&nt(e),ee=0;var t=(L=e.__c).__H;t&&(Le===L?(t.__h=[],L.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=pe,n.__N=n.i=void 0})):(t.__h.forEach(ve),t.__h.forEach(Re),t.__h=[],ee=0)),Le=L},m.diffed=function(e){rt&&rt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(It.push(t)!==1&&et===m.requestAnimationFrame||((et=m.requestAnimationFrame)||on)(rn)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==pe&&(n.__=n.__V),n.i=void 0,n.__V=pe})),Le=L=null},m.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ve),n.__h=n.__h.filter(function(r){return!r.__||Re(r)})}catch(r){t.some(function(l){l.__h&&(l.__h=[])}),t=[],m.__e(r,n.__v)}}),ot&&ot(e,t)},m.unmount=function(e){it&&it(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ve(r)}catch(l){t=l}}),n.__H=void 0,t&&m.__e(t,n.__v))};var lt=typeof requestAnimationFrame=="function";function on(e){var t,n=function(){clearTimeout(r),lt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);lt&&(t=requestAnimationFrame(n))}function ve(e){var t=L,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),L=t}function Re(e){var t=L;e.__c=e.__(),L=t}function qe(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Et(e,t){return typeof t=="function"?t(e):t}var ln=0;function $(e,t,n,r,l,o){var _,a,c={};for(a in t)a=="ref"?_=t[a]:c[a]=t[a];var f={type:e,props:c,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ln,__source:l,__self:o};if(typeof e=="function"&&(_=e.defaultProps))for(a in _)c[a]===void 0&&(c[a]=_[a]);return m.vnode&&m.vnode(f),f}function _n(e,t){for(var n in t)e[n]=t[n];return e}function _t(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function at(e){this.props=e}(at.prototype=new q).isPureReactComponent=!0,at.prototype.shouldComponentUpdate=function(e,t){return _t(this.props,e)||_t(this.state,t)};var ct=m.__b;m.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ct&&ct(e)};var an=m.__e;m.__e=function(e,t,n,r){if(e.then){for(var l,o=t;o=o.__;)if((l=o.__c)&&l.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),l.__c(e,t)}an(e,t,n,r)};var st=m.unmount;function Pt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=_n({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Pt(r,t,n)})),e}function At(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return At(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Oe(){this.__u=0,this.t=null,this.__b=null}function Ht(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function se(){this.u=null,this.o=null}m.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),st&&st(e)},(Oe.prototype=new q).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var l=Ht(r.__v),o=!1,_=function(){o||(o=!0,n.__R=null,l?l(a):a())};n.__R=_;var a=function(){if(!--r.__u){if(r.state.__a){var f=r.state.__a;r.__v.__k[0]=At(f,f.__c.__P,f.__c.__O)}var i;for(r.setState({__a:r.__b=null});i=r.t.pop();)i.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(_,_)},Oe.prototype.componentWillUnmount=function(){this.t=[]},Oe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Pt(this.__b,n,r.__O=r.__P)}this.__b=null}var l=t.__a&&ie(V,null,e.fallback);return l&&(l.__h=null),[ie(V,null,t.__a?null:e.children),l]};var ut=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),Xe(ie(cn,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function un(e,t){var n=ie(sn,{__v:e,i:t});return n.containerInfo=t,n}(se.prototype=new q).__a=function(e){var t=this,n=Ht(t.__v),r=t.o.get(e);return r[0]++,function(l){var o=function(){t.props.revealOrder?(r.push(l),ut(t,e,r)):l()};n?n(o):o()}},se.prototype.render=function(e){this.u=null,this.o=new Map;var t=ge(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},se.prototype.componentDidUpdate=se.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ut(e,n,t)})};var fn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,dn=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,hn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,pn=/[A-Z0-9]/g,vn=typeof document<"u",mn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};q.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(q.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ft=m.event;function yn(){}function gn(){return this.cancelBubble}function bn(){return this.defaultPrevented}m.event=function(e){return ft&&(e=ft(e)),e.persist=yn,e.isPropagationStopped=gn,e.isDefaultPrevented=bn,e.nativeEvent=e};var $n={enumerable:!1,configurable:!0,get:function(){return this.class}},dt=m.vnode;m.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,l={};for(var o in n){var _=n[o];if(!(o==="value"&&"defaultValue"in n&&_==null||vn&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&_===!0?_="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||mn(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":hn.test(o)?o=a:r.indexOf("-")===-1&&dn.test(o)?o=o.replace(pn,"-$&").toLowerCase():_===null&&(_=void 0):a=o="oninput",a==="oninput"&&l[o=a]&&(o="oninputCapture"),l[o]=_}}r=="select"&&l.multiple&&Array.isArray(l.value)&&(l.value=ge(n.children).forEach(function(c){c.props.selected=l.value.indexOf(c.props.value)!=-1})),r=="select"&&l.defaultValue!=null&&(l.value=ge(n.children).forEach(function(c){c.props.selected=l.multiple?l.defaultValue.indexOf(c.props.value)!=-1:l.defaultValue==c.props.value})),n.class&&!n.className?(l.class=n.class,Object.defineProperty(l,"className",$n)):(n.className&&!n.class||n.class&&n.className)&&(l.class=l.className=n.className),t.props=l}(e),e.$$typeof=fn,dt&&dt(e)};var ht=m.__r;m.__r=function(e){ht&&ht(e),e.__c};var pt=m.diffed;m.diffed=function(e){pt&&pt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};var Cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ie,Ee,Pe,Ae,ze=((Ie=window.SL_State)===null||Ie===void 0?void 0:Ie.get("storeInfo.currency"))||"CNY",Bt=((Ee=window.SL_State)===null||Ee===void 0?void 0:Ee.get("currencyCode"))||ze,oe=((Pe=window.SL_State)===null||Pe===void 0?void 0:Pe.get("request.locale"))||"en",kn=Xt({locale:oe,storeCurrency:ze,currencyCode:Bt,currencyRates:((Ae=window.SL_State)===null||Ae===void 0?void 0:Ae.get("currencyRates"))||{}}),Sn=function(t){var n=t.storeCurrency,r=n===void 0?ze:n,l=t.locale,o=l===void 0?oe:l,_=t.children,a=$e(Bt),c=Ue(a,2),f=c[0],i=c[1],v=$e(oe!=null?oe:o),d=Ue(v,2),s=d[0],y=d[1];tn(function(){var S=function(P){i(P)},T=function(P){y(P)};if(window.Shopline){var I,U;(I=window.SL_State)===null||I===void 0||I.on("currencyCode",S),(U=window.SL_State)===null||U===void 0||U.on("request.locale",T)}return function(){if(window.Shopline){var B,P,A,W;(B=window.SL_State)===null||B===void 0||(P=B.bus)===null||P===void 0||P.removeListener("currencyCode",S),(A=window.SL_State)===null||A===void 0||(W=A.bus)===null||W===void 0||W.removeListener("request.locale",T)}}},[]);var N=F(function(){var S;return{locale:s,storeCurrency:r,currencyCode:f,currencyRates:((S=window.SL_State)===null||S===void 0?void 0:S.get("currencyRates"))||{}}},[s,r,f]);return $(kn.Provider,{value:N,children:_})};const wn=Sn;function xn(e){var t=nn(e);return t.current=e,t}var Ut={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Cn,function(){var n=1e3,r=6e4,l=36e5,o="millisecond",_="second",a="minute",c="hour",f="day",i="week",v="month",d="quarter",s="year",y="date",N="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(g){var p=["th","st","nd","rd"],u=g%100;return"["+g+(p[(u-20)%10]||p[u]||p[0])+"]"}},U=function(g,p,u){var b=String(g);return!b||b.length>=p?g:""+Array(p+1-b.length).join(u)+g},B={s:U,z:function(g){var p=-g.utcOffset(),u=Math.abs(p),b=Math.floor(u/60),h=u%60;return(p<=0?"+":"-")+U(b,2,"0")+":"+U(h,2,"0")},m:function g(p,u){if(p.date()1)return g(C[0])}else{var x=p.name;A[x]=p,h=x}return!b&&h&&(P=h),h||!b&&P},D=function(g,p){if(W(g))return g.clone();var u=typeof p=="object"?p:{};return u.date=g,u.args=arguments,new Q(u)},w=B;w.l=O,w.i=W,w.w=function(g,p){return D(g,{locale:p.$L,utc:p.$u,x:p.$x,$offset:p.$offset})};var Q=function(){function g(u){this.$L=O(u.locale,null,!0),this.parse(u)}var p=g.prototype;return p.parse=function(u){this.$d=function(b){var h=b.date,k=b.utc;if(h===null)return new Date(NaN);if(w.u(h))return new Date;if(h instanceof Date)return new Date(h);if(typeof h=="string"&&!/Z$/i.test(h)){var C=h.match(S);if(C){var x=C[2]-1||0,E=(C[7]||"0").substring(0,3);return k?new Date(Date.UTC(C[1],x,C[3]||1,C[4]||0,C[5]||0,C[6]||0,E)):new Date(C[1],x,C[3]||1,C[4]||0,C[5]||0,C[6]||0,E)}}return new Date(h)}(u),this.$x=u.x||{},this.init()},p.init=function(){var u=this.$d;this.$y=u.getFullYear(),this.$M=u.getMonth(),this.$D=u.getDate(),this.$W=u.getDay(),this.$H=u.getHours(),this.$m=u.getMinutes(),this.$s=u.getSeconds(),this.$ms=u.getMilliseconds()},p.$utils=function(){return w},p.isValid=function(){return this.$d.toString()!==N},p.isSame=function(u,b){var h=D(u);return this.startOf(b)<=h&&h<=this.endOf(b)},p.isAfter=function(u,b){return D(u)0&&arguments[0]!==void 0?arguments[0]:{},n=t||{},r=n.leftTime,l=n.targetDate,o=n.interval,_=o===void 0?1e3:o,a=n.onEnd,c=F(function(){return"leftTime"in t?Dn(r)&&r>0?Date.now()+r:void 0:l},[r,l]),f=$e(function(){return He(c)}),i=Ue(f,2),v=i[0],d=i[1],s=xn(a);xe(function(){if(!c){d(0);return}d(He(c));var N=setInterval(function(){var S=He(c);if(d(S),S===0){var T;clearInterval(N),(T=s.current)===null||T===void 0||T.call(s)}},_);return function(){return clearInterval(N)}},[c,_]);var y=F(function(){return Nn(v)},[v]);return[v,y]};const Ln=Mn;var Wt={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],l=0;l$("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$("rect",{opacity:"0.8",x:"10",y:"10",width:"20",height:"20",rx:"10",fill:"white"}),$("path",{d:"M20.0003 21.0618L23.4698 24.5314L24.5305 23.4708L21.061 20.0011L24.5306 16.5314L23.47 15.4708L20.0003 18.9404L16.5303 15.4702L15.4696 16.5309L18.9397 20.0011L15.47 23.4708L16.5306 24.5314L20.0003 21.0618Z",fill:"black"})]}),Be=({style:e})=>$("svg",{style:e,width:"4",height:"10",viewBox:"0 0 4 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$("circle",{cx:"2",cy:"1.5",r:"1.5",fill:"currentColor"}),$("circle",{cx:"2",cy:"8.5",r:"1.5",fill:"currentColor"})]}),In="_scrollContent_1s7kx_2",En="_noticeBoardContentBox_1s7kx_7",Pn="_ticker_1s7kx_1",An="_layout_1s7kx_81",Hn="_festivalUrl_1s7kx_99",Bn="_background_1s7kx_103",Un="_closeIcon_1s7kx_108",Wn="_body_1s7kx_119",R={scrollContent:In,noticeBoardContentBox:En,ticker:Pn,layout:An,festivalUrl:Hn,background:Bn,closeIcon:Un,body:Wn},jn=({style:e,children:t,onClose:n,showCloseBtn:r=!1,linkConfig:l,festivalUrl:o,onClick:_,textScroll:a})=>{const c=()=>{typeof _=="function"&&_()},f=o?{backgroundImage:`url(${o})`}:{};return $("a",{...l,onClick:c,className:Ce(R.layout,o?R.festivalUrl:R.background),style:{...e,...f},children:[r&&$("span",{className:R.closeIcon,onClick:i=>(i.preventDefault(),n==null||n(),!1),children:$(On,{})}),a?$(V,{children:[$("div",{className:`${R.scrollContent}`,children:$("div",{className:R.body,children:t})}),$("div",{className:`${R.scrollContent}`,children:$("div",{className:R.body,children:t})}),$("div",{className:`${R.scrollContent}`,children:$("div",{className:R.body,children:t})}),$("div",{className:`${R.scrollContent}`,children:$("div",{className:R.body,children:t})})]}):$("div",{className:R.body,children:t})]})},Rn="_countDown_iq4xt_1",Fn="_timeItem_iq4xt_6",Vn="_timeColon_iq4xt_17",G={countDown:Rn,timeItem:Fn,timeColon:Vn};function Yn(e){const n=new Date().getTime();if(e.timeType==="HOWLONG"){let o=(e.startTimeStamp?e.startTimeStamp:new Date().getTime())%864e5,_=n%864e5;_a&&(a+=864e5);const c=o+_%864e5;let f=o+a%864e5;f<=c&&(f+=864e5);const i=c-864e5,v=f-864e5;return n<=v&&n>=i?{startTime:i,endTime:v}:{startTime:c,endTime:f}}const r=new Date(e.customStartTime).getTime(),l=new Date(e.customEndTime).getTime();return{startTime:r,endTime:l}}function ue(e){return Number(e)>=10?`${e}`:`0${e}`}const qn=({countDownBgColor:e,countDownNumColor:t,dataSource:n,isPreview:r})=>{const l=F(()=>{const i=Yn(n),v=new Date().getTime();return v>=i.startTime&&v<=i.endTime?{start:!0,time:i.endTime}:{start:!1,time:v}},[n]),[,o]=Ln({targetDate:l.time}),{days:_,hours:a,minutes:c,seconds:f}=o;return!l.start&&!r?null:$("div",{className:Ce(G.countDown,"isolate"),onClick:i=>(i.preventDefault(),!1),style:{direction:"ltr"},children:[_>0&&$(V,{children:[$("span",{className:G.timeItem,style:{backgroundColor:e,color:t},children:ue(_)}),$("span",{className:G.timeColon,children:$(Be,{style:{color:e}})})]}),$("span",{className:G.timeItem,style:{backgroundColor:e,color:t},children:ue(a)}),$("span",{className:G.timeColon,children:$(Be,{style:{color:e}})}),$("span",{className:G.timeItem,style:{backgroundColor:e,color:t},children:ue(c)}),$("span",{className:G.timeColon,children:$(Be,{style:{color:e}})}),$("span",{className:G.timeItem,style:{backgroundColor:e,color:t},children:ue(f)})]})},vt={Home:101,Products:103,ProductsDetail:105,ProductsSearch:102,Center:123,Cart:106,404:130,CustomPage:118},mt=jt();let Fe;Rt()?Fe=vt.CustomPage:mt&&(Fe=vt[mt]);const fe={view:{event_id:1292,page:150,module:-999,component:-999,action_type:101},closeButton:{event_id:1294,page:150,module:-999,component:101,action_type:102},textClick:{event_id:1295,page:150,module:-999,component:102,action_type:102},noticeButton:{event_id:1296,page:150,module:-999,component:103,action_type:102}},de=e=>{var n,r,l;const t={app_id:"955f3c5181e4bcd6eaf2270a7c4028751b790788",...e};(l=(r=(n=window.HdSdk)==null?void 0:n.shopTracker)==null?void 0:r.collect)==null||l.call(r,t)},zn="_scrollContent_1tmex_2",Zn="_noticeBoardContentBox_1tmex_7",Gn="_ticker_1tmex_1",Jn="_noticeBoardContent_1tmex_7",Kn="_actions_1tmex_104",Qn="_discountCode_1tmex_110",Xn="_button_1tmex_122",re={scrollContent:zn,noticeBoardContentBox:Zn,ticker:Gn,noticeBoardContent:Jn,actions:Kn,discountCode:Qn,button:Xn},yt={[De.CUSTOMER_PAGE]:{prefix:"/custom",transformLink(e){return`${this.prefix}/${e.linkParams}`}},[De.PRESET_PAGE]:{aliasMap:{home:"/"},transformLink(e){return this.aliasMap[e.linkParams]}},[De.OUT_LINK]:{transformLink(e){return e.linkParams}}};function er(e={},t){var n,r;return((n=yt[e.type])==null?void 0:n.transformLink(e))&&!t?{href:(r=yt[e.type])==null?void 0:r.transformLink(e),target:e.openMode?"_blank":"_self"}:{href:"javascript:;",target:"_self"}}function tr(e){return e&&Object.keys(e)&&Object.keys(e).length>0}function gt(e){return e?e.indexOf("url(")<0?`url("${e}")`:e:void 0}const nr=({data:e,hideItem:t,isPreview:n,isMobile:r})=>{var C;const{id:l,style:o,content:_,showCloseBtn:a,link:c,type:f,discountCodeNoticeBoard:i,countDownNoticeBoard:v,festivalNoticeBoard:d,textNoticeBoard:s}=e||{},{btnText:y,jumpMode:N}=c||{},{backgroundColor:S,backgroundImage:T,mobileBackgroundImage:I,buttonBgColor:U,buttonTextColor:B,countDownBgColor:P,countDownNumColor:A,discountColor:W,enableImg:O}=o||{},D=F(()=>er(c,n),[c,n]),w=()=>{n||de({...fe.closeButton,activity_id:l}),typeof t=="function"&&t()},Q=Ye(()=>{n||de({...fe.textClick,activity_id:l})},[n,l]),ae=()=>{n||de({...fe.noticeButton,activity_id:l})};xe(()=>{n||de({...fe.view,page_id:Fe,activity_id:l})},[n,l]);const g=F(()=>({discountCode:f===Ne.DISCOUNT_CODE_NOTICE_BOARD&&(i==null?void 0:i.discountCode)||f===Ne.FESTIVAL_NOTICE_BOARD&&(d==null?void 0:d.discountCode),countDown:f===Ne.COUNT_DOWN_NOTICE_BOARD&&tr(v),button:N===Me.CLICK_BUTTON&&y}),[f,i==null?void 0:i.discountCode,v,N,y,d==null?void 0:d.discountCode]),p=F(()=>(d==null?void 0:d.textScroll)||(s==null?void 0:s.textScroll),[d,s]),{finalBackgroundImage:u,finalMobilBackgroundImage:b}=F(()=>({finalBackgroundImage:gt(T),finalMobilBackgroundImage:gt(I)}),[T,I]);let h=O;O==null&&(b||u?h=1:h=0);let k;return`${h}`=="1"&&(b||u)&&(k=r&&b||u),$(V,{children:$(jn,{linkConfig:N===Me.CLICK_WHOLE||N===null?D:{href:"javascript:;",target:"_self"},style:{backgroundColor:S,backgroundImage:k},festivalUrl:`${h}`=="2"?(C=d==null?void 0:d.template)==null?void 0:C.picUrl:"",onClose:w,showCloseBtn:a,noticeType:f,onClick:N===Me.CLICK_WHOLE||N===null?Q:void 0,isPreview:n,textScroll:p,children:[$("div",{className:` ${re.noticeBoardContentBox}`,children:$("div",{className:re.noticeBoardContent,dangerouslySetInnerHTML:{__html:`${_}`}})}),(g.button||g.countDown||g.discountCode)&&$("div",{className:re.actions,children:[g.countDown&&v&&$(qn,{isPreview:n,countDownBgColor:P,countDownNumColor:A,dataSource:v}),g.discountCode&&$("span",{className:re.discountCode,style:{border:`1.5px solid ${W}`,color:W},onClick:x=>(x.preventDefault(),!1),children:g.discountCode}),g.button&&$("a",{...D,className:re.button,onClick:ae,style:{color:B,background:U},children:$("span",{children:y})})]})]})})};const rr=({options:e,toggleNotice:t})=>{const{salesNoticeInfo:n}=e||{},{noticeBoardList:r,isPreview:l,isMobile:o}=n;xe(()=>{t(!0)},[t]);const _=Ye(()=>{l||t(!1)},[l,t]);return $(V,{children:r.map(a=>$(nr,{hideItem:_,data:a,isPreview:l,isMobile:o},a.id))})},or="sales-notice-plugin",lr=({options:e})=>{var a,c,f,i,v,d;const[t,n]=$e(null),r=(f=(c=(a=e==null?void 0:e.salesNoticeInfo)==null?void 0:a.noticeBoardList)==null?void 0:c[0])==null?void 0:f.displayEffect,l=(i=e==null?void 0:e.salesNoticeInfo)==null?void 0:i.isPreview,o=F(()=>Ce(r===Ft.TOP?"notranslate notice-plugin-top":"notranslate notice-plugin-top-fixed",{"notice-plugin-is-preview":l}),[r,l]);xe(()=>{var y,N;let s=null;return(y=e==null?void 0:e.salesNoticeInfo)!=null&&y.previewSlotId?n(document.getElementById((N=e==null?void 0:e.salesNoticeInfo)==null?void 0:N.previewSlotId)):(s=document.createElement("div"),s.id=or,s.className=o,document.body.insertBefore(s,document.body.childNodes[0]),n(s)),()=>{s&&s.remove()}},[(v=e==null?void 0:e.salesNoticeInfo)==null?void 0:v.previewSlotId,o]);const _=Ye(s=>{t&&(t.className=Ce(o,s?"notice-plugin-show":"notice-plugin-hide"))},[o,t]);return!t||!Vt((d=e==null?void 0:e.salesNoticeInfo)==null?void 0:d.noticeBoardList)?null:$(V,{children:un($(wn,{children:$(rr,{options:e,toggleNotice:_})}),t)})};export{lr as A,Xe as D,F,Xt as G,Ue as _,$e as h,$ as o,xe as p};