@inntechcorp/it-design 4.0.0-beta.4 → 4.0.0-beta.6

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.
Files changed (200) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/MIGRATION.md +29 -1
  3. package/README.md +182 -64
  4. package/dist/cjs/_bundled/@radix-ui/primitive/dist/index.js +1 -1
  5. package/dist/cjs/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
  6. package/dist/cjs/_bundled/@radix-ui/react-context/dist/index.js +1 -1
  7. package/dist/cjs/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
  8. package/dist/cjs/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
  9. package/dist/cjs/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
  10. package/dist/cjs/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
  11. package/dist/cjs/_bundled/@radix-ui/react-id/dist/index.js +1 -1
  12. package/dist/cjs/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
  13. package/dist/cjs/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
  14. package/dist/cjs/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
  15. package/dist/cjs/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
  16. package/dist/cjs/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
  17. package/dist/cjs/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
  18. package/dist/cjs/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
  19. package/dist/cjs/_bundled/vaul/dist/index.js +1 -1
  20. package/dist/cjs/blocks/banner/index.js +1 -1
  21. package/dist/cjs/blocks/game-box/index.js +1 -1
  22. package/dist/cjs/blocks/game-carousel/index.js +1 -1
  23. package/dist/cjs/blocks/game-providers/logos.js +1 -1
  24. package/dist/cjs/blocks/game-shell/useDrawerChrome.js +1 -1
  25. package/dist/cjs/blocks/multiple-jackpots/index.js +1 -1
  26. package/dist/cjs/blocks/slider/index.js +1 -1
  27. package/dist/cjs/blocks/user-hub/bonus.js +1 -1
  28. package/dist/cjs/blocks/user-hub/settings.js +1 -1
  29. package/dist/cjs/blocks/user-hub/table.js +1 -1
  30. package/dist/cjs/context/PortalDocumentContext.js +1 -1
  31. package/dist/cjs/context-menu/ContextMenu.js +1 -1
  32. package/dist/cjs/dialog/Dialog.js +1 -1
  33. package/dist/cjs/dropdown-menu/CheckIcon.js +1 -1
  34. package/dist/cjs/dropdown-menu/processChildren.js +1 -1
  35. package/dist/cjs/dropdown-menu/useMenuItemChrome.js +1 -1
  36. package/dist/cjs/dropdown-menu/useSubMenuRegistry.js +1 -1
  37. package/dist/cjs/floating/createFloatingTrigger.js +1 -1
  38. package/dist/cjs/helpers/phone/usePhoneCountry.js +1 -1
  39. package/dist/cjs/helpers/theme/createTheme.js +1 -1
  40. package/dist/cjs/helpers/theme/importShadcnTheme.js +1 -1
  41. package/dist/cjs/hooks/useFocusTrap.js +1 -1
  42. package/dist/cjs/hooks/useLoadMoreSentinel.js +1 -1
  43. package/dist/cjs/hooks/useOnESCKeyDown.js +1 -1
  44. package/dist/cjs/index.js +1 -1
  45. package/dist/cjs/modal/container/ModalContainer.js +1 -1
  46. package/dist/cjs/modal/index.js +1 -1
  47. package/dist/cjs/router/ITDLink.js +1 -1
  48. package/dist/cjs/router/context.js +1 -1
  49. package/dist/cjs/router/matchActive.js +1 -1
  50. package/dist/cjs/toast/index.js +1 -1
  51. package/dist/css/accordion.css +2 -2
  52. package/dist/css/alert.css +1 -1
  53. package/dist/css/announcement-bar.css +1 -1
  54. package/dist/css/auth-page.css +3 -3
  55. package/dist/css/avatar.css +1 -1
  56. package/dist/css/back-top.css +1 -1
  57. package/dist/css/badge.css +85 -81
  58. package/dist/css/base.css +22 -16
  59. package/dist/css/block-form.css +5 -3
  60. package/dist/css/blocks-shared.css +8 -6
  61. package/dist/css/button-group.css +1 -1
  62. package/dist/css/button.css +8 -6
  63. package/dist/css/calendar.css +1 -1
  64. package/dist/css/card.css +1 -1
  65. package/dist/css/casino-featured.css +1 -1
  66. package/dist/css/chart.css +1 -1
  67. package/dist/css/checkbox.css +2 -2
  68. package/dist/css/code-input.css +5 -5
  69. package/dist/css/color-input.css +1 -1
  70. package/dist/css/coming-soon.css +1 -1
  71. package/dist/css/common.css +1 -1
  72. package/dist/css/components.css +1 -1
  73. package/dist/css/cropper.css +10 -6
  74. package/dist/css/datepicker.css +1 -1
  75. package/dist/css/default-avatar.css +1 -1
  76. package/dist/css/dialog.css +1 -1
  77. package/dist/css/dropdown-menu.css +1 -1
  78. package/dist/css/field.css +1 -1
  79. package/dist/css/filter-tabs.css +1 -1
  80. package/dist/css/flex.css +1 -1
  81. package/dist/css/floating.css +1 -1
  82. package/dist/css/footer.css +1 -1
  83. package/dist/css/form.css +1 -1
  84. package/dist/css/game-box.css +3 -3
  85. package/dist/css/game-carousel.css +1 -1
  86. package/dist/css/game-categories.css +1 -1
  87. package/dist/css/game-filter.css +1 -1
  88. package/dist/css/game-navigator.css +1 -1
  89. package/dist/css/game-providers.css +1 -1
  90. package/dist/css/game-search.css +1 -1
  91. package/dist/css/game-shell.css +3 -1
  92. package/dist/css/header.css +3 -3
  93. package/dist/css/help.css +1 -1
  94. package/dist/css/home-sections.css +1 -1
  95. package/dist/css/hovercard.css +1 -1
  96. package/dist/css/hstrip.css +1 -1
  97. package/dist/css/html-header.css +1 -1
  98. package/dist/css/image.css +1 -1
  99. package/dist/css/input.css +1 -1
  100. package/dist/css/label.css +1 -1
  101. package/dist/css/last-winners.css +1 -1
  102. package/dist/css/login.css +1 -1
  103. package/dist/css/mega-menu.css +3 -1
  104. package/dist/css/min-width-gate.css +1 -1
  105. package/dist/css/mobile-bottom-nav.css +1 -1
  106. package/dist/css/modal.css +8 -8
  107. package/dist/css/multiple-jackpots.css +3 -1
  108. package/dist/css/notifications-panel.css +2 -2
  109. package/dist/css/page.css +2 -2
  110. package/dist/css/popover.css +1 -1
  111. package/dist/css/post-viewer.css +1 -1
  112. package/dist/css/progress.css +1 -1
  113. package/dist/css/promotions-grid.css +3 -3
  114. package/dist/css/properties.css +1 -1
  115. package/dist/css/radio.css +1 -1
  116. package/dist/css/raffle.css +1 -1
  117. package/dist/css/rangepicker.css +1 -1
  118. package/dist/css/reset.css +2 -2
  119. package/dist/css/result.css +1 -1
  120. package/dist/css/select.css +1 -1
  121. package/dist/css/separator.css +1 -1
  122. package/dist/css/sheet.css +1 -1
  123. package/dist/css/signup.css +1 -0
  124. package/dist/css/skeleton.css +2 -2
  125. package/dist/css/slider.css +1 -1
  126. package/dist/css/spin.css +1 -1
  127. package/dist/css/stat-card.css +1 -1
  128. package/dist/css/sub-page-header.css +1 -1
  129. package/dist/css/svg-loader.css +1 -1
  130. package/dist/css/switch.css +1 -1
  131. package/dist/css/table.css +6 -4
  132. package/dist/css/tabs.css +1 -1
  133. package/dist/css/textarea.css +1 -1
  134. package/dist/css/toggle-group.css +1 -1
  135. package/dist/css/tooltip.css +1 -1
  136. package/dist/css/tournaments.css +8 -7
  137. package/dist/css/upload.css +1 -1
  138. package/dist/css/user-hub.css +3 -1
  139. package/dist/css/utilities.css +1 -1
  140. package/dist/css/vendor.css +4 -1
  141. package/dist/es/_bundled/@radix-ui/primitive/dist/index.js +1 -1
  142. package/dist/es/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
  143. package/dist/es/_bundled/@radix-ui/react-context/dist/index.js +1 -1
  144. package/dist/es/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
  145. package/dist/es/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
  146. package/dist/es/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
  147. package/dist/es/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
  148. package/dist/es/_bundled/@radix-ui/react-id/dist/index.js +1 -1
  149. package/dist/es/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
  150. package/dist/es/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
  151. package/dist/es/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
  152. package/dist/es/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
  153. package/dist/es/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
  154. package/dist/es/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
  155. package/dist/es/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
  156. package/dist/es/_bundled/vaul/dist/index.js +1 -1
  157. package/dist/es/blocks/banner/index.js +1 -1
  158. package/dist/es/blocks/game-box/index.js +1 -1
  159. package/dist/es/blocks/game-carousel/index.js +1 -1
  160. package/dist/es/blocks/game-providers/logos.js +1 -1
  161. package/dist/es/blocks/game-shell/useDrawerChrome.js +1 -1
  162. package/dist/es/blocks/multiple-jackpots/index.js +1 -1
  163. package/dist/es/blocks/slider/index.js +1 -1
  164. package/dist/es/blocks/user-hub/bonus.js +1 -1
  165. package/dist/es/blocks/user-hub/cashier.js +1 -1
  166. package/dist/es/blocks/user-hub/history.js +1 -1
  167. package/dist/es/blocks/user-hub/profile.js +1 -1
  168. package/dist/es/blocks/user-hub/raffles.js +1 -1
  169. package/dist/es/blocks/user-hub/settings.js +1 -1
  170. package/dist/es/blocks/user-hub/table.js +1 -1
  171. package/dist/es/context/ITDContext.js +1 -1
  172. package/dist/es/context/PortalDocumentContext.js +1 -1
  173. package/dist/es/context-menu/ContextMenu.js +1 -1
  174. package/dist/es/dialog/Dialog.js +1 -1
  175. package/dist/es/dropdown-menu/CheckIcon.js +1 -1
  176. package/dist/es/dropdown-menu/processChildren.js +1 -1
  177. package/dist/es/dropdown-menu/useMenuItemChrome.js +1 -1
  178. package/dist/es/dropdown-menu/useSubMenuRegistry.js +1 -1
  179. package/dist/es/floating/createFloatingTrigger.js +1 -1
  180. package/dist/es/helpers/phone/usePhoneCountry.js +1 -1
  181. package/dist/es/helpers/theme/createTheme.js +1 -1
  182. package/dist/es/helpers/theme/importShadcnTheme.js +1 -1
  183. package/dist/es/hooks/useFocusTrap.js +1 -1
  184. package/dist/es/hooks/useLoadMoreSentinel.js +1 -1
  185. package/dist/es/hooks/useOnESCKeyDown.js +1 -1
  186. package/dist/es/index.js +1 -1
  187. package/dist/es/modal/container/ModalContainer.js +1 -1
  188. package/dist/es/modal/index.js +1 -1
  189. package/dist/es/page/blocks.js +1 -1
  190. package/dist/es/page/blocks.query.js +1 -1
  191. package/dist/es/page/editor/theme.js +1 -1
  192. package/dist/es/router/ITDLink.js +1 -1
  193. package/dist/es/router/context.js +1 -1
  194. package/dist/es/router/matchActive.js +1 -1
  195. package/dist/es/toast/index.js +1 -1
  196. package/dist/global.css +188 -154
  197. package/dist/index.d.ts +217 -189
  198. package/package.json +26 -36
  199. package/dist/cjs/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
  200. package/dist/es/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a,Fragment as i}from"react/jsx-runtime";import{useState as n,useRef as t,useEffect as s}from"react";import{ImageOff as o,Play as l,User as r}from"lucide-react";import d from"../../image/index.js";import m from"../../skeleton/index.js";import c from"../../spin/index.js";import{useNaturalRatio as g}from"../../hooks/useNaturalRatio.js";const p=({id:p,slug:b,image:h,imageSource:u,art:x,artContent:v,alt:N,name:f,description:k,playText:y,ratio:w,background:S=!0,outline:O=!0,overflow:j=!0,hasFunSupport:L=!1,action:T="click",link:C="#",target:F="_self",liveData:D,players:R,showPlayers:E=!0,limit:W,formatLimit:z,onlineText:A="Online",offlineText:H="Offline",skeleton:M=!1,loading:P=!1,broken:q=!1,onPlay:B,className:I})=>{const[K,V]=n(!1),_=t(null),G=g(_,h,K||!!w);s(()=>{V(!1)},[h]);const J=t(null);s(()=>{const e=J.current,a=_.current;if(!e||!a)return;const i=()=>{delete a.dataset.nameLines;const i=getComputedStyle(e),n=parseFloat(i.lineHeight)||13,t=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),s=Math.max(1,Math.round((e.scrollHeight-t)/n));s>=3?a.dataset.nameLines="3":2===s&&(a.dataset.nameLines="2")};i();const n=new(e.ownerDocument.defaultView??window).ResizeObserver(i);return n.observe(a),()=>n.disconnect()},[f,y]);const Q=D?.lastWon?.map(e=>e.color+":"+e.result).join("|"),[U,X]=n(!1),[Y,Z]=n(void 0);if(Q!==Y&&(Z(Q),void 0!==Y&&void 0!==Q&&X(!0)),s(()=>{if(!U)return;const e=setTimeout(()=>X(!1),4e3);return()=>clearTimeout(e)},[U]),M)return e("div",{className:"inn-image-box itd-gamebox"+(I?" "+I:""),style:w?{aspectRatio:w}:void 0,children:e("div",{className:"inn-image-box-item itd-gamebox-item","data-background":"false","data-skeleton":"true",children:e(m,{className:"itd-gamebox-skeleton"})})},p);const $=b??(f?f.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"");const ee=z??(e=>String(e)),ae=w??G??void 0,ie=ae?.split("/").map(Number),ne=2===ie?.length&&ie.every(e=>Number.isFinite(e)&&e>0)?ie[1]>ie[0]?"portrait":ie[1]===ie[0]?"square":"landscape":"landscape",te=e=>{P||B?.($,e)},se=a("div",{className:"inn-image-box-content itd-gamebox-art"+(D?" itd-gamebox-art-live":""),style:x&&!h?{background:x}:void 0,children:[h&&!q&&a(i,{children:[!K&&e(m,{className:"itd-gamebox-skeleton"}),e(d,{className:"itd-gamebox-img",src:h,source:u,alt:f??N??"",onLoad:()=>V(!0),onError:()=>V(!0)})]}),q&&e(o,{className:"itd-gamebox-broken","aria-hidden":!0}),v]});return a("div",{ref:_,className:"inn-image-box itd-gamebox"+(I?" "+I:""),style:ae?{aspectRatio:ae}:void 0,"data-itd-reserving":!(w||!h||G||K)||void 0,"data-orientation":ne,children:[a("div",{className:"inn-image-box-item itd-gamebox-item","data-background":String(S),"data-outline":String(O),"data-overflow":String(j),"data-loading":String(P),"data-broken":String(q),"data-offline":String(!1===D?.isOpen),children:["link"===T?e("a",{className:"inn-image-box-content-wrapper itd-gamebox-click",href:C,target:F,children:se}):e("div",{className:"inn-image-box-content-wrapper itd-gamebox-click",role:"button",tabIndex:0,onClick:()=>te(!1),onKeyDown:e=>{"Enter"===e.key&&te(!1)},children:se}),L&&!D&&e("button",{type:"button",className:"inn-image-box-demo-button itd-gamebox-demo",onClick:()=>te(!0),children:a("span",{children:[e(l,{"aria-hidden":!0}),"Demo"]})}),f&&a("div",{className:"info-container itd-gamebox-info",children:[e("span",{className:"name",ref:J,children:y??f}),k&&e("span",{className:"description",children:k})]}),f&&e("span",{className:"itd-gamebox-play","aria-hidden":!0,children:e(l,{})}),E&&null!=R&&!D&&a("div",{className:"inn-image-box-players itd-gamebox-players",children:[e(r,{"aria-hidden":!0}),e("span",{children:R})]})]}),P&&e("span",{className:"itd-gamebox-spinner",children:e(c,{})}),D&&a("div",{className:"inn-image-box-game-info itd-gamebox-live",children:[D.dealerName&&e("div",{className:"inn-image-box-game-name",children:e("span",{children:f})}),D.dealerName&&void 0!==D.isOpen&&a("div",{className:"inn-image-box-online-status","data-open":String(D.isOpen),children:[e("i",{className:"online-status-icon "+(D.isOpen?"online":"offline"),"aria-hidden":!0}),e("span",{children:D.isOpen?A:H})]}),D.seats&&a("div",{className:"inn-image-box-number-of-players",children:[e(r,{"aria-hidden":!0}),e("span",{children:D.seats.total-D.seats.available+"/"+D.seats.total})]}),!D.seats&&void 0!==D.players&&a("div",{className:"inn-image-box-number-of-players",children:[e(r,{"aria-hidden":!0}),e("span",{children:D.players})]}),D.dealerName&&e("div",{className:"inn-image-box-dealer-name",children:e("span",{children:D.dealerName})}),W&&e("div",{className:"inn-image-box-table-limit","data-center":String(!D.dealerName),children:e("span",{children:ee(W.min)+" - "+ee(W.max)})}),D.lastWon&&e("div",{className:"inn-image-box-last-won-numbers",children:D.lastWon.map((a,i)=>e("span",{className:a.color+(0===i&&U?" flash-animation":""),onAnimationEnd:0===i?e=>{"itd-gamebox-flash"===e.animationName&&X(!1)}:void 0,children:a.result},a.result+"-"+i))}),D.seats&&e("div",{className:"inn-image-box-available-seats",children:Array.from({length:D.seats.total}).map((a,i)=>e("span",{className:D.seats?.taken?.includes(i+1)?"unavailable":"available",children:e(r,{"aria-hidden":!0})},i))})]})]},p)};export{p as default};
