1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,417819,e=>{"use strict";var t=e.i(89427),r=e.i(501012);let a=t.forwardRef(function(e,t){let{className:a,render:i,orientation:s="horizontal",style:l,...n}=e;return(0,r.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},n]})});e.s(["Separator",0,a])},285149,e=>{"use strict";var t=e.i(315786);e.s(["Check",()=>t.default])},356060,e=>{"use strict";var t=e.i(662798);e.s(["ChevronsUpDown",()=>t.default])},210313,e=>{"use strict";let t="__all__";function r(e){return e.includes(t)}function a(e){return e.filter(e=>e!==t)}function i(){return[t]}function s(e){return e?.length?r(e)?i():[...a(e)]:[]}e.s(["MULTI_SELECT_ALL_VALUE",0,t,"createMultiSelectAllValue",0,i,"expandNumericMultiSelectValues",0,function(e,t){return(function(e,t){if(r(e))return[...t];let i=new Set(t);return a(e).filter(e=>i.has(e))})(e,t).filter(e=>"number"==typeof e)},"getMultiSelectSpecificValues",0,a,"getPersistedMultiSelectValue",0,function(e,t){return e?i():s(t)},"hasMultiSelectAllValue",0,r,"normalizeMultiSelectValue",0,s])},303346,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(368041),i=e.i(285149),s=e.i(356060),l=e.i(268787),n=e.i(463352),o=e.i(519455),d=e.i(987144),c=e.i(210313),u=e.i(44930),m=e.i(975157);function p(e){return e.trim().toLocaleLowerCase()}e.s(["MultiSelect",0,function({options:e,value:h,onChange:f,placeholder:b="Select items",searchPlaceholder:g="Search...",showSelectedChips:v=!0,maxVisibleChips:x=0,chipsMaxHeightClassName:w="max-h-28",enableSelectAll:y=!1,selectAllLabel:j="ÙÙ
Ù"}){let[N,C]=r.useState(!1),[k,S]=r.useState(""),[_,L]=r.useState(!1),[A,E]=r.useState(!1),[P,I]=r.useState(null),$=r.useRef(null),U=r.useRef(null),T=r.useRef(null),M=r.useRef(null),V=e=>(0,u.toPersianDigits)(e),R=y&&(0,c.hasMultiSelectAllValue)(h),D=r.useMemo(()=>{if(R)return[{label:j,value:c.MULTI_SELECT_ALL_VALUE}];let t=new Set((0,c.getMultiSelectSpecificValues)(h));return e.filter(e=>t.has(e.value))},[R,e,j,h]),z=r.useMemo(()=>{let t=p(k);return t?e.filter(e=>p(e.label).includes(t)):e},[e,k]),F=0===D.length?V(b):D.length<=2?D.map(e=>V(e.label)).join("Ø "):`${V(String(D.length))} Ù
ÙØ±Ø¯ Ø§ÙØªØ®Ø§Ø¨ شدÙ`,G=x>0&&!A?D.slice(0,x):D,B=Math.max(D.length-G.length,0);r.useEffect(()=>{(x<=0||D.length<=x)&&E(!1)},[x,D.length]);let O=r.useCallback(()=>{let e=U.current,t=T.current;if(!e||!t)return;let r=e.getBoundingClientRect(),a=Math.min(Math.max(t.scrollHeight,180),320),i=window.innerHeight-r.bottom-16-8,s=r.top-16-8-50,l=i<a&&s>i,n=Math.max(Math.min(l?s:i,window.innerHeight-32),140),o=Math.min(r.width,window.innerWidth-32),d=Math.min(Math.max(r.left,16),window.innerWidth-16-o);I({top:l?r.top-8:r.bottom+8,left:d,width:o,maxHeight:n,openAbove:l})},[]);r.useEffect(()=>{L(!0)},[]),r.useEffect(()=>{if(!N)return;let e=e=>{let t=e.target,r=!!($.current&&t&&$.current.contains(t)),a=!!(T.current&&t&&T.current.contains(t));r||a||C(!1)},t=e=>{"Escape"===e.key&&C(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}},[N]),r.useLayoutEffect(()=>{if(!N)return void I(null);O(),M.current?.focus();let e=()=>{O()};return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[z.length,N,k,O]);let H=N&&_?(0,a.createPortal)((0,t.jsx)(d.DashboardPortalSurface,{children:(0,t.jsxs)("div",{ref:T,className:"fixed z-[70] rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-xl shadow-surface-900/10 ring-1 ring-surface-900/5 dark:shadow-black/25 dark:ring-white/5",style:{top:P?.top??0,left:P?.left??0,width:P?.width??0,maxHeight:P?.maxHeight??320,transform:P?.openAbove?"translateY(-100%)":void 0},children:[(0,t.jsxs)("div",{className:"flex h-11 items-center gap-2 rounded-lg border border-input bg-input-background px-3 shadow-[0_1px_2px_rgb(15_23_42/0.04)] transition-[border-color,box-shadow] duration-200 focus-within:border-brand-500 focus-within:ring-4 focus-within:ring-brand-500/15 dark:border-surface-700 dark:bg-surface-800 dark:focus-within:border-brand-400 dark:focus-within:ring-brand-400/20",children:[(0,t.jsx)(l.Search,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("input",{ref:M,type:"text",value:k,onChange:e=>S(e.target.value),placeholder:V(g),className:"w-full border-0 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,t.jsx)("div",{className:"mt-2 overflow-auto",style:{maxHeight:Math.max((P?.maxHeight??320)-64,96)},children:0===z.length?(0,t.jsx)("div",{className:"px-3 py-6 text-center text-sm text-slate-500 dark:text-muted-foreground",children:V("Not found")}):(0,t.jsxs)("div",{className:"space-y-1",children:[y&&e.length>0?(0,t.jsxs)("button",{type:"button",className:(0,m.cn)("flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-foreground transition-colors hover:bg-brand-50 dark:hover:bg-surface-800",R?"bg-brand-50 dark:bg-surface-800":"bg-transparent"),onClick:()=>
1{if(R){f([]),S("");return}f((0,c.createMultiSelectAllValue)()),S("")},children:[(0,t.jsx)("span",{className:(0,m.cn)("flex h-4 w-4 items-center justify-center rounded border border-input dark:border-surface-600",R?"border-brand-500 bg-brand-500 text-white":"bg-input-background dark:bg-surface-900"),children:(0,t.jsx)(i.Check,{className:(0,m.cn)("h-3 w-3",R?"opacity-100":"opacity-0")})}),(0,t.jsx)("span",{className:"truncate",children:V(j)})]}):null,z.map(e=>{let r=R||h.includes(e.value);return(0,t.jsxs)("button",{type:"button",className:(0,m.cn)("flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-foreground transition-colors hover:bg-brand-50 dark:hover:bg-surface-800",r?"bg-brand-50 dark:bg-surface-800":"bg-transparent"),onClick:()=>(e=>{if(R){f([e]),S("");return}if(h.includes(e)){f(h.filter(t=>t!==e)),S("");return}f([...h,e]),S("")})(e.value),children:[(0,t.jsx)("span",{className:(0,m.cn)("flex h-4 w-4 items-center justify-center rounded border border-input dark:border-surface-600",r?"border-brand-500 bg-brand-500 text-white":"bg-input-background dark:bg-surface-900"),children:(0,t.jsx)(i.Check,{className:(0,m.cn)("h-3 w-3",r?"opacity-100":"opacity-0")})}),(0,t.jsx)("span",{className:"truncate",children:V(e.label)})]},e.value)})]})})]})}),document.body):null;return(0,t.jsxs)("div",{ref:$,className:"space-y-2",children:[(0,t.jsx)("div",{ref:U,className:"relative",children:(0,t.jsxs)(o.Button,{type:"button",variant:"outline",className:"h-11 w-full justify-between rounded-xl border-input bg-input-background px-3 text-foreground shadow-[0_1px_2px_rgb(15_23_42/0.04)] transition-[border-color,box-shadow,background-color] duration-200 hover:border-surface-400 hover:bg-input-background focus-visible:border-brand-500 focus-visible:ring-4 focus-visible:ring-brand-500/15 dark:border-surface-700 dark:bg-surface-900 dark:hover:border-surface-500 dark:hover:bg-surface-900 dark:focus-visible:border-brand-400 dark:focus-visible:ring-brand-400/20","aria-expanded":N,"aria-haspopup":"listbox",onClick:()=>C(e=>!e),children:[(0,t.jsx)("span",{className:(0,m.cn)("truncate text-right text-sm font-normal",0===D.length?"text-muted-foreground":"text-foreground"),children:F}),(0,t.jsx)(s.ChevronsUpDown,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]})}),v&&D.length>0&&(0,t.jsx)("div",{className:(0,m.cn)("overflow-y-auto",w),children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[G.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-brand-200 bg-brand-50 px-3 py-1 text-sm text-surface-800 dark:border-brand-700/60 dark:bg-brand-900/20 dark:text-surface-100",children:[(0,t.jsx)("span",{className:"max-w-[180px] truncate",children:V(e.label)}),(0,t.jsx)("button",{type:"button",onClick:()=>{var t;(t=e.value)===c.MULTI_SELECT_ALL_VALUE?f([]):f(h.filter(e=>e!==t))},children:(0,t.jsx)(n.X,{className:"h-3.5 w-3.5 text-muted-foreground transition-colors hover:text-destructive"})})]},e.value)),B>0&&(0,t.jsxs)("button",{type:"button",className:"rounded-full border border-dashed border-input bg-muted/50 px-3 py-1 text-sm font-medium text-muted-foreground transition-colors hover:border-brand-300 hover:bg-brand-50 hover:text-brand-700 dark:border-surface-700 dark:bg-surface-800 dark:hover:border-brand-600 dark:hover:bg-brand-900/20 dark:hover:text-brand-300",onClick:()=>
1E(!0),title:D.slice(x).map(e=>V(e.label)).join("Ø "),children:["+",V(String(B))]}),A&&x>0&&D.length>x&&(0,t.jsx)("button",{type:"button",className:"rounded-full border border-input bg-input-background px-3 py-1 text-sm text-muted-foreground transition-colors hover:border-surface-400 hover:bg-muted/50 dark:border-surface-700 dark:bg-surface-900 dark:hover:border-surface-500",onClick:()=>E(!1),children:"Ú©Ù
تر"})]})}),H]})}])},677572,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(975157);let i=r.createContext(null);e.s(["Tabs",0,function({className:e,defaultValue:s,value:l,onValueChange:n,children:o,...d}){let[c,u]=r.useState(s),m=l??c,p=r.useCallback(e=>{void 0===l&&u(e),n?.(e)},[n,l]);return(0,t.jsx)(i.Provider,{value:{value:m,setValue:p},children:(0,t.jsx)("div",{className:(0,a.cn)(e),...d,children:o})})},"TabsContent",0,function({className:e,value:s,children:l,...n}){let o=r.useContext(i);return o&&o.value===s?(0,t.jsx)("div",{className:(0,a.cn)("mt-2",e),role:"tabpanel",...n,children:l}):null},"TabsList",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...r})},"TabsTrigger",0,function({className:e,value:s,...l}){let n=r.useContext(i),o=n?.value===s;return(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":o,"data-state":o?"active":"inactive",className:(0,a.cn)("inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),onClick:()=>n?.setValue(s),...l})}])},141983,e=>{"use strict";var t=e.i(418299);e.s(["ImageIcon",()=>t.default])},94830,e=>{"use strict";var t=e.i(202936);e.s(["Video",()=>t.default])},844590,816429,e=>{"use strict";var t=e.i(779452);let r=["aparat.com","www.aparat.com"],a="aparat-block",i="aparat-block",s=["video","video","embed","videohash"],l={fa:{aparat:"آپارات",aparatVideo:"آپارات ÙÛØ¯ÛÙ",aparatLive:"آپارات ÙØ§ÛÙ",embedUrl:"ÙØ´Ø§ÙÛ Ø¯Ø±Ø¬",embedCode:"کد درج",video:"ÙÛØ¯ÛÙ",live:"پخش Ø²ÙØ¯Ù",invalidAparatUrl:"ÙØ´Ø§ÙÛ Ø¢Ù¾Ø§Ø±Ø§Øª Ù
عتبر ÙÛØ³Øª.",invalidEmbedCode:"کد درج Ù
عتبر ÙÛØ³Øª.",invalidLiveEmbedUrl:"ÙØ´Ø§ÙÛ Ø¯Ø±Ø¬ پخش Ø²ÙØ¯Ù Ù
عتبر ÙÛØ³Øª.",publicLivePageUrlCannotBeEmbeddedDirectly:"URL ØµÙØÙ Ù¾Ø®Ø´ Ø²ÙØ¯Ù آپارات بÙâØªÙÙØ§ÛÛ ÙØ§Ø¨Ù درج ÙÛØ³Øª.",pleaseProvideOfficialAparatLiveEmbedDisplayCode:"ÙØ·Ùا٠کد ÙÙ
Ø§ÛØ´ ÛØ§ درج رسÙ
Û Ø¢Ù¾Ø§Ø±Ø§Øª Ø¨Ø±Ø§Û Ù¾Ø®Ø´ Ø²ÙØ¯Ù را از Ù¾ÙÙ ÙØ§ÛÙ Ù¾ÙØ§Ø³ آپارات Ø¯Ø±ÛØ§Ùت کرد٠٠سپس اÛÙØ¬Ø§ ÙØ§Ø±Ø¯ Ú©ÙÛØ¯.",preview:"Ù¾ÛØ´âÙÙ
Ø§ÛØ´",save:"Ø°Ø®ÛØ±Ù",cancel:"Ø§ÙØµØ±Ø§Ù",delete:"ØØ°Ù",helpVideo:" کد iframe ارائÙâØ´Ø¯Ù ØªÙØ³Ø· آپارات را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯.",helpLive:"کد iframe ارائÙâØ´Ø¯Ù ØªÙØ³Ø· آپارات را ÙØ§Ø±Ø¯ Ú©ÙÛØ¯."},en:{aparat:"Aparat",aparatVideo:"Aparat Video",aparatLive:"Aparat Live",embedUrl:"Embed URL",embedCode:"Embed Code",video:"Video",live:"Live",invalidAparatUrl:"The Aparat URL is not valid.",invalidEmbedCode:"The embed code is not valid.",invalidLiveEmbedUrl:"The live embed URL is not valid.",publicLivePageUrlCannotBeEmbeddedDirectly:"A public Aparat live-page URL cannot be embedded directly.",pleaseProvideOfficialAparatLiveEmbedDisplayCode:"Please provide the official Aparat live embed or display code.",preview:"Preview",save:"Save",cancel:"Cancel",delete:"Delete",helpVideo:"Enter an Aparat video embed URL or paste the iframe code provided by Aparat.",helpLive:"Enter the official Aparat live embed URL or paste the iframe code provided by Aparat."},ar:{aparat:"Ø£Ø¨ÙØ§Ø±Ø§Øª",aparatVideo:"ÙÙØ¯ÙÙ Ø£Ø¨ÙØ§Ø±Ø§Øª",aparatLive:"بث Ø£Ø¨ÙØ§Ø±Ø§Øª اÙÙ
باشر",embedUrl:"رابط Ø§ÙØªØ¶Ù
ÙÙ",embedCode:"ÙÙØ¯ Ø§ÙØªØ¶Ù
ÙÙ",video:"ÙÙØ¯ÙÙ",live:"Ù
باشر",invali
1dAparatUrl:"رابط Ø£Ø¨ÙØ§Ø±Ø§Øª ØºÙØ± ØµØ§ÙØ.",invalidEmbedCode:"ÙÙØ¯ Ø§ÙØªØ¶Ù
ÙÙ ØºÙØ± ØµØ§ÙØ.",invalidLiveEmbedUrl:"رابط تضÙ
ÙÙ Ø§ÙØ¨Ø« اÙÙ
باشر ØºÙØ± ØµØ§ÙØ.",publicLivePageUrlCannotBeEmbeddedDirectly:"ÙØ§ ÙÙ
Ù٠تضÙ
ÙÙ ØµÙØØ© Ø§ÙØ¨Ø« اÙÙ
باشر Ø§ÙØ¹Ø§Ù
Ø© ÙÙ Ø£Ø¨ÙØ§Ø±Ø§Øª Ù
باشرةÙ.",pleaseProvideOfficialAparatLiveEmbedDisplayCode:"ÙØ±Ø¬Ù تÙÙÙØ± ÙÙØ¯ Ø§ÙØªØ¶Ù
ÙÙ Ø£Ù Ø§ÙØ¹Ø±Ø¶ Ø§ÙØ±Ø³Ù
Ù ÙÙØ¨Ø« اÙÙ
باشر.",preview:"Ù
عاÙÙØ©",save:"ØÙظ",cancel:"Ø¥ÙØºØ§Ø¡",delete:"ØØ°Ù",helpVideo:"أدخ٠رابط تضÙ
ÙÙ ÙÙØ¯ÙÙ Ø£Ø¨ÙØ§Ø±Ø§Øª Ø£Ù Ø§ÙØµÙ ÙÙØ¯ iframe Ø§ÙØ°Ù ÙÙÙÙØ±Ù Ø£Ø¨ÙØ§Ø±Ø§Øª.",helpLive:"أدخ٠رابط Ø§ÙØªØ¶Ù
ÙÙ Ø§ÙØ±Ø³Ù
Ù ÙÙØ¨Ø« اÙÙ
باشر Ø£Ù Ø§ÙØµÙ ÙÙØ¯ iframe Ø§ÙØ°Ù ÙÙÙÙØ±Ù Ø£Ø¨ÙØ§Ø±Ø§Øª."},ru:{aparat:"Aparat",aparatVideo:"Ðидео Aparat",aparatLive:"ТÑанÑлÑÑÐ¸Ñ Aparat",embedUrl:"URL вÑÑавки",embedCode:"Ðод вÑÑавки",video:"Ðидео",live:"ТÑанÑлÑÑиÑ",invalidAparatUrl:"URL Aparat недейÑÑвиÑелен.",invalidEmbedCode:"Ðод вÑÑавки недейÑÑвиÑелен.",invalidLiveEmbedUrl:"URL вÑÑавки пÑÑмой ÑÑанÑлÑÑии недейÑÑвиÑелен.",publicLivePageUrlCannotBeEmbeddedDirectly:"ÐÑблиÑнÑÑ ÑÑÑаниÑÑ Ð¿ÑÑмой ÑÑанÑлÑÑии Aparat нелÑÐ·Ñ Ð²ÑÑавиÑÑ Ð½Ð°Ð¿ÑÑмÑÑ.",pleaseProvideOfficialAparatLiveEmbedDisplayCode:"ÐожалÑйÑÑа, ÑкажиÑе оÑиÑиалÑнÑй код вÑÑавки или оÑобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð¿ÑÑмой ÑÑанÑлÑÑии Aparat.",preview:"ÐÑедпÑоÑмоÑÑ",save:"СоÑ
ÑаниÑÑ",cancel:"ÐÑмена",delete:"УдалиÑÑ",helpVideo:"ÐведиÑе URL вÑÑавки видео Aparat или вÑÑавÑÑе iframe-код, пÑедоÑÑавленнÑй Aparat.",helpLive:"ÐведиÑе оÑиÑиалÑнÑй URL вÑÑавки пÑÑмой ÑÑанÑлÑÑии Aparat или вÑÑавÑÑе iframe-код, пÑедоÑÑавленнÑй Aparat."},tr:{aparat:"Aparat",aparatVideo:"Aparat Videosu",aparatLive:"Aparat Canlı Yayın",embedUrl:"Gömme URL'si",embedCode:"Gömme Kodu",video:"Video",live:"Canlı",invalidAparatUrl:"Aparat URL'si geçerli deÄil.",invalidEmbedCode:"Gömme kodu geçerli deÄil.",invalidLiveEmbedUrl:"Canlı yayın gömme URL'si geçerli deÄil.",publicLivePageUrlCannotBeEmbeddedDirectly:"Genel Aparat canlı yayın sayfası URL'si doÄrudan gömülemez.",pleaseProvideOfficialAparatLiveEmbedDisplayCode:"Lütfen Aparat'ın resmi canlı yayın gömme veya gösterim kodunu saÄlayın.",preview:"Ãn izleme",save:"Kaydet",cancel:"İptal",delete:"Sil",helpVideo:"Aparat video gömme URL'sini girin veya Aparat'ın saÄladıÄı iframe kodunu yapıÅtırın.",helpLive:"Resmi Aparat canlı yayın gömme URL'sini girin veya Aparat'ın saÄladıÄı iframe kodunu yapıÅtırın."}};function n(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function o(e,t){let r=e.match(RegExp(`${t}\\s*=\\s*(["'])(.*?)\\1`,"i"));return r?.[2]??""}function d(e){return o(e,"class").split(/\s+/).includes(i)}function c(e){return e.includes(a)||/<div\b[^>]*\bclass\s*=\s*(["'])[^"']*\baparat-block\b[^"']*\1/i.test(e)}function u(e){try{return new URL(e)}catch{return null}}function m(e){return e.replace(/\/+$/,"")}function p(e){return r.includes(e.hostname)}function h(e){let t=m(e.pathname).split("/").filter(Boolean);return 7===t.length&&s.every((e,r)=>t[r]===e)&&t[4]&&"vt"===t[5]&&"frame"===t[6]?`${e.origin}/${t.join("/")}${e.search}`:null}function f(e){let t=m(e.pathname).split("/").filter(Boolean);return 3===t.length&&"embed"===t[0]&&"live"===t[1]&&t[2]?`${e.origin}/${t.join("/")}${e.search}`:null}function b(e,t){let r=e.trim();if(!r)return null;let a=u(r);return a&&"https:"===a.protocol&&p(a)?"live"===t?f(a):"video"===t?h(a):h(a)??f(a):null}function g(e,t){let r,a=e.trim();return a?b(((r=a.match(/<iframe\b([^>]*)>/i))&&o(r[1]??"","src").trim()||null)??a,t):null}function v(e){return`<div class="${i}" data-aparat-mode="${n(e.mode)}" data-aparat-embed-url="${n(e.embedUrl)}">${n(e.embedUrl)}</code></div>`}function x(e){return e&&(e.includes("<iframe")||c(e))?e.replace(/<(iframe|aparat-block|div)\b([^>]*)>(?:[\s\S]*?<\/\1>)?/gi,(e,t,r)=>{if("div"===t.toLowerCase()&&!d(r))return e;if(t.toLowerCase()===a||"div"===t.toLowerCase()){let e=o(r,"data-aparat-mode"),t=b(o(r,"data-aparat-embed-url"),e);return t&&("video"===e||"live"===e)?v({mode:e,embedUrl:t}):""}let i=b(o(r,"src"));return i?v({mode:null!==b(i,"live")?"live":"video",embedUrl:i}):""}):e}function w(e){let t=x(e);return t&&c(t)?t.replace(/<(aparat-block|div)\b([^>]*)>(?:[\s\S]*?<\/\1>)?/gi,(e,t,r)=>{var a;let i;if("div"===t.toLowerCase()&&!d(r))return e;let s=o(r,"data-aparat-mode"),l=o(r,"data-aparat-embed-url");if("video"!==s&&"live"!==s)return"";let c=b(l,s);return c?(i="live"===(a={mode:s,embedUrl:c}).mode?"Aparat Live":"Aparat Video",`<iframe src="${n(a.embedUrl)}" title="${n(i)}" loading="lazy" allow="autoplay; fullscreen; encrypted-media; picture-in-picture" allowfullscreen style="display:block;width:100%;aspect-ratio:16 / 9;border:0;background:#000;"></iframe>`):""}):t}e.s(["createAparatBlockPlaceholderHtml",0,v,"getAparatValidationError",0,function(e,t,r){let a=l[r],i=e.trim(),s=/<iframe\b/i.test(i);if(!i)return a.invalidEmbedCode;let n=u(i);return"live"===t&&n&&function(e){let t=u(e.trim());if(!t||"https:"!==t.protocol||!p(t))return!1;
1let r=m(t.pathname).split("/").filter(Boolean);return 2===r.length&&"live"===r[1]}(i)?`${a.publicLivePageUrlCannotBeEmbeddedDirectly} ${a.pleaseProvideOfficialAparatLiveEmbedDisplayCode}`:g(i,t)?null:s?a.invalidEmbedCode:"live"===t?a.invalidLiveEmbedUrl:a.invalidAparatUrl},"normalizeAparatEmbedsInHtml",0,x,"parseAparatEmbedInput",0,g,"renderAparatEmbedsInHtml",0,w],816429);let y=new Set(["var(--surface-800)","var(--surface-900)","#252a33","#171a21","rgb(37,42,51)","rgb(23,26,33)","rgba(37,42,51,1)","rgba(23,26,33,1)"]),j=/<[^>]*>/g,N=/<[a-z][\s\S]*>/i,C=/^(#[0-9a-f]{3,8}|rgba?\(\s*[\d.%]+\s*,\s*[\d.%]+\s*,\s*[\d.%]+(?:\s*,\s*(?:0|1|0?\.\d+))?\s*\)|hsla?\(\s*[\d.]+(?:deg|rad|turn)?\s*,\s*[\d.]+%\s*,\s*[\d.]+%(?:\s*,\s*(?:0|1|0?\.\d+))?\s*\))$/i,k=new Set(["strong","b","em","i","u","span"]);function S(e){return e.replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/</gi,"<").replace(/>/gi,">")}function _(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function L(e){return e.replace(/&(?:amp;)*nbsp;/gi," ")}function A(e){let t=e.indexOf("/api/uploads/download");return t>=0?e.slice(t):null}function E(e){let t=e.indexOf("/storage/v1/object/public/");return t>=0?e.slice(t):null}function P(e,t,r){let a=RegExp(`${t}=(["'])(.*?)\\1`,"i");return a.test(e)?e.replace(a,`${t}="${r}"`):`${e} ${t}="${r}"`.trim()}function I(e){return e&&e.includes("style=")?x(L(e.replace(/\sstyle=(["'])(.*?)\1/gi,(e,t,r)=>{let a=r.split(";").map(e=>e.trim()).filter(Boolean),i=a.filter(e=>{let t;return!function(e){let t=e.indexOf(":");if(-1===t)return!1;let r=e.slice(0,t).trim().toLowerCase();if("background"!==r&&"background-color"!==r)return!1;let a=e.slice(t+1).replace(/\s+/g,"").trim().toLowerCase();return y.has(a)}(e)&&(-1===(t=e.indexOf(":"))||"font-family"!==e.slice(0,t).trim().toLowerCase())});return i.length===a.length?e:0===i.length?"":` style=${t}${i.join("; ")}${t}`}))):x(L(e))}function $(e){let r=S(e.trim()),a=A(r);if(a)return a;let i=E(r);return i?(0,t.resolveStorageUrl)(i):r}function U(e){let r=I(e);if(!r)return r;let a=r.includes("<img")?r.replace(/<img\b([^>]*?)\bsrc=(["'])(.*?)\2([^>]*?)>/gi,(e,t,r,a,i)=>{let s=$(a);return`<img${t}src=${r}${s}${r}${i}>`}):r;return a.includes("<a")?a.replace(/<a\b([^>]*?)\bhref=(["'])(.*?)\2([^>]*?)>/gi,(e,r,a,i,s)=>{let l=function(e){let r=S(e.trim()),a=A(r);if(a)return a;let i=E(r);return i?(0,t.resolveStorageUrl)(i):r}(i),n=`${r}href=${a}${l}${a}${s}`;return(A(i)||E(i))&&(n=P(n,"target","_blank"),n=P(n,"rel","noreferrer")),`<a ${n.trim()}>`}):a}e.s(["extractRichTextImageSrcs",0,function(e){if(!e||!e.includes("<img"))return[];let t=new Set,r=[];return e.replace(/<img\b([^>]*?)\bsrc=(["'])(.*?)\2([^>]*?)>/gi,(e,a,i,s)=>{let l=$(s);return t.has(l)||(t.add(l),r.push(l)),""}),r},"hasMeaningfulRichText",0,function(e){return!!S(x(e??"").replace(/<aparat-block\b[^>]*>[\s\S]*?<\/aparat-block>/gi," Aparat ").replace(/<div\b(?=[^>]*\bclass\s*=\s*(["'])[^"']*\baparat-block\b[^"']*\1)[^>]*>[\s\S]*?<\/div>/gi," Aparat ").replace(j," ").replace(/ /gi," ").replace(/\s+/g," ").trim())},"renderInlineRichTextHtml",0,function(e){let t=I(e.trim());if(!t)return"";if(!N.test(t))return _(t);let r="",a=0;return t.replace(j,(e,i)=>(r+=_(t.slice(a,i)),r+=function(e){let t=e.match(/^<\s*(\/?)\s*([a-z0-9]+)([^>]*)\/?\s*>$/i);if(!t)return"";let r=!!t[1],a=t[2].toLowerCase(),i=t[3]??"";return"br"===a?"<br>":"p"===a||"div"===a?r?" ":"":k.has(a)?r?`</${a}>`:"span"===a?`<span${function(e){let t=e.match(/\sstyle=(["'])(.*?)\1/i);if(!t)return"";let r=t[2].split(";").map(e=>e.trim()).find(e=>e.toLowerCase().startsWith("color:"));if(!r)return"";let a=r.slice(r.indexOf(":")+1).trim();return C.test(a)?` style="color: ${_(a)}"`:""}(i)}>`:`<${a}>`:""}(e),a=i+e.length,"")),(r+=_(t.slice(a))).replace(/\s+/g," ").trim()},"resolveRichTextEditorMediaUrlsInHtml",0,function(e){return U(e)},"resolveRichTextImageSrc",0,$,"resolveRichTextMediaUrlsInHtml",0,function(e){var t;let r;return w((t=U(e),r="<p\\b[^>]*>(?:\\s| |\\u00a0|<br\\s*\\/?\\s*>)*<\\/p>",t.replace(RegExp(`^\\s*${r}`,"i"),"").replace(RegExp(`${r}\\s*$`,"i"),"")))},"sanitizeRichTextEditorHtml",0,I],844590)},242410,797346,e=>{"use strict";var t=e.i(844590);let r=/<!--sat-nav-featured:([^>]*)-->/,a=/&(?:amp;)*nbsp;|&#(?:160|xA0);/gi;function i(e){return e.replace(/\\+(?=<)/g,"").replace(a," ")}function s(e){let t=(e??"").replace(/\\+(?=<!--)/g,""),a=t.match(r);if(!a)return{html:i(t),meta:{title:"",subtitle:"",profileId:null}};let s={title:"",subtitle:"",profileId:null};try{let e=JSON.parse(decodeURIComponent(a[1])),t="number"==typeof e.profileId?e.profileId:Number(e.profileId);s={title:"string"==typeof e.title?e.title:"",subtitle:"string"==typeof e.subtitle?e.subtitle:"",profileId:Number.isFinite(t)&&t>0?t:null}}catch{s={title:"",subtitle:"",profileId:null}}return{html:i(t.replace(r,"").trim()),meta:s}}e.s(["parseFeaturedDescription",0,s],797346);let l=/<br\s*\/?>/gi,n=/<(p|div|li)\b[^>]*>/gi,o=/<\/(p|div|li)>/gi,d=/<\/?(ul|ol)\b[^>]*>/gi,c=/<(table|figure|img|video|iframe|aparat-block|blockquote|pre|h[1-6])\b/i,u=/(?:\s|\u00a0|&(?:amp;)?nbsp;|&#(?:160|xA0);)+$/i;function m(e){return e.replace(u,"").trim()}e.s(["buildFeaturedDescription",0,function(e,t,r,a){let i=s(e).html.trim(),l={title:t.trim(),subtitle:r.trim(),profileId:Number.isFinite(a)&&Number(a)>0?Number(a):null};return l.title||l.subtitle||null!=l.profileId?"<!--sat-nav-featured:"+encodeURIComponent(JSON.stringify(l))+"-->"+i:i},"hasFeaturedMenuContent",0,function(e){let t=s(e.description);return!!(e.enabled||e.image?.trim()||e.file?.trim()||t.html||t.meta.title||t.meta.subtitle||null!=t.meta.profileId)},"resolveNavbarFeaturedContent",0,function(e){var r;let a,i=s(e.mega_menu_featured_description);return{image:e.mega_menu_featured_image,title:i.meta.title||e.label,subtitle:i.meta.subtitle,profileId:i.meta.profileId,html:(0,t.resolveRichTextMediaUrlsInHtml)(i.html),descriptionItems:(r=i.html,!(a=(0,t.s
1anitizeRichTextEditorHtml)(r??"").trim())||c.test(a)?[]:a.replace(l,"\n").replace(d,"\n").replace(n,"").replace(o,"\n").split("\n").map(m).filter(e=>e.length>0).filter(e=>(0,t.hasMeaningfulRichText)(e)).map(e=>(0,t.resolveRichTextMediaUrlsInHtml)(e)))}}],242410)},317447,e=>{"use strict";var t=e.i(867299);e.s(["Loader2",()=>t.default])},267088,e=>{"use strict";var t=e.i(449585);e.s(["Copy",()=>t.default])},326036,e=>{"use strict";async function t(e){if("u">typeof navigator&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if("u"<typeof document)return!1;try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.opacity="0",t.style.pointerEvents="none",document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);let r=document.execCommand("copy");return document.body.removeChild(t),r}catch{return!1}}e.s(["copyToClipboard",0,t])},420692,e=>{"use strict";let t="in_progress",r={normal:{fa:"خبر عادÛ",en:"Normal Post",ar:"Ù
ÙØ´Ùر عادÙ",ru:"ÐбÑÑÐ½Ð°Ñ Ð¿ÑбликаÑиÑ",tr:"Normal yazi"},in_progress:{fa:"در_Ø¬Ø±ÛØ§Ù_Ø¨Ø§Ø´ÛØ¯",en:"stay_informed",ar:"ÙÙØ¯_اÙÙ
تابعة",ru:"Ð_пÑоÑеÑÑе",tr:"guncel_kalin"}};function a(e,t){return r[e][t]}e.s(["getInProgressPostLabel",0,function(e){return a(t,e)},"getPostTypeLabel",0,a,"isInProgressPostType",0,function(e){return e===t}])},67358,e=>{"use strict";let t=/\.(mp4|webm|mov|m4v|avi|mkv)(?:[?#].*)?$/i;function r(e){return t.test((e??"").trim())}e.s(["getGalleryCoverImage",0,function(e){return e.map(e=>e.image?.trim()).filter(Boolean).find(e=>!r(e))??null},"getGalleryPrimaryMedia",0,function(e){return e.map(e=>e.image?.trim()).filter(Boolean)[0]??null},"inferGalleryMediaType",0,function(e){let t=e.map(e=>e.image?.trim()).filter(Boolean);return 0===t.length?"image":t.every(e=>r(e))?"video":"image"},"isVideoMediaUrl",0,r])},53655,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(613256),i=e.i(1789),s=e.i(141983),l=e.i(94830),n=e.i(808558),o=e.i(220378),d=e.i(519455),c=e.i(776639),u=e.i(779452),m=e.i(67358),p=e.i(261001),h=e.i(420692);function f(e,t){return 0===t?0:Math.min(Math.max(e,0),t-1)}function b({slides:e,title:m,initialIndex:g,imageOverlays:v,onOpenChange:x}){let{isRtl:w,language:y}=(0,p.useLanguage)(),[j,N]=(0,r.useState)(()=>f(g,e.length)),C=f(j,e.length),k=e[C],S=v[C],_=S?.title?.trim()||null,L=S?.subtitle?.trim()||null,A=!!(_||L||S?.showStayInformedCard),E=(0,h.getInProgressPostLabel)(y),P=w?i.ChevronRight:a.ChevronLeft,I=w?a.ChevronLeft:i.ChevronRight;return(0,t.jsxs)(c.DialogContent,{showCloseButton:!1,className:"w-auto max-w-[99vw] border-white/10 bg-transparent p-0 shadow-none",children:[(0,t.jsx)(c.DialogTitle,{className:"sr-only",children:m}),(0,t.jsxs)("div",{className:"relative flex h-[100vh] w-[100vw] items-center justify-center bg-black/80",onClick:()=>x(!1),children:[(0,t.jsx)(c.DialogClose,{render:(0,t.jsx)(d.Button,{variant:"secondary",size:"icon",className:"absolute right-4 top-4 z-10 rounded-full border border-black/15 bg-white/50 text-white hover:bg-white/85 hover:text-black","aria-label":"Close"}),children:(0,t.jsx)(n.XIcon,{className:"size-5"})}),(0,t.jsxs)("div",{className:"relative w-full max-w-6xl px-4 sm:px-8",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"relative rounded-2xl bg-black/10",children:[e.length>0?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsxs)("div",{className:"relative inline-block w-auto max-w-[96vw] overflow-hidden rounded-2xl",children:[k?.type==="video"?(0,t.jsx)("video",{src:(0,u.resolveStorageUrl)(k.src),controls:!0,preload:"metadata",className:"block max-h-[85vh] w-auto max-w-[96vw] rounded-2xl bg-black object-contain shadow-2xl"}):(0,t.jsx)(o.AppImage,{src:k?.src,variant:"lg",alt:k?.alt||`${m} - ${C+1}`,loading:"eager",decoding:"async",className:"block max-h-[85vh] w-auto max-w-[96vw] object-contain shadow-2xl"}),A?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 top-[40%] z-10 flex items-end bg-gradient-to-t from-black/80 via-black/35 to-transparent px-[clamp(0.85rem,2vw,1.5rem)] pb-[clamp(1.1rem,2.8vw,1.65rem)] pt-[clamp(0.5rem,1.5vw,0.9rem)]",children:(0,t.jsxs)("div",{className:`my-auto flex w-full flex-col items-center justify-end gap-[clamp(0.5rem,2vw,0.9rem)] ${w?"text-right":"text-left"}`,children:[_?(0,t.jsx)("h4",{className:"line-clamp-2 text-[clamp(1.25rem,4vw,2rem)] font-bold leading-[1.1] text-white",children:_}):null,L?(0,t.jsx)("p",{className:"line-clamp-2 text-[clamp(0.95rem,2.4vw,1.1rem)] font-medium leading-[1.35] text-brand-100",children:L}):null,S?.showStayInformedCard?(0,t.jsx)("div",{className:`absolute bottom-4 flex w-full justify-start ${w?"right-4":"left-4"}
1`,children:(0,t.jsxs)("span",{className:"inline-flex w-fit rounded-full border border-brand-300/40 bg-brand-400/85 px-[clamp(0.7rem,1.8vw,1rem)] py-[clamp(0.2rem,0.8vw,0.35rem)] text-[clamp(0.68rem,1.6vw,0.875rem)] text-white backdrop-blur-sm",children:["#",E]})}):null]})}):null]})})}):(0,t.jsx)("div",{className:"flex max-h-[80vh] min-h-[320px] items-center justify-center bg-black/10 px-6 text-center text-sm text-white/80",children:"No media available."}),e.length>1?(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-between px-3 sm:px-6",children:[(0,t.jsx)(d.Button,{type:"button",variant:"secondary",size:"icon",className:"cursor-pointer rounded-full border border-white/15 bg-white/30 text-white hover:bg-white/80 hover:text-black",onClick:()=>{N(t=>(t-1+e.length)%e.length)},"aria-label":"Previous media",children:(0,t.jsx)(P,{className:"size-5"})}),(0,t.jsx)(d.Button,{type:"button",variant:"secondary",size:"icon",className:"cursor-pointer rounded-full border border-white/15 bg-white/30 text-white hover:bg-white/80 hover:text-black",onClick:()=>{N(t=>(t+1)%e.length)},"aria-label":"Next media",children:(0,t.jsx)(I,{className:"size-5"})})]}):null]}),e.length>1?(0,t.jsx)("div",{className:"mt-4 overflow-x-auto pb-2",children:(0,t.jsx)("div",{className:"flex min-w-max justify-center gap-3 px-2",children:e.map((e,r)=>(0,t.jsx)("button",{type:"button",onClick:()=>N(r),className:`shrink-0 overflow-hidden rounded-lg border transition-all ${C===r?"border-brand-500 ring-2 ring-brand-500/40":"border-white/20 opacity-70 hover:opacity-100"}`,"aria-label":`Select ${"video"===e.type?"video":"image"} ${r+1}`,children:(0,t.jsxs)("div",{className:"relative h-20 w-28 overflow-hidden bg-black",children:["video"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("video",{src:(0,u.resolveStorageUrl)(e.src),muted:!0,playsInline:!0,preload:"metadata",className:"h-full w-full object-cover"}),(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 text-white",children:(0,t.jsx)(l.Video,{className:"size-5"})})]}):(0,t.jsx)(o.AppImage,{src:e.src,variant:"thumbnail",alt:e.alt||`thumbnail-${r+1}`,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"}),(0,t.jsx)("div",{className:"absolute left-2 top-2 rounded-full bg-white/90 p-1 text-slate-900 shadow-sm",children:"video"===e.type?(0,t.jsx)(l.Video,{className:"size-3.5"}):(0,t.jsx)(s.ImageIcon,{className:"size-3.5"})})]})},`${e.src}-thumb-${r}`))})}):null]})]})]})}e.s(["ImageGalleryDialog",0,function({open:e,onOpenChange:r,images:a,title:i,initialIndex:s=0,imageOverlays:l=[],mediaItems:n}){let o=(n?.length?n:a.map(e=>({src:e}))).reduce((e,t)=>{let r=t.src.trim();return!r||e.some(e=>e.src===r)||e.push({src:r,alt:t.alt?.trim()||null,type:t.type??((0,m.isVideoMediaUrl)(r)?"video":"image")}),e},[]),d=`${e?"open":"closed"}-${s}-${o.map(e=>e.src).join("|")}`;return(0,t.jsx)(c.Dialog,{open:e,onOpenChange:r,children:(0,t.jsx)(b,{slides:o,title:i,initialIndex:s,imageOverlays:l,onOpenChange:r},d)},d)}])},420926,716926,e=>{"use strict";var t=e.i(174394);e.s(["Star",()=>t.default],420926),e.s(["SCORE_VALUES",0,[1,2,3,4,5],"createEmptyRatingSummary",0,function(){return{averageRating:0,totalRatings:0,breakdown:{1:0,2:0,3:0,4:0,5:0}}}],716926)},317954,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(613256),i=e.i(1789),s=e.i(141983),l=e.i(94830),n=e.i(220378),o=e.i(53655),d=e.i(519455),c=e.i(779452),u=e.i(261001),m=e.i(67358);e.s(["GalleryImageCarousel",0,function({images:e,galleryTitle:p,mediaType:h="image",videoCoverImage:f}){let{isRtl:b}=(0,u.useLanguage)(),g=e.filter(e=>e.image?.trim()),[v,x]=(0,r.useState)(0),[w,y]=(0,r.useState)(!1),j=(0,r.useRef)([]),N=b?i.ChevronRight:a.ChevronLeft,C=b?a.ChevronLeft:i.ChevronRight,k=g.map((e,t)=>{let r="video"===h||(0,m.isVideoMediaUrl)(e.image);return{src:e.image,type:r?"video":"image",alt:p?`${p} - ${t+1}`:`Gallery media ${t+1}`}});if((0,r.useEffect)(()=>{j.current[v]?.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[v]),!g.length)return(0,t.jsx)("p",{className:"rounded-xl border border-dashed border-surface-300 px-4 py-8 text-center text-sm text-ink-muted",children:"video"===h?"No videos have been added to this gallery yet.":"No images have been added to this gallery yet."});let S=g[v],_="video"===h||(0,m.isVideoMediaUrl)(S.image),L=_?(0,c.resolveStorageUrl)(S.image):"",A=f?.trim()?(0,c.resolveStorageUrl)(f):void 0,E=p?`${p} - ${v+1}`:`Gallery media ${v+1}`;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"relative mx-auto flex min-h-[150px] max-h-[420px] w-auto max-w-3xl items-center overflow-hidden rounded-xl px-8 md:px-14",children:[_?(0,t.jsx)("video",{src:L,controls:!0,preload:"metadata",poster:A,className:"mx-auto block h-full w-full rounded-xl bg-black object-contain py-4"}):(0,t.jsx)("button",{type:"button",onClick:()=>y(!0),className:"mx-auto block max-w-full cursor-pointer","aria-label":`Open media ${v+1} in fullscreen`,children:(0,t.jsx)(n.AppImage,{src:S.image,alt:E,loading:"eager",className:"mx-auto block h-fit max-h-[420px] w-fit max-w-full rounded-xl border border-1 border-surface-900 shadow-md object-contain"})}),g.length>1?(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-between",children:[(0,t.jsx)(d.Button,{variant:"outline",onClick:()=>{x(e=>(e-1+g.length)%g.length)},className:"pointer-events-auto z-10 size-6 cursor-pointer rounded-full border border-surface-700 bg-white text-surface-900 shadow-sm hover:bg-white md:size-8",children:(0,t.jsx)(N,{className:"size-5"})}),(0,t.jsx)(d.Button,{variant:"outline",onClick:()=>{x(e=>(e+1)%g.length)},className:"pointer-events-auto z-10 size-6 cursor-pointer rounded-full border border-surface-700 bg-white text-surface-900 shadow-sm hover:bg-white md:size-8",children:(0,t.jsx)(C,{className:"size-5"})})]}):null]}),g.length>1?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"flex min-w-max justify-center gap-3 px-4",children:g.map((e,r)=>{let a="video"===h||(0,m.isVideoMediaUrl)(e.image);return(0,t.jsxs)("button",{ref:e=>{j.current[r]=e},onClick:()=>x(r),className:`relative shrink-0 overflow-hidden rounded-lg border transition-all ${v===r?"border-brand-500 ring-2 ring-brand-500/30":"border-surface-300 opacity-70 hover:opacity-100"}`,children:[a?(0,t.jsxs)("div",{className:"relative h-20 w-28 overflow-hidden bg-slate-950",children:[(0,t.jsx)("video",{src:(0,c.resolveStorageUrl)(e.image),muted:!0,playsInl
1ine:!0,preload:"metadata",className:"h-full w-full object-cover"}),(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-950/15 text-white",children:(0,t.jsx)(l.Video,{className:"size-6"})})]}):(0,t.jsx)(n.AppImage,{src:e.image,alt:`thumbnail-${r+1}`,loading:"lazy",className:"h-20 w-28 object-cover"}),(0,t.jsx)("div",{className:"absolute left-2 top-2 rounded-full bg-white/90 p-1 text-slate-900 shadow-sm",children:a?(0,t.jsx)(l.Video,{className:"size-3.5"}):(0,t.jsx)(s.ImageIcon,{className:"size-3.5"})})]},e.id)})})}):null]}),(0,t.jsx)(o.ImageGalleryDialog,{open:w,onOpenChange:y,images:g.map(e=>e.image),mediaItems:k,title:p||"Gallery media",initialIndex:v})]})}])},19335,e=>{"use strict";var t=e.i(511795);class r{supabase;constructor(e){this.supabase=e}async getDashboardStats(e){let t=e?.workGroupIds?[...new Set(e.workGroupIds.map(e=>Number(e)).filter(e=>Number.isFinite(e)))]:null,r=t?await this.getPostIdsForWorkGroups(t):null,a=null!==r&&0===r.length,[i,s,l,n]=await Promise.all([a?Promise.resolve({data:[],error:null}):r?this.supabase.from("posts").select("id, title, published_at").in("id",r):this.supabase.from("posts").select("id, title, published_at"),a?Promise.resolve({data:[],error:null}):r?this.supabase.from("post_views_by_day").select("post_id, date, views").in("post_id",r):this.supabase.from("post_views_by_day").select("post_id, date, views"),r?Promise.resolve({data:[],error:null}):this.supabase.from("site_visits_by_day").select("date, visits"),r?Promise.resolve({data:[],error:null}):this.supabase.from("cms_session_users_by_month").select("month, users")]);i.error&&this.throwSupabaseError(i.error),s.error&&this.throwSupabaseError(s.error);let o=i.data??[],d=l.error?[]:l.data??[],c=t?await this.countActiveCmsUsers(t):await this.countActiveCmsUsers(),u=n.error?[]:n.data??[],m=s.data??[],p=this.aggregateViewsByPost(m.filter(e=>Number.isFinite(Number(e.post_id))).map(e=>({post_id:Number(e.post_id),views:e.views}))),h=new Map(o.map(e=>[e.id,e])),f=this.buildTopPosts(p,h),{weeklyPublishAverage:b,monthlyPublishAverage:g}=this.computePublishAverages(o),v=[...p.values()].reduce((e,t)=>e+t,0),x=r?this.buildWeeklyPostViews(m):this.buildWeeklyViews(d),w=this.formatDateKey(new Date),y=x.find(e=>e.date===w)?.views??0,j=this.formatMonthKey(new Date),N=r?this.sumPostViewsForMonth(m,j):this.sumSiteVisitsForMonth(d,j),C=this.countPostsForMonth(o,j),k=r?await this.buildScopedMonthlyStats(m,t??[]):this.buildMonthlyStats(d,u);return{totalPosts:o.length,totalViews:v,topPosts:f,weeklyPublishAverage:b,monthlyPublishAverage:g,viewsToday:y,weeklyViews:x,monthlyViews:N,newContents:C,monthlyStats:k,audienceCount:c}}async getPostStats(e){let[t,r]=await Promise.all([this.supabase.from("post_views_total").select("views").eq("post_id",e).single(),this.supabase.from("post_views_by_day").select("date, views").eq("post_id",e).order("date",{ascending:!0})]);return t.error&&this.throwSupabaseError(t.error),r.error&&this.throwSupabaseError(r.error),{postId:e,views:t.data?.views??0,viewsByDay:r.data??[]}}async trackPostView(e){let{error:t}=await this.supabase.from("post_view_events").insert({post_id:e.postId,viewed_at:new Date().toISOString()});t&&this.throwSupabaseError(t)}async countActiveCmsUsers(e){let t=new Date(Date.now()-9e5).toISOString(),{data:r,error:a}=await this.supabase.from("cms_session_activity").select("phone").gte("active_at",t);if(a)return 0;let i=new Set((r??[]).map(e=>"string"==typeof e.phone?e.phone.trim():"").filter(Boolean));if(!e)return i.size;let s=await this.getProfilePhonesForWorkGroups(e);return[...i].filter(e=>s.has(e)).length}aggregateViewsByPost(e){let t=new Map;for(let r of e){let e=Number(r.post_id);Number.isFinite(e)&&t.set(e,(t.get(e)??0)+Number(r.views??0))}return t}async aggregateViewsFromPostAnalytics(){let{data:e,error:t}=await this.supabase.from("post_analytics").select("post_id, views");return t&&this.throwSupabaseError(t),this.aggregateViewsByPost(e??[])}async getPostIdsForWorkGroups(e){if(0===e.length)return[];let[{data:t,error:r},{data:a,error:i}]=await Promise.all([this.supabase.from("posts").select("id").eq("all_work_group_ids",!0),this.supabase.from("post_work_groups").select("post_id").in("work_group_id",e)]);return r&&this.throwSupabaseError(r),i&&this.throwSupabaseError(i),[...new Set([...(t??[]).map(e=>Number(e.id)).filter(e=>Number.isFinite(e)),...(a??[]).map(e=>Number(e.post_id)).filter(e=>Number.isFinite(e))])]}buildWeeklyPostViews(e){let t=new Map;for(let r of e)r.date&&t.set(r.date,(t.get(r.date)??0)+Number(r.views??0));return Array.from({length:7},(e,t)=>{let r=new Date;return r.setDate(r.getDate()-(6-t)),r}).map(e=>{let r=this.formatDateKey(e);return{label:new Intl.DateTimeFormat("fa-IR",{weekday:"short"}).format(e),date:r,views:t.get(r)??0}})}buildTopPosts(e,t){return[...e.entries()].sort((e,t)=>
1t[1]-e[1]).slice(0,10).map(([e,r])=>{let a=t.get(e);return{postId:e,postTitle:a?.title??`پست #${e}`,views:r,publishedAt:a?.published_at??null}})}computePublishAverages(e){let t=Date.now(),r=t-2592e6,a=t-15552e6,i=0,s=0;for(let t of e){if(!t.published_at)continue;let e=new Date(t.published_at).getTime();Number.isFinite(e)&&(e>=r&&(i+=1),e>=a&&(s+=1))}return{weeklyPublishAverage:i/(30/7),monthlyPublishAverage:s/6}}buildWeeklyViews(e){let t=new Map;for(let r of e)r.date&&t.set(r.date,(t.get(r.date)??0)+Number(r.visits??0));return Array.from({length:7},(e,t)=>{let r=new Date;return r.setDate(r.getDate()-(6-t)),r}).map(e=>{let r=this.formatDateKey(e);return{label:new Intl.DateTimeFormat("fa-IR",{weekday:"short"}).format(e),date:r,views:t.get(r)??0}})}buildMonthlyStats(e,t){return Array.from({length:6},(e,t)=>{let r=new Date;return r.setDate(1),r.setMonth(r.getMonth()-(5-t)),r}).map(r=>{let a=this.formatMonthKey(r);return{label:new Intl.DateTimeFormat("fa-IR",{month:"long"}).format(r),month:a,visits:this.sumSiteVisitsForMonth(e,a),users:this.countSessionUsersForMonth(t,a)}})}sumSiteVisitsForMonth(e,t){return e.reduce((e,r)=>r.date?.startsWith(t)?e+Number(r.visits??0):e,0)}sumPostViewsForMonth(e,t){return e.reduce((e,r)=>r.date?.startsWith(t)?e+Number(r.views??0):e,0)}async buildScopedMonthlyStats(e,t){let r=Array.from({length:6},(e,t)=>{let r=new Date;return r.setDate(1),r.setMonth(r.getMonth()-(5-t)),r}),a=await this.countProfilesForWorkGroups(t);return r.map(t=>{let r=this.formatMonthKey(t);return{label:new Intl.DateTimeFormat("fa-IR",{month:"long"}).format(t),month:r,visits:this.sumPostViewsForMonth(e,r),users:a}})}async getProfilePhonesForWorkGroups(e){let t=await this.getProfileIdsForWorkGroups(e);if(0===t.size)return new Set;let{data:r,error:a}=await this.supabase.from("profiles").select("phone").in("id",[...t]);return a?new Set:new Set((r??[]).map(e=>"string"==typeof e.phone?e.phone.trim():"").filter(Boolean))}async countProfilesForWorkGroups(e){return(await this.getProfileIdsForWorkGroups(e)).size}async getProfileIdsForWorkGroups(e){if(0===e.length)return new Set;let[{data:t,error:r},{data:a,error:i}]=await Promise.all([this.supabase.from("profile_role_assignment_work_groups").select("assignment:profile_role_assignments(profile_id)").in("work_group_id",e),this.supabase.from("profile_work_groups").select("profile_id").in("work_group_id",e)]);if(r||i)return new Set;let s=new Set;for(let e of t??[]){let t=e.assignment,r=Array.isArray(t)?t[0]?.profile_id:t?.profile_id;r&&s.add(r)}for(let e of a??[]){let t=e.profile_id;t&&s.add(t)}return s}countPostsForMonth(e,t){return e.reduce((e,r)=>r.published_at?.startsWith(t)?e+1:e,0)}countSessionUsersForMonth(e,t){return e.find(e=>e.month?.startsWith(t))?.users??0}formatDateKey(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${a}`}formatMonthKey(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0");return`${t}-${r}`}throwSupabaseError(e){throw Error(e?.message??"در ارتباط با Supabase خطاÛÛ Ø±Ø® داد.")}}e.s(["createAnalyticsRepository",0,function(){let e=(0,t.getSupabaseClient)();if(!e)throw Error("Supabase client is not configured. Set NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY.");return new r(e)}],19335)},685838,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(220378),i=e.i(53655);let s="post-image-gallery-open";e.s(["POST_IMAGE_GALLERY_OPEN_EVENT",0,s,"PostImageGallery",0,function({images:e,featuredImage:l,title:n,isInProgress:o=!1,featuredOverlayTitle:d,featuredOverlaySubtitle:c,showStayInformedCard:u=!1}){let m=e.filter(e=>e.trim()),p=Array.from(new Set([l?.trim()??"",...m].filter(e=>e.trim()))),h=o&&!!(d?.trim()||c?.trim()||u),f=p.map(()=>h?{title:d,subtitle:c,showStayInformedCard:u,isInProgress:o}:{}),[b,g]=(0,r.useState)(!1),[v,x]=(0,r.useState)(0),[w,y]=(0,r.useState)(5);return(0,r.useEffect)(()=>{let e=()=>{let e=window.innerWidth;e>=1024?y(5):e>=768?y(2):y(1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,r.useEffect)(()=>{let e=e=>{x(Math.min(Math.max(e.detail?.index??0,0),p.length-1)),g(!0)};return window.addEventListener(s,e),()=>{window.removeEventListener(s,e)}},[p.length]),(0,t.jsxs)(t.Fragment,{children:[m.length>0?(0,t.jsx)("section",{className:"space-y-3 mt-10 print:break-inside-auto",children:(0,t.jsx)("div",{className:"gap-2 grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-7 print:hidden",children:m.map((e,r)=>(0,t.jsx)("button",{type:"button",onClick:()=>{x(r+ +!!l),g(!0)},className:"overflow-hidden rounded-md bg-surface-50 text-left","aria-label":`ÙÙ
Ø§ÛØ´ تصÙÛØ± ${r+1}`,children:(0,t.jsx)(a.AppImage,{src:e,alt:`${n} - ${r+1}`,loading:"lazy",className:"block w-full cursor-pointer rounded-md border border-durface-900 object-cover"})},`${e}-${r}`))})}):null,(0,t.jsx)(i.ImageGalleryDialog,{open:b,onOpenChange:g,images:p,title:n,initialIndex:v,imageOverlays:f})]})}])},772877,e=>{"use strict";var t=e.i(558302),r=e.i(220378),a=e.i(420692),i=e.i(685838);e.s(["FeaturedImageLightbox",0,function({src:e,alt:s,language:l="fa",overlayTitle:n,overlaySubtitle:o,showStayInformedCard:d=!1}){let c=n?.trim()||null,u=o?.trim()||null,m=!!(c||u||d),p=(0,a.getInProgressPostLabel)(l),h="en"===l||"ru"===l?"left-4":"right-4";return(0,t.jsx)("button",{type:"button",className:"block w-full cursor-pointer text-left print:cursor-default","aria-label":`ÙÙ
Ø§ÛØ´ تصÙÛØ± بزرگ ${s}`,onClick:()=>{window.dispatchEvent(new CustomEvent(i.POST_IMAGE_GALLERY_OPEN_EVENT,{detail:{index:0}}))},children:(0,t.jsxs)("div",{className:`relative left-0 min-w-0 overflow-hidden rounded-xl bg-surface-50 print:overflow-visible ${m?"[container-type:inline-size] max-h-[61vh] print:max-h-none":""}`,style:m?{aspectRatio:"3/4"}:void 0,children:[(0,t.jsx)(r.AppImage,{src:e,alt:s,loading:"eager",fetchPriority:"high",className:m?"h-full w-full rounded-xl border border-1 border-surface-900 object-contain object-top shadow-md print:h-auto print:max-h-none print:object-contain print:shadow-none":"h-auto max-h-[25rem] w-auto mx-auto rounded-xl border border-1 border-surface-900 object-contain shadow-md print:max-h-none print:shadow-none"}),m?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 top-[35%] z-10 flex items-end bg-gradient-to-t from-black/80 via-black/35 to-transparent px-[clamp(0.85rem,5cqi,1.5rem)] pb-[clamp(1.1rem,6cqi,1.65rem)] pt-[clamp(0.5rem,3cqi,0.9rem)] print:top-auto",children:(0,t.jsxs)("div",{className:"my-auto flex w-full flex-col items-center justify-end gap-[clamp(0.5rem,4.4cqi,0.9rem)] text-center",children:[c?(0,t.jsx)("h4",{className:"line-clamp-2 text-[clamp(1rem,8cqi,1.85rem)] font-bold leading-[1.1] text-white",children:c}):null,u?(0,t.jsx)("p",{className:"line-clamp-2 text-[clamp(0.72rem,4.8cqi,1rem)] font-medium leading-[1.35] text-brand-100",children:u}):null,(0,t.jsx)("div",{className:`absolute bottom-4 flex w-full justify-start ${h}`,children:d?(0,t.jsxs)("span",{className:"inline-flex w-fit roun
1ded-full border border-brand-300/40 bg-brand-400/85 px-[clamp(0.7rem,3.8cqi,1rem)] py-[clamp(0.2rem,1.4cqi,0.35rem)] text-[clamp(0.68rem,3.4cqi,0.875rem)] text-white backdrop-blur-sm",children:["#",p]}):null})]})}):null]})})}])},669788,e=>{"use strict";var t=e.i(89427),r=e.i(19335);e.s(["PostViewTracker",0,function({postId:e}){return(0,t.useEffect)(()=>{(async()=>{try{let t=(0,r.createAnalyticsRepository)();await t.trackPostView({postId:e})}catch(e){console.error(e)}})()},[e]),null}])},38748,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(323211),i=e.i(975157),s=e.i(556902),l=e.i(261001);e.s(["CardCarousel",0,function({title:e,items:n,autoPlay:o=!1,className:d,containerClassName:c,contentViewportClassName:u}){let{direction:m,isRtl:p}=(0,l.useLanguage)(),[h,f]=(0,r.useState)(void 0),[b,g]=(0,r.useState)(n.length>1),[v,x]=(0,r.useState)(0),w=(0,r.useRef)(null),y=(0,r.useCallback)(()=>{null!==w.current&&(window.clearTimeout(w.current),w.current=null)},[]),j=(0,r.useCallback)(()=>{y(),o&&h&&b&&(w.current=window.setTimeout(()=>{h.scrollNext()},6e3))},[h,o,y,b]);return((0,r.useEffect)(()=>{if(!h)return;let e=()=>{x(h.selectedScrollSnap()),g(h.canScrollNext()||h.canScrollPrev())};return e(),h.on("select",e),h.on("reInit",e),h.on("resize",e),h.on("slidesChanged",e),()=>{h.off("select",e),h.off("reInit",e),h.off("resize",e),h.off("slidesChanged",e)}},[h]),(0,r.useEffect)(()=>(j(),()=>y()),[y,j,v]),n.length)?(0,t.jsx)("section",{className:"overflow-x-clip bg-[#eef3f7]",children:(0,t.jsxs)("div",{className:(0,i.cn)("mx-auto max-w-[1480px] overflow-x-clip space-y-6",c),children:[e?(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"h-6 w-1 rounded-full bg-brand-500"}),(0,t.jsx)("h2",{className:"text-xl font-bold text-surface-900 sm:text-2xl",children:e})]}):null,(0,t.jsxs)(a.Carousel,{setApi:f,className:(0,i.cn)("w-full overflow-x-clip px-12",d),opts:{align:"start",containScroll:"trimSnaps",slidesToScroll:1,direction:m,loop:b},children:[(0,t.jsx)(a.CarouselContent,{viewportClassName:u,className:(0,i.cn)(!b&&"justify-start"),children:n.map((e,r)=>(0,t.jsxs)(a.CarouselItem,{className:"basis-full sm:basis-1/3 lg:basis-1/5",children:[!e.isInProgress&&(0,t.jsx)(s.NewsCard,{href:e.href,image:e.image,excerpt:e.excerpt,category:e.category??"بدÙ٠دستÙâØ¨ÙØ¯Û",title:e.title,date:e.date},e.id),e.isInProgress&&(0,t.jsx)(s.PublicationCard,{href:e.href,image:e.image,imageAlt:e.title,excerpt:e.excerpt,title:e.title,date:e.date,imageOverlayTitle:e.imageOverlayTitle,imageOverlaySubtitle:e.imageOverlaySubtitle,showStayInformedCard:e.showStayInformedCard},e.id)]},r))}),b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.CarouselNext,{scrollDirection:p?"reversed":"default",className:`flex border-0 bg-transparent text-surface-900 shadow-none hover:bg-transparent hover:text-surface-700 sm:border-surface-200 sm:bg-white sm:shadow-sm sm:hover:bg-white cursor-pointer ${p?"left-1 right-auto sm:-left-0 sm:right-auto":"left-auto right-1 sm:left-auto sm:-right-0"}`}),(0,t.jsx)(a.CarouselPrevious,{scrollDirection:p?"reversed":"default",className:`flex border-0 bg-transparent text-surface-900 shadow-none hover:bg-transparent hover:text-surface-700 sm:border-surface-200 sm:bg-white sm:shadow-sm sm:hover:bg-white cursor-pointer ${p?"left-auto right-1 sm:left-auto sm:-right-0":"left-1 right-auto sm:-left-0 sm:right-auto"}`})]}):null]},m)]})}):null}])},754833,e=>{"use strict";var t=e.i(558302),r=e.i(923128),a=e.i(89427),i=e.i(220378),s=e.i(323211),l=e.i(633582),n=e.i(975157),o=e.i(261001);function d({item:e}){let a=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex h-14 items-center justify-center",children:e.image?(0,t.jsx)(i.AppImage,{src:e.image,alt:"",loading:"lazy",className:"size-12 object-contain transition group-hover:scale-110"}):(0,t.jsx)("div",{className:"size-12 rounded-full bg-brand-500/10"})}),(0,t.jsx)("span",{className:"max-w-[110px] text-center text-[13px] font-bold leading-5 text-surface-900 transition group-hover:text-brand-500",children:e.title})]}),s="group flex min-h-28 h-full w-full rounded-3xl flex-col items-center justify-center gap-2 border-s border-slate-100 px-3 py-4 transition";return e.href?(0,t.jsx)(r.default,{href:(0,l.normalizeHref)(e.href),className:`${s} hover:bg-[#f0fbf9]`,children:a}):(0,t.jsx)("div",{className:s,children:a})}e.s(["default",0,function({items:e}){let{direction:r,isRtl:i}=(0,o.useLanguage)(),l=(0,a.useMemo)(()=>[...e].map((e,t)=>({item:e,index:t})).sort((e,t)=>
1{let r=e.item.order??e.index,a=t.item.order??t.index;return r!==a?r-a:e.index-t.index}).map(({item:e})=>e),[e]),[c,u]=(0,a.useState)(void 0),[m,p]=(0,a.useState)(0),h=(0,a.useRef)(null),f=(0,a.useCallback)(()=>{null!==h.current&&(window.clearTimeout(h.current),h.current=null)},[]),b=(0,a.useCallback)(()=>{f(),c&&!(l.length<2)&&(h.current=window.setTimeout(()=>{c.scrollNext()},6e3))},[c,f,l.length]);return((0,a.useEffect)(()=>{if(!c)return;let e=()=>p(c.selectedScrollSnap());return e(),c.on("select",e),c.on("reInit",e),()=>{c.off("select",e),c.off("reInit",e)}},[c]),(0,a.useEffect)(()=>(b(),()=>f()),[f,b,m]),l.length)?(0,t.jsx)("section",{dir:r,className:"relative z-30 -mt-10 mb-[-3.5rem] overflow-x-clip px-4 sm:px-6 lg:px-10",children:(0,t.jsx)("div",{className:"mx-auto max-w-[1000px] overflow-visible rounded-3xl border border-slate-100 bg-white shadow-[0_8px_20px_rgba(0,0,0,0.19)]",children:(0,t.jsxs)(s.Carousel,{setApi:u,className:"w-full px-10 sm:px-12 lg:px-0",opts:{align:"start",containScroll:"trimSnaps",direction:r,slidesToScroll:1,loop:l.length>1},children:[(0,t.jsx)(s.CarouselContent,{className:"ml-0 rounded-3xl",children:l.map(e=>(0,t.jsx)(s.CarouselItem,{className:"!basis-1/3 !pl-0 lg:!basis-1/5",children:(0,t.jsx)(d,{item:e})},e.id))}),l.length>1?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.CarouselPrevious,{size:"icon-sm",scrollDirection:i?"reversed":"default",className:(0,n.cn)("flex rounded-full border-0 bg-white/95 text-surface-900 shadow-sm hover:bg-white hover:text-surface-900",i?"left-auto right-2 lg:-right-9":"left-2 lg:-left-9 right-auto")}),(0,t.jsx)(s.CarouselNext,{size:"icon-sm",scrollDirection:i?"reversed":"default",className:(0,n.cn)("flex rounded-full border-0 bg-white/95 text-surface-900 shadow-sm hover:bg-white hover:text-surface-900",i?"left-2 lg:-left-9 right-auto":"left-auto right-2 lg:-right-9")})]}):null]},r)})}):null}],754833)},818973,e=>{"use strict";var t=e.i(558302),r=e.i(923128),a=e.i(613256),i=e.i(633582);e.s(["SectionHeader",0,function({title:e,link:s,href:l="#",theme:n="light",className:o="",actions:d,endAction:c}){return(0,t.jsxs)("div",{className:`flex flex-wrap items-center justify-between gap-3 ${o}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 ps-4 sm:ps-0",children:[(0,t.jsx)("span",{className:"w-1 h-6 rounded-full inline-block shrink-0 bg-brand-500"}),(0,t.jsx)("h2",{className:`text-xl font-bold ${"dark"===n?"text-white":"text-surface-900"}`,children:e}),d]}),c??(s?(0,t.jsxs)(r.default,{href:(0,i.normalizeHref)(l),className:`flex items-center gap-1 text-sm font-medium transition-colors ${"dark"===n?"text-white/60 hover:text-white":"text-brand-500 hover:text-surface-900"}`,children:[s,(0,t.jsx)(a.ChevronLeft,{size:14})]}):null)]})}])},4914,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(323211),i=e.i(261001),s=e.i(975157);e.s(["SectionCarousel",0,function({children:e,className:l,itemClassName:n,contentViewportClassName:o,autoPlay:d=!1,staticAlignment:c="center"}){let{direction:u,isRtl:m}=(0,i.useLanguage)(),[p,h]=(0,r.useState)(void 0),[f,b]=(0,r.useState)(e.length>1),[g,v]=(0,r.useState)(0),x=(0,r.useRef)(null),w=(0,r.useCallback)(()=>{null!==x.current&&(window.clearTimeout(x.current),x.current=null)},[]),y=(0,r.useCallback)(()=>{w(),d&&p&&f&&(x.current=window.setTimeout(()=>{p.scrollNext()},6e3))},[p,d,w,f]);return((0,r.useEffect)(()=>{if(!p)return;let e=()=>{v(p.selectedScrollSnap()),b(p.canScrollNext()||p.canScrollPrev())};return e(),p.on("select",e),p.on("reInit",e),p.on("resize",e),p.on("slidesChanged",e),()=>{p.off("select",e),p.off("reInit",e),p.off("resize",e),p.off("slidesChanged",e)}},[p]),(0,r.useEffect)(()=>(y(),()=>w()),[w,y,g]),e.length)?(0,t.jsxs)(a.Carousel,{setApi:h,className:(0,s.cn)("w-full overflow-x-clip px-10",l),opts:{align:"start",containScroll:"trimSnaps",direction:u,slidesToScroll:1,loop:f},children:[(0,t.jsx)(a.CarouselContent,{viewportClassName:o,className:(0,s.cn)(!f&&("start"===c?"justify-start":"justify-center")),children:e.map((e,r)=>(0,t.jsx)(a.CarouselItem,{className:(0,s.cn)("basis-full sm:basis-1/3 lg:basis-1/5",n),children:e},r))}),f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.CarouselNext,{scrollDirection:m?"reversed":"default",className:(0,s.cn)("flex border-0 bg-transparent text-surface-900 shadow-none hover:bg-transparent hover:text-surface-700 sm:border-surface-200 sm:bg-white sm:shadow-sm sm:hover:bg-white cursor-pointer",m?"left-0 right-auto sm:left-0 sm:right-auto":"left-auto right-0 sm:left-auto sm:right-0")}),(0,t.jsx)(a.CarouselPrevious,{scrollDirection:m?"reversed":"default",className:(0,s.cn)("flex border-0 bg-transparent text-surface-900 shadow-none hover:bg-transparent hover:text-surface-700 sm:border-surface-200 sm:bg-white sm:shadow-sm sm:hover:bg-white cursor-pointer",m?"left-auto right-0 sm:left-auto sm:right-0":"left-0 right-auto sm:left-0 sm:right-auto")})]}):null]},u):null}])},420045,e=>{"use strict";var t=e.i(558302),r=e.i(923128),a=e.i(89427),i=e.i(556902);function s({items:e}){return e.length?(0,t.jsx)(t.Fragment,{children:e.map(e=>(0,t.jsx)(i.MediaCard,{href:e.href,image:e.image,videoSrc:e.videoSrc,title:e.title,date:e.date,mediaKind:e.mediaKind},e.id))}):null}var l=e.i(818973),n=e.i(4914),o=e.i(677572),d=e.i(261001);let c={image:{fa:"تصاÙÛØ±",en:"Images",ar:"Ø§ÙØµÙر",ru:"ÐзобÑажениÑ"},video:{fa:"ÙÛØ¯ÛÙÙØ§",en:"Videos",ar:"اÙÙÙØ¯ÙÙÙØ§Øª",ru:"Ðидео"}}
1,u={image:{fa:"آرشÛ٠تصاÙÛØ±",en:"Image archive",ar:"أرشÙÙ Ø§ÙØµÙر",ru:"ÐÑÑ
ив изобÑажений",tr:"Görsel arÅivi"},video:{fa:"آرشÛÙ ÙÛØ¯ÛÙÙØ§",en:"Video archive",ar:"أرشÙ٠اÙÙÙØ¯ÙÙÙØ§Øª",ru:"ÐÑÑ
ив видео",tr:"Video arÅivi"}},m="rounded-xl px-4 py-2 text-sm font-medium text-slate-600 transition-colors hover:text-slate-900 data-[state=active]:bg-brand-500 data-[state=active]:text-white data-[state=active]:shadow-sm";function p({items:e,autoPlay:r=!1,className:a,contentViewportClassName:i}){return(0,t.jsx)(n.SectionCarousel,{autoPlay:r,className:a,contentViewportClassName:i,staticAlignment:"start",children:e.map(e=>(0,t.jsx)(s,{items:[e]},e.id))})}e.s(["MediaGalleryTabsCarousel",0,function({itemsByType:e}){let{language:r}=(0,d.useLanguage)(),a=[e.image.length>0?"image":null,e.video.length>0?"video":null].filter(Boolean);return 0===a.length?null:1===a.length?(0,t.jsx)(p,{items:e[a[0]]}):(0,t.jsxs)(o.Tabs,{defaultValue:a[0],className:"space-y-5",children:[(0,t.jsx)(o.TabsList,{className:"h-auto gap-2 rounded-2xl bg-slate-100 p-1",children:a.map(e=>(0,t.jsx)(o.TabsTrigger,{value:e,className:m,children:c[e][r]},e))}),a.map(r=>(0,t.jsx)(o.TabsContent,{value:r,className:"mt-0",children:(0,t.jsx)(p,{items:e[r]})},r))]})},"MediaGalleryTabsCarouselSection",0,function({title:e,itemsByType:i,archiveHrefByType:s,autoPlay:n=!1,carouselClassName:h,carouselContentViewportClassName:f}){let{language:b}=(0,d.useLanguage)(),g=[i.image.length>0?"image":null,i.video.length>0?"video":null].filter(Boolean),[v,x]=(0,a.useState)(g[0]??"image"),w=s?.[v]??s?.[g[0]??"image"]??null,y=w?(0,t.jsx)(r.default,{href:w,className:"inline-flex h-12 items-center rounded-full border border-brand-200 bg-white px-10 text-base font-semibold text-brand-600 transition-colors hover:border-brand-500 hover:text-brand-700",children:u[v][b]}):null;if(0===g.length)return null;if(1===g.length)return(0,t.jsxs)("div",{className:"space-y-6",children:[e?(0,t.jsx)(l.SectionHeader,{title:e}):null,(0,t.jsx)(p,{items:i[g[0]],autoPlay:n,className:h,contentViewportClassName:f}),y?(0,t.jsx)("div",{className:"flex justify-center pt-2",children:y}):null]});let j=(0,t.jsx)(o.TabsList,{className:"h-auto gap-2 rounded-2xl bg-slate-100 p-1",children:g.map(e=>(0,t.jsx)(o.TabsTrigger,{value:e,className:m,children:c[e][b]},e))});return(0,t.jsxs)(o.Tabs,{value:v,onValueChange:e=>x("video"===e?"video":"image"),className:"space-y-5",children:[e?(0,t.jsx)(l.SectionHeader,{title:e,actions:j}):j,g.map(e=>(0,t.jsx)(o.TabsContent,{value:e,className:"mt-0",children:(0,t.jsx)(p,{items:i[e],autoPlay:n,className:h,contentViewportClassName:f})},e)),y?(0,t.jsx)("div",{className:"flex justify-center pt-2",children:y}):null]})}],420045)},827888,e=>{"use strict";var t=e.i(558302),r=e.i(923128),a=e.i(89427),i=e.i(38748),s=e.i(818973),l=e.i(677572),n=e.i(261001),o=e.i(867396);let d={fa:"Ú©ÙØ§ÙâØ´ÙØ± اراک",en:"Arak Metropolis",ar:"Ù
دÙÙØ© أراÙ",ru:"ÐеÑÑÐ¾Ð¿Ð¾Ð»Ð¸Ñ ÐÑак",tr:"Arak metropolü"},c={fa:"Ú©ÙØ§Ù Ø´ÙØ±Ùا",en:"Metropolises",ar:"اÙÙ
د٠اÙÙØ¨Ø±Ù",ru:"ÐеÑÑополиÑÑ",tr:"Metropoller"},u=(0,o.withTurkishFallback)({posts:{fa:"آرشÛ٠اخبار",en:"News archive",ar:"أرشÙÙ Ø§ÙØ£Ø®Ø¨Ø§Ø±",ru:"ÐÑÑ
ив новоÑÑей"},"in-progress":{fa:"آرشÛ٠اخبار در Ø¬Ø±ÛØ§Ù Ø¨Ø§Ø´ÛØ¯",en:"In-progress news archive",ar:"أرشÙÙ Ø§ÙØ£Ø®Ø¨Ø§Ø± Ø§ÙØ¬Ø§Ø±ÙØ©",ru:"ÐÑÑ
ив ÑекÑÑиÑ
новоÑÑей"}}),m="rounded-xl cursor-pointer px-4 py-2 text-sm font-medium text-slate-600 transition-colors hover:text-slate-900 data-[state=active]:bg-brand-500 data-[state=active]:text-white data-[state=active]:shadow-sm";e.s(["WorkGroupPostsTabsCarouselSection",0,function({items:e,metroItems:o=[],title:p,archiveKind:h="posts",archiveHrefByTab:f,tabsMode:b="single",autoPlay:g=!1,carouselClassName:v,carouselContainerClassName:x,carouselContentViewportClassName:w}){let{language:y}=(0,n.useLanguage)(),j=e.length>0?"arak":"metros",[N,C]=(0,a.useState)(j),k=f?.[N]??f?.arak??null,S=k?(0,t.jsx)(r.default,{href:k,className:"inline-flex h-12 items-center rounded-full border border-brand-200 bg-white px-10 text-base font-semibold text-brand-600 transition-colors hover:border-brand-500 hover:text-brand-700",children:u[h][y]}):null;if(!e.length&&!o.length)return null;if("single"===b)return(0,t.jsxs)("div",{className:"space-y-5",children:[p?(0,t.jsx)(s.SectionHeader,{title:p}):null,(0,t.jsx)(i.CardCarousel,{items:e,autoPlay:g,className:v,containerClassName:x,contentViewportClassName:w,source:"workGroupPublished"}),S?(0,t.jsx)("div",{className:"flex justify-center pt-2",children:S}):null]});let _=(0,t.jsxs)(l.TabsList,{className:"h-auto gap-2 rounded-2xl bg-white p-1",children:[(0,t.jsx)(l.TabsTrigger,{value:"arak",className:m,children:d[y]??d.en}),(0,t.jsx)(l.TabsTrigger,{value:"metros",className:m,children:c[y]??c.en})]});return(0,t.jsxs)(l.Tabs,{defaultValue:j,value:N,onValueChange:e=>C("metros"===e?"metros":"arak"),className:"space-y-5",children:[p?(0,t.jsx)(s.SectionHeader,{title:p,actions:_}):_,(0,t.jsx)(l.TabsContent,{value:"arak",className:"mt-0",children:e.length?(0,t.jsx)(i.CardCarousel,{items:e,autoPlay:g,className:v,containerClassName:x,contentViewportClassName:w,source:"workGroupPublished"}):null}),(0,t.jsx)(l.TabsContent,{value:"metros",className:"mt-0",children:o.length?(0,t.jsx)(i.CardCarousel,{items:o,autoPlay:g,className:v,containerClassName:x,contentViewportClassName:w,source:"workGroupPublished"}):null}),S?(0,t.jsx)("div",{className:"flex justify-center pt-2",children:S}):null]})}])},857247,e=>{"use strict";var t=e.i(558302),r=e.i(89427),a=e.i(438929),i=e.i(303346);e.s(["WorkGroupArchiveFilters",0,function({options:e,value:s,placeholder:l,searchPlaceholder:n,selectAllLabel:o}){let d=(0,a.useRouter)(),c=(0,a.usePathname)(),u=(0,a.useSearchParams)(),m=(0,r.useMemo)(()=>[...new Set(s.filter(e=>Number.isFinite(e)))],[s]);return(0,t.jsx)(i.MultiSelect,{options:e,value:m,onChange:e=>{let t=new URLSearchParams(u.toString()),r=[...new Set(e.map(e=>Number(e)).filter(e=>Number.isFinite(e)))];r.length>0?t.set("categories",r.join(",")):t.delete("categories");let a=t.toString();d.replace(a?`${c}?${a}`:c,{scroll:!1})},placeholder:l,searchPlaceholder:n,enableSelectAll:!0,selectAllLabel:o,maxVisibleChips:4,showSelectedChips:!0})}])}]);
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.