PageSourceSearch

https://wolfbet.com/_next/static/chunks/PromotionModal.0e4a5a872292a32a.js

js wolfbet.com collected 2026-09-24 08:56:51 UTC 24,613 bytes, 5 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a8b0bc1e-eed9-5695-b7b6-b1f56bc01e38")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31615],{32608:function(e,t,n){n.d(t,{Vf:function(){return p},f:function(){return m},r6:function(){return u}});var r=n(7297),o=n(85893),a=(n(67294),n(68777)),s=n(94184),i=n.n(s);function c(){var e=(0,r.Z)(["\n\tborder-bottom: 1px solid var(--color-dark-600);\n\tmargin-bottom: 24px;\n\tmargin-top: unset;\n\tpadding-bottom: 24px;\n\ttext-transform: uppercase;\n\twidth: 100%;\n"]);return c=function(){return e},e}function l(){var e=(0,r.Z)(["\n\t"," {\n\t\talign-items: center;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 16px;\n\t\tjustify-content: space-between;\n\t}\n"]);return l=function(){return e},e}var u=function(e){var t=e.children,n=e.className;return(0,o.jsx)(m,{className:i()("text-style-h-6-cap",n),children:t})},m=a.ZP.h5.withConfig({componentId:"sc-fb41a523-0"})(c()),p=a.ZP.div.withConfig({componentId:"sc-fb41a523-1"})(l(),m)},3072:function(e,t,n){n.d(t,{t:function(){return r}});var r=(0,n(67294).createContext)({setNoCloseButton:function(){return{}},close:function(){return{}}})},22132:function(e,t,n){n.d(t,{B:function(){return c}});var r=n(26653),o=n(175),a=n(62856),s=n(82835),i=n(79491),c=function(){var e=(0,r.b)(o.MG),t=(0,s.Ep)();(0,a.F)((function(){i.p.getModalCloseCallback(t)||e()}))}},19718:function(e,t,n){n.d(t,{_:function(){return s}});var r=n(7297),o=n(68777);function a(){var e=(0,r.Z)(["\n\t\t",";\n\n\t\t@media (max-width: ",") {\n\t\t\t",";\n\t\t}\n\t"]);return a=function(){return e},e}var s=function(e){return(0,o.iv)(a(),e(24,24,32,24),(function(e){return e.theme.media_v2.max_tablet_small}),e(12,12,16,12))}},84521:function(e,t,n){n.r(t),n.d(t,{default:function(){return oe}});var r=n(14924),o=n(85893),a=n(67294),s=n(32608),i=n(81374),c=n(5188),l=n(36595),u=n(29815),m=n(27248),p=n(19563),d=n(85384),f=n(78170),b=n(81789),h=function(e){var t=e.max,n=e.min,r=e.current,o=e.decimals,a=void 0===o?2:o;return(0,p.Q)((r-n)/(t-n)*100,a)},x=n(47134),v=n(93860),y=n(9297),j=n(26042),T=n(40393),g=n(26653),w=n(29143),O=n(16714),C=n(83220),N=n(29685),P=n(90738),S=function(e){var t=(0,g.b)(w.IC),n=(0,d.wc)(e.promotionType,"min_bet"),r=(0,P.J)(),a=(0,O.k)(r);return(0,o.jsx)("span",{className:"cursor-pointer flex justify-center items-center",onClick:function(){t({question:{label:"You need to place bet with an amount at least {{min_bet}} in cryptocurrency. Example: {{example}}",namespace:f.N.PROMOTION,options:{min_bet:"$".concat(n),example:"$".concat(n," = ").concat((0,N.F)((0,p.Q)(n/a,C.v.decimals.bet))," ").concat(r.toUpperCase())}},text:{label:"Got it",namespace:f.N.PROMOTION},disableCancelButton:!0})},children:(0,o.jsx)(T.InfoIcon,(0,j.Z)({},e))})},E=function(e){var t=(0,g.b)(w.IC),n=(0,d.wc)(e.promotionType,"max_deposit"),r=(0,d.wc)(e.promotionType,"bonus_multiplier"),a=(0,P.J)(),s=(0,O.k)(a),i=(0,p.Q)(n*r,C.v.decimals.bet);return(0,o.jsx)("span",{className:"cursor-pointer flex justify-center items-center",onClick:function(){t({question:{label:"You can receive maximum {{max_bonus}} in cryptocurrency to join the promotion. Example: {{example}}",namespace:f.N.PROMOTION,options:{max_bonus:"$".concat(i),example:"$".concat(i," = ").concat((0,N.F)((0,p.Q)(i/s,C.v.decimals.bet))," ").concat(a.toUpperCase())}},text:{label:"Got it",namespace:f.N.PROMOTION},disableCancelButton:!0})},children:(0,o.jsx)(T.InfoIcon,(0,j.Z)({},e))})},M=n(40231),D=f.N.PROMOTION,_=function(e){var t=function(e){var t=(0,d.Yp)(e),n=(0,d.Vc)(e),r=(0,d.wc)(e,"bonus_multiplier"),a=(0,d.wc)(e,"min_deposit"),s=(0,d.wc)(e,"max_deposit"),i=(0,d.wc)(e,"wagering_multiplier"),l=(0,d.wc)(e,"received_bonus"),f=(0,d.wc)(e,"start_at"),j=(0,d.wc)(e,"expire_at"),T=(0,d.wc)(e,"progress"),g=(0,d.wc)(e,"status"),w=(0,d.wc)(e,"min_bet"),O=(0,d.wc)(e,"max_bet_percentage"),N=(0,d.wc)(e,"max_bonus_percentage");return t?(0,u.Z)((0,M.u)(g)?[{id:"progress",label:{label:"Progress",namespace:D},content:"".concat(Math.min((0,p.Q)(100*T,2),100),"%"),children:(0,o.jsx)(b.f,{className:"block mt-4 mb-1",progress:Math.min((0,p.Q)(100*T,2),100)})}]:[]).concat((0,u.Z)(!n&&j?[{id:"expire_at",label:{label:"Time to activate",namespace:D},content:(0,o.jsx)(m.s,{date:j}),children:(0,o.jsx)(b.f,{className:"block mt-4 mb-1",progress:Math.min(h({max:(0,x.u3)(j),min:(0,x.u3)(f),current:(0,x.u3)(),decimals:2}),100)})}]:[]),(0,u.Z)(l?[{id:"received_bonus",label:{label:"Bonus",namespace:D},content:(0,o.jsx)(v.f,{promotionType:e})}]:[]),[{id:"bonus_multiplier",label:{label:"Deposit bonus",namespace:D},content:"".concat(100*r,"%")}],(0,u.Z)(n?[]:[{id:"min_deposit",labelNode:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,o.jsx)(c.rj,{label:"Min deposit"}
3),(0,o.jsx)(y.D,{promotionType:e,className:"h-[15px]"})]}),content:"$".concat(a)},{id:"max_deposit",labelNode:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,o.jsx)(c.rj,{label:"Max bonus"}),(0,o.jsx)(E,{promotionType:e,className:"h-[15px]"})]}),content:"$".concat((0,p.Q)(s*r,C.v.decimals.bet))}]),[{id:"min_wager",label:{label:"Wager requirement",namespace:D},content:"".concat(i,"x")},{id:"min_bet",labelNode:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,o.jsx)(c.rj,{label:"Min bet"}),(0,o.jsx)(S,{promotionType:e,className:"h-[15px]"})]}),content:"$".concat(w)},{id:"max_bet_percentage",label:{label:"Max bet",namespace:D},content:(0,o.jsx)(c.rj,{label:"{{percentage}}% of deposit",options:{percentage:(0,p.Q)(O,2)}})}],(0,u.Z)(N||0===N?[{id:"max_bonus_percentage",label:{label:"Max claim",namespace:D},content:(0,o.jsx)(c.rj,{label:"{{percentage}}% of initially accrued bonus",options:{percentage:(0,p.Q)(Number(N)+100,2)}})}]:[]),(0,u.Z)(n?[{id:"expire_at",label:{label:"Time left to wager",namespace:D},content:(0,o.jsx)(m.s,{date:j})}]:[])):[]}(e.promotionType);return(0,o.jsx)(o.Fragment,{children:t.map((function(e){var t=e.id,n=e.label,r=e.labelNode,a=e.content,s=e.children;return(0,o.jsxs)("div",{className:"border-color-dark-600 border-b-2 pb-4 pt-4",children:[(0,o.jsxs)("div",{className:"flex justify-between",children:[(0,o.jsx)("div",{children:r||(0,o.jsx)(c.pp,{label:n})}),(0,o.jsx)("div",{className:"text-style-md-medium text-right",children:a})]}),s]},t)}))})},I=n(99898),k=n(40550),R=n(80807),A=n(84689),Z=n(89215),U=n(86500),L=function(e){var t=e.promotionType,n=(0,d.Pd)(t),r=(0,U.X)(t),a=r.changeActiveState,s=r.loading;return(0,o.jsx)(Z.zx,{onClick:function(){return a(!n)},styleType:n?k.S.OUTLINE:k.S.PRIMARY,size:R.$.MEDIUM,label:(0,o.jsx)(c.rj,{label:n?"Deactivate bonus":"Activate bonus"}),children:(0,o.jsx)(A.a,{active:!!s})})},z=n(47568),B=n(97582),F=n(59727),Y=n(64792),$=n(37508),W=n(43689),H=n(80429),Q=n(25787),J=n(88507),q=n(96236),G=n(175),V=n(55714),K=function(e){var t=e.promotionType,n=(0,H.u)(Q.UW.WELCOME_BONUS_MOCK_API),r=(0,d.wc)(t,"id"),s=(0,g.b)(J.k.showAlert),i=(0,g.b)(q.W),l=(0,g.b)(G.h7),u=(0,g.b)(w.IC),m=(0,a.useState)(!1),p=m[0],b=m[1],h=(0,a.useCallback)((0,z.Z)((function(){var e;return(0,B.__generator)(this,(function(o){switch(o.label){case 0:return b(!0),[4,n({url:(0,Y.nu)(Y.ln.apiUserPromotionCancel),disableErrorHandler:!0,parameters:{method:"POST",body:{id:r}},loaderId:$.O.PROMOTION_CANCEL})];case 1:return(e=o.sent()).status>=400?[4,(0,W.H5)(new Error("Error on promotion cancel"),{promotionId:r,promotionType:t,responseStatus:e.status,response:e})]:[3,3];case 2:return o.sent(),b(!1),[2,s({type:F.C.ERROR,label:"Error on cancel, please try again later",namespace:f.N.PROMOTION})];case 3:return[4,i()];case 4:return o.sent(),b(!1),l(V.F.PROMOTION_RESULT_MODAL,"PromotionCancelButton",{promotionType:t}),[2]}}))})),[n,l,r,t,s,i]),x=(0,a.useCallback)((function(){u({callback:h,question:{label:"This promotion will be permanently canceled and you will not be able to claim bonus balance. Are you sure you want to cancel it?",namespace:f.N.PROMOTION},text:{label:"Cancel"},options:{cancelText:{label:"Not now"},cancelButtonClassName:"!bg-color-blue-brand-blue",confirmButtonClassName:"!bg-none !bg-color-red-darker"}})}),[h,u]);return(0,o.jsx)(Z.zx,{styleType:k.S.NEGATIVE,onClick:x,size:R.$.MEDIUM,label:(0,o.jsx)(c.rj,{label:"Cancel Bonus"}),children:(0,o.jsx)(A.a,{active:p})})},X=n(22132),ee=n(82453),te=n(43975),ne=n(31050),re=function(e){var t=e.promotionType,n=(0,te.dO)(),r=(0,d.Vc)(t),a=(0,d.Pd)(t),u=(0,d.Fj)(t),m=(0,g.b)(G.h7);return(0,X.B)(),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.r6,{className:"border-0",children:[(0,o.jsx)(c.rj,{label:"Bonus details"}),(0,o.jsx)(l.F,{href:"/promotions/deposit-bonus",className:"pointer-events-auto mt-1 block w-fit"})]}),(0,o.jsx)(ee.l,{className:"mt-[-25px] mb-6 overflow-hidden",children:(0,o.jsx)(I.E,{src:"/img/deposit-bonus/".concat(r?"active":"available","Title.png"),alt:null})}),(0,o.jsx)("h6",{className:"text-style-h-7 mb-3 uppercase",children:u?(0,o.jsx)(c.rj,{label:"Welcome ".concat(i.JY[t]," bonus")}):(0,o.jsx)(c.rj,{label:"Exclusive ".concat(i.JY[t]," bonus")})}),!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"text-style-md-regular mb-3",children:(0,o.jsx)(c.rj,{label:"Claim your special deposit bonus now! Just activate the offer and make a deposit to re
3ceive your bonus. You can withdraw your benefits once you meet the wagering requirements."})}),n&&(0,o.jsx)(Z.zx,{onClick:function(){return m(V.F.WALLET,"PromotionModal")},className:"mt-4 mb-2",label:(0,o.jsx)(c.rj,{label:"Deposit funds"})})]}),(0,o.jsx)("div",{className:"text-style-md-medium w-full",children:(0,o.jsx)(_,{promotionType:t})}),n&&(0,o.jsxs)("div",{className:"flex justify-center gap-4 mt-8",children:[!r&&(0,o.jsx)(L,{promotionType:t}),(a||r)&&(0,o.jsx)(K,{promotionType:t})]})]})},oe=function(e){var t=e.promotionType,n=e.promotion,s=(0,te.dO)(),i=(0,a.useMemo)((function(){return!s&&n?(0,r.Z)({},t,n):null}),[s,n,t]);return(0,o.jsx)(ne.R.Provider,{value:i,children:(0,o.jsx)(re,{promotionType:t})})}},82453:function(e,t,n){n.d(t,{l:function(){return c}});var r=n(7297),o=n(68777),a=n(19718);function s(){var e=(0,r.Z)(["\n\t\t\tmargin: -","px -","px -","px -","px;\n\t\t"]);return s=function(){return e},e}function i(){var e=(0,r.Z)(["\n\t",";\n"]);return i=function(){return e},e}var c=o.ZP.div.withConfig({componentId:"sc-45122445-0"})(i(),(0,a._)((function(e,t,n,r){return(0,o.iv)(s(),e,t,n,r)})))},25688:function(e,t,n){n.r(t),n.d(t,{default:function(){return Z}});var r,o=n(85893),a=n(67294),s=n(85384),i=n(97328),c=n(47568),l=n(97582),u=n(32608),m=n(5188),p=n(99898),d=n(89215),f=n(40550),b=n(80807),h=n(26653),x=n(15519),v=n(64792),y=n(37508),j=n(43689),T=n(59727),g=n(84689),w=n(80429),O=n(25787),C=n(88507),N=n(55176),P=n(82453),S=n(78170),E=function(e){var t=e.promotionType,n=(0,w.u)(O.UW.WELCOME_BONUS_MOCK_API),r=(0,s.wc)(t,"received_bonus"),E=(0,s.wc)(t,"currency"),M=(0,s.wc)(t,"id"),D=(0,h.b)(C.k.showAlert),_=(0,h.b)(N.J.promotionUpdateProperty),I=(0,a.useState)(!1),k=I[0],R=I[1],A=function(){var e=(0,c.Z)((function(){var e;return(0,l.__generator)(this,(function(r){switch(r.label){case 0:return R(!0),[4,n({url:(0,v.nu)(v.ln.apiUserPromotionClaim),disableErrorHandler:!0,parameters:{method:"POST",body:{id:M}},loaderId:y.O.PROMOTION_CLAIM})];case 1:return(e=r.sent()).status>=400?[4,(0,j.H5)(new Error("Error on promotion claim"),{promotionId:M,promotionType:t,responseStatus:e.status,response:e})]:[3,3];case 2:return r.sent(),R(!1),[2,D({type:T.C.ERROR,label:"Error on claim, please try again later",namespace:S.N.PROMOTION})];case 3:return _({id:t,property:"status",value:i.d.COMPLETED}),R(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.r6,{className:"border-0",children:(0,o.jsx)(m.rj,{label:"Promotion ended"})}),(0,o.jsx)(P.l,{className:"mt-[-25px] mb-6 overflow-hidden",children:(0,o.jsx)(p.E,{src:"/img/deposit-bonus/".concat(i.d.COMPLETED,"Result.png"),alt:null})}),(0,o.jsxs)("h6",{className:"text-style-h-7 mb-3 uppercase",children:[(0,o.jsx)(m.rj,{label:"Congratulations"}),"!"]}),(0,o.jsx)("p",{className:"text-style-md-regular mb-3",children:(0,o.jsx)(m.rj,{label:"Your bonus is available for claim"})}),(0,o.jsx)("div",{className:"text-style-md-medium w-full mt-6",children:(0,o.jsx)("div",{className:"border-color-dark-600 border-b-2 border-t-2 pb-4 pt-4",children:(0,o.jsxs)("div",{className:"flex justify-between",children:[(0,o.jsx)("div",{children:(0,o.jsx)(m.rj,{label:"Bonus"})}),(0,o.jsx)("div",{className:"text-style-md-medium text-color-other-success",children:(0,o.jsxs)("span",{className:"relative",children:[r," ",(0,o.jsx)(x.Y,{currency:E})]})})]})})}),(0,o.jsx)("div",{className:"flex justify-center gap-4 mt-8",children:(0,o.jsx)(d.zx,{styleType:f.S.PRIMARY,onClick:A,size:b.$.MEDIUM,className:"pl-12 pr-12",label:(0,o.jsx)(m.cC,{label:"Claim"}),children:(0,o.jsx)(g.a,{active:k})})})]})},M=n(14924),D=n(175),_=n(96236),I=n(3072),k=n(82835),R=(r={},(0,M.Z)(r,i.d.COMPLETED,{title:"Success!",text:"Your bonus has been successfully transferred to your account. You can now use it to play and win big!"}),(0,M.Z)(r,i.d.EXPIRED,{title:"Promotion has expired",text:"Thank you for participating in this bonus! The time limit has expired and bonus funds are no longer available."}),(0,M.Z)(r,i.d.CANCELLED,{title:"Promotion has been cancelled",text:"Thank you for participating in this bonus! The promotion has been cancelled and bonus funds are no longer available."}),(0,M.Z)(r,i.d.NO_FUNDS,{title:"Promotion has been cancelled",text:"Unfortunately, the promotion has ended as your balance reached zero."}),r),A=function(e){var t,n,r=e.promotionType;!function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,a.useContext)(I.t).setNoCloseButton,n=(0,k.C1)(),r=Boolean(null===n||void 0===n?void 0:n.noCloseButton);(0,a.useEffect)((function(){r!==e&&t(e)}),[r,e,t])}();var v=(0,s.wc)(r,"status"),y=(0,s.wc)(r,"received_bonus"),j=(0,s.wc)(r,"currency"),T=(0,h.b)(D.Mr),g=(0,h.b)(_.W),w=(0,h.b)(N.J.promotionUpdate),O=(0,a.useCallback)((0,c.Z)((function(){return(0,l.__generator)(this,(function(e){switch(e.label){case 0:return[4,g()];case 1:return e.sent(),w({id:r,data:null}),T(),[2]}}))})),[g,w,r,T]),C=v===i.d.COMPLETED;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.r6,{className:"border-0",children:(0,o.jsx)(m.rj,{label:"Promotion ended"})}),(0,o.jsx)(P.l,{className:"mt-[-25px] mb-6 overflow-hidden",children:(0,o.jsx)(p.E,{src:"/img/deposit-bonus/".concat(C?i.d.COMPLETED:"failed","Result.png"),alt:null})}),(0,o.jsx)("h6",{className:"text-style-h-7 mb-3 uppercase",children:(0,o.jsx)(m.rj,{label:null===(t=R[v])||void 0===t?void 0:t.t
3itle})}),(0,o.jsx)("p",{className:"text-style-md-regular mb-3",children:(0,o.jsx)(m.rj,{label:null===(n=R[v])||void 0===n?void 0:n.text})}),C&&(0,o.jsx)("div",{className:"text-style-md-medium w-full mt-6",children:(0,o.jsx)("div",{className:"border-color-dark-600 border-b-2 border-t-2 pb-4 pt-4",children:(0,o.jsxs)("div",{className:"flex justify-between",children:[(0,o.jsx)("div",{children:(0,o.jsx)(m.rj,{label:"Bonus"})}),(0,o.jsx)("div",{className:"text-style-md-medium text-color-other-success",children:(0,o.jsxs)("span",{className:"relative",children:[y," ",(0,o.jsx)(x.Y,{currency:j})]})})]})})}),(0,o.jsx)("div",{className:"flex justify-center gap-4 mt-8",children:(0,o.jsx)(d.zx,{styleType:C?f.S.PRIMARY:f.S.SECONDARY,onClick:O,size:b.$.MEDIUM,className:"pl-12 pr-12",label:(0,o.jsx)(m.cC,{label:"Close"})})})]})},Z=function(e){var t=e.promotionType;return(0,s.wc)(t,"status")===i.d.CLAIMABLE?(0,o.jsx)(E,{promotionType:t}):(0,o.jsx)(A,{promotionType:t})}},98130:function(e,t,n){var r=n(67294),o=n(45697);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function m(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function d(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=String(e);if(0===t)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),o=r?r[1]:"",a=r?r[3]:"",s=r?r[2]:n,i=s.length>=t?s:(d(Array(t)).map((function(){return"0"})).join("")+s).slice(-1*t);return"".concat(o).concat(i).concat(a)}var h={daysInHours:!1,zeroPadTime:2};function x(e,t){var n=e.days,r=e.hours,o=e.minutes,a=e.seconds,s=Object.assign(Object.assign({},h),t),i=s.daysInHours,c=s.zeroPadTime,l=s.zeroPadDays,u=void 0===l?c:l,m=Math.min(2,c),p=i?b(r+24*n,c):b(r,m);return{days:i?"":b(n,u),hours:p,minutes:b(o,m),seconds:b(a,m)}}var v=function(e){c(n,e);var t=p(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).state={count:e.props.count||3},e.startCountdown=function(){e.interval=window.setInterval((function(){0===e.state.count-1?(e.stopCountdown(),e.props.onComplete&&e.props.onComplete()):e.setState((function(e){return{count:e.count-1}}))}),1e3)},e.stopCountdown=function(){clearInterval(e.interval)},e.addTime=function(t){e.stopCountdown(),e.setState((function(e){return{count:e.count+t}}),e.startCountdown)},e}
3return i(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?(0,r.cloneElement)(this.props.children,{count:this.state.count}):null}}]),n}(r.Component);v.propTypes={count:o.number,children:o.element,onComplete:o.func};var y=function(e){c(n,e);var t=p(n);function n(e){var o;if(a(this,n),(o=t.call(this,e)).mounted=!1,o.initialTimestamp=o.calcOffsetStartTimestamp(),o.offsetStartTimestamp=o.props.autoStart?0:o.initialTimestamp,o.offsetTime=0,o.legacyMode=!1,o.legacyCountdownRef=(0,r.createRef)(),o.tick=function(){var e=o.calcTimeDelta(),t=e.completed&&!o.props.overtime?void 0:o.props.onTick;o.setTimeDeltaState(e,void 0,t)},o.start=function(){if(!o.isStarted()){var e=o.offsetStartTimestamp;o.offsetStartTimestamp=0,o.offsetTime+=e?o.calcOffsetStartTimestamp()-e:0;var t=o.calcTimeDelta();o.setTimeDeltaState(t,"STARTED",o.props.onStart),o.props.controlled||t.completed&&!o.props.overtime||(o.clearTimer(),o.interval=window.setInterval(o.tick,o.props.intervalDelay))}},o.pause=function(){o.isPaused()||(o.clearTimer(),o.offsetStartTimestamp=o.calcOffsetStartTimestamp(),o.setTimeDeltaState(o.state.timeDelta,"PAUSED",o.props.onPause))},o.stop=function(){o.isStopped()||(o.clearTimer(),o.offsetStartTimestamp=o.calcOffsetStartTimestamp(),o.offsetTime=o.offsetStartTimestamp-o.initialTimestamp,o.setTimeDeltaState(o.calcTimeDelta(),"STOPPED",o.props.onStop))},o.isStarted=function(){return o.isStatus("STARTED")},o.isPaused=function(){return o.isStatus("PAUSED")},o.isStopped=function(){return o.isStatus("STOPPED")},o.isCompleted=function(){return o.isStatus("COMPLETED")},e.date){var s=o.calcTimeDelta();o.state={timeDelta:s,status:s.completed?"COMPLETED":"STOPPED"}}else o.legacyMode=!0;return o}return i(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(e){this.legacyMode||this.props.date!==e.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var e=this.props,t=e.date,n=e.now,r=e.precision,o=e.controlled,a=e.overtime;return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.now,o=void 0===r?Date.now:r,a=n.precision,s=void 0===a?0:a,i=n.controlled,c=n.offsetTime,l=void 0===c?0:c,u=n.overtime;t="string"===typeof e?new Date(e).getTime():e instanceof Date?e.getTime():e,i||(t+=l);var m=i?t:t-o(),p=Math.min(20,Math.max(0,s)),d=Math.round(1e3*parseFloat(((u?m:Math.max(0,m))/1e3).toFixed(p))),f=Math.abs(d)/1e3;return{total:d,days:Math.floor(f/86400),hours:Math.floor(f/3600%24),minutes:Math.floor(f/60%60),seconds:Math.floor(f%60),milliseconds:Number((f%1*1e3).toFixed()),completed:d<=0}}(t,{now:n,precision:r,controlled:o,offsetTime:this.offsetTime,overtime:a})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(e){this.legacyCountdownRef.current.addTime(e)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(e){return this.state.status===e}},{key:"setTimeDeltaState",value:function(e,t,n){var r=this;if(this.mounted){var o=e.completed&&!this.state.timeDelta.completed,a=e.completed&&"STARTED"===t;o&&!this.props.overtime&&this.clearTimer();return this.setState((function(n){var o=t||n.status;return e.completed&&!r.props.overtime?o="COMPLETED":t||"COMPLETED"!==o||(o="STOPPED"),{timeDelta:e,status:o}}),(function(){n&&n(r.state.timeDelta),r.props.onComplete&&(o||a)&&r.props.onComplete(e,a)}))}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,t=e.daysInHours,n=e.zeroPadTime,r=e.zeroPadDays,o=this.state.timeDelta;return Object.assign(Object.assign({},o),{api:this.getApi(),props:this.props,formatted:x(o,{daysInHours:t,zeroPadTime:n,zeroPadDays:r})})}},{key:"render",value:function(){if(this.legacyMode){var e=this.props,t=e.count,n=e.children,o=e.onComplete;return(0,r.createElement)(v,{ref:this.legacyCountdownRef,count:t,onComplete:o},n)}var a=this.props,s=a.className,i=a.overtime,c=a.children,l=a.renderer,u=this.getRenderProps();if(l)return l(u);
3if(c&&this.state.timeDelta.completed&&!i)return(0,r.cloneElement)(c,{countdown:u});var m=u.formatted,p=m.days,d=m.hours,f=m.minutes,b=m.seconds;return(0,r.createElement)("span",{className:s},u.total<0?"-":"",p,p?":":"",d,":",f,":",b)}}]),n}(r.Component);y.defaultProps=Object.assign(Object.assign({},h),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),y.propTypes={date:(0,o.oneOfType)([(0,o.instanceOf)(Date),o.string,o.number]),daysInHours:o.bool,zeroPadTime:o.number,zeroPadDays:o.number,controlled:o.bool,intervalDelay:o.number,precision:o.number,autoStart:o.bool,overtime:o.bool,className:o.string,children:o.element,renderer:o.func,now:o.func,onMount:o.func,onStart:o.func,onPause:o.func,onStop:o.func,onTick:o.func,onComplete:o.func},t.ZP=y}}]);
4//# sourceMappingURL=PromotionModal.0e4a5a872292a32a.js.map
5//# debugId=a8b0bc1e-eed9-5695-b7b6-b1f56bc01e38

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.