@everymatrix/casino-engagement-suite-luckywheel 0.20.6 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-465c9acd.js +1 -0
- package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.entry.js +1 -1
- package/dist/casino-engagement-suite-luckywheel/index.esm.js +1 -1
- package/dist/cjs/{casino-engagement-suite-luckywheel-1d99f17f.js → casino-engagement-suite-luckywheel-da8926d5.js} +11 -9
- package/dist/cjs/casino-engagement-suite-luckywheel.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.js +11 -9
- package/dist/esm/{casino-engagement-suite-luckywheel-f6f621a5.js → casino-engagement-suite-luckywheel-465c9acd.js} +11 -9
- package/dist/esm/casino-engagement-suite-luckywheel.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-f6f621a5.js +0 -1
package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-465c9acd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as e}from"./index-48c42d04.js";var s,r,n,a,o,h,c,l,d,u;!function(t){t.ActiveTickets="ActiveTickets",t.ImplicitTickets="ImplicitTickets",t.RemainingTimes="RemainingTimes"}(s||(s={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(r||(r={})),function(t){t.fulfilled="fulfilled",t.drawn="drawn"}(n||(n={})),function(t){t.noPrize="noprize",t.luckywheel="luckywheel",t.bonus="bonus"}(a||(a={})),function(t){t.Arrow="Arrow",t.Partition="Partition"}(o||(o={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(h||(h={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(c||(c={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(l||(l={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(d||(d={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(u||(u={}));const g=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},b=t=>new Promise((i=>{let e=document.createElementNS("http://www.w3.org/2000/svg","image");e.onload=()=>i(e),e.onerror=()=>i(e),e.href.baseVal=t})),p=t=>({x:t,y:t}),m=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),f={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},v=async(t,i)=>{let e=((t,i)=>{const e=t.map((t=>{const e={};return Object.keys(t).map((s=>{"object"==typeof t[s]&&t[s]&&(e["Image1"===s?"Image":s]=t[s][i]||t[s]["*"])})),e}));return(t=>{let i=0;return t.map((t=>{i+=Number(t.probability)})),i})(t)<1&&e.push(f),e})(t.Program.WheelOfFortune.Partitions,i);return e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?e.map((t=>{if(t.Image){const i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.href.baseVal=t.Image,Object.assign(Object.assign({},t),{Image:i})}return t})):await Promise.all(e.map((async t=>Object.assign(Object.assign({},t),await(async t=>t?{Image:await b(t)}:{})(t.Image))))),e},y={in:{quad:t=>Math.pow(t,2),cubic:t=>Math.pow(t,3),quart:t=>Math.pow(t,4),quint:t=>Math.pow(t,5),sine:t=>1-Math.cos(t*Math.PI/2),expo:t=>0===t?0:Math.pow(2,10*t-10),circ:t=>1-Math.sqrt(1-Math.pow(t,2))},out:{quad:t=>1-Math.pow(1-t,2),cubic:t=>1-Math.pow(1-t,3),quart:t=>1-Math.pow(1-t,4),quint:t=>1-Math.pow(1-t,5),sine:t=>Math.sin(t*Math.PI/2),expo:t=>1===t?1:1-Math.pow(2,-10*t),circ:t=>Math.sqrt(1-Math.pow(t-1,2))}},x={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},w={in:{quad:t=>2*t,cubic:t=>3*t**2,quart:t=>4*t**3,quint:t=>5*t**4,sine:t=>Math.PI/2*Math.sin(Math.PI/2*t),expo:t=>10*Math.LN2*2**(10*t-10),circ:t=>-.5*(1-t**2)**-.5},out:{cubic:t=>3*t**2-6*t+3}},k=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],P=t=>Object.keys(t).map((i=>t[i]));var M;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(M||(M={}));class j{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:r}){this.arrowmode=h.DownFromTop,this.convertDegToArc=t=>t*Math.PI/180,this.convertArcToDeg=t=>180*t/Math.PI%360,this.getArcDelta=t=>2*Math.PI/t,this.findDeg=(t,i)=>t*this.convertArcToDeg(this.getArcDelta(i)),this.angleTransform=t=>{switch(t){case h.DownFromTop:case h.UpFromCenter:return-Math.PI/2;case h.DownFromCenter:case h.UpFromBottom:return Math.PI/2}},this.contentdirection=r,this.center=t/2,this.ratio=t/375,this.options=e,this.length=e.length,this.themeIndex=s,this.radius=i}get sizeImage(){const t=t=>48*this.ratio*5/t;if(this.length<=3)return t(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return t(this.length)}}getSizeImageByPartition(t){return this.options[t].Name?this.sizeImage/2:this.sizeImage}getSvgImageProps(t,i=1.25){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Name?this.radius-e/2-3*this.ratio:(this.radius-e/2)/Number(i)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(t,this.getOffsetImage(e),s,l.outward)),{width:e,height:e})}getSvgTextProps(t,i){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Image?this.radius-e-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,s,void 0,i))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t,this.options[t].Image?80:100);return Object.assign({},i)}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(t){return{center:0,position:{x:-1*t/2,y:-1*t/2},transform:{x:0,y:0}}}get direction(){return M.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:l[this.contentdirection])}getPartitionPositions(t,i,e){const s=this.angleTransform(this.arrowmode)+this.direction*t*2*Math.PI/this.length,r=((t,i,e)=>{const s=p(e);return{x:s.x+t*Math.cos(i),y:s.y+t*Math.sin(i)}})(i||this.radius-9*this.ratio,s,this.center+e.center);return{transformOrigin:m(r,e.transform),point:m(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:n,transformOrigin:a}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},n),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?n.x:n.x-100}px, ${n.y-50}px)`,"transform-origin":`${o=a,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=p(this.center),e=p(this.radius),{point:s,pointNext:r}=((t,i,e,s)=>{const r=t=>((t,i,e,s)=>{const r=Math.PI/180*(360/i*(t-.5)-90),n=p(s),a=p(e);return{x:n.x+a.x*Math.cos(r),y:n.y+a.y*Math.sin(r)}})(t,i,e,s);return{point:r(t),pointNext:r(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...P(i),"L",...P(s),"A",...P(e),"0 0 1",...P(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-t,this.length)}getSpinnerProps(){const t=p(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class O{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=u.cubic,this.param=k[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=d.halt,this.cb=()=>{i(),this.setDeg(t,0)},this.degTarget=t+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const t=this.param.loopSpeed,i=t=>33*x[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,y.in[this.easingType],w.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,y.out[this.easingType],w.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,x[this.easingType]),this.continueRepeat()};({[d.launch]:()=>{this.cb=()=>{this.step=d.loop,this.setDeg(t,x[this.easingType]),this.continueRepeat()},e()},[d.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[d.halt]:()=>{this.deg===360-t?s():r()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,r)=>{let n=null;const a=()=>{let o=(new Date).getTime();n||(n=o);const h=o-n,c=e*s(h/t)+i,l=Math.abs(r(h/t));this.setDeg(c,l),h<t?setTimeout((()=>a()),30):this.cb()};a()},this.animate=(t,i,e,s,r)=>{let n=null;window.cancelAnimationFrame(n);let a=null;const o=h=>{a||(a=h);const c=h-a,l=e*s(c/t)+i,d=Math.abs(r(c/t));this.setDeg(l,d),c<t?n=window.requestAnimationFrame(o):this.cb()};n=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=d.launch,this.ticker()}}const C=class{constructor(i){t(this,i),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.host.prepend(i)}),1)})).catch((t=>{console.log("Error ",t)}))},this.renderImage=(t,i)=>{const e=this.options[i].Image;g(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{this.spinable=!!(this.luckywheel.Current&&Number(this.luckywheel.Current.RemainingTimes)>0)},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(t){const{type:i,data:e}=null==t?void 0:t.data;if("SpinLuckyWheelRes"===i&&this.isSpinning){const t=+e.Result.WheelOfFortunePartitionIndex||0;e.State===n.fulfilled?this.handleSpinResult(e,t):this.handleSpinError(t)}}handleSpinError(t){const i=this.settings.getDeg(t);this.spinner.halt(i,(()=>{this.isSpinning=!1,this.updateSpinable(),window.postMessage({type:"ShowLuckywheelRewardModal",data:{HasError:!0,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes)}})}))}handleSpinResult(t,i){if(this.luckywheel.Program.Id===t.LotteryProgramID){const e=this.settings.getDeg(i);this.spinner.halt(e,(()=>{var e;this.isSpinning=!1,this.updateSpinable();const s=this.luckywheel.Program.WheelOfFortune.Partitions[i],r=null===(e=t.Result.Outcomes)||void 0===e?void 0:e.some((t=>{var i;return(null===(i=t.Action)||void 0===i?void 0:i.Type)===a.noPrize})),n=(null==s?void 0:s.PrizeImage[this.language])||(null==s?void 0:s.PrizeImage["*"]);window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeText:(null==s?void 0:s.PrizeText[this.language])||(null==s?void 0:s.PrizeText["*"]),PrizeMessage:(null==s?void 0:s.Name[this.language])||(null==s?void 0:s.Name["*"]),NoPrize:r,HasError:!1,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes),Assets:n}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await v(this.luckywheel,c.en),this.settings=new j({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new O({tick:(t,i)=>{g(this.spinContainer,{style:[`transform: rotate(${t}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*i}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}setSvgSize(t){if(!t||!this.size)return;const i=this.size.toString();t.getAttribute("width")!==i&&t.setAttribute("width",i),t.getAttribute("height")!==i&&t.setAttribute("height",i)}render(){const t={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"e466a34c9a4526c2379aa601462c65cb65f5a445",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"04b74322b3651a364a92777984b008fe845c16f0",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",{key:"f18c832a86c1474e510cae219eae78b44667b07e",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},i("div",{key:"b0adaa4e02d6394293ed3e4cc4a2331b46cc9fd1",style:t})),i("g",Object.assign({key:"9c08d5fa3cb3bde27b641f71fa2bbc0612b0b93f",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"cbdc31800e068702b0dc50ced9139c25e8e30785",class:"PartitionsBackgrounds"},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},t)},i("div",{style:t}))))),i("g",{key:"af8c9da33f138918e81b80ae691c9a58bbd9232b",class:"PartitionsBackgroundStrokes"},this.options.map(((t,e)=>i("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(e),{width:this.size,height:this.size}))))),i("g",{key:"6ccca1f63545eae71d024ee5da59d0149607e3d1",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((t,e)=>[t.Image&&i("g",{class:`PartitionImage PartitionImage${e}`,ref:t=>this.renderImage(t,e)}),t.Name&&i("foreignObject",Object.assign({class:"PartitionText",ref:t=>{if(t){const i=this.options[e].Image?"80":"100";t.setAttribute("width",i),t.setAttribute("height",i)}}},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"3716205850e37ff3c28b0f2b60eb802030c43486",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition1 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("g",{key:"ae4c41ce94798a93b9177acc06e5239978ae68c9",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition2 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("foreignObject",{key:"9ecdb1ed900fe490f410aaf723d42d70ace00abb",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:t},i("div",{key:"11f52db7cb359d4c7d06c60f90522e79fcdba8d6",style:t})),i("foreignObject",{key:"fe41edba48d92e874b2d91710109915462b84c1e",ref:this.setSvgSize.bind(this),class:"Top Customable",style:t},i("div",{key:"4184ba626040e1bd02e99528155e739a78f91b88",style:t})),i("g",{key:"b7aec5044c7eb0876f3538315a07249f63e8ce7a",class:{spinning:this.isSpinning,Center:!0}},i("foreignObject",{key:"8ac120e48cca2609822cc2a56a631b644b31f817",ref:t=>{t&&(t.setAttribute("width","100"),t.setAttribute("height","100"))},style:{transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}},i("div",{key:"dfe3083c12038c4a5ee24cdc7e0cc25c8e6d2220",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),i("g",{key:"67813a6d878b3e75605cf35acc436848a1ed7138"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};C.style=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 14px);font-weight:900}';export{C}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as casino_engagement_suite_luckywheel}from"./casino-engagement-suite-luckywheel-
|
|
1
|
+
export{C as casino_engagement_suite_luckywheel}from"./casino-engagement-suite-luckywheel-465c9acd.js";import"./index-48c42d04.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoEngagementSuiteLuckywheel}from"./casino-engagement-suite-luckywheel-
|
|
1
|
+
export{C as CasinoEngagementSuiteLuckywheel}from"./casino-engagement-suite-luckywheel-465c9acd.js";import"./index-48c42d04.js";
|
|
@@ -666,6 +666,7 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
666
666
|
const noPrize = (_a = data.Result.Outcomes) === null || _a === void 0 ? void 0 : _a.some((outcome) => { var _a; return ((_a = outcome.Action) === null || _a === void 0 ? void 0 : _a.Type) === ELuckyWheelActionTypes.noPrize; });
|
|
667
667
|
const prizeText = (partition === null || partition === void 0 ? void 0 : partition.PrizeText[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeText['*']);
|
|
668
668
|
const prizeName = (partition === null || partition === void 0 ? void 0 : partition.Name[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.Name['*']);
|
|
669
|
+
const assets = (partition === null || partition === void 0 ? void 0 : partition.PrizeImage[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeImage['*']);
|
|
669
670
|
window.postMessage({
|
|
670
671
|
type: 'ShowLuckywheelRewardModal',
|
|
671
672
|
data: {
|
|
@@ -673,7 +674,8 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
673
674
|
PrizeMessage: prizeName,
|
|
674
675
|
NoPrize: noPrize,
|
|
675
676
|
HasError: false,
|
|
676
|
-
NoSpinLeft: Number(this.luckywheel.Current.RemainingTimes) === 0
|
|
677
|
+
NoSpinLeft: Number(this.luckywheel.Current.RemainingTimes) === 0,
|
|
678
|
+
Assets: assets
|
|
677
679
|
}
|
|
678
680
|
});
|
|
679
681
|
});
|
|
@@ -727,13 +729,13 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
727
729
|
}
|
|
728
730
|
render() {
|
|
729
731
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
730
|
-
return (index.h("div", { key: '
|
|
732
|
+
return (index.h("div", { key: 'e466a34c9a4526c2379aa601462c65cb65f5a445', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: '04b74322b3651a364a92777984b008fe845c16f0', width: this.size, height: this.size, ref: (el) => {
|
|
731
733
|
this.svg = el;
|
|
732
|
-
} }, index.h("foreignObject", { key: '
|
|
734
|
+
} }, index.h("foreignObject", { key: 'f18c832a86c1474e510cae219eae78b44667b07e', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, index.h("div", { key: 'b0adaa4e02d6394293ed3e4cc4a2331b46cc9fd1', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: '9c08d5fa3cb3bde27b641f71fa2bbc0612b0b93f', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: 'cbdc31800e068702b0dc50ced9139c25e8e30785', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
|
|
733
735
|
return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), "clip-path": `url(#clip${index$1})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index$1.toString() }, foreignObjectAgentProps) }, index.h("div", { style: foreignObjectAgentProps })));
|
|
734
|
-
})), index.h("g", { key: '
|
|
736
|
+
})), index.h("g", { key: 'af8c9da33f138918e81b80ae691c9a58bbd9232b', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
|
|
735
737
|
return (index.h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index$1), { width: this.size, height: this.size })));
|
|
736
|
-
})), index.h("g", { key: '
|
|
738
|
+
})), index.h("g", { key: '6ccca1f63545eae71d024ee5da59d0149607e3d1', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
|
|
737
739
|
return [
|
|
738
740
|
el.Image && (index.h("g", { class: `PartitionImage PartitionImage${index$1}`, ref: (el) => this.renderImage(el, index$1) })),
|
|
739
741
|
el.Name && (index.h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
|
|
@@ -744,18 +746,18 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
744
746
|
}
|
|
745
747
|
} }, this.settings.getSvgTextPropsAdjustedByImage(index$1)), index.h("div", { class: "PartitionTextEntityContainer" }, index.h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
746
748
|
];
|
|
747
|
-
}))), index.h("g", { key: '
|
|
749
|
+
}))), index.h("g", { key: '3716205850e37ff3c28b0f2b60eb802030c43486', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index$1) => {
|
|
748
750
|
return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index$1.toString() } }, index.h("div", { style: foreignObjectAgentProps })));
|
|
749
|
-
})), index.h("g", { key: '
|
|
751
|
+
})), index.h("g", { key: 'ae4c41ce94798a93b9177acc06e5239978ae68c9', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index$1) => {
|
|
750
752
|
return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index$1.toString() } }, index.h("div", { style: foreignObjectAgentProps })));
|
|
751
|
-
})), index.h("foreignObject", { key: '
|
|
753
|
+
})), index.h("foreignObject", { key: '9ecdb1ed900fe490f410aaf723d42d70ace00abb', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, index.h("div", { key: '11f52db7cb359d4c7d06c60f90522e79fcdba8d6', style: foreignObjectAgentProps })), index.h("foreignObject", { key: 'fe41edba48d92e874b2d91710109915462b84c1e', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, index.h("div", { key: '4184ba626040e1bd02e99528155e739a78f91b88', style: foreignObjectAgentProps })), index.h("g", { key: 'b7aec5044c7eb0876f3538315a07249f63e8ce7a', class: { spinning: this.isSpinning, Center: true } }, index.h("foreignObject", { key: '8ac120e48cca2609822cc2a56a631b644b31f817', ref: (el) => {
|
|
752
754
|
if (el) {
|
|
753
755
|
el.setAttribute('width', '100');
|
|
754
756
|
el.setAttribute('height', '100');
|
|
755
757
|
}
|
|
756
758
|
}, style: {
|
|
757
759
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
758
|
-
} }, index.h("div", { key: '
|
|
760
|
+
} }, index.h("div", { key: 'dfe3083c12038c4a5ee24cdc7e0cc25c8e6d2220', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), index.h("g", { key: '67813a6d878b3e75605cf35acc436848a1ed7138' }, this.options.map((_el, index$1) => {
|
|
759
761
|
return (index.h("clipPath", { id: `clip${index$1}` }, index.h("path", Object.assign({}, this.settings.getPartitionDraw(index$1)))));
|
|
760
762
|
})))));
|
|
761
763
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-da8926d5.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-da8926d5.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -117,6 +117,7 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
117
117
|
const noPrize = (_a = data.Result.Outcomes) === null || _a === void 0 ? void 0 : _a.some((outcome) => { var _a; return ((_a = outcome.Action) === null || _a === void 0 ? void 0 : _a.Type) === ELuckyWheelActionTypes.noPrize; });
|
|
118
118
|
const prizeText = (partition === null || partition === void 0 ? void 0 : partition.PrizeText[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeText['*']);
|
|
119
119
|
const prizeName = (partition === null || partition === void 0 ? void 0 : partition.Name[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.Name['*']);
|
|
120
|
+
const assets = (partition === null || partition === void 0 ? void 0 : partition.PrizeImage[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeImage['*']);
|
|
120
121
|
window.postMessage({
|
|
121
122
|
type: 'ShowLuckywheelRewardModal',
|
|
122
123
|
data: {
|
|
@@ -124,7 +125,8 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
124
125
|
PrizeMessage: prizeName,
|
|
125
126
|
NoPrize: noPrize,
|
|
126
127
|
HasError: false,
|
|
127
|
-
NoSpinLeft: Number(this.luckywheel.Current.RemainingTimes) === 0
|
|
128
|
+
NoSpinLeft: Number(this.luckywheel.Current.RemainingTimes) === 0,
|
|
129
|
+
Assets: assets
|
|
128
130
|
}
|
|
129
131
|
});
|
|
130
132
|
});
|
|
@@ -178,13 +180,13 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
178
180
|
}
|
|
179
181
|
render() {
|
|
180
182
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
181
|
-
return (h("div", { key: '
|
|
183
|
+
return (h("div", { key: 'e466a34c9a4526c2379aa601462c65cb65f5a445', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: '04b74322b3651a364a92777984b008fe845c16f0', width: this.size, height: this.size, ref: (el) => {
|
|
182
184
|
this.svg = el;
|
|
183
|
-
} }, h("foreignObject", { key: '
|
|
185
|
+
} }, h("foreignObject", { key: 'f18c832a86c1474e510cae219eae78b44667b07e', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, h("div", { key: 'b0adaa4e02d6394293ed3e4cc4a2331b46cc9fd1', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '9c08d5fa3cb3bde27b641f71fa2bbc0612b0b93f', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: 'cbdc31800e068702b0dc50ced9139c25e8e30785', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
184
186
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
|
|
185
|
-
})), h("g", { key: '
|
|
187
|
+
})), h("g", { key: 'af8c9da33f138918e81b80ae691c9a58bbd9232b', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
186
188
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
187
|
-
})), h("g", { key: '
|
|
189
|
+
})), h("g", { key: '6ccca1f63545eae71d024ee5da59d0149607e3d1', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
188
190
|
return [
|
|
189
191
|
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
190
192
|
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
|
|
@@ -195,18 +197,18 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
195
197
|
}
|
|
196
198
|
} }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
197
199
|
];
|
|
198
|
-
}))), h("g", { key: '
|
|
200
|
+
}))), h("g", { key: '3716205850e37ff3c28b0f2b60eb802030c43486', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
|
|
199
201
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
200
|
-
})), h("g", { key: '
|
|
202
|
+
})), h("g", { key: 'ae4c41ce94798a93b9177acc06e5239978ae68c9', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
|
|
201
203
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
202
|
-
})), h("foreignObject", { key: '
|
|
204
|
+
})), h("foreignObject", { key: '9ecdb1ed900fe490f410aaf723d42d70ace00abb', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, h("div", { key: '11f52db7cb359d4c7d06c60f90522e79fcdba8d6', style: foreignObjectAgentProps })), h("foreignObject", { key: 'fe41edba48d92e874b2d91710109915462b84c1e', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, h("div", { key: '4184ba626040e1bd02e99528155e739a78f91b88', style: foreignObjectAgentProps })), h("g", { key: 'b7aec5044c7eb0876f3538315a07249f63e8ce7a', class: { spinning: this.isSpinning, Center: true } }, h("foreignObject", { key: '8ac120e48cca2609822cc2a56a631b644b31f817', ref: (el) => {
|
|
203
205
|
if (el) {
|
|
204
206
|
el.setAttribute('width', '100');
|
|
205
207
|
el.setAttribute('height', '100');
|
|
206
208
|
}
|
|
207
209
|
}, style: {
|
|
208
210
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
209
|
-
} }, h("div", { key: '
|
|
211
|
+
} }, h("div", { key: 'dfe3083c12038c4a5ee24cdc7e0cc25c8e6d2220', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), h("g", { key: '67813a6d878b3e75605cf35acc436848a1ed7138' }, this.options.map((_el, index) => {
|
|
210
212
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
211
213
|
})))));
|
|
212
214
|
}
|
|
@@ -664,6 +664,7 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
664
664
|
const noPrize = (_a = data.Result.Outcomes) === null || _a === void 0 ? void 0 : _a.some((outcome) => { var _a; return ((_a = outcome.Action) === null || _a === void 0 ? void 0 : _a.Type) === ELuckyWheelActionTypes.noPrize; });
|
|
665
665
|
const prizeText = (partition === null || partition === void 0 ? void 0 : partition.PrizeText[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeText['*']);
|
|
666
666
|
const prizeName = (partition === null || partition === void 0 ? void 0 : partition.Name[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.Name['*']);
|
|
667
|
+
const assets = (partition === null || partition === void 0 ? void 0 : partition.PrizeImage[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeImage['*']);
|
|
667
668
|
window.postMessage({
|
|
668
669
|
type: 'ShowLuckywheelRewardModal',
|
|
669
670
|
data: {
|
|
@@ -671,7 +672,8 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
671
672
|
PrizeMessage: prizeName,
|
|
672
673
|
NoPrize: noPrize,
|
|
673
674
|
HasError: false,
|
|
674
|
-
NoSpinLeft: Number(this.luckywheel.Current.RemainingTimes) === 0
|
|
675
|
+
NoSpinLeft: Number(this.luckywheel.Current.RemainingTimes) === 0,
|
|
676
|
+
Assets: assets
|
|
675
677
|
}
|
|
676
678
|
});
|
|
677
679
|
});
|
|
@@ -725,13 +727,13 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
725
727
|
}
|
|
726
728
|
render() {
|
|
727
729
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
728
|
-
return (h("div", { key: '
|
|
730
|
+
return (h("div", { key: 'e466a34c9a4526c2379aa601462c65cb65f5a445', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: '04b74322b3651a364a92777984b008fe845c16f0', width: this.size, height: this.size, ref: (el) => {
|
|
729
731
|
this.svg = el;
|
|
730
|
-
} }, h("foreignObject", { key: '
|
|
732
|
+
} }, h("foreignObject", { key: 'f18c832a86c1474e510cae219eae78b44667b07e', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, h("div", { key: 'b0adaa4e02d6394293ed3e4cc4a2331b46cc9fd1', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '9c08d5fa3cb3bde27b641f71fa2bbc0612b0b93f', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: 'cbdc31800e068702b0dc50ced9139c25e8e30785', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
731
733
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
|
|
732
|
-
})), h("g", { key: '
|
|
734
|
+
})), h("g", { key: 'af8c9da33f138918e81b80ae691c9a58bbd9232b', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
733
735
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
734
|
-
})), h("g", { key: '
|
|
736
|
+
})), h("g", { key: '6ccca1f63545eae71d024ee5da59d0149607e3d1', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
735
737
|
return [
|
|
736
738
|
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
737
739
|
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
|
|
@@ -742,18 +744,18 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
742
744
|
}
|
|
743
745
|
} }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
744
746
|
];
|
|
745
|
-
}))), h("g", { key: '
|
|
747
|
+
}))), h("g", { key: '3716205850e37ff3c28b0f2b60eb802030c43486', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
|
|
746
748
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
747
|
-
})), h("g", { key: '
|
|
749
|
+
})), h("g", { key: 'ae4c41ce94798a93b9177acc06e5239978ae68c9', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
|
|
748
750
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
749
|
-
})), h("foreignObject", { key: '
|
|
751
|
+
})), h("foreignObject", { key: '9ecdb1ed900fe490f410aaf723d42d70ace00abb', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, h("div", { key: '11f52db7cb359d4c7d06c60f90522e79fcdba8d6', style: foreignObjectAgentProps })), h("foreignObject", { key: 'fe41edba48d92e874b2d91710109915462b84c1e', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, h("div", { key: '4184ba626040e1bd02e99528155e739a78f91b88', style: foreignObjectAgentProps })), h("g", { key: 'b7aec5044c7eb0876f3538315a07249f63e8ce7a', class: { spinning: this.isSpinning, Center: true } }, h("foreignObject", { key: '8ac120e48cca2609822cc2a56a631b644b31f817', ref: (el) => {
|
|
750
752
|
if (el) {
|
|
751
753
|
el.setAttribute('width', '100');
|
|
752
754
|
el.setAttribute('height', '100');
|
|
753
755
|
}
|
|
754
756
|
}, style: {
|
|
755
757
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
756
|
-
} }, h("div", { key: '
|
|
758
|
+
} }, h("div", { key: 'dfe3083c12038c4a5ee24cdc7e0cc25c8e6d2220', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), h("g", { key: '67813a6d878b3e75605cf35acc436848a1ed7138' }, this.options.map((_el, index) => {
|
|
757
759
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
758
760
|
})))));
|
|
759
761
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-
|
|
1
|
+
export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-465c9acd.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-
|
|
1
|
+
export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-465c9acd.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/package.json
CHANGED
package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-f6f621a5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as e}from"./index-48c42d04.js";var s,r,n,a,o,h,c,d,l,u;!function(t){t.ActiveTickets="ActiveTickets",t.ImplicitTickets="ImplicitTickets",t.RemainingTimes="RemainingTimes"}(s||(s={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(r||(r={})),function(t){t.fulfilled="fulfilled",t.drawn="drawn"}(n||(n={})),function(t){t.noPrize="noprize",t.luckywheel="luckywheel",t.bonus="bonus"}(a||(a={})),function(t){t.Arrow="Arrow",t.Partition="Partition"}(o||(o={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(h||(h={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(c||(c={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(d||(d={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(l||(l={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(u||(u={}));const g=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},b=t=>new Promise((i=>{let e=document.createElementNS("http://www.w3.org/2000/svg","image");e.onload=()=>i(e),e.onerror=()=>i(e),e.href.baseVal=t})),f=t=>({x:t,y:t}),p=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),m={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},v=async(t,i)=>{let e=((t,i)=>{const e=t.map((t=>{const e={};return Object.keys(t).map((s=>{"object"==typeof t[s]&&t[s]&&(e["Image1"===s?"Image":s]=t[s][i]||t[s]["*"])})),e}));return(t=>{let i=0;return t.map((t=>{i+=Number(t.probability)})),i})(t)<1&&e.push(m),e})(t.Program.WheelOfFortune.Partitions,i);return e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?e.map((t=>{if(t.Image){const i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.href.baseVal=t.Image,Object.assign(Object.assign({},t),{Image:i})}return t})):await Promise.all(e.map((async t=>Object.assign(Object.assign({},t),await(async t=>t?{Image:await b(t)}:{})(t.Image))))),e},y={in:{quad:t=>Math.pow(t,2),cubic:t=>Math.pow(t,3),quart:t=>Math.pow(t,4),quint:t=>Math.pow(t,5),sine:t=>1-Math.cos(t*Math.PI/2),expo:t=>0===t?0:Math.pow(2,10*t-10),circ:t=>1-Math.sqrt(1-Math.pow(t,2))},out:{quad:t=>1-Math.pow(1-t,2),cubic:t=>1-Math.pow(1-t,3),quart:t=>1-Math.pow(1-t,4),quint:t=>1-Math.pow(1-t,5),sine:t=>Math.sin(t*Math.PI/2),expo:t=>1===t?1:1-Math.pow(2,-10*t),circ:t=>Math.sqrt(1-Math.pow(t-1,2))}},x={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},w={in:{quad:t=>2*t,cubic:t=>3*t**2,quart:t=>4*t**3,quint:t=>5*t**4,sine:t=>Math.PI/2*Math.sin(Math.PI/2*t),expo:t=>10*Math.LN2*2**(10*t-10),circ:t=>-.5*(1-t**2)**-.5},out:{cubic:t=>3*t**2-6*t+3}},k=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],P=t=>Object.keys(t).map((i=>t[i]));var M;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(M||(M={}));class j{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:r}){this.arrowmode=h.DownFromTop,this.convertDegToArc=t=>t*Math.PI/180,this.convertArcToDeg=t=>180*t/Math.PI%360,this.getArcDelta=t=>2*Math.PI/t,this.findDeg=(t,i)=>t*this.convertArcToDeg(this.getArcDelta(i)),this.angleTransform=t=>{switch(t){case h.DownFromTop:case h.UpFromCenter:return-Math.PI/2;case h.DownFromCenter:case h.UpFromBottom:return Math.PI/2}},this.contentdirection=r,this.center=t/2,this.ratio=t/375,this.options=e,this.length=e.length,this.themeIndex=s,this.radius=i}get sizeImage(){const t=t=>48*this.ratio*5/t;if(this.length<=3)return t(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return t(this.length)}}getSizeImageByPartition(t){return this.options[t].Name?this.sizeImage/2:this.sizeImage}getSvgImageProps(t,i=1.25){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Name?this.radius-e/2-3*this.ratio:(this.radius-e/2)/Number(i)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(t,this.getOffsetImage(e),s,d.outward)),{width:e,height:e})}getSvgTextProps(t,i){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Image?this.radius-e-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,s,void 0,i))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t,this.options[t].Image?80:100);return Object.assign({},i)}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(t){return{center:0,position:{x:-1*t/2,y:-1*t/2},transform:{x:0,y:0}}}get direction(){return M.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:d[this.contentdirection])}getPartitionPositions(t,i,e){const s=this.angleTransform(this.arrowmode)+this.direction*t*2*Math.PI/this.length,r=((t,i,e)=>{const s=f(e);return{x:s.x+t*Math.cos(i),y:s.y+t*Math.sin(i)}})(i||this.radius-9*this.ratio,s,this.center+e.center);return{transformOrigin:p(r,e.transform),point:p(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:n,transformOrigin:a}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},n),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?n.x:n.x-100}px, ${n.y-50}px)`,"transform-origin":`${o=a,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=f(this.center),e=f(this.radius),{point:s,pointNext:r}=((t,i,e,s)=>{const r=t=>((t,i,e,s)=>{const r=Math.PI/180*(360/i*(t-.5)-90),n=f(s),a=f(e);return{x:n.x+a.x*Math.cos(r),y:n.y+a.y*Math.sin(r)}})(t,i,e,s);return{point:r(t),pointNext:r(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...P(i),"L",...P(s),"A",...P(e),"0 0 1",...P(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-t,this.length)}getSpinnerProps(){const t=f(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class O{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=u.cubic,this.param=k[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=l.halt,this.cb=()=>{i(),this.setDeg(t,0)},this.degTarget=t+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const t=this.param.loopSpeed,i=t=>33*x[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,y.in[this.easingType],w.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,y.out[this.easingType],w.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,x[this.easingType]),this.continueRepeat()};({[l.launch]:()=>{this.cb=()=>{this.step=l.loop,this.setDeg(t,x[this.easingType]),this.continueRepeat()},e()},[l.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[l.halt]:()=>{this.deg===360-t?s():r()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,r)=>{let n=null;const a=()=>{let o=(new Date).getTime();n||(n=o);const h=o-n,c=e*s(h/t)+i,d=Math.abs(r(h/t));this.setDeg(c,d),h<t?setTimeout((()=>a()),30):this.cb()};a()},this.animate=(t,i,e,s,r)=>{let n=null;window.cancelAnimationFrame(n);let a=null;const o=h=>{a||(a=h);const c=h-a,d=e*s(c/t)+i,l=Math.abs(r(c/t));this.setDeg(d,l),c<t?n=window.requestAnimationFrame(o):this.cb()};n=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=l.launch,this.ticker()}}const C=class{constructor(i){t(this,i),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.host.prepend(i)}),1)})).catch((t=>{console.log("Error ",t)}))},this.renderImage=(t,i)=>{const e=this.options[i].Image;g(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{this.spinable=!!(this.luckywheel.Current&&Number(this.luckywheel.Current.RemainingTimes)>0)},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(t){const{type:i,data:e}=null==t?void 0:t.data;if("SpinLuckyWheelRes"===i&&this.isSpinning){const t=+e.Result.WheelOfFortunePartitionIndex||0;e.State===n.fulfilled?this.handleSpinResult(e,t):this.handleSpinError(t)}}handleSpinError(t){const i=this.settings.getDeg(t);this.spinner.halt(i,(()=>{this.isSpinning=!1,this.updateSpinable(),window.postMessage({type:"ShowLuckywheelRewardModal",data:{HasError:!0,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes)}})}))}handleSpinResult(t,i){if(this.luckywheel.Program.Id===t.LotteryProgramID){const e=this.settings.getDeg(i);this.spinner.halt(e,(()=>{var e;this.isSpinning=!1,this.updateSpinable();const s=this.luckywheel.Program.WheelOfFortune.Partitions[i],r=null===(e=t.Result.Outcomes)||void 0===e?void 0:e.some((t=>{var i;return(null===(i=t.Action)||void 0===i?void 0:i.Type)===a.noPrize}));window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeText:(null==s?void 0:s.PrizeText[this.language])||(null==s?void 0:s.PrizeText["*"]),PrizeMessage:(null==s?void 0:s.Name[this.language])||(null==s?void 0:s.Name["*"]),NoPrize:r,HasError:!1,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes)}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await v(this.luckywheel,c.en),this.settings=new j({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new O({tick:(t,i)=>{g(this.spinContainer,{style:[`transform: rotate(${t}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*i}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}setSvgSize(t){if(!t||!this.size)return;const i=this.size.toString();t.getAttribute("width")!==i&&t.setAttribute("width",i),t.getAttribute("height")!==i&&t.setAttribute("height",i)}render(){const t={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"dea0312f82705e6b8fdf61c11b0ff3d75239a0dd",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"6c993e25b5a1623a80e2055de54d7c62b3f043dd",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",{key:"b080cf787de8b668348e5cbfdd108bab91007429",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},i("div",{key:"42ac42d1c7640d6fa261f38bd6ec0df209bf0dc4",style:t})),i("g",Object.assign({key:"2fb087f5334c2a707ccd7b92463497c1b13482f9",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"2a09aaf2174b2cc19684c63969f40f3beb3e5289",class:"PartitionsBackgrounds"},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},t)},i("div",{style:t}))))),i("g",{key:"6ee563dc6b42276d74edd61856e695d8abe35379",class:"PartitionsBackgroundStrokes"},this.options.map(((t,e)=>i("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(e),{width:this.size,height:this.size}))))),i("g",{key:"935550491a5a981c7b6c7c1ccdeb8aba2ce835f1",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((t,e)=>[t.Image&&i("g",{class:`PartitionImage PartitionImage${e}`,ref:t=>this.renderImage(t,e)}),t.Name&&i("foreignObject",Object.assign({class:"PartitionText",ref:t=>{if(t){const i=this.options[e].Image?"80":"100";t.setAttribute("width",i),t.setAttribute("height",i)}}},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"2d309d37c22023309ecf19d953622d984b37515f",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition1 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("g",{key:"6902f2a74a087386139c3db63e77ef41d8b31965",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition2 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("foreignObject",{key:"61b905c2c1b720b71c96f28a6ec9573857133210",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:t},i("div",{key:"14ba7488b4f4ca06b8b390cd092fbc3c5a9a330e",style:t})),i("foreignObject",{key:"1e1f5f05263ccbf21c5f8a5f6375ad26a1e9fccb",ref:this.setSvgSize.bind(this),class:"Top Customable",style:t},i("div",{key:"b92bbfca93e3af0b20b91ca8a3c56a8ae559c053",style:t})),i("g",{key:"7d173f84af140a683d76860e7ad2ee364566dcdd",class:{spinning:this.isSpinning,Center:!0}},i("foreignObject",{key:"a541d5dc3d2402c3ff79a51101b7e606e80be499",ref:t=>{t&&(t.setAttribute("width","100"),t.setAttribute("height","100"))},style:{transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}},i("div",{key:"ae0ddee96b263aac2be758a6773ce1caa3e36d86",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),i("g",{key:"9d2fee82d02199ea22fa740fe01cdd7f1590107d"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};C.style=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 14px);font-weight:900}';export{C}
|