1var y=(e,a,t)=>new Promise((u,l)=>{var o=c=>{try{i(t.next(c))}catch(d){l(d)}},n=c=>{try{i(t.throw(c))}catch(d){l(d)}},i=c=>c.done?u(c.value):Promise.resolve(c.value).then(o,n);i((t=t.apply(e,a)).next())});import{J as b,f as g,K as f,L as r,M as m,o as _,N as h,O as A,P as p,t as w}from"./index-D5gHkNn-.js";import{n as C,f as s}from"./index-CgokGjYA.js";import{h as N}from"./http-XBw_T2QK.js";(function(){try{var e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};e.SENTRY_RELEASE={id:"8c3b9aa2b95acaad15d7da0cf7f36f5b8cfcd6d1"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(a){for(var t=1;t<arguments.length;t++){var u=arguments[t];if(u!=null)for(var l in u)u.hasOwnProperty(l)&&(a[l]=u[l])}return a})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:playsmart-ai":!0})}catch(a){}})();var B=w('<div class="flex flex-col gap-y-4 font-semibold text-secondary"><p class=text-center>'),x=w('<div class="mt-9 flex w-full gap-x-2">'),R=w("<p class=text-center>");const T=e=>{var l;const a=(l=e.cb)!=null?l:C,t=()=>y(null,null,function*(){const o=[];if(e.amountChangeLogId||e.taskId){const n=yield N.post("/balance-controller/wager/task/bonus-cancel-amount/",{amountChangeLogId:e.amountChangeLogId,taskId:e.taskId}),c=f[n.currencyName].bonusAmount;if(n.taskType===3?(n.bonusSpentRatio||n.generalAddRatio)&&o.push(s("Canceling this reward will adjust your balance based on completed wagering progress."),s("You've spent __spentPercentage__ (__spentAmount__) bonus balance, so __remainPercentage__ (__remainAmount__) of your deposit balance will be remain in your deposit balance. ",{spentAmount:m.printCurrency(new r(n.bonusSpentAmount),n.currencyName,{target:n.currencyName}),spentPercentage:new r(n.bonusSpentRatio).mul(100).toFixed(2,r.ROUND_DOWN)+"%",remainAmount:m.printCurrency(new r(n.generalAddAmount),n.currencyName,{target:n.currencyName}),remainPercentage:new r(n.generalAddRatio).mul(100).toFixed(2,r.ROUND_DOWN)+"%"})):n.taskType===11&&o.push(s("Canceling this reward will adjust your balance based on the wager requirements you've completed."),s("You've complete __wagerCompletedAmount__ (__generalAddRatio__) wager requirement, so __generalAddAmount__ (__generalAddRatio__) of your deposit balance will be remain in your deposit balance.",{wagerCompletedAmount:m.printCurrency(new r(n.wagerCompletedAmount),n.currencyName,{target:n.currencyName}),generalAddRatio:new r(n.generalAddRatio).mul(100).toFixed(2,r.ROUND_DOWN)+"%",generalAddAmount:m.printCurrency(new r(n.generalAddAmount),n.currencyName,{target:n.currencyName})})),o.length===0){const d=c.lessThan(n.bonusAmount)?c:n.bonusAmount;return o.push(s("__bonusAmount__ balance will be lost and you will not be able to claim this bonus again. Your bonus balance will __bonusBalanceRemain__ after removing this bonus.",{bonusAmount:m.printCurrency(new r(d),n.currencyName,{target:n.currencyName}),bonusBalanceRemain:m.printCurrency(c.sub(new r(d)),n.currencyName,{target:n.currencyName})})),o}return o}else if(e.cancelAmount){const i=f[e.currencyName].bonusAmount;o.push(s("__bonusAmount__ balance will be lost and you will not be able to claim this bonus again. Your bonus balance will __bonusBalanceRemain__ after removing this bonus.",{bonusAmount:m.printCurrency(new r(e.cancelAmount),e.currencyName,{target:e.currencyName}),bonusBalanceRemain:m.printCurrency(i.sub(new r(e.cancelAmount)),e.currencyName,{target:e.currencyName})}))}else o.push(s("Are you sure you want to cancel this bonus?"));return o}
1),u=new Promise(o=>y(null,null,function*(){const n=yield t();b.push(()=>g(v,{texts:n,onConfirmed:i=>(o(i),u.then(a))}))}));return u},v=e=>g(p,{type:"center",class:"!w-[28rem]",get title(){return s("Cancel This Bonus")},get children(){return[(()=>{var a=B(),t=a.firstChild;return _(t,()=>e.texts[0]),_(a,g(h,{get each(){return e.texts.slice(1)},children:u=>(()=>{var l=R();return _(l,u),l})()}),null),a})(),(()=>{var a=x();return _(a,g(A,{type:"second",class:"flex-grow",onClick:()=>{var t;return b.pop(),(t=e.onConfirmed)==null?void 0:t.call(e,!1)},get children(){return s("Keep Bonus")}}),null),_(a,g(A,{class:"flex-grow",type:"brand",onClick:()=>{var t;return b.pop(),(t=e.onConfirmed)==null?void 0:t.call(e,!0)},get children(){return s("Cancel Bonus")}}),null),a})()]}});export{T as default};
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.