1
+ import{jsx as e,jsxs as a,Fragment as i}from"react/jsx-runtime";import{useState as n,useRef as t,useEffect as s}from"react";import{ImageOff as o,Play as l,User as r}from"lucide-react";import d from"../../image/index.js";import m from"../../skeleton/index.js";import c from"../../spin/index.js";import g from"../../hooks/useNaturalRatio.js";const p=({id:p,slug:b,image:h,imageSource:u,art:x,artContent:v,alt:N,name:f,description:k,playText:y,ratio:w,background:S=!0,outline:O=!0,overflow:j=!0,hasFunSupport:L=!1,action:T="click",link:C="#",target:F="_self",liveData:D,players:R,showPlayers:E=!0,limit:W,formatLimit:z,onlineText:A="Online",offlineText:H="Offline",skeleton:M=!1,loading:P=!1,broken:q=!1,onPlay:B,className:I})=>{const[K,V]=n(!1),_=t(null),G=g(_,h,K||!!w);s(()=>{V(!1)},[h]);const J=t(null);s(()=>{const e=J.current,a=_.current;if(!e||!a)return;const i=()=>{delete a.dataset.nameLines;const i=getComputedStyle(e),n=parseFloat(i.lineHeight)||13,t=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),s=Math.max(1,Math.round((e.scrollHeight-t)/n));s>=3?a.dataset.nameLines="3":2===s&&(a.dataset.nameLines="2")};i();const n=new(e.ownerDocument.defaultView??window).ResizeObserver(i);return n.observe(a),()=>n.disconnect()},[f,y]);const Q=D?.lastWon?.map(e=>e.color+":"+e.result).join("|"),[U,X]=n(!1),[Y,Z]=n(void 0);if(Q!==Y&&(Z(Q),void 0!==Y&&void 0!==Q&&X(!0)),s(()=>{if(!U)return;const e=setTimeout(()=>X(!1),4e3);return()=>clearTimeout(e)},[U]),M)return e("div",{className:"inn-image-box itd-gamebox"+(I?" "+I:""),style:w?{aspectRatio:w}:void 0,children:e("div",{className:"inn-image-box-item itd-gamebox-item","data-background":"false","data-skeleton":"true",children:e(m,{className:"itd-gamebox-skeleton"})})},p);const $=b??(f?f.toLowerCase().replace(/[^a-z0-9]+/g,"-"):"");const ee=z??(e=>String(e)),ae=w??G??void 0,ie=ae?.split("/").map(Number),ne=2===ie?.length&&ie.every(e=>Number.isFinite(e)&&e>0)?ie[1]>ie[0]?"portrait":ie[1]===ie[0]?"square":"landscape":"landscape",te=e=>{P||B?.($,e)},se=a("div",{className:"inn-image-box-content itd-gamebox-art"+(D?" itd-gamebox-art-live":""),style:x&&!h?{background:x}:void 0,children:[h&&!q&&a(i,{children:[!K&&e(m,{className:"itd-gamebox-skeleton"}),e(d,{className:"itd-gamebox-img",src:h,source:u,alt:f??N??"",onLoad:()=>V(!0),onError:()=>V(!0)})]}),q&&e(o,{className:"itd-gamebox-broken","aria-hidden":!0}),v]});return a("div",{ref:_,className:"inn-image-box itd-gamebox"+(I?" "+I:""),style:ae?{aspectRatio:ae}:void 0,"data-itd-reserving":!(w||!h||G||K)||void 0,"data-orientation":ne,children:[a("div",{className:"inn-image-box-item itd-gamebox-item","data-background":String(S),"data-outline":String(O),"data-overflow":String(j),"data-loading":String(P),"data-broken":String(q),"data-offline":String(!1===D?.isOpen),children:["link"===T?e("a",{className:"inn-image-box-content-wrapper itd-gamebox-click",href:C,target:F,children:se}):e("div",{className:"inn-image-box-content-wrapper itd-gamebox-click",role:"button",tabIndex:0,onClick:()=>te(!1),onKeyDown:e=>{"Enter"===e.key&&te(!1)},children:se}),L&&!D&&e("button",{type:"button",className:"inn-image-box-demo-button itd-gamebox-demo",onClick:()=>te(!0),children:a("span",{children:[e(l,{"aria-hidden":!0}),"Demo"]})}),f&&a("div",{className:"info-container itd-gamebox-info",children:[e("span",{className:"name",ref:J,children:y??f}),k&&e("span",{className:"description",children:k})]}),f&&e("span",{className:"itd-gamebox-play","aria-hidden":!0,children:e(l,{})}),E&&null!=R&&!D&&a("div",{className:"inn-image-box-players itd-gamebox-players",children:[e(r,{"aria-hidden":!0}),e("span",{children:R})]})]}),P&&e("span",{className:"itd-gamebox-spinner",children:e(c,{})}),D&&a("div",{className:"inn-image-box-game-info itd-gamebox-live",children:[D.dealerName&&e("div",{className:"inn-image-box-game-name",children:e("span",{children:f})}),D.dealerName&&void 0!==D.isOpen&&a("div",{className:"inn-image-box-online-status","data-open":String(D.isOpen),children:[e("i",{className:"online-status-icon "+(D.isOpen?"online":"offline"),"aria-hidden":!0}),e("span",{children:D.isOpen?A:H})]}),D.seats&&a("div",{className:"inn-image-box-number-of-players",children:[e(r,{"aria-hidden":!0}),e("span",{children:D.seats.total-D.seats.available+"/"+D.seats.total})]}),!D.seats&&void 0!==D.players&&a("div",{className:"inn-image-box-number-of-players",children:[e(r,{"aria-hidden":!0}),e("span",{children:D.players})]}),D.dealerName&&e("div",{className:"inn-image-box-dealer-name",children:e("span",{children:D.dealerName})}),W&&e("div",{className:"inn-image-box-table-limit","data-center":String(!D.dealerName),children:e("span",{children:ee(W.min)+" - "+ee(W.max)})}),D.lastWon&&e("div",{className:"inn-image-box-last-won-numbers",children:D.lastWon.map((a,i)=>e("span",{className:a.color+(0===i&&U?" flash-animation":""),onAnimationEnd:0===i?e=>{"itd-gamebox-flash"===e.animationName&&X(!1)}:void 0,children:a.result},a.result+"-"+i))}),D.seats&&e("div",{className:"inn-image-box-available-seats",children:Array.from({length:D.seats.total}).map((a,i)=>e("span",{className:D.seats?.taken?.includes(i+1)?"unavailable":"available",children:e(r,{"aria-hidden":!0})},i))})]})]},p)};export{p as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as l,Fragment as a}from"react/jsx-runtime";import{Children as n}from"react";import t from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import{ChevronRight as i,ChevronLeft as r}from"lucide-react";import{GetClassNameByPlatform as s}from"../../helpers/classname/GetClassNameByPlatform.js";import{useEmblaState as o}from"../embla/useEmblaState.js";const c={align:"start"},d=({id:d,title:u,allText:m="All",onAll:b,allHref:h,allTarget:p="_self",hideAllButton:N=!1,hideArrowButtons:g=!1,prevLabel:v="Previous",nextLabel:f="Next",slideSize:x,slideSpacing:y,bleed:j,children:A,className:C})=>{const[P,k]=t(c),{canPrev:w,canNext:B}=o(k),S=s,z={...x?{"--slide-size":x}:null,...y?{"--slide-spacing":y}:null,...j?{"--itd-carousel-bleed":j}:null};return e("section",{id:d??S("inn-carousel-component"),className:"itd-game-carousel"+(C?" "+C:""),style:z,"data-bleed":j?"":void 0,children:l("div",{className:S("inn-carousel"),children:[l("div",{className:S("inn-carousel-controls")+" itd-game-carousel-controls",children:[e("div",{className:S("inn-carousel-title")+" itd-game-carousel-title",children:u}),(!N||!g)&&l("div",{className:"itd-game-carousel-buttons",children:[!N&&(h?l("a",{href:h,target:p,className:S("inn-carousel-button")+" "+S("inn-carousel-button-all")+" itd-game-carousel-button",children:[e("span",{children:m}),e(i,{"aria-hidden":!0})]}):l("button",{type:"button",className:S("inn-carousel-button")+" "+S("inn-carousel-button-all")+" itd-game-carousel-button",onClick:b,children:[e("span",{children:m}),e(i,{"aria-hidden":!0})]})),!g&&l(a,{children:[e("button",{type:"button","aria-label":v,className:S("inn-carousel-button")+" "+S("inn-carousel-button-prev")+" itd-game-carousel-button",disabled:!w,onClick:()=>k?.scrollPrev(),children:e(r,{"aria-hidden":!0})}),e("button",{type:"button","aria-label":f,className:S("inn-carousel-button")+" "+S("inn-carousel-button-next")+" itd-game-carousel-button",disabled:!B,onClick:()=>k?.scrollNext(),children:e(i,{"aria-hidden":!0})})]})]})]}),e("div",{ref:P,className:S("inn-carousel-viewport")+" itd-game-carousel-viewport",children:e("div",{className:S("inn-carousel-container")+" itd-game-carousel-container",children:n.map(A,l=>null==l?null:e("div",{className:S("inn-carousel-slide")+" itd-game-carousel-slide",children:e("div",{className:S("inn-carousel-slide-number"),children:l})}))})})]})})};export{d as default};
1
+ import{jsx as e,jsxs as l,Fragment as a}from"react/jsx-runtime";import{Children as n}from"react";import t from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import{ChevronRight as i,ChevronLeft as r}from"lucide-react";import{GetClassNameByPlatform as s}from"../../helpers/classname/GetClassNameByPlatform.js";import o from"../embla/useEmblaState.js";const c={align:"start"},d=({id:d,title:u,allText:m="All",onAll:b,allHref:h,allTarget:p="_self",hideAllButton:N=!1,hideArrowButtons:g=!1,prevLabel:v="Previous",nextLabel:f="Next",slideSize:x,slideSpacing:y,bleed:j,children:A,className:C})=>{const[P,k]=t(c),{canPrev:w,canNext:B}=o(k),S=s,z={...x?{"--slide-size":x}:null,...y?{"--slide-spacing":y}:null,...j?{"--itd-carousel-bleed":j}:null};return e("section",{id:d??S("inn-carousel-component"),className:"itd-game-carousel"+(C?" "+C:""),style:z,"data-bleed":j?"":void 0,children:l("div",{className:S("inn-carousel"),children:[l("div",{className:S("inn-carousel-controls")+" itd-game-carousel-controls",children:[e("div",{className:S("inn-carousel-title")+" itd-game-carousel-title",children:u}),(!N||!g)&&l("div",{className:"itd-game-carousel-buttons",children:[!N&&(h?l("a",{href:h,target:p,className:S("inn-carousel-button")+" "+S("inn-carousel-button-all")+" itd-game-carousel-button",children:[e("span",{children:m}),e(i,{"aria-hidden":!0})]}):l("button",{type:"button",className:S("inn-carousel-button")+" "+S("inn-carousel-button-all")+" itd-game-carousel-button",onClick:b,children:[e("span",{children:m}),e(i,{"aria-hidden":!0})]})),!g&&l(a,{children:[e("button",{type:"button","aria-label":v,className:S("inn-carousel-button")+" "+S("inn-carousel-button-prev")+" itd-game-carousel-button",disabled:!w,onClick:()=>k?.scrollPrev(),children:e(r,{"aria-hidden":!0})}),e("button",{type:"button","aria-label":f,className:S("inn-carousel-button")+" "+S("inn-carousel-button-next")+" itd-game-carousel-button",disabled:!B,onClick:()=>k?.scrollNext(),children:e(i,{"aria-hidden":!0})})]})]})]}),e("div",{ref:P,className:S("inn-carousel-viewport")+" itd-game-carousel-viewport",children:e("div",{className:S("inn-carousel-container")+" itd-game-carousel-container",children:n.map(A,l=>null==l?null:e("div",{className:S("inn-carousel-slide")+" itd-game-carousel-slide",children:e("div",{className:S("inn-carousel-slide-number"),children:l})}))})})]})})};export{d as default};
@@ -1 +1 @@
1
- import{useContext as o,useRef as t,useState as r,useEffect as e}from"react";import l from"../../context/ITDContext.js";import n from"../../helpers/image/SVGUrlToPNGDataUrl.js";const c=(c,g,a)=>{const i=o(l)?.theme??"dark",u=o=>"light"===i?o.logoLight??o.logo:o.logo,s=t(a);s.current=a;const[h,m]=r({});e(()=>{if(!g)return;let o=!0;return c.forEach(t=>{const r="light"===i?t.logoLight??t.logo:t.logo;null!=r&&n(r,s.current).then(t=>{o&&m(o=>o[r]?o:{...o,[r]:t})}).catch(()=>{o&&m(o=>o[r]?o:{...o,[r]:r})})}),()=>{o=!1}},[c,g,i]);const f=!g||c.every(o=>null==u(o)||null!=h[u(o)]);return{activeLogo:u,logoSrc:o=>{const t=u(o);return g?null!=t?h[t]:void 0:t},ready:f}};export{c as default,c as useProviderLogos};
1
+ import{useContext as o,useRef as t,useState as r,useEffect as e}from"react";import l from"../../context/ITDContext.js";import n from"../../helpers/image/SVGUrlToPNGDataUrl.js";const c=(c,g,i)=>{const u=o(l)?.theme??"dark",a=o=>"light"===u?o.logoLight??o.logo:o.logo,h=t(i);h.current=i;const[s,m]=r({});e(()=>{if(!g)return;let o=!0;return c.forEach(t=>{const r="light"===u?t.logoLight??t.logo:t.logo;null!=r&&n(r,h.current).then(t=>{o&&m(o=>o[r]?o:{...o,[r]:t})}).catch(()=>{o&&m(o=>o[r]?o:{...o,[r]:r})})}),()=>{o=!1}},[c,g,u]);const f=!g||c.every(o=>null==a(o)||null!=s[a(o)]);return{activeLogo:a,logoSrc:o=>{const t=a(o);return g?null!=t?s[t]:void 0:t},ready:f}};export{c as useProviderLogos};
@@ -1 +1 @@
1
- import{useState as e,useRef as o,useEffect as r}from"react";import{useFocusTrap as t}from"../../hooks/useFocusTrap.js";import s from"../../hooks/useOnESCKeyDown.js";const u=(u,c,i)=>{const[n,a]=e(u),m=o(void 0);return r(()=>u?(clearTimeout(m.current),void a(!0)):(m.current=setTimeout(()=>a(!1),300),()=>clearTimeout(m.current)),[u]),t({isActive:u,containerRef:i,trapFocusOutside:!0,restoreFocus:!0}),s(()=>c?.(),i,{enabled:u}),n};export{u as default,u as useDrawerChrome};
1
+ import{useState as o,useRef as e,useEffect as r}from"react";import{useFocusTrap as t}from"../../hooks/useFocusTrap.js";import s from"../../hooks/useOnESCKeyDown.js";const c=(c,u,i)=>{const[n,m]=o(c),a=e(void 0);return r(()=>c?(clearTimeout(a.current),void m(!0)):(a.current=setTimeout(()=>m(!1),300),()=>clearTimeout(a.current)),[c]),t({isActive:c,containerRef:i,trapFocusOutside:!0,restoreFocus:!0}),s(()=>u?.(),i,{enabled:c}),n};export{c as useDrawerChrome};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useMemo as n,useState as i,useRef as o,useEffect as s}from"react";import l from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import r from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{Gamepad2 as c,ChevronUp as m,ChevronDown as p,Trophy as d,Medal as u,Calendar as k,User as j}from"lucide-react";import h from"../../button/index.js";import b from"../../image/index.js";import N from"../../skeleton/index.js";import{useModal as g}from"../../modal/index.js";import{useModalContent as w}from"../../modal/useModalContent.js";import f from"../game-box/index.js";import{GetClassNameByPlatform as x,PlatformTypes as v}from"../../helpers/classname/GetClassNameByPlatform.js";import{GetPlatform as y}from"../../helpers/platform/index.js";import{useEmblaState as C}from"../embla/useEmblaState.js";import W,{TierItem as O}from"./TierCarousel.js";const B=a=>new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2,maximumFractionDigits:2}).format(a),A=({amount:t,format:e,className:n})=>{const l=(a=>{const[t,e]=i(0),n=o(0);return s(()=>{const t=performance.now(),i=o=>{const s=Math.min((o-t)/750,1);e(a*s),s<1&&(n.current=requestAnimationFrame(i))};return n.current=requestAnimationFrame(i),()=>cancelAnimationFrame(n.current)},[a]),t})(t);return a("span",{className:n,children:e(l)})},z=({stats:e,format:n,labels:i})=>{const o=(e,i,o)=>t("div",{className:"itd-jackpot-win-box",children:[t("span",{className:"itd-jackpot-win-box-title",children:[e,i]}),a(A,{amount:o?.amount??0,format:n,className:"itd-jackpot-win-box-amount"}),t("span",{className:"itd-jackpot-win-box-meta",children:[t("span",{children:[a(k,{"aria-hidden":!0}),o?.date??"--/--/---- 00:00"]}),t("span",{children:[a(j,{"aria-hidden":!0}),o?.username??"--"]})]})]});return t("div",{className:"itd-jackpot-winners-modal inn-jackpot-winners-modal",children:[o(a(u,{"aria-hidden":!0}),i?.maxWin??"Max Win",e?.maxWin),a("hr",{className:"itd-jackpot-winners-separator"}),o(a(d,{"aria-hidden":!0}),i?.lastWin??"Last Win",e?.lastWin),t("div",{className:"itd-jackpot-total-wins",children:[(i?.totalWins??"Total Wins")+":"," ",a("b",{children:e?.totalWins??0})]})]})},F=({games:t,onOpen:e})=>{const{hideCurrentModal:n}=w();return a("div",{className:"itd-jackpot-games-modal",children:t.map(t=>a(f,{slug:t.slug,image:t.image,name:t.name,background:!1,outline:!1,ratio:"440/310",onPlay:a=>{n?.(),e(a)}},t.id))})},M=({id:i,jackpots:o,loading:s,wordmark:u,texture:k,showWinners:j=!0,showGames:w=!0,autoplay:f=4e3,formatAmount:M=B,onGameOpen:P,labels:T,className:J})=>{const L=x,{showModal:H}=g(),G=n(()=>({axis:"y"}),[]),I=n(()=>!1===f?[]:[r({delay:f})],[f]),[S,q]=l(G,I),{selected:D,canPrev:E,canNext:K}=C(q),R=o??[],_=R[D]??R[0],U=a=>{q&&(q.plugins().autoplay?.stop(),"prev"===a?q.scrollPrev():q.scrollNext())},Y=()=>{const t=_?.games??[];H({title:T?.gamesTitle??"Jackpot Oyunları",className:"jackpot-games-modal",width:y()===v.MOBILE?"100%":"61.875rem",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:a(F,{games:t,onOpen:a=>P?.(a)})})},$=e=>j||w?t("span",{className:"itd-jackpot-tier-buttons "+L("inn-multiple-jackpots-carousel-multiple-tier-buttons"),children:[j&&a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs "+L("inn-multiple-jackpots-carousel-button")+" "+L("inn-multiple-jackpots-carousel-button--winners"),"aria-label":T?.winners??"Kazananlar",onClick:()=>(t=>{H({className:"itd-jackpot-winners-host jackpot-winners-modal",width:"25rem",contentPadding:"0",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:a(z,{stats:t,format:M,labels:T})})})(e),children:a(d,{})}),w&&a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs itd-jackpot-tier-games "+L("inn-multiple-jackpots-carousel-button")+" "+L("inn-multiple-jackpots-carousel-button--games"),"aria-label":T?.games??"Jackpot Oyunları",onClick:Y,children:a(c,{})})]}):null,Q=a=>a.name.toUpperCase()+(T?.tierSuffix??" JACKPOT"),V=k?{"--itd-jackpot-texture":`url("${k}")`}:void 0;return a("div",{id:i??L("inn-multiple-jackpots-component"),className:("itd-jackpots "+(J??"")).trim(),style:V,children:s?t("div",{className:"itd-jackpot-loading",children:[a(N,{height:"5rem",width:"16.3125rem",count:1}),a(N,{height:"5rem",width:"16.3125rem",count:1})]}):0===R.length?a("div",{className:"itd-jackpot-empty "+L("inn-multiple-jackpots-not-found"),children:a("span",{children:T?.empty??"Jackpot bulunamadı!"})}):t("section",{className:"itd-jackpot-carousel "+L("inn-multiple-jackpots-carousel"),children:[a("div",{className:"itd-jackpot-viewport "+L("inn-multiple-jackpots-carousel-viewport"),ref:S,children:a("div",{className:"itd-jackpot-container "+L("inn-multiple-jackpots-carousel-container"),children:R.map(e=>{const n=1===e.tiers.length;return t("div",{className:"itd-jackpot-slide "+L("inn-multiple-jackpots-carousel-slide"),children:[t("span",{className:"itd-jackpot-brand "+L("inn-multiple-jackpots-carousel-title-and-provider"),children:[null!=e.providerLogo&&a(b,{className:L("inn-multiple-jackpots-carousel-provider-icon"),src:e.providerLogo,alt:e.name,brokenWidth:66,brokenHeight:33}),null!=u&&a(b,{className:L("inn-multiple-jackpots-carousel-jackpot-text"),src:u,alt:"jackpot",brokenWidth:48,brokenHeight:12})]}),a("span",{className:"itd-jackpot-separator "+L("inn-multiple-jackpots-carousel-separator")}),a("span",{className:"itd-jackpot-art",children:null!=e.gameArt&&a(b,{className:L("inn-multiple-jackpots-carousel-jackpot-icon"),src:e.gameArt,alt:e.name,brokenWidth:55,brokenHeight:55})}),a("span",{className:"itd-jackpot-spacer "+L("inn-multiple-jackpots-carousel-spacer")}),n?t("span",{className:"itd-jackpot-single "+L("inn-multiple-jackpots-carousel-single-tier"),children:[a("span",{className:"itd-jackpot-tier-name "+L("inn-multiple-jackpots-carousel-single-tier-name"),children:Q(e.tiers[0])}),a(A,{amount:e.tiers[0].amount,format:M,className:"itd-jackpot-single-amount "+L("inn-multiple-jackpots-carousel-single-tier-amount")}),$(e.tiers[0].stats)]}):a(W,{children:e.tiers.map(e=>a(O,{itemId:e.id,children:t("span",{className:"itd-jackpot-tier "+L("inn-multiple-jackpots-carousel-multiple-tier"),children:[null!=e.symbol&&a(b,{className:"itd-jackpot-tier-symbol "+L("inn-multiple-jackpots-carousel-multiple-tier-content-tier-image"),src:e.symbol,alt:e.name,brokenWidth:36,brokenHeight:36}),t("span",{className:"itd-jackpot-tier-text "+L("inn-multiple-jackpots-carousel-multiple-tier-content"),children:[a("span",{className:"itd-jackpot-tier-name "+L("inn-multiple-jackpots-carousel-multiple-tier-content-name"),children:Q(e)}),a(A,{amount:e.amount,format:M,className:"itd-jackpot-tier-amount "+L("inn-multiple-jackpots-carousel-multiple-tier-content-amount")+" "+e.name.toLowerCase()})]}),$(e.stats)]})},e.id))}),a("span",{className:"itd-jackpot-spacer "+L("inn-multiple-jackpots-carousel-spacer")})]},e.id)})})}),t("span",{className:"itd-jackpot-controls "+L("inn-multiple-jackpots-carousel-controls"),children:[w&&t(e,{children:[a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-controls-games-button"),"aria-label":T?.games??"Jackpot Oyunları",onClick:Y,children:a(c,{})}),a("span",{className:"itd-jackpot-separator itd-jackpot-separator--controls"})]}),t("span",{className:"itd-jackpot-arrows "+L("inn-multiple-jackpots-carousel-buttons"),children:[a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-button--prev"),"aria-label":T?.prev??"Önceki jackpot",disabled:!E,onClick:()=>U("prev"),children:a(m,{})}),a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-button--next"),"aria-label":T?.next??"Sonraki jackpot",disabled:!K,onClick:()=>U("next"),children:a(p,{})})]})]})]})})};export{M as default};
1
+ import{jsx as a,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useMemo as n,useState as i,useRef as o,useEffect as s}from"react";import l from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import r from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{Gamepad2 as c,ChevronUp as m,ChevronDown as p,Trophy as d,Medal as u,Calendar as k,User as j}from"lucide-react";import h from"../../button/index.js";import b from"../../image/index.js";import N from"../../skeleton/index.js";import{useModal as g}from"../../modal/index.js";import{useModalContent as w}from"../../modal/useModalContent.js";import f from"../game-box/index.js";import{GetClassNameByPlatform as x,PlatformTypes as v}from"../../helpers/classname/GetClassNameByPlatform.js";import{GetPlatform as y}from"../../helpers/platform/index.js";import C from"../embla/useEmblaState.js";import W,{TierItem as O}from"./TierCarousel.js";const B=a=>new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2,maximumFractionDigits:2}).format(a),A=({amount:t,format:e,className:n})=>{const l=(a=>{const[t,e]=i(0),n=o(0);return s(()=>{const t=performance.now(),i=o=>{const s=Math.min((o-t)/750,1);e(a*s),s<1&&(n.current=requestAnimationFrame(i))};return n.current=requestAnimationFrame(i),()=>cancelAnimationFrame(n.current)},[a]),t})(t);return a("span",{className:n,children:e(l)})},z=({stats:e,format:n,labels:i})=>{const o=(e,i,o)=>t("div",{className:"itd-jackpot-win-box",children:[t("span",{className:"itd-jackpot-win-box-title",children:[e,i]}),a(A,{amount:o?.amount??0,format:n,className:"itd-jackpot-win-box-amount"}),t("span",{className:"itd-jackpot-win-box-meta",children:[t("span",{children:[a(k,{"aria-hidden":!0}),o?.date??"--/--/---- 00:00"]}),t("span",{children:[a(j,{"aria-hidden":!0}),o?.username??"--"]})]})]});return t("div",{className:"itd-jackpot-winners-modal inn-jackpot-winners-modal",children:[o(a(u,{"aria-hidden":!0}),i?.maxWin??"Max Win",e?.maxWin),a("hr",{className:"itd-jackpot-winners-separator"}),o(a(d,{"aria-hidden":!0}),i?.lastWin??"Last Win",e?.lastWin),t("div",{className:"itd-jackpot-total-wins",children:[(i?.totalWins??"Total Wins")+":"," ",a("b",{children:e?.totalWins??0})]})]})},F=({games:t,onOpen:e})=>{const{hideCurrentModal:n}=w();return a("div",{className:"itd-jackpot-games-modal",children:t.map(t=>a(f,{slug:t.slug,image:t.image,name:t.name,background:!1,outline:!1,ratio:"440/310",onPlay:a=>{n?.(),e(a)}},t.id))})},M=({id:i,jackpots:o,loading:s,wordmark:u,texture:k,showWinners:j=!0,showGames:w=!0,autoplay:f=4e3,formatAmount:M=B,onGameOpen:P,labels:T,className:J})=>{const L=x,{showModal:H}=g(),G=n(()=>({axis:"y"}),[]),I=n(()=>!1===f?[]:[r({delay:f})],[f]),[S,q]=l(G,I),{selected:D,canPrev:E,canNext:K}=C(q),R=o??[],_=R[D]??R[0],U=a=>{q&&(q.plugins().autoplay?.stop(),"prev"===a?q.scrollPrev():q.scrollNext())},Y=()=>{const t=_?.games??[];H({title:T?.gamesTitle??"Jackpot Oyunları",className:"jackpot-games-modal",width:y()===v.MOBILE?"100%":"61.875rem",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:a(F,{games:t,onOpen:a=>P?.(a)})})},$=e=>j||w?t("span",{className:"itd-jackpot-tier-buttons "+L("inn-multiple-jackpots-carousel-multiple-tier-buttons"),children:[j&&a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs "+L("inn-multiple-jackpots-carousel-button")+" "+L("inn-multiple-jackpots-carousel-button--winners"),"aria-label":T?.winners??"Kazananlar",onClick:()=>(t=>{H({className:"itd-jackpot-winners-host jackpot-winners-modal",width:"25rem",contentPadding:"0",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:a(z,{stats:t,format:M,labels:T})})})(e),children:a(d,{})}),w&&a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs itd-jackpot-tier-games "+L("inn-multiple-jackpots-carousel-button")+" "+L("inn-multiple-jackpots-carousel-button--games"),"aria-label":T?.games??"Jackpot Oyunları",onClick:Y,children:a(c,{})})]}):null,Q=a=>a.name.toUpperCase()+(T?.tierSuffix??" JACKPOT"),V=k?{"--itd-jackpot-texture":`url("${k}")`}:void 0;return a("div",{id:i??L("inn-multiple-jackpots-component"),className:("itd-jackpots "+(J??"")).trim(),style:V,children:s?t("div",{className:"itd-jackpot-loading",children:[a(N,{height:"5rem",width:"16.3125rem",count:1}),a(N,{height:"5rem",width:"16.3125rem",count:1})]}):0===R.length?a("div",{className:"itd-jackpot-empty "+L("inn-multiple-jackpots-not-found"),children:a("span",{children:T?.empty??"Jackpot bulunamadı!"})}):t("section",{className:"itd-jackpot-carousel "+L("inn-multiple-jackpots-carousel"),children:[a("div",{className:"itd-jackpot-viewport "+L("inn-multiple-jackpots-carousel-viewport"),ref:S,children:a("div",{className:"itd-jackpot-container "+L("inn-multiple-jackpots-carousel-container"),children:R.map(e=>{const n=1===e.tiers.length;return t("div",{className:"itd-jackpot-slide "+L("inn-multiple-jackpots-carousel-slide"),children:[t("span",{className:"itd-jackpot-brand "+L("inn-multiple-jackpots-carousel-title-and-provider"),children:[null!=e.providerLogo&&a(b,{className:L("inn-multiple-jackpots-carousel-provider-icon"),src:e.providerLogo,alt:e.name,brokenWidth:66,brokenHeight:33}),null!=u&&a(b,{className:L("inn-multiple-jackpots-carousel-jackpot-text"),src:u,alt:"jackpot",brokenWidth:48,brokenHeight:12})]}),a("span",{className:"itd-jackpot-separator "+L("inn-multiple-jackpots-carousel-separator")}),a("span",{className:"itd-jackpot-art",children:null!=e.gameArt&&a(b,{className:L("inn-multiple-jackpots-carousel-jackpot-icon"),src:e.gameArt,alt:e.name,brokenWidth:55,brokenHeight:55})}),a("span",{className:"itd-jackpot-spacer "+L("inn-multiple-jackpots-carousel-spacer")}),n?t("span",{className:"itd-jackpot-single "+L("inn-multiple-jackpots-carousel-single-tier"),children:[a("span",{className:"itd-jackpot-tier-name "+L("inn-multiple-jackpots-carousel-single-tier-name"),children:Q(e.tiers[0])}),a(A,{amount:e.tiers[0].amount,format:M,className:"itd-jackpot-single-amount "+L("inn-multiple-jackpots-carousel-single-tier-amount")}),$(e.tiers[0].stats)]}):a(W,{children:e.tiers.map(e=>a(O,{itemId:e.id,children:t("span",{className:"itd-jackpot-tier "+L("inn-multiple-jackpots-carousel-multiple-tier"),children:[null!=e.symbol&&a(b,{className:"itd-jackpot-tier-symbol "+L("inn-multiple-jackpots-carousel-multiple-tier-content-tier-image"),src:e.symbol,alt:e.name,brokenWidth:36,brokenHeight:36}),t("span",{className:"itd-jackpot-tier-text "+L("inn-multiple-jackpots-carousel-multiple-tier-content"),children:[a("span",{className:"itd-jackpot-tier-name "+L("inn-multiple-jackpots-carousel-multiple-tier-content-name"),children:Q(e)}),a(A,{amount:e.amount,format:M,className:"itd-jackpot-tier-amount "+L("inn-multiple-jackpots-carousel-multiple-tier-content-amount")+" "+e.name.toLowerCase()})]}),$(e.stats)]})},e.id))}),a("span",{className:"itd-jackpot-spacer "+L("inn-multiple-jackpots-carousel-spacer")})]},e.id)})})}),t("span",{className:"itd-jackpot-controls "+L("inn-multiple-jackpots-carousel-controls"),children:[w&&t(e,{children:[a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-controls-games-button"),"aria-label":T?.games??"Jackpot Oyunları",onClick:Y,children:a(c,{})}),a("span",{className:"itd-jackpot-separator itd-jackpot-separator--controls"})]}),t("span",{className:"itd-jackpot-arrows "+L("inn-multiple-jackpots-carousel-buttons"),children:[a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-button--prev"),"aria-label":T?.prev??"Önceki jackpot",disabled:!E,onClick:()=>U("prev"),children:a(m,{})}),a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-button--next"),"aria-label":T?.next??"Sonraki jackpot",disabled:!K,onClick:()=>U("next"),children:a(p,{})})]})]})]})})};export{M as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as l}from"react";import s from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import d from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{GetClassNameByPlatform as r}from"../../helpers/classname/GetClassNameByPlatform.js";import{useEmblaState as a}from"../embla/useEmblaState.js";const t=({id:t,slides:n,autoplay:o=4e3,loop:c=!0,dots:m=!0,slideSize:p,slideSpacing:u,dotLabel:b=e=>"Slide "+(e+1),hideBackground:h=!1,className:g})=>{const N=l(()=>({loop:c}),[c]),f=l(()=>!1===o?[]:[d({delay:o})],[o]),[v,y]=s(N,f),{selected:S}=a(y),j=r,k={...p?{"--itd-slider-slide-size":p}:null,...u?{"--itd-slider-spacing":u}:null};return e("section",{id:t??j("inn-slider-component"),className:"itd-slider-block"+(g?" "+g:""),style:k,"data-background":String(!h),"data-has-slides":String(n.length>0),children:i("div",{className:j("inn-slider")+" itd-slider",children:[e("div",{ref:v,className:j("inn-slider-viewport")+" itd-slider-viewport",children:e("div",{className:j("inn-slider-container")+" itd-slider-container",children:n.map((i,l)=>e("div",{className:j("inn-slider-slide")+" itd-slider-slide","data-background":String(!h),children:i},l))})}),m&&n.length>1&&e("div",{className:j("inn-slider-controls")+" itd-slider-controls",children:e("div",{className:j("inn-slider-dots")+" itd-slider-dots",children:n.map((i,l)=>e("button",{type:"button","aria-label":b(l),"aria-current":l===S||void 0,className:j("inn-slider-dot")+" itd-slider-dot"+(l===S?" "+j("inn-slider-dot")+"-selected":""),onClick:()=>y?.scrollTo(l)},l))})})]})})};export{t as default};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as l}from"react";import s from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import d from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{GetClassNameByPlatform as r}from"../../helpers/classname/GetClassNameByPlatform.js";import a from"../embla/useEmblaState.js";const t=({id:t,slides:n,autoplay:o=4e3,loop:c=!0,dots:m=!0,slideSize:p,slideSpacing:u,dotLabel:b=e=>"Slide "+(e+1),hideBackground:h=!1,className:g})=>{const N=l(()=>({loop:c}),[c]),f=l(()=>!1===o?[]:[d({delay:o})],[o]),[v,y]=s(N,f),{selected:S}=a(y),j=r,k={...p?{"--itd-slider-slide-size":p}:null,...u?{"--itd-slider-spacing":u}:null};return e("section",{id:t??j("inn-slider-component"),className:"itd-slider-block"+(g?" "+g:""),style:k,"data-background":String(!h),"data-has-slides":String(n.length>0),children:i("div",{className:j("inn-slider")+" itd-slider",children:[e("div",{ref:v,className:j("inn-slider-viewport")+" itd-slider-viewport",children:e("div",{className:j("inn-slider-container")+" itd-slider-container",children:n.map((i,l)=>e("div",{className:j("inn-slider-slide")+" itd-slider-slide","data-background":String(!h),children:i},l))})}),m&&n.length>1&&e("div",{className:j("inn-slider-controls")+" itd-slider-controls",children:e("div",{className:j("inn-slider-dots")+" itd-slider-dots",children:n.map((i,l)=>e("button",{type:"button","aria-label":b(l),"aria-current":l===S||void 0,className:j("inn-slider-dot")+" itd-slider-dot"+(l===S?" "+j("inn-slider-dot")+"-selected":""),onClick:()=>y?.scrollTo(l)},l))})})]})})};export{t as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as a,Fragment as t}from"react/jsx-runtime";import{useState as i}from"react";import{Info as l,Gift as s,Trash2 as n}from"lucide-react";import r from"../../button/index.js";import d from"../../progress/index.js";import c from"../../select/index.js";import m from"../../alert/index.js";import{Tooltip as o}from"../../tooltip/Tooltip.js";import{TooltipTrigger as h}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as u}from"../../tooltip/TooltipContent.js";import{HubPayFilter as p}from"./cashier.js";import{HubTable as b,HubStatusBadge as _,HubCopyBtn as v,HubHistName as k}from"./table.js";import{SelectItem as g}from"../../select/SelectItem.js";import{AlertDescription as y}from"../../alert/Description.js";const N=({kind:t,name:i,dateLabel:l,date:s,action:n,fields:r,children:d})=>e("section",{className:"hub__status-card",children:[e("div",{className:"hub__status-head",children:[e("div",{className:"hub__status-title",children:[a("span",{className:"hub__status-kind",children:t}),a("span",{className:"hub__status-name",children:i})]}),e("div",{className:"hub__status-side",children:[e("div",{className:"hub__status-date",children:[a("span",{children:l}),a("span",{className:"hub__status-dateval",children:s})]}),n]})]}),a("div",{className:"hub__status-grid",children:r.map(([t,i],l)=>e("div",{children:[a("span",{className:"hub__status-label",children:t}),a("span",{className:"hub__status-value",children:i})]},l))}),d]}),f=({data:n,cats:m,types:v,statuses:k,wagering:y,applies:N,onRequest:f,onCancel:w,marker:x={desktop:"inn-bonus-request-table",list:"inn-mobile-bonus-request-list",methods:"inn-mobile-bonus-request-list-methods",item:"inn-mobile-bonus-request-list-method-item"},nameTitle:T="İsim",catTitle:j="Kategori",typeTitle:I="Tip",wageringTitle:z="Çevrimli",statusTitle:L="Durum",percentTitle:C="Hak Ediş Yüzdesi",infoLabel:q="Bonus bilgisi",applyDatePrefix:B="Başvuru Tarihi: ",requestLabel:D="Talep Et",reRequestLabel:E="Tekrar Talep Et",cancelLabel:S="Talebi İptal Et",unavailableLabel:K="Talep Edilemez",openStatus:R="Açık",unavailableStatus:A="Talep Edilemez"})=>{const[H,P]=i(m[0]?.value??"all"),U=[{key:"name",dataIndex:"name",title:T,maxWidth:220,render:(t,i)=>e("span",{className:"hub__pay-name hub__hist-nm",children:[e("span",{className:"hub__bonus-name",children:[a("span",{className:"hub__bonus-title",children:i.name}),e(o,{children:[a(h,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":q,children:a(l,{size:14})})}),a(u,{placement:"top",children:i.desc})]})]}),i.applyDate&&a("span",{className:"hub__pay-desc",children:B+i.applyDate})]})},{key:"cat",dataIndex:"cat",title:j,width:90},{key:"type",dataIndex:"type",title:I,width:110},{key:"wagering",dataIndex:"wagering",title:z,width:90},{key:"status",dataIndex:"status",title:L,width:150,render:e=>a(_,{s:String(e)})},{key:"percent",dataIndex:"percent",title:C,width:170,render:e=>a("span",{className:"hub__bonus-progress",children:a(d,{percent:Number(e)})})},{key:"actions",dataIndex:"key",title:"",width:180,render:(t,i)=>a("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.status===R?a(r,{variant:"statable",state:"reject",size:"medium",onClick:()=>w?.(i),children:S}):i.status===A?a(r,{variant:"filled",size:"medium",disabled:!0,children:K}):e(r,{variant:"default",size:"medium",onClick:()=>f?.(i),children:[a(s,{size:14}),i.applyDate?E:D]})})}];return e(t,{children:[a("div",{className:"hub__hist-cats--wide",children:a(p,{options:m,value:H,onChange:P,idPrefix:"brq"})}),a("div",{className:"hub__hist-filters hub__hist-filters--2",children:[v,k,y,N].map((e,t)=>a(c,{size:"x-large",defaultValue:e[0],children:e.map(e=>a(g,{value:e,children:e},e))},t))}),a(b,{columns:U,data:n,cellHeight:"84px",marker:x})]})},w=({data:i,intro:l,onAccept:d,onReject:c,marker:o={desktop:"inn-bonus-activation-table",list:"inn-mobile-bonus-activation-list",methods:"inn-mobile-bonus-activation-list-items",item:"inn-mobile-bonus-activation-list-method-item"},idTitle:h="Id",nameTitle:u="Bonus İsmi",catTitle:p="Kategori",amountTitle:_="Miktar",acceptLabel:g="Kabul Et",rejectLabel:N="Reddet"})=>{const f=[{key:"id",dataIndex:"key",title:h,width:50,render:(e,t)=>a(v,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:u,maxWidth:300,render:(e,t)=>a(k,{name:t.name})},{key:"cat",dataIndex:"cat",title:p,width:150},{key:"amount",dataIndex:"amount",title:_,width:200,render:e=>a("span",{className:"hub__hist-amount",children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:240,render:(t,i)=>e("span",{className:"hub__pay-actions",children:[e(r,{variant:"default",size:"medium",onClick:()=>d?.(i),children:[a(s,{size:14}),g]}),e(r,{variant:"statable",state:"reject",size:"medium",onClick:()=>c?.(i),children:[a(n,{size:14}),N]})]})}];return e(t,{children:[l&&a(m,{type:"info",variant:"filled",children:a(y,{children:l})}),a(b,{columns:f,data:i,cellHeight:"74px",marker:o})]})},x=({bonus:i,intro:l,onCancel:s,kindLabel:n="AKTİF BONUS",applyDateLabel:c="Başvuru Tarihi",cancelLabel:o="Bonusu İptal Et",wagerTitle:h="Bonus Çevrim Bilgisi",validLabel:u="Geçerlilik"})=>e(t,{children:[l&&a(m,{type:"info",variant:"filled",children:a(y,{children:l})}),a(N,{kind:n,name:i.name,dateLabel:c,date:i.applyDate,action:a(r,{variant:"statable",state:"reject",size:"medium",onClick:s,children:o}),fields:i.fields,children:e("div",{className:"hub__wager",children:[e("div",{className:"hub__wager-head",children:[a("span",{className:"hub__wager-title",children:h}),e("div",{className:"hub__status-date hub__wager-until",children:[a("span",{children:u}),a("span",{className:"hub__status-dateval",children:i.validUntil})]})]}),i.wagerings.map((t,i)=>e("div",{className:"hub__wager-row",children:[a("span",{className:"hub__wager-label",children:t.label}),e("div",{className:"hub__wager-bar",children:[a(d,{percent:t.percent,showInfo:!1}),a("span",{className:"hub__wager-amt",children:t.done+" / "+t.total})]})]},i))]})})]});export{x as HubActiveBonus,w as HubBonusActivation,f as HubBonusRequest,N as HubStatusCard};
1
+ import{jsxs as e,Fragment as a,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import{Gift as l,Trash2 as s,Info as n}from"lucide-react";import r from"../../button/index.js";import d from"../../progress/index.js";import c from"../../select/index.js";import m from"../../alert/index.js";import{Tooltip as o}from"../../tooltip/Tooltip.js";import{TooltipTrigger as h}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as u}from"../../tooltip/TooltipContent.js";import{HubPayFilter as p}from"./cashier.js";import{HubTable as b,HubCopyBtn as _,HubHistName as v,HubStatusBadge as k}from"./table.js";import{AlertDescription as g}from"../../alert/Description.js";import{SelectItem as y}from"../../select/SelectItem.js";const N=({kind:a,name:i,dateLabel:l,date:s,action:n,fields:r,children:d})=>e("section",{className:"hub__status-card",children:[e("div",{className:"hub__status-head",children:[e("div",{className:"hub__status-title",children:[t("span",{className:"hub__status-kind",children:a}),t("span",{className:"hub__status-name",children:i})]}),e("div",{className:"hub__status-side",children:[e("div",{className:"hub__status-date",children:[t("span",{children:l}),t("span",{className:"hub__status-dateval",children:s})]}),n]})]}),t("div",{className:"hub__status-grid",children:r.map(([a,i],l)=>e("div",{children:[t("span",{className:"hub__status-label",children:a}),t("span",{className:"hub__status-value",children:i})]},l))}),d]}),f=({data:s,cats:m,types:_,statuses:v,wagering:g,applies:N,onRequest:f,onCancel:w,marker:x={desktop:"inn-bonus-request-table",list:"inn-mobile-bonus-request-list",methods:"inn-mobile-bonus-request-list-methods",item:"inn-mobile-bonus-request-list-method-item"},nameTitle:T="İsim",catTitle:j="Kategori",typeTitle:I="Tip",wageringTitle:z="Çevrimli",statusTitle:L="Durum",percentTitle:C="Hak Ediş Yüzdesi",infoLabel:q="Bonus bilgisi",applyDatePrefix:B="Başvuru Tarihi: ",requestLabel:D="Talep Et",reRequestLabel:E="Tekrar Talep Et",cancelLabel:S="Talebi İptal Et",unavailableLabel:K="Talep Edilemez",openStatus:R="Açık",unavailableStatus:A="Talep Edilemez"})=>{const[H,P]=i(m[0]?.value??"all"),U=[{key:"name",dataIndex:"name",title:T,maxWidth:220,render:(a,i)=>e("span",{className:"hub__pay-name hub__hist-nm",children:[e("span",{className:"hub__bonus-name",children:[t("span",{className:"hub__bonus-title",children:i.name}),e(o,{children:[t(h,{asChild:!0,children:t("i",{className:"hub__hist-creator","aria-label":q,children:t(n,{size:14})})}),t(u,{placement:"top",children:i.desc})]})]}),i.applyDate&&t("span",{className:"hub__pay-desc",children:B+i.applyDate})]})},{key:"cat",dataIndex:"cat",title:j,width:90},{key:"type",dataIndex:"type",title:I,width:110},{key:"wagering",dataIndex:"wagering",title:z,width:90},{key:"status",dataIndex:"status",title:L,width:150,render:e=>t(k,{s:String(e)})},{key:"percent",dataIndex:"percent",title:C,width:170,render:e=>t("span",{className:"hub__bonus-progress",children:t(d,{percent:Number(e)})})},{key:"actions",dataIndex:"key",title:"",width:180,render:(a,i)=>t("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.status===R?t(r,{variant:"statable",state:"reject",size:"medium",onClick:()=>w?.(i),children:S}):i.status===A?t(r,{variant:"filled",size:"medium",disabled:!0,children:K}):e(r,{variant:"default",size:"medium",onClick:()=>f?.(i),children:[t(l,{size:14}),i.applyDate?E:D]})})}];return e(a,{children:[t("div",{className:"hub__hist-cats--wide",children:t(p,{options:m,value:H,onChange:P,idPrefix:"brq"})}),t("div",{className:"hub__hist-filters hub__hist-filters--2",children:[_,v,g,N].map((e,a)=>t(c,{size:"x-large",defaultValue:e[0],children:e.map(e=>t(y,{value:e,children:e},e))},a))}),t(b,{columns:U,data:s,cellHeight:"84px",marker:x})]})},w=({data:i,intro:n,onAccept:d,onReject:c,marker:o={desktop:"inn-bonus-activation-table",list:"inn-mobile-bonus-activation-list",methods:"inn-mobile-bonus-activation-list-items",item:"inn-mobile-bonus-activation-list-method-item"},idTitle:h="Id",nameTitle:u="Bonus İsmi",catTitle:p="Kategori",amountTitle:k="Miktar",acceptLabel:y="Kabul Et",rejectLabel:N="Reddet"})=>{const f=[{key:"id",dataIndex:"key",title:h,width:50,render:(e,a)=>t(_,{value:a.key,compact:!0})},{key:"name",dataIndex:"name",title:u,maxWidth:300,render:(e,a)=>t(v,{name:a.name})},{key:"cat",dataIndex:"cat",title:p,width:150},{key:"amount",dataIndex:"amount",title:k,width:200,render:e=>t("span",{className:"hub__hist-amount",children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:240,render:(a,i)=>e("span",{className:"hub__pay-actions",children:[e(r,{variant:"default",size:"medium",onClick:()=>d?.(i),children:[t(l,{size:14}),y]}),e(r,{variant:"statable",state:"reject",size:"medium",onClick:()=>c?.(i),children:[t(s,{size:14}),N]})]})}];return e(a,{children:[n&&t(m,{type:"info",variant:"filled",children:t(g,{children:n})}),t(b,{columns:f,data:i,cellHeight:"74px",marker:o})]})},x=({bonus:i,intro:l,onCancel:s,kindLabel:n="AKTİF BONUS",applyDateLabel:c="Başvuru Tarihi",cancelLabel:o="Bonusu İptal Et",wagerTitle:h="Bonus Çevrim Bilgisi",validLabel:u="Geçerlilik"})=>e(a,{children:[l&&t(m,{type:"info",variant:"filled",children:t(g,{children:l})}),t(N,{kind:n,name:i.name,dateLabel:c,date:i.applyDate,action:t(r,{variant:"statable",state:"reject",size:"medium",onClick:s,children:o}),fields:i.fields,children:e("div",{className:"hub__wager",children:[e("div",{className:"hub__wager-head",children:[t("span",{className:"hub__wager-title",children:h}),e("div",{className:"hub__status-date hub__wager-until",children:[t("span",{children:u}),t("span",{className:"hub__status-dateval",children:i.validUntil})]})]}),i.wagerings.map((a,i)=>e("div",{className:"hub__wager-row",children:[t("span",{className:"hub__wager-label",children:a.label}),e("div",{className:"hub__wager-bar",children:[t(d,{percent:a.percent,showInfo:!1}),t("span",{className:"hub__wager-amt",children:a.done+" / "+a.total})]})]},i))]})})]});export{x as HubActiveBonus,w as HubBonusActivation,f as HubBonusRequest,N as HubStatusCard};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useState as l}from"react";import{Clock as i,Gauge as n,Star as r,Flame as o}from"lucide-react";import s from"../../button/index.js";import d from"../../input/index.js";import m from"../../select/index.js";import c from"../../textarea/index.js";import t from"../../alert/index.js";import h from"../../badge/index.js";import{FieldLabel as p,Field as u,FieldTitle as b}from"../../field/index.js";import{RadioGroup as _}from"../../radio/RadioGroup.js";import{RadioGroupItem as v}from"../../radio/RadioGroupItem.js";import{GetClassNameByPlatform as y}from"../../helpers/classname/GetClassNameByPlatform.js";import{SelectItem as f}from"../../select/SelectItem.js";import{AlertDescription as g}from"../../alert/Description.js";const N=(a,e)=>y(a)+" "+e,k=a=>a.name??a.label,x=a=>{const[e,i]=l(()=>Object.fromEntries(a.map(a=>[k(a),a.value??""])));return[e,(a,e)=>i(l=>({...l,[k(a)]:e}))]},C=({logo:e})=>a("span",{className:"hub__pay-logo",style:{background:e.color},"aria-hidden":!0,children:e.Icon?a(e.Icon,{size:18}):a("b",{children:e.initials})}),z=({options:l,value:i,onChange:n,idPrefix:r,marker:o})=>a(_,{value:i,onValueChange:n,orientation:"horizontal",className:o?N(o,"hub__pay-filter"):"hub__pay-filter",children:l.map(l=>a(p,{htmlFor:r+"-"+l.value,children:e(u,{orientation:"vertical",className:"hub__pay-tile",children:[a("span",{className:"hub__pay-badge",style:{background:l.color},"aria-hidden":!0,children:l.Icon?a(l.Icon,{size:18}):a("b",{children:l.initials})}),a(b,{children:l.label}),a(v,{value:l.value,id:r+"-"+l.value,className:"sr-only"})]})},l.value))}),j=({f:l,onChange:i})=>e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:l.label}),"textarea"===l.kind?a(c,{rows:3,defaultValue:l.value,placeholder:l.placeholder,onUpdate:a=>i?.(String(a??""))}):"select"===l.kind?a(m,{size:"x-large",defaultValue:l.value,locked:!!l.locked,onChange:a=>i?.(String(a??"")),children:l.options.map(e=>a(f,{value:e,children:e},e))}):l.locked?a(d,{size:"x-large",value:l.value,locked:!0}):a(d,{size:"x-large",defaultValue:l.value,placeholder:l.placeholder,onChange:a=>i?.(String(a??""))})]}),S=({logo:l,name:i,side:n})=>e("div",{className:"hub__paymodal-card",children:[a(C,{logo:l}),a("span",{className:"hub__paymodal-name",children:i}),n]}),L=({labels:l,values:r})=>a("div",{className:"hub__paymodal-tiles",children:l.map((l,o)=>a("div",{className:"hub__paymodal-tile",children:e("div",{children:[0===o?a(i,{"aria-hidden":!0}):a(n,{"aria-hidden":!0,style:1===o?{transform:"scale(-1, 1)"}:void 0}),e("span",{className:"hub__paymodal-tile-texts",children:[a("span",{className:"hub__paymodal-tile-label",children:l}),a("span",{className:"hub__paymodal-tile-value",children:r[o]})]})]})},l))}),F=({method:i,personFields:n=[],amountLabel:r="Yatırım Miktarı",submitLabel:o="Yatırım Talebi Gönder",favLabel:m="Favorilere Ekle",unfavLabel:c="Favorilerden Kaldır",onSubmit:t,onFavorite:h})=>{const[p,u]=l(!!i.favorite),[b,_]=l(""),[v,y]=x(n);return e("div",{className:"hub__paymodal",children:[a(S,{logo:i.logo,name:i.name,side:a(s,{variant:p?"default":"outline",size:"medium",onClick:()=>{u(!p),h?.(!p)},children:p?c:m})}),a(L,{labels:["Yatırım Süresi","Min Yatırım","Max Yatırım"],values:[i.time,i.min,i.max]}),a("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-form",children:[n.map(e=>a(j,{f:e,onChange:a=>y(e,a)},e.label)),e("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[a("label",{className:"hub__paymodal-label",children:r}),a(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:a("span",{children:"₺"}),value:b,onChange:a=>_(String(a))})]})]}),a("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-submit",children:a(s,{variant:"default",size:"large",disabled:!b,onClick:()=>t?.({method:i,amount:b,fields:v}),children:o})})]})},I=({account:i,fields:n=[],amountLabel:r="Çekim Miktarı",submitLabel:o="Çekim Talebi Gönder",note:m,onSubmit:c})=>{const[h,p]=l(""),[u,b]=x(n);return e("div",{className:"hub__paymodal",children:[a(S,{logo:i.logo,name:i.name}),a(L,{labels:["Çekim Süresi","Min Çekim","Max Çekim"],values:[i.time,i.min,i.max]}),a("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-form",children:[n.map(e=>a(j,{f:e,onChange:a=>b(e,a)},e.label)),e("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[a("label",{className:"hub__paymodal-label",children:r}),a(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:a("span",{children:"₺"}),value:h,onChange:a=>p(String(a))})]}),m&&a(t,{type:"info",variant:"filled",children:a(g,{children:m})})]}),a("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-submit",children:a(s,{variant:"default",size:"large",disabled:!h,onClick:()=>c?.({account:i,amount:h,fields:u}),children:o})})]})},G=({account:i,accountTypes:n,typeFields:r,personFields:o=[],tcField:m,phoneField:t,nameLabel:h="Çekim Hesabı Adı",descLabel:p="Çekim Hesabı Açıklaması",typeLabel:u="Çekim Hesabı Türü",addLabel:b="Çekim Hesabı Ekle",editLabel:_="Çekim Hesabını Güncelle",onSubmit:v})=>{const y=!!i,[f,g]=l(i?.tags[0]??n[0]?.value??"bank"),[N,k]=l(i?.name??""),[C,L]=l(i?.desc??""),F=n.find(a=>a.value===f)??n[0],I=r[f]??r.default??{pre:[],post:[]},G=a=>y?a:{...a,value:void 0},M=[...I.pre.map(G),...m?[m]:[],...o,...I.post.map(G),...t?[t]:[]],[T,Y]=x(M);return e("div",{className:"hub__paymodal",children:[y&&F?a(S,{logo:{color:F.color,Icon:F.Icon,initials:F.initials},name:F.label}):e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:u}),a(z,{options:n,value:f,onChange:g,idPrefix:"acct"})]}),e("div",{className:"hub__paymodal-form",children:[e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:h}),a(d,{size:"x-large",value:N,onChange:a=>k(String(a))})]}),e("div",{className:"hub__paymodal-field",children:[a("label",{className:"hub__paymodal-label",children:p}),a(c,{rows:3,value:C,onChange:a=>L("string"==typeof a?a:a?.target?.value??"")})]}),M.map(e=>a(j,{f:e,onChange:a=>Y(e,a)},f+"-"+e.label))]}),a("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-submit",children:a(s,{variant:"default",size:"large",disabled:!N||!C,onClick:()=>v?.({edit:y,type:f,name:N,desc:C,fields:T}),children:y?_:b})})]})},M=({row:l,favTitle:i="Favori",hotTitle:n="Popüler"})=>"group"===l.type?e("span",{className:"hub__pay-name",children:[a("span",{className:"hub__pay-groupname",children:l.name}),a("span",{children:a(h,{variant:"default",color:"blue",size:"medium",pill:!1,className:"hub__pay-chip",children:l.methodCount+" Yöntem"})})]}):a("span",{className:"hub__pay-name",children:e("span",{className:"hub__pay-title",children:[l.name,l.favorite&&a("i",{className:"hub__pay-mark hub__pay-mark--fav",title:i,children:a(r,{size:9})}),l.popular&&a("i",{className:"hub__pay-mark hub__pay-mark--hot",title:n,children:a(o,{size:9})})]})});export{G as HubAccountModal,F as HubDepositModal,j as HubPayFieldRow,z as HubPayFilter,C as HubPayLogoBadge,S as HubPayModalCard,L as HubPayModalTiles,M as HubPayName,I as HubWithdrawModal};
1
+ import{jsxs as a,jsx as e}from"react/jsx-runtime";import{useState as l}from"react";import{Clock as i,Gauge as n,Star as r,Flame as o}from"lucide-react";import s from"../../button/index.js";import d from"../../input/index.js";import m from"../../select/index.js";import c from"../../textarea/index.js";import t from"../../alert/index.js";import h from"../../badge/index.js";import{FieldLabel as p,Field as u,FieldTitle as b}from"../../field/index.js";import{RadioGroup as _}from"../../radio/RadioGroup.js";import{RadioGroupItem as v}from"../../radio/RadioGroupItem.js";import{GetClassNameByPlatform as y}from"../../helpers/classname/GetClassNameByPlatform.js";import{SelectItem as f}from"../../select/SelectItem.js";import{AlertDescription as g}from"../../alert/Description.js";const N=(a,e)=>y(a)+" "+e,k=a=>a.name??a.label,x=a=>{const[e,i]=l(()=>Object.fromEntries(a.map(a=>[k(a),a.value??""])));return[e,(a,e)=>i(l=>({...l,[k(a)]:e}))]},C=({logo:a})=>e("span",{className:"hub__pay-logo",style:{background:a.color},"aria-hidden":!0,children:a.Icon?e(a.Icon,{size:18}):e("b",{children:a.initials})}),z=({options:l,value:i,onChange:n,idPrefix:r,marker:o})=>e(_,{value:i,onValueChange:n,orientation:"horizontal",className:o?N(o,"hub__pay-filter"):"hub__pay-filter",children:l.map(l=>e(p,{htmlFor:r+"-"+l.value,children:a(u,{orientation:"vertical",className:"hub__pay-tile",children:[e("span",{className:"hub__pay-badge",style:{background:l.color},"aria-hidden":!0,children:l.Icon?e(l.Icon,{size:18}):e("b",{children:l.initials})}),e(b,{children:l.label}),e(v,{value:l.value,id:r+"-"+l.value,className:"sr-only"})]})},l.value))}),j=({f:l,onChange:i})=>a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:l.label}),"textarea"===l.kind?e(c,{rows:3,defaultValue:l.value,placeholder:l.placeholder,onUpdate:a=>i?.(String(a??""))}):"select"===l.kind?e(m,{size:"x-large",defaultValue:l.value,locked:!!l.locked,onChange:a=>i?.(String(a??"")),children:l.options.map(a=>e(f,{value:a,children:a},a))}):l.locked?e(d,{size:"x-large",value:l.value,locked:!0}):e(d,{size:"x-large",defaultValue:l.value,placeholder:l.placeholder,onChange:a=>i?.(String(a??""))})]}),S=({logo:l,name:i,side:n})=>a("div",{className:"hub__paymodal-card",children:[e(C,{logo:l}),e("span",{className:"hub__paymodal-name",children:i}),n]}),L=({labels:l,values:r})=>e("div",{className:"hub__paymodal-tiles",children:l.map((l,o)=>e("div",{className:"hub__paymodal-tile",children:a("div",{children:[0===o?e(i,{"aria-hidden":!0}):e(n,{"aria-hidden":!0,style:1===o?{transform:"scale(-1, 1)"}:void 0}),a("span",{className:"hub__paymodal-tile-texts",children:[e("span",{className:"hub__paymodal-tile-label",children:l}),e("span",{className:"hub__paymodal-tile-value",children:r[o]})]})]})},l))}),F=({method:i,personFields:n=[],amountLabel:r="Yatırım Miktarı",submitLabel:o="Yatırım Talebi Gönder",favLabel:m="Favorilere Ekle",unfavLabel:c="Favorilerden Kaldır",onSubmit:t,onFavorite:h})=>{const[p,u]=l(!!i.favorite),[b,_]=l(""),[v,y]=x(n);return a("div",{className:"hub__paymodal",children:[e(S,{logo:i.logo,name:i.name,side:e(s,{variant:p?"default":"outline",size:"medium",onClick:()=>{u(!p),h?.(!p)},children:p?c:m})}),e(L,{labels:["Yatırım Süresi","Min Yatırım","Max Yatırım"],values:[i.time,i.min,i.max]}),e("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-form",children:[n.map(a=>e(j,{f:a,onChange:e=>y(a,e)},a.label)),a("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[e("label",{className:"hub__paymodal-label",children:r}),e(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:e("span",{children:"₺"}),value:b,onChange:a=>_(String(a))})]})]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!b,onClick:()=>t?.({method:i,amount:b,fields:v}),children:o})})]})},I=({account:i,fields:n=[],amountLabel:r="Çekim Miktarı",submitLabel:o="Çekim Talebi Gönder",note:m,onSubmit:c})=>{const[h,p]=l(""),[u,b]=x(n);return a("div",{className:"hub__paymodal",children:[e(S,{logo:i.logo,name:i.name}),e(L,{labels:["Çekim Süresi","Min Çekim","Max Çekim"],values:[i.time,i.min,i.max]}),e("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-form",children:[n.map(a=>e(j,{f:a,onChange:e=>b(a,e)},a.label)),a("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[e("label",{className:"hub__paymodal-label",children:r}),e(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:e("span",{children:"₺"}),value:h,onChange:a=>p(String(a))})]}),m&&e(t,{type:"info",variant:"filled",children:e(g,{children:m})})]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!h,onClick:()=>c?.({account:i,amount:h,fields:u}),children:o})})]})},G=({account:i,accountTypes:n,typeFields:r,personFields:o=[],tcField:m,phoneField:t,nameLabel:h="Çekim Hesabı Adı",descLabel:p="Çekim Hesabı Açıklaması",typeLabel:u="Çekim Hesabı Türü",addLabel:b="Çekim Hesabı Ekle",editLabel:_="Çekim Hesabını Güncelle",onSubmit:v})=>{const y=!!i,[f,g]=l(i?.tags[0]??n[0]?.value??"bank"),[N,k]=l(i?.name??""),[C,L]=l(i?.desc??""),F=n.find(a=>a.value===f)??n[0],I=r[f]??r.default??{pre:[],post:[]},G=a=>y?a:{...a,value:void 0},M=[...I.pre.map(G),...m?[m]:[],...o,...I.post.map(G),...t?[t]:[]],[T,Y]=x(M);return a("div",{className:"hub__paymodal",children:[y&&F?e(S,{logo:{color:F.color,Icon:F.Icon,initials:F.initials},name:F.label}):a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:u}),e(z,{options:n,value:f,onChange:g,idPrefix:"acct"})]}),a("div",{className:"hub__paymodal-form",children:[a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:h}),e(d,{size:"x-large",value:N,onChange:a=>k(String(a))})]}),a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:p}),e(c,{rows:3,value:C,onChange:a=>L("string"==typeof a?a:a?.target?.value??"")})]}),M.map(a=>e(j,{f:a,onChange:e=>Y(a,e)},f+"-"+a.label))]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!N||!C,onClick:()=>v?.({edit:y,type:f,name:N,desc:C,fields:T}),children:y?_:b})})]})},M=({row:l,favTitle:i="Favori",hotTitle:n="Popüler"})=>"group"===l.type?a("span",{className:"hub__pay-name",children:[e("span",{className:"hub__pay-groupname",children:l.name}),e("span",{children:e(h,{variant:"default",color:"blue",size:"medium",pill:!1,className:"hub__pay-chip",children:l.methodCount+" Yöntem"})})]}):e("span",{className:"hub__pay-name",children:a("span",{className:"hub__pay-title",children:[l.name,l.favorite&&e("i",{className:"hub__pay-mark hub__pay-mark--fav",title:i,children:e(r,{size:9})}),l.popular&&e("i",{className:"hub__pay-mark hub__pay-mark--hot",title:n,children:e(o,{size:9})})]})});export{G as HubAccountModal,F as HubDepositModal,j as HubPayFieldRow,z as HubPayFilter,C as HubPayLogoBadge,S as HubPayModalCard,L as HubPayModalTiles,M as HubPayName,I as HubWithdrawModal};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as a,Fragment as n}from"react";import{Eye as r,Search as d}from"lucide-react";import l from"../../button/index.js";import s from"../../badge/index.js";import o from"../../input/index.js";import m from"../../select/index.js";import h from"../../datepicker/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as p}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as k}from"../../tooltip/TooltipContent.js";import{HubPayFilter as u}from"./cashier.js";import{HubTable as y,HubCopyBtn as g,HubHistName as x,HubDt as w,HubStatusBadge as b}from"./table.js";import{SelectItem as f}from"../../select/SelectItem.js";const I=({cols:t,filters:r,onFilter:d,minPlaceholder:l="Min",maxPlaceholder:s="Maks",startPlaceholder:c="Tarih Başlangıç",endPlaceholder:p="Tarih Bitiş"})=>{const[k,u]=a({}),y=(e,t,i)=>{const a=((e,t)=>e.name??String(t))(e,t),n={...k,[a]:"object"==typeof i&&"object"==typeof k[a]?{...k[a],...i}:i};u(n),d?.(n)};return i("div",{className:"hub__hist-filters hub__hist-filters--"+t,children:r.map((t,a)=>"select"===t.kind?i(m,{size:"x-large",defaultValue:t.options[0],"aria-label":t.ariaLabel,onChange:e=>y(t,a,String(e??"")),children:t.options.map(e=>i(f,{value:e,children:e},e))},a):"minmax"===t.kind?e("div",{className:"hub__hist-minmax",children:[i(o,{size:"x-large",placeholder:l,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{min:String(e??"")})}),i(o,{size:"x-large",placeholder:s,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{max:String(e??"")})})]},a):e(n,{children:[i(h,{size:"x-large",placeholder:c,"aria-label":c,onChange:e=>y(t,a,{start:String(e??"")})}),i(h,{size:"x-large",placeholder:p,"aria-label":p,onChange:e=>y(t,a,{end:String(e??"")})})]},a))})},T=({cats:e,idPrefix:t,wide:n})=>{const[r,d]=a(e[0]?.value??"all"),l=i(u,{options:e,value:r,onChange:d,idPrefix:t});return n?i("div",{className:"hub__hist-cats--wide",children:l}):l},v=({children:e})=>i("span",{className:"hub__hist-amount",children:e}),S=({data:a,onFilter:n,cats:d,providers:s,statuses:o,onDetail:m,marker:h={list:"inn-mobile-game-history-list",methods:"inn-mobile-game-history-list-methods",item:"inn-mobile-game-history-list-item"},tokenTitle:c="Fiş",gameTitle:p="Oyun",startTitle:k="Başlangıç",endTitle:u="Bitiş",oldBalTitle:b="Eski Bakiye",newBalTitle:f="Yeni Bakiye",winTitle:S="Kazanma",detailLabel:B="Detay"})=>{const _=[{key:"token",dataIndex:"key",title:c,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"game",dataIndex:"game",title:p,maxWidth:200,render:(e,t)=>i(x,{name:t.game,desc:t.cat})},{key:"start",dataIndex:"start",title:k,width:130,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:u,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:b,width:130},{key:"newBal",dataIndex:"newBal",title:f,width:130},{key:"win",dataIndex:"win",title:S,width:120,align:"right",render:e=>i(v,{children:String(e)})},{key:"details",dataIndex:"key",title:"",width:100,render:(t,a)=>i("span",{className:"hub__pay-actions",children:e(l,{variant:"solid",size:"medium",onClick:()=>m(a),children:[i(r,{size:13}),B]})})}];return e(t,{children:[i(T,{cats:d,idPrefix:"gh"}),i(I,{onFilter:n,cols:2,filters:[{kind:"select",options:s},{kind:"select",options:o},{kind:"daterange"}]}),i(y,{columns:_,data:a,cellHeight:"54px",marker:h})]})},B=({data:a,onFilter:n,cats:r,methods:d,statuses:l,types:s,marker:o={list:"inn-mobile-payment-history-list",methods:"inn-mobile-payment-history-list-methods",item:"inn-mobile-payment-history-list-item"},idTitle:m="Id",providerTitle:h="Sağlayıcı",statusTitle:c="Durum",dateTitle:p="Tarih",oldBalTitle:k="Eski Bakiye",newBalTitle:u="Yeni Bakiye",amountTitle:f="Miktar"})=>{const S=[{key:"id",dataIndex:"key",title:m,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:h,maxWidth:200,render:(e,t)=>i(x,{name:t.name,desc:t.sub})},{key:"status",dataIndex:"status",title:c,width:130,render:e=>i(b,{s:String(e)})},{key:"date",dataIndex:"date",title:p,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:k,width:130},{key:"newBal",dataIndex:"newBal",title:u,width:130},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"ph"}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:S,data:a,cellHeight:"54px",marker:o})]})},_=({data:a,onFilter:n,cats:r,creators:d,statuses:l,types:s,marker:o={list:"inn-mobile-bonus-history-list",methods:"inn-mobile-bonus-history-list-methods",item:"inn-mobile-bonus-history-list-item"},nameTitle:m="İsim",catTitle:h="Kategori",statusTitle:c="Durum",applyTitle:p="Başvuru Tarihi",finishTitle:k="Tamamlanma",profitTitle:u="Net Kar",cashbackTitle:g="Geri Ödeme",amountTitle:f="Bonus Miktarı",creatorLabel:S="Oluşturan: "})=>{const B=[{key:"name",dataIndex:"name",title:m,maxWidth:200,render:(e,t)=>i(x,{name:t.name,desc:t.sub,creator:t.creator,creatorLabel:S})},{key:"cat",dataIndex:"cat",title:h,width:90},{key:"status",dataIndex:"status",title:c,width:150,render:e=>i(b,{s:String(e)})},{key:"apply",dataIndex:"apply",title:p,width:145,render:e=>i(w,{v:String(e)})},{key:"finish",dataIndex:"finish",title:k,width:145,render:e=>i(w,{v:String(e)})},{key:"profit",dataIndex:"profit",title:u,width:100},{key:"cashback",dataIndex:"cashback",title:g,width:110},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"bh",wide:!0}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:B,data:a,cellHeight:"54px",marker:o})]})},z=({data:a,onFilter:n,providers:o,statuses:m,onGames:h,marker:u={list:"inn-mobile-free-spin-history-list",methods:"inn-mobile-free-spin-history-list-methods",item:"inn-mobile-free-spin-history-list-item"},idTitle:f="Id",providerTitle:T="Sağlayıcı",winTitle:S="Kazanç",statusTitle:B="Durum",gamesTitle:_="Oyun Sayısı",spinsTitle:z="Spin Sayısı",startTitle:j="Başlangıç",endTitle:C="Bitiş",gamesTooltip:F="Free Spin Oyunları",viewGamesLabel:P="Geçerli Oyunları Görüntüle"})=>{const N=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(x,{name:t.provider})},{key:"status",dataIndex:"status",title:S,width:140,render:e=>i(b,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:(t,a)=>e("span",{className:"hub__hist-count",children:[i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(t)}),e(c,{children:[i(p,{asChild:!0,children:i(l,{variant:"ghost",size:"icon-sm","aria-label":F,onClick:()=>h(a),children:i(r,{size:13})})}),i(k,{placement:"top",children:F})]})]})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,align:"right",render:e=>i(v,{children:String(e)})}],D=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(g,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(x,{name:t.provider})},{key:"status",dataIndex:"status",title:B,width:140,render:e=>i(b,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:e=>i(v,{children:String(e)})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,render:e=>i(v,{children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:220,render:(t,a)=>i("span",{className:"hub__pay-actions hub__pay-actions--full",children:e(l,{variant:"solid",size:"medium",onClick:()=>h(a),children:[i(d,{size:14}),P]})})}];return e(t,{children:[i(I,{onFilter:n,cols:4,filters:[{kind:"select",options:o},{kind:"select",options:m},{kind:"daterange"}]}),i(y,{columns:N,mobileColumns:D,data:a,cellHeight:"54px",marker:u})]})};export{_ as HubBonusHistory,z as HubFreespinHistory,S as HubGameHistory,B as HubPaymentHistory};
1
+ import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as a,Fragment as n}from"react";import{Search as r,Eye as d}from"lucide-react";import l from"../../button/index.js";import s from"../../badge/index.js";import o from"../../input/index.js";import m from"../../select/index.js";import h from"../../datepicker/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as p}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as k}from"../../tooltip/TooltipContent.js";import{HubPayFilter as u}from"./cashier.js";import{HubTable as y,HubHistName as g,HubStatusBadge as x,HubDt as w,HubCopyBtn as b}from"./table.js";import{SelectItem as f}from"../../select/SelectItem.js";const I=({cols:t,filters:r,onFilter:d,minPlaceholder:l="Min",maxPlaceholder:s="Maks",startPlaceholder:c="Tarih Başlangıç",endPlaceholder:p="Tarih Bitiş"})=>{const[k,u]=a({}),y=(e,t,i)=>{const a=((e,t)=>e.name??String(t))(e,t),n={...k,[a]:"object"==typeof i&&"object"==typeof k[a]?{...k[a],...i}:i};u(n),d?.(n)};return i("div",{className:"hub__hist-filters hub__hist-filters--"+t,children:r.map((t,a)=>"select"===t.kind?i(m,{size:"x-large",defaultValue:t.options[0],"aria-label":t.ariaLabel,onChange:e=>y(t,a,String(e??"")),children:t.options.map(e=>i(f,{value:e,children:e},e))},a):"minmax"===t.kind?e("div",{className:"hub__hist-minmax",children:[i(o,{size:"x-large",placeholder:l,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{min:String(e??"")})}),i(o,{size:"x-large",placeholder:s,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{max:String(e??"")})})]},a):e(n,{children:[i(h,{size:"x-large",placeholder:c,"aria-label":c,onChange:e=>y(t,a,{start:String(e??"")})}),i(h,{size:"x-large",placeholder:p,"aria-label":p,onChange:e=>y(t,a,{end:String(e??"")})})]},a))})},T=({cats:e,idPrefix:t,wide:n})=>{const[r,d]=a(e[0]?.value??"all"),l=i(u,{options:e,value:r,onChange:d,idPrefix:t});return n?i("div",{className:"hub__hist-cats--wide",children:l}):l},v=({children:e})=>i("span",{className:"hub__hist-amount",children:e}),S=({data:a,onFilter:n,cats:r,providers:s,statuses:o,onDetail:m,marker:h={list:"inn-mobile-game-history-list",methods:"inn-mobile-game-history-list-methods",item:"inn-mobile-game-history-list-item"},tokenTitle:c="Fiş",gameTitle:p="Oyun",startTitle:k="Başlangıç",endTitle:u="Bitiş",oldBalTitle:x="Eski Bakiye",newBalTitle:f="Yeni Bakiye",winTitle:S="Kazanma",detailLabel:B="Detay"})=>{const _=[{key:"token",dataIndex:"key",title:c,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"game",dataIndex:"game",title:p,maxWidth:200,render:(e,t)=>i(g,{name:t.game,desc:t.cat})},{key:"start",dataIndex:"start",title:k,width:130,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:u,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:x,width:130},{key:"newBal",dataIndex:"newBal",title:f,width:130},{key:"win",dataIndex:"win",title:S,width:120,align:"right",render:e=>i(v,{children:String(e)})},{key:"details",dataIndex:"key",title:"",width:100,render:(t,a)=>i("span",{className:"hub__pay-actions",children:e(l,{variant:"solid",size:"medium",onClick:()=>m(a),children:[i(d,{size:13}),B]})})}];return e(t,{children:[i(T,{cats:r,idPrefix:"gh"}),i(I,{onFilter:n,cols:2,filters:[{kind:"select",options:s},{kind:"select",options:o},{kind:"daterange"}]}),i(y,{columns:_,data:a,cellHeight:"54px",marker:h})]})},B=({data:a,onFilter:n,cats:r,methods:d,statuses:l,types:s,marker:o={list:"inn-mobile-payment-history-list",methods:"inn-mobile-payment-history-list-methods",item:"inn-mobile-payment-history-list-item"},idTitle:m="Id",providerTitle:h="Sağlayıcı",statusTitle:c="Durum",dateTitle:p="Tarih",oldBalTitle:k="Eski Bakiye",newBalTitle:u="Yeni Bakiye",amountTitle:f="Miktar"})=>{const S=[{key:"id",dataIndex:"key",title:m,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:h,maxWidth:200,render:(e,t)=>i(g,{name:t.name,desc:t.sub})},{key:"status",dataIndex:"status",title:c,width:130,render:e=>i(x,{s:String(e)})},{key:"date",dataIndex:"date",title:p,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:k,width:130},{key:"newBal",dataIndex:"newBal",title:u,width:130},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"ph"}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:S,data:a,cellHeight:"54px",marker:o})]})},_=({data:a,onFilter:n,cats:r,creators:d,statuses:l,types:s,marker:o={list:"inn-mobile-bonus-history-list",methods:"inn-mobile-bonus-history-list-methods",item:"inn-mobile-bonus-history-list-item"},nameTitle:m="İsim",catTitle:h="Kategori",statusTitle:c="Durum",applyTitle:p="Başvuru Tarihi",finishTitle:k="Tamamlanma",profitTitle:u="Net Kar",cashbackTitle:b="Geri Ödeme",amountTitle:f="Bonus Miktarı",creatorLabel:S="Oluşturan: "})=>{const B=[{key:"name",dataIndex:"name",title:m,maxWidth:200,render:(e,t)=>i(g,{name:t.name,desc:t.sub,creator:t.creator,creatorLabel:S})},{key:"cat",dataIndex:"cat",title:h,width:90},{key:"status",dataIndex:"status",title:c,width:150,render:e=>i(x,{s:String(e)})},{key:"apply",dataIndex:"apply",title:p,width:145,render:e=>i(w,{v:String(e)})},{key:"finish",dataIndex:"finish",title:k,width:145,render:e=>i(w,{v:String(e)})},{key:"profit",dataIndex:"profit",title:u,width:100},{key:"cashback",dataIndex:"cashback",title:b,width:110},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"bh",wide:!0}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:B,data:a,cellHeight:"54px",marker:o})]})},z=({data:a,onFilter:n,providers:o,statuses:m,onGames:h,marker:u={list:"inn-mobile-free-spin-history-list",methods:"inn-mobile-free-spin-history-list-methods",item:"inn-mobile-free-spin-history-list-item"},idTitle:f="Id",providerTitle:T="Sağlayıcı",winTitle:S="Kazanç",statusTitle:B="Durum",gamesTitle:_="Oyun Sayısı",spinsTitle:z="Spin Sayısı",startTitle:j="Başlangıç",endTitle:C="Bitiş",gamesTooltip:F="Free Spin Oyunları",viewGamesLabel:P="Geçerli Oyunları Görüntüle"})=>{const N=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(g,{name:t.provider})},{key:"status",dataIndex:"status",title:S,width:140,render:e=>i(x,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:(t,a)=>e("span",{className:"hub__hist-count",children:[i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(t)}),e(c,{children:[i(p,{asChild:!0,children:i(l,{variant:"ghost",size:"icon-sm","aria-label":F,onClick:()=>h(a),children:i(d,{size:13})})}),i(k,{placement:"top",children:F})]})]})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,align:"right",render:e=>i(v,{children:String(e)})}],D=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(g,{name:t.provider})},{key:"status",dataIndex:"status",title:B,width:140,render:e=>i(x,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:e=>i(v,{children:String(e)})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,render:e=>i(v,{children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:220,render:(t,a)=>i("span",{className:"hub__pay-actions hub__pay-actions--full",children:e(l,{variant:"solid",size:"medium",onClick:()=>h(a),children:[i(r,{size:14}),P]})})}];return e(t,{children:[i(I,{onFilter:n,cols:4,filters:[{kind:"select",options:o},{kind:"select",options:m},{kind:"daterange"}]}),i(y,{columns:N,mobileColumns:D,data:a,cellHeight:"54px",marker:u})]})};export{_ as HubBonusHistory,z as HubFreespinHistory,S as HubGameHistory,B as HubPaymentHistory};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as a,jsx as l}from"react/jsx-runtime";import{useState as i}from"react";import{Crown as n,Medal as r,TrendingUp as s,Gamepad2 as d,Folder as t,Trophy as c,FileQuestion as h,User as m,ChevronRight as o,Info as u}from"lucide-react";import _ from"../../button/index.js";import b from"../../progress/index.js";import p from"../../select/index.js";import v from"../../table/index.js";import{Avatar as g}from"../../avatar/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as f}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as y}from"../../hovercard/HoverCardContent.js";import{Sheet as w,SheetTrigger as k,SheetContent as x,SheetHeader as L,SheetTitle as C}from"../../dialog/Dialog.js";import{SelectItem as T}from"../../select/SelectItem.js";const S=({Icon:a})=>l("span",{className:"hub__medal-shape","aria-hidden":!0,children:e("span",{className:"hub__medal-hexwrap",children:[e("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[l("defs",{children:e("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[l("stop",{offset:"0",stopColor:"#ffd54d"}),l("stop",{offset:"0.55",stopColor:"#f1ab00"}),l("stop",{offset:"1",stopColor:"#d98e00"})]})}),l("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),l("span",{className:"hub__medal-glyph",children:l(a,{})})]})}),j=({medal:a,onOpen:i})=>e("button",{type:"button",className:"hub__medal"+(a.locked?" hub__medal--locked":""),onClick:()=>i(a),children:[l("span",{className:"hub__medal-visual",children:l(S,{Icon:a.Icon})}),e("span",{className:"hub__medal-bottom",children:[l("span",{className:"hub__medal-name",children:a.name}),l("span",{className:"hub__medal-countwrap",children:e("span",{className:"hub__medal-count",children:[l(m,{"aria-hidden":!0}),a.count]})})]})]}),z=({medal:a,durationLabel:i="Süre",quantityLabel:n="Miktar",earnersLabel:r="Hakeden Sayısı"})=>e("div",{className:"hub__medal-detail",children:[l("span",{className:"hub__medal-visual",children:l(S,{Icon:a.Icon})}),l("div",{className:"hub__medal-detail-name",children:a.name}),l("p",{className:"hub__medal-detail-desc",children:a.description}),e("dl",{className:"hub__medal-detail-rows",children:[e("div",{children:[l("dt",{children:i}),l("dd",{children:a.duration})]}),e("div",{children:[l("dt",{children:n}),l("dd",{children:a.quantity})]}),e("div",{children:[l("dt",{children:r}),l("dd",{children:a.count})]})]})]}),I=({marker:a,icon:i,title:n,titleExtra:r,action:s,children:d})=>e("section",{className:a?a+" hub__box":"hub__box",children:[e("div",{className:"inn-sub-page-header hub__box-head",children:[e("span",{className:"hub__box-title",children:[i,n,r]}),s]}),l("hr",{className:"hub__hairline"}),d]}),O=({stats:a})=>l("div",{className:"hub__stats",children:a.map((a,i)=>e("div",{className:"hub__stat",children:[l("div",{className:"hub__stat-label",children:a.label}),l("div",{className:"hub__stat-value",children:a.value})]},i))}),D=({label:a,onClick:i})=>e(_,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[a,l(o,{"aria-hidden":!0})]}),K=({user:i,vip:c,medals:h,stats:m,topSlots:o,onMedalOpen:u,onVipClub:p,onMedalsDetail:v,onStatsDetail:N,vipClubLabel:f="VIP Klübü",medalsTitle:y="Madalyalar",statsTitle:w="İstatistikler",topSlotsTitle:k="En Çok Oynadığınız Slot Oyunları",liveTitle:x="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:L="Detaylar",cevrimLabel:C="Çevrim",noDataLabel:T="Veri Yok"})=>e(a,{children:[e("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[i.avatar??l(g,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[l("div",{className:"hub__username",children:i.username}),null!=i.fullname&&l("div",{className:"hub__fullname",children:i.fullname})]})]}),e("section",{className:"inn-vip-level-summary hub__vip",children:[e("div",{className:"hub__vip-head",children:[e("div",{className:"hub__vip-meta",children:[l("div",{className:"inn-vip-level-title hub__vip-title",children:c.title}),l("span",{className:"hub__vip-dp",children:c.dp})]}),e(_,{size:"small",className:"hub__vip-btn",onClick:p,children:[l(n,{"aria-hidden":!0}),f]})]}),e("div",{className:"inn-vip-level-progress hub__vip-progress",children:[l(b,{percent:c.percent,showInfo:!1,status:"success"}),l("span",{className:"hub__vip-next",children:c.nextText})]})]}),l(I,{marker:"inn-medals-summary-box",icon:l(r,{"aria-hidden":!0}),title:y,action:l(D,{label:L,onClick:v}),children:l("div",{className:"inn-medals-summary hub__medals",children:h.slice(0,8).map(e=>l(j,{medal:e,onOpen:u},e.name))})}),l(I,{icon:l(s,{"aria-hidden":!0}),title:w,action:l(D,{label:L,onClick:N}),children:l(O,{stats:m})}),l(I,{marker:"inn-favorite-casino-games-summary-box",icon:l(d,{"aria-hidden":!0}),title:k,children:l("div",{className:"inn-favorite-casino-games-summary hub__games",children:o.map(a=>e("div",{className:"hub__game",children:[l("span",{className:"hub__game-art hub__game-art--"+a.art,"aria-hidden":!0,children:a.emoji}),e("div",{className:"hub__game-info",children:[l("div",{className:"hub__game-name",children:a.name}),e("div",{children:[l("div",{className:"hub__game-amount",children:a.amount}),l("div",{className:"hub__game-cur",children:C})]})]})]},a.name))})}),l(I,{marker:"inn-favorite-live-casino-games-summary-box",icon:l(d,{"aria-hidden":!0}),title:x,children:l("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(a=>e("div",{className:"hub__game hub__game--empty",children:[l(t,{"aria-hidden":!0}),l("span",{className:"hub__empty-text",children:T})]},a))})})]}),M=({tips:a,unitLabel:i="madalya:",winLabel:n="ödül kazan"})=>l("div",{className:"hub__reward-tips",children:a.map(([a,r],s)=>e("span",{className:"hub__reward-tip",children:[a," ",i," ",l("b",{children:r})," ",n]},s))}),Q=({tips:i,sheetTitle:n,unitLabel:r,winLabel:s})=>e(a,{children:[l("span",{className:"hub__reward-info hub__reward-info--hover",children:e(N,{children:[l(f,{children:l(u,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),l(y,{variant:"filled",children:l(M,{tips:i,unitLabel:r,winLabel:s})})]})}),l("span",{className:"hub__reward-info hub__reward-info--sheet",children:e(w,{children:[l(k,{asChild:!0,children:l("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof n?n:void 0,children:l(u,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e(x,{side:"bottom",children:[l(L,{children:l(C,{children:n})}),l(M,{tips:i,unitLabel:r,winLabel:s})]})]})})]}),E=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},H=({medals:i,rewardTiers:n,rewardTips:s,rewardPercent:d=10,onMedalOpen:t,rewardsTitle:h="Ödüller",rewardsSheetTitle:m="Ödül Detayları",rewardUnitLabel:o="madalya:",rewardWinLabel:u="ödül kazan",earnedTitle:_="Kazançlarınız",earnedCountText:p="2 / 20 Hakedildi",awaitingTitle:v="Kilidi Açılması Bekleyenler"})=>e(a,{children:[e(I,{icon:l(c,{"aria-hidden":!0}),title:h,titleExtra:l(Q,{tips:s,sheetTitle:m,unitLabel:o,winLabel:u}),children:[l("div",{className:"hub__rewards",children:n.map(({label:a,emoji:i,lockable:n})=>e("div",{className:"hub__reward"+(n?" hub__reward--lockable":""),...n?{onClick:E}:{},children:[l("span",{className:"hub__reward-art","aria-hidden":!0,children:i}),l("span",{className:"hub__reward-label",children:a})]},a))}),l("div",{className:"hub__rewards-progress",children:l(b,{percent:d,showInfo:!1,status:"success"})})]}),l(I,{marker:"inn-completed-medals",icon:l(r,{"aria-hidden":!0}),title:_,action:l("span",{className:"hub__box-count",children:p}),children:l("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>!e.locked).map(e=>l(j,{medal:e,onOpen:t},e.name))})}),l(I,{marker:"inn-awaiting-unlocking-medals",icon:l(r,{"aria-hidden":!0}),title:v,children:l("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>e.locked).map(e=>l(j,{medal:e,onOpen:t},e.name))})})]}),P="__all__",B=(e,a)=>{const l=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===l.length)return[P];const i=a.includes(P),n=l.includes(P);return n&&!i?[P]:n&&l.length>1?l.filter(e=>e!==P):l},V=({gameStats:n,categories:r,providers:d,stats:t,gameTitle:c="Oyun",winTitle:m="Kazanma",betTitle:o="Bahis",wageredTitle:u="Çevrim",statsTitle:_="İstatistikler",categoryPlaceholder:b="Tüm Kategoriler",providerPlaceholder:g="Tüm Sağlayıcılar",gamePlaceholder:N="Tüm Oyunlar",selectionLabel:f="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[x,L]=i(""),[C,S]=i([P]),[j,z]=i([P]),D=n.filter(e=>(!x||e.category===x)&&(C.includes(P)||C.includes(e.provider))&&(j.includes(P)||j.includes(e.game))),K=e=>k?.({category:x,providers:C,games:j,...e}),M=[{dataIndex:"game",key:"game",title:c,render:(a,i)=>e("span",{className:"hub__cell-game",children:[l("span",{className:"hub__cell-big",children:String(a)}),l("span",{className:"hub__cell-sub",children:i.category+" / "+i.provider})]})},{dataIndex:"win",key:"win",title:m,render:e=>l("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"bet",key:"bet",title:o,render:e=>l("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:e=>l("span",{className:"hub__cell-big hub__cell-cur",children:String(e)})}];return e(a,{children:[e("div",{className:"hub__filterbar",children:[e(p,{size:"x-large",placeholder:b,value:x,onChange:e=>{const a=e?String(e):"";L(a),K({category:a})},"aria-label":"Kategori",children:[l(T,{value:"",children:b}),r.map(e=>l(T,{value:e,children:"Casino"===e?y:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:g,"aria-label":"Sağlayıcı",value:C,label:C.includes(P)?void 0:f+" ("+C.length+")",onChange:e=>{const a=B(e,C);S(a),K({providers:a})},children:[l(T,{value:P,children:g}),d.map(e=>l(T,{value:e,children:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:N,"aria-label":"Oyun",value:j,label:j.includes(P)?void 0:f+" ("+j.length+")",onChange:e=>{const a=B(e,j);z(a),K({games:a})},children:[l(T,{value:P,children:N}),n.map(e=>l(T,{value:e.game,children:e.game},e.key))]})]}),l(I,{icon:l(s,{"aria-hidden":!0}),title:_,children:l(O,{stats:t})}),l("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:D.length>0?l(v,{columns:M,data:D,size:"medium",headerBg:!1}):e("div",{className:"hub__nodata",children:[l(h,{"aria-hidden":!0}),l("span",{className:"hub__empty-text",children:w})]})})]})};export{j as HubMedalButton,z as HubMedalDetail,H as HubMedals,K as HubProfileSummary,V as HubStatistics};
1
+ import{jsxs as e,jsx as a,Fragment as l}from"react/jsx-runtime";import{useState as i}from"react";import{User as n,Trophy as r,Medal as s,Crown as d,TrendingUp as t,Gamepad2 as c,Folder as h,FileQuestion as m,Info as o,ChevronRight as u}from"lucide-react";import _ from"../../button/index.js";import b from"../../progress/index.js";import p from"../../select/index.js";import v from"../../table/index.js";import{Avatar as g}from"../../avatar/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as f}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as y}from"../../hovercard/HoverCardContent.js";import{Sheet as w,SheetTrigger as k,SheetContent as x,SheetHeader as L,SheetTitle as C}from"../../dialog/Dialog.js";import{SelectItem as T}from"../../select/SelectItem.js";const S=({Icon:l})=>a("span",{className:"hub__medal-shape","aria-hidden":!0,children:e("span",{className:"hub__medal-hexwrap",children:[e("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[a("defs",{children:e("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[a("stop",{offset:"0",stopColor:"#ffd54d"}),a("stop",{offset:"0.55",stopColor:"#f1ab00"}),a("stop",{offset:"1",stopColor:"#d98e00"})]})}),a("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),a("span",{className:"hub__medal-glyph",children:a(l,{})})]})}),j=({medal:l,onOpen:i})=>e("button",{type:"button",className:"hub__medal"+(l.locked?" hub__medal--locked":""),onClick:()=>i(l),children:[a("span",{className:"hub__medal-visual",children:a(S,{Icon:l.Icon})}),e("span",{className:"hub__medal-bottom",children:[a("span",{className:"hub__medal-name",children:l.name}),a("span",{className:"hub__medal-countwrap",children:e("span",{className:"hub__medal-count",children:[a(n,{"aria-hidden":!0}),l.count]})})]})]}),z=({medal:l,durationLabel:i="Süre",quantityLabel:n="Miktar",earnersLabel:r="Hakeden Sayısı"})=>e("div",{className:"hub__medal-detail",children:[a("span",{className:"hub__medal-visual",children:a(S,{Icon:l.Icon})}),a("div",{className:"hub__medal-detail-name",children:l.name}),a("p",{className:"hub__medal-detail-desc",children:l.description}),e("dl",{className:"hub__medal-detail-rows",children:[e("div",{children:[a("dt",{children:i}),a("dd",{children:l.duration})]}),e("div",{children:[a("dt",{children:n}),a("dd",{children:l.quantity})]}),e("div",{children:[a("dt",{children:r}),a("dd",{children:l.count})]})]})]}),I=({marker:l,icon:i,title:n,titleExtra:r,action:s,children:d})=>e("section",{className:l?l+" hub__box":"hub__box",children:[e("div",{className:"inn-sub-page-header hub__box-head",children:[e("span",{className:"hub__box-title",children:[i,n,r]}),s]}),a("hr",{className:"hub__hairline"}),d]}),O=({stats:l})=>a("div",{className:"hub__stats",children:l.map((l,i)=>e("div",{className:"hub__stat",children:[a("div",{className:"hub__stat-label",children:l.label}),a("div",{className:"hub__stat-value",children:l.value})]},i))}),D=({label:l,onClick:i})=>e(_,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[l,a(u,{"aria-hidden":!0})]}),K=({user:i,vip:n,medals:r,stats:m,topSlots:o,onMedalOpen:u,onVipClub:p,onMedalsDetail:v,onStatsDetail:N,vipClubLabel:f="VIP Klübü",medalsTitle:y="Madalyalar",statsTitle:w="İstatistikler",topSlotsTitle:k="En Çok Oynadığınız Slot Oyunları",liveTitle:x="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:L="Detaylar",cevrimLabel:C="Çevrim",noDataLabel:T="Veri Yok"})=>e(l,{children:[e("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[i.avatar??a(g,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[a("div",{className:"hub__username",children:i.username}),null!=i.fullname&&a("div",{className:"hub__fullname",children:i.fullname})]})]}),e("section",{className:"inn-vip-level-summary hub__vip",children:[e("div",{className:"hub__vip-head",children:[e("div",{className:"hub__vip-meta",children:[a("div",{className:"inn-vip-level-title hub__vip-title",children:n.title}),a("span",{className:"hub__vip-dp",children:n.dp})]}),e(_,{size:"small",className:"hub__vip-btn",onClick:p,children:[a(d,{"aria-hidden":!0}),f]})]}),e("div",{className:"inn-vip-level-progress hub__vip-progress",children:[a(b,{percent:n.percent,showInfo:!1,status:"success"}),a("span",{className:"hub__vip-next",children:n.nextText})]})]}),a(I,{marker:"inn-medals-summary-box",icon:a(s,{"aria-hidden":!0}),title:y,action:a(D,{label:L,onClick:v}),children:a("div",{className:"inn-medals-summary hub__medals",children:r.slice(0,8).map(e=>a(j,{medal:e,onOpen:u},e.name))})}),a(I,{icon:a(t,{"aria-hidden":!0}),title:w,action:a(D,{label:L,onClick:N}),children:a(O,{stats:m})}),a(I,{marker:"inn-favorite-casino-games-summary-box",icon:a(c,{"aria-hidden":!0}),title:k,children:a("div",{className:"inn-favorite-casino-games-summary hub__games",children:o.map(l=>e("div",{className:"hub__game",children:[a("span",{className:"hub__game-art hub__game-art--"+l.art,"aria-hidden":!0,children:l.emoji}),e("div",{className:"hub__game-info",children:[a("div",{className:"hub__game-name",children:l.name}),e("div",{children:[a("div",{className:"hub__game-amount",children:l.amount}),a("div",{className:"hub__game-cur",children:C})]})]})]},l.name))})}),a(I,{marker:"inn-favorite-live-casino-games-summary-box",icon:a(c,{"aria-hidden":!0}),title:x,children:a("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(l=>e("div",{className:"hub__game hub__game--empty",children:[a(h,{"aria-hidden":!0}),a("span",{className:"hub__empty-text",children:T})]},l))})})]}),M=({tips:l,unitLabel:i="madalya:",winLabel:n="ödül kazan"})=>a("div",{className:"hub__reward-tips",children:l.map(([l,r],s)=>e("span",{className:"hub__reward-tip",children:[l," ",i," ",a("b",{children:r})," ",n]},s))}),Q=({tips:i,sheetTitle:n,unitLabel:r,winLabel:s})=>e(l,{children:[a("span",{className:"hub__reward-info hub__reward-info--hover",children:e(N,{children:[a(f,{children:a(o,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),a(y,{variant:"filled",children:a(M,{tips:i,unitLabel:r,winLabel:s})})]})}),a("span",{className:"hub__reward-info hub__reward-info--sheet",children:e(w,{children:[a(k,{asChild:!0,children:a("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof n?n:void 0,children:a(o,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e(x,{side:"bottom",children:[a(L,{children:a(C,{children:n})}),a(M,{tips:i,unitLabel:r,winLabel:s})]})]})})]}),E=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},H=({medals:i,rewardTiers:n,rewardTips:d,rewardPercent:t=10,onMedalOpen:c,rewardsTitle:h="Ödüller",rewardsSheetTitle:m="Ödül Detayları",rewardUnitLabel:o="madalya:",rewardWinLabel:u="ödül kazan",earnedTitle:_="Kazançlarınız",earnedCountText:p="2 / 20 Hakedildi",awaitingTitle:v="Kilidi Açılması Bekleyenler"})=>e(l,{children:[e(I,{icon:a(r,{"aria-hidden":!0}),title:h,titleExtra:a(Q,{tips:d,sheetTitle:m,unitLabel:o,winLabel:u}),children:[a("div",{className:"hub__rewards",children:n.map(({label:l,emoji:i,lockable:n})=>e("div",{className:"hub__reward"+(n?" hub__reward--lockable":""),...n?{onClick:E}:{},children:[a("span",{className:"hub__reward-art","aria-hidden":!0,children:i}),a("span",{className:"hub__reward-label",children:l})]},l))}),a("div",{className:"hub__rewards-progress",children:a(b,{percent:t,showInfo:!1,status:"success"})})]}),a(I,{marker:"inn-completed-medals",icon:a(s,{"aria-hidden":!0}),title:_,action:a("span",{className:"hub__box-count",children:p}),children:a("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>!e.locked).map(e=>a(j,{medal:e,onOpen:c},e.name))})}),a(I,{marker:"inn-awaiting-unlocking-medals",icon:a(s,{"aria-hidden":!0}),title:v,children:a("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>e.locked).map(e=>a(j,{medal:e,onOpen:c},e.name))})})]}),P="__all__",B=(e,a)=>{const l=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===l.length)return[P];const i=a.includes(P),n=l.includes(P);return n&&!i?[P]:n&&l.length>1?l.filter(e=>e!==P):l},V=({gameStats:n,categories:r,providers:s,stats:d,gameTitle:c="Oyun",winTitle:h="Kazanma",betTitle:o="Bahis",wageredTitle:u="Çevrim",statsTitle:_="İstatistikler",categoryPlaceholder:b="Tüm Kategoriler",providerPlaceholder:g="Tüm Sağlayıcılar",gamePlaceholder:N="Tüm Oyunlar",selectionLabel:f="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[x,L]=i(""),[C,S]=i([P]),[j,z]=i([P]),D=n.filter(e=>(!x||e.category===x)&&(C.includes(P)||C.includes(e.provider))&&(j.includes(P)||j.includes(e.game))),K=e=>k?.({category:x,providers:C,games:j,...e}),M=[{dataIndex:"game",key:"game",title:c,render:(l,i)=>e("span",{className:"hub__cell-game",children:[a("span",{className:"hub__cell-big",children:String(l)}),a("span",{className:"hub__cell-sub",children:i.category+" / "+i.provider})]})},{dataIndex:"win",key:"win",title:h,render:e=>a("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"bet",key:"bet",title:o,render:e=>a("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:e=>a("span",{className:"hub__cell-big hub__cell-cur",children:String(e)})}];return e(l,{children:[e("div",{className:"hub__filterbar",children:[e(p,{size:"x-large",placeholder:b,value:x,onChange:e=>{const a=e?String(e):"";L(a),K({category:a})},"aria-label":"Kategori",children:[a(T,{value:"",children:b}),r.map(e=>a(T,{value:e,children:"Casino"===e?y:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:g,"aria-label":"Sağlayıcı",value:C,label:C.includes(P)?void 0:f+" ("+C.length+")",onChange:e=>{const a=B(e,C);S(a),K({providers:a})},children:[a(T,{value:P,children:g}),s.map(e=>a(T,{value:e,children:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:N,"aria-label":"Oyun",value:j,label:j.includes(P)?void 0:f+" ("+j.length+")",onChange:e=>{const a=B(e,j);z(a),K({games:a})},children:[a(T,{value:P,children:N}),n.map(e=>a(T,{value:e.game,children:e.game},e.key))]})]}),a(I,{icon:a(t,{"aria-hidden":!0}),title:_,children:a(O,{stats:d})}),a("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:D.length>0?a(v,{columns:M,data:D,size:"medium",headerBg:!1}):e("div",{className:"hub__nodata",children:[a(m,{"aria-hidden":!0}),a("span",{className:"hub__empty-text",children:w})]})})]})};export{j as HubMedalButton,z as HubMedalDetail,H as HubMedals,K as HubProfileSummary,V as HubStatistics};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i,Fragment as t}from"react/jsx-runtime";import{useState as a}from"react";import{ImageOff as n,Clock as l}from"lucide-react";import s from"../../button/index.js";import r from"../../badge/index.js";import d from"../../alert/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as h}from"../../tooltip/TooltipContent.js";import{HubTable as o,HubCopyBtn as p,HubStatusBadge as u,HubDt as b}from"./table.js";import{AlertDescription as k}from"../../alert/Description.js";const _=({children:i})=>i?e(d,{type:"info",variant:"filled",children:e(k,{children:i})}):null,f=({start:t,end:a})=>i("span",{className:"hub__fsact-se",children:[e("span",{children:t}),e("span",{children:a})]}),y=({data:a,intro:n,onGames:r,marker:d={desktop:"inn-free-spin-activation-table",list:"inn-mobile-free-spin-activation-list",methods:"inn-mobile-free-spin-activation-list-items",item:"inn-mobile-freespin-activation-list-item"},idTitle:b="Id",brandTitle:k="Sağlayıcı Adı",datesTitle:y="Başlangıç / Bitiş",statusTitle:v="Durum",spinsTitle:T="Spin Sayısı",daysTitle:x="Geçerlilik",daysSuffix:N=" Gün",createdLabel:z="Oluşturulma Tarihi: ",viewGamesLabel:g="Oyunları Görüntüle"})=>{const I=[{key:"id",dataIndex:"key",title:b,width:44,render:(i,t)=>e(p,{value:t.key,compact:!0})},{key:"brand",dataIndex:"brand",title:k,maxWidth:460,render:(t,a)=>e("span",{className:"hub__pay-name hub__hist-nm",children:i("span",{className:"hub__bonus-name",children:[e("span",{className:"hub__bonus-title",children:a.brand}),i(c,{children:[e(m,{asChild:!0,children:e("i",{className:"hub__hist-creator","aria-label":z,children:e(l,{size:13})})}),e(h,{placement:"top",children:z+a.created})]})]})})},{key:"dates",dataIndex:"start",title:y,maxWidth:170,render:(i,t)=>e(f,{start:t.start,end:t.end})},{key:"status",dataIndex:"status",title:v,width:120,render:i=>e(u,{s:String(i)})},{key:"spins",dataIndex:"spins",title:T,width:90,render:i=>e("span",{className:"hub__fsact-num",children:String(i)})},{key:"days",dataIndex:"days",title:x,width:95,render:i=>e("span",{className:"hub__fsact-num",children:String(i)+N})},{key:"actions",dataIndex:"key",title:"",maxWidth:200,render:(i,t)=>e("span",{className:"hub__pay-actions",children:e(s,{variant:"default",size:"medium",onClick:()=>r(t),children:g})})}];return i(t,{children:[e(_,{children:n}),e(o,{columns:I,data:a,cellHeight:"84px",marker:d})]})},v=({name:t})=>i(c,{children:[e(m,{asChild:!0,children:e("span",{className:"hub__pay-name hub__hist-nm",children:e("span",{className:"hub__hist-name",children:t})})}),e(h,{placement:"top",children:t})]}),T={"Teslim Edildi":"success","Onay Bekliyor":"default",Reddedildi:"purple","Ulaşılamadı":"danger"},x=({s:i,tone:t=T})=>e(r,{variant:"default",color:t[i]??"default",size:"small",pill:!1,children:i}),N=({tickets:t})=>e("div",{className:"hub__tickets",children:t.map(t=>i("div",{className:"hub__ticket",children:[e("span",{children:t}),e(p,{value:t,compact:!0})]},t))}),z=({prizes:t,mainLabel:l="Asıl",reserveLabel:s="Yedek",emptyText:r="Bu listede bilet bulunmuyor.",reserveOrderLabel:d="Yedek Sırası:",ticketLabel:c="Bilet:",tone:m=T})=>{const[h,o]=a("main"),u=t.filter(e=>"reserve"===h?!!e.reserve:!e.reserve);return i("div",{className:"hub__prizes",children:[i("div",{className:"hub__prize-tabs",children:[e("button",{type:"button",className:"main"===h?"is-active":"",onClick:()=>o("main"),children:l}),e("button",{type:"button",className:"reserve"===h?"is-active":"",onClick:()=>o("reserve"),children:s})]}),0===u.length?e("div",{className:"hub__prize-empty",children:r}):e("div",{className:"hub__prize-list",children:u.map((t,a)=>i("div",{className:"hub__prize",children:[e("span",{className:"hub__prize-img",children:e(n,{size:22})}),i("div",{className:"hub__prize-body",children:[e("h4",{className:"hub__prize-title",children:t.name}),e("span",{children:e(x,{s:t.status,tone:m})}),t.reserve&&i("span",{className:"hub__prize-reserve",children:[e("b",{children:d})," ",(t.reserveOrder??0)+1]}),i("span",{className:"hub__prize-ticket",children:[e("b",{children:c}),e("span",{className:"hub__prize-code",children:t.ticket}),e(p,{value:t.ticket,compact:!0})]})]})]},t.ticket+"-"+a))})]})},g=(i,t,a,n,l,s)=>[{key:"id",dataIndex:"key",title:i,width:44,render:(i,t)=>e(p,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:t,maxWidth:460,render:(i,t)=>e(v,{name:t.name})},{key:"start",dataIndex:"start",title:a,width:130,render:i=>e(b,{v:String(i)})},{key:"end",dataIndex:"end",title:n,width:130,render:i=>e(b,{v:String(i)})},{key:"status",dataIndex:"status",title:l,width:150,render:i=>e(u,{s:String(i)})},{key:"tickets",dataIndex:"tickets",title:s,width:110,render:(i,t)=>e("span",{className:"hub__fsact-num",children:t.tickets.length})}],I={idTitle:"Id",nameTitle:"İsim",startTitle:"Başlangıç",endTitle:"Bitiş",statusTitle:"Durum",ticketsTitle:"Bilet Sayısı"},j=({data:a,intro:n,onTickets:l,onDeposit:r,marker:d={desktop:"inn-active-raffles-table",list:"inn-mobile-active-raffles-list",methods:"inn-mobile-active-raffles-list-items",item:"inn-mobile-active-raffles-list-item"},ticketsLabel:c="Biletlerim",depositLabel:m="Yatırım Yapın Kazanın",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:220,render:(i,t)=>e("span",{className:"hub__pay-actions hub__pay-actions--full",children:t.tickets.length>0?e(s,{variant:"default",size:"medium",onClick:()=>l(t),children:c}):e(s,{variant:"default",size:"medium",onClick:r,children:m})})}];return i(t,{children:[e(_,{children:n}),e(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})},S=({data:a,intro:n,onPrizes:l,onTickets:r,marker:d={desktop:"inn-joined-raffles-table",list:"inn-mobile-joined-raffles-list",methods:"inn-mobile-joined-raffles-list-items",item:"inn-mobile-joined-raffles-list-item"},prizesLabel:c="Ödüllerim",ticketsLabel:m="Biletlerim",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:320,render:(t,a)=>i("span",{className:"hub__pay-actions",children:[e(s,{variant:"default",size:"medium",disabled:!a.prizes||0===a.prizes.length,onClick:()=>l(a),children:c}),e(s,{variant:"default",size:"medium",disabled:0===a.tickets.length,onClick:()=>r(a),children:m})]})}];return i(t,{children:[e(_,{children:n}),e(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})};export{T as HUB_PRIZE_TONE,y as HubFreespinActivation,z as HubPrizesModal,j as HubRaffleActive,S as HubRaffleJoined,N as HubTicketsModal};
1
+ import{jsxs as e,Fragment as i,jsx as t}from"react/jsx-runtime";import{useState as a}from"react";import{ImageOff as n,Clock as l}from"lucide-react";import s from"../../button/index.js";import r from"../../badge/index.js";import d from"../../alert/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as h}from"../../tooltip/TooltipContent.js";import{HubTable as o,HubCopyBtn as p,HubStatusBadge as u,HubDt as b}from"./table.js";import{AlertDescription as k}from"../../alert/Description.js";const _=({children:e})=>e?t(d,{type:"info",variant:"filled",children:t(k,{children:e})}):null,f=({start:i,end:a})=>e("span",{className:"hub__fsact-se",children:[t("span",{children:i}),t("span",{children:a})]}),y=({data:a,intro:n,onGames:r,marker:d={desktop:"inn-free-spin-activation-table",list:"inn-mobile-free-spin-activation-list",methods:"inn-mobile-free-spin-activation-list-items",item:"inn-mobile-freespin-activation-list-item"},idTitle:b="Id",brandTitle:k="Sağlayıcı Adı",datesTitle:y="Başlangıç / Bitiş",statusTitle:v="Durum",spinsTitle:T="Spin Sayısı",daysTitle:x="Geçerlilik",daysSuffix:N=" Gün",createdLabel:z="Oluşturulma Tarihi: ",viewGamesLabel:g="Oyunları Görüntüle"})=>{const I=[{key:"id",dataIndex:"key",title:b,width:44,render:(e,i)=>t(p,{value:i.key,compact:!0})},{key:"brand",dataIndex:"brand",title:k,maxWidth:460,render:(i,a)=>t("span",{className:"hub__pay-name hub__hist-nm",children:e("span",{className:"hub__bonus-name",children:[t("span",{className:"hub__bonus-title",children:a.brand}),e(c,{children:[t(m,{asChild:!0,children:t("i",{className:"hub__hist-creator","aria-label":z,children:t(l,{size:13})})}),t(h,{placement:"top",children:z+a.created})]})]})})},{key:"dates",dataIndex:"start",title:y,maxWidth:170,render:(e,i)=>t(f,{start:i.start,end:i.end})},{key:"status",dataIndex:"status",title:v,width:120,render:e=>t(u,{s:String(e)})},{key:"spins",dataIndex:"spins",title:T,width:90,render:e=>t("span",{className:"hub__fsact-num",children:String(e)})},{key:"days",dataIndex:"days",title:x,width:95,render:e=>t("span",{className:"hub__fsact-num",children:String(e)+N})},{key:"actions",dataIndex:"key",title:"",maxWidth:200,render:(e,i)=>t("span",{className:"hub__pay-actions",children:t(s,{variant:"default",size:"medium",onClick:()=>r(i),children:g})})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:I,data:a,cellHeight:"84px",marker:d})]})},v=({name:i})=>e(c,{children:[t(m,{asChild:!0,children:t("span",{className:"hub__pay-name hub__hist-nm",children:t("span",{className:"hub__hist-name",children:i})})}),t(h,{placement:"top",children:i})]}),T={"Teslim Edildi":"success","Onay Bekliyor":"default",Reddedildi:"purple","Ulaşılamadı":"danger"},x=({s:e,tone:i=T})=>t(r,{variant:"default",color:i[e]??"default",size:"small",pill:!1,children:e}),N=({tickets:i})=>t("div",{className:"hub__tickets",children:i.map(i=>e("div",{className:"hub__ticket",children:[t("span",{children:i}),t(p,{value:i,compact:!0})]},i))}),z=({prizes:i,mainLabel:l="Asıl",reserveLabel:s="Yedek",emptyText:r="Bu listede bilet bulunmuyor.",reserveOrderLabel:d="Yedek Sırası:",ticketLabel:c="Bilet:",tone:m=T})=>{const[h,o]=a("main"),u=i.filter(e=>"reserve"===h?!!e.reserve:!e.reserve);return e("div",{className:"hub__prizes",children:[e("div",{className:"hub__prize-tabs",children:[t("button",{type:"button",className:"main"===h?"is-active":"",onClick:()=>o("main"),children:l}),t("button",{type:"button",className:"reserve"===h?"is-active":"",onClick:()=>o("reserve"),children:s})]}),0===u.length?t("div",{className:"hub__prize-empty",children:r}):t("div",{className:"hub__prize-list",children:u.map((i,a)=>e("div",{className:"hub__prize",children:[t("span",{className:"hub__prize-img",children:t(n,{size:22})}),e("div",{className:"hub__prize-body",children:[t("h4",{className:"hub__prize-title",children:i.name}),t("span",{children:t(x,{s:i.status,tone:m})}),i.reserve&&e("span",{className:"hub__prize-reserve",children:[t("b",{children:d})," ",(i.reserveOrder??0)+1]}),e("span",{className:"hub__prize-ticket",children:[t("b",{children:c}),t("span",{className:"hub__prize-code",children:i.ticket}),t(p,{value:i.ticket,compact:!0})]})]})]},i.ticket+"-"+a))})]})},g=(e,i,a,n,l,s)=>[{key:"id",dataIndex:"key",title:e,width:44,render:(e,i)=>t(p,{value:i.key,compact:!0})},{key:"name",dataIndex:"name",title:i,maxWidth:460,render:(e,i)=>t(v,{name:i.name})},{key:"start",dataIndex:"start",title:a,width:130,render:e=>t(b,{v:String(e)})},{key:"end",dataIndex:"end",title:n,width:130,render:e=>t(b,{v:String(e)})},{key:"status",dataIndex:"status",title:l,width:150,render:e=>t(u,{s:String(e)})},{key:"tickets",dataIndex:"tickets",title:s,width:110,render:(e,i)=>t("span",{className:"hub__fsact-num",children:i.tickets.length})}],I={idTitle:"Id",nameTitle:"İsim",startTitle:"Başlangıç",endTitle:"Bitiş",statusTitle:"Durum",ticketsTitle:"Bilet Sayısı"},j=({data:a,intro:n,onTickets:l,onDeposit:r,marker:d={desktop:"inn-active-raffles-table",list:"inn-mobile-active-raffles-list",methods:"inn-mobile-active-raffles-list-items",item:"inn-mobile-active-raffles-list-item"},ticketsLabel:c="Biletlerim",depositLabel:m="Yatırım Yapın Kazanın",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:220,render:(e,i)=>t("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.tickets.length>0?t(s,{variant:"default",size:"medium",onClick:()=>l(i),children:c}):t(s,{variant:"default",size:"medium",onClick:r,children:m})})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})},S=({data:a,intro:n,onPrizes:l,onTickets:r,marker:d={desktop:"inn-joined-raffles-table",list:"inn-mobile-joined-raffles-list",methods:"inn-mobile-joined-raffles-list-items",item:"inn-mobile-joined-raffles-list-item"},prizesLabel:c="Ödüllerim",ticketsLabel:m="Biletlerim",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:320,render:(i,a)=>e("span",{className:"hub__pay-actions",children:[t(s,{variant:"default",size:"medium",disabled:!a.prizes||0===a.prizes.length,onClick:()=>l(a),children:c}),t(s,{variant:"default",size:"medium",disabled:0===a.tickets.length,onClick:()=>r(a),children:m})]})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})};export{T as HUB_PRIZE_TONE,y as HubFreespinActivation,z as HubPrizesModal,j as HubRaffleActive,S as HubRaffleJoined,N as HubTicketsModal};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as a,jsx as i}from"react/jsx-runtime";import{Fragment as l}from"react";import r from"../../input/index.js";import d from"../../select/index.js";import n from"../../button/index.js";import s from"../../alert/index.js";import c from"../../checkbox/index.js";import{Avatar as h}from"../../avatar/index.js";import{AlertDescription as t}from"../../alert/Description.js";import{SelectItem as o}from"../../select/SelectItem.js";const u=({f:e})=>{const a="select"===e.kind?i(d,{size:"x-large",placeholder:e.placeholder,defaultValue:e.value,"aria-label":e.ariaLabel,children:e.options.map(e=>i(o,{value:e.value,children:e.label},e.value))}):e.locked?i(r,{size:"x-large",locked:!0,value:e.value,"aria-label":e.ariaLabel}):i(r,{size:"x-large",type:e.type,defaultValue:e.value,placeholder:e.placeholder,"aria-label":e.ariaLabel});return e.full?i("div",{style:{gridColumn:"1 / -1"},children:a}):a},m=({user:r,groups:d,saveLabel:s="Değişiklikleri Kaydet",onSave:c})=>e(a,{children:[e("div",{className:"inn-settings-personal-summary-box hub__profile hub__profile--user",children:[r.avatar??i(h,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[i("div",{className:"hub__username",children:r.username}),null!=r.fullname&&i("div",{className:"hub__fullname",children:r.fullname})]})]}),d.map((a,r)=>e(l,{children:[i("div",{className:"inn-sub-page-header hub__section",children:a.header}),i("div",{className:"hub__grid",children:a.fields.map((e,a)=>i(u,{f:e},a))})]},r)),i(n,{variant:"default",size:"large",className:"hub__save",onClick:c,children:s})]}),b=({currentHeader:l="Mevcut Şifreniz",newHeader:d="Yeni Şifreniz",currentPlaceholder:c="Mevcut Şifre",newPlaceholder:h="Yeni Şifre",confirmPlaceholder:o="Yeni Şifre (tekrar)",hint:u,submitLabel:m="Şifre Değiştir",disabled:b=!0,onSubmit:p})=>e(a,{children:[i("div",{className:"inn-sub-page-header hub__section",children:l}),i("div",{className:"hub__grid hub__grid--full",children:i(r,{size:"x-large",type:"password",placeholder:c,"aria-label":c})}),i("div",{className:"inn-sub-page-header hub__section",children:d}),e("div",{className:"hub__grid",children:[i(r,{size:"x-large",type:"password",placeholder:h,"aria-label":h}),i(r,{size:"x-large",type:"password",placeholder:o,"aria-label":o})]}),u&&i(s,{type:"info",variant:"filled",children:i(t,{children:u})}),i("hr",{className:"hub__divider"}),i("div",{className:"hub__actions",children:i(n,{variant:"default",size:"large",disabled:b,onClick:p,children:m})})]}),p=({intro:l,header:r="Bildirim Ayarları",prefs:d,onToggle:h,saveLabel:o="Ayarları Kaydet",onSave:u})=>e(a,{children:[l&&i(s,{type:"info",variant:"filled",children:i(t,{children:l})}),i("div",{className:"inn-sub-page-header hub__section",children:r}),i("div",{className:"hub__notify",children:d.map(e=>i("div",{className:"hub__notify-row",children:i(c,{checked:e.checked,onChange:a=>h?.(e.id,Boolean(a)),children:e.label})},e.id))}),i("hr",{className:"hub__divider"}),i("div",{className:"hub__actions",children:i(n,{variant:"default",size:"large",onClick:u,children:o})})]});export{b as HubChangePassword,p as HubNotificationPrefs,m as HubSettingsDetails};
1
+ import{jsxs as e,Fragment as a,jsx as l}from"react/jsx-runtime";import{Fragment as i}from"react";import r from"../../input/index.js";import n from"../../select/index.js";import d from"../../button/index.js";import s from"../../alert/index.js";import c from"../../badge/index.js";import t from"../../checkbox/index.js";import{Avatar as h}from"../../avatar/index.js";import{AlertDescription as o}from"../../alert/Description.js";import{SelectItem as u}from"../../select/SelectItem.js";const m=({f:e})=>{const a="select"===e.kind?l(n,{size:"x-large",placeholder:e.placeholder,defaultValue:e.value,"aria-label":e.ariaLabel,children:e.options.map(e=>l(u,{value:e.value,children:e.label},e.value))}):e.locked?l(r,{size:"x-large",locked:!0,value:e.value,"aria-label":e.ariaLabel}):l(r,{size:"x-large",type:e.type,defaultValue:e.value,placeholder:e.placeholder,"aria-label":e.ariaLabel});return e.full?l("div",{style:{gridColumn:"1 / -1"},children:a}):a},b=({user:r,groups:n,saveLabel:s="Değişiklikleri Kaydet",onSave:c})=>e(a,{children:[e("div",{className:"inn-settings-personal-summary-box hub__profile hub__profile--user",children:[r.avatar??l(h,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[l("div",{className:"hub__username",children:r.username}),null!=r.fullname&&l("div",{className:"hub__fullname",children:r.fullname})]})]}),n.map((a,r)=>e(i,{children:[l("div",{className:"inn-sub-page-header hub__section",children:a.header}),l("div",{className:"hub__grid",children:a.fields.map((e,a)=>l(m,{f:e},a))})]},r)),l(d,{variant:"default",size:"large",className:"hub__save",onClick:c,children:s})]}),_=({currentHeader:i="Mevcut Şifreniz",newHeader:n="Yeni Şifreniz",currentPlaceholder:c="Mevcut Şifre",newPlaceholder:t="Yeni Şifre",confirmPlaceholder:h="Yeni Şifre (tekrar)",hint:u,submitLabel:m="Şifre Değiştir",disabled:b=!0,onSubmit:_})=>e(a,{children:[l("div",{className:"inn-sub-page-header hub__section",children:i}),l("div",{className:"hub__grid hub__grid--full",children:l(r,{size:"x-large",type:"password",placeholder:c,"aria-label":c})}),l("div",{className:"inn-sub-page-header hub__section",children:n}),e("div",{className:"hub__grid",children:[l(r,{size:"x-large",type:"password",placeholder:t,"aria-label":t}),l(r,{size:"x-large",type:"password",placeholder:h,"aria-label":h})]}),u&&l(s,{type:"info",variant:"filled",children:l(o,{children:u})}),l("hr",{className:"hub__divider"}),l("div",{className:"hub__actions",children:l(d,{variant:"default",size:"large",disabled:b,onClick:_,children:m})})]}),p=({intro:i,header:r="Bildirim Ayarları",prefs:n,onToggle:c,saveLabel:h="Ayarları Kaydet",onSave:u})=>e(a,{children:[i&&l(s,{type:"info",variant:"filled",children:l(o,{children:i})}),l("div",{className:"inn-sub-page-header hub__section",children:r}),l("div",{className:"hub__notify",children:n.map(e=>l("div",{className:"hub__notify-row",children:l(t,{checked:e.checked,onChange:a=>c?.(e.id,Boolean(a)),children:e.label})},e.id))}),l("hr",{className:"hub__divider"}),l("div",{className:"hub__actions",children:l(d,{variant:"default",size:"large",onClick:u,children:h})})]}),v=({header:i,rows:r,note:n,onAction:s})=>e(a,{children:[null!=i&&l("div",{className:"inn-sub-page-header hub__section",children:i}),l("div",{className:"hub__security",children:r.map(a=>e("div",{className:"hub__security-row",children:[l("span",{className:"hub__security-label",children:a.label}),e("span",{className:"hub__security-value",children:[a.value,a.status?l(c,{variant:"default",color:a.status.tone??"default",size:"medium",pill:!1,children:a.status.label}):null]}),a.action?l(d,{variant:"solid",size:"medium",onClick:()=>s?.(a.id),children:a.action}):null]},a.id))}),null!=n&&l("p",{className:"hub__security-note",children:n})]});export{_ as HubChangePassword,p as HubNotificationPrefs,v as HubSecurity,b as HubSettingsDetails};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useRef as i}from"react";import{Copy as l,User as r}from"lucide-react";import n from"../../button/index.js";import s from"../../badge/index.js";import d from"../../table/index.js";import t from"../../result/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as o}from"../../tooltip/TooltipContent.js";import{useHubMobile as h}from"./platform.js";const u=["name","brand","provider","subject","game"],p=({columns:i,data:l,list:r,methods:n,item:s})=>{const d=i.find(a=>"id"===a.key||"token"===a.key),t=i.find(a=>u.includes(String(a.key)))||i.find(a=>a.maxWidth)||i[1],c=i.find(a=>"status"===a.key),m=i.find(a=>""===a.title),o=i.filter(a=>a!==d&&a!==t&&a!==c&&a!==m),h=(a,e,i)=>a.render?a.render(e[a.dataIndex],e,i):e[a.dataIndex];return a("div",{className:r?r+" hub__mlist":"hub__mlist",children:a("div",{className:n,style:{display:"contents"},children:l.map((i,l)=>e("div",{className:s?s+" hub__mcard":"hub__mcard",children:[e("div",{className:"hub__mcard-head",children:[e("span",{className:"hub__mcard-title",children:[d&&a("span",{className:"hub__mcard-id",children:h(d,i,l)}),t&&a("span",{className:"hub__mcard-name",children:h(t,i,l)})]}),c&&a("span",{className:"hub__mcard-status",children:h(c,i,l)})]}),o.length>0&&a("hr",{className:"hub__mcard-sep"}),o.length>0&&(()=>{const r=i.img,n=i.square,s=a("div",{className:"hub__mcard-body",children:o.map(r=>e("div",{className:"hub__mcard-row",children:[a("span",{className:"hub__mcard-label",children:"string"==typeof r.title?r.title:""}),a("span",{className:"hub__mcard-val",children:h(r,i,l)})]},String(r.key)))});return r?e("div",{className:"hub__mcard-media",children:[a("span",{className:"hub__mcard-img"+(n?" hub__mcard-img--square":""),style:{backgroundImage:r},"aria-hidden":!0}),s]}):s})(),m&&a("div",{className:"hub__mcard-foot",children:h(m,i,l)})]},l))})})},_=({columns:e,data:l,cellHeight:r,mobileColumns:n,marker:s})=>{const t=i(null);return h(t)?a(p,{columns:n??e,data:l,list:s?.list,methods:s?.methods,item:s?.item}):a("div",{ref:t,className:(s?.desktop?s.desktop+" ":"")+"hub__paybox hub__pay-table",children:a(d,{columns:e,data:l,cellHeight:r,headerBg:!1})})},b={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"},f=({s:e,tone:i=b})=>a(s,{variant:"default",color:i[e]??"default",size:"medium",pill:!1,children:e}),g=({value:i,compact:r,label:s="Kopyala"})=>e(c,{children:[a(m,{asChild:!0,children:a(n,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(r?" hub__copybtn--sm":""),"aria-label":s,onClick:()=>navigator.clipboard?.writeText(i),children:a(l,{size:r?10:12})})}),a(o,{placement:"top",children:s})]}),N=({name:i,desc:l,creator:n,creatorLabel:s="Oluşturan: "})=>e("span",{className:"hub__pay-name hub__hist-nm",children:[a("span",{className:"hub__hist-name",children:i}),l&&e("span",{className:"hub__pay-desc hub__hist-desc",children:[l,n&&e(c,{children:[a(m,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":s+n,children:a(r,{size:12})})}),a(o,{placement:"top",children:s+n})]})]})]}),y=({v:i})=>{const[l,r]=i.split(" ");return e("span",{className:"hub__hist-dt",children:[a("span",{children:l}),a("span",{children:r})]})},k=({title:e="ÇOK YAKINDA",description:i="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:l="🚧"})=>a(t,{className:"hub__soon",image:a("span",{className:"hub__soon-icon","aria-hidden":!0,children:l}),title:e,description:i});export{u as HUB_NAME_KEYS,b as HUB_STATUS_TONE,k as HubComingSoon,g as HubCopyBtn,y as HubDt,N as HubHistName,f as HubStatusBadge,_ as HubTable,_ as default,h as useHubMobile};
1
+ import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useRef as i}from"react";import{Copy as l,User as r}from"lucide-react";import n from"../../button/index.js";import s from"../../badge/index.js";import d from"../../table/index.js";import t from"../../result/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as o}from"../../tooltip/TooltipContent.js";import{useHubMobile as h}from"./platform.js";const u=["name","brand","provider","subject","game"],p=({columns:i,data:l,list:r,methods:n,item:s})=>{const d=i.find(a=>"id"===a.key||"token"===a.key),t=i.find(a=>u.includes(String(a.key)))||i.find(a=>a.maxWidth)||i[1],c=i.find(a=>"status"===a.key),m=i.find(a=>""===a.title),o=i.filter(a=>a!==d&&a!==t&&a!==c&&a!==m),h=(a,e,i)=>a.render?a.render(e[a.dataIndex],e,i):e[a.dataIndex];return a("div",{className:r?r+" hub__mlist":"hub__mlist",children:a("div",{className:n,style:{display:"contents"},children:l.map((i,l)=>e("div",{className:s?s+" hub__mcard":"hub__mcard",children:[e("div",{className:"hub__mcard-head",children:[e("span",{className:"hub__mcard-title",children:[d&&a("span",{className:"hub__mcard-id",children:h(d,i,l)}),t&&a("span",{className:"hub__mcard-name",children:h(t,i,l)})]}),c&&a("span",{className:"hub__mcard-status",children:h(c,i,l)})]}),o.length>0&&a("hr",{className:"hub__mcard-sep"}),o.length>0&&(()=>{const r=i.img,n=i.square,s=a("div",{className:"hub__mcard-body",children:o.map(r=>e("div",{className:"hub__mcard-row",children:[a("span",{className:"hub__mcard-label",children:"string"==typeof r.title?r.title:""}),a("span",{className:"hub__mcard-val",children:h(r,i,l)})]},String(r.key)))});return r?e("div",{className:"hub__mcard-media",children:[a("span",{className:"hub__mcard-img"+(n?" hub__mcard-img--square":""),style:{backgroundImage:r},"aria-hidden":!0}),s]}):s})(),m&&a("div",{className:"hub__mcard-foot",children:h(m,i,l)})]},l))})})},_=({columns:e,data:l,cellHeight:r,mobileColumns:n,marker:s})=>{const t=i(null);return h(t)?a(p,{columns:n??e,data:l,list:s?.list,methods:s?.methods,item:s?.item}):a("div",{ref:t,className:(s?.desktop?s.desktop+" ":"")+"hub__paybox hub__pay-table",children:a(d,{columns:e,data:l,cellHeight:r,headerBg:!1})})},b={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"},f=({s:e,tone:i=b})=>a(s,{variant:"default",color:i[e]??"default",size:"medium",pill:!1,children:e}),g=({value:i,compact:r,label:s="Kopyala"})=>e(c,{children:[a(m,{asChild:!0,children:a(n,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(r?" hub__copybtn--sm":""),"aria-label":s,onClick:()=>navigator.clipboard?.writeText(i),children:a(l,{size:r?10:12})})}),a(o,{placement:"top",children:s})]}),N=({name:i,desc:l,creator:n,creatorLabel:s="Oluşturan: "})=>e("span",{className:"hub__pay-name hub__hist-nm",children:[a("span",{className:"hub__hist-name",children:i}),l&&e("span",{className:"hub__pay-desc hub__hist-desc",children:[l,n&&e(c,{children:[a(m,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":s+n,children:a(r,{size:12})})}),a(o,{placement:"top",children:s+n})]})]})]}),y=({v:i})=>{const[l,r]=i.split(" ");return e("span",{className:"hub__hist-dt",children:[a("span",{children:l}),a("span",{children:r})]})},k=({title:e="ÇOK YAKINDA",description:i="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:l="🚧"})=>a(t,{className:"hub__soon",image:a("span",{className:"hub__soon-icon","aria-hidden":!0,children:l}),title:e,description:i});export{u as HUB_NAME_KEYS,b as HUB_STATUS_TONE,k as HubComingSoon,g as HubCopyBtn,y as HubDt,N as HubHistName,f as HubStatusBadge,_ as HubTable,h as useHubMobile};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createContext as t,useContext as a,useState as o,useEffect as n,useCallback as i,useRef as m,useMemo as c}from"react";import{ITDRouterContext as d}from"../router/context.js";import{ModalProvider as s}from"../modal/index.js";import{Toaster as l}from"../toast/index.js";import u from"./ITDThemeProvider.js";import{createTranslateFn as h,ITDLocaleContext as g}from"../locale/useITDLocale.js";import{FormDefaultsContext as f}from"./FormDefaultsContext.js";import{applyTouchMode as p}from"../helpers/device/touchDevice.js";const y=e=>"tr"===e?"DD/MM/YYYY":"en"===e?"MM/DD/YYYY":"DD/MM/YYYY",D=t({});D.displayName="ITDContext";const v=t=>{const v=Object.keys(a(D)).length>0,w=t.theme||("undefined"==typeof window?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[M,Y]=o(w),[T,j]=o(t.dateFormat||y(t.language)),[k,x]=o(t.language?t.language:"en"),[F,P]=o("en-US"),[E,L]=o(t.timeZone||"local"),[Z,b]=o(t.country??""),[I,N]=o(t.errorDisplay||"tooltip");n(()=>{t.theme&&Y(t.theme),t.language&&x(t.language),t.dateFormat&&j(t.dateFormat),t.timeZone&&L(t.timeZone),t.country&&b(t.country),t.errorDisplay&&N(t.errorDisplay)},[t.theme,t.language,t.dateFormat,t.timeZone,t.country,t.errorDisplay]),n(()=>{if(t.theme||"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{Y(e.matches?"dark":"light")};return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[t.theme]);const B=i(e=>{Y(e)},[]);n(()=>{if(v)return;const e=z.current?.ownerDocument;e&&(e.body?.setAttribute("data-theme",M),e.documentElement.setAttribute("data-theme",M))},[M,v]),n(()=>{const e=z.current?.ownerDocument??("undefined"!=typeof document?document:null);if(e)return p(e)},[]);const C=i(e=>{j(e)},[]),V=i(e=>{L(e)},[]),A=i(e=>{P(e)},[]),O=i(e=>{N(e)},[]),R=i(e=>{b(e)},[]),S=i(e=>{x(e),t.dateFormat||j(y(e))},[t.dateFormat]),U=c(()=>({theme:M,dateFormat:T,timeZone:E,language:k,locale:F,country:Z,errorDisplay:I,changeTheme:B,changeDateFormat:C,changeTimeZone:V,changeLanguage:S,changeLocale:A,changeCountry:R,changeErrorDisplay:O}),[M,T,E,k,F,Z,I,B,C,V,S,A,O]),q=c(()=>({defaultVariant:t.defaultVariant}),[t.defaultVariant]),z=m(null),G=c(()=>({t:h(k,t.messages),language:k}),[k,t.messages]);return e("div",{ref:z,className:"itd-provider","data-theme":M,"data-lang":k,children:e(u,{themeName:"dark"===M?"dark":"light",surfaceBase:t.surfaceBase,primaryBase:t.primaryBase,surfaceLadder:t.surfaceLadder,lightElevation:t.lightElevation,contrastMetric:t.contrastMetric,contrastMin:t.contrastMin,onPrimaryNudge:t.onPrimaryNudge,customTheme:t.customTheme,extensions:t.extensions,shadow:t.shadow,containerRef:z,children:e(f.Provider,{value:q,children:e(g.Provider,{value:G,children:e(D.Provider,{value:U,children:r(d.Provider,{value:t.router??null,children:[e(s,{children:t.children}),e(l,{theme:"dark"===M?"dark":"light",richColors:!0})]})})})})})})},w=()=>{const e=a(D);if(!e)throw new Error("useITD must be used within ITDProvider");return e};export{v as ITDProvider,D as default,w as useITD};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createContext as t,useContext as a,useState as o,useEffect as n,useCallback as i,useMemo as m,useRef as c}from"react";import{ITDRouterContext as d}from"../router/context.js";import{ModalProvider as s}from"../modal/index.js";import{Toaster as l}from"../toast/index.js";import u from"./ITDThemeProvider.js";import{createTranslateFn as h,ITDLocaleContext as g}from"../locale/useITDLocale.js";import{FormDefaultsContext as f}from"./FormDefaultsContext.js";import{applyTouchMode as p}from"../helpers/device/touchDevice.js";const y=e=>"tr"===e?"DD/MM/YYYY":"en"===e?"MM/DD/YYYY":"DD/MM/YYYY",D=t({});D.displayName="ITDContext";const v=t=>{const v=Object.keys(a(D)).length>0,w=t.theme||("undefined"==typeof window?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[M,Y]=o(w),[T,j]=o(t.dateFormat||y(t.language)),[k,x]=o(t.language?t.language:"en"),[F,P]=o("en-US"),[E,L]=o(t.timeZone||"local"),[Z,b]=o(t.country??""),[I,N]=o(t.errorDisplay||"tooltip");n(()=>{t.theme&&Y(t.theme),t.language&&x(t.language),t.dateFormat&&j(t.dateFormat),t.timeZone&&L(t.timeZone),t.country&&b(t.country),t.errorDisplay&&N(t.errorDisplay)},[t.theme,t.language,t.dateFormat,t.timeZone,t.country,t.errorDisplay]),n(()=>{if(t.theme||"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{Y(e.matches?"dark":"light")};return e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[t.theme]);const B=i(e=>{Y(e)},[]);n(()=>{if(v)return;const e=z.current?.ownerDocument;e&&(e.body?.setAttribute("data-theme",M),e.documentElement.setAttribute("data-theme",M))},[M,v]),n(()=>{const e=z.current?.ownerDocument??("undefined"!=typeof document?document:null);if(e)return p(e)},[]);const C=i(e=>{j(e)},[]),V=i(e=>{L(e)},[]),A=i(e=>{P(e)},[]),O=i(e=>{N(e)},[]),R=i(e=>{b(e)},[]),S=i(e=>{x(e),t.dateFormat||j(y(e))},[t.dateFormat]),U=m(()=>({theme:M,dateFormat:T,timeZone:E,language:k,locale:F,country:Z,errorDisplay:I,changeTheme:B,changeDateFormat:C,changeTimeZone:V,changeLanguage:S,changeLocale:A,changeCountry:R,changeErrorDisplay:O}),[M,T,E,k,F,Z,I,B,C,V,S,A,O]),q=m(()=>({defaultVariant:t.defaultVariant}),[t.defaultVariant]),z=c(null),G=m(()=>({t:h(k,t.messages),language:k}),[k,t.messages]);return e("div",{ref:z,className:"itd-provider","data-theme":M,"data-lang":k,children:e(u,{themeName:"dark"===M?"dark":"light",surfaceBase:t.surfaceBase,primaryBase:t.primaryBase,surfaceLadder:t.surfaceLadder,lightElevation:t.lightElevation,contrastMetric:t.contrastMetric,contrastMin:t.contrastMin,onPrimaryNudge:t.onPrimaryNudge,customTheme:t.customTheme,extensions:t.extensions,shadow:t.shadow,containerRef:z,children:e(f.Provider,{value:q,children:e(g.Provider,{value:G,children:e(D.Provider,{value:U,children:r(d.Provider,{value:t.router??null,children:[e(s,{children:t.children}),e(l,{theme:"dark"===M?"dark":"light",richColors:!0})]})})})})})})},w=()=>{const e=a(D);if(!e)throw new Error("useITD must be used within ITDProvider");return e};export{v as ITDProvider,D as default,w as useITD};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t}from"react";const n=r(null),o=({document:r,children:t})=>e(n.Provider,{value:r,children:t}),u=()=>{const e=t(n);return e||("undefined"==typeof document?null:document)};export{o as PortalDocumentProvider,n as default,u as usePortalDocument};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as n}from"react";const t=r(null),o=({document:r,children:n})=>e(t.Provider,{value:r,children:n}),c=()=>{const e=n(t);return e||("undefined"==typeof document?null:document)};export{o as PortalDocumentProvider,c as usePortalDocument};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useId as n,useRef as t,useState as o,useEffect as u,useCallback as i,useContext as c}from"react";import{initFocusModality as l}from"../utils/focusModality.js";import{TriggerTypes as s}from"../enums/enum.js";import{useFloatingTrigger as m}from"../hooks/useFloatingTrigger.js";import{DropdownMenuContext as d}from"../dropdown-menu/DropdownMenu.js";import{lockScroll as p}from"../primitives/scrollLock.js";import{usePortalDocument as f}from"../context/PortalDocumentContext.js";const a=({children:r,onOpenChange:c})=>{const a=n(),h=f()??("undefined"==typeof document?null:document),v=t(null),x=t(null),[j,C]=o(!1);u(()=>{h&&l(h)},[h]);const w=m({trigger:s.MANUAL,closeOnClickOutside:!0,open:j,onOpenChange:i(e=>{C(e),e||(v.current=null,x.current&&(x.current.remove(),x.current=null)),c?.(e)},[c])}),y=i((e,r)=>{x.current&&x.current.remove();const n=h??document,t=n.createElement("div");t.style.cssText=`position:fixed;top:${r}px;left:${e}px;width:0;height:0;pointer-events:none;`,n.body.appendChild(t),x.current=t,w.triggerRef.current=t,v.current=null,C(!0)},[w,h]);u(()=>()=>{x.current&&(x.current.remove(),x.current=null)},[]),u(()=>{if(j)return p(h??document)},[j,h]);const M=i(e=>{v.current=e?"last":"first",C(!0)},[]),O=i(e=>{e(),w.close()},[w]);return e(g.Provider,{value:{openAtPoint:y},children:e(d.Provider,{value:{id:a,trigger:w,pendingFocusRef:v,onItemSelect:O,openWithKeyboard:M},children:r})})};a.displayName="ContextMenu";const g=r(null);function h(e){const r=c(g);if(!r)throw new Error(`<${e}> must be used within <ContextMenu>.`);return r}export{a as ContextMenu,h as useContextMenuInternal};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useId as n,useRef as t,useState as o,useEffect as u,useCallback as i,useContext as c}from"react";import{initFocusModality as l}from"../utils/focusModality.js";import{TriggerTypes as s}from"../enums/enum.js";import{useFloatingTrigger as m}from"../hooks/useFloatingTrigger.js";import{DropdownMenuContext as d}from"../dropdown-menu/DropdownMenu.js";import p from"../primitives/scrollLock.js";import{usePortalDocument as f}from"../context/PortalDocumentContext.js";const a=({children:r,onOpenChange:c})=>{const a=n(),h=f()??("undefined"==typeof document?null:document),v=t(null),x=t(null),[j,C]=o(!1);u(()=>{h&&l(h)},[h]);const w=m({trigger:s.MANUAL,closeOnClickOutside:!0,open:j,onOpenChange:i(e=>{C(e),e||(v.current=null,x.current&&(x.current.remove(),x.current=null)),c?.(e)},[c])}),y=i((e,r)=>{x.current&&x.current.remove();const n=h??document,t=n.createElement("div");t.style.cssText=`position:fixed;top:${r}px;left:${e}px;width:0;height:0;pointer-events:none;`,n.body.appendChild(t),x.current=t,w.triggerRef.current=t,v.current=null,C(!0)},[w,h]);u(()=>()=>{x.current&&(x.current.remove(),x.current=null)},[]),u(()=>{if(j)return p(h??document)},[j,h]);const M=i(e=>{v.current=e?"last":"first",C(!0)},[]),O=i(e=>{e(),w.close()},[w]);return e(g.Provider,{value:{openAtPoint:y},children:e(d.Provider,{value:{id:a,trigger:w,pendingFocusRef:v,onItemSelect:O,openWithKeyboard:M},children:r})})};a.displayName="ContextMenu";const g=r(null);function h(e){const r=c(g);if(!r)throw new Error(`<${e}> must be used within <ContextMenu>.`);return r}export{a as ContextMenu,h as useContextMenuInternal};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createContext as o,useState as i,useId as n,isValidElement as l,useContext as s,useRef as a,useEffect as r}from"react";import{createPortal as d}from"react-dom";import{CSSTransition as c}from"react-transition-group";import{Drawer as u}from"../_bundled/vaul/dist/index.js";import{X as p}from"lucide-react";import{useFocusTrap as m}from"../hooks/useFocusTrap.js";import h from"../hooks/useOnESCKeyDown.js";import b from"../hooks/useOnClickOutside.js";import v from"../hooks/useMediaQuery.js";import{lockScroll as C}from"../primitives/scrollLock.js";import{dismissTopOverlayLayer as g}from"../primitives/overlayStack.js";import{cn as f}from"../utils/cn.js";import{Slot as y}from"../primitives/Slot.js";import N from"../button/index.js";import{usePortalDocument as O}from"../context/PortalDocumentContext.js";const k=o(null),D=()=>{const e=s(k);if(!e)throw new Error("Dialog sub-components must be used inside a <Dialog> parent.");return e},w=({open:t,defaultOpen:o=!1,onOpenChange:l,children:s})=>{const[a,r]=i(o),d=void 0!==t,c=d?t:a,u=n(),p=n(),m=n(),[h,b]=i(!1);return e(k.Provider,{value:{open:c,setOpen:e=>{d||r(e),l?.(e)},titleId:u,descriptionId:p,contentId:m,hasDescription:h,setHasDescription:b},children:s})},I=({asChild:t,onClick:o,children:i,...n})=>{const{open:s,setOpen:a,contentId:r}=D(),d={...n,onClick:e=>{o?.(e),e.defaultPrevented||a(!0)},"aria-haspopup":"dialog","aria-expanded":s,"aria-controls":r};return t?l(i)?e(y,{...d,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogTrigger]: When `asChild` is set, children must be a single React element, e.g. <DialogTrigger asChild><Button>Open</Button></DialogTrigger>."),null):e("button",{type:"button",...d,children:i})},E=t=>{const{side:o="center",responsive:i=!1,mobileBreakpoint:n=768}=t,l=O(),s=v(`(max-width: ${n-1}px)`,l?.defaultView??null),a=i?s?"bottom":"center":o;return"center"===a?e(j,{...t}):e(x,{...t,side:a})},j=({className:o,children:i,showClose:n=!0,closeAriaLabel:l="Close",closeOnEscape:s=!0,closeOnOutsideClick:u=!0,onEscapeKeyDown:v,onPointerDownOutside:g,responsive:y=!1,side:N,mobileBreakpoint:k,handle:w,...I})=>{const{open:E,setOpen:j,titleId:x,descriptionId:B,contentId:A,hasDescription:P}=D(),R=a(null),S=a(null);m({isActive:E,containerRef:R,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const F=O();return h(()=>{E&&(v?.(),s&&j(!1))},R,{enabled:E}),b(R,()=>{E&&(g?.(),u&&j(!1))},{enabled:E}),r(()=>{if(E&&F)return C(F)},[E,F]),F?d(e(c,{in:E,timeout:200,classNames:"itd-dialog",nodeRef:S,mountOnEnter:!0,unmountOnExit:!0,appear:!0,children:t("div",{ref:S,className:"itd-dialog-portal",children:[e("div",{className:"itd-dialog-overlay","aria-hidden":"true"}),t("div",{ref:R,id:A,role:"dialog","aria-modal":"true","aria-labelledby":x,"aria-describedby":P?B:void 0,tabIndex:-1,"data-responsive":y?"":void 0,...I,className:f("itd-dialog-content",o),children:[n&&e("button",{type:"button",className:"itd-dialog-close","aria-label":l,onClick:()=>j(!1),children:e(p,{size:16,strokeWidth:2})}),i]})]})}),F.body):null},x=({className:o,children:i,showClose:n=!0,closeAriaLabel:l="Close",side:s="bottom",handle:d=!0,closeOnEscape:c=!0,closeOnOutsideClick:m=!0,onEscapeKeyDown:b,onPointerDownOutside:v,responsive:y,mobileBreakpoint:N,...k})=>{const{open:w,setOpen:I,titleId:E,descriptionId:j,contentId:x,hasDescription:B}=D(),A=O(),P=a(null),R="undefined"!=typeof document?document:null,S=!!A&&A!==R;r(()=>{if(w&&S&&A)return C(A)},[w,S,A]);const F=a(null);if(F.current=P.current??A?.body??null,h(()=>{w&&(b?.(),c&&I(!1))},F,{enabled:w}),!A)return null;const K="center"===s?"bottom":s,T=()=>{v?.(),m&&I(!1)};return e(u.Root,{open:w,onOpenChange:I,direction:K,dismissible:m,modal:!S,noBodyStyles:S,repositionInputs:!S,children:t(u.Portal,{container:A.body,children:[S?e("div",{className:"itd-dialog-overlay itd-sheet-overlay","aria-hidden":"true",onClick:T}):e(u.Overlay,{className:"itd-dialog-overlay itd-sheet-overlay",onClick:T}),t(u.Content,{ref:P,id:x,"aria-labelledby":E,"aria-describedby":B?j:void 0,...k,"data-side":K,className:f("itd-sheet-content",o),onEscapeKeyDown:e=>{e.preventDefault(),g(P.current,e)},children:["bottom"===K&&d&&e(u.Handle,{className:"itd-sheet-handle"}),n&&e("button",{type:"button",className:"itd-dialog-close","aria-label":l,onClick:()=>I(!1),children:e(p,{size:16,strokeWidth:2})}),e("div",{className:"itd-sheet-body",children:i})]})]})})},B=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:f("itd-dialog-header",t)}),A=({className:t,...o})=>{const{titleId:i}=D();return e("h2",{id:i,...o,className:f("itd-dialog-title",t)})},P=({className:t,...o})=>{const{descriptionId:i,setHasDescription:n}=D();return r(()=>(n(!0),()=>n(!1)),[n]),e("p",{id:i,...o,className:f("itd-dialog-description",t)})},R=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:f("itd-dialog-footer",t)}),S=({asChild:t,onClick:o,children:i,...n})=>{const{setOpen:s}=D(),a={...n,onClick:e=>{o?.(e),e.defaultPrevented||s(!1)}};return t?l(i)?e(y,{...a,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogClose]: When `asChild` is set, children must be a single React element, e.g. <DialogClose asChild><Button>Cancel</Button></DialogClose>."),null):e("button",{type:"button",...a,children:i})},F=w,K=I,T=({className:t,...o})=>e(E,{showClose:!1,closeOnOutsideClick:!1,className:f("itd-alert-dialog-content",t),...o});T.displayName="AlertDialogContent";const W=B,H=A,L=P,V=R,_=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(N,{type:"button",variant:"outline",...i,children:t})});_.displayName="AlertDialogCancel";const z=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(N,{type:"button",...i,children:t})});z.displayName="AlertDialogAction";const M=w,Q=I,$=B,q=A,G=P,J=R,U=S,X=({side:t="bottom",...o})=>e(E,{side:t,...o});X.displayName="SheetContent";export{F as AlertDialog,z as AlertDialogAction,_ as AlertDialogCancel,T as AlertDialogContent,L as AlertDialogDescription,V as AlertDialogFooter,W as AlertDialogHeader,H as AlertDialogTitle,K as AlertDialogTrigger,w as Dialog,S as DialogClose,E as DialogContent,P as DialogDescription,R as DialogFooter,B as DialogHeader,A as DialogTitle,I as DialogTrigger,M as Sheet,U as SheetClose,X as SheetContent,G as SheetDescription,J as SheetFooter,$ as SheetHeader,q as SheetTitle,Q as SheetTrigger};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createContext as o,useState as i,useId as n,isValidElement as s,useContext as l,useRef as r,useEffect as a,useMemo as d}from"react";import{createPortal as c}from"react-dom";import{CSSTransition as u}from"react-transition-group";import{Drawer as p}from"../_bundled/vaul/dist/index.js";import{X as m}from"lucide-react";import{useFocusTrap as h}from"../hooks/useFocusTrap.js";import b from"../hooks/useOnESCKeyDown.js";import C from"../hooks/useOnClickOutside.js";import v from"../hooks/useMediaQuery.js";import g from"../primitives/scrollLock.js";import{dismissTopOverlayLayer as f}from"../primitives/overlayStack.js";import{cn as y}from"../utils/cn.js";import{Slot as N}from"../primitives/Slot.js";import O from"../button/index.js";import{usePortalDocument as k}from"../context/PortalDocumentContext.js";const D=o(null),w=()=>{const e=l(D);if(!e)throw new Error("Dialog sub-components must be used inside a <Dialog> parent.");return e},I=({open:t,defaultOpen:o=!1,onOpenChange:s,children:l})=>{const[r,a]=i(o),d=void 0!==t,c=d?t:r,u=n(),p=n(),m=n(),[h,b]=i(!1);return e(D.Provider,{value:{open:c,setOpen:e=>{d||a(e),s?.(e)},titleId:u,descriptionId:p,contentId:m,hasDescription:h,setHasDescription:b},children:l})},E=({asChild:t,onClick:o,children:i,...n})=>{const{open:l,setOpen:r,contentId:a}=w(),d={...n,onClick:e=>{o?.(e),e.defaultPrevented||r(!0)},"aria-haspopup":"dialog","aria-expanded":l,"aria-controls":a};return t?s(i)?e(N,{...d,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogTrigger]: When `asChild` is set, children must be a single React element, e.g. <DialogTrigger asChild><Button>Open</Button></DialogTrigger>."),null):e("button",{type:"button",...d,children:i})},j=t=>{const{side:o="center",responsive:i=!1,mobileBreakpoint:n=768}=t,s=k(),l=v(`(max-width: ${n-1}px)`,s?.defaultView??null),r=i?l?"bottom":"center":o;return"center"===r?e(x,{...t}):e(A,{...t,side:r})},x=({className:o,children:i,showClose:n=!0,closeAriaLabel:s="Close",closeOnEscape:l=!0,closeOnOutsideClick:d=!0,onEscapeKeyDown:p,onPointerDownOutside:v,responsive:f=!1,side:N,mobileBreakpoint:O,handle:D,...I})=>{const{open:E,setOpen:j,titleId:x,descriptionId:A,contentId:B,hasDescription:F}=w(),P=r(null),R=r(null);h({isActive:E,containerRef:P,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const S=k();return b(()=>{E&&(p?.(),l&&j(!1))},P,{enabled:E}),C(P,()=>{E&&(v?.(),d&&j(!1))},{enabled:E}),a(()=>{if(E&&S)return g(S)},[E,S]),S?c(e(u,{in:E,timeout:200,classNames:"itd-dialog",nodeRef:R,mountOnEnter:!0,unmountOnExit:!0,appear:!0,children:t("div",{ref:R,className:"itd-dialog-portal",children:[e("div",{className:"itd-dialog-overlay","aria-hidden":"true"}),t("div",{ref:P,id:B,role:"dialog","aria-modal":"true","aria-labelledby":x,"aria-describedby":F?A:void 0,tabIndex:-1,"data-responsive":f?"":void 0,...I,className:y("itd-dialog-content",o),children:[n&&e("button",{type:"button",className:"itd-dialog-close","aria-label":s,onClick:()=>j(!1),children:e(m,{size:16,strokeWidth:2})}),i]})]})}),S.body):null},A=({className:o,children:n,showClose:s=!0,closeAriaLabel:l="Close",side:c="bottom",handle:u=!0,closeOnEscape:C=!0,closeOnOutsideClick:v=!0,onEscapeKeyDown:N,onPointerDownOutside:O,responsive:D,mobileBreakpoint:I,...E})=>{const{open:j,setOpen:x,titleId:A,descriptionId:B,contentId:F,hasDescription:P}=w(),R=k(),S=r(null),K="undefined"!=typeof document?document:null,T=!!R&&R!==K;a(()=>{if(j&&R)return g(R)},[j,R]);const[W,H]=i(null),L=d(()=>({current:W}),[W]);h({isActive:j,containerRef:L,trapFocusOutside:!0,autoFocus:!0,restoreFocus:!0});const V=r(null);if(V.current=S.current??R?.body??null,b(()=>{j&&(N?.(),C&&x(!1))},V,{enabled:j}),!R)return null;const _="center"===c?"bottom":c;return e(p.Root,{open:j,onOpenChange:x,direction:_,dismissible:v,modal:!1,noBodyStyles:!0,repositionInputs:!T,children:t(p.Portal,{container:R.body,children:[e("div",{className:"itd-dialog-overlay itd-sheet-overlay","aria-hidden":"true",onClick:()=>{O?.(),v&&x(!1)}}),t(p.Content,{ref:e=>{S.current=e,H(e)},id:F,"aria-labelledby":A,"aria-describedby":P?B:void 0,...E,"data-side":_,className:y("itd-sheet-content",o),onEscapeKeyDown:e=>{e.preventDefault(),f(S.current,e)},children:["bottom"===_&&u&&e(p.Handle,{className:"itd-sheet-handle"}),s&&e("button",{type:"button",className:"itd-dialog-close","aria-label":l,onClick:()=>x(!1),children:e(m,{size:16,strokeWidth:2})}),e("div",{className:"itd-sheet-body",children:n})]})]})})},B=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:y("itd-dialog-header",t)}),F=({className:t,...o})=>{const{titleId:i}=w();return e("h2",{id:i,...o,className:y("itd-dialog-title",t)})},P=({className:t,...o})=>{const{descriptionId:i,setHasDescription:n}=w();return a(()=>(n(!0),()=>n(!1)),[n]),e("p",{id:i,...o,className:y("itd-dialog-description",t)})},R=({className:t,variant:o="plain",...i})=>e("div",{...i,"data-variant":o,className:y("itd-dialog-footer",t)}),S=({asChild:t,onClick:o,children:i,...n})=>{const{setOpen:l}=w(),r={...n,onClick:e=>{o?.(e),e.defaultPrevented||l(!1)}};return t?s(i)?e(N,{...r,children:i}):("production"!==process.env.NODE_ENV&&console.warn("[DialogClose]: When `asChild` is set, children must be a single React element, e.g. <DialogClose asChild><Button>Cancel</Button></DialogClose>."),null):e("button",{type:"button",...r,children:i})},K=I,T=E,W=({className:t,...o})=>e(j,{showClose:!1,closeOnOutsideClick:!1,className:y("itd-alert-dialog-content",t),...o});W.displayName="AlertDialogContent";const H=B,L=F,V=P,_=R,z=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(O,{type:"button",variant:"outline",...i,children:t})});z.displayName="AlertDialogCancel";const M=({children:t,onClick:o,...i})=>e(S,{asChild:!0,onClick:o??void 0,children:e(O,{type:"button",...i,children:t})});M.displayName="AlertDialogAction";const Q=I,$=E,q=B,G=F,J=P,U=R,X=S,Y=({side:t="bottom",...o})=>e(j,{side:t,...o});Y.displayName="SheetContent";export{K as AlertDialog,M as AlertDialogAction,z as AlertDialogCancel,W as AlertDialogContent,V as AlertDialogDescription,_ as AlertDialogFooter,H as AlertDialogHeader,L as AlertDialogTitle,T as AlertDialogTrigger,I as Dialog,S as DialogClose,j as DialogContent,P as DialogDescription,R as DialogFooter,B as DialogHeader,F as DialogTitle,E as DialogTrigger,Q as Sheet,X as SheetClose,Y as SheetContent,J as SheetDescription,U as SheetFooter,q as SheetHeader,G as SheetTitle,$ as SheetTrigger};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";const o=()=>t("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M11.5 3.5L5.5 9.5L2.5 6.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});export{o as CheckIcon,o as default};
1
+ import{jsx as o}from"react/jsx-runtime";const r=()=>o("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{d:"M11.5 3.5L5.5 9.5L2.5 6.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})});export{r as CheckIcon};
@@ -1 +1 @@
1
- import{Children as e,isValidElement as n,cloneElement as r}from"react";const t=new Set(["DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuSubTrigger"]);function o(u,d){return e.map(u,e=>{if(!n(e))return e;if(function(e){return t.has(e.type?.displayName)}(e)){const n=d.idx++;return e.props.disabled&&d.disabledSet.add(n),r(e,{_itemId:`${d.menuId}-item-${n}`})}if(function(e){return"DropdownMenuRadioGroup"===e.type?.displayName}(e)||function(e){return"DropdownMenuSub"===e.type?.displayName}(e)){const n=o(e.props.children,d);return r(e,{},n)}return e})}export{o as default,o as processChildren};
1
+ import{Children as e,isValidElement as n,cloneElement as r}from"react";const o=new Set(["DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuSubTrigger"]);function t(u,d){return e.map(u,e=>{if(!n(e))return e;if(function(e){return o.has(e.type?.displayName)}(e)){const n=d.idx++;return e.props.disabled&&d.disabledSet.add(n),r(e,{_itemId:`${d.menuId}-item-${n}`})}if(function(e){return"DropdownMenuRadioGroup"===e.type?.displayName}(e)||function(e){return"DropdownMenuSub"===e.type?.displayName}(e)){const n=t(e.props.children,d);return r(e,{},n)}return e})}export{t as processChildren};
@@ -1 +1 @@
1
- import{useState as e,useCallback as t}from"react";import{useMenuItemContext as o}from"./MenuItemContext.js";const n=({disabled:n,className:r,itemId:i,componentName:a})=>{const{onItemSelect:s,contentInnerRef:d,closeOpenSubs:c,isPointerInGraceArea:m}=o(a),[l,u]=e(!1),p=t(e=>{"mouse"!==e.pointerType||n||m()||(c(),e.currentTarget.focus({preventScroll:!0}))},[n,c,m]),v=t(e=>{"mouse"===e.pointerType&&(m()||d.current?.focus({preventScroll:!0}))},[d,m]);return{onItemSelect:s,isFocused:l,itemProps:{type:"button",id:i,tabIndex:-1,className:`itd-dropdown-menu-item ${r}`.trim(),"data-highlighted":l?"":void 0,"data-disabled":n?"":void 0,"aria-disabled":n||void 0,onPointerMove:p,onPointerLeave:v,onFocus:()=>u(!0),onBlur:()=>u(!1)}}};export{n as default,n as useMenuItemChrome};
1
+ import{useState as e,useCallback as o}from"react";import{useMenuItemContext as t}from"./MenuItemContext.js";const n=({disabled:n,className:r,itemId:i,componentName:s})=>{const{onItemSelect:a,contentInnerRef:c,closeOpenSubs:d,isPointerInGraceArea:m}=t(s),[l,p]=e(!1),u=o(e=>{"mouse"!==e.pointerType||n||m()||(d(),e.currentTarget.focus({preventScroll:!0}))},[n,d,m]),v=o(e=>{"mouse"===e.pointerType&&(m()||c.current?.focus({preventScroll:!0}))},[c,m]);return{onItemSelect:a,isFocused:l,itemProps:{type:"button",id:i,tabIndex:-1,className:`itd-dropdown-menu-item ${r}`.trim(),"data-highlighted":l?"":void 0,"data-disabled":n?"":void 0,"aria-disabled":n||void 0,onPointerMove:u,onPointerLeave:v,onFocus:()=>p(!0),onBlur:()=>p(!1)}}};export{n as useMenuItemChrome};
@@ -1 +1 @@
1
- import{useRef as e,useCallback as r}from"react";import{usePointerGraceArea as t}from"./usePointerGraceArea.js";const n=n=>{const o=e(new Set),a=r(e=>{o.current.add(e)},[]),s=r(e=>{o.current.delete(e)},[]),u=r(e=>{o.current.forEach(r=>{r!==e&&r()})},[]),c=e(new Set),{setGraceArea:i,updatePointer:l,isPointerInGraceArea:d}=t(n),p=r(e=>{c.current.add(e)},[]),S=r(e=>{c.current.delete(e),i(null)},[i]),b=r(e=>{"mouse"===e.pointerType&&l(e.clientX,e.clientY)},[l]);return{registerSubClose:a,unregisterSubClose:s,closeOpenSubs:u,registerOpenSubContent:p,unregisterOpenSubContent:S,isPointerInGraceArea:d,setGraceArea:i,handleContentPointerMove:b}};export{n as default,n as useSubMenuRegistry};
1
+ import{useRef as e,useCallback as r}from"react";import{usePointerGraceArea as t}from"./usePointerGraceArea.js";const n=n=>{const o=e(new Set),c=r(e=>{o.current.add(e)},[]),s=r(e=>{o.current.delete(e)},[]),u=r(e=>{o.current.forEach(r=>{r!==e&&r()})},[]),a=e(new Set),{setGraceArea:i,updatePointer:l,isPointerInGraceArea:p}=t(n),d=r(e=>{a.current.add(e)},[]),S=r(e=>{a.current.delete(e),i(null)},[i]),b=r(e=>{"mouse"===e.pointerType&&l(e.clientX,e.clientY)},[l]);return{registerSubClose:c,unregisterSubClose:s,closeOpenSubs:u,registerOpenSubContent:d,unregisterOpenSubContent:S,isPointerInGraceArea:p,setGraceArea:i,handleContentPointerMove:b}};export{n as useSubMenuRegistry};