@obb871001/api-integration-sdk 1.0.28 → 1.0.29

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.
Files changed (3) hide show
  1. package/dist/index.cjs +10 -10
  2. package/dist/index.js +177 -178
  3. package/package.json +4 -3
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("@tanstack/react-query"),T=require("react"),pr=require("axios"),Z=T.createContext(null),je=()=>{const c=T.useContext(Z);if(console.log(c),!c)throw new Error("useApiContext must be used within ApiProvider");return c},yr=()=>{const{client:c}=je();console.log(c);const d=T.useCallback(async v=>{const{mac_address:p="",app_version:o="",anydesk_id:C=""}=v,{data:y}=await c.post("/cash-register/login",{mac_address:p,app_version:o,anydesk_id:C});return y},[c]),R=T.useCallback(async()=>await c.get("/getMemberInfo"),[c]),E=T.useCallback(async()=>{const{data:v}=await c.get("/getGameList");return v},[c]),_=T.useCallback(async()=>{const{data:v}=await c.get("/getNowCurrencyExchange");return v},[c]),P=T.useCallback(async()=>{const{data:v}=await c.get("/getFavoriteGame");return v},[c]);return{machineLoginApi:d,userInfoApi:R,userGameListApi:E,userFavoriteGameApi:P,userCurrencyExchangeApi:_}},gr=()=>{const{userInfoApi:c}=yr(),d=H.useQueries({queries:[{queryKey:["getMemberInfo"],queryFn:async()=>await c(),refetchInterval:5e4}]});console.log(d,"123");const{data:R,isFetching:E,error:_}=d[0]||{};return{data:R,isFetching:E,error:_}};var V={exports:{}},$={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("@tanstack/react-query"),C=require("react"),pr=require("axios"),Z=C.createContext(null),je=()=>{const s=C.useContext(Z);if(!s)throw new Error("useApiContext must be used within ApiProvider");return s};function yr({baseURL:s,getToken:p,timeoutMs:R=15e3,currency:b="TWD",lng:m="tw",onError:w}={}){const v=pr.create({baseURL:s,timeout:R,headers:{"Content-Type":"application/json"}});return v.interceptors.request.use(async c=>{if(c.headers=c.headers||{},p){const f=await p();f&&(c.headers.Authorization=`Bearer ${f}`)}return c.headers.Currency=b,c.headers["currency-code"]=b,c.headers.lang=m,c}),v.interceptors.response.use(c=>c,c=>w?w(c,{instance:v}):Promise.reject(c)),v}const hr=()=>{const{client:s}=je(),p=C.useCallback(async v=>{const{mac_address:c="",app_version:f="",anydesk_id:P=""}=v,{data:y}=await s.post("/cash-register/login",{mac_address:c,app_version:f,anydesk_id:P});return y},[s]),R=C.useCallback(async()=>{if(!s)throw new Error("Axios client not available - make sure you are using ApiProvider");return s.get("/getMemberInfo")},[s]),b=C.useCallback(async()=>{const{data:v}=await s.get("/getGameList");return v},[s]),m=C.useCallback(async()=>{const{data:v}=await s.get("/getNowCurrencyExchange");return v},[s]),w=C.useCallback(async()=>{const{data:v}=await s.get("/getFavoriteGame");return v},[s]);return{machineLoginApi:p,userInfoApi:R,userGameListApi:b,userFavoriteGameApi:w,userCurrencyExchangeApi:m}},gr=()=>{const{userInfoApi:s}=hr(),p=H.useQueries({queries:[{queryKey:["getMemberInfo"],queryFn:async()=>await s(),refetchInterval:5e4}]}),{data:R,isFetching:b,error:m}=p[0]||{};return{data:R,isFetching:b,error:m}};var V={exports:{}},$={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Pe;function hr(){if(Pe)return $;Pe=1;var c=T,d=Symbol.for("react.element"),R=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,_=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function v(p,o,C){var y,w={},x=null,Y=null;C!==void 0&&(x=""+C),o.key!==void 0&&(x=""+o.key),o.ref!==void 0&&(Y=o.ref);for(y in o)E.call(o,y)&&!P.hasOwnProperty(y)&&(w[y]=o[y]);if(p&&p.defaultProps)for(y in o=p.defaultProps,o)w[y]===void 0&&(w[y]=o[y]);return{$$typeof:d,type:p,key:x,ref:Y,props:w,_owner:_.current}}return $.Fragment=R,$.jsx=v,$.jsxs=v,$}var W={};/**
9
+ */var Pe;function br(){if(Pe)return $;Pe=1;var s=C,p=Symbol.for("react.element"),R=Symbol.for("react.fragment"),b=Object.prototype.hasOwnProperty,m=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w={key:!0,ref:!0,__self:!0,__source:!0};function v(c,f,P){var y,T={},x=null,Y=null;P!==void 0&&(x=""+P),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(Y=f.ref);for(y in f)b.call(f,y)&&!w.hasOwnProperty(y)&&(T[y]=f[y]);if(c&&c.defaultProps)for(y in f=c.defaultProps,f)T[y]===void 0&&(T[y]=f[y]);return{$$typeof:p,type:c,key:x,ref:Y,props:T,_owner:m.current}}return $.Fragment=R,$.jsx=v,$.jsxs=v,$}var W={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Oe;function br(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var c=T,d=Symbol.for("react.element"),R=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),p=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),ee=Symbol.iterator,ke="@@iterator";function Ae(e){if(e===null||typeof e!="object")return null;var r=ee&&e[ee]||e[ke];return typeof r=="function"?r:null}var k=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Fe("error",e,t)}}function Fe(e,r,t){{var n=k.ReactDebugCurrentFrame,u=n.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var s=t.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var De=!1,Ie=!1,$e=!1,We=!1,Ye=!1,re;re=Symbol.for("react.module.reference");function Le(e){return!!(typeof e=="string"||typeof e=="function"||e===E||e===P||Ye||e===_||e===C||e===y||We||e===Y||De||Ie||$e||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===w||e.$$typeof===v||e.$$typeof===p||e.$$typeof===o||e.$$typeof===re||e.getModuleId!==void 0))}function Me(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function te(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&g("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 E:return"Fragment";case R:return"Portal";case P:return"Profiler";case _:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p:var r=e;return te(r)+".Consumer";case v:var t=e;return te(t._context)+".Provider";case o:return Me(e,e.render,"ForwardRef");case w:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case x:{var u=e,s=u._payload,i=u._init;try{return O(i(s))}catch{return null}}}return null}var S=Object.assign,D=0,ne,ae,ie,oe,ue,se,ce;function le(){}le.__reactDisabledLog=!0;function Ue(){{if(D===0){ne=console.log,ae=console.info,ie=console.warn,oe=console.error,ue=console.group,se=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}}function qe(){{if(D--,D===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:ne}),info:S({},e,{value:ae}),warn:S({},e,{value:ie}),error:S({},e,{value:oe}),group:S({},e,{value:ue}),groupCollapsed:S({},e,{value:se}),groupEnd:S({},e,{value:ce})})}D<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=k.ReactCurrentDispatcher,J;function L(e,r,t){{if(J===void 0)try{throw Error()}catch(u){var n=u.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
18
- `+J+e}}var B=!1,M;{var Ve=typeof WeakMap=="function"?WeakMap:Map;M=new Ve}function fe(e,r){if(!e||B)return"";{var t=M.get(e);if(t!==void 0)return t}var n;B=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=N.current,N.current=null,Ue();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(b){n=b}Reflect.construct(e,[],i)}else{try{i.call()}catch(b){n=b}e.call(i.prototype)}}else{try{throw Error()}catch(b){n=b}e()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var a=b.stack.split(`
19
- `),h=n.stack.split(`
20
- `),l=a.length-1,f=h.length-1;l>=1&&f>=0&&a[l]!==h[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==h[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==h[f]){var m=`
21
- `+a[l].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,m),m}while(l>=1&&f>=0);break}}}finally{B=!1,N.current=s,qe(),Error.prepareStackTrace=u}var F=e?e.displayName||e.name:"",j=F?L(F):"";return typeof e=="function"&&M.set(e,j),j}function Ne(e,r,t){return fe(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Je(e));if(typeof e=="string")return L(e);switch(e){case C:return L("Suspense");case y:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return Ne(e.render);case w:return U(e.type,r,t);case x:{var n=e,u=n._payload,s=n._init;try{return U(s(u),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,de={},ve=k.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ve.setExtraStackFrame(t)}else ve.setExtraStackFrame(null)}function Be(e,r,t,n,u){{var s=Function.call.bind(I);for(var i in e)if(s(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var h=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}a&&!(a instanceof Error)&&(q(u),g("%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).",n||"React class",t,i,typeof a),q(null)),a instanceof Error&&!(a.message in de)&&(de[a.message]=!0,q(u),g("Failed %s type: %s",t,a.message),q(null))}}}var Ge=Array.isArray;function G(e){return Ge(e)}function Ke(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return pe(e),!1}catch{return!0}}function pe(e){return""+e}function ye(e){if(Qe(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(e)),pe(e)}var ge=k.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},he,be;function Xe(e){if(I.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function He(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){typeof e.ref=="string"&&ge.current}function er(e,r){{var t=function(){he||(he=!0,g("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function rr(e,r){{var t=function(){be||(be=!0,g("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var tr=function(e,r,t,n,u,s,i){var a={$$typeof:d,type:e,key:r,ref:t,props:i,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function nr(e,r,t,n,u){{var s,i={},a=null,h=null;t!==void 0&&(ye(t),a=""+t),He(r)&&(ye(r.key),a=""+r.key),Xe(r)&&(h=r.ref,Ze(r,u));for(s in r)I.call(r,s)&&!ze.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var l=e.defaultProps;for(s in l)i[s]===void 0&&(i[s]=l[s])}if(a||h){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&er(i,f),h&&rr(i,f)}return tr(e,a,h,u,n,ge.current,i)}}var K=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var Q;Q=!1;function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}function _e(){{if(K.current){var e=O(K.current.type);if(e)return`
17
+ */var Oe;function Er(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var s=C,p=Symbol.for("react.element"),R=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),ee=Symbol.iterator,ke="@@iterator";function Ae(e){if(e===null||typeof e!="object")return null;var r=ee&&e[ee]||e[ke];return typeof r=="function"?r:null}var k=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Fe("error",e,t)}}function Fe(e,r,t){{var n=k.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var De=!1,Ie=!1,$e=!1,We=!1,Ye=!1,re;re=Symbol.for("react.module.reference");function Me(e){return!!(typeof e=="string"||typeof e=="function"||e===b||e===w||Ye||e===m||e===P||e===y||We||e===Y||De||Ie||$e||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===T||e.$$typeof===v||e.$$typeof===c||e.$$typeof===f||e.$$typeof===re||e.getModuleId!==void 0))}function Le(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function te(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&h("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 b:return"Fragment";case R:return"Portal";case w:return"Profiler";case m:return"StrictMode";case P:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return te(r)+".Consumer";case v:var t=e;return te(t._context)+".Provider";case f:return Le(e,e.render,"ForwardRef");case T:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case x:{var o=e,u=o._payload,i=o._init;try{return O(i(u))}catch{return null}}}return null}var S=Object.assign,D=0,ne,ae,ie,oe,ue,se,ce;function le(){}le.__reactDisabledLog=!0;function Ue(){{if(D===0){ne=console.log,ae=console.info,ie=console.warn,oe=console.error,ue=console.group,se=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}}function qe(){{if(D--,D===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:ne}),info:S({},e,{value:ae}),warn:S({},e,{value:ie}),error:S({},e,{value:oe}),group:S({},e,{value:ue}),groupCollapsed:S({},e,{value:se}),groupEnd:S({},e,{value:ce})})}D<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=k.ReactCurrentDispatcher,J;function M(e,r,t){{if(J===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
18
+ `+J+e}}var B=!1,L;{var Ve=typeof WeakMap=="function"?WeakMap:Map;L=new Ve}function fe(e,r){if(!e||B)return"";{var t=L.get(e);if(t!==void 0)return t}var n;B=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=N.current,N.current=null,Ue();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(E){n=E}Reflect.construct(e,[],i)}else{try{i.call()}catch(E){n=E}e.call(i.prototype)}}else{try{throw Error()}catch(E){n=E}e()}}catch(E){if(E&&n&&typeof E.stack=="string"){for(var a=E.stack.split(`
19
+ `),g=n.stack.split(`
20
+ `),l=a.length-1,d=g.length-1;l>=1&&d>=0&&a[l]!==g[d];)d--;for(;l>=1&&d>=0;l--,d--)if(a[l]!==g[d]){if(l!==1||d!==1)do if(l--,d--,d<0||a[l]!==g[d]){var _=`
21
+ `+a[l].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,_),_}while(l>=1&&d>=0);break}}}finally{B=!1,N.current=u,qe(),Error.prepareStackTrace=o}var F=e?e.displayName||e.name:"",j=F?M(F):"";return typeof e=="function"&&L.set(e,j),j}function Ne(e,r,t){return fe(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Je(e));if(typeof e=="string")return M(e);switch(e){case P:return M("Suspense");case y:return M("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Ne(e.render);case T:return U(e.type,r,t);case x:{var n=e,o=n._payload,u=n._init;try{return U(u(o),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,de={},ve=k.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ve.setExtraStackFrame(t)}else ve.setExtraStackFrame(null)}function Be(e,r,t,n,o){{var u=Function.call.bind(I);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var g=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}a&&!(a instanceof Error)&&(q(o),h("%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).",n||"React class",t,i,typeof a),q(null)),a instanceof Error&&!(a.message in de)&&(de[a.message]=!0,q(o),h("Failed %s type: %s",t,a.message),q(null))}}}var Ge=Array.isArray;function G(e){return Ge(e)}function Ke(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return pe(e),!1}catch{return!0}}function pe(e){return""+e}function ye(e){if(Qe(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(e)),pe(e)}var he=k.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},ge,be;function Xe(e){if(I.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function He(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){typeof e.ref=="string"&&he.current}function er(e,r){{var t=function(){ge||(ge=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function rr(e,r){{var t=function(){be||(be=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var tr=function(e,r,t,n,o,u,i){var a={$$typeof:p,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function nr(e,r,t,n,o){{var u,i={},a=null,g=null;t!==void 0&&(ye(t),a=""+t),He(r)&&(ye(r.key),a=""+r.key),Xe(r)&&(g=r.ref,Ze(r,o));for(u in r)I.call(r,u)&&!ze.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var l=e.defaultProps;for(u in l)i[u]===void 0&&(i[u]=l[u])}if(a||g){var d=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&er(i,d),g&&rr(i,d)}return tr(e,a,g,o,n,he.current,i)}}var K=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var Q;Q=!1;function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}function me(){{if(K.current){var e=O(K.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function ar(e){return""}var me={};function ir(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
23
+ Check the render method of \``+e+"`."}return""}}function ar(e){return""}var _e={};function ir(e){{var r=me();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
24
 
25
- Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ir(r);if(me[t])return;me[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),A(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ce(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];z(n)&&Re(n,r)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var u=Ae(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),i;!(i=s.next()).done;)z(i.value)&&Re(i.value,r)}}}function or(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===o||r.$$typeof===w))t=r.propTypes;else return;if(t){var n=O(r);Be(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var u=O(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var Te={};function we(e,r,t,n,u,s){{var i=Le(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" 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 h=ar();h?a+=h:a+=_e();var l;e===null?l="null":G(e)?l="array":e!==void 0&&e.$$typeof===d?(l="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var f=nr(e,r,t,u,s);if(f==null)return f;if(i){var m=r.children;if(m!==void 0)if(n)if(G(m)){for(var F=0;F<m.length;F++)Ce(m[F],e);Object.freeze&&Object.freeze(m)}else g("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 Ce(m,e)}if(I.call(r,"key")){var j=O(e),b=Object.keys(r).filter(function(vr){return vr!=="key"}),X=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Te[j+X]){var dr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ir(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),A(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ce(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];z(n)&&Re(n,r)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var o=Ae(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)z(i.value)&&Re(i.value,r)}}}function or(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===T))t=r.propTypes;else return;if(t){var n=O(r);Be(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var o=O(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var we={};function Te(e,r,t,n,o,u){{var i=Me(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" 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 g=ar();g?a+=g:a+=me();var l;e===null?l="null":G(e)?l="array":e!==void 0&&e.$$typeof===p?(l="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var d=nr(e,r,t,o,u);if(d==null)return d;if(i){var _=r.children;if(_!==void 0)if(n)if(G(_)){for(var F=0;F<_.length;F++)Ce(_[F],e);Object.freeze&&Object.freeze(_)}else h("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 Ce(_,e)}if(I.call(r,"key")){var j=O(e),E=Object.keys(r).filter(function(vr){return vr!=="key"}),X=E.length>0?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}";if(!we[j+X]){var dr=E.length>0?"{"+E.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,X,j,dr,j),Te[j+X]=!0}}return e===E?ur(f):or(f),f}}function sr(e,r,t){return we(e,r,t,!0)}function cr(e,r,t){return we(e,r,t,!1)}var lr=cr,fr=sr;W.Fragment=E,W.jsx=lr,W.jsxs=fr})()),W}var xe;function Er(){return xe||(xe=1,process.env.NODE_ENV==="production"?V.exports=hr():V.exports=br()),V.exports}var Se=Er();function _r({baseURL:c,getToken:d,timeoutMs:R=15e3,axiosInstance:E,currency:_,lng:P,onError:v}={}){const p=E??pr.create({baseURL:c,timeout:R,headers:{"Content-Type":"application/json"}});return p.interceptors.request.use(async o=>{if(d){const C=await d();C&&(o.headers=o.headers||{},o.headers.Authorization=`Bearer ${C}`)}return o}),p.interceptors.request.use(o=>{o.headers.Currency=_,o.headers["currency-code"]=_,o.headers.lang=P}),p.interceptors.response.use(o=>o,o=>v?v(o,{instance:p}):Promise.reject(o)),p}function mr({children:c,...d}){console.log(d);const R=T.useMemo(()=>_r(d),[d]),_=T.useMemo(()=>new H.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),[]);return Se.jsx(H.QueryClientProvider,{client:_,children:Se.jsx(Z.Provider,{value:{client:R},children:c})})}exports.ApiCtx=Z;exports.ApiProvider=mr;exports.useApiContext=je;exports.usePeriodicDataUpdater=gr;
30
+ <%s key={someKey} {...props} />`,X,j,dr,j),we[j+X]=!0}}return e===b?ur(d):or(d),d}}function sr(e,r,t){return Te(e,r,t,!0)}function cr(e,r,t){return Te(e,r,t,!1)}var lr=cr,fr=sr;W.Fragment=b,W.jsx=lr,W.jsxs=fr})()),W}var xe;function mr(){return xe||(xe=1,process.env.NODE_ENV==="production"?V.exports=br():V.exports=Er()),V.exports}var Se=mr();function _r({children:s,...p}){const R=C.useMemo(()=>yr(p),[p]),m=C.useMemo(()=>new H.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),[]);return Se.jsx(H.QueryClientProvider,{client:m,children:Se.jsx(Z.Provider,{value:{client:R},children:s})})}exports.ApiCtx=Z;exports.ApiProvider=_r;exports.useApiContext=je;exports.usePeriodicDataUpdater=gr;
package/dist/index.js CHANGED
@@ -1,54 +1,81 @@
1
- import { useQueries as pr, QueryClient as yr, QueryClientProvider as gr } from "@tanstack/react-query";
2
- import Se, { createContext as hr, useContext as mr, useCallback as I, useMemo as we } from "react";
1
+ import { useQueries as pr, QueryClient as yr, QueryClientProvider as hr } from "@tanstack/react-query";
2
+ import Se, { createContext as gr, useContext as mr, useCallback as I, useMemo as we } from "react";
3
3
  import br from "axios";
4
- const je = hr(null), Er = () => {
5
- const c = mr(je);
6
- if (console.log(c), !c)
4
+ const je = gr(null), Er = () => {
5
+ const s = mr(je);
6
+ if (!s)
7
7
  throw new Error("useApiContext must be used within ApiProvider");
8
- return c;
9
- }, _r = () => {
10
- const { client: c } = Er();
11
- console.log(c);
12
- const d = I(
8
+ return s;
9
+ };
10
+ function _r({
11
+ baseURL: s,
12
+ getToken: p,
13
+ timeoutMs: R = 15e3,
14
+ currency: m = "TWD",
15
+ lng: E = "tw",
16
+ onError: C
17
+ } = {}) {
18
+ const v = br.create({
19
+ baseURL: s,
20
+ timeout: R,
21
+ headers: { "Content-Type": "application/json" }
22
+ });
23
+ return v.interceptors.request.use(async (c) => {
24
+ if (c.headers = c.headers || {}, p) {
25
+ const f = await p();
26
+ f && (c.headers.Authorization = `Bearer ${f}`);
27
+ }
28
+ return c.headers.Currency = m, c.headers["currency-code"] = m, c.headers.lang = E, c;
29
+ }), v.interceptors.response.use(
30
+ (c) => c,
31
+ (c) => C ? C(c, { instance: v }) : Promise.reject(c)
32
+ ), v;
33
+ }
34
+ const Rr = () => {
35
+ const { client: s } = Er(), p = I(
13
36
  async (v) => {
14
- const { mac_address: p = "", app_version: o = "", anydesk_id: C = "" } = v, { data: y } = await c.post("/cash-register/login", {
15
- mac_address: p,
16
- app_version: o,
17
- anydesk_id: C
37
+ const { mac_address: c = "", app_version: f = "", anydesk_id: T = "" } = v, { data: y } = await s.post("/cash-register/login", {
38
+ mac_address: c,
39
+ app_version: f,
40
+ anydesk_id: T
18
41
  });
19
42
  return y;
20
43
  },
21
- [c]
22
- ), R = I(async () => await c.get("/getMemberInfo"), [c]), b = I(async () => {
23
- const { data: v } = await c.get("/getGameList");
44
+ [s]
45
+ ), R = I(async () => {
46
+ if (!s)
47
+ throw new Error(
48
+ "Axios client not available - make sure you are using ApiProvider"
49
+ );
50
+ return s.get("/getMemberInfo");
51
+ }, [s]), m = I(async () => {
52
+ const { data: v } = await s.get("/getGameList");
24
53
  return v;
25
- }, [c]), E = I(async () => {
26
- const { data: v } = await c.get("/getNowCurrencyExchange");
54
+ }, [s]), E = I(async () => {
55
+ const { data: v } = await s.get("/getNowCurrencyExchange");
27
56
  return v;
28
- }, [c]), T = I(async () => {
29
- const { data: v } = await c.get("/getFavoriteGame");
57
+ }, [s]), C = I(async () => {
58
+ const { data: v } = await s.get("/getFavoriteGame");
30
59
  return v;
31
- }, [c]);
60
+ }, [s]);
32
61
  return {
33
- machineLoginApi: d,
62
+ machineLoginApi: p,
34
63
  userInfoApi: R,
35
- userGameListApi: b,
36
- userFavoriteGameApi: T,
64
+ userGameListApi: m,
65
+ userFavoriteGameApi: C,
37
66
  userCurrencyExchangeApi: E
38
67
  };
39
68
  }, Sr = () => {
40
- const { userInfoApi: c } = _r(), d = pr({
69
+ const { userInfoApi: s } = Rr(), p = pr({
41
70
  queries: [
42
71
  {
43
72
  queryKey: ["getMemberInfo"],
44
- queryFn: async () => await c(),
73
+ queryFn: async () => await s(),
45
74
  refetchInterval: 5e4
46
75
  }
47
76
  ]
48
- });
49
- console.log(d, "123");
50
- const { data: R, isFetching: b, error: E } = d[0] || {};
51
- return { data: R, isFetching: b, error: E };
77
+ }), { data: R, isFetching: m, error: E } = p[0] || {};
78
+ return { data: R, isFetching: m, error: E };
52
79
  };
53
80
  var q = { exports: {} }, $ = {};
54
81
  /**
@@ -61,16 +88,16 @@ var q = { exports: {} }, $ = {};
61
88
  * LICENSE file in the root directory of this source tree.
62
89
  */
63
90
  var Te;
64
- function Rr() {
91
+ function Cr() {
65
92
  if (Te) return $;
66
93
  Te = 1;
67
- var c = Se, d = Symbol.for("react.element"), R = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, E = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
68
- function v(p, o, C) {
94
+ var s = Se, p = Symbol.for("react.element"), R = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, E = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
95
+ function v(c, f, T) {
69
96
  var y, w = {}, P = null, Y = null;
70
- C !== void 0 && (P = "" + C), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (Y = o.ref);
71
- for (y in o) b.call(o, y) && !T.hasOwnProperty(y) && (w[y] = o[y]);
72
- if (p && p.defaultProps) for (y in o = p.defaultProps, o) w[y] === void 0 && (w[y] = o[y]);
73
- return { $$typeof: d, type: p, key: P, ref: Y, props: w, _owner: E.current };
97
+ T !== void 0 && (P = "" + T), f.key !== void 0 && (P = "" + f.key), f.ref !== void 0 && (Y = f.ref);
98
+ for (y in f) m.call(f, y) && !C.hasOwnProperty(y) && (w[y] = f[y]);
99
+ if (c && c.defaultProps) for (y in f = c.defaultProps, f) w[y] === void 0 && (w[y] = f[y]);
100
+ return { $$typeof: p, type: c, key: P, ref: Y, props: w, _owner: E.current };
74
101
  }
75
102
  return $.Fragment = R, $.jsx = v, $.jsxs = v, $;
76
103
  }
@@ -85,17 +112,17 @@ var W = {};
85
112
  * LICENSE file in the root directory of this source tree.
86
113
  */
87
114
  var Oe;
88
- function Cr() {
115
+ function wr() {
89
116
  return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
90
- var c = Se, d = Symbol.for("react.element"), R = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), p = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), H = Symbol.iterator, ke = "@@iterator";
91
- function Ae(e) {
117
+ var s = Se, p = Symbol.for("react.element"), R = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), H = Symbol.iterator, Ae = "@@iterator";
118
+ function ke(e) {
92
119
  if (e === null || typeof e != "object")
93
120
  return null;
94
- var r = H && e[H] || e[ke];
121
+ var r = H && e[H] || e[Ae];
95
122
  return typeof r == "function" ? r : null;
96
123
  }
97
- var j = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
98
- function g(e) {
124
+ var j = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
125
+ function h(e) {
99
126
  {
100
127
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
101
128
  t[n - 1] = arguments[n];
@@ -104,18 +131,18 @@ function Cr() {
104
131
  }
105
132
  function Fe(e, r, t) {
106
133
  {
107
- var n = j.ReactDebugCurrentFrame, u = n.getStackAddendum();
108
- u !== "" && (r += "%s", t = t.concat([u]));
109
- var s = t.map(function(i) {
134
+ var n = j.ReactDebugCurrentFrame, o = n.getStackAddendum();
135
+ o !== "" && (r += "%s", t = t.concat([o]));
136
+ var u = t.map(function(i) {
110
137
  return String(i);
111
138
  });
112
- s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
139
+ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
113
140
  }
114
141
  }
115
142
  var De = !1, Ie = !1, $e = !1, We = !1, Ye = !1, Z;
116
143
  Z = Symbol.for("react.module.reference");
117
144
  function Le(e) {
118
- return !!(typeof e == "string" || typeof e == "function" || e === b || e === T || Ye || e === E || e === C || e === y || We || e === Y || De || Ie || $e || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === w || e.$$typeof === v || e.$$typeof === p || e.$$typeof === o || // This needs to include all possible module reference object
145
+ return !!(typeof e == "string" || typeof e == "function" || e === m || e === C || Ye || e === E || e === T || e === y || We || e === Y || De || Ie || $e || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === w || e.$$typeof === v || e.$$typeof === c || e.$$typeof === f || // This needs to include all possible module reference object
119
146
  // types supported by any Flight configuration anywhere since
120
147
  // we don't know which Flight build this will end up being used
121
148
  // with.
@@ -125,8 +152,8 @@ function Cr() {
125
152
  var n = e.displayName;
126
153
  if (n)
127
154
  return n;
128
- var u = r.displayName || r.name || "";
129
- return u !== "" ? t + "(" + u + ")" : t;
155
+ var o = r.displayName || r.name || "";
156
+ return o !== "" ? t + "(" + o + ")" : t;
130
157
  }
131
158
  function ee(e) {
132
159
  return e.displayName || "Context";
@@ -134,41 +161,41 @@ function Cr() {
134
161
  function O(e) {
135
162
  if (e == null)
136
163
  return null;
137
- if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
164
+ if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
138
165
  return e.displayName || e.name || null;
139
166
  if (typeof e == "string")
140
167
  return e;
141
168
  switch (e) {
142
- case b:
169
+ case m:
143
170
  return "Fragment";
144
171
  case R:
145
172
  return "Portal";
146
- case T:
173
+ case C:
147
174
  return "Profiler";
148
175
  case E:
149
176
  return "StrictMode";
150
- case C:
177
+ case T:
151
178
  return "Suspense";
152
179
  case y:
153
180
  return "SuspenseList";
154
181
  }
155
182
  if (typeof e == "object")
156
183
  switch (e.$$typeof) {
157
- case p:
184
+ case c:
158
185
  var r = e;
159
186
  return ee(r) + ".Consumer";
160
187
  case v:
161
188
  var t = e;
162
189
  return ee(t._context) + ".Provider";
163
- case o:
190
+ case f:
164
191
  return Me(e, e.render, "ForwardRef");
165
192
  case w:
166
193
  var n = e.displayName || null;
167
194
  return n !== null ? n : O(e.type) || "Memo";
168
195
  case P: {
169
- var u = e, s = u._payload, i = u._init;
196
+ var o = e, u = o._payload, i = o._init;
170
197
  try {
171
- return O(i(s));
198
+ return O(i(u));
172
199
  } catch {
173
200
  return null;
174
201
  }
@@ -235,7 +262,7 @@ function Cr() {
235
262
  })
236
263
  });
237
264
  }
238
- F < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
265
+ F < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
239
266
  }
240
267
  }
241
268
  var N = j.ReactCurrentDispatcher, J;
@@ -244,8 +271,8 @@ function Cr() {
244
271
  if (J === void 0)
245
272
  try {
246
273
  throw Error();
247
- } catch (u) {
248
- var n = u.stack.trim().match(/\n( *(at )?)/);
274
+ } catch (o) {
275
+ var n = o.stack.trim().match(/\n( *(at )?)/);
249
276
  J = n && n[1] || "";
250
277
  }
251
278
  return `
@@ -267,10 +294,10 @@ function Cr() {
267
294
  }
268
295
  var n;
269
296
  B = !0;
270
- var u = Error.prepareStackTrace;
297
+ var o = Error.prepareStackTrace;
271
298
  Error.prepareStackTrace = void 0;
272
- var s;
273
- s = N.current, N.current = null, Ue();
299
+ var u;
300
+ u = N.current, N.current = null, Ue();
274
301
  try {
275
302
  if (r) {
276
303
  var i = function() {
@@ -283,49 +310,49 @@ function Cr() {
283
310
  }), typeof Reflect == "object" && Reflect.construct) {
284
311
  try {
285
312
  Reflect.construct(i, []);
286
- } catch (m) {
287
- n = m;
313
+ } catch (b) {
314
+ n = b;
288
315
  }
289
316
  Reflect.construct(e, [], i);
290
317
  } else {
291
318
  try {
292
319
  i.call();
293
- } catch (m) {
294
- n = m;
320
+ } catch (b) {
321
+ n = b;
295
322
  }
296
323
  e.call(i.prototype);
297
324
  }
298
325
  } else {
299
326
  try {
300
327
  throw Error();
301
- } catch (m) {
302
- n = m;
328
+ } catch (b) {
329
+ n = b;
303
330
  }
304
331
  e();
305
332
  }
306
- } catch (m) {
307
- if (m && n && typeof m.stack == "string") {
308
- for (var a = m.stack.split(`
309
- `), h = n.stack.split(`
310
- `), l = a.length - 1, f = h.length - 1; l >= 1 && f >= 0 && a[l] !== h[f]; )
311
- f--;
312
- for (; l >= 1 && f >= 0; l--, f--)
313
- if (a[l] !== h[f]) {
314
- if (l !== 1 || f !== 1)
333
+ } catch (b) {
334
+ if (b && n && typeof b.stack == "string") {
335
+ for (var a = b.stack.split(`
336
+ `), g = n.stack.split(`
337
+ `), l = a.length - 1, d = g.length - 1; l >= 1 && d >= 0 && a[l] !== g[d]; )
338
+ d--;
339
+ for (; l >= 1 && d >= 0; l--, d--)
340
+ if (a[l] !== g[d]) {
341
+ if (l !== 1 || d !== 1)
315
342
  do
316
- if (l--, f--, f < 0 || a[l] !== h[f]) {
343
+ if (l--, d--, d < 0 || a[l] !== g[d]) {
317
344
  var _ = `
318
345
  ` + a[l].replace(" at new ", " at ");
319
346
  return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, _), _;
320
347
  }
321
- while (l >= 1 && f >= 0);
348
+ while (l >= 1 && d >= 0);
322
349
  break;
323
350
  }
324
351
  }
325
352
  } finally {
326
- B = !1, N.current = s, Ve(), Error.prepareStackTrace = u;
353
+ B = !1, N.current = u, Ve(), Error.prepareStackTrace = o;
327
354
  }
328
- var A = e ? e.displayName || e.name : "", S = A ? L(A) : "";
355
+ var k = e ? e.displayName || e.name : "", S = k ? L(k) : "";
329
356
  return typeof e == "function" && M.set(e, S), S;
330
357
  }
331
358
  function Ne(e, r, t) {
@@ -343,21 +370,21 @@ function Cr() {
343
370
  if (typeof e == "string")
344
371
  return L(e);
345
372
  switch (e) {
346
- case C:
373
+ case T:
347
374
  return L("Suspense");
348
375
  case y:
349
376
  return L("SuspenseList");
350
377
  }
351
378
  if (typeof e == "object")
352
379
  switch (e.$$typeof) {
353
- case o:
380
+ case f:
354
381
  return Ne(e.render);
355
382
  case w:
356
383
  return U(e.type, r, t);
357
384
  case P: {
358
- var n = e, u = n._payload, s = n._init;
385
+ var n = e, o = n._payload, u = n._init;
359
386
  try {
360
- return U(s(u), r, t);
387
+ return U(u(o), r, t);
361
388
  } catch {
362
389
  }
363
390
  }
@@ -372,22 +399,22 @@ function Cr() {
372
399
  } else
373
400
  fe.setExtraStackFrame(null);
374
401
  }
375
- function Be(e, r, t, n, u) {
402
+ function Be(e, r, t, n, o) {
376
403
  {
377
- var s = Function.call.bind(D);
404
+ var u = Function.call.bind(D);
378
405
  for (var i in e)
379
- if (s(e, i)) {
406
+ if (u(e, i)) {
380
407
  var a = void 0;
381
408
  try {
382
409
  if (typeof e[i] != "function") {
383
- var h = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
384
- throw h.name = "Invariant Violation", h;
410
+ var g = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
411
+ throw g.name = "Invariant Violation", g;
385
412
  }
386
413
  a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
387
414
  } catch (l) {
388
415
  a = l;
389
416
  }
390
- a && !(a instanceof Error) && (V(u), g("%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).", n || "React class", t, i, typeof a), V(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, V(u), g("Failed %s type: %s", t, a.message), V(null));
417
+ a && !(a instanceof Error) && (V(o), h("%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).", n || "React class", t, i, typeof a), V(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, V(o), h("Failed %s type: %s", t, a.message), V(null));
391
418
  }
392
419
  }
393
420
  }
@@ -413,14 +440,14 @@ function Cr() {
413
440
  }
414
441
  function ve(e) {
415
442
  if (ze(e))
416
- return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), de(e);
443
+ return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), de(e);
417
444
  }
418
445
  var pe = j.ReactCurrentOwner, Qe = {
419
446
  key: !0,
420
447
  ref: !0,
421
448
  __self: !0,
422
449
  __source: !0
423
- }, ye, ge;
450
+ }, ye, he;
424
451
  function Xe(e) {
425
452
  if (D.call(e, "ref")) {
426
453
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
@@ -443,7 +470,7 @@ function Cr() {
443
470
  function er(e, r) {
444
471
  {
445
472
  var t = function() {
446
- ye || (ye = !0, g("%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));
473
+ ye || (ye = !0, h("%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));
447
474
  };
448
475
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
449
476
  get: t,
@@ -454,7 +481,7 @@ function Cr() {
454
481
  function rr(e, r) {
455
482
  {
456
483
  var t = function() {
457
- ge || (ge = !0, g("%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));
484
+ he || (he = !0, h("%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));
458
485
  };
459
486
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
460
487
  get: t,
@@ -462,17 +489,17 @@ function Cr() {
462
489
  });
463
490
  }
464
491
  }
465
- var tr = function(e, r, t, n, u, s, i) {
492
+ var tr = function(e, r, t, n, o, u, i) {
466
493
  var a = {
467
494
  // This tag allows us to uniquely identify this as a React Element
468
- $$typeof: d,
495
+ $$typeof: p,
469
496
  // Built-in properties that belong on the element
470
497
  type: e,
471
498
  key: r,
472
499
  ref: t,
473
500
  props: i,
474
501
  // Record the component responsible for creating this element.
475
- _owner: s
502
+ _owner: u
476
503
  };
477
504
  return a._store = {}, Object.defineProperty(a._store, "validated", {
478
505
  configurable: !1,
@@ -488,39 +515,39 @@ function Cr() {
488
515
  configurable: !1,
489
516
  enumerable: !1,
490
517
  writable: !1,
491
- value: u
518
+ value: o
492
519
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
493
520
  };
494
- function nr(e, r, t, n, u) {
521
+ function nr(e, r, t, n, o) {
495
522
  {
496
- var s, i = {}, a = null, h = null;
497
- t !== void 0 && (ve(t), a = "" + t), He(r) && (ve(r.key), a = "" + r.key), Xe(r) && (h = r.ref, Ze(r, u));
498
- for (s in r)
499
- D.call(r, s) && !Qe.hasOwnProperty(s) && (i[s] = r[s]);
523
+ var u, i = {}, a = null, g = null;
524
+ t !== void 0 && (ve(t), a = "" + t), He(r) && (ve(r.key), a = "" + r.key), Xe(r) && (g = r.ref, Ze(r, o));
525
+ for (u in r)
526
+ D.call(r, u) && !Qe.hasOwnProperty(u) && (i[u] = r[u]);
500
527
  if (e && e.defaultProps) {
501
528
  var l = e.defaultProps;
502
- for (s in l)
503
- i[s] === void 0 && (i[s] = l[s]);
529
+ for (u in l)
530
+ i[u] === void 0 && (i[u] = l[u]);
504
531
  }
505
- if (a || h) {
506
- var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
507
- a && er(i, f), h && rr(i, f);
532
+ if (a || g) {
533
+ var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
534
+ a && er(i, d), g && rr(i, d);
508
535
  }
509
- return tr(e, a, h, u, n, pe.current, i);
536
+ return tr(e, a, g, o, n, pe.current, i);
510
537
  }
511
538
  }
512
- var K = j.ReactCurrentOwner, he = j.ReactDebugCurrentFrame;
513
- function k(e) {
539
+ var K = j.ReactCurrentOwner, ge = j.ReactDebugCurrentFrame;
540
+ function A(e) {
514
541
  if (e) {
515
542
  var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
516
- he.setExtraStackFrame(t);
543
+ ge.setExtraStackFrame(t);
517
544
  } else
518
- he.setExtraStackFrame(null);
545
+ ge.setExtraStackFrame(null);
519
546
  }
520
547
  var z;
521
548
  z = !1;
522
549
  function Q(e) {
523
- return typeof e == "object" && e !== null && e.$$typeof === d;
550
+ return typeof e == "object" && e !== null && e.$$typeof === p;
524
551
  }
525
552
  function me() {
526
553
  {
@@ -560,7 +587,7 @@ Check the top-level render call using <` + t + ">.");
560
587
  return;
561
588
  be[t] = !0;
562
589
  var n = "";
563
- e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + O(e._owner.type) + "."), k(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), k(null);
590
+ e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + O(e._owner.type) + "."), A(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
564
591
  }
565
592
  }
566
593
  function _e(e, r) {
@@ -575,9 +602,9 @@ Check the top-level render call using <` + t + ">.");
575
602
  else if (Q(e))
576
603
  e._store && (e._store.validated = !0);
577
604
  else if (e) {
578
- var u = Ae(e);
579
- if (typeof u == "function" && u !== e.entries)
580
- for (var s = u.call(e), i; !(i = s.next()).done; )
605
+ var o = ke(e);
606
+ if (typeof o == "function" && o !== e.entries)
607
+ for (var u = o.call(e), i; !(i = u.next()).done; )
581
608
  Q(i.value) && Ee(i.value, r);
582
609
  }
583
610
  }
@@ -590,7 +617,7 @@ Check the top-level render call using <` + t + ">.");
590
617
  var t;
591
618
  if (typeof r == "function")
592
619
  t = r.propTypes;
593
- else if (typeof r == "object" && (r.$$typeof === o || // Note: Memo only checks outer props here.
620
+ else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
594
621
  // Inner props are checked in the reconciler.
595
622
  r.$$typeof === w))
596
623
  t = r.propTypes;
@@ -601,10 +628,10 @@ Check the top-level render call using <` + t + ">.");
601
628
  Be(t, e.props, "prop", n, e);
602
629
  } else if (r.PropTypes !== void 0 && !z) {
603
630
  z = !0;
604
- var u = O(r);
605
- g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
631
+ var o = O(r);
632
+ h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
606
633
  }
607
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
634
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
608
635
  }
609
636
  }
610
637
  function ur(e) {
@@ -612,48 +639,48 @@ Check the top-level render call using <` + t + ">.");
612
639
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
613
640
  var n = r[t];
614
641
  if (n !== "children" && n !== "key") {
615
- k(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
642
+ A(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
616
643
  break;
617
644
  }
618
645
  }
619
- e.ref !== null && (k(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
646
+ e.ref !== null && (A(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
620
647
  }
621
648
  }
622
649
  var Re = {};
623
- function Ce(e, r, t, n, u, s) {
650
+ function Ce(e, r, t, n, o, u) {
624
651
  {
625
652
  var i = Le(e);
626
653
  if (!i) {
627
654
  var a = "";
628
655
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
629
- var h = ar();
630
- h ? a += h : a += me();
656
+ var g = ar();
657
+ g ? a += g : a += me();
631
658
  var l;
632
- e === null ? l = "null" : G(e) ? l = "array" : e !== void 0 && e.$$typeof === d ? (l = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
659
+ e === null ? l = "null" : G(e) ? l = "array" : e !== void 0 && e.$$typeof === p ? (l = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
633
660
  }
634
- var f = nr(e, r, t, u, s);
635
- if (f == null)
636
- return f;
661
+ var d = nr(e, r, t, o, u);
662
+ if (d == null)
663
+ return d;
637
664
  if (i) {
638
665
  var _ = r.children;
639
666
  if (_ !== void 0)
640
667
  if (n)
641
668
  if (G(_)) {
642
- for (var A = 0; A < _.length; A++)
643
- _e(_[A], e);
669
+ for (var k = 0; k < _.length; k++)
670
+ _e(_[k], e);
644
671
  Object.freeze && Object.freeze(_);
645
672
  } else
646
- g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
673
+ h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
647
674
  else
648
675
  _e(_, e);
649
676
  }
650
677
  if (D.call(r, "key")) {
651
- var S = O(e), m = Object.keys(r).filter(function(vr) {
678
+ var S = O(e), b = Object.keys(r).filter(function(vr) {
652
679
  return vr !== "key";
653
- }), X = m.length > 0 ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}";
680
+ }), X = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
654
681
  if (!Re[S + X]) {
655
- var dr = m.length > 0 ? "{" + m.join(": ..., ") + ": ...}" : "{}";
656
- g(`A props object containing a "key" prop is being spread into JSX:
682
+ var dr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
683
+ h(`A props object containing a "key" prop is being spread into JSX:
657
684
  let props = %s;
658
685
  <%s {...props} />
659
686
  React keys must be passed directly to JSX without using spread:
@@ -661,7 +688,7 @@ React keys must be passed directly to JSX without using spread:
661
688
  <%s key={someKey} {...props} />`, X, S, dr, S), Re[S + X] = !0;
662
689
  }
663
690
  }
664
- return e === b ? ur(f) : or(f), f;
691
+ return e === m ? ur(d) : or(d), d;
665
692
  }
666
693
  }
667
694
  function sr(e, r, t) {
@@ -671,44 +698,16 @@ React keys must be passed directly to JSX without using spread:
671
698
  return Ce(e, r, t, !1);
672
699
  }
673
700
  var lr = cr, fr = sr;
674
- W.Fragment = b, W.jsx = lr, W.jsxs = fr;
701
+ W.Fragment = m, W.jsx = lr, W.jsxs = fr;
675
702
  })()), W;
676
703
  }
677
704
  var Pe;
678
- function wr() {
679
- return Pe || (Pe = 1, process.env.NODE_ENV === "production" ? q.exports = Rr() : q.exports = Cr()), q.exports;
680
- }
681
- var xe = wr();
682
- function Tr({
683
- baseURL: c,
684
- getToken: d,
685
- timeoutMs: R = 15e3,
686
- axiosInstance: b,
687
- currency: E,
688
- lng: T,
689
- onError: v
690
- } = {}) {
691
- const p = b ?? br.create({
692
- baseURL: c,
693
- timeout: R,
694
- headers: { "Content-Type": "application/json" }
695
- });
696
- return p.interceptors.request.use(async (o) => {
697
- if (d) {
698
- const C = await d();
699
- C && (o.headers = o.headers || {}, o.headers.Authorization = `Bearer ${C}`);
700
- }
701
- return o;
702
- }), p.interceptors.request.use((o) => {
703
- o.headers.Currency = E, o.headers["currency-code"] = E, o.headers.lang = T;
704
- }), p.interceptors.response.use(
705
- (o) => o,
706
- (o) => v ? v(o, { instance: p }) : Promise.reject(o)
707
- ), p;
705
+ function Tr() {
706
+ return Pe || (Pe = 1, process.env.NODE_ENV === "production" ? q.exports = Cr() : q.exports = wr()), q.exports;
708
707
  }
709
- function jr({ children: c, ...d }) {
710
- console.log(d);
711
- const R = we(() => Tr(d), [d]), E = we(
708
+ var xe = Tr();
709
+ function jr({ children: s, ...p }) {
710
+ const R = we(() => _r(p), [p]), E = we(
712
711
  () => new yr({
713
712
  defaultOptions: {
714
713
  queries: {
@@ -719,7 +718,7 @@ function jr({ children: c, ...d }) {
719
718
  }),
720
719
  []
721
720
  );
722
- return /* @__PURE__ */ xe.jsx(gr, { client: E, children: /* @__PURE__ */ xe.jsx(je.Provider, { value: { client: R }, children: c }) });
721
+ return /* @__PURE__ */ xe.jsx(hr, { client: E, children: /* @__PURE__ */ xe.jsx(je.Provider, { value: { client: R }, children: s }) });
723
722
  }
724
723
  export {
725
724
  je as ApiCtx,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@obb871001/api-integration-sdk",
3
3
  "private": false,
4
- "version": "1.0.28",
4
+ "version": "1.0.29",
5
5
  "description": "集成API",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
@@ -17,7 +17,8 @@
17
17
  "README.md"
18
18
  ],
19
19
  "scripts": {
20
- "dev": "vite",
20
+ "dev": "vite --mode development",
21
+ "dev:app": "vite dev --open src/App.jsx",
21
22
  "build": "vite build",
22
23
  "build:lib": "vite build --mode lib",
23
24
  "lint": "eslint .",
@@ -50,7 +51,7 @@
50
51
  "@tanstack/react-query": ">=4.0.0"
51
52
  },
52
53
  "dependencies": {
53
- "axios": "^1.12.2",
54
+ "axios": "^1.4.0",
54
55
  "lodash": "^4.17.21"
55
56
  },
56
57
  "devDependencies": {