PageSourceSearch

https://infra.gov.sa/_next/static/chunks/1563.407c6fcca551d01f.js

js infra.gov.sa collected 2026-10-04 09:58:09 UTC 8,251 bytes, 9 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1563,5892,6762],{2141:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(37876),a=n(14232),l=n(48230),o=n.n(l),i=n(64558),s=n(33379);let u={primary:"bg-primary-600 hover:bg-primary-700 active:bg-primary-900 text-white",secondarySolid:"bg-neutral-100 hover:bg-neutral-200 active:bg-neutral-300 text-primary-1000",secondaryOutline:"bg-transparent border border-neutral-300 hover:bg-neutral-100 hover:border-neutral-200 active:bg-neutral-200 text-primary-1000"},c={lg:"py-2 px-4 text-md !h-10",md:"py-1.5 px-3 text-sm",sm:"py-[3px] px-2 text-xs","iconOnly lg":"p-2 text-md","iconOnly md":"p-1.5 text-sm !max-w-8 !min-w-8 !max-h-8 !min-h-8","iconOnly sm":"p-2 text-xs"},d=a.memo(e=>{let{children:t,size:n="lg",variant:l="primary",className:d,href:f,ariaLabel:m,disabled:h,target:w,onClick:p,...g}=e,y=(0,s.Ym)(),v=(0,i.uj)(f,y),x=(0,a.useMemo)(()=>!(!v||"#"===v||v.startsWith("#"))&&(e=>{try{let t=new URL(e,window.location.origin),n=(()=>{try{let{hostname:e}=window.location;if("localhost"===e||/^\d+\.\d+\.\d+\.\d+$/.test(e))return e;let t=e.split(".");return t.length>=2?t.slice(-2).join("."):e}catch{return""}})();if(!n)return!1;return!t.hostname.endsWith(n)}catch{return!1}})(v),[v]);if(!t)return(0,r.jsx)(r.Fragment,{});let b=`${m||""} ${"string"==typeof t?t:""}`,E="#"===v&&/view products/i.test(b)?"what-infra-offers":"",k=v.startsWith("#")?v.slice(1):E,j=e=>{if(p?.(e),e.defaultPrevented||!k)return;let t=document.getElementById(k);if(!t)return;e.preventDefault();let n=t.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,n-96),behavior:"smooth"})},L=`
2        inline-flex items-center justify-center gap-2 min-w-fit w-fit h-fit rounded font-medium
3        focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2
4        transition-colors duration-150 whitespace-nowrap
5        ${u[l]}
6        ${c[n]}
7        ${d||""}
8        ${h?"pointer-events-none bg-neutral-200! text-neutral-400!":""}
9    `;return x?(0,r.jsx)("a",{href:v,target:w,rel:"_blank"===w?"noopener noreferrer":void 0,...g,onClick:j,className:L,"aria-label":m||"Link Button",children:t}):(0,r.jsx)(o(),{href:v,target:w,className:L,"aria-label":m||"Link Button",...g,onClick:j,children:t})})},26762:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(14232);let a=function(e,t){(0,r.useEffect)(()=>{let n=n=>{!e.current||e.current.contains(n.target)||t(n)};return document.addEventListener("mouseup",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mouseup",n),document.removeEventListener("touchend",n)}},[e,t])}},51563:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var r=n(37876),a=n(14232),l=n(98477),o=n(26762),i=n(54587),s=n.n(i),u=n(64497),c=n(95892),d=n(2141),f=n(74296),m=n(74142),h=n(64558),w=n(33379),p=n(77188),g=function(e){return e.EXTERNAL="external",e.INTERNAL="internal",e}({});let y=e=>{let{CloseIcon:t,DefaultErrorMessage:n,DefaultType:i,MessagePanels:y}=e?.fields||{},{isMessagePanelOpen:v,closeMessagePanel:x,selectedMessageType:b,messageContent:E,messageTitle:k,confirmButtonText:j,confirmButtonLink:L,confirmButtonLinkQueryParams:C}=(0,f.l)(),S=(0,w.Ym)(),{value:$}=(0,p.p)("userType"),N=b?.id??i?.id,P=y?.find(e=>{let t=e.fields.MessageType?.id;return!!t&&!!N&&t===N})||null,R=(0,c.default)(),A=(0,a.useRef)(null),O=document.getElementById("modal-root")||document.body;(0,o.A)(A,()=>x());let T=e=>{e.stopPropagation(),x()};(0,a.useEffect)(()=>{if(!v)return;let e=window.scrollY,t=document.body,n=document.documentElement;return t.style.position="fixed",t.style.top=`-${e}px`,t.style.width="100%",n.style.overflow="hidden",()=>{t.style.position="",t.style.top="",t.style.width="",n.style.overflow="",window.scrollTo(0,e)}},[v]);let U=v?(0,r.jsx)("div",{dir:R?"rtl":"ltr",className:"fixed inset-0 w-full h-full bg-black/50 flex items-center justify-center z-300",onClick:T,onMouseDown:e=>e.stopPropagation(),children:(0,r.jsxs)("div",{ref:A,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),className:"relative flex flex-col items-center rounded-md p-6 overflow-hidden max-w-[600px] w-full bg-white z-301 mx-4",children:[(0,r.jsx)(u.default,{size:"iconOnly lg",variant:"secondarySolid",className:"absolute top-2.5 left-2.5 me-auto bg-white",buttonContent:t?.value?.src&&(0,r.jsx)(s(),{src:t.value.src,width:20,height:20,alt:t.value.alt}),onClick:T}),P?.fields?.Icon?.value?.src&&(0,r.jsx)(s(),{src:P?.fields?.Icon?.value?.src,width:40,height:40,alt:P?.fields?.Icon?.value?.alt}),k&&(0,r.jsx)("h1",{className:"text-neutral-800 text-lg font-semibold mt-2",children:k}),(E||n?.value)&&(0,r.jsx)("p",{className:"text-neutral-700 text-sm font-normal mt-2 mb-6",children:E||n?.value}),(0,r.jsxs)("div",{className:"flex gap-4",children:[P?.fields?.CloseButtonText?.value&&(0,r.jsx)(u.default,{size:"md",variant:"secondaryOutline",onClick:T,buttonContent:P?.fields?.CloseButtonText?.value}),(()=>{if(!L?.value?.href||!j)return null;let e=L.value.href,t=e.indexOf("#"),n=e.indexOf("?"),a=e.substring(0,-1!==n?n:-1!==t?t:e.length),l=-1!==t?e.substring(t):"",o=new URLSearchParams;if(-1!==n){let r=-1!==t&&t>n?t:e.length;
9new URLSearchParams(e.substring(n+1,r)).forEach((e,t)=>{o.set(t,e)})}C&&new URLSearchParams(C).forEach((e,t)=>{o.set(t,e)}),o.has("userType")||($?o.set("userType",$):o.set("userType",g.INTERNAL));let i=o.toString();e=i?`${a}?${i}${l}`:`${a}${l}`;let s=(0,h.uj)(e,S,L);return(0,r.jsx)(d.default,{size:"md",variant:"primary",href:s,target:(0,m.k)(L)?"_blank":L?.value?.target||"_self",className:"flex-1",onClick:e=>{x(),(0,m.k)(L)||window.location.pathname+window.location.search!==s&&(e.preventDefault(),window.location.href=s)},children:j})})()]})]})}):(0,r.jsx)(r.Fragment,{});return O?(0,l.createPortal)(U,O):(0,r.jsx)(r.Fragment,{})};y.displayName="MessagePanel";let v=a.memo(y)},77188:(e,t,n)=>{n.d(t,{p:()=>a});var r=n(14232);function a(e,t){let n=(0,r.useCallback)(()=>"string"!=typeof e?null:new URLSearchParams(window.location.search).get(e),[e]),[a,l]=(0,r.useState)(n),[o,i]=(0,r.useState)(()=>{let n=new URLSearchParams(window.location.search);if(t&&Array.isArray(e)){let t={};return e.forEach(e=>{t[e]=n.get(e)||null}),t}if(t&&"object"==typeof e&&!Array.isArray(e)){let t={};return Object.keys(e).forEach(e=>{t[e]=n.get(e)||null}),t}return{}}),s=(0,r.useRef)(window.location.search),u=(0,r.useCallback)(t=>{if("string"!=typeof e||t===a)return;let n=new URLSearchParams(window.location.search);""===t||null===t?n.delete(e):n.set(e,t),l(t);let r=n.toString(),o=r?`${window.location.pathname}?${r}`:window.location.pathname;window.history.pushState(null,"",o),s.current=r?`?${r}`:"",window.dispatchEvent(new Event("queryparamchange"))},[e,a]),c=(0,r.useCallback)(e=>{let t=new URLSearchParams(window.location.search);Object.entries(e).forEach(e=>{let[n,r]=e;null==r||""===r?t.delete(n):t.set(n,String(r))});let n=t.toString(),r=n?`${window.location.pathname}?${n}`:window.location.pathname;window.history.pushState(null,"",r),s.current=n?`?${n}`:"",i(t=>({...t,...e})),window.dispatchEvent(new Event("queryparamchange"))},[]),d=(0,r.useCallback)(()=>{if("string"!=typeof e)return;let t=new URLSearchParams(window.location.search).get(e);l(e=>t!==e?t:e)},[e]),f=(0,r.useCallback)(()=>{let n=new URLSearchParams(window.location.search),r={};t&&Array.isArray(e)?e.forEach(e=>{r[e]=n.get(e)||null}):t&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(e=>{r[e]=n.get(e)||null}),i(e=>Object.keys(r).some(t=>r[t]!==e[t])?{...e,...r}:e)},[t,e]);(0,r.useEffect)(()=>{let e=()=>{let e=window.location.search;e!==s.current&&(s.current=e,t?f():d())},n=()=>{e()};window.addEventListener("popstate",n);let r=()=>{e()};return window.addEventListener("queryparamchange",r),()=>{window.removeEventListener("popstate",n),window.removeEventListener("queryparamchange",r)}},[t,d,f]);let m=(0,r.useCallback)(n=>{t&&"object"==typeof n&&null!==n&&!Array.isArray(n)?c(n):t||"string"!=typeof e?console.warn("Invalid use of useQueryParam. Check parameters and isMultiple flag."):u(n)},[t,e,u,c]);return t?{values:o,setValue:m,setValues:c}:{value:a,setValue:m}}},95892:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(33379);let a=["ar","fa","ur"],l=()=>{let e=(0,r.Ym)();return a.includes(e)}}}]);

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.