PageSourceSearch

https://aibr.org/build/assets/real-module-p6qORkc6.js

js aibr.org collected 2026-10-01 11:45:52 UTC 3,425 bytes, 1 lines download raw bytes

1import{R as p,r as f}from"./app-belrbPXN.js";import{t as x}from"./import-0kiaZdOS.js";const I=Symbol.for("react-aria.i18n.locale"),F=Symbol.for("react-aria.i18n.strings");let o;class d{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw new Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=R(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[I];if(o===void 0){let n=window[F];if(!n)return null;o={};for(let l in n)o[l]=new d({[t]:n[l]},t)}let r=o==null?void 0:o[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings={...e},this.defaultLocale=t}}function R(a,e,t="en-US"){if(e[a])return e[a];let r=C(a);if(e[r])return e[r];for(let n in e)if(n.startsWith(r+"-"))return e[n];return e[t]}function C(a){return Intl.Locale?new Intl.Locale(a).language:a.split("-")[0]}const $=new Map,b=new Map;class k{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return typeof n=="function"?n():n;let l=this.locale+":"+r,i=$.get(l);i||(i=new Intl.PluralRules(this.locale,{type:r}),$.set(l,i));let L=i.select(e);return n=t[L]||t.other,typeof n=="function"?n():n}number(e){let t=b.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),b.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return typeof r=="function"?r():r}constructor(e,t){this.locale=e,this.strings=t}}const E=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),M=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function w(a){if(Intl.Locale){let t=new Intl.Locale(a).maximize(),r=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(r)return r.direction==="rtl";if(t.script)return E.has(t.script)}let e=a.split("-")[0];return M.has(e)}const P=Symbol.for("react-aria.i18n.locale");function S(){let a=typeof window<"u"&&window[P]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([a])}catch{a="en-US"}return{locale:a,direction:w(a)?"rtl":"ltr"}}let u=S(),c=new Set;function g(){u=S();for(let a of c)a(u)}function m(){let a=x(),[e,t]=f.useState(u);return f.useEffect(()=>(c.size===0&&window.addEventListener("languagechange",g),c.add(t),()=>{c.delete(t),c.size===0&&window.removeEventListener("languagechange",g)}),[]),a?{locale:"en-US",direction:"ltr"}:e}const v=p.createContext(null);function G(a){let{locale:e,children:t}=a,r=m(),n=e?{locale:e,direction:w(e)?"rtl":"ltr"}:r;return p.createElement(v.Provider,{value:n},t)}function y(){let a=m();return f.useContext(v)||a}const h=new WeakMap;function T(a){let e=h.get(a);return e||(e=new d(a),h.set(a,e)),e}function z(a,e){return e&&d.getGlobalDictionaryForPackage(e)||T(a)}function A(a,e){let{locale:t}=y(),r=z(a,e);return f.useMemo(()=>new k(t,r),[t,r])}let s=new Map;function j(a){let{locale:e}=y(),t=e+(a?Object.entries(a).sort((n,l)=>n[0]<l[0]?-1:1).join():"");if(s.has(t))return s.get(t);let r=new Intl.Collator(e,a);return s.set(t,r),r}export{A as $,j as a,G as b,y as c};

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.