PageSourceSearch

https://behmalt.com/_next/static/chunks/52827.db15227ed9dc2fed.js

js behmalt.com collected 2026-09-25 10:26:18 UTC 17,019 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52827],{25366:(e,l,t)=>{t.d(l,{q:()=>o});var a=t(29753),r=t(28509),i=class extends a.${constructor(e,l){super(e,l)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,l){let{state:t}=e,a=super.createResult(e,l),{isFetching:i,isRefetching:n,isError:o,isRefetchError:s}=a,d=t.fetchMeta?.fetchMore?.direction,c=o&&"forward"===d,u=i&&"forward"===d,h=o&&"backward"===d,b=i&&"backward"===d;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.rB)(l,t.data),hasPreviousPage:(0,r.RQ)(l,t.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:h,isFetchingPreviousPage:b,isRefetchError:s&&!c&&!h,isRefetching:n&&!u&&!b}}},n=t(38764);function o(e,l){return(0,n.t)(e,i,l)}},55506:(e,l,t)=>{t.d(l,{A:()=>o});var a=t(95155),r=t(86588),i=t(60180),n=t(6576);function o({value:e,onChange:l,emptyText:t="هنوز تصویری انتخاب نشده است.",previewClassName:s="h-44 w-full object-cover",fileFilter:d="image",allowedExtensions:c,accept:u,restrictionMessage:h}){return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(r.A,{multiselect:!1,filter:d,value:e||"",onChange:e=>l?.(String(e||"")),allowedExtensions:c,accept:u,restrictionMessage:h}),e?(0,a.jsxs)("div",{className:"group relative overflow-hidden rounded-2xl border border-slate-200 bg-slate-50 shadow-sm",children:[(0,a.jsx)("img",{src:e?(0,n.IB)(e):"",alt:"preview",className:s}),(0,a.jsx)("button",{type:"button",onClick:()=>l?.(""),className:"absolute left-3 top-3 z-20 flex h-10 w-10 items-center justify-center rounded-full bg-red-500 text-white shadow-lg transition hover:bg-red-600","aria-label":"حذف تصویر",children:(0,a.jsx)(i.SU,{})})]}):(0,a.jsx)("div",{className:"rounded-2xl border border-dashed border-slate-300 px-3 py-4 text-center text-xs text-slate-400",children:t})]})}},89790:(e,l,t)=>{t.r(l),t.d(l,{default:()=>I});var a=t(95155),r=t(90346),i=t(12115),n=t(80870),o=t(81229),s=t(93910),d=t(3591),c=t(55506),u=t(42799),h=t(35493),b=t(80283),x=t(74409);let p=[{label:"نمایش در همه دستگاه‌ها",value:"all"},{label:"عدم نمایش در موبایل",value:"hide-mobile"},{label:"فقط موبایل",value:"only-mobile"},{label:"عدم نمایش در تبلت و موبایل",value:"hide-tablet-mobile"},{label:"فقط دسکتاپ",value:"only-desktop"}],m=[{label:"باقی‌مانده فضا",value:"fill"},{label:"اندازه محتوا",value:"content"},...Array.from({length:12},(e,l)=>{let t=l+1;return{label:`${t}/12`,value:`span:${t}`}})],g=[{label:"پوشش کامل",value:"cover"},{label:"نمایش کامل تصویر",value:"contain"},{label:"اندازه اصلی",value:"auto"}],f=[{label:"بدون تکرار",value:"no-repeat"},{label:"تکرار کامل",value:"repeat"},{label:"تکرار افقی",value:"repeat-x"},{label:"تکرار عمودی",value:"repeat-y"}],v=[{label:"بالا چپ",value:"left top"},{label:"بالا وسط",value:"center top"},{label:"بالا راست",value:"right top"},{label:"وسط چپ",value:"left center"},{label:"وسط",value:"center center"},{label:"وسط راست",value:"right center"},{label:"پایین چپ",value:"left bottom"},{label:"پایین وسط",value:"center bottom"},{label:"پایین راست",value:"right bottom"}],j=[{label:"همراه صفحه",value:"scroll"},{label:"ثابت",value:"fixed"},{label:"داخلی",value:"local"}],y=[{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"},{label:"Double",value:"double"}],S=[{title:"بالا",width:"borderTopWidth",style:"borderTopStyle",color:"borderTopColor"},{title:"راست",width:"borderRightWidth",style:"borderRightStyle",color:"borderRightColor"},{title:"پایین",width:"borderBottomWidth",style:"borderBottomStyle",color:"borderBottomColor"},{title:"چپ",width:"borderLeftWidth",style:"borderLeftStyle",color:"borderLeftColor"}],N=[{label:"کشیده",value:"stretch"},{label:"چپ",value:"left"},{label:"وسط",value:"center"},{label:"راست",value:"right"}],P=[{label:"بالا",value:"top"},{label:"وسط",value:"middle"},{label:"پایین",value:"bottom"}],w=[{label:"زیر هم",value:"stack"}
1,{label:"کنار هم با شکست سطر",value:"inline-wrap"},{label:"کنار هم بدون شکست",value:"inline-nowrap"}];function M(){return{id:"section_grid_nested_template",key:"section_grid",title:"کانتینر",description:"لایه داخلی مدیریت ستون‌ها",category:"section",icon:null,canHaveChildren:!0,type:u.x.grid,children:[],defaultProps:{gap:12,columnGap:12,rowGap:12,columns:1,flexDirection:"flex-row",flexWrap:"flex-wrap",justifyContent:"justify-start",alignItems:"items-stretch",keepInSingleRow:!1,paddingX:0,paddingY:0,borderRadius:0,minHeight:0,itemLayouts:{},responsiveVisibility:"all",showBorder:!1,borderMode:"all",borderWidth:1,borderStyle:"solid",borderTop:!0,borderRight:!0,borderBottom:!0,borderLeft:!0}}}function V(e,l){let t=Number(e??0),a=Number(l??0);return t===a?String(t):`${t} ${a}`}function I(){let e=(0,b.sr)(),l=(0,b.s0)(),t=l.selectedWidget,[I]=r.lV.useForm(),[C,k]=(0,i.useState)(!1),[W,A]=(0,i.useState)(""),[R,L]=(0,i.useState)(!1),G=t?.parentId?e.getNodeById(t.parentId):void 0,$=G?.type===u.x.grid?G.defaultProps||{}:void 0,B=!!$?.isRootLayout,z=!B&&String($?.flexDirection||"").startsWith("flex-row"),_=function({parentIsRootLayout:e,isColumn:l}){return e||!l?"کانتینر":"ستون"}({parentIsRootLayout:B,isColumn:z}),J="کانتینر"===_?t?.children?.find(e=>e.type===u.x.grid):void 0,E=J?.children?.filter(e=>e.type===u.x.grid_item).length||0,F=J?.defaultProps||{},O=Number(F.gap??12),T=Number(F.columnGap??F.gap??12),U=Number(F.rowGap??F.gap??12),X=t?.id&&$?.itemLayouts?.[t.id]||{},D="number"==typeof X?.span?X.span:Math.max(1,Math.min(12,Math.round(Number(X?.basis||100)/100*12))),H="number"==typeof X?.tabletSpan?X.tabletSpan:12,q="number"==typeof X?.mobileSpan?X.mobileSpan:12,Q=X?.widthMode||"span",Y=X?.tabletWidthMode||"span",Z=X?.mobileWidthMode||"span",K="fill"===Q?"fill":"content"===Q?"content":`span:${D}`,ee="fill"===Y?"fill":"content"===Y?"content":`span:${H}`,el="fill"===Z?"fill":"content"===Z?"content":`span:${q}`,et=(0,i.useMemo)(()=>t?{...x.G,...t.defaultProps||{},responsiveVisibility:t.defaultProps?.responsiveVisibility||(t.defaultProps?.hideOnResponsive?"hide-tablet-mobile":"all"),slotLabel:String(t.defaultProps?.slotLabel||t.title||"")}:x.G,[t]),ea=r.lV.useWatch("useContainer",I),er=r.lV.useWatch("horizontalAlign",I)??et.horizontalAlign,ei=r.lV.useWatch("verticalAlign",I)??et.verticalAlign,en=r.lV.useWatch("backgroundImage",I)??et.backgroundImage;if((0,i.useEffect)(()=>{t&&I.setFieldsValue(et)},[et,I,t]),(0,i.useEffect)(()=>{k(T!==O||U!==O)},[t?.id,O,T,U]),(0,i.useEffect)(()=>{R||A(V(U,T))},[R,T,U]),!t)return null;let eo=l=>{let a={...x.G,...t.defaultProps||{},...l};e.updateNode(t.id,{title:a.slotLabel||t.title,defaultProps:a})},es=a=>{if(!t?.id||G?.type!==u.x.grid)return;let r=G.defaultProps||{},i=r.itemLayouts||{},n={...i[t.id]||{},...a};e.updateNode(G.id,{defaultProps:{...r,itemLayouts:{...i,[t.id]:n}}}),l.setWidget(t.id)};return(0,a.jsx)(n.XR,{children:(0,a.jsxs)(r.lV,{form:I,layout:"vertical",initialValues:et,onValuesChange:(l,a)=>{e.updateNode(t.id,{title:a.slotLabel||t.title,defaultProps:{...x.G,...t.defaultProps||{},...a,hideOnResponsive:"hide-tablet-mobile"===a.responsiveVisibility,slotLabel:a.slotLabel}})},dir:"rtl",children:[(0,a.jsxs)(n.So,{title:`مشخصات ${_}`,description:z?"عرض ستون را برای هر دستگاه جداگانه تنظیم کنید.":`نام، اندازه و ظاهر این ${_} را تنظیم کنید.`,children:[(0,a.jsx)(n.xh,{label:`نام ${_}`,children:(0,a.jsx)(r.lV.Item,{name:"slotLabel",noStyle:!0,children:(0,a.jsx)(n.zA,{placeholder:`مثلا: ${_} اصلی`})})}),z?null:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)(n.Jg,{columns:2,children:[(0,a.jsx)(n.xh,{label:"تعداد ستون",children:(0,a.jsx)(n.UX,{min:1,value:E||void 0,onChange:a=>{if(!t)return;let r=J?.id;if(r||(r=e.addNode(M(),t.id)),!r)return;let i=e.getNodeById(r);i&&i.type===u.x.grid&&(e.updateNode(r,(0,h.xT)(i,Number(a||1))),l.setWidget(t.id),l.setSection("settings"),l.setSidebarStatus(!0))}})}),(0,a.jsx)(n.xh,{label:"فاصله کلی",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(n.zA,{dir:"ltr",value:R?W:V(U,T),placeholder:"0 یا 12 24",onFocus:()=>{L(!0),A(V(U,T))},onBlur:()=>{L(!1),A(V(U,T))},onChange:a=>{if(!t)return;let r=String(a?.target?.value??"");A(r);let i=function(e){let l=String(e||"").trim().split(/\s+/).filter(
1Boolean);if(0===l.length)return{gap:0,columnGap:0,rowGap:0};if(l.length>2)return null;let t=l.map(e=>Number(e));if(t.some(e=>Number.isNaN(e)||e<0))return null;if(1===t.length){let e=t[0];return{gap:e,columnGap:e,rowGap:e}}let[a,r]=t;return{gap:a===r?a:void 0,columnGap:r,rowGap:a}}(r);if(!i)return;let n=J?.id;if(n||(n=e.addNode(M(),t.id)),!n)return;let o=e.getNodeById(n);o&&o.type===u.x.grid&&(e.updateNode(n,{defaultProps:{...o.defaultProps||{},...i}}),l.setWidget(t.id),l.setSection("settings"),l.setSidebarStatus(!0))},className:"flex-1"}),(0,a.jsx)("button",{type:"button",onClick:()=>k(e=>!e),"aria-label":C?"بستن فاصله‌های جداگانه":"باز کردن فاصله‌های جداگانه","aria-expanded":C,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-[8px] border border-[var(--pc-control-border)] bg-[var(--pc-control-bg)] text-[11px] text-[var(--pc-control-text)] transition hover:border-[var(--pc-control-hover-border)]",children:(0,a.jsx)("span",{className:`transition-transform duration-200 ${C?"rotate-180":""}`,children:"▾"})})]})})]}),C?(0,a.jsxs)(n.Jg,{columns:2,children:[(0,a.jsx)(n.xh,{label:"فاصله افقی",children:(0,a.jsx)(n.UX,{min:0,max:96,step:2,value:T,onChange:a=>{if(!t)return;let r=J?.id;if(r||(r=e.addNode(M(),t.id)),!r)return;let i=e.getNodeById(r);i&&i.type===u.x.grid&&(e.updateNode(r,{defaultProps:{...i.defaultProps||{},columnGap:Math.max(0,Number(a??0)),gap:Math.max(0,Number(a??0))===U?Math.max(0,Number(a??0)):void 0}}),l.setWidget(t.id),l.setSection("settings"),l.setSidebarStatus(!0))}})}),(0,a.jsx)(n.xh,{label:"فاصله عمودی",children:(0,a.jsx)(n.UX,{min:0,max:96,step:2,value:U,onChange:a=>{if(!t)return;let r=J?.id;if(r||(r=e.addNode(M(),t.id)),!r)return;let i=e.getNodeById(r);i&&i.type===u.x.grid&&(e.updateNode(r,{defaultProps:{...i.defaultProps||{},rowGap:Math.max(0,Number(a??0)),gap:Math.max(0,Number(a??0))===T?Math.max(0,Number(a??0)):void 0}}),l.setWidget(t.id),l.setSection("settings"),l.setSidebarStatus(!0))}})})]}):null]}),z?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(n.Jg,{columns:3,children:[(0,a.jsx)(n.xh,{label:"دسکتاپ",children:(0,a.jsx)(n.Pl,{value:K,onChange:e=>(e=>{if("fill"===e)return void es({widthMode:"fill",grow:Math.max(1,Number(X?.grow??1))});if("content"===e)return void es({widthMode:"content",grow:0});let l=Math.min(12,Math.max(1,Number(Number(String(e).replace("span:",""))||1))),t=Math.round(l/12*1e4)/100;es({widthMode:"span",span:l,basis:t,grow:0})})(String(e)),options:m})}),(0,a.jsx)(n.xh,{label:"تبلت",children:(0,a.jsx)(n.Pl,{value:ee,onChange:e=>{var l;"fill"===(l=String(e))?es({tabletWidthMode:"fill"}):"content"===l?es({tabletWidthMode:"content"}):es({tabletWidthMode:"span",tabletSpan:Math.min(12,Math.max(1,Number(Number(String(l).replace("span:",""))||1)))})},options:m})}),(0,a.jsx)(n.xh,{label:"موبایل",children:(0,a.jsx)(n.Pl,{value:el,onChange:e=>{var l;"fill"===(l=String(e))?es({mobileWidthMode:"fill"}):"content"===l?es({mobileWidthMode:"content"}):es({mobileWidthMode:"span",mobileSpan:Math.min(12,Math.max(1,Number(Number(String(l).replace("span:",""))||1)))})},options:m})})]})}):null,(0,a.jsxs)(n.Jg,{columns:2,children:[(0,a.jsx)(n.xh,{label:"ارتفاع ثابت",children:(0,a.jsx)(r.lV.Item,{name:"height",noStyle:!0,children:(0,a.jsx)(n.zA,{dir:"ltr",placeholder:"420px یا 60vh"})})}),(0,a.jsx)(n.xh,{label:"حداقل ارتفاع",children:(0,a.jsx)(r.lV.Item,{name:"minHeight",noStyle:!0,children:(0,a.jsx)(n.zA,{dir:"ltr",placeholder:"180px"})})})]}),(0,a.jsx)(n.xh,{label:"نمایش واکنش‌گرا",children:(0,a.jsx)(r.lV.Item,{name:"responsiveVisibility",noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...p]})})})]}),(0,a.jsxs)(n.So,{title:"پس‌زمینه",children:[(0,a.jsx)(n.xh,{label:"رنگ پس‌زمینه",children:(0,a.jsx)(r.lV.Item,{name:"backgroundColor",noStyle:!0,children:(0,a.jsx)(d.A,{allowCustomValue:!0,placeholder:"#ffffff یا var(--surface)"})})}),(0,a.jsx)(n.xh,{label:"تصویر پس‌زمینه",children:(0,a.jsx)(c.A,{value:en,onChange:e=>{I.setFieldValue("backgroundImage",e),eo({backgroundImage:e})},emptyText:`هنوز تصویری برای پس‌زمینه این ${_} انتخاب نشده است.`,previewClassName:"h-24 w-full object-cover"})}),(0,a.jsxs)(n.Jg,{columns:2,children:[(0,a.jsx)(n.xh,{label:"اندازه",children:(0,a.jsx)(r.l
1V.Item,{name:"backgroundSize",noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...g]})})}),(0,a.jsx)(n.xh,{label:"تکرار",children:(0,a.jsx)(r.lV.Item,{name:"backgroundRepeat",noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...f]})})}),(0,a.jsx)(n.xh,{label:"جایگاه",children:(0,a.jsx)(r.lV.Item,{name:"backgroundPosition",noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...v]})})}),(0,a.jsx)(n.xh,{label:"اسکرول",children:(0,a.jsx)(r.lV.Item,{name:"backgroundAttachment",noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...j]})})})]})]}),(0,a.jsxs)(n.So,{title:"فاصله و کادر",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(r.lV.Item,{name:"padding",noStyle:!0,children:(0,a.jsx)(o.Ay,{label:"پدینگ",placeholder:"16px یا 12px 20px"})}),(0,a.jsx)(r.lV.Item,{name:"margin",noStyle:!0,children:(0,a.jsx)(o.Ay,{label:"مارجین",placeholder:"0 auto 24px"})}),(0,a.jsx)(r.lV.Item,{name:"borderRadius",noStyle:!0,children:(0,a.jsx)(o.Ay,{label:"گردی گوشه",mode:"corners",placeholder:"12px",numericOutputWhenUniform:!0})})]}),(0,a.jsx)(s.A,{form:I,emptyMessage:`مرز برای این ${_} هنوز فعال نشده است.`})]}),(0,a.jsxs)(n.So,{title:"عرض محتوا",children:[(0,a.jsx)(n.RZ,{label:"Container",hint:"پس‌زمینه تمام‌عرض می‌ماند.",children:(0,a.jsx)(r.lV.Item,{name:"useContainer",valuePropName:"checked",noStyle:!0,children:(0,a.jsx)(n.xk,{})})}),(0,a.jsxs)("div",{className:"mb-2 space-y-2 rounded-[10px] border border-[var(--pc-panel-border)] bg-[var(--pc-control-bg)] p-2",children:[(0,a.jsx)("div",{className:"font-yekan text-[10px] font-bold text-[var(--pc-control-text)]",children:"کنترل جداگانه مرزهای چهارگانه"}),S.map(e=>(0,a.jsxs)("div",{className:"space-y-1 rounded-[8px] border border-[var(--pc-panel-border)] p-2",children:[(0,a.jsx)("div",{className:"font-yekan text-[10px] font-semibold text-[var(--pc-control-text)]",children:e.title}),(0,a.jsxs)(n.Jg,{columns:3,children:[(0,a.jsx)(n.xh,{label:"سایز",children:(0,a.jsx)(r.lV.Item,{name:e.width,noStyle:!0,children:(0,a.jsx)(n.UX,{min:0,max:64})})}),(0,a.jsx)(n.xh,{label:"نوع",children:(0,a.jsx)(r.lV.Item,{name:e.style,noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...y]})})}),(0,a.jsx)(n.xh,{label:"رنگ",children:(0,a.jsx)(r.lV.Item,{name:e.color,noStyle:!0,children:(0,a.jsx)(d.A,{allowCustomValue:!0})})})]})]},e.width))]}),ea?(0,a.jsx)(n.xh,{label:"حداکثر عرض محتوا",children:(0,a.jsx)(r.lV.Item,{name:"containerMaxWidth",noStyle:!0,children:(0,a.jsx)(n.zA,{dir:"ltr",placeholder:"1320px یا 1140px"})})}):null]}),(0,a.jsxs)(n.So,{title:"تراز محتوا",children:[(0,a.jsxs)(n.Jg,{columns:2,children:[(0,a.jsx)(n.xh,{label:"افقی",children:(0,a.jsx)(n.Pl,{value:er,onChange:e=>{let l=String(e);I.setFieldValue("horizontalAlign",l,{triggerChange:!1}),eo({horizontalAlign:l})},options:[...N]})}),(0,a.jsx)(n.xh,{label:"عمودی",children:(0,a.jsx)(n.Pl,{value:ei,onChange:e=>{let l=String(e);I.setFieldValue("verticalAlign",l,{triggerChange:!1}),eo({verticalAlign:l})},options:[...P]})})]}),(0,a.jsxs)(n.Jg,{columns:2,children:[(0,a.jsx)(n.xh,{label:"چیدمان ویجت‌های داخل این بخش",children:(0,a.jsx)(r.lV.Item,{name:"childLayout",noStyle:!0,children:(0,a.jsx)(n.Pl,{options:[...w]})})}),(0,a.jsx)(n.xh,{label:"فاصله بین ویجت‌ها",children:(0,a.jsx)(r.lV.Item,{name:"childGap",noStyle:!0,children:(0,a.jsx)(n.zA,{dir:"ltr",placeholder:"0px یا 12px"})})})]})]})]})})}}}]);

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.