@everymatrix/casino-engagement-suite-luckywheel 0.8.8 → 0.9.1

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.
@@ -1 +1 @@
1
- import{p as e,b as n}from"./p-7d1170ae.js";export{s as setNonce}from"./p-7d1170ae.js";import{g as i}from"./p-e1255160.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["p-562beee7",[[1,"casino-engagement-suite-luckywheel",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],luckywheel:[16],size:[1],contentdirection:[1],limitStylingAppends:[32],isPartitionsCustomableReady:[32],isSpinning:[32],options:[32],radius:[32],speed:[32],settings:[32],svg:[32],spinContainer:[32],spinable:[32],spinner:[32]},[[8,"message","handleEvent"]]]]]],e))));
1
+ import{p as e,b as n}from"./p-7d1170ae.js";export{s as setNonce}from"./p-7d1170ae.js";import{g as i}from"./p-e1255160.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["p-66452ab3",[[1,"casino-engagement-suite-luckywheel",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],luckywheel:[16],size:[1],contentdirection:[1],limitStylingAppends:[32],isPartitionsCustomableReady:[32],isSpinning:[32],options:[32],radius:[32],speed:[32],settings:[32],svg:[32],spinContainer:[32],spinable:[32],spinner:[32]},[[8,"message","handleEvent"]]]]]],e))));
@@ -1 +1 @@
1
- export{C as CasinoEngagementSuiteLuckywheel}from"./p-84fdebf3.js";import"./p-7d1170ae.js";
1
+ export{C as CasinoEngagementSuiteLuckywheel}from"./p-17d5b504.js";import"./p-7d1170ae.js";
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var s,r,a,n,o,h;!function(t){t.Arrow="Arrow",t.Partition="Partition"}(s||(s={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(r||(r={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(a||(a={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(n||(n={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(o||(o={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(h||(h={}));const c=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},d=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})),l=t=>({x:t,y:t}),u=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),g={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},b=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(g),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 d(t)}:{})(t.Image))))),e},f={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))}},p={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},m={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}},v=[{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}],y=t=>Object.keys(t).map((i=>t[i]));var x;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(x||(x={}));class k{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:a}){this.arrowmode=r.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 r.DownFromTop:case r.UpFromCenter:return-Math.PI/2;case r.DownFromCenter:case r.UpFromBottom:return Math.PI/2}},this.contentdirection=a,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,n.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 x.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:n[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=l(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:u(r,e.transform),point:u(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:a,transformOrigin:n}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},a),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?a.x:a.x-100}px, ${a.y-50}px)`,"transform-origin":`${o=n,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=l(this.center),e=l(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),a=l(s),n=l(e);return{x:a.x+n.x*Math.cos(r),y:a.y+n.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",...y(i),"L",...y(s),"A",...y(e),"0 0 1",...y(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-(t||this.length-1),this.length)}getSpinnerProps(){const t=l(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class w{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=h.cubic,this.param=v[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=o.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*p[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,f.in[this.easingType],m.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,f.out[this.easingType],m.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,p[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,p[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[o.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 a=null;const n=()=>{let o=(new Date).getTime();a||(a=o);const h=o-a,c=e*s(h/t)+i,d=Math.abs(r(h/t));this.setDeg(c,d),h<t?setTimeout((()=>n()),30):this.cb()};n()},this.animate=(t,i,e,s,r)=>{let a=null;window.cancelAnimationFrame(a);let n=null;const o=h=>{n||(n=h);const c=h-n,d=e*s(c/t)+i,l=Math.abs(r(c/t));this.setDeg(d,l),c<t?a=window.requestAnimationFrame(o):this.cb()};a=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=o.launch,this.ticker()}}const P=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;c(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{if(this.luckywheel.Current){if(Number(this.luckywheel.Current.RemainingTimes)>0)return void(this.spinable=!0);window.postMessage({type:"ShowNoSpinLeftModal"})}this.spinable=!1},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 i=null==t?void 0:t.data,{type:e}=i,s=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)i.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(e[s[r]]=t[s[r]])}return e}(i,["type"]);if("SpinLuckyWheelRes"===e&&this.luckywheel.Program.Id===s.data.LotteryProgramID){const t=!1===s.success,i=+s.data.Result.WheelOfFortunePartitionIndex;this.spinner.halt(this.settings.getDeg(i),(()=>{var e;this.isSpinning=!1,this.updateSpinable();let s="";if(!t){const t=null===(e=this.luckywheel.Program.WheelOfFortune.Partitions[i])||void 0===e?void 0:e.PrizeText;s=t[this.language]||t["*"],this.luckywheel.Current.RemainingTimes=+this.luckywheel.Current.RemainingTimes-1}window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:s,HasError:t}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,a.en),this.settings=new k({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new w({tick:(t,i)=>{c(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}`}}render(){const t={height:this.size,width:this.size},e={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"3820d08a8d1a5efc25485f446476ca06385adf8c",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"d6e943e251ca9d89ec9254ea8a8addfcc0780e26",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",Object.assign({key:"a7f6f5c11debf357b3a8962f19b4e22f76b9bafb"},t,{style:e,class:"Bottom Customable"}),i("div",{key:"53e485d5618a95127d0665561b9b508293a07906",style:e})),i("g",Object.assign({key:"3623809f60594fffec3c1868209899a0a8217826",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"2f94f7de9633855a9ebebdc834e8e0876b17c779",class:"PartitionsBackgrounds"},this.options.map(((t,s)=>i("foreignObject",{"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},e)},i("div",{style:e}))))),i("g",{key:"46f516b004f6ac09ee29df83648f9e96c4dd3c45",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:"fc9c6f8fcf6a4cd8762be0e10039277009b67ce9",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"},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"809b6b9ac7e288e821b6eb6f6319dae5a2a45baf",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition1 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("g",{key:"5320636da9ef1a3e82eadccc963222c679d8bbee",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition2 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("foreignObject",Object.assign({key:"a664c21985e9201cd823d12026ed7e1e1d3bc7eb",class:"Middle Customable"},t,{style:e}),i("div",{key:"2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468",style:e})),i("foreignObject",Object.assign({key:"7ec8a7c17e18a8820e4b75726fc436bcd33154f4",class:"Top Customable"},t,{style:e}),i("div",{key:"9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f",style:e})),i("g",{key:"13091e93777f225a52e27346a233789d1b43676f",class:{spinning:this.isSpinning,Center:!0},onClick:this.eventSpin},i("foreignObject",{key:"df4d32b1dea119e4d843987a2f31292d03eed485",style:{width:"100px",height:"100px",transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}})),i("g",{key:"17b172145a7bb8f523f4ea4f3e70f875b565cb20"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};P.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{P as C}
15
+ ***************************************************************************** */var s,r,a,n,o,h;!function(t){t.Arrow="Arrow",t.Partition="Partition"}(s||(s={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(r||(r={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(a||(a={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(n||(n={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(o||(o={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(h||(h={}));const c=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},d=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})),l=t=>({x:t,y:t}),u=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),g={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},b=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(g),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 d(t)}:{})(t.Image))))),e},f={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))}},p={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},m={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}},v=[{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}],y=t=>Object.keys(t).map((i=>t[i]));var x;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(x||(x={}));class w{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:a}){this.arrowmode=r.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 r.DownFromTop:case r.UpFromCenter:return-Math.PI/2;case r.DownFromCenter:case r.UpFromBottom:return Math.PI/2}},this.contentdirection=a,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,n.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 x.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:n[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=l(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:u(r,e.transform),point:u(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:a,transformOrigin:n}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},a),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?a.x:a.x-100}px, ${a.y-50}px)`,"transform-origin":`${o=n,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=l(this.center),e=l(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),a=l(s),n=l(e);return{x:a.x+n.x*Math.cos(r),y:a.y+n.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",...y(i),"L",...y(s),"A",...y(e),"0 0 1",...y(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-(t||this.length-1),this.length)}getSpinnerProps(){const t=l(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class k{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=h.cubic,this.param=v[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=o.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*p[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,f.in[this.easingType],m.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,f.out[this.easingType],m.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,p[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,p[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[o.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 a=null;const n=()=>{let o=(new Date).getTime();a||(a=o);const h=o-a,c=e*s(h/t)+i,d=Math.abs(r(h/t));this.setDeg(c,d),h<t?setTimeout((()=>n()),30):this.cb()};n()},this.animate=(t,i,e,s,r)=>{let a=null;window.cancelAnimationFrame(a);let n=null;const o=h=>{n||(n=h);const c=h-n,d=e*s(c/t)+i,l=Math.abs(r(c/t));this.setDeg(d,l),c<t?a=window.requestAnimationFrame(o):this.cb()};a=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=o.launch,this.ticker()}}const P=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;c(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{if(this.luckywheel.Current){if(Number(this.luckywheel.Current.RemainingTimes)>0)return void(this.spinable=!0);window.postMessage({type:"ShowNoSpinLeftModal"})}this.spinable=!1},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 i=null==t?void 0:t.data,{type:e}=i,s=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)i.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(e[s[r]]=t[s[r]])}return e}(i,["type"]);if("SpinLuckyWheelRes"===e&&this.luckywheel.Program.Id===s.data.LotteryProgramID){const t=!1===s.success,i=+s.data.Result.WheelOfFortunePartitionIndex;this.spinner.halt(this.settings.getDeg(i),(()=>{var e;this.isSpinning=!1,this.updateSpinable();let s="";if(!t){const t=null===(e=this.luckywheel.Program.WheelOfFortune.Partitions[i])||void 0===e?void 0:e.PrizeText;s=t[this.language]||t["*"],this.luckywheel.Current.RemainingTimes=+this.luckywheel.Current.RemainingTimes-1}window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:s,HasError:t}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,a.en),this.settings=new w({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new k({tick:(t,i)=>{c(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:"78d086b46bc1bcacbe302865dc15c792c773804d",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"6901ab597372b7ae55054e29b5682c7d9b485009",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",{key:"b4c74fb0ca34aa758cf8c465f81a81c01f43105d",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},i("div",{key:"8e28dd13395a973d85a9918c07823a50b4f321b3",style:t})),i("g",Object.assign({key:"60e57cf4d3a9d67d9518bf2ec6bf4ea424ea9fb0",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"df9c0a5a3dce9af3c52d0078aba94dd7fb282e93",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:"68459c2a782308b0fe0bf3cd5f2af7fba9b3cb21",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:"861cb52c03df6c1382444f39faddb655e3cfc666",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:"643f0e15b17dc284f24b7041db6db50103c00e95",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:"c67e6b5ced27ad8f7a754761a5cc0b208d0ba5e8",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:"9f7da36604a540d5e5a28e7a70be3214a9d3573e",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:t},i("div",{key:"68bfe0e45df06d3467c38e17a52c28b31743e854",style:t})),i("foreignObject",{key:"c83067b46e165f43604562f4b7c2cb7c392538ee",ref:this.setSvgSize.bind(this),class:"Top Customable",style:t},i("div",{key:"a13e39bc3b343067722b0ba7559bb04e42d697c9",style:t})),i("g",{key:"2acf2669dac5c601cc6bc9e153a978979fead125",class:{spinning:this.isSpinning,Center:!0}},i("foreignObject",{key:"c20231aaa327354e573dc9ba9ace7c773341040d",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:"c5f53cadfe9efbde4e31a253f3567df4cc78f273",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),i("g",{key:"c22942d06adeb36b68fcfe8b72c936588058e6ac"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};P.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{P as C}
@@ -0,0 +1 @@
1
+ export{C as casino_engagement_suite_luckywheel}from"./p-17d5b504.js";import"./p-7d1170ae.js";
@@ -695,29 +695,48 @@ const CasinoEngagementSuiteLuckywheel = class {
695
695
  '--size': `${this.size}`
696
696
  };
697
697
  }
698
+ setSvgSize(el) {
699
+ if (!el || !this.size)
700
+ return;
701
+ const size = this.size.toString();
702
+ if (el.getAttribute('width') !== size) {
703
+ el.setAttribute('width', size);
704
+ }
705
+ if (el.getAttribute('height') !== size) {
706
+ el.setAttribute('height', size);
707
+ }
708
+ }
698
709
  render() {
699
- const sizeProps = { height: this.size, width: this.size };
700
710
  const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
701
- return (index.h("div", { key: '3820d08a8d1a5efc25485f446476ca06385adf8c', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: 'd6e943e251ca9d89ec9254ea8a8addfcc0780e26', width: this.size, height: this.size, ref: (el) => {
711
+ return (index.h("div", { key: '78d086b46bc1bcacbe302865dc15c792c773804d', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: '6901ab597372b7ae55054e29b5682c7d9b485009', width: this.size, height: this.size, ref: (el) => {
702
712
  this.svg = el;
703
- } }, index.h("foreignObject", Object.assign({ key: 'a7f6f5c11debf357b3a8962f19b4e22f76b9bafb' }, sizeProps, { style: foreignObjectAgentProps, class: "Bottom Customable" }), index.h("div", { key: '53e485d5618a95127d0665561b9b508293a07906', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: '3623809f60594fffec3c1868209899a0a8217826', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: '2f94f7de9633855a9ebebdc834e8e0876b17c779', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
704
- return (index.h("foreignObject", { "clip-path": `url(#clip${index$1})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index$1.toString() }, foreignObjectAgentProps) }, index.h("div", { style: foreignObjectAgentProps })));
705
- })), index.h("g", { key: '46f516b004f6ac09ee29df83648f9e96c4dd3c45', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
713
+ } }, index.h("foreignObject", { key: 'b4c74fb0ca34aa758cf8c465f81a81c01f43105d', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, index.h("div", { key: '8e28dd13395a973d85a9918c07823a50b4f321b3', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: '60e57cf4d3a9d67d9518bf2ec6bf4ea424ea9fb0', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: 'df9c0a5a3dce9af3c52d0078aba94dd7fb282e93', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
714
+ 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 })));
715
+ })), index.h("g", { key: '68459c2a782308b0fe0bf3cd5f2af7fba9b3cb21', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
706
716
  return (index.h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index$1), { width: this.size, height: this.size })));
707
- })), index.h("g", { key: 'fc9c6f8fcf6a4cd8762be0e10039277009b67ce9', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
717
+ })), index.h("g", { key: '861cb52c03df6c1382444f39faddb655e3cfc666', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
708
718
  return [
709
719
  el.Image && (index.h("g", { class: `PartitionImage PartitionImage${index$1}`, ref: (el) => this.renderImage(el, index$1) })),
710
- el.Name && (index.h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index$1)), index.h("div", { class: "PartitionTextEntityContainer" }, index.h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
720
+ el.Name && (index.h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
721
+ if (el) {
722
+ const size = this.options[index$1].Image ? '80' : '100';
723
+ el.setAttribute('width', size);
724
+ el.setAttribute('height', size);
725
+ }
726
+ } }, this.settings.getSvgTextPropsAdjustedByImage(index$1)), index.h("div", { class: "PartitionTextEntityContainer" }, index.h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
711
727
  ];
712
- }))), index.h("g", { key: '809b6b9ac7e288e821b6eb6f6319dae5a2a45baf', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index$1) => {
713
- return (index.h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
714
- })), index.h("g", { key: '5320636da9ef1a3e82eadccc963222c679d8bbee', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index$1) => {
715
- return (index.h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
716
- })), index.h("foreignObject", Object.assign({ key: 'a664c21985e9201cd823d12026ed7e1e1d3bc7eb', class: "Middle Customable" }, sizeProps, { style: foreignObjectAgentProps }), index.h("div", { key: '2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468', style: foreignObjectAgentProps })), index.h("foreignObject", Object.assign({ key: '7ec8a7c17e18a8820e4b75726fc436bcd33154f4', class: "Top Customable" }, sizeProps, { style: foreignObjectAgentProps }), index.h("div", { key: '9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f', style: foreignObjectAgentProps })), index.h("g", { key: '13091e93777f225a52e27346a233789d1b43676f', class: { spinning: this.isSpinning, Center: true }, onClick: this.eventSpin }, index.h("foreignObject", { key: 'df4d32b1dea119e4d843987a2f31292d03eed485', style: {
717
- width: '100px',
718
- height: '100px',
728
+ }))), index.h("g", { key: '643f0e15b17dc284f24b7041db6db50103c00e95', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index$1) => {
729
+ return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index$1.toString() } }, index.h("div", { style: foreignObjectAgentProps })));
730
+ })), index.h("g", { key: 'c67e6b5ced27ad8f7a754761a5cc0b208d0ba5e8', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index$1) => {
731
+ return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index$1.toString() } }, index.h("div", { style: foreignObjectAgentProps })));
732
+ })), index.h("foreignObject", { key: '9f7da36604a540d5e5a28e7a70be3214a9d3573e', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, index.h("div", { key: '68bfe0e45df06d3467c38e17a52c28b31743e854', style: foreignObjectAgentProps })), index.h("foreignObject", { key: 'c83067b46e165f43604562f4b7c2cb7c392538ee', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, index.h("div", { key: 'a13e39bc3b343067722b0ba7559bb04e42d697c9', style: foreignObjectAgentProps })), index.h("g", { key: '2acf2669dac5c601cc6bc9e153a978979fead125', class: { spinning: this.isSpinning, Center: true } }, index.h("foreignObject", { key: 'c20231aaa327354e573dc9ba9ace7c773341040d', ref: (el) => {
733
+ if (el) {
734
+ el.setAttribute('width', '100');
735
+ el.setAttribute('height', '100');
736
+ }
737
+ }, style: {
719
738
  transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
720
- } })), index.h("g", { key: '17b172145a7bb8f523f4ea4f3e70f875b565cb20' }, this.options.map((_el, index$1) => {
739
+ } }, index.h("div", { key: 'c5f53cadfe9efbde4e31a253f3567df4cc78f273', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), index.h("g", { key: 'c22942d06adeb36b68fcfe8b72c936588058e6ac' }, this.options.map((_el, index$1) => {
721
740
  return (index.h("clipPath", { id: `clip${index$1}` }, index.h("path", Object.assign({}, this.settings.getPartitionDraw(index$1)))));
722
741
  })))));
723
742
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-81cc1b36.js');
5
+ const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-7f447bbb.js');
6
6
  require('./index-6096cc4b.js');
7
7
 
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-81cc1b36.js');
5
+ const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-7f447bbb.js');
6
6
  require('./index-6096cc4b.js');
7
7
 
8
8
 
@@ -142,29 +142,48 @@ export class CasinoEngagementSuiteLuckywheel {
142
142
  '--size': `${this.size}`
143
143
  };
144
144
  }
145
+ setSvgSize(el) {
146
+ if (!el || !this.size)
147
+ return;
148
+ const size = this.size.toString();
149
+ if (el.getAttribute('width') !== size) {
150
+ el.setAttribute('width', size);
151
+ }
152
+ if (el.getAttribute('height') !== size) {
153
+ el.setAttribute('height', size);
154
+ }
155
+ }
145
156
  render() {
146
- const sizeProps = { height: this.size, width: this.size };
147
157
  const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
148
- return (h("div", { key: '3820d08a8d1a5efc25485f446476ca06385adf8c', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: 'd6e943e251ca9d89ec9254ea8a8addfcc0780e26', width: this.size, height: this.size, ref: (el) => {
158
+ return (h("div", { key: '78d086b46bc1bcacbe302865dc15c792c773804d', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: '6901ab597372b7ae55054e29b5682c7d9b485009', width: this.size, height: this.size, ref: (el) => {
149
159
  this.svg = el;
150
- } }, h("foreignObject", Object.assign({ key: 'a7f6f5c11debf357b3a8962f19b4e22f76b9bafb' }, sizeProps, { style: foreignObjectAgentProps, class: "Bottom Customable" }), h("div", { key: '53e485d5618a95127d0665561b9b508293a07906', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '3623809f60594fffec3c1868209899a0a8217826', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: '2f94f7de9633855a9ebebdc834e8e0876b17c779', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
151
- return (h("foreignObject", { "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
152
- })), h("g", { key: '46f516b004f6ac09ee29df83648f9e96c4dd3c45', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
160
+ } }, h("foreignObject", { key: 'b4c74fb0ca34aa758cf8c465f81a81c01f43105d', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, h("div", { key: '8e28dd13395a973d85a9918c07823a50b4f321b3', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '60e57cf4d3a9d67d9518bf2ec6bf4ea424ea9fb0', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: 'df9c0a5a3dce9af3c52d0078aba94dd7fb282e93', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
161
+ 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 })));
162
+ })), h("g", { key: '68459c2a782308b0fe0bf3cd5f2af7fba9b3cb21', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
153
163
  return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
154
- })), h("g", { key: 'fc9c6f8fcf6a4cd8762be0e10039277009b67ce9', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
164
+ })), h("g", { key: '861cb52c03df6c1382444f39faddb655e3cfc666', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
155
165
  return [
156
166
  el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
157
- el.Name && (h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
167
+ el.Name && (h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
168
+ if (el) {
169
+ const size = this.options[index].Image ? '80' : '100';
170
+ el.setAttribute('width', size);
171
+ el.setAttribute('height', size);
172
+ }
173
+ } }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
158
174
  ];
159
- }))), h("g", { key: '809b6b9ac7e288e821b6eb6f6319dae5a2a45baf', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
160
- return (h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
161
- })), h("g", { key: '5320636da9ef1a3e82eadccc963222c679d8bbee', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
162
- return (h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
163
- })), h("foreignObject", Object.assign({ key: 'a664c21985e9201cd823d12026ed7e1e1d3bc7eb', class: "Middle Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468', style: foreignObjectAgentProps })), h("foreignObject", Object.assign({ key: '7ec8a7c17e18a8820e4b75726fc436bcd33154f4', class: "Top Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f', style: foreignObjectAgentProps })), h("g", { key: '13091e93777f225a52e27346a233789d1b43676f', class: { spinning: this.isSpinning, Center: true }, onClick: this.eventSpin }, h("foreignObject", { key: 'df4d32b1dea119e4d843987a2f31292d03eed485', style: {
164
- width: '100px',
165
- height: '100px',
175
+ }))), h("g", { key: '643f0e15b17dc284f24b7041db6db50103c00e95', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
176
+ return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
177
+ })), h("g", { key: 'c67e6b5ced27ad8f7a754761a5cc0b208d0ba5e8', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
178
+ return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
179
+ })), h("foreignObject", { key: '9f7da36604a540d5e5a28e7a70be3214a9d3573e', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, h("div", { key: '68bfe0e45df06d3467c38e17a52c28b31743e854', style: foreignObjectAgentProps })), h("foreignObject", { key: 'c83067b46e165f43604562f4b7c2cb7c392538ee', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, h("div", { key: 'a13e39bc3b343067722b0ba7559bb04e42d697c9', style: foreignObjectAgentProps })), h("g", { key: '2acf2669dac5c601cc6bc9e153a978979fead125', class: { spinning: this.isSpinning, Center: true } }, h("foreignObject", { key: 'c20231aaa327354e573dc9ba9ace7c773341040d', ref: (el) => {
180
+ if (el) {
181
+ el.setAttribute('width', '100');
182
+ el.setAttribute('height', '100');
183
+ }
184
+ }, style: {
166
185
  transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
167
- } })), h("g", { key: '17b172145a7bb8f523f4ea4f3e70f875b565cb20' }, this.options.map((_el, index) => {
186
+ } }, h("div", { key: 'c5f53cadfe9efbde4e31a253f3567df4cc78f273', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), h("g", { key: 'c22942d06adeb36b68fcfe8b72c936588058e6ac' }, this.options.map((_el, index) => {
168
187
  return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
169
188
  })))));
170
189
  }
@@ -693,29 +693,48 @@ const CasinoEngagementSuiteLuckywheel = class {
693
693
  '--size': `${this.size}`
694
694
  };
695
695
  }
696
+ setSvgSize(el) {
697
+ if (!el || !this.size)
698
+ return;
699
+ const size = this.size.toString();
700
+ if (el.getAttribute('width') !== size) {
701
+ el.setAttribute('width', size);
702
+ }
703
+ if (el.getAttribute('height') !== size) {
704
+ el.setAttribute('height', size);
705
+ }
706
+ }
696
707
  render() {
697
- const sizeProps = { height: this.size, width: this.size };
698
708
  const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
699
- return (h("div", { key: '3820d08a8d1a5efc25485f446476ca06385adf8c', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: 'd6e943e251ca9d89ec9254ea8a8addfcc0780e26', width: this.size, height: this.size, ref: (el) => {
709
+ return (h("div", { key: '78d086b46bc1bcacbe302865dc15c792c773804d', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: '6901ab597372b7ae55054e29b5682c7d9b485009', width: this.size, height: this.size, ref: (el) => {
700
710
  this.svg = el;
701
- } }, h("foreignObject", Object.assign({ key: 'a7f6f5c11debf357b3a8962f19b4e22f76b9bafb' }, sizeProps, { style: foreignObjectAgentProps, class: "Bottom Customable" }), h("div", { key: '53e485d5618a95127d0665561b9b508293a07906', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '3623809f60594fffec3c1868209899a0a8217826', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: '2f94f7de9633855a9ebebdc834e8e0876b17c779', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
702
- return (h("foreignObject", { "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
703
- })), h("g", { key: '46f516b004f6ac09ee29df83648f9e96c4dd3c45', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
711
+ } }, h("foreignObject", { key: 'b4c74fb0ca34aa758cf8c465f81a81c01f43105d', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, h("div", { key: '8e28dd13395a973d85a9918c07823a50b4f321b3', style: foreignObjectAgentProps })), h("g", Object.assign({ key: '60e57cf4d3a9d67d9518bf2ec6bf4ea424ea9fb0', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: 'df9c0a5a3dce9af3c52d0078aba94dd7fb282e93', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
712
+ 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 })));
713
+ })), h("g", { key: '68459c2a782308b0fe0bf3cd5f2af7fba9b3cb21', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
704
714
  return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
705
- })), h("g", { key: 'fc9c6f8fcf6a4cd8762be0e10039277009b67ce9', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
715
+ })), h("g", { key: '861cb52c03df6c1382444f39faddb655e3cfc666', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
706
716
  return [
707
717
  el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
708
- el.Name && (h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
718
+ el.Name && (h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
719
+ if (el) {
720
+ const size = this.options[index].Image ? '80' : '100';
721
+ el.setAttribute('width', size);
722
+ el.setAttribute('height', size);
723
+ }
724
+ } }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
709
725
  ];
710
- }))), h("g", { key: '809b6b9ac7e288e821b6eb6f6319dae5a2a45baf', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
711
- return (h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
712
- })), h("g", { key: '5320636da9ef1a3e82eadccc963222c679d8bbee', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
713
- return (h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
714
- })), h("foreignObject", Object.assign({ key: 'a664c21985e9201cd823d12026ed7e1e1d3bc7eb', class: "Middle Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '2196c4ed1ac56fc2b82bdb4a5d7ea1dbffdaa468', style: foreignObjectAgentProps })), h("foreignObject", Object.assign({ key: '7ec8a7c17e18a8820e4b75726fc436bcd33154f4', class: "Top Customable" }, sizeProps, { style: foreignObjectAgentProps }), h("div", { key: '9ed4c6a2e777fe15adea97f764c1b1efe8a1c29f', style: foreignObjectAgentProps })), h("g", { key: '13091e93777f225a52e27346a233789d1b43676f', class: { spinning: this.isSpinning, Center: true }, onClick: this.eventSpin }, h("foreignObject", { key: 'df4d32b1dea119e4d843987a2f31292d03eed485', style: {
715
- width: '100px',
716
- height: '100px',
726
+ }))), h("g", { key: '643f0e15b17dc284f24b7041db6db50103c00e95', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
727
+ return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
728
+ })), h("g", { key: 'c67e6b5ced27ad8f7a754761a5cc0b208d0ba5e8', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
729
+ return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
730
+ })), h("foreignObject", { key: '9f7da36604a540d5e5a28e7a70be3214a9d3573e', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, h("div", { key: '68bfe0e45df06d3467c38e17a52c28b31743e854', style: foreignObjectAgentProps })), h("foreignObject", { key: 'c83067b46e165f43604562f4b7c2cb7c392538ee', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, h("div", { key: 'a13e39bc3b343067722b0ba7559bb04e42d697c9', style: foreignObjectAgentProps })), h("g", { key: '2acf2669dac5c601cc6bc9e153a978979fead125', class: { spinning: this.isSpinning, Center: true } }, h("foreignObject", { key: 'c20231aaa327354e573dc9ba9ace7c773341040d', ref: (el) => {
731
+ if (el) {
732
+ el.setAttribute('width', '100');
733
+ el.setAttribute('height', '100');
734
+ }
735
+ }, style: {
717
736
  transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
718
- } })), h("g", { key: '17b172145a7bb8f523f4ea4f3e70f875b565cb20' }, this.options.map((_el, index) => {
737
+ } }, h("div", { key: 'c5f53cadfe9efbde4e31a253f3567df4cc78f273', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), h("g", { key: 'c22942d06adeb36b68fcfe8b72c936588058e6ac' }, this.options.map((_el, index) => {
719
738
  return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
720
739
  })))));
721
740
  }
@@ -1,2 +1,2 @@
1
- export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-ddd29595.js';
1
+ export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-dd02aeae.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-ddd29595.js';
1
+ export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-dd02aeae.js';
2
2
  import './index-48c42d04.js';
@@ -54,5 +54,6 @@ export declare class CasinoEngagementSuiteLuckywheel {
54
54
  renderImage: (node: SVGElement, index: any) => void;
55
55
  updateSpinable: () => void;
56
56
  eventSpin: () => void;
57
+ setSvgSize(el: Element | null): void;
57
58
  render(): any;
58
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-luckywheel",
3
- "version": "0.8.8",
3
+ "version": "0.9.1",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- export{C as casino_engagement_suite_luckywheel}from"./p-84fdebf3.js";import"./p-7d1170ae.js";