PageSourceSearch

https://nca.gov.sa/_next/static/chunks/4849.ac0c63ac315672dd.js

js nca.gov.sa collected 2026-10-01 13:05:19 UTC 7,446 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="b45c1527-cf04-41f9-9d4a-6c4382827d3f",e._sentryDebugIdIdentifier="sentry-dbid-b45c1527-cf04-41f9-9d4a-6c4382827d3f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4849],{12758:(e,a,t)=>{e.exports=t(19298)()},19298:(e,a,t)=>{"use strict";var l=t(53341);function n(){}function s(){}s.resetWarningCache=n,e.exports=function(){function e(e,a,t,n,s,r){if(r!==l){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function a(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:s,resetWarningCache:n};return t.PropTypes=t,t}},19642:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>j});var l=t(95155),n=t(12115),s=t(43541),r=t(57468);let o=async e=>{let a={url:e.url,useful:e.useful||"",reasons:e.reasons||[],gender:e.gender||"",comment:e.comment||"",captchaToken:e.token||""};return await (0,r.M)(s.J.evaluationForm,{method:"POST",body:a})};var i=t(15279);let u=["HELPFUL","RELEVANT","WILL_WRITTEN","EASY_TO_READ"],d=["POORLY_WRITTEN","UN_RELEVANT","FACED_TECHNICAL_ISSUE","HARD_TO_READ"];var c=t(24330),m=t(94091),f=t(241),_=t(41515),v=t(14959),x=t(32986),b=t(22544),p=t(98734),h=t(44193),g=t(66942),E=t(98112);let y={error:"bg-red-100 border-red-400 text-red-700",success:"bg-green-100 border-green-400 text-green-700",info:"bg-blue-100 border-blue-400 text-blue-700"},T=e=>{let{children:a,type:t}=e,s=(0,n.useRef)(null);return(0,n.useEffect)(()=>{var e;null==s||null==(e=s.current)||e.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})},[]),(0,l.jsx)("div",{ref:s,className:" border px-4 py-3 my-4 rounded relative ".concat(y[t]),role:"alert",children:a})};function j(e){var a,t;let{dictionary:s,uniqueTag:r,useful:y,setRatingResult:j,setShowResponse:N}=e,R=(0,m.$)(),q=s.form_messages.field_required,A=p.Ik({reasons:p.YO(p.Yj()).min(1,{message:q}).default([]),gender:p.k5(["MALE","FEMALE","RATHER_NOT_SAY"],{required_error:q}),token:p.lq(p.Yj().superRefine((e,a)=>{try{if(void 0!==e){let{requiredSchema:a}=(0,E.hN)(s);a.nullable().parse(e)}}catch(e){if(e instanceof h.G){var t;null==e||null==(t=e.issues)||t.map(e=>a.addIssue(e))}}})),comment:p.Yj().max(500,{message:s.form_messages.maxAlphabet}).optional(),useful:p.k5(["true","false"],{required_error:q})}),w=(0,b.mN)({resolver:(0,g.u)(A),mode:"onSubmit"}),I=w.formState.errors,L=w.formState.isSubmitted,{onSubmit:S,isLoading:O,formReCaptchaRef:k,genderOrientation:C,error:D}=(e=>{let{formMethods:a,dictionary:t,uniqueTag:l,setShowResponse:s,setRatingResult:r}
1=e,[c,m]=(0,n.useState)(),[f,_]=(0,n.useState)(""),[v,x]=(0,n.useState)(!1),b=(0,n.useRef)(null),[p]=a.watch(["useful"]),{width:h}=(0,i.lW)(),[g,E]=(0,n.useState)("vertical");(0,n.useEffect)(()=>{h<768?E("vertical"):E("horizontal")},[h]),(0,n.useEffect)(()=>{_(window.location.href)},[]);let y=async e=>{x(!0);let n=await o((e=>{let a=(e.reasons||[]).filter(a=>"true"===e.useful?u.includes(a):d.includes(a));return{...e,url:f,reasons:a}})(e));if(x(!1),null==n?void 0:n.status){var i;if(null==n||null==(i=n.data)?void 0:i.percentage)r(null==n?void 0:n.data),s(!0),a.reset(),await fetch("".concat(window.location.origin,"/api/revalidate/").concat(l,"/"));else m(t.somethingWentWrong)}else m(null==n?void 0:n.message)};return{onSubmit:a.handleSubmit(y),isLoading:v,formReCaptchaRef:b,useful:p,genderOrientation:g,error:c}})({formMethods:w,dictionary:s,uniqueTag:r,setRatingResult:j,setShowResponse:N});return(0,n.useEffect)(()=>{w.setValue("useful",y),w.setValue("reasons",[]),w.trigger("reasons")},[y]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(b.Op,{...w,children:(0,l.jsx)("form",{onSubmit:S,id:"evaluation-form",children:y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col md:flex-row justify-between mt-8",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("p",{children:[(0,l.jsxs)("span",{className:"font-semibold text-base leading-6 text-neutral-9",children:[s.evaluation_questions.reason_label1," "]}),(0,l.jsx)("span",{className:"font-normal text-sm leading-5 text-neutral-5",children:s.evaluation_questions.reason_label2})]}),(0,l.jsx)(b.xI,{name:"reasons",control:w.control,render:e=>{let{field:a}=e,t="true"===y?[{id:"1",label:s.evaluation_questions.reason_question_yes_1,locale:R,value:"HELPFUL"},{id:"2",label:s.evaluation_questions.reason_question_yes_2,locale:R,value:"RELEVANT"},{id:"3",label:s.evaluation_questions.reason_question_yes_3,locale:R,value:"WILL_WRITTEN"},{id:"4",label:s.evaluation_questions.reason_question_yes_4,locale:R,value:"EASY_TO_READ"}]:[{id:"5",label:s.evaluation_questions.reason_question_no_1,locale:R,value:"POORLY_WRITTEN"},{id:"6",label:s.evaluation_questions.reason_question_no_2,locale:R,value:"UN_RELEVANT"},{id:"7",label:s.evaluation_questions.reason_question_no_3,locale:R,value:"FACED_TECHNICAL_ISSUE"},{id:"8",label:s.evaluation_questions.reason_question_no_4,locale:R,value:"HARD_TO_READ"}];return(0,l.jsx)("div",{className:"mt-4 evaluation-checkboxes",children:(0,l.jsx)(_.a,{id:"checkbox-group",onChange:e=>a.onChange(e),value:a.value,locale:R,items:t})})}},y),(null==I?void 0:I.reasons)&&L&&(0,l.jsx)("p",{className:"text-red-500 text-sm mt-1",role:"alert",children:null==I||null==(a=I.reasons)?void 0:a.message})]}),(0,l.jsx)("div",{className:"mt-8 md:mt-0",children:(0,l.jsx)(b.xI,{name:"comment",control:w.control,render:e=>{let{field:a}=e;return(0,l.jsx)(f.T,{...a,locale:R,id:"textarea",maxLength:500,rows:3,formLabel:s.evaluation_questions.comment,className:"w-full md:w-[375px] lg:w-[500px] xl:w-[580px] h-24 gap-1 px-4 py-3 mt-4 md:mt-0"})}})})]}),(0,l.jsxs)("div",{className:"mt-8 md:flex md:justify-start md:items-end gap-4 evaluation-gender",children:[(0,l.jsx)("label",{className:"font-semibold text-base text-neutral-9 leading-3",children:s.evaluation_questions.me}),(0,l.jsx)(b.xI,{name:"gender",control:w.control,render:e=>{let{field:a}=e;return(0,l.jsx)(v.R,{orientation:C,locale:R,value:a.value,className:"mt-2",dir:"en"===R?"ltr":"rtl",id:"radio",items:[{id:"1",label:s.evaluation_questions.male,value:"MALE"},{id:"2",label:s.evaluation_questions.female,value:"FEMALE"},{id:"3",label:s.evaluation_questions.say_no,value:"RATHER_NOT_SAY"}],onChange:e=>a.onChange(e)})}})]}),(null==I?void 0:I.gender)&&(0,l.jsx)("p",{className:"text-red-500 text-sm mt-1",role:"alert",children:null==I||null==(t=I.gender)?void 0:t.message}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"flex justify-end flex-col md:flex-row md:gap-4 md:items-center mt-4",children:[(0,l.jsx)(c.A,{dictionary:s,reCaptchaRef:k}),(0,l.jsx)(x.B,{size:"large",variant:"primary",className:"h-10 min-h-10 max-h-10 gap-1 rounded px-4 py-0",disabled:O,type:"submit",children:(0,l.jsx)("span",{className:"font-medium text-base leading-6 text-white",children:s.evaluation_questions.send})})]})})]})})}),D&&(0,l.jsx)(T,{type:"error",children:D})]})}},53341:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);

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.