@asymmetric-effort/specifyjs 1.1.7 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/chunks/{chunk-PGUFCUSX.js → chunk-5NXJ7PRB.js} +1 -1
- package/dist/esm/chunks/{chunk-4V37N6QN.js → chunk-AQX42M4L.js} +109 -2
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/components-barrel.js +86 -2
- package/dist/esm/dom/index.js +1 -1
- package/dist/esm/index.js +18 -4
- package/dist/esm/telemetry/index.js +1 -1
- package/dist/specifyjs-client.cjs.js +1 -1
- package/dist/specifyjs-client.esm.js +1 -1
- package/dist/specifyjs-components.cjs.js +4 -4
- package/dist/specifyjs-components.esm.js +86 -2
- package/dist/specifyjs-dom.cjs.js +1 -1
- package/dist/specifyjs-dom.esm.js +1 -1
- package/dist/specifyjs-telemetry.cjs.js +1 -1
- package/dist/specifyjs-telemetry.esm.js +1 -1
- package/dist/specifyjs.cjs.js +1 -1
- package/dist/specifyjs.esm.js +18 -4
- package/dist/types/core/src/hooks/breakpoints.d.ts +15 -0
- package/dist/types/core/src/hooks/index.d.ts +6 -0
- package/dist/types/core/src/hooks/use-breakpoint.d.ts +8 -0
- package/dist/types/core/src/hooks/use-media-query.d.ts +1 -0
- package/dist/types/core/src/hooks/use-window-size.d.ts +11 -0
- package/dist/types/core/src/index.d.ts +4 -1
- package/dist/types/hooks/breakpoints.d.ts +15 -0
- package/dist/types/hooks/index.d.ts +6 -0
- package/dist/types/hooks/use-breakpoint.d.ts +8 -0
- package/dist/types/hooks/use-media-query.d.ts +1 -0
- package/dist/types/hooks/use-window-size.d.ts +11 -0
- package/dist/types/index.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
createContext
|
|
4
|
-
} from "./esm/chunks/chunk-
|
|
4
|
+
} from "./esm/chunks/chunk-5NXJ7PRB.js";
|
|
5
5
|
import "./esm/chunks/chunk-7OC7LXZ7.js";
|
|
6
6
|
import "./esm/chunks/chunk-SRUWIDIG.js";
|
|
7
7
|
import {
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
useReducer,
|
|
19
19
|
useRef,
|
|
20
20
|
useState
|
|
21
|
-
} from "./esm/chunks/chunk-
|
|
21
|
+
} from "./esm/chunks/chunk-AQX42M4L.js";
|
|
22
22
|
import {
|
|
23
23
|
__publicField
|
|
24
24
|
} from "./esm/chunks/chunk-FDNBPWUH.js";
|
|
@@ -15974,6 +15974,34 @@ var FILE_CONTENTS = {
|
|
|
15974
15974
|
};
|
|
15975
15975
|
var SAMPLE_CODE = FILE_CONTENTS["App.ts"];
|
|
15976
15976
|
function IDE(props) {
|
|
15977
|
+
const isMobile = typeof window !== "undefined" && window.innerWidth < 768;
|
|
15978
|
+
if (isMobile) {
|
|
15979
|
+
return createElement(
|
|
15980
|
+
"div",
|
|
15981
|
+
{
|
|
15982
|
+
style: {
|
|
15983
|
+
display: "flex",
|
|
15984
|
+
flexDirection: "column",
|
|
15985
|
+
alignItems: "center",
|
|
15986
|
+
justifyContent: "center",
|
|
15987
|
+
height: "100%",
|
|
15988
|
+
minHeight: "300px",
|
|
15989
|
+
padding: "32px",
|
|
15990
|
+
textAlign: "center",
|
|
15991
|
+
backgroundColor: "#1e1e1e",
|
|
15992
|
+
color: "#cccccc",
|
|
15993
|
+
fontFamily: '"Segoe UI", Roboto, Arial, sans-serif'
|
|
15994
|
+
}
|
|
15995
|
+
},
|
|
15996
|
+
createElement("div", { style: { fontSize: "48px", marginBottom: "16px" } }, "\u{1F4BB}"),
|
|
15997
|
+
createElement("h3", { style: { fontSize: "18px", fontWeight: "600", marginBottom: "8px" } }, "Desktop Experience"),
|
|
15998
|
+
createElement(
|
|
15999
|
+
"p",
|
|
16000
|
+
{ style: { fontSize: "14px", opacity: "0.8", maxWidth: "300px" } },
|
|
16001
|
+
"The IDE layout requires a desktop-sized screen. Please view on a device with a wider display."
|
|
16002
|
+
)
|
|
16003
|
+
);
|
|
16004
|
+
}
|
|
15977
16005
|
const [activeFile, setActiveFile] = useState("App.ts");
|
|
15978
16006
|
const [expandedFolders, setExpandedFolders] = useState({
|
|
15979
16007
|
src: true,
|
|
@@ -16734,6 +16762,34 @@ function buildMarketDepth() {
|
|
|
16734
16762
|
);
|
|
16735
16763
|
}
|
|
16736
16764
|
function TradingDashboard(props) {
|
|
16765
|
+
const isMobile = typeof window !== "undefined" && window.innerWidth < 768;
|
|
16766
|
+
if (isMobile) {
|
|
16767
|
+
return createElement(
|
|
16768
|
+
"div",
|
|
16769
|
+
{
|
|
16770
|
+
style: {
|
|
16771
|
+
display: "flex",
|
|
16772
|
+
flexDirection: "column",
|
|
16773
|
+
alignItems: "center",
|
|
16774
|
+
justifyContent: "center",
|
|
16775
|
+
height: "100%",
|
|
16776
|
+
minHeight: "300px",
|
|
16777
|
+
padding: "32px",
|
|
16778
|
+
textAlign: "center",
|
|
16779
|
+
backgroundColor: "#0d0d1a",
|
|
16780
|
+
color: "#ccccdd",
|
|
16781
|
+
fontFamily: '"Inter", "Segoe UI", Roboto, sans-serif'
|
|
16782
|
+
}
|
|
16783
|
+
},
|
|
16784
|
+
createElement("div", { style: { fontSize: "48px", marginBottom: "16px" } }, "\u{1F4C8}"),
|
|
16785
|
+
createElement("h3", { style: { fontSize: "18px", fontWeight: "600", marginBottom: "8px" } }, "Desktop Experience"),
|
|
16786
|
+
createElement(
|
|
16787
|
+
"p",
|
|
16788
|
+
{ style: { fontSize: "14px", opacity: "0.8", maxWidth: "300px" } },
|
|
16789
|
+
"The Trading Dashboard requires a desktop-sized screen. Please view on a device with a wider display."
|
|
16790
|
+
)
|
|
16791
|
+
);
|
|
16792
|
+
}
|
|
16737
16793
|
const [priceOffset, setPriceOffset] = useState(0);
|
|
16738
16794
|
const [clockTime, setClockTime] = useState("--:--:--");
|
|
16739
16795
|
const [liveVisible, setLiveVisible] = useState(true);
|
|
@@ -20707,6 +20763,34 @@ function getMockContent(title, windowId, onTitleChange) {
|
|
|
20707
20763
|
}
|
|
20708
20764
|
function UnityDesktopInner(props) {
|
|
20709
20765
|
const { apps, user, onAppOpen, onLogout, theme = "dark", children } = props;
|
|
20766
|
+
const isMobile = typeof window !== "undefined" && window.innerWidth < 768;
|
|
20767
|
+
if (isMobile) {
|
|
20768
|
+
return createElement(
|
|
20769
|
+
"div",
|
|
20770
|
+
{
|
|
20771
|
+
style: {
|
|
20772
|
+
display: "flex",
|
|
20773
|
+
flexDirection: "column",
|
|
20774
|
+
alignItems: "center",
|
|
20775
|
+
justifyContent: "center",
|
|
20776
|
+
height: "100%",
|
|
20777
|
+
minHeight: "300px",
|
|
20778
|
+
padding: "32px",
|
|
20779
|
+
textAlign: "center",
|
|
20780
|
+
backgroundColor: "#2c001e",
|
|
20781
|
+
color: "#ffffff",
|
|
20782
|
+
fontFamily: "Ubuntu, sans-serif"
|
|
20783
|
+
}
|
|
20784
|
+
},
|
|
20785
|
+
createElement("div", { style: { fontSize: "48px", marginBottom: "16px" } }, "\u{1F5A5}\uFE0F"),
|
|
20786
|
+
createElement("h3", { style: { fontSize: "18px", fontWeight: "600", marginBottom: "8px" } }, "Desktop Experience"),
|
|
20787
|
+
createElement(
|
|
20788
|
+
"p",
|
|
20789
|
+
{ style: { fontSize: "14px", opacity: "0.8", maxWidth: "300px" } },
|
|
20790
|
+
"The Unity Desktop layout is designed for desktop screens. Please view on a device with a wider display."
|
|
20791
|
+
)
|
|
20792
|
+
);
|
|
20793
|
+
}
|
|
20710
20794
|
const wm = useWindowManager();
|
|
20711
20795
|
const wmActiveMenuBar = wm.activeMenuBar;
|
|
20712
20796
|
const wmDockSignals = wm.dockSignals;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
|
|
2
|
-
"use strict";var J=Object.defineProperty;var On=Object.getOwnPropertyDescriptor;var zn=Object.getOwnPropertyNames;var Un=Object.prototype.hasOwnProperty;var Vn=(e,n)=>{for(var t in n)J(e,t,{get:n[t],enumerable:!0})},$n=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of zn(n))!Un.call(e,r)&&r!==t&&J(e,r,{get:()=>n[r],enumerable:!(o=On(n,r))||o.enumerable});return e};var qn=e=>$n(J({},"__esModule",{value:!0}),e);var Bt={};Vn(Bt,{createPortal:()=>Ln,createRoot:()=>Q,flushSync:()=>Hn,hydrate:()=>Dn,hydrateRoot:()=>X,render:()=>In,unmountComponentAtNode:()=>Mn});module.exports=qn(Bt);var I=Symbol.for("spec.element"),Ee=Symbol.for("spec.fragment"),D=Symbol.for("spec.portal"),ve=Symbol.for("spec.provider"),Te=Symbol.for("spec.consumer"),Pe=Symbol.for("spec.forward_ref"),Fe=Symbol.for("spec.memo"),Xt=Symbol.for("spec.lazy"),we=Symbol.for("spec.suspense"),F=Symbol.for("spec.strict_mode"),Ne=Symbol.for("spec.profiler");function k(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}function Yn(e){if(typeof e=="string")return 3;if(typeof e=="function")return e.prototype?.isSpecComponent?1:0;if(typeof e=="symbol"){if(e===Ee)return 5;if(e===we)return 11;if(e===F)return 5;if(e===Ne)return 12;if(e===D)return 13}if(typeof e=="object"&&e!==null){let n=e.$$typeof;if(n===Pe)return 8;if(n===Fe)return 9;if(n===ve)return 6;if(n===Te)return 7}return 3}function M(e,n=0){let t=Yn(e.type);return O(t,e.type,e.key,e.ref,e.props,n)}function A(e,n=0){return O(4,null,null,null,{text:e},n)}function Le(){return O(2,null,null,null,{},0)}function O(e,n,t,o,r,i){return{tag:e,type:n,key:t,ref:o,stateNode:null,pendingProps:r,memoizedProps:null,memoizedState:null,return:null,child:null,sibling:null,index:0,alternate:null,effectTag:0,updateQueue:null,dependencies:null,lanes:i,childLanes:0}}function He(e,n){let t=e.alternate;return t===null?(t=O(e.tag,e.type,e.key,e.ref,n,e.lanes),t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.effectTag=0,t.child=null,t.sibling=null),t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,t.lanes=e.lanes,t.childLanes=e.childLanes,t}function Ie(e){let n=[],t=[e];for(;t.length>0;){let o=t.pop();if(!(o==null||typeof o=="boolean")){if(Array.isArray(o)){for(let r=o.length-1;r>=0;r--)t.push(o[r]);continue}(k(o)||typeof o=="string"||typeof o=="number")&&n.push(o)}}return n}function m(e,n,t,o){let r=Ie(t);return r.length===0?(x(e,n),null):r.length===1&&!Array.isArray(r[0])?Wn(e,n,r[0],o):Kn(e,n,r,o)}function Wn(e,n,t,o){if(typeof t=="string"||typeof t=="number")return jn(e,n,t,o);let r=t.key,i=n;for(;i!==null;){if(i.key===r){if(Gn(i,t)){x(e,i.sibling);let s=U(i,t.props);return s.ref=t.ref,s.return=e,s}x(e,i);break}else z(e,i);i=i.sibling}let l=M(t,o);return l.ref=t.ref,l.return=e,l.effectTag=1,l}function jn(e,n,t,o){if(n!==null&&n.tag===4){x(e,n.sibling);let i=U(n,{text:t});return i.return=e,i}x(e,n);let r=A(t,o);return r.return=e,r.effectTag=1,r}function Kn(e,n,t,o){let r=null,i=null,l=n,s=0,u=0,a=null;for(;l!==null&&s<t.length;s++){l.index>s?(a=l,l=null):a=l.sibling;let p=t[s],c=Qn(e,l,p,o);if(c===null){l===null&&(l=a);break}l&&c.alternate===null&&z(e,l),u=Z(c,u,s),i===null?r=c:i.sibling=c,i=c,l=a}if(s===t.length)return x(e,l),r;if(l===null){for(;s<t.length;s++){let p=Xn(e,t[s],o);p!==null&&(u=Z(p,u,s),i===null?r=p:i.sibling=p,i=p)}return r}let h=Jn(l);for(;s<t.length;s++){let p=t[s],c=Zn(e,h,p,s,o);if(c!==null){if(c.alternate!==null){let An=c.key!==null?c.key:s;h.delete(An)}u=Z(c,u,s),i===null?r=c:i.sibling=c,i=c}}return h.forEach(p=>{z(e,p)}),r}function Gn(e,n){return e.type===n.type}function U(e,n){let t=Bn(e,n);return t.index=0,t.sibling=null,t}function Bn(e,n){let t=e.alternate;return t===null?(t={...e,pendingProps:n,effectTag:0,child:null,sibling:null,alternate:e},e.alternate=t):(t.pendingProps=n,t.effectTag=0,t.child=null,t.sibling=null),t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,t}function Qn(e,n,t,o){let r=n!==null?n.key:null;if(typeof t=="string"||typeof t=="number")return r!==null?null:De(e,n,t,o);if(k(t)){let i=t;return i.key===r?Me(e,n,i,o):null}return null}function De(e,n,t,o){if(n===null||n.tag!==4){let i=A(t,o);return i.return=e,i.effectTag=1,i}let r=U(n,{text:t});return r.return=e,r}function Me(e,n,t,o){if(n!==null&&n.type===t.type){let i=U(n,t.props);return i.ref=t.ref,i.return=e,i}let r=M(t,o);return r.ref=t.ref,r.return=e,r.effectTag=1,r}function Xn(e,n,t){if(typeof n=="string"||typeof n=="number"){let o=A(n,t);return o.return=e,o.effectTag=1,o}if(k(n)){let o=M(n,t);return o.ref=n.ref,o.return=e,o.effectTag=1,o}return null}function Z(e,n,t){e.index=t;let o=e.alternate;if(o!==null){let r=o.index;return r<n?(e.effectTag=1,n):r}return e.effectTag=1,n}function z(e,n){n.effectTag=4,e.updateQueue||(e.updateQueue=[]),e.updateQueue.push(n)}function x(e,n){let t=n;for(;t!==null;)z(e,t),t=t.sibling}function Jn(e){let n=new Map,t=e;for(;t!==null;){let o=t.key!==null?t.key:t.index;n.set(o,t),t=t.sibling}return n}function Zn(e,n,t,o,r){if(typeof t=="string"||typeof t=="number"){let i=n.get(o)||null;return De(e,i,t,r)}if(k(t)){let i=t,l=i.key!==null?i.key:o,s=n.get(l)||null;return Me(e,s,i,r)}return null}var R=null,w=null,y=null,ee=0,ne=null,N=null;function b(e){R=e,w=null,y=null,ee=0,ne=null,N=null}function te(){return R}function Ae(){return ee}function f(){let e;if(R===null)throw new Error("Hooks can only be called inside a function component.");let n=R.alternate;if(n!==null){if(y===null?y=n.memoizedState??null:y=y.next,y===null)throw new Error("Rendered more hooks than during the previous render.");e={memoizedState:y.memoizedState,queue:y.queue,next:null}}else e={memoizedState:null,queue:null,next:null};return w===null?(R.memoizedState=e,w=e):(w.next=e,w=e),ee++,e}function oe(e,n,t,o){let r={tag:e,create:n,destroy:t,deps:o,next:null};return N===null?(ne=r,N=r):(N.next=r,N=r),r}function V(){return ne}function $(e,n){if(e===void 0||n===void 0||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(!Object.is(e[t],n[t]))return!1;return!0}var et=null;function re(e){et=e}var nt=!1,C=[];function q(e){if(nt){C.length>=1e4&&(typeof console<"u"&&!(typeof process<"u")&&console.warn("[SpecifyJS] Scheduler: pending task queue exceeded 10000 \u2014 dropping oldest tasks"),C=C.slice(-Math.floor(1e4/2))),C.push(e);return}e()}function Oe(){let e=C;C=[];for(let n of e)n()}function ie(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function Y(e,n){return e|n}var ze=8;function Ue(){let e=ze;return ze=e===8?16:8,e}var W=4,le=!1,se=!1,Ve=[];function ue(){return se?1:W}function Ye(){se=!0}function We(){se=!1}function ae(e){let n=W,t=le;W=Ue(),le=!0;try{e()}finally{W=n,le=t,tt()}}function tt(){let e=Ve;Ve=[];for(let n of e)n()}var ce=new Set,je=typeof process<"u"&&typeof process.env<"u"&&!0;function d(e){je||ce.has(e)||ce.size>=1e3||(ce.add(e),typeof console<"u"&&console.warn(`[SpecifyJS] ${e}`))}function Ke(e){je||typeof console<"u"&&console.error(`[SpecifyJS] ${e}`)}var ot=50,rt=25,it=5,Ge=new WeakMap,de=0;function Je(){de++}function Ze(e,n){let t=Ge.get(e);if((!t||t.cycleId!==de)&&(t={count:0,cycleId:de},Ge.set(e,t)),t.count++,t.count>ot){let o=`Maximum update depth exceeded. Component "${n}" re-rendered ${t.count} times in a single cycle. This usually means a useEffect or setState call is creating an infinite loop. Check that useEffect dependencies are stable (use useMemo/useCallback for objects/arrays).`;throw Ke(o),t.count=0,new Error(`[SpecifyJS] ${o}`)}}var Be=new WeakMap,pe=0;function en(){pe++}function nn(e,n){let t=Be.get(e);(!t||t.commitId!==pe)&&(t={count:0,commitId:pe},Be.set(e,t)),t.count++,t.count>rt&&d(`Effect cycle detected in "${n}". Effects fired ${t.count} times in a single commit. This may indicate an effect that triggers a state update on every run. Ensure effect dependencies are correct and stable.`)}var Qe=new WeakMap;function tn(e,n,t,o,r){if(!t)return;let i=Qe.get(e);i||(i=new Map,Qe.set(e,i));let l=i.get(n);l||(l={consecutiveChanges:0,lastDepsKey:"",warned:!1},i.set(n,l)),o?l.consecutiveChanges++:l.consecutiveChanges=0,l.consecutiveChanges>=it&&!l.warned&&(l.warned=!0,d(`Unstable useEffect dependencies in "${r}" (hook #${n}). Dependencies changed on ${l.consecutiveChanges} consecutive renders. This may cause unnecessary effect re-runs. Wrap objects/arrays in useMemo and functions in useCallback to stabilize references.`))}var Xe=new WeakMap,fe=0;function on(){fe++}function me(e,n){let t=Xe.get(e);(!t||t.frameId!==fe)&&(t={count:0,frameId:fe},Xe.set(e,t)),t.count++,t.count===100&&d(`Rapid state updates in "${n}": setState called ${t.count} times in a single frame. This may indicate a loop or missing dependency optimization.`)}var ye=new Map,lt=0,st=!0;function rn(e){if(!st)return"";let n=ye.get(e);n||(n={name:e,index:lt++,instanceCount:0},ye.set(e,n),ut());let t=n.instanceCount++;return`s-${n.index}-${t}`}function ut(){if(typeof globalThis<"u"){let e={};for(let n of ye.values())e[n.index]=n.name;globalThis.__SPECIFYJS_COMPONENTS__=e}}function g(e){return typeof e=="string"?e:typeof e=="function"?e.name||"Anonymous":e==null?"Unknown":"Component"}var S=null;function ln(e){S=e}function be(){let e=te();if(!e)throw new Error("Invalid hook call.");return e}function sn(e,n){e.lanes=Y(e.lanes,n);let t=e.return;for(;t!==null;)t.childLanes=Y(t.childLanes,n),t=t.return}function j(e){let n=f();if(n.queue===null){let l=typeof e=="function"?e():e;n.memoizedState=l,n.queue=[]}let t=n.queue;if(t.length>0){let l=n.memoizedState;for(let s of t){let u=s.action;l=typeof u=="function"?u(l):u}n.memoizedState=l,t.length=0}let o=n.memoizedState,r=be();return[o,l=>{let s=(typeof r.type=="function"?g(r.type)||r.type.name:"")||"Anonymous";me(r,s);let u=ue();t.length>=1e4&&(typeof console<"u"&&!(typeof process<"u")&&console.warn("[SpecifyJS] Hook update queue exceeded 10000 \u2014 dropping oldest updates"),t.splice(0,t.length-5e3)),t.push({action:l}),sn(r,u),S&&q(()=>S(r))}]}function un(e,n,t){let o=f();o.queue===null&&(o.memoizedState=t?t(n):n,o.queue=[]);let r=o.queue;if(r.length>0){let u=o.memoizedState;for(let a of r)u=e(u,a.action);o.memoizedState=u,r.length=0}let i=o.memoizedState,l=be();return[i,u=>{let a=(typeof l.type=="function"?g(l.type)||l.type.name:"")||"Anonymous";me(l,a);let h=ue();r.push({action:u}),sn(l,h),S&&q(()=>S(l))}]}function E(e,n,t){let o=f(),r=Ae(),i=o.memoizedState,l=i?.effect?.destroy??null;if(i!==null&&t!==void 0){let u=$(i.deps,t),a=te();if(a){let h=(typeof a.type=="function"?g(a.type)||a.type.name:"")||"Anonymous";tn(a,r,t,!u,h)}if(u){oe(0,n,l,t);return}}let s=oe(1|e,n,l,t);o.memoizedState={deps:t,effect:s}}function an(e,n){E(4,e,n)}function cn(e,n){E(2,e,n)}function dn(e,n){E(8,e,n)}function pn(e){return f(),e._currentValue}function ge(e,n){let t=f(),o=t.memoizedState;return o!==null&&$(o[1],n)?o[0]:(t.memoizedState=[e,n],e)}function fn(e,n){let t=f(),o=t.memoizedState;if(o!==null&&$(o[1],n))return o[0];let r=e();return t.memoizedState=[r,n],r}function mn(e){let n=f();if(n.memoizedState===null){let t={current:e};n.memoizedState=t}return n.memoizedState}function yn(e,n,t){E(2,()=>{let o=n();if(e!==null)return typeof e=="function"?(e(o),()=>e(null)):(e.current=o,()=>{e.current=null})},t)}function bn(e,n){}var ct=0;function gn(){let e=f();return e.memoizedState===null&&(e.memoizedState=`:l${ct++}:`),e.memoizedState}function hn(e){let[n,t]=j(e);return E(4,()=>{ae(()=>{t(e)})},[e]),n}function Sn(){let[e,n]=j(!1),t=ge((o=>{n(!0),ae(()=>{n(!1),o()})}),[n]);return[e,t]}function kn(e,n,t){let o=f(),r=be(),i=n();return o.memoizedState=i,E(4,()=>e(()=>{let s=n();Object.is(o.memoizedState,s)||(o.memoizedState=s,S&&q(()=>S(r)))}),[e,n]),i}var dt={useState:j,useEffect:an,useContext:pn,useReducer:un,useCallback:ge,useMemo:fn,useRef:mn,useImperativeHandle:yn,useLayoutEffect:cn,useDebugValue:bn,useId:gn,useDeferredValue:hn,useTransition:Sn,useSyncExternalStore:kn,useInsertionEffect:dn};function K(){re(dt)}function G(){re(null)}var pt=null;function xn(e){pt?.onCommitFiberRoot?.(e)}function ft(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}var mt=5,yt=0;function En(){yt=ft()+mt}var _=null,he=!1;function Cn(){if(_!==null){En();let e=_,n=!1;try{let t=e();typeof t=="function"?(_=t,n=!0):_=null}catch(t){throw _=null,he=!1,t}n?Se():he=!1}else he=!1}var Se;if(typeof MessageChannel<"u"){let e=new MessageChannel;e.port1.onmessage=Cn,Se=()=>{e.port2.postMessage(null)}}else Se=()=>{setTimeout(Cn,0)};function vn(e,n){typeof process<"u"||(e==="button"&&!n.children&&!n["aria-label"]&&!n["aria-labelledby"]&&d("<button> without text content or aria-label. Add text, aria-label, or aria-labelledby for accessibility."),e==="img"&&n.alt===void 0&&d('<img> without alt attribute. Add alt="" for decorative images or descriptive text for informative images.'),(e==="input"||e==="select"||e==="textarea")&&!n["aria-label"]&&!n["aria-labelledby"]&&!n.id&&d(`<${e}> without aria-label, aria-labelledby, or id (for label[for]). Form controls need accessible names.`),(e==="div"||e==="span")&&n.onClick&&!n.role&&d(`<${e}> with onClick but no role attribute. Add role="button" and tabIndex={0} for keyboard accessibility.`),n.role==="button"&&n.tabIndex===void 0&&e!=="button"&&d('Element with role="button" but no tabIndex. Add tabIndex={0} to make it keyboard-focusable.'),n.role==="dialog"&&!n["aria-label"]&&!n["aria-labelledby"]&&d('Element with role="dialog" needs aria-label or aria-labelledby.'),e==="a"&&n.target==="_blank"&&!n.rel&&d('<a target="_blank"> without rel attribute. Add rel="noopener noreferrer" for security.'),n.role==="tablist"&&!n["aria-label"]&&!n["aria-labelledby"]&&d('Element with role="tablist" needs aria-label or aria-labelledby.'))}var P=new Map;function xe(e){let n=Le();return n.stateNode=e,{containerNode:e,current:n,pendingChildren:null,callbackScheduled:!1,pendingLanes:0,suspendedLanes:0,expirationTimes:new Array(8).fill(-1),callbackNode:null,callbackPriority:0,isHydrating:!1}}function bt(e,n){e.pendingChildren=n,e.callbackScheduled||(e.callbackScheduled=!0,ie(()=>{e.callbackScheduled=!1,Nn(e)}))}function L(e,n){e.pendingChildren=n,Nn(e)}function wn(e){let n=e;for(;n?.return;)n=n.return;if(n&&n.stateNode){let t=St(n.stateNode);t&&bt(t,t.pendingChildren)}}function gt(){ln(e=>{wn(e)})}function Nn(e){Je(),on(),gt(),e.isHydrating&&(v=e,T.clear());let n=e.current,t=He(n,{children:e.pendingChildren});ht(t),Ot(e,t),e.current=t,e.isHydrating&&(e.isHydrating=!1,v=null,T.clear())}function ht(e){let n=e;for(;n!==null;)n=kt(n)}function St(e){for(let[,n]of P)if(n.containerNode===e)return n;return null}function kt(e){if(xt(e),e.child!==null)return e.child;let n=e;for(;n!==null;){if(Mt(n),n.sibling!==null)return n.sibling;n=n.return}return null}function xt(e){if(v!==null&&e.stateNode===null&&(e.tag===3||e.tag===4)){let n=Dt(e,v.containerNode);if(n)if(e.tag===3){let t=Ht(e,n);t&&(e.stateNode=t)}else{let t=It(n);t&&(e.stateNode=t)}}switch(e.tag){case 2:Ct(e);break;case 3:Et(e);break;case 4:break;case 0:vt(e);break;case 1:Tt(e);break;case 5:e.type===F&&Ce++,Tn(e);break;case 6:Pt(e);break;case 8:Ft(e);break;case 9:wt(e);break;default:Tn(e);break}}function Ct(e){let n=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,n,0)}function Et(e){let n=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,n,0)}function vt(e){K(),b(e);let n=e.type,t=g(n)||n.name||"Anonymous";Ze(e,t),Ce>0&&e.alternate===null&&(n(e.pendingProps),b(e));let o=n(e.pendingProps),r=V();e.dependencies=r,b(null),G(),e.child=m(e,e.alternate?.child??null,o,0)}function Tt(e){let n=e.type,t;if(e.stateNode===null?(t=new n(e.pendingProps),e.stateNode=t,t._fiber=e,t._enqueueUpdate=function(r){wn(e),typeof r=="function"&&ie(r)}):(t=e.stateNode,t.props=e.pendingProps,t._fiber=e),t._pendingState.length>0||t._forceUpdate){let r=t.state;for(let l of t._pendingState)if(typeof l=="function"){let s=l(r,t.props);s!==null&&(r={...r,...s})}else r={...r,...l};t._pendingState=[];let i=t._forceUpdate||!t.shouldComponentUpdate||t.shouldComponentUpdate(t.props,r);if(t.state=r,t._forceUpdate=!1,!i){e.child=Rn(e.alternate?.child??null,e);return}}let o=t.render();e.child=m(e,e.alternate?.child??null,o,0)}function Tn(e){let n=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,n,0)}function Pt(e){let n=e.type,t=e.pendingProps.value;n._context&&(n._context._currentValue=t);let o=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,o,0)}function Ft(e){let{render:n}=e.type;K(),b(e);let t=n(e.pendingProps,e.ref),o=V();e.dependencies=o,b(null),G(),e.child=m(e,e.alternate?.child??null,t,0)}function wt(e){let{type:n,compare:t}=e.type;if(e.alternate!==null){let i=e.alternate.memoizedProps,l=e.pendingProps;if(i!==null&&(t?t(i,l):Nt(i,l))){e.child=Rn(e.alternate.child,e);return}}K(),b(e);let o=n(e.pendingProps),r=V();e.dependencies=r,b(null),G(),e.child=m(e,e.alternate?.child??null,o,0)}function Nt(e,n){let t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;for(let r of t)if(r!=="children"&&!Object.is(e[r],n[r]))return!1;return!0}function Rn(e,n){if(e===null)return null;let t=Pn(e,n),o=[],r=e.child;for(r&&o.push({source:r,cloneParent:t});o.length>0;){let{source:i,cloneParent:l}=o.pop(),s=i,u=null;for(;s!==null;){let a=Pn(s,l);u?u.sibling=a:l.child=a,s.child&&o.push({source:s.child,cloneParent:a}),u=a,s=s.sibling}}return t}function Pn(e,n){let t={...e,return:n,alternate:e,child:null,sibling:null,effectTag:0,pendingProps:e.memoizedProps??e.pendingProps};return e.alternate=t,t}var Rt=new Set(["svg","circle","clipPath","defs","ellipse","g","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan","use","image","symbol","foreignObject","desc","title","metadata","marker","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set"]);function _t(e){return Rt.has(e)}function Lt(e){return e.tagName.includes("-")}var Ce=0,v=null,T=new Map;function _n(e){let n=e.firstChild;for(;n!==null;){if(n.nodeType===1||n.nodeType===3)return n;n=n.nextSibling}return null}function B(e){let n=e.nextSibling;for(;n!==null;){if(n.nodeType===1||n.nodeType===3)return n;n=n.nextSibling}return null}function Ht(e,n){let t=T.get(n)??_n(n);if(t===null)return null;for(;t!==null&&t.nodeType!==1;)t=B(t);if(t===null)return null;let o=t;return o.tagName.toLowerCase()!==e.type.toLowerCase()?null:(T.set(n,B(o)),o)}function It(e){let n=T.get(e)??_n(e);if(n===null)return null;for(;n!==null&&n.nodeType!==3;)n=B(n);if(n===null)return null;let t=n;return T.set(e,B(t)),t}function Dt(e,n){let t=e.return;for(;t!==null;){if(t.tag===3&&t.stateNode)return t.stateNode;if(t.tag===2)return n;t=t.return}return n}function Mt(e){switch(e.tag){case 3:{if(e.stateNode===null){let n=e.type,t=_t(n)?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n);ke(t,{},e.pendingProps),vn(n,e.pendingProps);{let o=e.return;for(;o!==null;){if(o.tag===0||o.tag===1||o.tag===8||o.tag===9){if(o.child===e){let r=g(o.type),i=rn(r);i&&t.setAttribute("data-cid",i)}break}if(o.tag===3||o.tag===2)break;o=o.return}}e.stateNode=t,At(t,e)}else if(v!==null&&e.alternate===null)ke(e.stateNode,{},e.pendingProps),e.effectTag=0;else{let n=e.stateNode;e.alternate&&ke(n,e.alternate.memoizedProps||{},e.pendingProps)}e.memoizedProps=e.pendingProps;break}case 4:{let n=String(e.pendingProps.text);if(e.stateNode===null)e.stateNode=document.createTextNode(n);else if(v!==null&&e.alternate===null){let t=e.stateNode;t.nodeValue!==n&&(t.nodeValue=n),e.effectTag=0}else e.stateNode.nodeValue=n;e.memoizedProps=e.pendingProps;break}case 2:case 0:case 1:case 5:case 6:case 8:case 9:e.type===F&&Ce--,e.memoizedProps=e.pendingProps;break}}function At(e,n){let t=n.child;for(;t!==null;){if(t.tag===3||t.tag===4)t.stateNode&&e.appendChild(t.stateNode);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)return;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}function Ot(e,n){en(),zt(n),$t(n,e.containerNode),jt(n),xn(e)}function zt(e){let n=e;for(;n!==null;){if(n.updateQueue&&Array.isArray(n.updateQueue))for(let t of n.updateQueue){let o=t;o.effectTag===4&&Ut(o)}if(n.child!==null){n=n.child;continue}for(;n!==null;){if(n===e){n=null;break}if(n.sibling!==null){n=n.sibling;break}n=n.return}}}function Ut(e){let n=e.return;for(;n!==null&&!(n.tag===3||n.tag===2);)n=n.return;let t=n?.stateNode;t&&(Vt(e,t),Gt(e))}function Vt(e,n){let t=e;for(;t!==null;){if(t.tag===3||t.tag===4)t.stateNode&&n.contains(t.stateNode)&&n.removeChild(t.stateNode);else if(t.child!==null){t=t.child;continue}for(;t!==null;){if(t===e){t=null;break}if(t.sibling!==null){t=t.sibling;break}t=t.return}}}function $t(e,n){let t=e;for(;t!==null;){if(t.tag!==2&&(t.tag===3||t.tag===4)&&t.effectTag&1){let o=qt(t,n);if(o&&t.stateNode){let r=Yt(t);r?o.insertBefore(t.stateNode,r):o.appendChild(t.stateNode)}}if(t.child!==null){t=t.child;continue}for(;t!==null;){if(t===e){t=null;break}if(t.sibling!==null){t=t.sibling;break}t=t.return}}}function qt(e,n){let t=e.return;for(;t!==null;){if(t.tag===3)return t.stateNode;if(t.tag===2)return n;t=t.return}return null}function Yt(e){let n=e;e:for(;;){for(;n.sibling===null;){if(n.return===null||Wt(n.return))return null;n=n.return}for(n=n.sibling;n.tag!==3&&n.tag!==4;){if(n.effectTag&1||n.child===null)continue e;n=n.child}if(!(n.effectTag&1))return n.stateNode}}function Wt(e){return e.tag===3||e.tag===2}function jt(e){let n=e;for(;n!==null;){if(n.ref&&n.stateNode&&(typeof n.ref=="function"?n.ref(n.stateNode):typeof n.ref=="object"&&(n.ref.current=n.stateNode)),n.tag===0||n.tag===8||n.tag===9){let t=n.dependencies;if(t){let o=(typeof n.type=="function"?g(n.type)||n.type.name:"")||"Anonymous";nn(n,o),Kt(t)}}if(n.tag===1&&n.stateNode){let t=n.stateNode;if(n.alternate===null)t.componentDidMount?.();else{let o=n.alternate.memoizedProps||{},r=n.alternate.memoizedState;t.componentDidUpdate?.(o,r)}}if(n.child!==null){n=n.child;continue}for(;n!==null;){if(n===e){n=null;break}if(n.sibling!==null){n=n.sibling;break}n=n.return}}}function Kt(e){let n=e;for(;n!==null;){if(n.tag&1){n.destroy&&n.destroy();let t=n.create();n.destroy=typeof t=="function"?t:null}n=n.next}}function Gt(e){let n=e;for(;n!==null;){if(n.tag===0||n.tag===8){let t=n.dependencies;if(t){let o=t;for(;o!==null;)o.destroy&&o.destroy(),o=o.next}}if(n.tag===1&&n.stateNode&&n.stateNode.componentWillUnmount?.(),n.child!==null){n=n.child;continue}for(;n!==null;){if(n===e){n=null;break}if(n.sibling!==null){n=n.sibling;break}n=n.return}}}var Fn=/^on[A-Z]/;function ke(e,n,t){for(let o in n)if(!(o==="children"||o==="key"||o==="ref")&&!(o in t))if(Fn.test(o)){let r=o.slice(2).toLowerCase();e.removeEventListener(r,n[o])}else o==="style"?e.removeAttribute("style"):o==="className"?e.removeAttribute("class"):o==="htmlFor"?e.removeAttribute("for"):o==="dangerouslySetInnerHTML"?e.innerHTML="":e.removeAttribute(o);for(let o in t){if(o==="children"||o==="key"||o==="ref")continue;let r=t[o];if(Fn.test(o)){let i=o.slice(2).toLowerCase();n[o]!==r&&(n[o]&&e.removeEventListener(i,n[o]),r&&e.addEventListener(i,r))}else if(o==="style"){if(typeof r=="object"&&r!==null){let i=r;for(let l in i)e.style[l]=i[l]??""}}else if(o==="className")e.setAttribute("class",String(r));else if(o==="htmlFor")e.setAttribute("for",String(r));else if(o==="dangerouslySetInnerHTML"){let i=r.__html;e.innerHTML=i}else o==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT")?e.value=String(r??""):o==="checked"&&e.tagName==="INPUT"?e.checked=!!r:typeof r=="boolean"?r?e.setAttribute(o,""):e.removeAttribute(o):r!=null?Lt(e)&&typeof r!="string"&&o in e?e[o]=r:e.setAttribute(o,String(r)):e.removeAttribute(o)}}function Q(e,n){if(!e||!(e instanceof Element)&&!(e instanceof DocumentFragment))throw new Error("createRoot: container must be a DOM element or DocumentFragment");let t=xe(e);P.set(e,t);let o=!1;return{render(r){o=!0,L(t,r)},unmount(){o&&(o=!1,L(t,null),P.delete(e))}}}function X(e,n,t){if(!e)throw new Error("hydrateRoot: container must be a DOM element");let o=e,r=xe(o);r.isHydrating=!0,P.set(o,r);let i=!1,l={render(s){i=!0,L(r,s)},unmount(){i&&(i=!1,L(r,null),P.delete(o))}};return l.render(n),l}function Ln(e,n,t){return{$$typeof:I,type:D,props:{children:e,container:n},key:t??null,ref:null}}function Hn(e){Ye();try{let n=e();return Oe(),n}finally{We()}}var H=new WeakMap;function In(e,n,t){let o=H.get(n);o||(o=Q(n),H.set(n,o)),o.render(e),t&&Promise.resolve().then(t)}function Dn(e,n,t){let o=X(n,e);H.set(n,o),t&&Promise.resolve().then(t)}function Mn(e){let n=H.get(e);return n?(n.unmount(),H.delete(e),!0):!1}
|
|
2
|
+
"use strict";var J=Object.defineProperty;var On=Object.getOwnPropertyDescriptor;var zn=Object.getOwnPropertyNames;var Un=Object.prototype.hasOwnProperty;var Wn=(e,n)=>{for(var t in n)J(e,t,{get:n[t],enumerable:!0})},Vn=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of zn(n))!Un.call(e,r)&&r!==t&&J(e,r,{get:()=>n[r],enumerable:!(o=On(n,r))||o.enumerable});return e};var $n=e=>Vn(J({},"__esModule",{value:!0}),e);var Zt={};Wn(Zt,{createPortal:()=>Ln,createRoot:()=>Q,flushSync:()=>Hn,hydrate:()=>Mn,hydrateRoot:()=>X,render:()=>In,unmountComponentAtNode:()=>Dn});module.exports=$n(Zt);var I=Symbol.for("spec.element"),Ce=Symbol.for("spec.fragment"),M=Symbol.for("spec.portal"),Ee=Symbol.for("spec.provider"),Te=Symbol.for("spec.consumer"),we=Symbol.for("spec.forward_ref"),Pe=Symbol.for("spec.memo"),no=Symbol.for("spec.lazy"),Fe=Symbol.for("spec.suspense"),P=Symbol.for("spec.strict_mode"),Ne=Symbol.for("spec.profiler");function x(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}function Yn(e){if(typeof e=="string")return 3;if(typeof e=="function")return e.prototype?.isSpecComponent?1:0;if(typeof e=="symbol"){if(e===Ce)return 5;if(e===Fe)return 11;if(e===P)return 5;if(e===Ne)return 12;if(e===M)return 13}if(typeof e=="object"&&e!==null){let n=e.$$typeof;if(n===we)return 8;if(n===Pe)return 9;if(n===Ee)return 6;if(n===Te)return 7}return 3}function D(e,n=0){let t=Yn(e.type);return O(t,e.type,e.key,e.ref,e.props,n)}function A(e,n=0){return O(4,null,null,null,{text:e},n)}function Le(){return O(2,null,null,null,{},0)}function O(e,n,t,o,r,i){return{tag:e,type:n,key:t,ref:o,stateNode:null,pendingProps:r,memoizedProps:null,memoizedState:null,return:null,child:null,sibling:null,index:0,alternate:null,effectTag:0,updateQueue:null,dependencies:null,lanes:i,childLanes:0}}function He(e,n){let t=e.alternate;return t===null?(t=O(e.tag,e.type,e.key,e.ref,n,e.lanes),t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.effectTag=0,t.child=null,t.sibling=null),t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,t.lanes=e.lanes,t.childLanes=e.childLanes,t}function Ie(e){let n=[],t=[e];for(;t.length>0;){let o=t.pop();if(!(o==null||typeof o=="boolean")){if(Array.isArray(o)){for(let r=o.length-1;r>=0;r--)t.push(o[r]);continue}(x(o)||typeof o=="string"||typeof o=="number")&&n.push(o)}}return n}function m(e,n,t,o){let r=Ie(t);return r.length===0?(k(e,n),null):r.length===1&&!Array.isArray(r[0])?qn(e,n,r[0],o):Kn(e,n,r,o)}function qn(e,n,t,o){if(typeof t=="string"||typeof t=="number")return Bn(e,n,t,o);let r=t.key,i=n;for(;i!==null;){if(i.key===r){if(jn(i,t)){k(e,i.sibling);let s=U(i,t.props);return s.ref=t.ref,s.return=e,s}k(e,i);break}else z(e,i);i=i.sibling}let l=D(t,o);return l.ref=t.ref,l.return=e,l.effectTag=1,l}function Bn(e,n,t,o){if(n!==null&&n.tag===4){k(e,n.sibling);let i=U(n,{text:t});return i.return=e,i}k(e,n);let r=A(t,o);return r.return=e,r.effectTag=1,r}function Kn(e,n,t,o){let r=null,i=null,l=n,s=0,u=0,a=null;for(;l!==null&&s<t.length;s++){l.index>s?(a=l,l=null):a=l.sibling;let p=t[s],c=Qn(e,l,p,o);if(c===null){l===null&&(l=a);break}l&&c.alternate===null&&z(e,l),u=Z(c,u,s),i===null?r=c:i.sibling=c,i=c,l=a}if(s===t.length)return k(e,l),r;if(l===null){for(;s<t.length;s++){let p=Xn(e,t[s],o);p!==null&&(u=Z(p,u,s),i===null?r=p:i.sibling=p,i=p)}return r}let h=Jn(l);for(;s<t.length;s++){let p=t[s],c=Zn(e,h,p,s,o);if(c!==null){if(c.alternate!==null){let An=c.key!==null?c.key:s;h.delete(An)}u=Z(c,u,s),i===null?r=c:i.sibling=c,i=c}}return h.forEach(p=>{z(e,p)}),r}function jn(e,n){return e.type===n.type}function U(e,n){let t=Gn(e,n);return t.index=0,t.sibling=null,t}function Gn(e,n){let t=e.alternate;return t===null?(t={...e,pendingProps:n,effectTag:0,child:null,sibling:null,alternate:e},e.alternate=t):(t.pendingProps=n,t.effectTag=0,t.child=null,t.sibling=null),t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,t}function Qn(e,n,t,o){let r=n!==null?n.key:null;if(typeof t=="string"||typeof t=="number")return r!==null?null:Me(e,n,t,o);if(x(t)){let i=t;return i.key===r?De(e,n,i,o):null}return null}function Me(e,n,t,o){if(n===null||n.tag!==4){let i=A(t,o);return i.return=e,i.effectTag=1,i}let r=U(n,{text:t});return r.return=e,r}function De(e,n,t,o){if(n!==null&&n.type===t.type){let i=U(n,t.props);return i.ref=t.ref,i.return=e,i}let r=D(t,o);return r.ref=t.ref,r.return=e,r.effectTag=1,r}function Xn(e,n,t){if(typeof n=="string"||typeof n=="number"){let o=A(n,t);return o.return=e,o.effectTag=1,o}if(x(n)){let o=D(n,t);return o.ref=n.ref,o.return=e,o.effectTag=1,o}return null}function Z(e,n,t){e.index=t;let o=e.alternate;if(o!==null){let r=o.index;return r<n?(e.effectTag=1,n):r}return e.effectTag=1,n}function z(e,n){n.effectTag=4,e.updateQueue||(e.updateQueue=[]),e.updateQueue.push(n)}function k(e,n){let t=n;for(;t!==null;)z(e,t),t=t.sibling}function Jn(e){let n=new Map,t=e;for(;t!==null;){let o=t.key!==null?t.key:t.index;n.set(o,t),t=t.sibling}return n}function Zn(e,n,t,o,r){if(typeof t=="string"||typeof t=="number"){let i=n.get(o)||null;return Me(e,i,t,r)}if(x(t)){let i=t,l=i.key!==null?i.key:o,s=n.get(l)||null;return De(e,s,i,r)}return null}var R=null,F=null,y=null,ee=0,ne=null,N=null;function b(e){R=e,F=null,y=null,ee=0,ne=null,N=null}function te(){return R}function Ae(){return ee}function f(){let e;if(R===null)throw new Error("Hooks can only be called inside a function component.");let n=R.alternate;if(n!==null){if(y===null?y=n.memoizedState??null:y=y.next,y===null)throw new Error("Rendered more hooks than during the previous render.");e={memoizedState:y.memoizedState,queue:y.queue,next:null}}else e={memoizedState:null,queue:null,next:null};return F===null?(R.memoizedState=e,F=e):(F.next=e,F=e),ee++,e}function oe(e,n,t,o){let r={tag:e,create:n,destroy:t,deps:o,next:null};return N===null?(ne=r,N=r):(N.next=r,N=r),r}function W(){return ne}function V(e,n){if(e===void 0||n===void 0||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(!Object.is(e[t],n[t]))return!1;return!0}var vo=typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var nt={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Eo={...nt};var rt=null;function re(e){rt=e}var it=!1,v=[];function $(e){if(it){v.length>=1e4&&(typeof console<"u"&&!(typeof process<"u")&&console.warn("[SpecifyJS] Scheduler: pending task queue exceeded 10000 \u2014 dropping oldest tasks"),v=v.slice(-Math.floor(1e4/2))),v.push(e);return}e()}function Oe(){let e=v;v=[];for(let n of e)n()}function ie(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function Y(e,n){return e|n}var ze=8;function Ue(){let e=ze;return ze=e===8?16:8,e}var q=4,le=!1,se=!1,We=[];function ue(){return se?1:q}function Ye(){se=!0}function qe(){se=!1}function ae(e){let n=q,t=le;q=Ue(),le=!0;try{e()}finally{q=n,le=t,lt()}}function lt(){let e=We;We=[];for(let n of e)n()}var ce=new Set,Be=typeof process<"u"&&typeof process.env<"u"&&!0;function d(e){Be||ce.has(e)||ce.size>=1e3||(ce.add(e),typeof console<"u"&&console.warn(`[SpecifyJS] ${e}`))}function Ke(e){Be||typeof console<"u"&&console.error(`[SpecifyJS] ${e}`)}var st=50,ut=25,at=5,je=new WeakMap,de=0;function Je(){de++}function Ze(e,n){let t=je.get(e);if((!t||t.cycleId!==de)&&(t={count:0,cycleId:de},je.set(e,t)),t.count++,t.count>st){let o=`Maximum update depth exceeded. Component "${n}" re-rendered ${t.count} times in a single cycle. This usually means a useEffect or setState call is creating an infinite loop. Check that useEffect dependencies are stable (use useMemo/useCallback for objects/arrays).`;throw Ke(o),t.count=0,new Error(`[SpecifyJS] ${o}`)}}var Ge=new WeakMap,pe=0;function en(){pe++}function nn(e,n){let t=Ge.get(e);(!t||t.commitId!==pe)&&(t={count:0,commitId:pe},Ge.set(e,t)),t.count++,t.count>ut&&d(`Effect cycle detected in "${n}". Effects fired ${t.count} times in a single commit. This may indicate an effect that triggers a state update on every run. Ensure effect dependencies are correct and stable.`)}var Qe=new WeakMap;function tn(e,n,t,o,r){if(!t)return;let i=Qe.get(e);i||(i=new Map,Qe.set(e,i));let l=i.get(n);l||(l={consecutiveChanges:0,lastDepsKey:"",warned:!1},i.set(n,l)),o?l.consecutiveChanges++:l.consecutiveChanges=0,l.consecutiveChanges>=at&&!l.warned&&(l.warned=!0,d(`Unstable useEffect dependencies in "${r}" (hook #${n}). Dependencies changed on ${l.consecutiveChanges} consecutive renders. This may cause unnecessary effect re-runs. Wrap objects/arrays in useMemo and functions in useCallback to stabilize references.`))}var Xe=new WeakMap,fe=0;function on(){fe++}function me(e,n){let t=Xe.get(e);(!t||t.frameId!==fe)&&(t={count:0,frameId:fe},Xe.set(e,t)),t.count++,t.count===100&&d(`Rapid state updates in "${n}": setState called ${t.count} times in a single frame. This may indicate a loop or missing dependency optimization.`)}var ye=new Map,ct=0,dt=!0;function rn(e){if(!dt)return"";let n=ye.get(e);n||(n={name:e,index:ct++,instanceCount:0},ye.set(e,n),pt());let t=n.instanceCount++;return`s-${n.index}-${t}`}function pt(){if(typeof globalThis<"u"){let e={};for(let n of ye.values())e[n.index]=n.name;globalThis.__SPECIFYJS_COMPONENTS__=e}}function g(e){return typeof e=="string"?e:typeof e=="function"?e.name||"Anonymous":e==null?"Unknown":"Component"}var S=null;function ln(e){S=e}function be(){let e=te();if(!e)throw new Error("Invalid hook call.");return e}function sn(e,n){e.lanes=Y(e.lanes,n);let t=e.return;for(;t!==null;)t.childLanes=Y(t.childLanes,n),t=t.return}function B(e){let n=f();if(n.queue===null){let l=typeof e=="function"?e():e;n.memoizedState=l,n.queue=[]}let t=n.queue;if(t.length>0){let l=n.memoizedState;for(let s of t){let u=s.action;l=typeof u=="function"?u(l):u}n.memoizedState=l,t.length=0}let o=n.memoizedState,r=be();return[o,l=>{let s=(typeof r.type=="function"?g(r.type)||r.type.name:"")||"Anonymous";me(r,s);let u=ue();t.length>=1e4&&(typeof console<"u"&&!(typeof process<"u")&&console.warn("[SpecifyJS] Hook update queue exceeded 10000 \u2014 dropping oldest updates"),t.splice(0,t.length-5e3)),t.push({action:l}),sn(r,u),S&&$(()=>S(r))}]}function un(e,n,t){let o=f();o.queue===null&&(o.memoizedState=t?t(n):n,o.queue=[]);let r=o.queue;if(r.length>0){let u=o.memoizedState;for(let a of r)u=e(u,a.action);o.memoizedState=u,r.length=0}let i=o.memoizedState,l=be();return[i,u=>{let a=(typeof l.type=="function"?g(l.type)||l.type.name:"")||"Anonymous";me(l,a);let h=ue();r.push({action:u}),sn(l,h),S&&$(()=>S(l))}]}function C(e,n,t){let o=f(),r=Ae(),i=o.memoizedState,l=i?.effect?.destroy??null;if(i!==null&&t!==void 0){let u=V(i.deps,t),a=te();if(a){let h=(typeof a.type=="function"?g(a.type)||a.type.name:"")||"Anonymous";tn(a,r,t,!u,h)}if(u){oe(0,n,l,t);return}}let s=oe(1|e,n,l,t);o.memoizedState={deps:t,effect:s}}function an(e,n){C(4,e,n)}function cn(e,n){C(2,e,n)}function dn(e,n){C(8,e,n)}function pn(e){return f(),e._currentValue}function ge(e,n){let t=f(),o=t.memoizedState;return o!==null&&V(o[1],n)?o[0]:(t.memoizedState=[e,n],e)}function fn(e,n){let t=f(),o=t.memoizedState;if(o!==null&&V(o[1],n))return o[0];let r=e();return t.memoizedState=[r,n],r}function mn(e){let n=f();if(n.memoizedState===null){let t={current:e};n.memoizedState=t}return n.memoizedState}function yn(e,n,t){C(2,()=>{let o=n();if(e!==null)return typeof e=="function"?(e(o),()=>e(null)):(e.current=o,()=>{e.current=null})},t)}function bn(e,n){}var mt=0;function gn(){let e=f();return e.memoizedState===null&&(e.memoizedState=`:l${mt++}:`),e.memoizedState}function hn(e){let[n,t]=B(e);return C(4,()=>{ae(()=>{t(e)})},[e]),n}function Sn(){let[e,n]=B(!1),t=ge((o=>{n(!0),ae(()=>{n(!1),o()})}),[n]);return[e,t]}function xn(e,n,t){let o=f(),r=be(),i=n();return o.memoizedState=i,C(4,()=>e(()=>{let s=n();Object.is(o.memoizedState,s)||(o.memoizedState=s,S&&$(()=>S(r)))}),[e,n]),i}var yt={useState:B,useEffect:an,useContext:pn,useReducer:un,useCallback:ge,useMemo:fn,useRef:mn,useImperativeHandle:yn,useLayoutEffect:cn,useDebugValue:bn,useId:gn,useDeferredValue:hn,useTransition:Sn,useSyncExternalStore:xn,useInsertionEffect:dn};function K(){re(yt)}function j(){re(null)}var bt=null;function kn(e){bt?.onCommitFiberRoot?.(e)}function gt(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}var ht=5,St=0;function Cn(){St=gt()+ht}var _=null,he=!1;function vn(){if(_!==null){Cn();let e=_,n=!1;try{let t=e();typeof t=="function"?(_=t,n=!0):_=null}catch(t){throw _=null,he=!1,t}n?Se():he=!1}else he=!1}var Se;if(typeof MessageChannel<"u"){let e=new MessageChannel;e.port1.onmessage=vn,Se=()=>{e.port2.postMessage(null)}}else Se=()=>{setTimeout(vn,0)};function En(e,n){typeof process<"u"||(e==="button"&&!n.children&&!n["aria-label"]&&!n["aria-labelledby"]&&d("<button> without text content or aria-label. Add text, aria-label, or aria-labelledby for accessibility."),e==="img"&&n.alt===void 0&&d('<img> without alt attribute. Add alt="" for decorative images or descriptive text for informative images.'),(e==="input"||e==="select"||e==="textarea")&&!n["aria-label"]&&!n["aria-labelledby"]&&!n.id&&d(`<${e}> without aria-label, aria-labelledby, or id (for label[for]). Form controls need accessible names.`),(e==="div"||e==="span")&&n.onClick&&!n.role&&d(`<${e}> with onClick but no role attribute. Add role="button" and tabIndex={0} for keyboard accessibility.`),n.role==="button"&&n.tabIndex===void 0&&e!=="button"&&d('Element with role="button" but no tabIndex. Add tabIndex={0} to make it keyboard-focusable.'),n.role==="dialog"&&!n["aria-label"]&&!n["aria-labelledby"]&&d('Element with role="dialog" needs aria-label or aria-labelledby.'),e==="a"&&n.target==="_blank"&&!n.rel&&d('<a target="_blank"> without rel attribute. Add rel="noopener noreferrer" for security.'),n.role==="tablist"&&!n["aria-label"]&&!n["aria-labelledby"]&&d('Element with role="tablist" needs aria-label or aria-labelledby.'))}var w=new Map;function ke(e){let n=Le();return n.stateNode=e,{containerNode:e,current:n,pendingChildren:null,callbackScheduled:!1,pendingLanes:0,suspendedLanes:0,expirationTimes:new Array(8).fill(-1),callbackNode:null,callbackPriority:0,isHydrating:!1}}function xt(e,n){e.pendingChildren=n,e.callbackScheduled||(e.callbackScheduled=!0,ie(()=>{e.callbackScheduled=!1,Nn(e)}))}function L(e,n){e.pendingChildren=n,Nn(e)}function Fn(e){let n=e;for(;n?.return;)n=n.return;if(n&&n.stateNode){let t=Ct(n.stateNode);t&&xt(t,t.pendingChildren)}}function kt(){ln(e=>{Fn(e)})}function Nn(e){Je(),on(),kt(),e.isHydrating&&(E=e,T.clear());let n=e.current,t=He(n,{children:e.pendingChildren});vt(t),Vt(e,t),e.current=t,e.isHydrating&&(e.isHydrating=!1,E=null,T.clear())}function vt(e){let n=e;for(;n!==null;)n=Et(n)}function Ct(e){for(let[,n]of w)if(n.containerNode===e)return n;return null}function Et(e){if(Tt(e),e.child!==null)return e.child;let n=e;for(;n!==null;){if(Ut(n),n.sibling!==null)return n.sibling;n=n.return}return null}function Tt(e){if(E!==null&&e.stateNode===null&&(e.tag===3||e.tag===4)){let n=zt(e,E.containerNode);if(n)if(e.tag===3){let t=At(e,n);t&&(e.stateNode=t)}else{let t=Ot(n);t&&(e.stateNode=t)}}switch(e.tag){case 2:wt(e);break;case 3:Pt(e);break;case 4:break;case 0:Ft(e);break;case 1:Nt(e);break;case 5:e.type===P&&ve++,Tn(e);break;case 6:Rt(e);break;case 8:_t(e);break;case 9:Lt(e);break;default:Tn(e);break}}function wt(e){let n=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,n,0)}function Pt(e){let n=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,n,0)}function Ft(e){K(),b(e);let n=e.type,t=g(n)||n.name||"Anonymous";Ze(e,t),ve>0&&e.alternate===null&&(n(e.pendingProps),b(e));let o=n(e.pendingProps),r=W();e.dependencies=r,b(null),j(),e.child=m(e,e.alternate?.child??null,o,0)}function Nt(e){let n=e.type,t;if(e.stateNode===null?(t=new n(e.pendingProps),e.stateNode=t,t._fiber=e,t._enqueueUpdate=function(r){Fn(e),typeof r=="function"&&ie(r)}):(t=e.stateNode,t.props=e.pendingProps,t._fiber=e),t._pendingState.length>0||t._forceUpdate){let r=t.state;for(let l of t._pendingState)if(typeof l=="function"){let s=l(r,t.props);s!==null&&(r={...r,...s})}else r={...r,...l};t._pendingState=[];let i=t._forceUpdate||!t.shouldComponentUpdate||t.shouldComponentUpdate(t.props,r);if(t.state=r,t._forceUpdate=!1,!i){e.child=Rn(e.alternate?.child??null,e);return}}let o=t.render();e.child=m(e,e.alternate?.child??null,o,0)}function Tn(e){let n=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,n,0)}function Rt(e){let n=e.type,t=e.pendingProps.value;n._context&&(n._context._currentValue=t);let o=e.pendingProps.children;e.child=m(e,e.alternate?.child??null,o,0)}function _t(e){let{render:n}=e.type;K(),b(e);let t=n(e.pendingProps,e.ref),o=W();e.dependencies=o,b(null),j(),e.child=m(e,e.alternate?.child??null,t,0)}function Lt(e){let{type:n,compare:t}=e.type;if(e.alternate!==null){let i=e.alternate.memoizedProps,l=e.pendingProps;if(i!==null&&(t?t(i,l):Ht(i,l))){e.child=Rn(e.alternate.child,e);return}}K(),b(e);let o=n(e.pendingProps),r=W();e.dependencies=r,b(null),j(),e.child=m(e,e.alternate?.child??null,o,0)}function Ht(e,n){let t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;for(let r of t)if(r!=="children"&&!Object.is(e[r],n[r]))return!1;return!0}function Rn(e,n){if(e===null)return null;let t=wn(e,n),o=[],r=e.child;for(r&&o.push({source:r,cloneParent:t});o.length>0;){let{source:i,cloneParent:l}=o.pop(),s=i,u=null;for(;s!==null;){let a=wn(s,l);u?u.sibling=a:l.child=a,s.child&&o.push({source:s.child,cloneParent:a}),u=a,s=s.sibling}}return t}function wn(e,n){let t={...e,return:n,alternate:e,child:null,sibling:null,effectTag:0,pendingProps:e.memoizedProps??e.pendingProps};return e.alternate=t,t}var It=new Set(["svg","circle","clipPath","defs","ellipse","g","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan","use","image","symbol","foreignObject","desc","title","metadata","marker","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set"]);function Mt(e){return It.has(e)}function Dt(e){return e.tagName.includes("-")}var ve=0,E=null,T=new Map;function _n(e){let n=e.firstChild;for(;n!==null;){if(n.nodeType===1||n.nodeType===3)return n;n=n.nextSibling}return null}function G(e){let n=e.nextSibling;for(;n!==null;){if(n.nodeType===1||n.nodeType===3)return n;n=n.nextSibling}return null}function At(e,n){let t=T.get(n)??_n(n);if(t===null)return null;for(;t!==null&&t.nodeType!==1;)t=G(t);if(t===null)return null;let o=t;return o.tagName.toLowerCase()!==e.type.toLowerCase()?null:(T.set(n,G(o)),o)}function Ot(e){let n=T.get(e)??_n(e);if(n===null)return null;for(;n!==null&&n.nodeType!==3;)n=G(n);if(n===null)return null;let t=n;return T.set(e,G(t)),t}function zt(e,n){let t=e.return;for(;t!==null;){if(t.tag===3&&t.stateNode)return t.stateNode;if(t.tag===2)return n;t=t.return}return n}function Ut(e){switch(e.tag){case 3:{if(e.stateNode===null){let n=e.type,t=Mt(n)?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n);xe(t,{},e.pendingProps),En(n,e.pendingProps);{let o=e.return;for(;o!==null;){if(o.tag===0||o.tag===1||o.tag===8||o.tag===9){if(o.child===e){let r=g(o.type),i=rn(r);i&&t.setAttribute("data-cid",i)}break}if(o.tag===3||o.tag===2)break;o=o.return}}e.stateNode=t,Wt(t,e)}else if(E!==null&&e.alternate===null)xe(e.stateNode,{},e.pendingProps),e.effectTag=0;else{let n=e.stateNode;e.alternate&&xe(n,e.alternate.memoizedProps||{},e.pendingProps)}e.memoizedProps=e.pendingProps;break}case 4:{let n=String(e.pendingProps.text);if(e.stateNode===null)e.stateNode=document.createTextNode(n);else if(E!==null&&e.alternate===null){let t=e.stateNode;t.nodeValue!==n&&(t.nodeValue=n),e.effectTag=0}else e.stateNode.nodeValue=n;e.memoizedProps=e.pendingProps;break}case 2:case 0:case 1:case 5:case 6:case 8:case 9:e.type===P&&ve--,e.memoizedProps=e.pendingProps;break}}function Wt(e,n){let t=n.child;for(;t!==null;){if(t.tag===3||t.tag===4)t.stateNode&&e.appendChild(t.stateNode);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)return;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}function Vt(e,n){en(),$t(n),Bt(n,e.containerNode),Qt(n),kn(e)}function $t(e){let n=e;for(;n!==null;){if(n.updateQueue&&Array.isArray(n.updateQueue))for(let t of n.updateQueue){let o=t;o.effectTag===4&&Yt(o)}if(n.child!==null){n=n.child;continue}for(;n!==null;){if(n===e){n=null;break}if(n.sibling!==null){n=n.sibling;break}n=n.return}}}function Yt(e){let n=e.return;for(;n!==null&&!(n.tag===3||n.tag===2);)n=n.return;let t=n?.stateNode;t&&(qt(e,t),Jt(e))}function qt(e,n){let t=e;for(;t!==null;){if(t.tag===3||t.tag===4)t.stateNode&&n.contains(t.stateNode)&&n.removeChild(t.stateNode);else if(t.child!==null){t=t.child;continue}for(;t!==null;){if(t===e){t=null;break}if(t.sibling!==null){t=t.sibling;break}t=t.return}}}function Bt(e,n){let t=e;for(;t!==null;){if(t.tag!==2&&(t.tag===3||t.tag===4)&&t.effectTag&1){let o=Kt(t,n);if(o&&t.stateNode){let r=jt(t);r?o.insertBefore(t.stateNode,r):o.appendChild(t.stateNode)}}if(t.child!==null){t=t.child;continue}for(;t!==null;){if(t===e){t=null;break}if(t.sibling!==null){t=t.sibling;break}t=t.return}}}function Kt(e,n){let t=e.return;for(;t!==null;){if(t.tag===3)return t.stateNode;if(t.tag===2)return n;t=t.return}return null}function jt(e){let n=e;e:for(;;){for(;n.sibling===null;){if(n.return===null||Gt(n.return))return null;n=n.return}for(n=n.sibling;n.tag!==3&&n.tag!==4;){if(n.effectTag&1||n.child===null)continue e;n=n.child}if(!(n.effectTag&1))return n.stateNode}}function Gt(e){return e.tag===3||e.tag===2}function Qt(e){let n=e;for(;n!==null;){if(n.ref&&n.stateNode&&(typeof n.ref=="function"?n.ref(n.stateNode):typeof n.ref=="object"&&(n.ref.current=n.stateNode)),n.tag===0||n.tag===8||n.tag===9){let t=n.dependencies;if(t){let o=(typeof n.type=="function"?g(n.type)||n.type.name:"")||"Anonymous";nn(n,o),Xt(t)}}if(n.tag===1&&n.stateNode){let t=n.stateNode;if(n.alternate===null)t.componentDidMount?.();else{let o=n.alternate.memoizedProps||{},r=n.alternate.memoizedState;t.componentDidUpdate?.(o,r)}}if(n.child!==null){n=n.child;continue}for(;n!==null;){if(n===e){n=null;break}if(n.sibling!==null){n=n.sibling;break}n=n.return}}}function Xt(e){let n=e;for(;n!==null;){if(n.tag&1){n.destroy&&n.destroy();let t=n.create();n.destroy=typeof t=="function"?t:null}n=n.next}}function Jt(e){let n=e;for(;n!==null;){if(n.tag===0||n.tag===8){let t=n.dependencies;if(t){let o=t;for(;o!==null;)o.destroy&&o.destroy(),o=o.next}}if(n.tag===1&&n.stateNode&&n.stateNode.componentWillUnmount?.(),n.child!==null){n=n.child;continue}for(;n!==null;){if(n===e){n=null;break}if(n.sibling!==null){n=n.sibling;break}n=n.return}}}var Pn=/^on[A-Z]/;function xe(e,n,t){for(let o in n)if(!(o==="children"||o==="key"||o==="ref")&&!(o in t))if(Pn.test(o)){let r=o.slice(2).toLowerCase();e.removeEventListener(r,n[o])}else o==="style"?e.removeAttribute("style"):o==="className"?e.removeAttribute("class"):o==="htmlFor"?e.removeAttribute("for"):o==="dangerouslySetInnerHTML"?e.innerHTML="":e.removeAttribute(o);for(let o in t){if(o==="children"||o==="key"||o==="ref")continue;let r=t[o];if(Pn.test(o)){let i=o.slice(2).toLowerCase();n[o]!==r&&(n[o]&&e.removeEventListener(i,n[o]),r&&e.addEventListener(i,r))}else if(o==="style"){if(typeof r=="object"&&r!==null){let i=r;for(let l in i)e.style[l]=i[l]??""}}else if(o==="className")e.setAttribute("class",String(r));else if(o==="htmlFor")e.setAttribute("for",String(r));else if(o==="dangerouslySetInnerHTML"){let i=r.__html;e.innerHTML=i}else o==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT")?e.value=String(r??""):o==="checked"&&e.tagName==="INPUT"?e.checked=!!r:typeof r=="boolean"?r?e.setAttribute(o,""):e.removeAttribute(o):r!=null?Dt(e)&&typeof r!="string"&&o in e?e[o]=r:e.setAttribute(o,String(r)):e.removeAttribute(o)}}function Q(e,n){if(!e||!(e instanceof Element)&&!(e instanceof DocumentFragment))throw new Error("createRoot: container must be a DOM element or DocumentFragment");let t=ke(e);w.set(e,t);let o=!1;return{render(r){o=!0,L(t,r)},unmount(){o&&(o=!1,L(t,null),w.delete(e))}}}function X(e,n,t){if(!e)throw new Error("hydrateRoot: container must be a DOM element");let o=e,r=ke(o);r.isHydrating=!0,w.set(o,r);let i=!1,l={render(s){i=!0,L(r,s)},unmount(){i&&(i=!1,L(r,null),w.delete(o))}};return l.render(n),l}function Ln(e,n,t){return{$$typeof:I,type:M,props:{children:e,container:n},key:t??null,ref:null}}function Hn(e){Ye();try{let n=e();return Oe(),n}finally{qe()}}var H=new WeakMap;function In(e,n,t){let o=H.get(n);o||(o=Q(n),H.set(n,o)),o.render(e),t&&Promise.resolve().then(t)}function Mn(e,n,t){let o=X(n,e);H.set(n,o),t&&Promise.resolve().then(t)}function Dn(e){let n=H.get(e);return n?(n.unmount(),H.delete(e),!0):!1}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var S=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var P=(e,t)=>()=>(e&&(t=e(e=0)),t);var C=(e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})},F=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of z(t))!q.call(e,o)&&o!==n&&S(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var j=e=>F(S({},"__esModule",{value:!0}),e);function Z(e){let t=X.exec(e);return t?Number(t[1])<=255&&Number(t[2])<=255&&Number(t[3])<=255:!1}function A(e){if(e.startsWith("//"))throw new Error(`[SpecifyJS] Protocol-relative URL rejected: "${e}". Use an explicit https:// prefix.`);if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))return;if(e.startsWith("data:")){if(e.length>1024*1024)throw new Error("[SpecifyJS] secureFetch: data: URI exceeds 1MB limit");return}let t;try{t=new URL(e,typeof window<"u"?window.location.href:void 0)}catch{throw new Error(`[SpecifyJS] secureFetch: unable to validate URL "${e}". Provide a valid absolute HTTPS URL or a relative path.`)}if(t.protocol==="https:")return;let n=t.hostname.toLowerCase();if(!(n==="localhost"||n==="127.0.0.1"||n==="[::1]"||n==="0.0.0.0"||Z(n)))throw n.endsWith(".localhost")?new Error(`[SpecifyJS] SSRF protection: "${e}" uses a .localhost subdomain which resolves to the loopback interface. Use exact "localhost" instead.`):new Error(`[SpecifyJS] Insecure URL rejected: "${e}". SpecifyJS enforces HTTPS-only for all network requests. Use https:// or a relative URL. Localhost URLs are allowed for development.`)}var X,D=P(()=>{"use strict";X=/^127\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/});var L={};C(L,{createMeterProvider:()=>b,exportToEndpoint:()=>h,formatOtlpMetrics:()=>y,formatOtlpTraces:()=>w});function T(e,t,n){e.length>=H&&e.splice(0,Math.floor(H/2)),e.push({value:t,attributes:n?{...n}:{},timestamp:performance.now()})}function Y(e,t){let n=[];return{name:e,description:t?.description??"",add(r,o){r<0||T(n,r,o)},get dataPoints(){return n}}}function ee(e,t){let n=[];return{name:e,description:t?.description??"",record(r,o){T(n,r,o)},get dataPoints(){return n}}}function te(e,t){let n=[];return{name:e,description:t?.description??"",set(r,o){T(n,r,o)},get dataPoints(){return n}}}function b(e){let t=[],n;e.exportInterval&&e.exportInterval>0&&(n=setInterval(()=>{r.flush()},e.exportInterval),typeof n=="object"&&"unref"in n&&n.unref());let r={config:e,get instruments(){return t},counter(o,s){let a=Y(o,s);return t.push(a),a},histogram(o,s){let a=ee(o,s);return t.push(a),a},gauge(o,s){let a=te(o,s);return t.push(a),a},async flush(){if(!e.endpoint)return;let o=y(t,e.serviceName);await h(e.endpoint,e.headers??{},o)}};return r}function l(e){return Object.entries(e).map(([t,n])=>typeof n=="string"?{key:t,value:{stringValue:n}}:typeof n=="boolean"?{key:t,value:{boolValue:n}}:{key:t,value:{intValue:n}})}function g(e){return String(Math.round(e*1e6))}function y(e,t){let n=e.map(r=>{let o=r.dataPoints.map(a=>({attributes:l(a.attributes),timeUnixNano:g(a.timestamp),asDouble:a.value})),s;return"add"in r?s={sum:{dataPoints:o,isMonotonic:!0,aggregationTemporality:2}}:"record"in r?s={histogram:{dataPoints:o,aggregationTemporality:2}}:s={gauge:{dataPoints:o}},{name:r.name,description:r.description,...s}});return{resourceMetrics:[{resource:{attributes:l({"service.name":t??"unknown"})},scopeMetrics:[{scope:{name:"specifyjs-telemetry",version:"1.0.0"},metrics:n}]}]}}function w(e,t,n){let r={"service.name":t??"unknown"};n&&(r["service.version"]=n);let o={internal:1,server:2,client:3,producer:4,consumer:5},s={unset:0,ok:1,error:2},a=e.map(i=>({traceId:i.traceId,spanId:i.spanId,parentSpanId:i.parentSpanId??"",name:i.name,kind:o[i.kind]??1,startTimeUnixNano:g(i.startTime),endTimeUnixNano:i.endTime!==void 0?g(i.endTime):"0",attributes:l(i.attributes),status:{code:s[i.status.code]??0,message:i.status.message??""},events:i.events.map(u=>({name:u.name,timeUnixNano:g(u.timestamp),attributes:u.attributes?l(u.attributes):[]}))}));return{resourceSpans:[{resource:{attributes:l(r)},scopeSpans:[{scope:{name:"specifyjs-telemetry",version:"1.0.0"},spans:a}]}]}}async function h(e,t,n){try{A(e),await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...t},body:JSON.stringify(n)})}catch{}}var H,I=P(()=>{"use strict";D();H=1e4});var re={};C(re,{createMeterProvider:()=>b,createTracer:()=>V,endSpan:()=>d,exportToEndpoint:()=>h,formatOtlpMetrics:()=>y,formatOtlpTraces:()=>w,formatTraceparent:()=>N,generateSpanId:()=>k,generateTraceId:()=>R,parseTraceparent:()=>_,startSpan:()=>E,useTracing:()=>W});module.exports=j(re);var de=typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var J={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},le={...J};var M=null;function O(){if(M===null)throw new Error("Invalid hook call. Hooks can only be called inside the body of a function component.");return M}function v(e,t){return O().useEffect(e,t)}function x(e){return O().useRef(e)}function U(e){let t=new Uint8Array(e);try{crypto.getRandomValues(t)}catch{for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*256)}return t}function B(e){let t="";for(let n=0;n<e.length;n++)t+=(e[n]??0).toString(16).padStart(2,"0");return t}function R(){return B(U(16))}function k(){return B(U(8))}var ne=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/;function _(e){let t=ne.exec(e.trim());if(!t)return null;let n=t[2],r=t[3],o=t[4];return/^0+$/.test(n)||/^0+$/.test(r)?null:{traceId:n,spanId:r,traceFlags:o}}function N(e){return`00-${e.traceId}-${e.spanId}-${e.traceFlags}`}function E(e,t){return{traceId:t?.traceId??R(),spanId:k(),parentSpanId:t?.parentSpanId,name:e,kind:t?.kind??"internal",startTime:performance.now(),status:{code:"unset"},attributes:t?.attributes?{...t.attributes}:{},events:[]}}function d(e){e.endTime=performance.now()}function V(e){let t=e.batchSize??1e3,n=[],r=[];function o(i){r.length>=t&&r.splice(0,Math.floor(t/2)),r.push(i)}let s;e.flushInterval&&e.flushInterval>0&&(s=setInterval(()=>{a.flush()},e.flushInterval),typeof s=="object"&&"unref"in s&&s.unref());let a={config:e,get pendingSpans(){return r},activeSpan(){return n.length>0?n[n.length-1]:void 0},startSpan(i,u){let f=a.activeSpan(),p=E(i,{kind:u?.kind,attributes:u?.attributes,traceId:u?.traceId??f?.traceId,parentSpanId:u?.parentSpanId??f?.spanId});return n.push(p),p},withSpan(i,u){n.includes(i)||n.push(i);let p=()=>{for(let c=n.length-1;c>=0;c--)n[c]===i&&n.splice(c,1)};try{let c=u();return c&&typeof c.then=="function"?c.then(m=>(d(i),o(i),p(),m),m=>{throw i.status={code:"error",message:String(m)},d(i),o(i),p(),m}):(d(i),o(i),p(),c)}catch(c){throw i.status={code:"error",message:String(c)},d(i),o(i),p(),c}},async flush(){if(r.length===0)return;let i=r.splice(0,r.length);if(e.endpoint){let{formatOtlpTraces:u,exportToEndpoint:f}=await Promise.resolve().then(()=>(I(),L)),p=u(i,e.serviceName,e.serviceVersion);await f(e.endpoint,e.headers??{},p)}}};return a}function W(e,t){let n=x(null);v(()=>{let r=e.startSpan(t,{kind:"internal"});return r.events.push({name:"mount",timestamp:performance.now()}),n.current=r,()=>{n.current&&(n.current.events.push({name:"unmount",timestamp:performance.now()}),d(n.current))}},[])}I();
|
package/dist/specifyjs.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
|
|
2
|
-
"use strict";var U=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Xe=(e,t)=>{for(var n in t)U(e,n,{get:t[n],enumerable:!0})},Ze=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ge(t))!Je.call(e,r)&&r!==n&&U(e,r,{get:()=>t[r],enumerable:!(o=We(t,r))||o.enumerable});return e};var Qe=e=>Ze(U({},"__esModule",{value:!0}),e);var lt={};Xe(lt,{Children:()=>he,Component:()=>P,ErrorBoundary:()=>L,FeatureFlagProvider:()=>X,FeatureGate:()=>Z,Fragment:()=>ce,Link:()=>j,Profiler:()=>Le,PureComponent:()=>k,Route:()=>Y,Router:()=>A,StrictMode:()=>Ne,Suspense:()=>_e,act:()=>He,assertSecureUrl:()=>G,cloneElement:()=>ye,createContext:()=>b,createElement:()=>d,createFactory:()=>ue,createRef:()=>le,forwardRef:()=>fe,getComponentTypeTable:()=>ze,h:()=>d,isValidElement:()=>w,lazy:()=>me,matchPath:()=>E,memo:()=>de,resolveComponentId:()=>Ke,secureFetch:()=>M,setComponentIdsEnabled:()=>Be,startTransition:()=>Ye,useCallback:()=>x,useContext:()=>l,useDebugValue:()=>ve,useDeferredValue:()=>we,useEffect:()=>S,useFeatureFlags:()=>Q,useHead:()=>$,useId:()=>be,useImperativeHandle:()=>ge,useInsertionEffect:()=>Te,useLayoutEffect:()=>Ee,useMemo:()=>R,useNavigate:()=>B,useParams:()=>q,useReducer:()=>Ce,useRef:()=>F,useRouter:()=>H,useState:()=>g,useSyncExternalStore:()=>ke,useTransition:()=>Re});module.exports=Qe(lt);var v=Symbol.for("spec.element"),ee=Symbol.for("spec.fragment"),dt=Symbol.for("spec.portal"),te=Symbol.for("spec.provider"),ne=Symbol.for("spec.consumer"),oe=Symbol.for("spec.forward_ref"),re=Symbol.for("spec.memo"),se=Symbol.for("spec.lazy"),ae=Symbol.for("spec.suspense"),ie=Symbol.for("spec.strict_mode"),pe=Symbol.for("spec.profiler");function d(e,t,...n){let o=null,r=null,a={};if(t!=null){t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(r=t.ref);for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&s!=="key"&&s!=="ref"&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(a[s]=t[s])}if(n.length===1?a.children=n[0]:n.length>1&&(a.children=n),typeof e=="function"&&e.defaultProps){let s=e.defaultProps;for(let i of Object.keys(s))i!=="__proto__"&&i!=="constructor"&&a[i]===void 0&&(a[i]=s[i])}return{$$typeof:v,type:e,props:a,key:o,ref:r}}function ue(e){return(t,...n)=>d(e,t??null,...n)}var ce=ee;function b(e){let t={$$typeof:Symbol.for("spec.context"),Provider:null,Consumer:null,_currentValue:e,_defaultValue:e},n={$$typeof:te,_context:t},o={$$typeof:ne,_context:t};return t.Provider=n,t.Consumer=o,t}function le(){return{current:null}}function fe(e){return{$$typeof:oe,render:e,displayName:e.displayName||e.name||"ForwardRef"}}function de(e,t){return{$$typeof:re,type:e,compare:t||null,displayName:e.displayName||e.name||"Memo"}}function me(e){let t={_status:"pending",_result:void 0};return{$$typeof:se,_payload:t,_init:()=>{if(t._status==="resolved")return t._result;if(t._status==="rejected")throw t._result;let o=e();throw t._status="pending",o.then(r=>{t._status="resolved",t._result=r.default},r=>{t._status="rejected",t._result=r}),o},displayName:"Lazy"}}function w(e){return typeof e=="object"&&e!==null&&e.$$typeof===v}function ye(e,t,...n){if(!w(e))throw new Error("cloneElement: argument must be a valid SpecifyJS element");let o=e.key,r=e.ref,a={...e.props};if(t!=null){t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(r=t.ref);for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&s!=="key"&&s!=="ref"&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(a[s]=t[s])}return n.length===1?a.children=n[0]:n.length>1&&(a.children=n),{$$typeof:v,type:e.type,props:a,key:o,ref:r}}function N(e){let t=[],n=[e];for(;n.length>0;){let o=n.pop();if(Array.isArray(o))for(let r=o.length-1;r>=0;r--)n.push(o[r]);else t.push(o)}return t}function et(e,t){let n=N(e),o=[];for(let r=0;r<n.length;r++){let a=n[r];a==null||typeof a=="boolean"||o.push(t(a,r))}return o}function tt(e,t){let n=N(e),o=0;for(let r of n)r==null||typeof r=="boolean"||t(r,o++)}function nt(e){let t=N(e),n=0;for(let o of t)o!=null&&typeof o!="boolean"&&n++;return n}function ot(e){if(!w(e))throw new Error("Children.only: expected a single SpecifyJS element child");return e}function rt(e){return N(e).filter(n=>n!=null&&typeof n!="boolean")}var he={map:et,forEach:tt,count:nt,only:ot,toArray:rt};var P=class{constructor(t){this._fiber=null;this._pendingState=[];this._forceUpdate=!1;this.props=t,this.state={},this.context=void 0}setState(t,n){this._pendingState.push(t),this._enqueueUpdate(n)}forceUpdate(t){this._forceUpdate=!0,this._enqueueUpdate(t)}render(){return null}_enqueueUpdate(t){}};P.prototype.isSpecComponent=!0;var k=class extends P{shouldComponentUpdate(t,n){return!xe(this.props,t)||!xe(this.state,n)}};k.prototype.isPureSpecComponent=!0;function xe(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=e,a=t;for(let s of n)if(!Object.prototype.hasOwnProperty.call(a,s)||!Object.is(r[s],a[s]))return!1;return!0}var L=class extends P{static getDerivedStateFromError(t){return{hasError:!0,error:t}}constructor(t){super(t),this.state={hasError:!1,error:null}}componentDidCatch(t,n){this.props.onError?.(t,n)}render(){return this.state.hasError?this.props.fallback??null:this.props.children??null}};function $(e){let t=F(e);t.current=e;let n=JSON.stringify([e.title,e.description,e.keywords,e.author,e.canonical,e.og,e.twitter,e.httpEquiv,e.meta]);S(()=>{let o=t.current,r=[],a=document.title;if(o.title&&(document.title=o.title,r.push(()=>{document.title=a})),o.description&&r.push(C("name","description",o.description)),o.keywords&&r.push(C("name","keywords",o.keywords)),o.author&&r.push(C("name","author",o.author)),o.canonical){let s=document.createElement("link");s.rel="canonical",s.href=o.canonical,document.head.appendChild(s),r.push(()=>s.remove())}if(o.og)for(let[s,i]of Object.entries(o.og))r.push(C("property",`og:${s}`,i));if(o.twitter)for(let[s,i]of Object.entries(o.twitter))r.push(C("name",`twitter:${s}`,i));if(o.httpEquiv){let s={csp:"Content-Security-Policy",referrer:"Referrer-Policy",contentType:"X-Content-Type-Options",frameOptions:"X-Frame-Options",cacheControl:"Cache-Control"};for(let[i,u]of Object.entries(o.httpEquiv)){if(u===void 0)continue;let p=s[i]??i;r.push(st(p,u))}}if(o.meta)for(let s of o.meta)s.name?r.push(C("name",s.name,s.content)):s.property&&r.push(C("property",s.property,s.content));return()=>{for(let s of r)s()}},[n])}function Pe(e){return e.replace(/["\\]/g,"\\$&")}function C(e,t,n){let o=`meta[${e}="${Pe(t)}"]`,r=document.querySelector(o),a=r!==null,s=r?.content;return r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=n,()=>{a&&s!==void 0?r.content=s:a||r.remove()}}function st(e,t){let n=`meta[http-equiv="${Pe(e)}"]`,o=document.querySelector(n),r=o!==null,a=o?.content;return o||(o=document.createElement("meta"),o.setAttribute("http-equiv",e),document.head.appendChild(o)),o.content=t,()=>{r&&a!==void 0?o.content=a:r||o.remove()}}var Se=null;function c(){if(Se===null)throw new Error("Invalid hook call. Hooks can only be called inside the body of a function component.");return Se}function g(e){return c().useState(e)}function S(e,t){return c().useEffect(e,t)}function l(e){return c().useContext(e)}function Ce(e,t,n){return c().useReducer(e,t,n)}function x(e,t){return c().useCallback(e,t)}function R(e,t){return c().useMemo(e,t)}function F(e){return c().useRef(e)}function ge(e,t,n){return c().useImperativeHandle(e,t,n)}function Ee(e,t){return c().useLayoutEffect(e,t)}function ve(e,t){return c().useDebugValue(e,t)}function be(){return c().useId()}function we(e){return c().useDeferredValue(e)}function Re(){return c().useTransition()}function ke(e,t,n){return c().useSyncExternalStore(e,t,n)}function Te(e,t){return c().useInsertionEffect(e,t)}var _e=ae;var Ne=ie;var Le=pe;var m=b({pathname:"/",params:{},navigate:()=>{throw new Error("useNavigate must be used inside a <Router> component.")},basePath:""});function Fe(){let t=(typeof window<"u"?window.location.hash:"").replace(/^#\/?/,"/");return t===""?"/":t}var Ie={pathname:Fe(),hash:typeof window<"u"?window.location.hash:""},V=new Set;function Me(){Ie={pathname:Fe(),hash:typeof window<"u"?window.location.hash:""};for(let e of V)e()}typeof window<"u"&&window.addEventListener("hashchange",Me);function Oe(e){return V.add(e),()=>{V.delete(e)}}function I(){return Ie}function De(e,t){let n=e.startsWith("#")?e:"#"+e;if(t?.replace){let o=window.location.pathname+window.location.search+n;window.history.replaceState(null,"",o)}else window.location.hash=n;Me()}function A(e){let[t,n]=g(()=>I().pathname);S(()=>(n(I().pathname),Oe(()=>{n(I().pathname)})),[]);let o=x((...a)=>{De(a[0],a[1])},[]),r=R(()=>({pathname:t,params:{},navigate:o,basePath:""}),[t,o]);return d(m.Provider,{value:r},e.children)}function Ue(e){let t=e.length;for(;t>1&&e.charCodeAt(t-1)===47;)t--;return t===e.length?e:e.slice(0,t)}function E(e,t,n){let o=n?.exact??!1,r=e==="/"?"/":Ue(e),a=t==="/"?"/":Ue(t);if(r==="/"){let h=a==="/";return o&&!h?null:{params:{},isExact:h,path:e,url:"/"}}let s=r.split("/").filter(Boolean),i=a.split("/").filter(Boolean),u=s[s.length-1]==="*";if(!u&&o&&i.length!==s.length||!u&&i.length<s.length)return null;let p={},y=[];for(let h=0;h<s.length;h++){let T=s[h];if(T==="*"){let D=i.slice(h).join("/");return p["*"]=D,{params:p,isExact:!0,path:e,url:"/"+i.join("/")}}if(h>=i.length)return null;let _=i[h];if(T.startsWith(":")){let D=T.slice(1);p[D]=decodeURIComponent(_),y.push(_);continue}if(T.toLowerCase()!==_.toLowerCase())return null;y.push(_)}let f="/"+y.join("/"),O=i.length===s.length;return o&&!O?null:{params:p,isExact:O,path:e,url:f}}function Y(e){let t=l(m),n=t.basePath+e.path,o=E(n,t.pathname,{exact:e.exact??!1}),r=R(()=>({pathname:t.pathname,params:{...t.params,...o?o.params:{}},navigate:t.navigate,basePath:o?o.url:t.basePath}),[t.pathname,t.navigate,t.params,t.basePath,o]);if(!o)return null;for(let s of Object.keys(t.params))s in r.params||(r.params[s]=t.params[s]);let a=e.component?d(e.component,{...r.params}):e.children;return d(m.Provider,{value:r},a)}function j(e){let{to:t,className:n,activeClassName:o,exact:r,children:a,...s}=e,i=l(m),u=E(t,i.pathname,{exact:r??!1})!==null,p=x(((...f)=>{f[0].preventDefault(),i.navigate(t)}),[t,i.navigate]),y=[n,u?o:null].filter(Boolean).join(" ")||void 0;return d("a",{...s,href:"#"+t,onClick:p,className:y},a)}function H(){return l(m)}function q(){return l(m).params}function B(){return l(m).navigate}var $e=8;function Ve(){let e=$e;return $e=e===8?16:8,e}var K=4,z=!1;var Ae=[];function Ye(e){let t=K,n=z;K=Ve(),z=!0;try{e()}finally{K=t,z=n,it()}}function it(){let e=Ae;Ae=[];for(let t of e)t()}var je=[];function W(){let e=je;je=[];for(let t of e)t()}function He(e){let t=e();W(),t&&typeof t.then=="function"&&t.then(()=>{W()})}var pt=/^127\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;function ut(e){let t=pt.exec(e);return t?Number(t[1])<=255&&Number(t[2])<=255&&Number(t[3])<=255:!1}function G(e){if(e.startsWith("//"))throw new Error(`[SpecifyJS] Protocol-relative URL rejected: "${e}". Use an explicit https:// prefix.`);if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))return;if(e.startsWith("data:")){if(e.length>1024*1024)throw new Error("[SpecifyJS] secureFetch: data: URI exceeds 1MB limit");return}let t;try{t=new URL(e,typeof window<"u"?window.location.href:void 0)}catch{throw new Error(`[SpecifyJS] secureFetch: unable to validate URL "${e}". Provide a valid absolute HTTPS URL or a relative path.`)}if(t.protocol==="https:")return;let n=t.hostname.toLowerCase();if(!(n==="localhost"||n==="127.0.0.1"||n==="[::1]"||n==="0.0.0.0"||ut(n)))throw n.endsWith(".localhost")?new Error(`[SpecifyJS] SSRF protection: "${e}" uses a .localhost subdomain which resolves to the loopback interface. Use exact "localhost" instead.`):new Error(`[SpecifyJS] Insecure URL rejected: "${e}". SpecifyJS enforces HTTPS-only for all network requests. Use https:// or a relative URL. Localhost URLs are allowed for development.`)}function M(e,t){let n=typeof e=="string"?e:e instanceof URL?e.href:e.url;return G(n),fetch(e,{redirect:"error",...t})}var qe=new Map;var ct=!0;function Be(e){ct=e}function Ke(e){let t=e.match(/^s-(\d+)-(\d+)$/);if(!t||!t[1]||!t[2])return null;let n=parseInt(t[1],10),o=parseInt(t[2],10);for(let r of qe.values())if(r.index===n)return{typeName:r.name,typeIndex:n,instanceId:o};return null}function ze(){return qe}var J=b({flags:{},isEnabled:()=>!1,setFlag:()=>{},loading:!1});function X(e){let[t,n]=g(()=>({...e.defaults})),[o,r]=g(!!e.url);S(()=>{if(!e.url)return;let u=!1;return r(!0),M(e.url).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{if(!u&&typeof p=="object"&&p!==null){let y={};for(let f of Object.keys(p))f!=="__proto__"&&f!=="constructor"&&f!=="prototype"&&(y[f]=p[f]===!0);n(f=>({...f,...y}))}u||r(!1)}).catch(()=>{u||r(!1)}),()=>{u=!0}},[e.url]);let a=x(((...u)=>{let p=u[0];return t[p]===!0}),[t]),s=x(((...u)=>{let p=u[0],y=u[1];n(f=>({...f,[p]:y}))}),[]),i={flags:t,isEnabled:a,setFlag:s,loading:o};return d(J.Provider,{value:i},e.children)}function Z(e){let{isEnabled:t}=l(J);return t(e.flag)?e.children:e.fallback??null}function Q(){return l(J)}
|
|
2
|
+
"use strict";var z=Object.defineProperty;var pt=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var ct=Object.prototype.hasOwnProperty;var lt=(e,t)=>{for(var n in t)z(e,n,{get:t[n],enumerable:!0})},ft=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ut(t))!ct.call(e,r)&&r!==n&&z(e,r,{get:()=>t[r],enumerable:!(o=pt(t,r))||o.enumerable});return e};var dt=e=>ft(z({},"__esModule",{value:!0}),e);var Tt={};lt(Tt,{Children:()=>_e,Component:()=>C,ErrorBoundary:()=>I,FeatureFlagProvider:()=>ce,FeatureGate:()=>le,Fragment:()=>Ee,Link:()=>te,Profiler:()=>je,PureComponent:()=>L,Route:()=>ee,Router:()=>Z,StrictMode:()=>ze,Suspense:()=>Ye,act:()=>ot,assertSecureUrl:()=>pe,breakpointQuery:()=>S,cloneElement:()=>Te,configureBreakpoints:()=>G,createContext:()=>b,createElement:()=>d,createFactory:()=>we,createRef:()=>ve,forwardRef:()=>ke,getBreakpoints:()=>K,getComponentTypeTable:()=>it,h:()=>d,isValidElement:()=>R,lazy:()=>Re,matchPath:()=>v,memo:()=>be,resolveComponentId:()=>at,secureFetch:()=>A,setComponentIdsEnabled:()=>st,startTransition:()=>tt,useBreakpoint:()=>B,useBreakpointValue:()=>Q,useCallback:()=>m,useContext:()=>l,useDebugValue:()=>$e,useDeferredValue:()=>Ve,useEffect:()=>g,useFeatureFlags:()=>fe,useHead:()=>j,useId:()=>Be,useImperativeHandle:()=>De,useInsertionEffect:()=>He,useLayoutEffect:()=>Ue,useMediaQuery:()=>P,useMemo:()=>_,useNavigate:()=>re,useParams:()=>oe,useReducer:()=>Oe,useRef:()=>O,useRouter:()=>ne,useState:()=>E,useSyncExternalStore:()=>T,useTransition:()=>Ae,useWindowSize:()=>W});module.exports=dt(Tt);var k=Symbol.for("spec.element"),de=Symbol.for("spec.fragment"),Lt=Symbol.for("spec.portal"),me=Symbol.for("spec.provider"),he=Symbol.for("spec.consumer"),ye=Symbol.for("spec.forward_ref"),xe=Symbol.for("spec.memo"),Pe=Symbol.for("spec.lazy"),Se=Symbol.for("spec.suspense"),Ce=Symbol.for("spec.strict_mode"),ge=Symbol.for("spec.profiler");function d(e,t,...n){let o=null,r=null,a={};if(t!=null){t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(r=t.ref);for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&s!=="key"&&s!=="ref"&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(a[s]=t[s])}if(n.length===1?a.children=n[0]:n.length>1&&(a.children=n),typeof e=="function"&&e.defaultProps){let s=e.defaultProps;for(let i of Object.keys(s))i!=="__proto__"&&i!=="constructor"&&a[i]===void 0&&(a[i]=s[i])}return{$$typeof:k,type:e,props:a,key:o,ref:r}}function we(e){return(t,...n)=>d(e,t??null,...n)}var Ee=de;function b(e){let t={$$typeof:Symbol.for("spec.context"),Provider:null,Consumer:null,_currentValue:e,_defaultValue:e},n={$$typeof:me,_context:t},o={$$typeof:he,_context:t};return t.Provider=n,t.Consumer=o,t}function ve(){return{current:null}}function ke(e){return{$$typeof:ye,render:e,displayName:e.displayName||e.name||"ForwardRef"}}function be(e,t){return{$$typeof:xe,type:e,compare:t||null,displayName:e.displayName||e.name||"Memo"}}function Re(e){let t={_status:"pending",_result:void 0};return{$$typeof:Pe,_payload:t,_init:()=>{if(t._status==="resolved")return t._result;if(t._status==="rejected")throw t._result;let o=e();throw t._status="pending",o.then(r=>{t._status="resolved",t._result=r.default},r=>{t._status="rejected",t._result=r}),o},displayName:"Lazy"}}function R(e){return typeof e=="object"&&e!==null&&e.$$typeof===k}function Te(e,t,...n){if(!R(e))throw new Error("cloneElement: argument must be a valid SpecifyJS element");let o=e.key,r=e.ref,a={...e.props};if(t!=null){t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(r=t.ref);for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&s!=="key"&&s!=="ref"&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(a[s]=t[s])}return n.length===1?a.children=n[0]:n.length>1&&(a.children=n),{$$typeof:k,type:e.type,props:a,key:o,ref:r}}function M(e){let t=[],n=[e];for(;n.length>0;){let o=n.pop();if(Array.isArray(o))for(let r=o.length-1;r>=0;r--)n.push(o[r]);else t.push(o)}return t}function mt(e,t){let n=M(e),o=[];for(let r=0;r<n.length;r++){let a=n[r];a==null||typeof a=="boolean"||o.push(t(a,r))}return o}function ht(e,t){let n=M(e),o=0;for(let r of n)r==null||typeof r=="boolean"||t(r,o++)}function yt(e){let t=M(e),n=0;for(let o of t)o!=null&&typeof o!="boolean"&&n++;return n}function xt(e){if(!R(e))throw new Error("Children.only: expected a single SpecifyJS element child");return e}function Pt(e){return M(e).filter(n=>n!=null&&typeof n!="boolean")}var _e={map:mt,forEach:ht,count:yt,only:xt,toArray:Pt};var C=class{constructor(t){this._fiber=null;this._pendingState=[];this._forceUpdate=!1;this.props=t,this.state={},this.context=void 0}setState(t,n){this._pendingState.push(t),this._enqueueUpdate(n)}forceUpdate(t){this._forceUpdate=!0,this._enqueueUpdate(t)}render(){return null}_enqueueUpdate(t){}};C.prototype.isSpecComponent=!0;var L=class extends C{shouldComponentUpdate(t,n){return!Le(this.props,t)||!Le(this.state,n)}};L.prototype.isPureSpecComponent=!0;function Le(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=e,a=t;for(let s of n)if(!Object.prototype.hasOwnProperty.call(a,s)||!Object.is(r[s],a[s]))return!1;return!0}var I=class extends C{static getDerivedStateFromError(t){return{hasError:!0,error:t}}constructor(t){super(t),this.state={hasError:!1,error:null}}componentDidCatch(t,n){this.props.onError?.(t,n)}render(){return this.state.hasError?this.props.fallback??null:this.props.children??null}};function j(e){let t=O(e);t.current=e;let n=JSON.stringify([e.title,e.description,e.keywords,e.author,e.canonical,e.og,e.twitter,e.httpEquiv,e.meta]);g(()=>{let o=t.current,r=[],a=document.title;if(o.title&&(document.title=o.title,r.push(()=>{document.title=a})),o.description&&r.push(w("name","description",o.description)),o.keywords&&r.push(w("name","keywords",o.keywords)),o.author&&r.push(w("name","author",o.author)),o.canonical){let s=document.createElement("link");s.rel="canonical",s.href=o.canonical,document.head.appendChild(s),r.push(()=>s.remove())}if(o.og)for(let[s,i]of Object.entries(o.og))r.push(w("property",`og:${s}`,i));if(o.twitter)for(let[s,i]of Object.entries(o.twitter))r.push(w("name",`twitter:${s}`,i));if(o.httpEquiv){let s={csp:"Content-Security-Policy",referrer:"Referrer-Policy",contentType:"X-Content-Type-Options",frameOptions:"X-Frame-Options",cacheControl:"Cache-Control"};for(let[i,u]of Object.entries(o.httpEquiv)){if(u===void 0)continue;let p=s[i]??i;r.push(St(p,u))}}if(o.meta)for(let s of o.meta)s.name?r.push(w("name",s.name,s.content)):s.property&&r.push(w("property",s.property,s.content));return()=>{for(let s of r)s()}},[n])}function Ne(e){return e.replace(/["\\]/g,"\\$&")}function w(e,t,n){let o=`meta[${e}="${Ne(t)}"]`,r=document.querySelector(o),a=r!==null,s=r?.content;return r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=n,()=>{a&&s!==void 0?r.content=s:a||r.remove()}}function St(e,t){let n=`meta[http-equiv="${Ne(e)}"]`,o=document.querySelector(n),r=o!==null,a=o?.content;return o||(o=document.createElement("meta"),o.setAttribute("http-equiv",e),document.head.appendChild(o)),o.content=t,()=>{r&&a!==void 0?o.content=a:r||o.remove()}}function P(e){let t=m(r=>{if(typeof window>"u")return()=>{};let a=window.matchMedia(e);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[e]),n=m(()=>typeof window>"u"?!1:window.matchMedia(e).matches,[e]),o=m(()=>!1,[]);return T(t,n,o)}var U=typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0},$=new Set,D=!1;function Fe(){let e=window.innerWidth,t=window.innerHeight;if(!(e===U.width&&t===U.height)){U={width:e,height:t};for(let n of $)n()}}function Ct(e){return $.add(e),!D&&typeof window<"u"&&(window.addEventListener("resize",Fe),D=!0),()=>{$.delete(e),$.size===0&&D&&(window.removeEventListener("resize",Fe),D=!1)}}function gt(){return U}function wt(){return{width:0,height:0}}function W(){return T(Ct,gt,wt)}var Me={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},q={...Me};function K(){return{...q}}function G(e){q={...Me,...e}}function S(e){return`(min-width: ${q[e]}px)`}var J=["2xl","xl","lg","md","sm","xs"];function B(){let e=P(S("2xl")),t=P(S("xl")),n=P(S("lg")),o=P(S("md")),r=P(S("sm"));return e?"2xl":t?"xl":n?"lg":o?"md":r?"sm":"xs"}function Q(e){let t=B(),n=J.indexOf(t);for(let o=n;o<J.length;o++){let r=e[J[o]];if(r!==void 0)return r}}var Ie=null;function c(){if(Ie===null)throw new Error("Invalid hook call. Hooks can only be called inside the body of a function component.");return Ie}function E(e){return c().useState(e)}function g(e,t){return c().useEffect(e,t)}function l(e){return c().useContext(e)}function Oe(e,t,n){return c().useReducer(e,t,n)}function m(e,t){return c().useCallback(e,t)}function _(e,t){return c().useMemo(e,t)}function O(e){return c().useRef(e)}function De(e,t,n){return c().useImperativeHandle(e,t,n)}function Ue(e,t){return c().useLayoutEffect(e,t)}function $e(e,t){return c().useDebugValue(e,t)}function Be(){return c().useId()}function Ve(e){return c().useDeferredValue(e)}function Ae(){return c().useTransition()}function T(e,t,n){return c().useSyncExternalStore(e,t,n)}function He(e,t){return c().useInsertionEffect(e,t)}var Ye=Se;var ze=Ce;var je=ge;var h=b({pathname:"/",params:{},navigate:()=>{throw new Error("useNavigate must be used inside a <Router> component.")},basePath:""});function We(){let t=(typeof window<"u"?window.location.hash:"").replace(/^#\/?/,"/");return t===""?"/":t}var qe={pathname:We(),hash:typeof window<"u"?window.location.hash:""},X=new Set;function Ke(){qe={pathname:We(),hash:typeof window<"u"?window.location.hash:""};for(let e of X)e()}typeof window<"u"&&window.addEventListener("hashchange",Ke);function Ge(e){return X.add(e),()=>{X.delete(e)}}function V(){return qe}function Je(e,t){let n=e.startsWith("#")?e:"#"+e;if(t?.replace){let o=window.location.pathname+window.location.search+n;window.history.replaceState(null,"",o)}else window.location.hash=n;Ke()}function Z(e){let[t,n]=E(()=>V().pathname);g(()=>(n(V().pathname),Ge(()=>{n(V().pathname)})),[]);let o=m((...a)=>{Je(a[0],a[1])},[]),r=_(()=>({pathname:t,params:{},navigate:o,basePath:""}),[t,o]);return d(h.Provider,{value:r},e.children)}function Qe(e){let t=e.length;for(;t>1&&e.charCodeAt(t-1)===47;)t--;return t===e.length?e:e.slice(0,t)}function v(e,t,n){let o=n?.exact??!1,r=e==="/"?"/":Qe(e),a=t==="/"?"/":Qe(t);if(r==="/"){let x=a==="/";return o&&!x?null:{params:{},isExact:x,path:e,url:"/"}}let s=r.split("/").filter(Boolean),i=a.split("/").filter(Boolean),u=s[s.length-1]==="*";if(!u&&o&&i.length!==s.length||!u&&i.length<s.length)return null;let p={},y=[];for(let x=0;x<s.length;x++){let N=s[x];if(N==="*"){let Y=i.slice(x).join("/");return p["*"]=Y,{params:p,isExact:!0,path:e,url:"/"+i.join("/")}}if(x>=i.length)return null;let F=i[x];if(N.startsWith(":")){let Y=N.slice(1);p[Y]=decodeURIComponent(F),y.push(F);continue}if(N.toLowerCase()!==F.toLowerCase())return null;y.push(F)}let f="/"+y.join("/"),H=i.length===s.length;return o&&!H?null:{params:p,isExact:H,path:e,url:f}}function ee(e){let t=l(h),n=t.basePath+e.path,o=v(n,t.pathname,{exact:e.exact??!1}),r=_(()=>({pathname:t.pathname,params:{...t.params,...o?o.params:{}},navigate:t.navigate,basePath:o?o.url:t.basePath}),[t.pathname,t.navigate,t.params,t.basePath,o]);if(!o)return null;for(let s of Object.keys(t.params))s in r.params||(r.params[s]=t.params[s]);let a=e.component?d(e.component,{...r.params}):e.children;return d(h.Provider,{value:r},a)}function te(e){let{to:t,className:n,activeClassName:o,exact:r,children:a,...s}=e,i=l(h),u=v(t,i.pathname,{exact:r??!1})!==null,p=m(((...f)=>{f[0].preventDefault(),i.navigate(t)}),[t,i.navigate]),y=[n,u?o:null].filter(Boolean).join(" ")||void 0;return d("a",{...s,href:"#"+t,onClick:p,className:y},a)}function ne(){return l(h)}function oe(){return l(h).params}function re(){return l(h).navigate}var Xe=8;function Ze(){let e=Xe;return Xe=e===8?16:8,e}var se=4,ae=!1;var et=[];function tt(e){let t=se,n=ae;se=Ze(),ae=!0;try{e()}finally{se=t,ae=n,vt()}}function vt(){let e=et;et=[];for(let t of e)t()}var nt=[];function ie(){let e=nt;nt=[];for(let t of e)t()}function ot(e){let t=e();ie(),t&&typeof t.then=="function"&&t.then(()=>{ie()})}var kt=/^127\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;function bt(e){let t=kt.exec(e);return t?Number(t[1])<=255&&Number(t[2])<=255&&Number(t[3])<=255:!1}function pe(e){if(e.startsWith("//"))throw new Error(`[SpecifyJS] Protocol-relative URL rejected: "${e}". Use an explicit https:// prefix.`);if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))return;if(e.startsWith("data:")){if(e.length>1024*1024)throw new Error("[SpecifyJS] secureFetch: data: URI exceeds 1MB limit");return}let t;try{t=new URL(e,typeof window<"u"?window.location.href:void 0)}catch{throw new Error(`[SpecifyJS] secureFetch: unable to validate URL "${e}". Provide a valid absolute HTTPS URL or a relative path.`)}if(t.protocol==="https:")return;let n=t.hostname.toLowerCase();if(!(n==="localhost"||n==="127.0.0.1"||n==="[::1]"||n==="0.0.0.0"||bt(n)))throw n.endsWith(".localhost")?new Error(`[SpecifyJS] SSRF protection: "${e}" uses a .localhost subdomain which resolves to the loopback interface. Use exact "localhost" instead.`):new Error(`[SpecifyJS] Insecure URL rejected: "${e}". SpecifyJS enforces HTTPS-only for all network requests. Use https:// or a relative URL. Localhost URLs are allowed for development.`)}function A(e,t){let n=typeof e=="string"?e:e instanceof URL?e.href:e.url;return pe(n),fetch(e,{redirect:"error",...t})}var rt=new Map;var Rt=!0;function st(e){Rt=e}function at(e){let t=e.match(/^s-(\d+)-(\d+)$/);if(!t||!t[1]||!t[2])return null;let n=parseInt(t[1],10),o=parseInt(t[2],10);for(let r of rt.values())if(r.index===n)return{typeName:r.name,typeIndex:n,instanceId:o};return null}function it(){return rt}var ue=b({flags:{},isEnabled:()=>!1,setFlag:()=>{},loading:!1});function ce(e){let[t,n]=E(()=>({...e.defaults})),[o,r]=E(!!e.url);g(()=>{if(!e.url)return;let u=!1;return r(!0),A(e.url).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{if(!u&&typeof p=="object"&&p!==null){let y={};for(let f of Object.keys(p))f!=="__proto__"&&f!=="constructor"&&f!=="prototype"&&(y[f]=p[f]===!0);n(f=>({...f,...y}))}u||r(!1)}).catch(()=>{u||r(!1)}),()=>{u=!0}},[e.url]);let a=m(((...u)=>{let p=u[0];return t[p]===!0}),[t]),s=m(((...u)=>{let p=u[0],y=u[1];n(f=>({...f,[p]:y}))}),[]),i={flags:t,isEnabled:a,setFlag:s,loading:o};return d(ue.Provider,{value:i},e.children)}function le(e){let{isEnabled:t}=l(ue);return t(e.flag)?e.children:e.fallback??null}function fe(){return l(ue)}
|
package/dist/specifyjs.esm.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
useNavigate,
|
|
25
25
|
useParams,
|
|
26
26
|
useRouter
|
|
27
|
-
} from "./esm/chunks/chunk-
|
|
27
|
+
} from "./esm/chunks/chunk-5NXJ7PRB.js";
|
|
28
28
|
import {
|
|
29
29
|
getComponentTypeTable,
|
|
30
30
|
resolveComponentId,
|
|
@@ -45,6 +45,11 @@ import {
|
|
|
45
45
|
secureFetch
|
|
46
46
|
} from "./esm/chunks/chunk-RH3DFT32.js";
|
|
47
47
|
import {
|
|
48
|
+
breakpointQuery,
|
|
49
|
+
configureBreakpoints,
|
|
50
|
+
getBreakpoints,
|
|
51
|
+
useBreakpoint,
|
|
52
|
+
useBreakpointValue,
|
|
48
53
|
useCallback,
|
|
49
54
|
useContext,
|
|
50
55
|
useDebugValue,
|
|
@@ -55,13 +60,15 @@ import {
|
|
|
55
60
|
useImperativeHandle,
|
|
56
61
|
useInsertionEffect,
|
|
57
62
|
useLayoutEffect,
|
|
63
|
+
useMediaQuery,
|
|
58
64
|
useMemo,
|
|
59
65
|
useReducer,
|
|
60
66
|
useRef,
|
|
61
67
|
useState,
|
|
62
68
|
useSyncExternalStore,
|
|
63
|
-
useTransition
|
|
64
|
-
|
|
69
|
+
useTransition,
|
|
70
|
+
useWindowSize
|
|
71
|
+
} from "./esm/chunks/chunk-AQX42M4L.js";
|
|
65
72
|
import "./esm/chunks/chunk-FDNBPWUH.js";
|
|
66
73
|
export {
|
|
67
74
|
Children,
|
|
@@ -79,12 +86,15 @@ export {
|
|
|
79
86
|
Suspense,
|
|
80
87
|
act,
|
|
81
88
|
assertSecureUrl,
|
|
89
|
+
breakpointQuery,
|
|
82
90
|
cloneElement,
|
|
91
|
+
configureBreakpoints,
|
|
83
92
|
createContext,
|
|
84
93
|
createElement,
|
|
85
94
|
createFactory,
|
|
86
95
|
createRef,
|
|
87
96
|
forwardRef,
|
|
97
|
+
getBreakpoints,
|
|
88
98
|
getComponentTypeTable,
|
|
89
99
|
createElement as h,
|
|
90
100
|
isValidElement,
|
|
@@ -95,6 +105,8 @@ export {
|
|
|
95
105
|
secureFetch,
|
|
96
106
|
setComponentIdsEnabled,
|
|
97
107
|
startTransition,
|
|
108
|
+
useBreakpoint,
|
|
109
|
+
useBreakpointValue,
|
|
98
110
|
useCallback,
|
|
99
111
|
useContext,
|
|
100
112
|
useDebugValue,
|
|
@@ -106,6 +118,7 @@ export {
|
|
|
106
118
|
useImperativeHandle,
|
|
107
119
|
useInsertionEffect,
|
|
108
120
|
useLayoutEffect,
|
|
121
|
+
useMediaQuery,
|
|
109
122
|
useMemo,
|
|
110
123
|
useNavigate,
|
|
111
124
|
useParams,
|
|
@@ -114,5 +127,6 @@ export {
|
|
|
114
127
|
useRouter,
|
|
115
128
|
useState,
|
|
116
129
|
useSyncExternalStore,
|
|
117
|
-
useTransition
|
|
130
|
+
useTransition,
|
|
131
|
+
useWindowSize
|
|
118
132
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoint configuration for responsive design hooks.
|
|
3
|
+
*
|
|
4
|
+
* Provides named breakpoints (xs through 2xl) with Tailwind CSS defaults.
|
|
5
|
+
* Breakpoints can be customized globally via `configureBreakpoints`.
|
|
6
|
+
*/
|
|
7
|
+
export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
8
|
+
/** Returns a copy of the current breakpoint configuration. */
|
|
9
|
+
export declare function getBreakpoints(): Record<Breakpoint, number>;
|
|
10
|
+
/** Override one or more breakpoint values. Unspecified breakpoints retain their defaults. */
|
|
11
|
+
export declare function configureBreakpoints(custom: Partial<Record<Breakpoint, number>>): void;
|
|
12
|
+
/** Returns a `(min-width: Npx)` media query string for the named breakpoint. */
|
|
13
|
+
export declare function breakpointQuery(name: Breakpoint): string;
|
|
14
|
+
/** Reset breakpoints to defaults. For testing only. */
|
|
15
|
+
export declare function __resetBreakpoints(): void;
|
|
@@ -45,3 +45,9 @@ export declare function useSyncExternalStore<T>(subscribe: (onStoreChange: () =>
|
|
|
45
45
|
export declare function useInsertionEffect(create: () => void | (() => void), deps?: readonly unknown[]): void;
|
|
46
46
|
export { useHead } from './use-head.js';
|
|
47
47
|
export type { HeadMeta, HeadHttpEquiv } from './use-head.js';
|
|
48
|
+
export { useMediaQuery } from './use-media-query.js';
|
|
49
|
+
export { useWindowSize } from './use-window-size.js';
|
|
50
|
+
export type { WindowSize } from './use-window-size.js';
|
|
51
|
+
export { useBreakpoint, useBreakpointValue } from './use-breakpoint.js';
|
|
52
|
+
export { getBreakpoints, configureBreakpoints, breakpointQuery } from './breakpoints.js';
|
|
53
|
+
export type { Breakpoint } from './breakpoints.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Breakpoint } from './breakpoints.js';
|
|
2
|
+
/** Returns the name of the largest breakpoint whose min-width query matches. */
|
|
3
|
+
export declare function useBreakpoint(): Breakpoint;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the value associated with the current breakpoint, falling back
|
|
6
|
+
* to the next smaller breakpoint that has a value defined.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useBreakpointValue<T>(values: Partial<Record<Breakpoint, T>>): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface WindowSize {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
/** Reset the cached window size. For testing only. */
|
|
6
|
+
export declare function __resetWindowSize(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the current window dimensions as `{ width, height }`.
|
|
9
|
+
* Re-renders the component when the window is resized.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useWindowSize(): WindowSize;
|
|
@@ -10,7 +10,7 @@ export { cloneElement } from './core/clone-element.js';
|
|
|
10
10
|
export { Children } from './core/children.js';
|
|
11
11
|
export { Component, PureComponent } from './components/component.js';
|
|
12
12
|
export { ErrorBoundary } from './components/error-boundary.js';
|
|
13
|
-
export { useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, useDebugValue, useId, useDeferredValue, useTransition, useSyncExternalStore, useInsertionEffect, useHead, } from './hooks/index.js';
|
|
13
|
+
export { useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, useDebugValue, useId, useDeferredValue, useTransition, useSyncExternalStore, useInsertionEffect, useHead, useMediaQuery, useWindowSize, useBreakpoint, useBreakpointValue, getBreakpoints, configureBreakpoints, breakpointQuery, } from './hooks/index.js';
|
|
14
14
|
export { Suspense } from './components/suspense.js';
|
|
15
15
|
export { StrictMode } from './components/strict-mode.js';
|
|
16
16
|
export { Profiler } from './components/profiler.js';
|
|
@@ -21,3 +21,6 @@ export { secureFetch, assertSecureUrl } from './shared/secure-fetch.js';
|
|
|
21
21
|
export { resolveComponentId, getComponentTypeTable, setComponentIdsEnabled, } from './shared/component-registry.js';
|
|
22
22
|
export { FeatureFlagProvider, FeatureGate, useFeatureFlags } from './features/index.js';
|
|
23
23
|
export type { SpecElement, SpecNode, SpecChild, Props, Key, Ref, RefObject, RefCallback, FunctionComponent, ClassComponentConstructor, ClassComponentInstance, SpecContext, ErrorInfo, Fiber, } from './shared/types.js';
|
|
24
|
+
export type { HeadMeta, HeadHttpEquiv } from './hooks/use-head.js';
|
|
25
|
+
export type { WindowSize } from './hooks/use-window-size.js';
|
|
26
|
+
export type { Breakpoint } from './hooks/breakpoints.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoint configuration for responsive design hooks.
|
|
3
|
+
*
|
|
4
|
+
* Provides named breakpoints (xs through 2xl) with Tailwind CSS defaults.
|
|
5
|
+
* Breakpoints can be customized globally via `configureBreakpoints`.
|
|
6
|
+
*/
|
|
7
|
+
export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
8
|
+
/** Returns a copy of the current breakpoint configuration. */
|
|
9
|
+
export declare function getBreakpoints(): Record<Breakpoint, number>;
|
|
10
|
+
/** Override one or more breakpoint values. Unspecified breakpoints retain their defaults. */
|
|
11
|
+
export declare function configureBreakpoints(custom: Partial<Record<Breakpoint, number>>): void;
|
|
12
|
+
/** Returns a `(min-width: Npx)` media query string for the named breakpoint. */
|
|
13
|
+
export declare function breakpointQuery(name: Breakpoint): string;
|
|
14
|
+
/** Reset breakpoints to defaults. For testing only. */
|
|
15
|
+
export declare function __resetBreakpoints(): void;
|
|
@@ -45,3 +45,9 @@ export declare function useSyncExternalStore<T>(subscribe: (onStoreChange: () =>
|
|
|
45
45
|
export declare function useInsertionEffect(create: () => void | (() => void), deps?: readonly unknown[]): void;
|
|
46
46
|
export { useHead } from './use-head.js';
|
|
47
47
|
export type { HeadMeta, HeadHttpEquiv } from './use-head.js';
|
|
48
|
+
export { useMediaQuery } from './use-media-query.js';
|
|
49
|
+
export { useWindowSize } from './use-window-size.js';
|
|
50
|
+
export type { WindowSize } from './use-window-size.js';
|
|
51
|
+
export { useBreakpoint, useBreakpointValue } from './use-breakpoint.js';
|
|
52
|
+
export { getBreakpoints, configureBreakpoints, breakpointQuery } from './breakpoints.js';
|
|
53
|
+
export type { Breakpoint } from './breakpoints.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Breakpoint } from './breakpoints.js';
|
|
2
|
+
/** Returns the name of the largest breakpoint whose min-width query matches. */
|
|
3
|
+
export declare function useBreakpoint(): Breakpoint;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the value associated with the current breakpoint, falling back
|
|
6
|
+
* to the next smaller breakpoint that has a value defined.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useBreakpointValue<T>(values: Partial<Record<Breakpoint, T>>): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface WindowSize {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
/** Reset the cached window size. For testing only. */
|
|
6
|
+
export declare function __resetWindowSize(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the current window dimensions as `{ width, height }`.
|
|
9
|
+
* Re-renders the component when the window is resized.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useWindowSize(): WindowSize;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { cloneElement } from './core/clone-element.js';
|
|
|
10
10
|
export { Children } from './core/children.js';
|
|
11
11
|
export { Component, PureComponent } from './components/component.js';
|
|
12
12
|
export { ErrorBoundary } from './components/error-boundary.js';
|
|
13
|
-
export { useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, useDebugValue, useId, useDeferredValue, useTransition, useSyncExternalStore, useInsertionEffect, useHead, } from './hooks/index.js';
|
|
13
|
+
export { useState, useEffect, useContext, useReducer, useCallback, useMemo, useRef, useImperativeHandle, useLayoutEffect, useDebugValue, useId, useDeferredValue, useTransition, useSyncExternalStore, useInsertionEffect, useHead, useMediaQuery, useWindowSize, useBreakpoint, useBreakpointValue, getBreakpoints, configureBreakpoints, breakpointQuery, } from './hooks/index.js';
|
|
14
14
|
export { Suspense } from './components/suspense.js';
|
|
15
15
|
export { StrictMode } from './components/strict-mode.js';
|
|
16
16
|
export { Profiler } from './components/profiler.js';
|
|
@@ -21,3 +21,6 @@ export { secureFetch, assertSecureUrl } from './shared/secure-fetch.js';
|
|
|
21
21
|
export { resolveComponentId, getComponentTypeTable, setComponentIdsEnabled, } from './shared/component-registry.js';
|
|
22
22
|
export { FeatureFlagProvider, FeatureGate, useFeatureFlags } from './features/index.js';
|
|
23
23
|
export type { SpecElement, SpecNode, SpecChild, Props, Key, Ref, RefObject, RefCallback, FunctionComponent, ClassComponentConstructor, ClassComponentInstance, SpecContext, ErrorInfo, Fiber, } from './shared/types.js';
|
|
24
|
+
export type { HeadMeta, HeadHttpEquiv } from './hooks/use-head.js';
|
|
25
|
+
export type { WindowSize } from './hooks/use-window-size.js';
|
|
26
|
+
export type { Breakpoint } from './hooks/breakpoints.js';
|