PageSourceSearch

https://membership.amlcj.ma/_next/static/chunks/app/layout-d42c0f1eec48e488.js

js amlcj.ma collected 2026-10-06 13:44:40 UTC 10,395 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{74518:function(e,t,n){Promise.resolve().then(n.bind(n,31174))},31174:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return j}});var o=n(57437);n(56050),n(11615),n(98527);var s=n(9281),a=n(15499),l=n(27529),i=n(9280),r=n(41364),c=n(2265),d=n(7561);function m(e){let{isOpen:t,onClose:n,onSubmit:s,title:a="Select an option",message:l="",options:i=[],defaultValue:r=null,confirmText:m="Confirm",cancelText:u="Cancel"}=e,[h,p]=(0,c.useState)(r),[f,g]=(0,c.useState)(!1);(0,c.useEffect)(()=>{t&&p(r)},[t,r]);let w=async e=>{e.preventDefault(),g(!0);try{await s(h),n()}catch(e){}finally{g(!1)}};return(0,o.jsx)(d.Z,{isOpen:t,onClose:n,title:a,size:"md",children:(0,o.jsxs)("form",{onSubmit:w,className:"space-y-4",children:[l&&(0,o.jsx)("p",{className:"text-gray-700",children:l}),(0,o.jsx)("div",{className:"space-y-3",children:i.map(e=>(0,o.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer",children:[(0,o.jsx)("input",{type:"radio",name:"select-option",className:"form-radio h-4 w-4 text-blue-600",checked:h===e.value,onChange:()=>p(e.value)}),(0,o.jsx)("span",{className:"text-gray-800",children:e.label})]},e.value))}),(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Chat windows will stay closed and you won't get push notifications on your devices."}),(0,o.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,o.jsx)("button",{type:"button",className:"px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded-lg text-gray-800",onClick:n,disabled:f,children:u}),(0,o.jsx)("button",{type:"submit",className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg text-white disabled:opacity-50",disabled:f||void 0===h,children:m})]})]})})}m.displayName="SelectModal";var u=c.memo(m),h=n(46446);function p(e){let{children:t}=e,{alertState:n,confirmState:s,promptState:a,selectState:d,alert:m,confirm:p,prompt:f,select:g,showAlert:w,showConfirm:x,showPrompt:b,showSelect:j}=(0,h.o)();return(0,c.useEffect)(()=>(window.modalActions=window.modalActions||{},window.modalActions.alert=m,window.modalActions.confirm=p,window.modalActions.prompt=f,window.modalActions.select=g,window.modalActions.showAlert=w,window.modalActions.showConfirm=x,window.modalActions.showPrompt=b,window.modalActions.showSelect=j,()=>{window.modalActions&&(window.modalActions.alert===m&&delete window.modalActions.alert,window.modalActions.confirm===p&&delete window.modalActions.confirm,window.modalActions.prompt===f&&delete window.modalActions.prompt,window.modalActions.select===g&&delete window.modalActions.select,window.modalActions.showAlert===w&&delete window.modalActions.showAlert,window.modalActions.showConfirm===x&&delete window.modalActions.showConfirm,window.modalActions.showPrompt===b&&delete window.modalActions.showPrompt,window.modalActions.showSelect===j&&delete window.modalActions.showSelect)}),[m,p,f,g,w,x,b,j]),(0,o.jsxs)(o.Fragment,{children:[t,(0,o.jsx)(l.Z,{isOpen:n.isOpen,onClose:n.onClose,title:n.title,message:n.message,type:n.type,autoClose:n.autoClose,autoCloseDelay:n.autoCloseDelay}),(0,o.jsx)(i.Z,{isOpen:s.isOpen,onClose:s.onClose,onConfirm:s.onConfirm,title:s.title,message:s.message,confirmText:s.confirmText,cancelText:s.cancelText,type:s.type,isLoading:s.isLoading}),(0,o.jsx)(r.Z,{isOpen:a.isOpen,onClose:a.onClose,onSubmit:a.onSubmit,title:a.title,message:a.message,placeholder:a.placeholder,inputType:a.inputType,confirmText:a.confirmText,cancelText:a.cancelText,required:a.required,maxLength:a.maxLength,rows:a.rows}),d&&(0,o.jsx)(u,{isOpen:d.isOpen,onClose:d.onClose,onSubmit:d.onSubmit,title:d.title,message:d.message,options:d.options,defaultValue:d.defaultValue,confirmText:d.confirmText,cancelText:d.cancelText})]})}var f=n(90946),g=n(29827);function w(e){let{children:t}=e,[n]=(0,c.useState)(()=>new f.S({defaultOptions:{queries:{staleTime:3e4,gcTime:3e5,retry:1,refetchOnWindowFocus:!1},mutations:{retry:0}}}));return(0,o.jsx)(g.aH,{client:n,children:t})}class x extends c.Component{static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t),this.setState({error:e,errorInfo:t})}render(){return this.state.hasError?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):(0,o.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-red-50 to-orange-100 p-4",children:(0,o.jsxs)("div",{className:"max-w-md w-full bg-white rounded-xl shadow-lg p-6 sm:p-8",children:[(0,o.jsx)("div",{className:"flex items-center justify-center w-16 h-16 bg-red-100 rounded-full mx-auto mb-4",children:(0,o.jsx)("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),(0,o.jsx)("h2",{className:"text-2xl font-bold text-gray-900 text-center mb-2",children:"Something went wrong"}),(0,o.jsx)("p",{className:"text-gray-600 text-center mb-6",children:"We encountered an unexpected error. Please try refreshing the page."}),!1,(0,o.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,o.jsx)("button",{onClick:this.handleReset,className:"flex-1 px-4 py-2.5 bg-red-600 hover:bg-red-700 text-white rounded-lg font-medium transition-colors",children:"Try Again"}),(0,o.jsx)("button",{onClick:()=>window.location.href="/dashboard",className:"flex-1 px-4 py-2.5 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg font-medium transition-colors",children:"Go to Dashboard"})]})]})}):this.props.children}constructor(e){super(e),this.handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null}),this.props.onReset&&this.props.onReset()},this.state={hasError:!1,error:null,errorInfo:null}}}var b=n(69064);function j(e){let{children:t}=e,[n,l]=(0,c.useState)(null);return(0,c.useEffect)(()=>
1{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(e=>{console.log("Service Worker registration failed:",e)});let e=e=>{e.preventDefault(),l(e),console.log("PWA install prompt is ready")};return window.addEventListener("beforeinstallprompt",e),window.addEventListener("appinstalled",()=>{console.log("PWA was installed"),l(null)}),()=>{window.removeEventListener("beforeinstallprompt",e)}},[]),(0,o.jsxs)("html",{lang:"en",children:[(0,o.jsxs)("head",{children:[(0,o.jsx)("title",{children:"AMLCJ - Moroccan Association for Japanese Language & Culture"}),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=5"}),(0,o.jsx)("meta",{name:"theme-color",content:"#0346b0"}),(0,o.jsx)("meta",{name:"description",content:"AMLCJ Membership Portal - Association of Mongolians Living and Culturally Joined"}),(0,o.jsx)("meta",{name:"apple-mobile-web-app-capable",content:"yes"}),(0,o.jsx)("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),(0,o.jsx)("meta",{name:"apple-mobile-web-app-title",content:"AMLCJ"}),(0,o.jsx)("link",{rel:"icon",href:"/favicon.svg",type:"image/svg+xml"}),(0,o.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,o.jsx)("link",{rel:"apple-touch-icon",href:"/icons/icon-192x192.png"}),(0,o.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,o.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"})]}),(0,o.jsx)("body",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 font-sans antialiased",children:(0,o.jsx)(x,{children:(0,o.jsx)(s.$,{children:(0,o.jsx)(a.$R,{children:(0,o.jsx)(w,{children:(0,o.jsxs)(p,{children:[(0,o.jsx)(b.x7,{position:"top-right"}),(0,o.jsx)("main",{id:"main-content",children:t})]})})})})})})]})}},15499:function(e,t,n){"use strict";n.d(t,{$R:function(){return l},uq:function(){return i}});var o=n(57437),s=n(2265);let a=(0,s.createContext)();function l(e){let{children:t}=e,[n,l]=(0,s.useState)("en"),[i,r]=(0,s.useState)({}),[c,d]=(0,s.useState)(!0);(0,s.useEffect)(()=>{let e=localStorage.getItem("language")||"en";l(e),m(e);let t=e=>{let t=e.detail;l(t),m(t)};return window.addEventListener("languageChanged",t),()=>{window.removeEventListener("languageChanged",t)}},[]);let m=async e=>{try{d(!0),console.log("Loading translations for language: ".concat(e," from static files"));let t=new Date().getTime(),n=await fetch("/locales/".concat(e,"/common.json?v=").concat(t),{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(n.ok){let t=await n.json();console.log("Loaded ".concat(Object.keys(t||{}).length," translations for ").concat(e)),console.log("Landing translations:",t.landing),r(t||{})}else console.error("Failed to load static translations",n.status,n.statusText),r({})}catch(e){console.error("Error loading static translations:",e),r({})}finally{d(!1)}},u=(0,s.useCallback)(async e=>{e!==n&&(l(e),localStorage.setItem("language",e),await m(e))},[n]),h=(0,s.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(c)return"string"==typeof t?t:"";let o="",s={};"object"==typeof t&&null!==t?(s=t,o=""):(o=t||"",s=n);let a=i[e];if(null==a&&e.includes(".")){let t=e.split("."),n=i;for(let e of t)if(n&&"object"==typeof n&&e in n)n=n[e];else{n=void 0;break}a=n}return(null==a||""===a)&&(a=o),"object"==typeof a&&null!==a&&(console.error('Translation key "'.concat(e,'" returned an object instead of a string:'),a),a=o||""),Object.keys(s).forEach(e=>{a=a.replace(RegExp("{{".concat(e,"}}").replace(/[{}]/g,"\\$&"),"g"),s[e])}),a},[c,i]),p=(0,s.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=h(e,n);return Object.keys(t).forEach(e=>{o=o.replace(RegExp("{{".concat(e,"}}").replace(/[{}]/g,"\\$&"),"g"),t[e])}),o},[h]),f=(0,s.useMemo)(()=>({language:n,locale:n,translations:i,loading:c,changeLanguage:u,t:h,tf:p}),[n,i,c,u,h,p]);return(0,o.jsx)(a.Provider,{value:f,children:t})}function i(){let e=(0,s.useContext)(a);if(!e)throw Error("useUserTranslation must be used within a UserTranslationProvider");return e}},56050:function(){}},function(e){e.O(0,[9478,4387,5391,6458,9064,9763,4015,6973,2971,2117,1744],function(){return e(e.s=74518)}),_N_E=e.O()}]);

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.