@qwanyx/stack 0.1.0
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/README.md +228 -0
- package/dist/index.cjs.js +34 -0
- package/dist/index.esm.js +1599 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# @qwanyx/stack
|
|
2
|
+
|
|
3
|
+
**The Modern HyperCard** - All-in-one data management system for React applications.
|
|
4
|
+
|
|
5
|
+
Stack combines everything you need to work with data:
|
|
6
|
+
- π **REST API Client** - Generic HTTP client for any API
|
|
7
|
+
- πΈοΈ **Graph Client** - Hierarchical data from qwanyx-brain
|
|
8
|
+
- π **Auth Management** - Token storage and handling
|
|
9
|
+
- βοΈ **React Hooks** - `useQuery` and `useMutation`
|
|
10
|
+
- π¨ **UI Components** (coming soon) - Default views and editors
|
|
11
|
+
|
|
12
|
+
## Philosophy
|
|
13
|
+
|
|
14
|
+
Like HyperCard's stacks were self-contained data + UI + logic, `@qwanyx/stack` provides everything you need to manage data in one package. No more juggling multiple libraries for API calls, auth, and state management.
|
|
15
|
+
|
|
16
|
+
**React is our HyperTalk** - we use React for UI instead of a custom scripting language, because React is practical and everyone knows it.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @qwanyx/stack
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
### 1. Initialize the API client
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { initializeApiClient } from '@qwanyx/stack'
|
|
30
|
+
|
|
31
|
+
// In your app entry point
|
|
32
|
+
initializeApiClient({
|
|
33
|
+
baseUrl: 'https://api.qwanyx.com'
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Use hooks in components
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { useQuery } from '@qwanyx/stack'
|
|
41
|
+
|
|
42
|
+
function AuthorsList() {
|
|
43
|
+
const { data, loading, error } = useQuery('belgicomics/authors', {
|
|
44
|
+
country: 'BE'
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
if (loading) return <div>Loading...</div>
|
|
48
|
+
if (error) return <div>Error: {error.message}</div>
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div>
|
|
52
|
+
{data.map(author => (
|
|
53
|
+
<div key={author.id}>{author.name}</div>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 3. Mutations (create/update/delete)
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { useMutation } from '@qwanyx/stack'
|
|
64
|
+
|
|
65
|
+
function CreateAuthor() {
|
|
66
|
+
const { mutate, loading } = useMutation('belgicomics/authors', 'POST')
|
|
67
|
+
|
|
68
|
+
const handleSubmit = async (formData) => {
|
|
69
|
+
await mutate(formData)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return <form onSubmit={handleSubmit}>...</form>
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## API Clients
|
|
77
|
+
|
|
78
|
+
### REST API Client
|
|
79
|
+
|
|
80
|
+
For standard REST APIs:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { getApiClient } from '@qwanyx/stack'
|
|
84
|
+
|
|
85
|
+
const client = getApiClient()
|
|
86
|
+
|
|
87
|
+
// CRUD operations
|
|
88
|
+
const authors = await client.get('belgicomics/authors', { country: 'BE' })
|
|
89
|
+
const author = await client.post('belgicomics/authors', { name: 'HergΓ©' })
|
|
90
|
+
await client.put('belgicomics/authors/123', { name: 'Updated' })
|
|
91
|
+
await client.delete('belgicomics/authors/123')
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Graph Client
|
|
95
|
+
|
|
96
|
+
For hierarchical data from qwanyx-brain:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { GraphClient } from '@qwanyx/stack'
|
|
100
|
+
|
|
101
|
+
const graph = new GraphClient({
|
|
102
|
+
baseUrl: 'https://api.qwanyx.com',
|
|
103
|
+
system_id: 'user-id'
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
// Work with nodes and edges
|
|
107
|
+
const children = await graph.getChildren(parentId)
|
|
108
|
+
const node = await graph.addNode({ type: 'note', title: 'Hello' })
|
|
109
|
+
await graph.moveNode(nodeId, newParentId)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Authentication
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { AuthManager } from '@qwanyx/stack'
|
|
116
|
+
|
|
117
|
+
// Login
|
|
118
|
+
AuthManager.setToken('your-jwt-token')
|
|
119
|
+
|
|
120
|
+
// Check auth
|
|
121
|
+
if (AuthManager.isAuthenticated()) {
|
|
122
|
+
// User is logged in
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Logout
|
|
126
|
+
AuthManager.clearToken()
|
|
127
|
+
|
|
128
|
+
// Token is automatically added to all API requests
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## React Hooks
|
|
132
|
+
|
|
133
|
+
### useQuery
|
|
134
|
+
|
|
135
|
+
Fetch data with automatic loading and error states:
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
const { data, loading, error, refetch } = useQuery(
|
|
139
|
+
'endpoint',
|
|
140
|
+
{ filter: 'value' }, // optional params
|
|
141
|
+
{
|
|
142
|
+
enabled: true, // optional: disable auto-fetch
|
|
143
|
+
onSuccess: (data) => console.log(data),
|
|
144
|
+
onError: (error) => console.error(error)
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### useMutation
|
|
150
|
+
|
|
151
|
+
Create, update, or delete data:
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
const { mutate, loading, error, reset } = useMutation(
|
|
155
|
+
'endpoint',
|
|
156
|
+
'POST', // or 'PUT', 'PATCH', 'DELETE'
|
|
157
|
+
{
|
|
158
|
+
onSuccess: (data) => console.log('Success!', data),
|
|
159
|
+
onError: (error) => console.error('Failed!', error)
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
await mutate({ name: 'New Item' })
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## TypeScript Support
|
|
167
|
+
|
|
168
|
+
Full TypeScript support with generics:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
interface Author {
|
|
172
|
+
id: string
|
|
173
|
+
name: string
|
|
174
|
+
country: string
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const { data } = useQuery<Author[]>('belgicomics/authors')
|
|
178
|
+
// data is typed as Author[] | null
|
|
179
|
+
|
|
180
|
+
const { mutate } = useMutation<Author, Partial<Author>>('belgicomics/authors', 'POST')
|
|
181
|
+
// mutate accepts Partial<Author> and returns Author
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Architecture
|
|
185
|
+
|
|
186
|
+
Stack follows a stable API principle:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
190
|
+
β Your App (Belgicomics) β
|
|
191
|
+
β - React components β
|
|
192
|
+
β - App-specific logic β
|
|
193
|
+
βββββββββββββββ¬ββββββββββββββββββββββββ
|
|
194
|
+
β
|
|
195
|
+
β
|
|
196
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
197
|
+
β @qwanyx/stack (this package) β
|
|
198
|
+
β - API clients β
|
|
199
|
+
β - Auth management β
|
|
200
|
+
β - React hooks β
|
|
201
|
+
β - UI components β
|
|
202
|
+
βββββββββββββββ¬ββββββββββββββββββββββββ
|
|
203
|
+
β
|
|
204
|
+
β
|
|
205
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
206
|
+
β API (Rust backend) β
|
|
207
|
+
β - STABLE, rarely changes β
|
|
208
|
+
β - Just returns data β
|
|
209
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
The API stays simple and stable. Stack adds intelligence and evolves rapidly. Your app uses Stack's simple interface.
|
|
213
|
+
|
|
214
|
+
## For Desktop Apps
|
|
215
|
+
|
|
216
|
+
Stack works great with Tauri for desktop applications:
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
Rust (backend) + Tauri (framework) + React (UI) + Stack (data) = Perfect combo
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
MIT
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
**@qwanyx/stack** - Because managing data shouldn't require 10 different packages.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";var mt=Object.defineProperty;var bt=(u,t,n)=>t in u?mt(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n;var he=(u,t,n)=>bt(u,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react");class wt{constructor(t){he(this,"config");if(!t.system_id)throw new Error("GraphClient: system_id is REQUIRED. No system_id β No start.");this.config=t}async callGraph(t,n={}){const a={coprocessor:"graph",method:t,system_id:this.config.system_id,params:n};try{const o=await fetch(`${this.config.baseUrl}/spu/invoke`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getToken()}`},body:JSON.stringify(a)});if(!o.ok){const c=await o.text();throw new Error(`API error (${o.status}): ${c}`)}const l=await o.json();if(!l.success&&l.error)throw new Error(l.error);return l}catch(o){throw console.error("Graph API call failed:",o),o}}getToken(){return typeof window<"u"&&window.localStorage&&localStorage.getItem("qwanyx_token")||""}async getChildren(t){return(await this.callGraph("get_children",{parent_id:t})).result||[]}async getNode(t){return(await this.callGraph("get_node",{node_id:t})).result||null}async addNode(t){const n={...t,created:t.created||new Date().toISOString(),modified:new Date().toISOString()},a=await this.callGraph("add_node",n);if(!a.result)throw new Error("Failed to add node");return a.result}async updateNode(t,n){const a={node_id:t,updates:{...n,modified:new Date().toISOString()}},o=await this.callGraph("update_node",a);if(!o.result)throw new Error("Failed to update node");return o.result}async deleteNode(t,n=!1){return(await this.callGraph("delete_node",{node_id:t,cascade:n})).success===!0}async getChildrenWithEdges(t,n="children",a,o){return(await this.callGraph("get_children_with_edges",{node_id:t,display_mode:n,edge_type:a,node_type:o})).result||[]}async addEdge(t,n,a="link",o){return await this.callGraph("add_edge",{source_id:t,target_id:n,edge_type:a,data:o})}async deleteEdge(t,n,a){return await this.callGraph("delete_edge",{source_id:t,target_id:n,edge_type:a})}async getEdges(t,n){return(await this.callGraph("get_edges",{source_id:t,edge_type:n})).result||[]}async getAncestors(t){return(await this.callGraph("get_ancestors",{node_id:t})).ancestors||[]}async getTree(t,n=10){return(await this.callGraph("get_tree",{root_id:t,max_depth:n})).tree||[]}async moveNode(t,n){const a=await this.callGraph("move",{node_id:t,new_parent_id:n});if(!a.node)throw new Error("Failed to move node");return a.node}async searchNodes(t,n){return(await this.callGraph("search",{query:t,type:n})).nodes||[]}}const ge="qwanyx_auth_token",ve="qwanyx_refresh_token";class Ge{static setToken(t){typeof window<"u"&&localStorage.setItem(ge,t)}static getToken(){return typeof window<"u"?localStorage.getItem(ge):null}static clearToken(){typeof window<"u"&&(localStorage.removeItem(ge),localStorage.removeItem(ve))}static setRefreshToken(t){typeof window<"u"&&localStorage.setItem(ve,t)}static getRefreshToken(){return typeof window<"u"?localStorage.getItem(ve):null}static isAuthenticated(){return!!this.getToken()}static getAuthHeader(){const t=this.getToken();return t?{Authorization:`Bearer ${t}`}:{}}}class Ye{constructor(t){he(this,"config");this.config={timeout:3e4,headers:{"Content-Type":"application/json"},...t}}buildQueryString(t){if(!t||Object.keys(t).length===0)return"";const n=new URLSearchParams;Object.entries(t).forEach(([o,l])=>{l!=null&&n.append(o,String(l))});const a=n.toString();return a?`?${a}`:""}async request(t,n={}){const{method:a="GET",headers:o={},body:l,params:c}=n,h=`${this.config.baseUrl}/${t}${this.buildQueryString(c)}`,d={...this.config.headers,...Ge.getAuthHeader(),...o},_={method:a,headers:d};l&&a!=="GET"&&(_.body=JSON.stringify(l));try{const v=new AbortController,O=setTimeout(()=>v.abort(),this.config.timeout),E=await fetch(h,{..._,signal:v.signal});if(clearTimeout(O),!E.ok){const P=await E.json().catch(()=>({message:E.statusText}));throw new Error(P.message||`HTTP ${E.status}`)}return await E.json()}catch(v){throw v instanceof Error?v:new Error("An unexpected error occurred")}}async get(t,n){return this.request(t,{method:"GET",params:n})}async post(t,n,a){return this.request(t,{method:"POST",body:n,params:a})}async put(t,n,a){return this.request(t,{method:"PUT",body:n,params:a})}async patch(t,n,a){return this.request(t,{method:"PATCH",body:n,params:a})}async delete(t,n){return this.request(t,{method:"DELETE",params:n})}setBaseUrl(t){this.config.baseUrl=t}getBaseUrl(){return this.config.baseUrl}}let se=null;function _t(u){return se=new Ye(u),se}function xe(){if(!se)throw new Error("API client not initialized. Call initializeApiClient() first.");return se}function qe(u,t,n={}){const{enabled:a=!0,refetchOnMount:o=!0,onSuccess:l,onError:c}=n,[h,d]=R.useState(null),[_,v]=R.useState(a),[O,E]=R.useState(null),P=R.useCallback(async()=>{if(a){v(!0),E(null);try{const j=await xe().get(u,t);d(j),l==null||l(j)}catch(k){const j=k instanceof Error?k:new Error("Unknown error");E(j),c==null||c(j)}finally{v(!1)}}},[u,JSON.stringify(t),a,l,c]);return R.useEffect(()=>{o&&P()},[P,o]),{data:h,loading:_,error:O,refetch:P}}function Et(u,t="POST",n={}){const{onSuccess:a,onError:o}=n,[l,c]=R.useState(null),[h,d]=R.useState(!1),[_,v]=R.useState(null),O=R.useCallback(async P=>{d(!0),v(null);try{const k=xe();let j;switch(t){case"POST":j=await k.post(u,P);break;case"PUT":j=await k.put(u,P);break;case"PATCH":j=await k.patch(u,P);break;case"DELETE":j=await k.delete(u);break;default:throw new Error(`Unsupported method: ${t}`)}return c(j),a==null||a(j,P),j}catch(k){const j=k instanceof Error?k:new Error("Unknown error");return v(j),o==null||o(j,P),null}finally{d(!1)}},[u,t,a,o]),E=R.useCallback(()=>{c(null),v(null),d(!1)},[]);return{data:l,loading:h,error:_,mutate:O,reset:E}}var ye={exports:{}},Q={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var We;function jt(){if(We)return Q;We=1;var u=R,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(h,d,_){var v,O={},E=null,P=null;_!==void 0&&(E=""+_),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(P=d.ref);for(v in d)a.call(d,v)&&!l.hasOwnProperty(v)&&(O[v]=d[v]);if(h&&h.defaultProps)for(v in d=h.defaultProps,d)O[v]===void 0&&(O[v]=d[v]);return{$$typeof:t,type:h,key:E,ref:P,props:O,_owner:o.current}}return Q.Fragment=n,Q.jsx=c,Q.jsxs=c,Q}var Z={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Be;function St(){return Be||(Be=1,process.env.NODE_ENV!=="production"&&function(){var u=R,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),h=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),k=Symbol.iterator,j="@@iterator";function Y(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[j];return typeof r=="function"?r:null}var F=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(e){{for(var r=arguments.length,s=new Array(r>1?r-1:0),f=1;f<r;f++)s[f-1]=arguments[f];B("error",e,s)}}function B(e,r,s){{var f=F.ReactDebugCurrentFrame,w=f.getStackAddendum();w!==""&&(r+="%s",s=s.concat([w]));var T=s.map(function(x){return String(x)});T.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,T)}}var q=!1,V=!1,p=!1,S=!1,$=!1,y;y=Symbol.for("react.module.reference");function C(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===l||$||e===o||e===_||e===v||S||e===P||q||V||p||typeof e=="object"&&e!==null&&(e.$$typeof===E||e.$$typeof===O||e.$$typeof===c||e.$$typeof===h||e.$$typeof===d||e.$$typeof===y||e.getModuleId!==void 0))}function b(e,r,s){var f=e.displayName;if(f)return f;var w=r.displayName||r.name||"";return w!==""?s+"("+w+")":s}function z(e){return e.displayName||"Context"}function U(e){if(e==null)return null;if(typeof e.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case n:return"Portal";case l:return"Profiler";case o:return"StrictMode";case _:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var r=e;return z(r)+".Consumer";case c:var s=e;return z(s._context)+".Provider";case d:return b(e,e.render,"ForwardRef");case O:var f=e.displayName||null;return f!==null?f:U(e.type)||"Memo";case E:{var w=e,T=w._payload,x=w._init;try{return U(x(T))}catch{return null}}}return null}var m=Object.assign,I=0,G,me,be,we,_e,Ee,je;function Se(){}Se.__reactDisabledLog=!0;function Ve(){{if(I===0){G=console.log,me=console.info,be=console.warn,we=console.error,_e=console.group,Ee=console.groupCollapsed,je=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}}function ze(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:m({},e,{value:G}),info:m({},e,{value:me}),warn:m({},e,{value:be}),error:m({},e,{value:we}),group:m({},e,{value:_e}),groupCollapsed:m({},e,{value:Ee}),groupEnd:m({},e,{value:je})})}I<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=F.ReactCurrentDispatcher,oe;function ee(e,r,s){{if(oe===void 0)try{throw Error()}catch(w){var f=w.stack.trim().match(/\n( *(at )?)/);oe=f&&f[1]||""}return`
|
|
18
|
+
`+oe+e}}var le=!1,te;{var Je=typeof WeakMap=="function"?WeakMap:Map;te=new Je}function Re(e,r){if(!e||le)return"";{var s=te.get(e);if(s!==void 0)return s}var f;le=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var T;T=ie.current,ie.current=null,Ve();try{if(r){var x=function(){throw Error()};if(Object.defineProperty(x.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(x,[])}catch(L){f=L}Reflect.construct(e,[],x)}else{try{x.call()}catch(L){f=L}e.call(x.prototype)}}else{try{throw Error()}catch(L){f=L}e()}}catch(L){if(L&&f&&typeof L.stack=="string"){for(var g=L.stack.split(`
|
|
19
|
+
`),M=f.stack.split(`
|
|
20
|
+
`),N=g.length-1,D=M.length-1;N>=1&&D>=0&&g[N]!==M[D];)D--;for(;N>=1&&D>=0;N--,D--)if(g[N]!==M[D]){if(N!==1||D!==1)do if(N--,D--,D<0||g[N]!==M[D]){var W=`
|
|
21
|
+
`+g[N].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),typeof e=="function"&&te.set(e,W),W}while(N>=1&&D>=0);break}}}finally{le=!1,ie.current=T,ze(),Error.prepareStackTrace=w}var H=e?e.displayName||e.name:"",J=H?ee(H):"";return typeof e=="function"&&te.set(e,J),J}function Ke(e,r,s){return Re(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function re(e,r,s){if(e==null)return"";if(typeof e=="function")return Re(e,He(e));if(typeof e=="string")return ee(e);switch(e){case _:return ee("Suspense");case v:return ee("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ke(e.render);case O:return re(e.type,r,s);case E:{var f=e,w=f._payload,T=f._init;try{return re(T(w),r,s)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,Te={},ke=F.ReactDebugCurrentFrame;function ne(e){if(e){var r=e._owner,s=re(e.type,e._source,r?r.type:null);ke.setExtraStackFrame(s)}else ke.setExtraStackFrame(null)}function Xe(e,r,s,f,w){{var T=Function.call.bind(X);for(var x in e)if(T(e,x)){var g=void 0;try{if(typeof e[x]!="function"){var M=Error((f||"React class")+": "+s+" type `"+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[x]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}g=e[x](r,x,f,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(N){g=N}g&&!(g instanceof Error)&&(ne(w),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",f||"React class",s,x,typeof g),ne(null)),g instanceof Error&&!(g.message in Te)&&(Te[g.message]=!0,ne(w),A("Failed %s type: %s",s,g.message),ne(null))}}}var Qe=Array.isArray;function ce(e){return Qe(e)}function Ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,s=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function et(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function Oe(e){if(et(e))return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),Ce(e)}var Pe=F.ReactCurrentOwner,tt={key:!0,ref:!0,__self:!0,__source:!0},Ne,Ae;function rt(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nt(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function at(e,r){typeof e.ref=="string"&&Pe.current}function st(e,r){{var s=function(){Ne||(Ne=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}}function it(e,r){{var s=function(){Ae||(Ae=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}}var ot=function(e,r,s,f,w,T,x){var g={$$typeof:t,type:e,key:r,ref:s,props:x,_owner:T};return g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(g,"_self",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.defineProperty(g,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g};function lt(e,r,s,f,w){{var T,x={},g=null,M=null;s!==void 0&&(Oe(s),g=""+s),nt(r)&&(Oe(r.key),g=""+r.key),rt(r)&&(M=r.ref,at(r,w));for(T in r)X.call(r,T)&&!tt.hasOwnProperty(T)&&(x[T]=r[T]);if(e&&e.defaultProps){var N=e.defaultProps;for(T in N)x[T]===void 0&&(x[T]=N[T])}if(g||M){var D=typeof e=="function"?e.displayName||e.name||"Unknown":e;g&&st(x,D),M&&it(x,D)}return ot(e,g,M,w,f,Pe.current,x)}}var ue=F.ReactCurrentOwner,De=F.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,s=re(e.type,e._source,r?r.type:null);De.setExtraStackFrame(s)}else De.setExtraStackFrame(null)}var de;de=!1;function fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function $e(){{if(ue.current){var e=U(ue.current.type);if(e)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function ct(e){return""}var Fe={};function ut(e){{var r=$e();if(!r){var s=typeof e=="string"?e:e.displayName||e.name;s&&(r=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+s+">.")}return r}}function Me(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var s=ut(r);if(Fe[s])return;Fe[s]=!0;var f="";e&&e._owner&&e._owner!==ue.current&&(f=" It was passed a child from "+U(e._owner.type)+"."),K(e),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,f),K(null)}}function Ue(e,r){{if(typeof e!="object")return;if(ce(e))for(var s=0;s<e.length;s++){var f=e[s];fe(f)&&Me(f,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var w=Y(e);if(typeof w=="function"&&w!==e.entries)for(var T=w.call(e),x;!(x=T.next()).done;)fe(x.value)&&Me(x.value,r)}}}function dt(e){{var r=e.type;if(r==null||typeof r=="string")return;var s;if(typeof r=="function")s=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===O))s=r.propTypes;else return;if(s){var f=U(r);Xe(s,e.props,"prop",f,e)}else if(r.PropTypes!==void 0&&!de){de=!0;var w=U(r);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ft(e){{for(var r=Object.keys(e.props),s=0;s<r.length;s++){var f=r[s];if(f!=="children"&&f!=="key"){K(e),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),K(null);break}}e.ref!==null&&(K(e),A("Invalid attribute `ref` supplied to `React.Fragment`."),K(null))}}var Ie={};function Le(e,r,s,f,w,T){{var x=C(e);if(!x){var g="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(g+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var M=ct();M?g+=M:g+=$e();var N;e===null?N="null":ce(e)?N="array":e!==void 0&&e.$$typeof===t?(N="<"+(U(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):N=typeof e,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,g)}var D=lt(e,r,s,w,T);if(D==null)return D;if(x){var W=r.children;if(W!==void 0)if(f)if(ce(W)){for(var H=0;H<W.length;H++)Ue(W[H],e);Object.freeze&&Object.freeze(W)}else A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ue(W,e)}if(X.call(r,"key")){var J=U(e),L=Object.keys(r).filter(function(xt){return xt!=="key"}),pe=L.length>0?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}";if(!Ie[J+pe]){var yt=L.length>0?"{"+L.join(": ..., ")+": ...}":"{}";A(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,pe,J,yt,J),Ie[J+pe]=!0}}return e===a?ft(D):dt(D),D}}function pt(e,r,s){return Le(e,r,s,!0)}function ht(e,r,s){return Le(e,r,s,!1)}var gt=ht,vt=pt;Z.Fragment=a,Z.jsx=gt,Z.jsxs=vt}()),Z}process.env.NODE_ENV==="production"?ye.exports=jt():ye.exports=St();var i=ye.exports;class ae{static filter(t,n){return t.filter(n)}static filterBy(t,n,a){return t.filter(o=>o[n]===a)}static filterByFields(t,n){return t.filter(a=>Object.entries(n).every(([o,l])=>a[o]===l))}static sort(t,n,a="asc"){return[...t].sort((o,l)=>{const c=o[n],h=l[n];if(c===h)return 0;let d=0;return c>h&&(d=1),c<h&&(d=-1),a==="asc"?d:-d})}static search(t,n,a){if(!n.trim())return t;const o=n.toLowerCase();return t.filter(l=>a.some(c=>{const h=l[c];return h==null?!1:String(h).toLowerCase().includes(o)}))}static paginate(t,n,a){const o=(n-1)*a,l=o+a;return{data:t.slice(o,l),total:t.length,page:n,totalPages:Math.ceil(t.length/a)}}static groupBy(t,n){return t.reduce((a,o)=>{const l=String(o[n]);return a[l]||(a[l]=[]),a[l].push(o),a},{})}static unique(t,n){const a=t.map(o=>o[n]);return[...new Set(a)]}static countBy(t,n){return t.reduce((a,o)=>{const l=String(o[n]);return a[l]=(a[l]||0)+1,a},{})}static pipe(t,n){return n.reduce((a,o)=>o(a),t)}}function Rt({endpoint:u,params:t,layout:n="list",title:a,emptyMessage:o="No items found",renderItem:l,keyExtractor:c=(j,Y)=>j.id||j._id||String(Y),searchable:h=!1,searchFields:d=[],searchPlaceholder:_="Search...",filters:v=[],pageSize:O=20,onItemClick:E,onRefresh:P,theme:k={}}){const{data:j,loading:Y,error:F,refetch:A}=qe(u,t),[B,q]=R.useState(""),[V,p]=R.useState({}),[S,$]=R.useState(1),y=R.useMemo(()=>{if(!j)return{data:[],total:0,totalPages:0};let m=j;return h&&B&&d.length>0&&(m=ae.search(m,B,d)),Object.keys(V).length>0&&(m=ae.filterByFields(m,V)),ae.paginate(m,S,O)},[j,B,V,S,O,h,d]);R.useEffect(()=>{$(1)},[B,V]);const C=()=>{q(""),p({}),$(1),A(),P==null||P()},b={background:k.background||"#ffffff",cardBackground:k.cardBackground||"#f9fafb",text:k.text||"#111827",textSecondary:k.textSecondary||"#6b7280",border:k.border||"#e5e7eb",primary:k.primary||"#3b82f6"},U=l||(m=>i.jsxs("div",{style:{padding:"16px",cursor:E?"pointer":"default"},children:[i.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:b.text},children:m.title||m.name||m.label||"Untitled"}),m.description&&i.jsx("div",{style:{fontSize:"13px",color:b.textSecondary,marginTop:"4px"},children:m.description})]}));return Y&&!j?i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"48px",color:b.textSecondary},children:"Loading..."}):F?i.jsxs("div",{style:{padding:"24px",textAlign:"center",color:"#ef4444"},children:[i.jsx("div",{style:{fontWeight:500,marginBottom:"8px"},children:"Error"}),i.jsx("div",{style:{fontSize:"14px"},children:F.message}),i.jsx("button",{onClick:C,style:{marginTop:"16px",padding:"8px 16px",background:b.primary,color:"white",border:"none",borderRadius:"6px",cursor:"pointer"},children:"Retry"})]}):i.jsxs("div",{style:{background:b.background,borderRadius:"12px",overflow:"hidden"},children:[(a||h||v.length>0)&&i.jsxs("div",{style:{padding:"16px",borderBottom:`1px solid ${b.border}`},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:h||v.length>0?"12px":"0"},children:[a&&i.jsx("h2",{style:{margin:0,fontSize:"18px",fontWeight:600,color:b.text},children:a}),i.jsx("button",{onClick:C,style:{padding:"6px 12px",background:"transparent",border:`1px solid ${b.border}`,borderRadius:"6px",color:b.textSecondary,cursor:"pointer",fontSize:"13px"},children:"Refresh"})]}),h&&i.jsx("input",{type:"text",placeholder:_,value:B,onChange:m=>q(m.target.value),style:{width:"100%",padding:"8px 12px",border:`1px solid ${b.border}`,borderRadius:"8px",fontSize:"14px",outline:"none"}})]}),i.jsx("div",{style:{display:n==="grid"?"grid":"flex",flexDirection:n==="list"?"column":void 0,gridTemplateColumns:n==="grid"?"repeat(auto-fill, minmax(250px, 1fr))":void 0,gap:n==="list"?"0":"16px",padding:n==="list"?"0":"16px"},children:y.data.length===0?i.jsx("div",{style:{padding:"48px",textAlign:"center",color:b.textSecondary},children:o}):y.data.map((m,I)=>i.jsx("div",{onClick:()=>E==null?void 0:E(m),style:{background:b.cardBackground,borderRadius:n==="list"?"0":"8px",borderBottom:n==="list"?`1px solid ${b.border}`:"none",transition:"all 0.15s ease"},onMouseEnter:G=>{E&&(G.currentTarget.style.background=b.border)},onMouseLeave:G=>{G.currentTarget.style.background=b.cardBackground},children:U(m,I)},c(m,I)))}),y.totalPages>1&&i.jsxs("div",{style:{padding:"16px",borderTop:`1px solid ${b.border}`,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[i.jsxs("div",{style:{fontSize:"13px",color:b.textSecondary},children:["Page ",S," of ",y.totalPages]}),i.jsxs("div",{style:{display:"flex",gap:"8px"},children:[i.jsx("button",{onClick:()=>$(m=>Math.max(1,m-1)),disabled:S===1,style:{padding:"6px 12px",border:`1px solid ${b.border}`,borderRadius:"6px",background:"white",cursor:S===1?"not-allowed":"pointer",opacity:S===1?.5:1},children:"Previous"}),i.jsx("button",{onClick:()=>$(m=>Math.min(y.totalPages,m+1)),disabled:S===y.totalPages,style:{padding:"6px 12px",border:`1px solid ${b.border}`,borderRadius:"6px",background:"white",cursor:S===y.totalPages?"not-allowed":"pointer",opacity:S===y.totalPages?.5:1},children:"Next"})]})]})]})}function Tt({item:u,onClick:t,title:n=c=>c.title||c.name||c.label||"Untitled",subtitle:a=c=>c.description||c.subtitle||"",image:o=c=>c.image||c.thumbnail||c.photo,badge:l=c=>c.badge||c.tag||c.type}){const c=n(u),h=a(u),d=o(u),_=l(u);return i.jsxs("div",{onClick:t,className:`
|
|
31
|
+
flex items-center gap-4 p-4 border-b border-gray-200
|
|
32
|
+
hover:bg-gray-50 transition-colors
|
|
33
|
+
${t?"cursor-pointer":""}
|
|
34
|
+
`,children:[d&&i.jsx("div",{className:"flex-shrink-0",children:i.jsx("img",{src:d,alt:c,className:"w-16 h-16 object-cover rounded-lg"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:"font-medium text-gray-900 truncate",children:c}),_&&i.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full",children:_})]}),h&&i.jsx("p",{className:"text-sm text-gray-600 truncate mt-0.5",children:h})]}),t&&i.jsx("div",{className:"flex-shrink-0 text-gray-400",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})}function kt({item:u,onClose:t,title:n=l=>l.title||l.name||l.label||"Detail",image:a=l=>l.image||l.thumbnail||l.photo,fields:o=[]}){if(!u)return null;const l=n(u),c=a(u);return i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsxs("div",{className:"bg-white rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto shadow-2xl",children:[i.jsxs("div",{className:"sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:l}),t&&i.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),i.jsxs("div",{className:"p-6",children:[c&&i.jsx("div",{className:"mb-6",children:i.jsx("img",{src:c,alt:l,className:"w-full h-64 object-cover rounded-lg"})}),o.length>0&&i.jsx("div",{className:"space-y-4",children:o.map((h,d)=>{const _=h.value(u);return _==null||_===""?null:i.jsxs("div",{children:[i.jsx("div",{className:"text-sm font-medium text-gray-500 mb-1",children:h.label}),i.jsx("div",{className:"text-base text-gray-900",children:typeof _=="object"?JSON.stringify(_,null,2):String(_)})]},d)})}),o.length===0&&i.jsx("pre",{className:"bg-gray-50 p-4 rounded-lg text-sm overflow-x-auto",children:JSON.stringify(u,null,2)})]}),t&&i.jsx("div",{className:"sticky bottom-0 bg-gray-50 border-t border-gray-200 px-6 py-4",children:i.jsx("button",{onClick:t,className:"w-full px-4 py-2 bg-gray-900 text-white rounded-lg hover:bg-gray-800 transition-colors font-medium",children:"Close"})})]})})}const Ct={small:"w-32 h-32",medium:"w-48 h-48",large:"w-64 h-64"};function Ot({nodes:u,cardCount:t=2,minInterval:n=1e3,maxInterval:a=3e3,onCardClick:o,cardSize:l="medium",className:c=""}){const h=Math.min(Math.max(t,1),5),[d,_]=R.useState([]),[v,O]=R.useState([]),[E,P]=R.useState(Array(h).fill(!1)),[k,j]=R.useState(Array(h).fill(!1)),Y=R.useRef([]),F=R.useCallback(p=>{const S=u.filter(y=>!p.includes(y._id));if(S.length===0)return null;const $=Math.floor(Math.random()*S.length);return S[$]},[u]),A=R.useCallback(()=>Math.random()*(a-n)+n,[n,a]);R.useEffect(()=>{if(u.length===0){_([]),O([]);return}const p=[],S=[],$=[];for(let y=0;y<h&&y<u.length;y++){const C=F($);C&&(p.push(C),$.push(C._id))}for(let y=0;y<p.length;y++){const C=[p[y]._id,...p.filter((z,U)=>U!==y).map(z=>z._id)],b=F(C);b?S.push(b):S.push(p[y])}_(p),O(S)},[u,h,F]);const B=R.useCallback(p=>{const S=A(),$=setTimeout(()=>{P(y=>{const C=[...y];return C[p]=!C[p],C}),setTimeout(()=>{j(y=>{const C=[...y];return C[p]=!C[p],C}),setTimeout(()=>{const y=!k[p];y&&_(C=>{const b=[...C];return b[p]=v[p],b}),O(C=>{const b=[...C],U=[(y?v[p]:d[p])._id,...d.filter((I,G)=>G!==p).map(I=>I._id),...C.filter((I,G)=>G!==p).map(I=>I._id)],m=F(U);return m&&(b[p]=m),b}),setTimeout(()=>{B(p)},150)},200)},150)},S);Y.current[p]=$},[A,F,d,v,k]),q=R.useRef(!1);R.useEffect(()=>{if(!(d.length===0||u.length<=1)&&!q.current){q.current=!0;for(let p=0;p<d.length;p++)B(p);return()=>{Y.current.forEach(p=>clearTimeout(p)),Y.current=[],q.current=!1}}},[d.length,u.length]);const V=p=>{o&&o(p)};return u.length===0?i.jsx("div",{className:`flex items-center justify-center p-8 ${c}`,children:i.jsx("p",{className:"text-gray-500",children:"No nodes available"})}):d.length===0?i.jsx("div",{className:`flex items-center justify-center p-8 ${c}`,children:i.jsx("p",{className:"text-gray-500",children:"Loading..."})}):i.jsx("div",{className:`flex gap-4 justify-center items-center flex-wrap ${c}`,children:d.map((p,S)=>{const $=v[S],y=k[S];return i.jsx("div",{className:`relative ${Ct[l]}`,style:{perspective:"1000px"},onClick:()=>V(y?$:p),children:i.jsxs("div",{className:"w-full h-full rounded-lg shadow-lg overflow-hidden cursor-pointer hover:shadow-xl",style:{transform:`rotateY(${E[S]?180:0}deg)`,transition:"transform 0.5s",transformStyle:"preserve-3d"},children:[i.jsx("div",{className:"absolute inset-0 transition-opacity duration-200",style:{opacity:y?0:1},children:i.jsxs("div",{style:{transform:E[S]?"scaleX(-1)":"scaleX(1)",width:"100%",height:"100%"},children:[i.jsx("img",{src:p.data.image,alt:p.title,className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2",children:i.jsx("p",{className:"text-white text-sm font-medium truncate",children:p.title})})]})}),$&&i.jsx("div",{className:"absolute inset-0 transition-opacity duration-200",style:{opacity:y?1:0},children:i.jsxs("div",{style:{transform:E[S]?"scaleX(-1)":"scaleX(1)",width:"100%",height:"100%"},children:[i.jsx("img",{src:$.data.image,alt:$.title,className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2",children:i.jsx("p",{className:"text-white text-sm font-medium truncate",children:$.title})})]})})]})},`slot-${S}`)})})}exports.AnimatedCardFlip=Ot;exports.ApiClient=Ye;exports.AuthManager=Ge;exports.Card=Tt;exports.DataOperations=ae;exports.Detail=kt;exports.GraphClient=wt;exports.Stack=Rt;exports.getApiClient=xe;exports.initializeApiClient=_t;exports.useMutation=Et;exports.useQuery=qe;
|