PageSourceSearch

https://javaherati.ir/static/_next/static/chunks/2xh22haeb8bq7.js

js javaherati.ir collected 2026-09-30 11:19:10 UTC 21,633 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,206389,e=>{"use strict";var t=e.i(843476),i=e.i(333651),r=e.i(271645),s=e.i(608997),l=e.i(465404),n=e.i(537952),a=e.i(706247),o=e.i(126301),d=e.i(209499),c=e.i(669652);let u=(0,r.forwardRef)((e,i)=>{let{title:r,titleId:s,...l}=e;return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":s,...l,children:[r?(0,t.jsx)("title",{id:s,children:r}):null,(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h10a6 6 0 0 1 0 12H4M4 7l4-4M4 7l4 4"})]})}),x=(0,r.forwardRef)((e,i)=>{let{title:r,titleId:s,...l}=e;return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":s,...l,children:[r?(0,t.jsx)("title",{id:s,children:r}):null,(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 7H10a6 6 0 1 0 0 12h10m0-12-4-4m4 4-4 4"})]})});var g=e.i(175043),m=e.i(690536),f=e.i(912598),h=e.i(626360),p=e.i(600813),v=e.i(191759),w=e.i(101104),b=e.i(112176),j=e.i(960926),y=e.i(968847),k=e.i(346944);let C=e=>{let{viewport:C}=e,{clearHistory:I}=(0,i.useStore)((0,k.useShallow)(e=>({clearHistory:e.clearHistory,canUndo:e.canUndo(),canRedo:e.canRedo(),getHistoryInfo:e.getHistoryInfo}))),{hasUnsavedChanges:N,resetChanges:S,undo:E,redo:D,canRedo:z,canUndo:W}=(0,s.useCore)(),{save:T,isSaving:L}=(()=>{let e=(0,f.useQueryClient)(),{widgets:t,originalWidgets:s,modifiedWidgets:l,positionChangedWidgets:n,getDiscoveredContainers:a,setWidgets:o,setOriginalWidgets:d,getWidget:c}=(0,i.useStore)((0,k.useShallow)(e=>({widgets:e.widgets,originalWidgets:e.originalWidgets,modifiedWidgets:e.modifiedWidgets,positionChangedWidgets:e.positionChangedWidgets,getDiscoveredContainers:e.getDiscoveredContainers,setWidgets:e.setWidgets,setOriginalWidgets:e.setOriginalWidgets,getWidget:e.getWidget}))),[u,x]=(0,r.useState)(!1),[C,I]=(0,r.useState)(null),N=(0,r.useCallback)(()=>{let e=[],i=new Set,r=new Set;null==s||s.forEach(e=>{let t=(0,y.getAllWidgetIds)(null==e?void 0:e.subset,!0);null==t||t.forEach(e=>i.add(e))}),null==t||t.forEach(e=>{let t=(0,y.getAllWidgetIds)(null==e?void 0:e.subset,!0);null==t||t.forEach(e=>r.add(e))});let n=new Set,a=!1;return null==t||t.forEach(e=>{(0,y.isTempId)(null==e?void 0:e.widgetID)&&(a=!0)}),a?null==t||t.forEach((e,t)=>{n.add(t)}):null==l||l.forEach(e=>{n.add(e)}),null==n||n.forEach(t=>{var i,r;let l=c(t),n=null==s?void 0:s.get(t);l&&(null==l||null==(i=l.subset)||i.forEach(i=>{(0,y.isTempId)(null==i?void 0:i.widgetID)&&e.push({type:"create",containerName:t,widget:i,parentID:null==l?void 0:l.widgetID})}),(0,y.walkWidgetTree)(null==l?void 0:l.subset,i=>{if(!(0,y.isTempId)(null==i?void 0:i.widgetID)&&n){let o=(0,y.findWidgetRecursively)(null==n?void 0:n.subset,null==i?void 0:i.widgetID);if(o&&JSON.stringify(i)!==JSON.stringify(o)){var r,s,l,a;e.push({type:"update",containerName:t,widget:i}),(null==i?void 0:i.subset)&&(null==i||null==(r=i.subset)?void 0:r.length)>0&&(null==i||null==(l=i.subset)||l.forEach(r=>{(0,y.isTempId)(null==r?void 0:r.widgetID)&&e.push({type:"create",containerName:t,widget:r,parentID:null==i?void 0:i.widgetID})})),(null==o?void 0:o.subset)&&(null==o||null==(s=o.subset)?void 0:s.length)>0&&(null==o||null==(a=o.subset)||a.forEach(r=>{var s;(0,y.isTempId)(null==r?void 0:r.widgetID)||(null==i||null==(s=i.subset)?void 0:s.find(e=>(null==e?void 0:e.widgetID)===(null==r?void 0:r.widgetID)))||e.push({type:"delete",containerName:t,widget:r})}))}}}),n&&(null==n||null==(r=n.subset)||r.forEach(i=>{(0,y.isTempId)(null==i?void 0:i.widgetID)||(0,y.findWidgetRecursively)(null==l?void 0:l.subset,null==i?void 0:i.widgetID)||e.push({type:"delete",containerName:t,widget:i})})))}),e},[t,s,l,c]),S=(0,r.useCallback)(async e=>{let t=e.filter(e=>"delete"===e.type);if(0===t.length)return 0;let i=0;for(let e of t)try{if(await (0,p.deleteWidgetFromAPI)(null==e?void 0:e.widget))i++;else{var r;console.warn(`[useSave] Failed to delete widget ${null==e||null==(r=e.widget)?void 0:r.widgetID}`)}}catch(e){console.error("[useSave] Error deleting widget:",e)}return i},[]),E=(0,r.useCallback)(async i=>{let r=i.filter(e=>"create"===e.type);if(0===r.length)return 0;let s=0,l=new Map;for(let i of r)try{let r=null==i?void 0:i.parentID;if(!r||(0,y.isTempId)(r)){let s=`${null==i?void 0:i.containerName}-${null==i?void 0:i.parentID}`;if(null==l?void 0:l.has(s))r=(null==l?void 0:l.get(s))||r;else{let n=await (0,h.ensureContainerOperation)(e,null==i?void 0:i.containerName,t);if(!n){console.error(`[useSave] Failed to ensure container: ${null==i?void 0:i.containerName}`);continue}r=n,null==l||l.set(s,r)}}let n=await (0,h.createWidgetOperation)(null==i?void 0:i.widget,r,null==i?void 0:i.containerName,0,s);if((null==n?void 0:n.success)&&(null==n?void 0:n.widgetID)&&(null==n?void 0:n.createdWidget)){let t=c(null==i?void 0:i.containerName);if(t){let r=structuredClone(t),s=!1,l=(e,t)=>
1{if((0,y.walkWidgetTree)(null==r?void 0:r.subset,i=>{(null==i?void 0:i.widgetID)===(null==e?void 0:e.widgetID)&&(0,y.isTempId)(null==i?void 0:i.widgetID)&&(i.widgetID=null==t?void 0:t.widgetID,s=!0)}),(null==e?void 0:e.subset)&&(null==t?void 0:t.subset)){var i;null==e||null==(i=e.subset)||i.forEach((e,i)=>{var r;let s=null==t||null==(r=t.subset)?void 0:r[i];s&&l(e,s)})}};l(null==i?void 0:i.widget,null==n?void 0:n.createdWidget),s&&((0,b.updateCache)(e,null==i?void 0:i.containerName,r),o({[null==i?void 0:i.containerName]:r}),d({[null==i?void 0:i.containerName]:r}))}s++}}catch(e){console.error("[useSave] Error creating widget:",e)}return s},[e,t,c,o,d]),D=(0,r.useCallback)(async e=>{let t=e.filter(e=>"update"===e.type);if(0===t.length)return 0;let i=0;for(let e of t){var r,s,l;if((0,y.isTempId)(null==e||null==(r=e.widget)?void 0:r.widgetID)){console.warn("[useSave] Skipping update for widget with tempID");continue}try{let t=(0,w.prepareUpdateRequest)(null==e?void 0:e.widget,null==e?void 0:e.widget),r=await g.widget.update(Number(null==e||null==(s=e.widget)?void 0:s.widgetID),t);(null==r?void 0:r.success)&&i++}catch(t){console.error(`[useSave] Error updating widget ${null==e||null==(l=e.widget)?void 0:l.widgetID}:`,t)}}return i},[]),z=(0,r.useCallback)(async()=>{if(0===n.size)return 0;let e=0;try{let t=a(),i=[];null==t||t.forEach(e=>{let t=c(e);t&&(null==i||i.push(t))});let r=(0,v.buildGlobalSortingMap)(i);Object.keys(r).length>0&&(await g.widget.sorting(r)).success&&(e=Object.keys(r).length)}catch(e){console.error("[useSave] Error during sorting:",e)}return e},[n.size,a,c]);return{save:(0,r.useCallback)(async()=>{if(0===l.size&&0===n.size)return(0,m.toast)({description:j.INFO_MESSAGES.NO_CHANGES,variant:"default"}),{success:!0,created:0,updated:0,deleted:0,sorted:0,errors:[]};x(!0),I(null);let e=0,t=0,i=0,r=0;try{let s=N();return i=await S(s),e=await E(s),t=await D(s),r=await z(),(0,m.toast)({description:j.SUCCESS_MESSAGES.SAVE_SUCCESS,variant:"success"}),{success:!0,created:e,updated:t,deleted:i,sorted:r,errors:[]}}catch(l){let s=l instanceof Error?l.message:"خطای ناشناخته";return console.error("[useSave] Save failed:",l),I(s),(0,m.toast)({description:s,variant:"danger"}),{success:!1,created:e,updated:t,deleted:i,sorted:r,errors:[s]}}finally{x(!1)}},[l,n,N,S,E,D,z]),isSaving:u,saveError:C,hasUnsavedChanges:(0,r.useCallback)(()=>l.size>0||n.size>0,[l,n])(),changesCount:l.size+n.size}})(),{isMobile:M}=(0,o.useMediaQuery)(C),[O,P]=(0,r.useState)("open"),[A,B]=(0,r.useState)(!0),R=async()=>{let e=await T();(null==e?void 0:e.success)&&(S(),I(),setTimeout(()=>(0,l.toggleEditMode)(!1),300))};return(0,t.jsxs)(t.Fragment,{children:[!M&&(0,t.jsx)(a.Presence,{present:!A&&"open"===O,children:(0,t.jsx)("button",{onClick:()=>B(!0),"data-state":A?"closed":"open",className:"fixed bottom-0 right-1/2 z-floating flex min-w-[78px] translate-x-1/2 cursor-pointer flex-row items-center justify-center gap-xxs rounded-t-sm border border-b-0 border-[--border-inverse] bg-[--bg-primary-inverse] py-xxs pe-md ps-sm text-xs font-medium text-[--text-secondary-inverse] shadow-xs transition-transform duration-300 focus:outline-none focus-visible:ring-4 focus-visible:ring-[--ring-brand] data-open:animate-slide-in-to-bottom data-closed:animate-slide-out-to-bottom",children:(0,t.jsx)(c.ChevronUpIcon,{className:"size-xl stroke-[--fg-secondary-inverse]"})})}),(0,t.jsx)(a.Presence,{present:A,children:(0,t.jsxs)("div",{"data-state":A?"open":"closed",className:"fixed bottom-0 z-floating flex w-full flex-col items-center justify-center data-open:animate-slide-in-to-bottom data-closed:animate-slide-out-to-bottom tablet:bottom-3xl tablet:right-1/2 tablet:translate-x-1/2 tablet:container-sm",children:[!M&&(0,t.jsx)("button",{onClick:()=>B(!1),className:"flex min-w-[78px] cursor-pointer flex-row items-center justify-center gap-xxs rounded-t-sm border border-b-0 border-[--border-inverse] bg-[--bg-primary-inverse] px-md py-xxs text-xs font-medium text-[--text-secondary-inverse] shadow-xs",children:(0,t.jsx)(d.ChevronDownIcon,{className:"size-xl stroke-[--fg-secondary-inverse]"})}),(0,t.jsxs)("div",{className:"flex h-[64px] w-full flex-row items-center justify-between border-t border-[--border-secondary] bg-[--bg-primary] px-lg shadow-xl tablet:h-[60px] tablet:rounded-lg tablet:border-0",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-xl",children:[(0,t.jsx)(n.Button,{variant:"link-gray",size:"sm",iconOnly:!0,onClick:()=>{D()},disabled:!z,children:(0,t.jsx)(x,{})}),(0,t.jsx)(n.Button,{variant:"link-gray",size:"sm",iconOnly:!0,onClick:()=>{E()},disabled:!W,children:(0,t.jsx)(u,{})})]}),(0,t.jsxs)("div",{className:"flex flex-row items-center gap-md",children:[(0,t.jsx)(n.Button,{variant:"secondary-gray",size:"sm",className:"w-fit",onClick:()=>{S(),B(!1),P("closed"),setTimeout(()=>(0,l.toggleEditMode)(!1),300)},children:(0,t.jsx)("span",{children:"انصراف"})}),(0,t.jsx)(n.Button,{variant:"primary",size:"sm",className:"w-fit",onClick:R,disabled:!N,loading:L,children:(0,t.jsx)("span",{children:"ذخیره"})})]})]})]})}),(0,t.jsx)(a.Presence,{present:A,children:(0,t.jsx)("div",{"data-state":A?"open":"closed",className:"h-[64px] w-full data-open:animate-slide-in-to-bottom data-closed:animate-slide-out-to-bottom tablet:h-[c
1alc(64px+24px)]"})})]})};var I=e.i(247241),N=e.i(718924),S=e.i(411611),E=e.i(846468),D=e.i(227043),z=e.i(929833),W=e.i(891829),T=e.i(875089),L=e.i(763818),M=e.i(677904),O=e.i(78578);let P=(0,r.forwardRef)((e,i)=>{let{title:r,titleId:s,...l}=e;return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":s,...l,children:[r?(0,t.jsx)("title",{id:s,children:r}):null,(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 11.222 12.778 15m-4.803 5.975C6.608 22.342 4 22 2 22c1.025-2-.342-4.608 1.025-5.975a3.5 3.5 0 0 1 4.95 4.95m3.947-5.05 9.137-9.868a2.204 2.204 0 0 0-3.116-3.116L8.075 12.08c-.51.472-.765.708-.913.96a2 2 0 0 0-.038 1.967c.139.257.385.503.876.994.491.492.737.737.994.876a2 2 0 0 0 1.968-.038c.251-.148.487-.403.96-.913"})]})});var A=e.i(650836);let B=(0,r.forwardRef)((e,i)=>{let{title:r,titleId:s,...l}=e;return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":s,...l,children:[r?(0,t.jsx)("title",{id:s,children:r}):null,(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.43 2.43 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.43 2.43 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.43 2.43 0 0 1-1.47-.312 2.43 2.43 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.43 2.43 0 0 1 2.474 1.43"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6"})]})});var R=e.i(368356);let F=()=>{let[e,i]=(0,r.useState)("open"),[s,o]=(0,r.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Presence,{present:!s&&"open"===e,children:(0,t.jsxs)("button",{onClick:()=>o(!0),"data-state":e,className:"fixed bottom-0 right-1/2 z-floating flex translate-x-1/2 cursor-pointer flex-row items-center gap-xxs rounded-t-sm border border-b-0 border-[--border-inverse] bg-[--bg-primary-inverse] py-sm pe-md ps-xs text-sm font-medium text-[--text-secondary-inverse] shadow-xs transition-transform duration-300 focus:outline-none focus-visible:ring-4 focus-visible:ring-[--ring-brand] data-open:animate-slide-in-to-bottom data-closed:animate-slide-out-to-bottom",children:[(0,t.jsx)(c.ChevronUpIcon,{className:"size-xl stroke-[--fg-secondary-inverse]"}),(0,t.jsx)("span",{children:"تنظیمات"})]})}),(0,t.jsx)(a.Presence,{present:s,children:(0,t.jsxs)("div",{"data-state":s?"open":"closed",className:"fixed bottom-3xl right-1/2 z-floating flex translate-x-1/2 flex-col items-center justify-center container-sm data-open:animate-slide-in-to-bottom data-closed:animate-slide-out-to-bottom",children:[(0,t.jsx)("button",{onClick:()=>o(!1),className:"flex min-w-[78px] cursor-pointer flex-row items-center justify-center gap-xxs rounded-t-sm border border-b-0 border-[--border-inverse] bg-[--bg-primary-inverse] px-md py-xxs text-xs font-medium text-[--text-secondary-inverse] shadow-xs",children:(0,t.jsx)(d.ChevronDownIcon,{className:"size-xl stroke-[--fg-secondary-inverse]"})}),(0,t.jsxs)("div",{className:"flex w-full flex-row items-center justify-between rounded-lg bg-[--bg-primary] p-lg shadow-xl",children:[(0,t.jsx)(n.Button,{asChild:!0,variant:"link-gray",size:"sm",className:"w-fit",children:(0,t.jsxs)(R.default,{href:"/admin",target:"_blank",children:[(0,t.jsx)(O.ArrowUpRightIcon,{}),(0,t.jsx)("span",{children:"ورود به مدیریت"})]})}),(0,t.jsx)(n.Button,{variant:"primary",size:"sm",className:"w-fit",onClick:()=>{o(!1),i("closed"),(0,l.toggleEditMode)(!0)},children:(0,t.jsx)("span",{children:"ویرایش ظاهر صفحه"})})]})]})})]})},U=()=>{let[e,i]=(0,r.useState)(!1),[s,n]=(0,r.useState)(!1),{isScrollingDown:o}=(0,L.useIsScrolling)(),d=e?"closed":o?"collapsed":"open";return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(I.Dialog,{open:s,onOpenChange:n,children:[(0,t.jsx)(a.Presence,{present:"closed"!==d,children:(0,t.jsx)(W.DialogTrigger,{asChild:!0,children:(0,t.jsxs)("button",{"data-state":"closed"===d?"closed":"open",className:(0,M.cn)("data-open:animate-slide-in-to-end data-closed:animate-slide-out-to-end fixed left-0 top-[56px] z-floating flex h-[56px] cursor-pointer flex-row items-center gap-md rounded-r-md border border-e-0 border-[--border-inverse] bg-[--bg-primary-inverse] px-xl text-lg font-medium text-[--text-secondary-inverse] shadow-xs transition-transform duration-300 focus:outline-none focus-visible:ring-4 focus-visible:ring-[--ring-brand]","collapsed"===d&&"-translate-x-[76px]"),children:[(0,t.jsx)(B,{className:(0,M.cn)("size-3xl stroke-[--fg-tertiary-inverse] transition-transform duration-300 ease-in-out","collapsed"===d&&"rotate-180")}
1),(0,t.jsx)("span",{className:(0,M.cn)("opacity-100 transition-opacity duration-300","collapsed"===d&&"opacity-0"),children:"تنظیمات"})]})})}),(0,t.jsxs)(S.DialogContent,{children:[(0,t.jsxs)(E.DialogHeader,{children:[(0,t.jsx)(N.DialogClose,{}),(0,t.jsx)(z.DialogTitle,{children:"تنظیمات"})]}),(0,t.jsxs)(D.DialogSection,{children:[(0,t.jsxs)("button",{onClick:()=>{n(!1),i(!0),(0,l.toggleEditMode)(!0)},className:"flex w-full flex-row items-stretch justify-start gap-xl",children:[(0,t.jsx)("div",{className:"flex shrink-0 items-center justify-center py-xl",children:(0,t.jsx)(T.IconFrame,{size:"lg",color:"brand",variant:"light",shape:"square",children:(0,t.jsx)(P,{})})}),(0,t.jsx)("div",{className:"grow",children:(0,t.jsxs)("div",{className:"flex h-full flex-row items-center justify-between border-b border-[--border-tertiary] py-xl text-sm font-medium text-[--text-secondary]",children:[(0,t.jsx)("span",{children:"ویرایش ظاهر صفحه"}),(0,t.jsx)(A.ChevronLeftIcon,{className:"size-xl stroke-[--fg-quaternary]"})]})})]}),(0,t.jsxs)(R.default,{href:"/admin",target:"_blank",className:"flex w-full flex-row items-stretch justify-start gap-xl",children:[(0,t.jsx)("div",{className:"flex shrink-0 items-center justify-center py-xl",children:(0,t.jsx)(T.IconFrame,{size:"lg",color:"warn",variant:"light",shape:"square",children:(0,t.jsx)(O.ArrowUpRightIcon,{})})}),(0,t.jsx)("div",{className:"grow",children:(0,t.jsxs)("div",{className:"flex h-full flex-row items-center justify-between py-xl text-sm font-medium text-[--text-secondary]",children:[(0,t.jsx)("span",{children:"ورود به مدیریت"}),(0,t.jsx)(A.ChevronLeftIcon,{className:"size-xl stroke-[--fg-quaternary]"})]})})]})]})]})]})})},H=e=>{let{viewport:i}=e,{isMobile:r}=(0,o.useMediaQuery)(i);return r?(0,t.jsx)(U,{}):(0,t.jsx)(F,{})};var q=e.i(65325);let _=e=>{let{open:i,onOpenChange:r}=e,{isMobile:s}=(0,o.useMediaQuery)();return(0,t.jsx)(I.Dialog,{open:i,onOpenChange:r,children:(0,t.jsxs)(S.DialogContent,{className:"container-md",children:[(0,t.jsx)(E.DialogHeader,{children:(0,t.jsx)(z.DialogTitle,{children:"ویرایش ظاهر سایت"})}),(0,t.jsx)(D.DialogSection,{children:(0,t.jsx)("video",{src:s?"/static/builderTutorial-mobile.mp4":"/static/builderTutorial-desktop.mp4",playsInline:!0,autoFocus:!0,autoPlay:!0,muted:!0,loop:!0,preload:"eager",className:"max-h-[80vh] w-full rounded-xl object-cover"})}),(0,t.jsx)(q.DialogFooter,{className:"flex flex-row gap-lg",children:(0,t.jsx)(N.DialogClose,{asChild:!0,onClick:()=>{window.localStorage.setItem("tutorial","false")},children:(0,t.jsx)(n.Button,{size:"lg",variant:"primary",className:"tablet:w-fit",children:"متوجه شدم"})})})]})})},G=(0,r.memo)(function(e){let{viewport:i}=e,[s,l]=(0,r.useState)(()=>"false"!==window.localStorage.getItem("tutorial"));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{viewport:i}),(0,t.jsx)(_,{open:s,onOpenChange:l})]})});var K=e.i(291420);let $=function(e){let{viewport:n}=e,{hasRole:a,isEditMode:o}=(0,l.useIsEditMode)(),d=(0,i.useStore)(e=>e.discoveredContainers.size!==e.widgets.size&&e.originalWidgets.size!==e.widgets.size);return((()=>{let{enabled:e=!0,requireEditMode:t=!0}={},{undo:i,redo:n,canUndo:a,canRedo:o}=(0,s.useCore)(),{isEditMode:d}=(0,l.useIsEditMode)();return(0,r.useEffect)(()=>{if(!e||t&&!d)return;let r=e=>{let t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable&&null===t.closest("[contenteditable]")&&(e.ctrlKey||e.metaKey))switch(e.key.toLowerCase()){case"z":e.shiftKey?o&&(e.preventDefault(),e.stopPropagation(),n()):a&&(e.preventDefault(),e.stopPropagation(),i());break;case"y":o&&(e.preventDefault(),e.stopPropagation(),n())}};return document.addEventListener("keydown",r,{capture:!1}),()=>{document.removeEventListener("keydown",r,{capture:!1})}},[i,n,a,o,d,e,t])})(),(0,r.useEffect)(()=>{if(!o)return;let e=document.documentElement;e.setAttribute("data-builder-edit-mode","true");let t=e=>{let t=e.target;t instanceof Element&&t.closest("[data-builder-widget-container] a")&&(e.preventDefault(),e.stopPropagation())},i=e=>{("Enter"===e.key||" "===e.key)&&t(e)};return document.addEventListener("click",t,!0),document.addEventListener("auxclick",t,!0),document.addEventListener("keydown",i,!0),()=>{e.removeAttribute("data-builder-edit-mode"),document.removeEventListener("click",t,!0),document.removeEventListener("auxclick",t,!0),document.removeEventListener("keydown",i,!0)}},[o]),a)?(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsx)(C,{viewport:n}):(0,t.jsx)(G,{viewport:n}),d&&(0,t.jsx)(Q,{})]}):null},Q=()=>(0,t.jsx)("div",{className:"fixed bottom-0 left-0 right-0 top-0 flex size-full max-h-dvh max-w-dvw items-center justify-center bg-[--bg-primary]",children:(0,t.jsxs)("div",{className:"z-portal flex flex-col items-center",children:[(0,t.jsx)(K.SpinnerLoading,{size:"5xl"}),(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("span",{className:"block text-lg text-[--text-secondary]",children:"در حال بارگذاری..."}),(0,t.jsx)("span",{className:"block text-md text-[--text-quaternary]",children:"لطفا کمی صبر کنید"})]})]})});var J=e.i(142125);function V(e){let{children:s,initialState:l}=e,n=(0,r.useRef)(null);null===n.current&&(n.current=(0,i.createBuilderStore)(l),J.commandManager.bindStore(n.current));let a=n.current;return(0,t.jsx)(i.BuilderStoreContext.Provider,{value:a,children:s})}e.s(["BuilderProvider",0,e=>{let{children:i,viewport:r}=e,{isEditMode:s}=(0,l.useIsEditMode)();return(0,t.jsxs)(V,{initialState:{viewport:r,isEditMode:s},children:[i,(0,t.jsx)("link",{rel:"stylesheet",href:"/fonts/yekan.css"}),(0,t.jsx)($,{viewport:r})]})}],206389)},358165,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(770703),s=e.i(465404);let l=(0,r.default)(()=>
1e.A(411838),{loadableGenerated:{modules:[844339]}}),n=(0,i.memo)(function(e){let{name:i,children:r}=e,{isEditMode:n}=(0,s.useIsEditMode)();return n?(0,t.jsx)(l,{name:i}):(0,t.jsx)(t.Fragment,{children:r})});e.s(["default",0,n])}]);

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.