PageSourceSearch

https://turkeykala.com/_next/static/chunks/0anw8urv31p0c.js

js turkeykala.com collected 2026-09-24 14:19:45 UTC 34,318 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,267177,e=>{"use strict";let t=(0,e.i(33550).default)("outline","chevron-left","ChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]);e.s(["IconChevronLeft",0,t],267177)},237041,e=>{"use strict";let t=(0,e.i(33550).default)("outline","crown","Crown",[["path",{d:"M12 6l4 6l5 -4l-2 10h-14l-2 -10l5 4z",key:"svg-0"}]]);e.s(["IconCrown",0,t],237041)},856637,e=>{"use strict";let t=(0,e.i(33550).default)("outline","file","File",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}]]);e.s(["IconFile",0,t],856637)},258425,e=>{"use strict";let t=(0,e.i(33550).default)("outline","file-invoice","FileInvoice",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 7l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M13 17l2 0",key:"svg-4"}]]);e.s(["IconFileInvoice",0,t],258425)},263581,e=>{"use strict";let t=(0,e.i(33550).default)("outline","link","Link",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]);e.s(["IconLink",0,t],263581)},547160,e=>{"use strict";let t=(0,e.i(33550).default)("outline","package","Package",[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}],["path",{d:"M16 5.25l-8 4.5",key:"svg-4"}]]);e.s(["IconPackage",0,t],547160)},913067,e=>{"use strict";let t=(0,e.i(33550).default)("outline","rosette","Rosette",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}]]);e.s(["IconRosette",0,t],913067)},848719,e=>{"use strict";let t=(0,e.i(33550).default)("outline","search","Search",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);e.s(["IconSearch",0,t],848719)},971940,e=>{"use strict";let t=(0,e.i(33550).default)("outline","target-arrow","TargetArrow",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 7a5 5 0 1 0 5 5",key:"svg-1"}],["path",{d:"M13 3.055a9 9 0 1 0 7.941 7.945",key:"svg-2"}],["path",{d:"M15 6v3h3l3 -3h-3v-3z",key:"svg-3"}],["path",{d:"M15 9l-3 3",key:"svg-4"}]]);e.s(["IconTargetArrow",0,t],971940)},547410,e=>{"use strict";let t=(0,e.i(33550).default)("outline","users","Users",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);e.s(["IconUsers",0,t],547410)},941712,e=>{"use strict";var t=e.i(843476),s=e.i(848719),a=e.i(856637),i=e.i(33550);let l=(0,i.default)("outline","chart-bar","ChartBar",[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]]);var r=e.i(547410);let n=(0,i.default)("outline","settings","Settings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);var o=e.i(975157),c=e.i(519455);let d={search:(0,t.jsx)(s.IconSearch,{className:"w-full h-full text-[var(--text-muted)]"}),files:(0,t.jsx)(a.IconFile,{className:"w-full h-full text-[var(--text-muted)]"}),data:(0,t.jsx)(l,{className:"w-full h-full text-[var(--text-muted)]"}),users:(0,t.jsx)(r.IconUsers,{className:"w-full h-full text-[var(--text-muted)]"}),settings:(0,t.jsx)(n,{className:"w-full h-full text-[var(--text-muted)]"}),custom:null},u={sm:{container:"p-6",icon:"w-12 h-12",title:"text-lg font-semibold",description:"text-sm",spacing:"gap-4"},md:{container:"p-8",icon:"w-16 h-16",title:"text-xl font-semibold",description:"text-base",spacing:"gap-5"},lg:{container:"p-12",icon:"w-20 h-20",title:"text-2xl font-semibold",description:"text-lg",spacing:"gap-6"}};e.s(["default",0,function({icon:e,title:s,description:a,action:i,secondaryAction:l,className:r,size:n="md",illustration:m="files"}){let x=u[n];return(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col items-center justify-center text-center bg-[var(--surface)] rounded-2xl",x.container,r),children:(0,t.jsxs)("div",{className:(0,o.cn)("flex flex-col",x.spacing),children:[(0,t.jsx)("div",{className:(0,o.cn)("mx-auto flex items-center justify-center",x.icon),children:e||("custom"===m?null:d[m])}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:(0,o.cn)("text-[var(--text)]",x.title),children:s}),a&&(0,t.jsx)("p",{className:(0,o.cn)("text-[var(--text-muted)] max-w-md mx-auto",x.description),children:a})]}),(i||l)&&(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3",children:[i&&(0,t.jsx)(c.Button,{onClick:i.onClick,variant:"secondary"===i.variant?"secondary":"default",children:i.label}),l&&(0,t.jsx)(c.Button,{onClick:l.onClick,variant:"ghost",children:l.label})]})]})})}],941712)},956834,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(761341),i=e.i(975157),l=e.i(929487);let r={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-16 w-16 text-base",xl:"h-32 w-32 text-3xl"},n={sm:32,md:40,lg:64,xl:128},o={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"};e.s(["default",0,function({src:e,alt:c,gender:d="male",fallback:u,size:m="md",shape:x="circle",className:h,fallbackBgClass:p="bg-[var(--primaryColor)]/10",fallbackTextClass:f="text-[var(--primaryColor)]"}
1){let[v,g]=(0,s.useState)(!1),y=(0,l.resolveProfilePicture)(e,d),j=v&&!!u;return(0,t.jsx)("div",{className:(0,i.cn)("relative flex items-center justify-center font-semibold overflow-hidden",r[m],o[x],j?p:"bg-transparent",h),children:j?(0,t.jsx)("span",{className:(0,i.cn)("flex h-full w-full select-none items-center justify-center",f),children:u}):(0,t.jsx)(a.default,{src:y,alt:c,fill:!0,sizes:`${n[m]}px`,className:"object-cover",onError:()=>g(!0)})})}])},558700,e=>{"use strict";var t=e.i(843476),s=e.i(975157),a=e.i(519455),i=e.i(267177),l=e.i(462337),r=e.i(796570);e.s(["default",0,function({currentPage:e,totalPages:n,pageSize:o,totalItems:c,onPageChange:d,className:u,showItemsCount:m=!0,showNavButtons:x=!0,compact:h=!1,translations:p}){if(!n||n<=1)return null;let f=c&&c>0?c:n*o,v=Math.min(e*o,f);return(0,t.jsxs)("div",{className:(0,s.cn)("flex flex-col sm:flex-row items-center gap-3",m?"border-t border-[var(--border)]":"justify-center",h?"p-2":"px-4 py-3",u),children:[m&&(0,t.jsxs)("div",{className:"text-sm text-[var(--muted-foreground)] sm:hidden",children:[p.total,": ",(0,r.toPersianDigits)(f)," ",p.results]}),m&&(0,t.jsxs)("div",{className:"text-sm hidden sm:block text-[var(--muted-foreground)] whitespace-nowrap",children:[p.showing," ",(0,t.jsx)("span",{className:"font-medium text-[var(--text)]",children:(0,r.toPersianDigits)((e-1)*o+1)})," ",p.to," ",(0,t.jsx)("span",{className:"font-medium text-[var(--text)]",children:(0,r.toPersianDigits)(v)})," ",p.of," ",(0,t.jsx)("span",{className:"font-medium text-[var(--text)]",children:(0,r.toPersianDigits)(f)})," ",p.results]}),(0,t.jsxs)("div",{className:(0,s.cn)("flex items-center gap-1 sm:gap-2",m&&"sm:ms-auto"),children:[x&&(0,t.jsxs)(a.Button,{onClick:()=>d(Math.max(e-1,1)),disabled:1===e,variant:"outline",size:"sm",className:"h-8 w-8 p-0 sm:h-9 sm:w-auto sm:px-3",children:[(0,t.jsx)(i.IconChevronLeft,{className:"h-4 w-4 sm:hidden"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:p.previous})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:(()=>{let t=[];if(n<=5)for(let e=1;e<=n;e++)t.push(e);else{t.push(1),e>3&&t.push("...");let s=Math.max(2,e-1),a=Math.min(n-1,e+1);for(let e=s;e<=a;e++)t.includes(e)||t.push(e);e<n-2&&t.push("..."),t.includes(n)||t.push(n)}return t})().map((i,l)=>"..."===i?(0,t.jsx)("span",{className:"px-2 text-[var(--muted-foreground)]",children:"..."},`ellipsis-${l}`):(0,t.jsx)(a.Button,{onClick:()=>d(i),variant:e===i?"default":"ghost",size:"sm",className:(0,s.cn)("h-8 w-8 p-0 sm:h-9 sm:w-9 font-medium",e===i?"bg-[var(--primaryColor)] text-[var(--on-primary)] hover:bg-[var(--primaryColorHover)]":"hover:bg-[var(--accent)]"),children:(0,r.toPersianDigits)(i)},i))}),x&&(0,t.jsxs)(a.Button,{onClick:()=>d(Math.min(e+1,n)),disabled:e===n,variant:"outline",size:"sm",className:"h-8 w-8 p-0 sm:h-9 sm:w-auto sm:px-3",children:[(0,t.jsx)(l.IconChevronRight,{className:"h-4 w-4 sm:hidden"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:p.next})]})]})]})}])},936131,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(59895),i=e.i(913067),l=e.i(975157),r=e.i(225),n=e.i(901121),o=e.i(796110),c=e.i(36714);e.s(["default",0,function({badges:e,isLoading:d}){let u=(0,s.useTranslations)("account.loyalty.achievements"),m=(0,r.useLocale)();return d?(0,t.jsx)(o.default,{count:4,className:"h-28"}):0===e.length?(0,t.jsx)(c.default,{icon:(0,t.jsx)(i.IconRosette,{size:48,strokeWidth:1,className:"text-[var(--text-muted)]"}),title:u("empty.title"),description:u("empty.description")}):(0,t.jsx)("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4",children:e.map(e=>(0,t.jsxs)("div",{className:(0,l.cn)("flex flex-col items-center gap-2 rounded-2xl bg-[var(--surface)] p-4 text-center",!e.earned&&"opacity-50"),title:(0,n.resolveLocalizedText)(e.description,m),children:[(0,t.jsx)("div",{className:(0,l.cn)("flex h-14 w-14 items-center justify-center rounded-full",e.earned?"bg-[var(--primaryColor)]/10 text-[var(--primaryColor)]":"bg-[var(--surface-hover)] text-[var(--text-muted)]"),children:e.earned?(0,t.jsx)(i.IconRosette,{size:26,stroke:1.6}):(0,t.jsx)(a.IconLock,{size:22,stroke:1.6})}),(0,t.jsx)("p",{className:"text-xs font-medium text-[var(--text)]",children:(0,n.resolveLocalizedText)(e.title,m)}
1)]},e.id))})}])},36714,e=>{"use strict";var t=e.i(843476),s=e.i(941712);e.s(["default",0,function({icon:e,title:a,description:i}){return(0,t.jsx)(s.default,{icon:e,illustration:"custom",title:a,description:i})}])},796110,e=>{"use strict";var t=e.i(843476);e.s(["default",0,function({count:e=4,className:s="h-12"}){return(0,t.jsx)("div",{className:"flex flex-col gap-3",children:Array.from({length:e}).map((e,a)=>(0,t.jsx)("div",{className:`rounded-xl bg-[var(--surface)] animate-pulse ${s}`},a))})}])},938974,e=>{"use strict";var t=e.i(230684);e.s(["default",0,function(){return(0,t.useLoyaltyPopup)(),null}])},163710,e=>{"use strict";var t=e.i(843476),s=e.i(887784),a=e.i(913067),i=e.i(668662),l=e.i(971940),r=e.i(948148),n=e.i(547187),o=e.i(570525);e.s(["default",0,function({stats:e,loading:c=!1}){let d=(0,r.useTranslations)("account.loyalty.stats");return(0,t.jsx)(n.default,{loading:c,items:[{title:d("lifetimePoints"),value:(0,o.formatPoints)(e?.lifetime_points??0),icon:(0,t.jsx)(s.IconCoins,{size:20}),tone:"primary"},{title:d("missionsClaimable"),value:e?.missions_claimable??0,icon:(0,t.jsx)(l.IconTargetArrow,{size:20}),tone:"warning"},{title:d("spinsAvailable"),value:e?.spins_available??0,icon:(0,t.jsx)(i.IconRotate,{size:20}),tone:"info"},{title:d("badgesEarned"),value:e?.badges_earned??0,icon:(0,t.jsx)(a.IconRosette,{size:20}),tone:"success"}]})}])},491076,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(626197),i=e.i(971940),l=e.i(975157),r=e.i(225),n=e.i(519455),o=e.i(901121),c=e.i(570525);e.s(["default",0,function({mission:e,onClaim:d,isClaiming:u}){let m=(0,s.useTranslations)("account.loyalty.missions"),x=(0,r.useLocale)(),h=e.target_value||1,p=Math.min(100,Math.round(e.progress/h*100)),f="completed"===e.status,v="claimed"===e.status;return(0,t.jsxs)("div",{className:(0,l.cn)("rounded-2xl bg-[var(--surface)] p-5 transition-opacity",v&&"opacity-70"),children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:(0,l.cn)("flex h-10 w-10 shrink-0 items-center justify-center rounded-full",v?"bg-[var(--surface-hover)] text-[var(--text-muted)]":"bg-[var(--primaryColor)]/10 text-[var(--primaryColor)]"),children:v?(0,t.jsx)(a.IconCheck,{size:20,stroke:1.8}):(0,t.jsx)(i.IconTargetArrow,{size:20,stroke:1.6})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-[var(--text)]",children:(0,o.resolveLocalizedText)(e.title,x)}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs leading-relaxed text-[var(--text-muted)]",children:(0,o.resolveLocalizedText)(e.description,x)})]}),(0,t.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-full bg-[var(--surface-hover)] px-2.5 py-1 text-xs font-medium text-[var(--text)]",children:m("pointsReward",{points:(0,c.formatPoints)(e.points_reward)})})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-[var(--border-subtle)]",role:"progressbar","aria-valuenow":p,"aria-valuemin":0,"aria-valuemax":100,children:(0,t.jsx)("div",{className:(0,l.cn)("h-full rounded-full transition-[width] duration-300",v?"bg-[var(--text-muted)]":"bg-[var(--primaryColor)]"),style:{width:`${p}%`}})}),(0,t.jsxs)("div",{className:"mt-1.5 flex items-center justify-between text-xs text-[var(--text-muted)]",children:[(0,t.jsx)("span",{children:m("progressLabel",{current:(0,c.formatPoints)(Math.min(e.progress,h)),target:(0,c.formatPoints)(h)})}),v&&(0,t.jsx)("span",{children:m("claimedLabel")})]})]}),f&&null!==e.user_mission_id&&(0,t.jsx)(n.Button,{className:"mt-4 w-full",size:"sm",disabled:u,onClick:()=>d(e.user_mission_id),children:m(u?"claiming":"claim")})]})}])},414386,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(971940),i=e.i(491076),l=e.i(796110),r=e.i(36714);e.s(["default",0,function({missions:e,isLoading:n,onClaim:o,claimingId:c}){let d=(0,s.useTranslations)("account.loyalty.missions");return(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"mb-4 text-base font-semibold text-[var(--text)]",children:d("title")}),n?(0,t.jsx)(l.default,{count:4,className:"h-36"}):0===e.length?(0,t.jsx)(r.default,{icon:(0,t.jsx)(a.IconTargetArrow,{size:48,strokeWidth:1,className:"text-[var(--text-muted)]"}),title:d("empty.title"),description:d("empty.description")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:e.map(e=>(0,t.jsx)(i.default,{mission:e,onClaim:o,isClaiming:c===e.user_mission_id},e.id))})]})}])},743344,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(237041),i=e.i(759440),l=e.i(225),r=e.i(65375),n=e.i(796570),o=e.i(901121),c=e.i(570525),d=e.i(228535),u=e.i(454545);function m({benefits:e}){return 0===e.length?null:(0,t.jsx)("ul",{className:"flex flex-wrap gap-2",children:e.map((e,s)=>(0,t.jsx)("li",{className:"rounded-full bg-[var(--surface-hover)] px-3 py-1 text-xs text-[var(--text)]",children:(0,d.formatBenefitLabel)(e)},s))})}e.s(["default",0,function({progress:e,isLoading:d}){let x=(0,s.useTranslations)("account.loyalty.plan"),h=(0,l.useLocale)();if(d||!e)return(0,t.jsxs)(r.default,{padding:"24px",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-14 w-14 shrink-0 rounded-full bg-[var(--surface-hover)] animate-pulse"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"h-4 w-32 rounded-md bg-[var(--surface-hover)] animate-pulse"}),(0,t.jsx)("div",{className:"h-8 w-48 rounded-md bg-[var(--surface-hover)] animate-pulse"})]})]}),(0,t.jsx)("div",{className:"mt-6 h-2 w-full rounded-full bg-[var(--surface-hover)] animate-pulse"})]});let p=e.current_plan,f=e.next_plan,v=p?.color_code||"var(--primaryColor)",g=e.current_plan_benefits??[],y=e.next_plan_benefits??[];return(0,t.jsxs)(r.default,{padding:"24px",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-full",style:{backgroundColor:`${v}1A`,color:v},children:(0,t.jsx)(a.IconCrown,{size:28,stroke:1.6})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--text-muted)]",children:x("currentTierLabel")}),(0,t.jsx)("p",{className:"mt-1 text-2xl font-bold text-[var(--text)] md:text-3xl",children:p?(0,o.resolveLocalizedText)(p.name,h):x("noTierYet")}),null!=e.point_toman_value&&e.point_toman_value>0&&(0,t.jsx)("p",{className:"mt-1.5 text-xs text-[var(--text-muted)]",children:x("pointValue",{amount:(0,u.formatPrice)(e.point_toman_value)})})]})]}),g.length>0&&(0,t.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--text-muted)]",children:x("currentBenefits")}
1),(0,t.jsx)(m,{benefits:g})]}),(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-between gap-3 text-sm",children:[(0,t.jsx)("span",{className:"text-[var(--text-muted)]",children:x("lifetimePoints",{points:(0,c.formatPoints)(e.lifetime_points)})}),!e.is_highest_plan&&(0,t.jsx)("span",{className:"font-medium text-[var(--text)]",children:x("percentToNext",{percent:(0,n.toPersianDigits)(Math.round(e.progress_percentage))})})]}),e.is_highest_plan?(0,t.jsxs)("div",{className:"mt-4 flex items-center gap-2 rounded-xl bg-[var(--surface-hover)] p-4 text-sm text-[var(--text)]",children:[(0,t.jsx)(i.IconTrophy,{size:20,className:"shrink-0 text-[var(--primaryColor)]",stroke:1.6}),x("highestTierReached")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-2 h-2 w-full overflow-hidden rounded-full bg-[var(--border-subtle)]",role:"progressbar","aria-valuenow":Math.round(e.progress_percentage),"aria-valuemin":0,"aria-valuemax":100,children:(0,t.jsx)("div",{className:"h-full rounded-full transition-[width] duration-300",style:{width:`${Math.min(100,Math.max(0,e.progress_percentage))}%`,backgroundColor:f?.color_code||"var(--primaryColor)"}})}),f&&(0,t.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--text-muted)]",children:x("remainingToNext",{points:(0,c.formatPoints)(e.remaining_points_to_next??0),tier:(0,o.resolveLocalizedText)(f.name,h)})}),y.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs text-[var(--text-muted)]",children:x("nextBenefits")}),(0,t.jsx)(m,{benefits:y})]})]})]})]})}])},374281,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(626197),i=e.i(59895),l=e.i(975157),r=e.i(225),n=e.i(65375),o=e.i(901121),c=e.i(228535),d=e.i(570525),u=e.i(796110);e.s(["default",0,function({plans:e,isLoading:m}){let x=(0,s.useTranslations)("account.loyalty.plan"),h=(0,r.useLocale)();return m?(0,t.jsx)(u.default,{count:4,className:"h-28"}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:e.map(e=>{let s="current"===e.state,r="locked"===e.state;return(0,t.jsxs)(n.default,{padding:"20px",className:(0,l.cn)(s&&"ring-2",r&&"opacity-70"),style:s?{"--tw-ring-color":e.color_code}:void 0,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-sm font-bold",style:{backgroundColor:`${e.color_code}1A`,color:e.color_code},children:e.level}),s&&(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-[var(--primaryColor)]/10 px-2 py-0.5 text-[12px] font-medium text-[var(--primaryColor)]",children:[(0,t.jsx)(a.IconCheck,{size:12,stroke:2}),x("tiers.current")]}),"unlocked"===e.state&&(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-[var(--surface-hover)] px-2 py-0.5 text-[12px] font-medium text-[var(--text-muted)]",children:[(0,t.jsx)(a.IconCheck,{size:12,stroke:2}),x("tiers.unlocked")]}),r&&(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-[var(--surface-hover)] px-2 py-0.5 text-[12px] font-medium text-[var(--text-muted)]",children:[(0,t.jsx)(i.IconLock,{size:12,stroke:2}),x("tiers.locked")]})]}),(0,t.jsx)("p",{className:"mt-3 text-base font-semibold text-[var(--text)]",children:(0,o.resolveLocalizedText)(e.name,h)}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:x("tiers.threshold",{points:(0,d.formatPoints)(e.points_threshold)})}),e.benefits.length>0&&(0,t.jsx)("ul",{className:"mt-3 space-y-1",children:e.benefits.map((e,s)=>(0,t.jsxs)("li",{className:"flex items-start gap-1.5 text-xs text-[var(--text-muted)]",children:[(0,t.jsx)(a.IconCheck,{size:14,className:"mt-0.5 shrink-0 text-[var(--text-muted)]",stroke:1.8}),(0,c.formatBenefitLabel)(e)]},s))})]},e.id)})})}])},618949,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(975157),i=e.i(570525),l=e.i(734769);e.s(["default",0,function({entries:e}){let r=(0,s.useTranslations)("account.loyalty.history");return(0,t.jsx)("div",{className:"overflow-hidden rounded-2xl bg-[var(--surface)]",children:e.map((e,s)=>{let n,o=e.points>=0,c=e.description||r("noDescription");return(0,t.jsxs)("div",{className:(0,a.cn)("flex items-center justify-between gap-3 px-3 py-2",s>0&&"border-t border-[var(--border)]"),children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"truncate text-sm text-[var(--text)]",children:[(0,t.jsx)("span",{className:"font-medium",children:r(`type.${e.type}`)}),(0,t.jsxs)("span",{className:"text-[var(--text-muted)]",children:[" · ",(n=e.created_at,(0,l.formatJalaliText)(n,{year:"numeric",month:"short",day:"numeric"}))]})]}),(0,t.jsx)("p",{className:"truncate text-[12px] text-[var(--text-muted)]",title:c,children:c})]}),(0,t.jsxs)("div",{className:"shrink-0 text-end",children:[(0,t.jsxs)("span",{className:(0,a.cn)("block whitespace-nowrap text-sm font-semibold",o?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[o?"+":"",(0,i.formatPoints)(e.points)]}),(0,t.jsx)("span",{className:"text-[12px] text-[var(--text-muted)]",children:r("balanceAfter",{points:(0,i.formatPoints)(e.balance_after)})})]})]},e.id)})})}])},717971,e=>{"use strict";var t=e.i(843476),s=e.i(948148);let a=(0,e.i(33550).default)("outline","history","History",[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]]);var i=e.i(558700),l=e.i(618949),r=e.i(796110),n=e.i(36714),o=e.i(398783);e.s(["default",0,function({entries:e,isLoading:c,page:d,onPageChange:u,totalPages:m,totalItems:x}){let h=(0,s.useTranslations)("account.loyalty.history"),p=(0,s.useTranslations)("common.Pagination");return(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"mb-4 text-base font-semibold text-[var(--text)]",children:h("title")}),c?(0,t.jsx)(r.default,{}):0===e.length?(0,t.jsx)(n.default,{icon:(0,t.jsx)(a,{size:48,strokeWidth:1,className:"text-[var(--text-muted)]"}),title:h("empty.title"),description:h("empty.description")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.default,{entries:e}),m>1&&(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(i.default,{currentPage:d,totalPages:m,pageSize:o.LOYALTY_HISTORY_PAGE_SIZE,totalItems:x,onPageChange:u,translations:{previous:p("previous"),next:p("next"),showing:p("showing"),to:p("to"),of:p("of"),results:p("results"),total:p("total")}})})]})]})}],717971)},23900,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(102761),i=e.i(225),l=e.i(65375),r=e.i(901121),n=e.i(796110),o=e.i(271645),c=e.i(519455);function d({prizes:e,locale:a,disabled:i,spinning:l,onSpin:n,onLanded:u}){let m=(0,s.useTranslations)("account.loyalty.wheel"),[x,h]=(0,o.useState)(0),[p,f]=(0,o.useState)(!1),v=e.length>0?e:[],g=l||p||i,y=async()=>
1{if(!g&&0!==v.length){f(!0);try{let e=await n();if(!e)return void f(!1);let t=Math.max(0,v.findIndex(t=>t.id===e.prize?.id)),s=360/v.length,a=(360-(t*s+s/2)-(x%360+360)%360+360)%360;h(x+2160+a),window.setTimeout(()=>{f(!1),u(e)},4200)}catch{f(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-5",children:[(0,t.jsxs)("div",{className:"relative h-64 w-64 sm:h-72 sm:w-72",children:[(0,t.jsx)("span",{className:"absolute left-1/2 top-0 z-10 -translate-x-1/2",children:(0,t.jsx)("span",{className:"block h-0 w-0 border-x-[10px] border-t-[18px] border-x-transparent border-t-[var(--primaryColor)]"})}),(0,t.jsx)("button",{type:"button",disabled:g,onClick:()=>void y(),"aria-label":m("spin"),className:"absolute inset-0 rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primaryColor)] disabled:cursor-not-allowed",children:(0,t.jsxs)("svg",{viewBox:"-110 -110 220 220",className:"h-full w-full origin-center drop-shadow-sm",style:{transform:`rotate(${x}deg)`,transformOrigin:"50% 50%",transition:p?"transform 4.2s cubic-bezier(0.12, 0.7, 0.13, 1)":"none"},children:[(0,t.jsx)("circle",{r:"108",fill:"var(--surface-elevated)"}),v.map((e,s)=>{var i;let l,n,o,c,d,u,m,x,h=e.color||"var(--primaryColor)",p={x:62*Math.cos(l=2*Math.PI*(s+.5)/v.length-Math.PI/2),y:62*Math.sin(l),angle:180*l/Math.PI},f=(0,r.resolveLocalizedText)(e.label,a);return(0,t.jsxs)("g",{children:[(0,t.jsx)("path",{d:(n=2*Math.PI*s/(i=v.length)-Math.PI/2,o=2*Math.PI*(s+1)/i-Math.PI/2,c=104*Math.cos(n),d=104*Math.sin(n),u=104*Math.cos(o),m=104*Math.sin(o),x=+(o-n>Math.PI),`M 0 0 L ${c} ${d} A 104 104 0 ${x} 1 ${u} ${m} Z`),fill:h,opacity:s%2==0?.92:.78,stroke:"var(--background)",strokeWidth:"1.5"}),(0,t.jsx)("text",{x:p.x,y:p.y,fill:"white",fontSize:"9",fontWeight:"600",textAnchor:"middle",dominantBaseline:"middle",transform:`rotate(${p.angle+90} ${p.x} ${p.y})`,children:f.length>14?`${f.slice(0,13)}…`:f})]},e.id)}),(0,t.jsx)("circle",{r:"22",fill:"var(--surface)",stroke:"var(--primaryColor)",strokeWidth:"3"})]})})]}),(0,t.jsx)(c.Button,{onClick:()=>void y(),disabled:g,children:m(p||l?"spinning":"spin")})]})}var u=e.i(734769);e.s(["default",0,function({availableSpins:e,prizes:o,recentSpins:c,isLoading:m,onSpin:x,isSpinning:h,onLanded:p}){let f=(0,s.useTranslations)("account.loyalty.wheel"),v=(0,i.useLocale)();if(m)return(0,t.jsx)(n.default,{count:1,className:"h-64"});let g=e>0&&!h&&o.length>0;return(0,t.jsxs)(l.default,{padding:"24px",children:[(0,t.jsxs)("div",{className:"mb-6 text-center",children:[(0,t.jsx)("h2",{className:"text-base font-semibold text-[var(--text)]",children:f("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-[var(--text-muted)]",children:e>0?f("spinsAvailable",{count:e}):f("noSpinsAvailable")})]}),o.length>0?(0,t.jsx)(d,{prizes:o,locale:v,disabled:!g,spinning:h,onSpin:x,onLanded:p}):null,c.length>0&&(0,t.jsxs)("div",{className:"mt-6 border-t border-[var(--border)] pt-4",children:[(0,t.jsx)("p",{className:"mb-3 text-xs font-medium text-[var(--text-muted)]",children:f("recentSpins")}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:c.slice(0,5).map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 text-xs text-[var(--text-muted)]",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[var(--text)]",children:[(0,t.jsx)(a.IconStar,{size:14,stroke:1.8,className:"text-[var(--primaryColor)]"}),e.prize?(0,r.resolveLocalizedText)(e.prize.label,v):f("noPrize")]}),(0,t.jsx)("span",{children:(0,u.formatJalaliText)(e.created_at,{month:"short",day:"numeric"})})]},e.id))})]})]})}],23900)},29081,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(942484),i=e.i(894164),l=e.i(519455),r=e.i(225),n=e.i(901121),o=e.i(570525);e.s(["default",0,function({open:e,onClose:c,result:d}){let u=(0,s.useTranslations)("account.loyalty.wheel"),m=(0,r.useLocale)();return(0,t.jsx)(i.default,{open:e,onClose:c,title:u("resultTitle"),maxWidth:420,actions:(0,t.jsx)(l.Button,{className:"w-full",onClick:c,children:u("resultClose")}),children:d&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-6 text-center",children:[(0,t.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-full",style:{backgroundColor:`${d.prize?.color||"var(--primaryColor)"}1A`,color:d.prize?.color||"var(--primaryColor)"},children:(0,t.jsx)(a.IconGift,{size:40,stroke:1.5})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-lg font-semibold text-[var(--text)]",children:d.prize?(0,n.resolveLocalizedText)(d.prize.label,m):u("noPrize")}),d.points_awarded>0&&(0,t.jsx)("p",{className:"mt-1 text-sm text-[var(--text-muted)]",children:u("pointsAwarded",{points:(0,o.formatPoints)(d.points_awarded)})})]}),(0,t.jsx)("p",{className:"text-xs text-[var(--text-muted)]",children:u("remainingSpins",{count:d.remaining_spins})})]})})}])},398783,e=>{"use strict";e.s(["LOYALTY_HISTORY_PAGE_SIZE",0,10])},285367,e=>{"use strict";var t=e.i(271645);e.i(395578);var s=e.i(19067),a=e.i(648798),i=e.i(288289),l=e.i(372303),r=e.i(406242),n=e.i(863275),o=e.i(849818),c=e.i(636356),d=e.i(398783);e.s(["useLoyaltyPage",0,function(){let[e,u]=(0,t.useState)(1),[m,x]=(0,t.useState)(null),[h,p]=(0,t.useState)(!1),{data:f,isLoading:v,isError:g,isFetching:y,refetch:j}=(0,s.useLoyaltyDashboard)(),{data:b,isLoading:N}=(0,a.useLoyaltyPlan)(),{data:w,isLoading:k}=(0,i.useLoyaltyHistory)({page:e,page_count:d.LOYALTY_HISTORY_PAGE_SIZE}),{data:M,isLoading:_}=(0,l.useLoyaltyMissions)(),{data:T,isLoading:C}=(0,r.useLoyaltyAchievements)(),{data:P,isLoading:z}=(0,n.useLoyaltyWheel)(),I=(0,o.useClaimMission)(),L=(0,c.useSpinWheel)(),S=I.isPending?I.variables??null:null,A=async()=>(await L.mutateAsync()).data??null;return{isDashboardError:g,isDashboardFetching:y,refetchDashboard:j,progress:b?.progress??f?.progress??null,stats:f?.stats??null,isSummaryLoading:v,currentPlan:b?.current_plan??null,plans:b?.plans??[],planHistory:b?.history??[],isPlanLoading:N,historyEntries:w?.data??[],historyPage:e,setHistoryPage:u,historyTotalPages:w?.totalPages??0,historyTotalItems:w?.total??0,isHistoryLoading:k,missions:M??[],isMissionsLoading:_,claimMission:e=>{I.mutate(e)},claimingMissionId:S,badges:T??[],isAchievementsLoading:C,availableSpins:P?.available_spins??0,prizes:P?.prizes??[],recentSpins:P?.recent_spins??[],isWheelLo
1ading:z,spinWheel:A,isSpinning:L.isPending,wheelResult:m,wheelResultOpen:h,closeWheelResult:()=>p(!1),onWheelLanded:e=>{x(e),p(!0)}}}])},230684,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),i=e.i(170319),l=e.i(522016),r=e.i(230129),n=e.i(225);e.i(395578);var o=e.i(501700),c=e.i(51568),d=e.i(578352);let u="loyalty_popup_checked_session";e.s(["useLoyaltyPopup",0,function(){let{isAuthenticated:e,isInitialized:m}=(0,r.useAuth)(),x=(0,n.useLocale)(),h=(0,a.useTranslations)("account.loyalty.wheel"),[p,f]=(0,s.useState)(!1),v=(0,c.useMarkWheelPopupShown)(),g=(0,s.useRef)(null);(0,s.useEffect)(()=>{m&&e&&(window.sessionStorage.getItem(u)||f(!0))},[e,m]);let{data:y}=(0,o.useLoyaltyWheelPopupStatus)(p);(0,s.useEffect)(()=>{if(y){if(window.sessionStorage.setItem(u,"1"),y.eligible)return g.current=setTimeout(()=>{i.toast.info(()=>(0,t.jsx)(l.default,{href:(0,d.localePath)(x,"/account/loyalty"),className:"block",children:h("popupNudge",{count:y.available_spins??1})}),{autoClose:1e4}),v.mutate()},Math.max(0,(y.delay_minutes??0)*6e4)),()=>{g.current&&clearTimeout(g.current)}}},[y])}])},228535,e=>{"use strict";var t=e.i(796570);e.s(["formatBenefitLabel",0,function(e){let s=e.replace(/(\d+)\.0+(?=\D|$)/g,"$1");return(0,t.toPersianDigits)(s).replace(/%/g,"٪")}])},570525,e=>{"use strict";var t=e.i(705291);e.s(["formatPoints",0,function(e){return(0,t.formatGroupedNumber)(Math.round(e))}])},929487,e=>{"use strict";let t={male:"/assets/images/avatar/person/person.png",female:"/assets/images/avatar/person/person-female.png"};function s(e){return!e||/\/person(-female)?\.png(\?|$)/.test(e)}e.s(["DEFAULT_AVATARS",0,t,"genderFromUser",0,function(e){return"female"===e.gender||s(e.profile_picture)&&e.profile_picture?.includes("female")?"female":"male"},"isDefaultAvatar",0,s,"resolveProfilePicture",0,function(e,a){return e&&!s(e)?e:t[a]}])},734769,e=>{"use strict";var t=e.i(796570),s=e.i(445260),a=e.i(994740);let i=["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],l=e=>!Number.isNaN(e.getTime());function r(e){return String(e).padStart(2,"0")}e.s(["formatJalaliText",0,function(e,n,o=""){let c,d=(e=>{if(e instanceof Date)return l(e)?e:null;if(null==e)return null;let t=new Date(e);return l(t)?t:null})(e);if(!d)return o;let u=function(e,t){let s=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),a={};for(let t of s.formatToParts(e))"literal"!==t.type&&(a[t.type]=t.value);return{year:Number(a.year),month:Number(a.month),day:Number(a.day),hour:Number(a.hour),minute:Number(a.minute)}}(d,n?.timeZone??a.STORE_TIME_ZONE);if(!u.year||!u.month||!u.day)return o;let[m,x,h]=(0,s.gregorianToJalali)(u.year,u.month,u.day),p=n?.month??"numeric",f=n?.day??"numeric",v=!n||null!=n.year,g=!n||null!=n.month,y=!n||null!=n.day,j=String(m),b="numeric"===p?String(x):"2-digit"===p?r(x):i[x-1]??String(x),N="2-digit"===f?r(h):String(h);if("long"===p||"short"===p||"narrow"===p){let e=[];y&&e.push(N),g&&e.push(b),v&&e.push(j),c=e.join(" ")}else c=`${v?j:""}${g?`/${b}`:""}${y?`/${N}`:""}`.replace(/^\//,"");return n?.hour&&(c+=` ساعت ${r(u.hour)}:${r(u.minute)}`),(0,t.toPersianDigits)(c)}])}]);

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