PageSourceSearch

https://behmalt.com/_next/static/chunks/93191-6d3f3625e7446d7d.js

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

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93191],{101:(e,t,r)=>{r.d(t,{Do:()=>m,H6:()=>u,I1:()=>o,NM:()=>f,at:()=>c,nE:()=>d,x9:()=>p,yy:()=>n});var i=r(26708),l=r(48934),s=r(22356),a=r(11917);function n(e,t){return(0,i.I)({queryKey:["public-product","getById",e],enabled:!!e,queryFn:async()=>(0,a.hY)(e),initialData:t??void 0})}function o(e){let t=(e.slug||"").trim();return(0,i.I)({queryKey:["public-posts",t,e.category||"",e.page??1,e.pageSize??9,e.isPhotoReport??null],enabled:!!t,queryFn:async()=>(0,a.dc)({slug:t,category:e.category,page:e.page,pageSize:e.pageSize,isPhotoReport:e.isPhotoReport})})}function d(e,t){let r=(t||"").trim();return(0,i.I)({queryKey:["public-form","getById",e,r],enabled:!!e&&!!r,queryFn:async()=>(0,a.oL)(e,r)})}function c(){return(0,l.n)({mutationFn:async e=>(await s.FH.post("/Home/SubmitForm",e)).data})}function u(e,t){let r=(t||"").trim();return(0,i.I)({queryKey:["public-flipbook","getById",e,r],enabled:!!e&&!!r,queryFn:async()=>(0,a.gX)(e,r)})}function m(e,t){let r=(t||"").trim();return(0,i.I)({queryKey:["public-survey","getById",e,r],enabled:!!e&&!!r,queryFn:async()=>(0,a.oD)(e,r)})}function p(){return(0,l.n)({mutationFn:async e=>await (0,a.yN)(e)})}function f(e,t,r){let l=(t||"").trim();return(0,i.I)({queryKey:["public-survey","reportById",e,l,r||""],enabled:!!e&&!!l,queryFn:async()=>(0,a.yL)(e,l)})}},27871:(e,t,r)=>{r.d(t,{_:()=>l});let i={slug:"fa",surveyId:void 0,headerTitle:void 0,headerDescription:void 0,reportTitle:void 0,resultDisplayMode:"both",showConfirm:!0,submitText:void 0,confirmText:void 0,successText:void 0,inactiveText:void 0,titleFontFamily:"font-iran",descriptionFontFamily:"font-yekan",labelFontFamily:"font-iran",inputFontFamily:"font-yekan",helpTextFontFamily:"font-yekan",submitFontFamily:"font-iran",reportTitleFontFamily:"font-iran",resultFontFamily:"font-yekan",titleFontSize:28,descriptionFontSize:14,labelFontSize:14,inputFontSize:14,helpTextFontSize:12,submitFontSize:14,reportTitleFontSize:16,resultFontSize:12,sectionBackgroundColor:"",cardBackgroundColor:"",panelBorderColor:"",titleColor:"",descriptionColor:"",labelColor:"",inputTextColor:"",inputBackgroundColor:"",inputBorderColor:"",helpTextColor:"",submitTextColor:"",submitBackgroundColor:"",reportTitleColor:"",resultTextColor:"",resultBarColor:"",cardBorderRadius:30,submitBorderRadius:16};function l(e){return{...i,...e||{},slug:String(e?.slug||i.slug||"fa").trim()||"fa",resultDisplayMode:e?.resultDisplayMode||i.resultDisplayMode||"both",showConfirm:e?.showConfirm!==!1,titleFontSize:Number(e?.titleFontSize??i.titleFontSize??28),descriptionFontSize:Number(e?.descriptionFontSize??i.descriptionFontSize??14),labelFontSize:Number(e?.labelFontSize??i.labelFontSize??14),inputFontSize:Number(e?.inputFontSize??i.inputFontSize??14),helpTextFontSize:Number(e?.helpTextFontSize??i.helpTextFontSize??12),submitFontSize:Number(e?.submitFontSize??i.submitFontSize??14),reportTitleFontSize:Number(e?.reportTitleFontSize??i.reportTitleFontSize??16),resultFontSize:Number(e?.resultFontSize??i.resultFontSize??12),cardBorderRadius:Number(e?.cardBorderRadius??i.cardBorderRadius??30),submitBorderRadius:Number(e?.submitBorderRadius??i.submitBorderRadius??16)}}},93191:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var i=r(95155),l=r(39092),s=r.n(l),a=r(12115),n=r(37153),o=r(65725),d=r(77721),c=r(76368),u=r(80283),m=r(101),p=r(75914),f=r(27871);function y(e){return String(e.id||e.key||e.name||"")}function b(e){return(e.type||e.fieldType||e.kind||"text").toLowerCase()}function x(e){return Array.isArray(e)?e.map(e=>"string"==typeof e?{label:e,value:e}:e&&"object"==typeof e?{label:e.label??e.title??e.name??String(e.value??e.id??""),value:e.value??e.id??e.key??e.label}:{label:String(e),value:e}):[]}function h(e,t="var(--font-primary, sans-serif)"){return e?e.startsWith("font-")?(0,d.az)(e):e:t}function g({node:e,dir:t="rtl",template:r,language:l,page:d,theme:v,isDark:S=!1}){let F=(0,f._)(e.defaultProps||{}),j=v===u.Jb.BEHMALT,N=(0,p.s6)("light"),z=S||"dark"===N,k=l??d?.language??null,C="rtl"===t||"ltr"===t?t:k?.direction===o.h.LTR?"ltr":"rtl",T=k?.slug?.trim()||F.slug||("rtl"===C?"fa":"en"),w=(0,a.useMemo)(()=>(0,n.HM)(T),[T]),B=F.surveyId,$=(0,m.Do)(B,T),K=(0,m.x9)(),[q,R]=(0,a.useState)(!1),[A,I]=(0,a.useState)(null),M=!!B&&!!$.data&&0!==$.data.resultVisibility,D=(0,m.NM)(M?B:void 0,T),L=(0,a.useMemo)(()=>{let e=function(e,t){try{if(!e)return t;if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;return t}catch{return t}}
1($.data?.fields,{version:1,fields:[]});return{...e,fields:Array.isArray(e?.fields)?e.fields:[]}},[$.data]),H=(0,a.useMemo)(()=>L.fields.filter(e=>!e.hidden),[L.fields]),P=z?c.K.primary:r?.primaryColor||"#4fe50d",_=F.sectionBackgroundColor||(z?c.K.surfaceAlt:"transparent"),W=F.cardBackgroundColor||(z?c.K.surface:"#ffffff"),E=F.panelBorderColor||(z?c.K.border:"rgba(5,50,98,0.1)"),Y=F.titleColor||(z?c.K.heading:"#053262"),J=F.descriptionColor||(z?c.K.muted:"#6b7b93"),O=F.labelColor||(z?c.K.text:"#053262"),V=F.inputTextColor||(z?c.K.text:"#053262"),Q=F.inputBackgroundColor||(z?"rgba(2, 6, 23, 0.72)":"#ffffff"),X=F.inputBorderColor||(z?"rgba(148, 163, 184, 0.28)":"rgba(5,50,98,0.18)"),G=F.helpTextColor||(z?c.K.muted:"#7b8798"),U=F.submitTextColor||"#ffffff",Z=F.submitBackgroundColor||P,ee=F.reportTitleColor||Y,et=F.resultTextColor||O,er=F.resultBarColor||P,ei=z?c.K.surfaceSoft:"rgba(5,50,98,0.05)",el=F.cardBorderRadius??30,es=F.submitBorderRadius??16,ea=h(F.titleFontFamily,"var(--font-primary, sans-serif)"),en=h(F.descriptionFontFamily,"var(--font-secondary, sans-serif)"),eo=h(F.labelFontFamily,"var(--font-primary, sans-serif)"),ed=h(F.inputFontFamily,"var(--font-secondary, sans-serif)"),ec=h(F.helpTextFontFamily,"var(--font-secondary, sans-serif)"),eu=h(F.submitFontFamily,"var(--font-primary, sans-serif)"),em=h(F.reportTitleFontFamily,"var(--font-primary, sans-serif)"),ep=h(F.resultFontFamily,"var(--font-secondary, sans-serif)"),ef=F.titleFontSize??28,ey=F.descriptionFontSize??14,eb=F.labelFontSize??14,ex=F.inputFontSize??14,eh=F.helpTextFontSize??12,eg=F.submitFontSize??14,ev=F.reportTitleFontSize??16,eS=F.resultFontSize??12,eF=F.headerTitle?.trim()||$.data?.title||w("pages","Survey"),ej=F.headerDescription?.trim()||$.data?.description||"",eN=F.submitText?.trim()||w("pages","SubmitSurvey"),ez=F.confirmText?.trim()||w("pages","ConfirmInformation"),ek=F.successText?.trim()||w("pages","YourResponseWasSubmittedSuccessfully"),eC=F.inactiveText?.trim()||w("pages","SurveyIsNotActive"),eT=F.reportTitle?.trim(),ew=F.resultDisplayMode||"both",eB=!1!==F.showConfirm;function e$(e){if(e.hidden)return null;let t=y(e);if(!t)return null;let r=b(e),l=e.label||e.title||y(e),s=e.placeholder||"",a=!!e.disabled,n=!!e.required,o={width:"100%",borderRadius:16,border:`1px solid ${X}`,backgroundColor:Q,color:V,fontFamily:ed,fontSize:`${ex}px`,padding:"12px 16px",transition:"border-color .2s ease, box-shadow .2s ease, background-color .2s ease"},d={color:O,fontFamily:eo,fontSize:`${eb}px`,fontWeight:600},c={color:G,fontFamily:ec,fontSize:`${eh}px`,lineHeight:1.8};if("textarea"===r)return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"block",style:d,children:l}),(0,i.jsx)("textarea",{name:t,rows:4,placeholder:s,disabled:a,required:n,dir:C,style:o}),e.helpText?(0,i.jsx)("p",{style:c,children:e.helpText}):null]},t);if("select"===r){let r=x(e.options);return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"block",style:d,children:l}),(0,i.jsxs)("select",{name:t,disabled:a,required:n,dir:C,defaultValue:"",style:o,children:[(0,i.jsx)("option",{value:"",children:w("pages","Select")}),r.map(e=>(0,i.jsx)("option",{value:String(e.value),children:String(e.label)},String(e.value)))]}),e.helpText?(0,i.jsx)("p",{style:c,children:e.helpText}):null]},t)}if("checkbox"===r){let r=x(e.options);return r.length>0?(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"block",style:d,children:l}),(0,i.jsx)("div",{className:"space-y-2",children:r.map(e=>(0,i.jsxs)("label",{className:"flex items-center gap-2",children:[(0,i.jsx)("input",{type:"checkbox",name:t,value:String(e.value),className:"h-4 w-4"}),(0,i.jsx)("span",{style:{color:O,fontFamily:eo,fontSize:`${eb}px`},children:String(e.label)})]},String(e.value)))}),e.helpText?(0,i.jsx)("p",{style:c,children:e.helpText}):null]},t):(0,i.jsxs)("label",{className:"flex items-center gap-2",children:[(0,i.jsx)("input",{type:"checkbox",name:t,className:"h-4 w-4"}),(0,i.jsx)("span",{style:{color:O,fontFamily:eo,fontSize:`${eb}px`},children:l}),e.helpText?(0,i.jsx)("p",{style:c,children:e.helpText}):null]},t)}if("radio"===r){let r=x(e.options);return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"block",style:d,children:l}),(0,i.jsx)("div",{className:"space-y-2",children:r.map(e=>(0,i.jsxs)("label",{className:"flex items-center gap-2",children:[(0,i.jsx)("input",{type:"radio",name:t,value:String(e.value),required:n,className:"h-4 w-4"}),(0,i.jsx)("span",{style:{color:O,fontFamily:eo,fontSize:`${eb}px`},children:String(e.label)})]},String(e.value)))}),e.helpText?(0,i.jsx)("p",{style:c,children:e.helpText}):null]},t)}return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"block",style:d,children:l}),(0,i.jsx)("input",{type:"email"===r?"email":"number"===r?"number":"date"===r?"date":"text",name:t,placeholder:s,disabled:a,required:n,dir:C,style:o}),e.helpText?(0,i.jsx)("p",{style:c,children:e.helpText}):null]},t)}async function eK(e){e.preventDefault();let t=e.currentTarget;if(I(null),R(!1),!B)return void I(w("pages","NoSurveySelected"));try{let e=new FormData(t),r={};for(let t of L.fields){let i=y(t);if(!i)continue;let l=b(t);if("checkbox"===l&&Array.isArray(t.options)&&t.options.length>0){r[i]=e.getAll(i).map(String);continue}if("checkbox"===l&&(!t.options||0===t.options.length)){r[i]=!!e.get(i);continue}let s=e.get(i);if(null===s){r[i]="";continue}if("number"===l){let e=Number(String(s));r[i]=Number.isFinite(e)?e:String(s);continue}r[i]=String(s)}await K.mutateAsync({surveyId:B,completedBy:String(r.fullName||r.full_name||r.name||r.email||r.ph
1one||r.mobile||r.completedBy||r.completed_by||"anonymous"),fields:r}),R(!0),M&&await D.refetch(),t?.reset?.()}catch(e){I(function(e,t){let r=e?.response?.data;if(!r)return e?.message||t;if("string"==typeof r)return r;if(r?.errors&&"object"==typeof r.errors){let e=Object.keys(r.errors)[0];return r.errors?.[e]?.[0]||r.title||t}return r.title||r.message||t}(e,w("pages","Error")))}}let eq=!B||!$.isLoading&&!$.data,eR=!!$.data&&M&&D.isSuccess&&!!D.data,eA=!!$.data&&!eR,eI={backgroundColor:_},eM={border:`1px solid ${E}`,backgroundColor:W,borderRadius:`${el}px`},eD={color:Y,fontFamily:ea,fontSize:`${ef}px`,lineHeight:1.4},eL={color:J,fontFamily:en,fontSize:`${ey}px`,lineHeight:1.95},eH={backgroundColor:Z,borderColor:Z,color:U,fontFamily:eu,fontSize:`${eg}px`,borderRadius:`${es}px`},eP=e=>{var t;return(0,i.jsxs)("div",{className:"space-y-6",children:[eR?(0,i.jsxs)("div",{className:"rounded-2xl border p-5",style:{borderColor:E,backgroundColor:_||(z?c.K.surfaceAlt:"#f8fafc")},children:[eT?(0,i.jsx)("h3",{className:"mb-4",style:{color:ee,fontFamily:em,fontSize:`${ev}px`,fontWeight:700},children:eT}):null,D.isLoading?(0,i.jsx)("div",{style:eL,children:w("pages","Loading")}):D.data?(t=D.data,t?.questions?.length?(0,i.jsx)("div",{className:"space-y-4",children:t.questions.map(e=>{let t=Math.max(1,Number(e.answeredCount||0));return(0,i.jsxs)("div",{className:"rounded-2xl border p-4",style:{borderColor:E,backgroundColor:W},children:[(0,i.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,i.jsx)("h4",{style:{color:ee,fontFamily:em,fontSize:`${ev}px`,fontWeight:700},children:e.title}),(0,i.jsx)("span",{style:{color:J,fontFamily:ep,fontSize:`${eS}px`},children:e.type})]}),(0,i.jsx)("div",{className:"mt-4 space-y-3",children:e.options.map(e=>{let r=Math.round(Number(e.count||0)/t*100),l="count"===ew?String(e.count):"percent"===ew?`${r}%`:`${e.count} / ${r}%`;return(0,i.jsxs)("div",{className:"space-y-1",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",style:{color:et,fontFamily:ep,fontSize:`${eS}px`},children:[(0,i.jsx)("span",{children:e.label}),(0,i.jsx)("span",{children:l})]}),(0,i.jsx)("div",{className:"h-2 overflow-hidden rounded-full",style:{backgroundColor:ei},children:(0,i.jsx)("div",{className:"h-full rounded-full",style:{width:`${r}%`,backgroundColor:er}})})]},e.value)})})]},e.id)})}):(0,i.jsx)("div",{style:{color:J,fontFamily:en,fontSize:`${ey}px`},children:w("pages","NoResultsYet")})):(0,i.jsx)("div",{style:eL,children:w("pages","NoResultsYet")})]}):null,eA?H.length>0?(0,i.jsxs)("form",{onSubmit:eK,className:"space-y-4",children:["split"===e?(0,i.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:H.map((e,t)=>{let r=e$(e);if(!r)return null;let l=["textarea","checkbox","radio"].includes(b(e));return(0,i.jsx)("div",{className:l?"md:col-span-2":"",children:r},`${y(e)}_${t}`)})}):(0,i.jsx)("div",{className:"space-y-4",children:H.map(e$)}),eB?(0,i.jsxs)("label",{className:"flex items-start gap-3 rounded-2xl p-4",style:{backgroundColor:ei},children:[(0,i.jsx)("input",{type:"checkbox",required:!0,className:"mt-1 h-4 w-4"}),(0,i.jsx)("span",{style:{color:O,fontFamily:eo,fontSize:`${eb}px`,lineHeight:1.9},children:ez})]}):null,(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsx)("button",{type:"submit",className:"inline-flex min-h-[46px] min-w-[140px] cursor-pointer items-center justify-center border-0 px-5 text-center transition disabled:cursor-not-allowed disabled:opacity-60",style:eH,disabled:K.isPending,children:K.isPending?w("pages","Submitting"):eN}),A?(0,i.jsx)("div",{className:"text-sm text-red-500",children:A}):null,q?(0,i.jsx)("div",{style:{color:er,fontFamily:ep,fontSize:`${eS}px`},children:ek}):null]})]}):(0,i.jsx)("div",{className:"rounded-2xl border px-4 py-6",style:{borderColor:E,backgroundColor:_||(z?c.K.surfaceAlt:"#f8fafc"),color:J,fontFamily:en,fontSize:`${ey}px`},children:w("pages","NoActiveQuestionsForSurvey")}):null]})};return j?(0,i.jsxs)("main",{dir:C,"data-survey-widget-theme":z?"dark":"light",style:eI,className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" w-full",children:[(0,i.jsx)("div",{className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" py-16",children:(0,i.jsx)("div",{className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" container mx-auto max-w-3xl px-4",children:(0,i.jsxs)("div",{style:eM,className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" p-6 shadow-[var(--dcms-shadow)] md:p-8",children:[(0,i.jsxs)("div",{className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" mb-6 text-center",children:[(0,i.jsx)("h2",{style:eD,className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" font-bold",children:eF}),(0,i.jsx)("p",{style:eL,className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" mt-3",children:ej})]}),eq?(0,i.jsx)("div",{style:eL,className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" text-center",children:w("pages","PleaseSelectASurveyInWidgetSettings")}):$.isLoading?(0,i.jsx)("div",{style:eL,className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" text-center",children:w("pages","Loading")}):$.data?.isActive===!1||$.data?.isPublished===!1?(0,i.jsx)("div",{style:{fontFamily:en,fontSize:`${ey}px`},className:s().dynamic([["3f225bfb8ef0bb36",[c.K.muted]]])+" text-center text-amber-500",children:eC}):eP("stacked")]})})}),(0,i.jsx)(s(),{id:"3f225bfb8ef0bb36",dynamic:[c.K.muted],children:`[data-survey-widget-theme="dark"] input,[data-survey-widget-theme="dark"] textarea,[data-survey-widget-theme="dark"] select{color-scheme:dark}[data-survey-widget-theme="dark"] option{background:#0f172a;color:#e2e8f0}[data-survey-widget-theme="dark"] input::placeholder,[data-survey-widget-theme="dark"] textarea::placeholder{color:${c.K.muted}}`})]}):(0,i.jsx)("section",{className:"w-full px-4 py-10",dir:C,"data-survey-widget-theme":z?"dark":"light",style:eI,children:(0,i.jsx)("div",{className:"mx-auto max-w-5xl overflow-hidden shadow-[var(--dcms-shadow)]",style:eM,children:(0,i.jsxs)("div",{className:"grid gap-0 lg:grid-cols-[1.05fr_1.3fr]",children:[(0,i.jsxs)("div",{className:"relative min-h-[260px] overflow-hidden p-8 text-white",style:{background:z?"linear-gradient(135deg, #0f172a 0%, #0f766e 100%)":"linear-gradient(135deg, #053262 0%, #4fe50d 100%)"},children:[(0,i.jsx)("p",{className:"mb-3 text-sm font-medium uppercase tracking-[0.18em] text-white/75",children:w("pages","Survey")}),(0,i.jsx)("h2",{className:"max-w-md font-bold",style:{...eD,color:"#ffffff"},children:eF}),(0,i.jsx)("p",{className:"mt-4 max-w-md",style:{...eL,color:"rgba(255,255,255,0.82)"},children:ej}),(0,i.jsx)("div",{className:"mt-8 rounded-2xl border border-white/15 bg-white/10 p-4",style:{fontFamily:ep,fontSize:`${eS}px`,lineHeight:1.9,color:"rgba(255,255,255,0.92)"},children:ek})]}),(0,i.jsx)("div",{className:"p-6 md:p-8",children:eq?(0,i.jsx)("div",{style:eL,children:w("pages","PleaseSelectASurveyInWidgetSettings")}):$.isLoading?(0,i.jsx)("div",{style:eL,children:w("pages","Loading")}):$.data?.isActive===!1||$.data?.isPublished===!1?(0,i.jsx)("div",{className:"text-amber-500",style:{fontFamily:en,fontSize:`${ey}px`},children:eC}):eP("split")}
1)]})})})}}}]);

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.