@sri-xml-viewer/react 1.0.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/dist/index.cjs +30 -0
- package/dist/index.js +670 -0
- package/package.json +37 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("react"),Z=require("@sri-xml-viewer/core");var Q={exports:{}},W={};/**
|
|
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 je;function fr(){if(je)return W;je=1;var g=Y,C=Symbol.for("react.element"),E=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,m=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function T(y,l,w){var p,R={},j=null,V=null;w!==void 0&&(j=""+w),l.key!==void 0&&(j=""+l.key),l.ref!==void 0&&(V=l.ref);for(p in l)_.call(l,p)&&!S.hasOwnProperty(p)&&(R[p]=l[p]);if(y&&y.defaultProps)for(p in l=y.defaultProps,l)R[p]===void 0&&(R[p]=l[p]);return{$$typeof:C,type:y,key:j,ref:V,props:R,_owner:m.current}}return W.Fragment=E,W.jsx=T,W.jsxs=T,W}var $={};/**
|
|
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 xe;function dr(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&function(){var g=Y,C=Symbol.for("react.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),y=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),ee=Symbol.iterator,Pe="@@iterator";function Ce(e){if(e===null||typeof e!="object")return null;var r=ee&&e[ee]||e[Pe];return typeof r=="function"?r:null}var k=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];we("error",e,t)}}function we(e,r,t){{var n=k.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var ke=!1,De=!1,Fe=!1,Ae=!1,Ie=!1,re;re=Symbol.for("react.module.reference");function We(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===S||Ie||e===m||e===w||e===p||Ae||e===V||ke||De||Fe||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===R||e.$$typeof===T||e.$$typeof===y||e.$$typeof===l||e.$$typeof===re||e.getModuleId!==void 0))}function $e(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function te(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&f("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 _:return"Fragment";case E:return"Portal";case S:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return te(r)+".Consumer";case T:var t=e;return te(t._context)+".Provider";case l:return $e(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case j:{var i=e,u=i._payload,o=i._init;try{return O(o(u))}catch{return null}}}return null}var x=Object.assign,A=0,ne,ae,oe,ie,ue,se,le;function ce(){}ce.__reactDisabledLog=!0;function Ye(){{if(A===0){ne=console.log,ae=console.info,oe=console.warn,ie=console.error,ue=console.group,se=console.groupCollapsed,le=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}}function Ve(){{if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:ne}),info:x({},e,{value:ae}),warn:x({},e,{value:oe}),error:x({},e,{value:ie}),group:x({},e,{value:ue}),groupCollapsed:x({},e,{value:se}),groupEnd:x({},e,{value:le})})}A<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=k.ReactCurrentDispatcher,X;function L(e,r,t){{if(X===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);X=n&&n[1]||""}return`
|
|
18
|
+
`+X+e}}var z=!1,M;{var Le=typeof WeakMap=="function"?WeakMap:Map;M=new Le}function fe(e,r){if(!e||z)return"";{var t=M.get(e);if(t!==void 0)return t}var n;z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,Ye();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(v){n=v}Reflect.construct(e,[],o)}else{try{o.call()}catch(v){n=v}e.call(o.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
19
|
+
`),d=n.stack.split(`
|
|
20
|
+
`),s=a.length-1,c=d.length-1;s>=1&&c>=0&&a[s]!==d[c];)c--;for(;s>=1&&c>=0;s--,c--)if(a[s]!==d[c]){if(s!==1||c!==1)do if(s--,c--,c<0||a[s]!==d[c]){var h=`
|
|
21
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,h),h}while(s>=1&&c>=0);break}}}finally{z=!1,q.current=u,Ve(),Error.prepareStackTrace=i}var F=e?e.displayName||e.name:"",P=F?L(F):"";return typeof e=="function"&&M.set(e,P),P}function Me(e,r,t){return fe(e,!1)}function Ue(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,Ue(e));if(typeof e=="string")return L(e);switch(e){case w:return L("Suspense");case p:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Me(e.render);case R:return U(e.type,r,t);case j:{var n=e,i=n._payload,u=n._init;try{return U(u(i),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,de={},ve=k.ReactDebugCurrentFrame;function N(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 Ne(e,r,t,n,i){{var u=Function.call.bind(I);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var d=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(N(i),f("%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,o,typeof a),N(null)),a instanceof Error&&!(a.message in de)&&(de[a.message]=!0,N(i),f("Failed %s type: %s",t,a.message),N(null))}}}var qe=Array.isArray;function B(e){return qe(e)}function Xe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ze(e){try{return pe(e),!1}catch{return!0}}function pe(e){return""+e}function ge(e){if(ze(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),pe(e)}var he=k.ReactCurrentOwner,Be={key:!0,ref:!0,__self:!0,__source:!0},be,ye;function Je(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 Ke(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 Ge(e,r){typeof e.ref=="string"&&he.current}function He(e,r){{var t=function(){be||(be=!0,f("%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 Ze(e,r){{var t=function(){ye||(ye=!0,f("%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 Qe=function(e,r,t,n,i,u,o){var a={$$typeof:C,type:e,key:r,ref:t,props:o,_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:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function er(e,r,t,n,i){{var u,o={},a=null,d=null;t!==void 0&&(ge(t),a=""+t),Ke(r)&&(ge(r.key),a=""+r.key),Je(r)&&(d=r.ref,Ge(r,i));for(u in r)I.call(r,u)&&!Be.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||d){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&He(o,c),d&&Ze(o,c)}return Qe(e,a,d,i,n,he.current,o)}}var J=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function D(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 K;K=!1;function G(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}function Re(){{if(J.current){var e=O(J.current.type);if(e)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function rr(e){return""}var _e={};function tr(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function me(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==J.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),D(e),f('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),D(null)}}function Te(e,r){{if(typeof e!="object")return;if(B(e))for(var t=0;t<e.length;t++){var n=e[t];G(n)&&me(n,r)}else if(G(e))e._store&&(e._store.validated=!0);else if(e){var i=Ce(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)G(o.value)&&me(o.value,r)}}}function nr(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===l||r.$$typeof===R))t=r.propTypes;else return;if(t){var n=O(r);Ne(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!K){K=!0;var i=O(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){D(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),D(null);break}}e.ref!==null&&(D(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}var Oe={};function Se(e,r,t,n,i,u){{var o=We(e);if(!o){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 d=rr();d?a+=d:a+=Re();var s;e===null?s="null":B(e)?s="array":e!==void 0&&e.$$typeof===C?(s="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var c=er(e,r,t,i,u);if(c==null)return c;if(o){var h=r.children;if(h!==void 0)if(n)if(B(h)){for(var F=0;F<h.length;F++)Te(h[F],e);Object.freeze&&Object.freeze(h)}else f("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 Te(h,e)}if(I.call(r,"key")){var P=O(e),v=Object.keys(r).filter(function(cr){return cr!=="key"}),H=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!Oe[P+H]){var lr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";f(`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} />`,H,P,lr,P),Oe[P+H]=!0}}return e===_?ar(c):nr(c),c}}function or(e,r,t){return Se(e,r,t,!0)}function ir(e,r,t){return Se(e,r,t,!1)}var ur=ir,sr=or;$.Fragment=_,$.jsx=ur,$.jsxs=sr}()),$}process.env.NODE_ENV==="production"?Q.exports=fr():Q.exports=dr();var b=Q.exports;const vr=({xml:g,logoUrl:C})=>{var T,y;const[E,_]=Y.useState(null),[m,S]=Y.useState("");return Y.useEffect(()=>{if(g)try{const l=Z.getFullInvoiceDataFromXml(g);_(l),S("")}catch(l){S(l.message||"Error al procesar el XML"),console.error(l)}},[g]),b.jsxs("div",{style:{padding:"16px",border:"1px solid #ccc",borderRadius:"4px",backgroundColor:"#fff"},children:[b.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:"bold"},children:"Visor XML (React)"}),m&&b.jsx("div",{style:{color:"red",fontWeight:"bold"},children:m}),E&&!m&&b.jsxs("div",{style:{fontSize:"14px"},children:[b.jsxs("p",{children:[b.jsx("strong",{children:"Clave de Acceso:"})," ",E.accessKey]}),b.jsxs("p",{children:[b.jsx("strong",{children:"Fecha de Emisión:"})," ",E.emissionDate]}),b.jsxs("p",{children:[b.jsx("strong",{children:"RUC Emisor:"})," ",(T=E.infoTributaria)==null?void 0:T.ruc]}),b.jsxs("p",{children:[b.jsx("strong",{children:"Razón Social:"})," ",(y=E.infoTributaria)==null?void 0:y.razonSocial]})]})]})};exports.VisorXml=vr;Object.keys(Z).forEach(g=>{g!=="default"&&!Object.prototype.hasOwnProperty.call(exports,g)&&Object.defineProperty(exports,g,{enumerable:!0,get:()=>Z[g]})});
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
import je, { useState as xe, useEffect as fr } from "react";
|
|
2
|
+
import { getFullInvoiceDataFromXml as dr } from "@sri-xml-viewer/core";
|
|
3
|
+
export * from "@sri-xml-viewer/core";
|
|
4
|
+
var H = { exports: {} }, W = {};
|
|
5
|
+
/**
|
|
6
|
+
* @license React
|
|
7
|
+
* react-jsx-runtime.production.min.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var Se;
|
|
15
|
+
function vr() {
|
|
16
|
+
if (Se) return W;
|
|
17
|
+
Se = 1;
|
|
18
|
+
var x = je, P = Symbol.for("react.element"), y = Symbol.for("react.fragment"), R = Object.prototype.hasOwnProperty, _ = x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
+
function m(b, l, w) {
|
|
20
|
+
var p, E = {}, O = null, Y = null;
|
|
21
|
+
w !== void 0 && (O = "" + w), l.key !== void 0 && (O = "" + l.key), l.ref !== void 0 && (Y = l.ref);
|
|
22
|
+
for (p in l) R.call(l, p) && !S.hasOwnProperty(p) && (E[p] = l[p]);
|
|
23
|
+
if (b && b.defaultProps) for (p in l = b.defaultProps, l) E[p] === void 0 && (E[p] = l[p]);
|
|
24
|
+
return { $$typeof: P, type: b, key: O, ref: Y, props: E, _owner: _.current };
|
|
25
|
+
}
|
|
26
|
+
return W.Fragment = y, W.jsx = m, W.jsxs = m, W;
|
|
27
|
+
}
|
|
28
|
+
var $ = {};
|
|
29
|
+
/**
|
|
30
|
+
* @license React
|
|
31
|
+
* react-jsx-runtime.development.js
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/
|
|
38
|
+
var Oe;
|
|
39
|
+
function pr() {
|
|
40
|
+
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
41
|
+
var x = je, P = Symbol.for("react.element"), y = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), b = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Z = Symbol.iterator, Ce = "@@iterator";
|
|
42
|
+
function Pe(e) {
|
|
43
|
+
if (e === null || typeof e != "object")
|
|
44
|
+
return null;
|
|
45
|
+
var r = Z && e[Z] || e[Ce];
|
|
46
|
+
return typeof r == "function" ? r : null;
|
|
47
|
+
}
|
|
48
|
+
var k = x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
49
|
+
function f(e) {
|
|
50
|
+
{
|
|
51
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
52
|
+
t[n - 1] = arguments[n];
|
|
53
|
+
we("error", e, t);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function we(e, r, t) {
|
|
57
|
+
{
|
|
58
|
+
var n = k.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
59
|
+
i !== "" && (r += "%s", t = t.concat([i]));
|
|
60
|
+
var u = t.map(function(o) {
|
|
61
|
+
return String(o);
|
|
62
|
+
});
|
|
63
|
+
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
var ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Q;
|
|
67
|
+
Q = Symbol.for("react.module.reference");
|
|
68
|
+
function We(e) {
|
|
69
|
+
return !!(typeof e == "string" || typeof e == "function" || e === R || e === S || Ie || e === _ || e === w || e === p || Ae || e === Y || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === E || e.$$typeof === m || e.$$typeof === b || e.$$typeof === l || // This needs to include all possible module reference object
|
|
70
|
+
// types supported by any Flight configuration anywhere since
|
|
71
|
+
// we don't know which Flight build this will end up being used
|
|
72
|
+
// with.
|
|
73
|
+
e.$$typeof === Q || e.getModuleId !== void 0));
|
|
74
|
+
}
|
|
75
|
+
function $e(e, r, t) {
|
|
76
|
+
var n = e.displayName;
|
|
77
|
+
if (n)
|
|
78
|
+
return n;
|
|
79
|
+
var i = r.displayName || r.name || "";
|
|
80
|
+
return i !== "" ? t + "(" + i + ")" : t;
|
|
81
|
+
}
|
|
82
|
+
function ee(e) {
|
|
83
|
+
return e.displayName || "Context";
|
|
84
|
+
}
|
|
85
|
+
function T(e) {
|
|
86
|
+
if (e == null)
|
|
87
|
+
return null;
|
|
88
|
+
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
89
|
+
return e.displayName || e.name || null;
|
|
90
|
+
if (typeof e == "string")
|
|
91
|
+
return e;
|
|
92
|
+
switch (e) {
|
|
93
|
+
case R:
|
|
94
|
+
return "Fragment";
|
|
95
|
+
case y:
|
|
96
|
+
return "Portal";
|
|
97
|
+
case S:
|
|
98
|
+
return "Profiler";
|
|
99
|
+
case _:
|
|
100
|
+
return "StrictMode";
|
|
101
|
+
case w:
|
|
102
|
+
return "Suspense";
|
|
103
|
+
case p:
|
|
104
|
+
return "SuspenseList";
|
|
105
|
+
}
|
|
106
|
+
if (typeof e == "object")
|
|
107
|
+
switch (e.$$typeof) {
|
|
108
|
+
case b:
|
|
109
|
+
var r = e;
|
|
110
|
+
return ee(r) + ".Consumer";
|
|
111
|
+
case m:
|
|
112
|
+
var t = e;
|
|
113
|
+
return ee(t._context) + ".Provider";
|
|
114
|
+
case l:
|
|
115
|
+
return $e(e, e.render, "ForwardRef");
|
|
116
|
+
case E:
|
|
117
|
+
var n = e.displayName || null;
|
|
118
|
+
return n !== null ? n : T(e.type) || "Memo";
|
|
119
|
+
case O: {
|
|
120
|
+
var i = e, u = i._payload, o = i._init;
|
|
121
|
+
try {
|
|
122
|
+
return T(o(u));
|
|
123
|
+
} catch {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
var j = Object.assign, A = 0, re, te, ne, ae, oe, ie, ue;
|
|
131
|
+
function se() {
|
|
132
|
+
}
|
|
133
|
+
se.__reactDisabledLog = !0;
|
|
134
|
+
function Ye() {
|
|
135
|
+
{
|
|
136
|
+
if (A === 0) {
|
|
137
|
+
re = console.log, te = console.info, ne = console.warn, ae = console.error, oe = console.group, ie = console.groupCollapsed, ue = console.groupEnd;
|
|
138
|
+
var e = {
|
|
139
|
+
configurable: !0,
|
|
140
|
+
enumerable: !0,
|
|
141
|
+
value: se,
|
|
142
|
+
writable: !0
|
|
143
|
+
};
|
|
144
|
+
Object.defineProperties(console, {
|
|
145
|
+
info: e,
|
|
146
|
+
log: e,
|
|
147
|
+
warn: e,
|
|
148
|
+
error: e,
|
|
149
|
+
group: e,
|
|
150
|
+
groupCollapsed: e,
|
|
151
|
+
groupEnd: e
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
A++;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function Le() {
|
|
158
|
+
{
|
|
159
|
+
if (A--, A === 0) {
|
|
160
|
+
var e = {
|
|
161
|
+
configurable: !0,
|
|
162
|
+
enumerable: !0,
|
|
163
|
+
writable: !0
|
|
164
|
+
};
|
|
165
|
+
Object.defineProperties(console, {
|
|
166
|
+
log: j({}, e, {
|
|
167
|
+
value: re
|
|
168
|
+
}),
|
|
169
|
+
info: j({}, e, {
|
|
170
|
+
value: te
|
|
171
|
+
}),
|
|
172
|
+
warn: j({}, e, {
|
|
173
|
+
value: ne
|
|
174
|
+
}),
|
|
175
|
+
error: j({}, e, {
|
|
176
|
+
value: ae
|
|
177
|
+
}),
|
|
178
|
+
group: j({}, e, {
|
|
179
|
+
value: oe
|
|
180
|
+
}),
|
|
181
|
+
groupCollapsed: j({}, e, {
|
|
182
|
+
value: ie
|
|
183
|
+
}),
|
|
184
|
+
groupEnd: j({}, e, {
|
|
185
|
+
value: ue
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
A < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
var N = k.ReactCurrentDispatcher, z;
|
|
193
|
+
function L(e, r, t) {
|
|
194
|
+
{
|
|
195
|
+
if (z === void 0)
|
|
196
|
+
try {
|
|
197
|
+
throw Error();
|
|
198
|
+
} catch (i) {
|
|
199
|
+
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
200
|
+
z = n && n[1] || "";
|
|
201
|
+
}
|
|
202
|
+
return `
|
|
203
|
+
` + z + e;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
var B = !1, V;
|
|
207
|
+
{
|
|
208
|
+
var Ve = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
+
V = new Ve();
|
|
210
|
+
}
|
|
211
|
+
function le(e, r) {
|
|
212
|
+
if (!e || B)
|
|
213
|
+
return "";
|
|
214
|
+
{
|
|
215
|
+
var t = V.get(e);
|
|
216
|
+
if (t !== void 0)
|
|
217
|
+
return t;
|
|
218
|
+
}
|
|
219
|
+
var n;
|
|
220
|
+
B = !0;
|
|
221
|
+
var i = Error.prepareStackTrace;
|
|
222
|
+
Error.prepareStackTrace = void 0;
|
|
223
|
+
var u;
|
|
224
|
+
u = N.current, N.current = null, Ye();
|
|
225
|
+
try {
|
|
226
|
+
if (r) {
|
|
227
|
+
var o = function() {
|
|
228
|
+
throw Error();
|
|
229
|
+
};
|
|
230
|
+
if (Object.defineProperty(o.prototype, "props", {
|
|
231
|
+
set: function() {
|
|
232
|
+
throw Error();
|
|
233
|
+
}
|
|
234
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
235
|
+
try {
|
|
236
|
+
Reflect.construct(o, []);
|
|
237
|
+
} catch (v) {
|
|
238
|
+
n = v;
|
|
239
|
+
}
|
|
240
|
+
Reflect.construct(e, [], o);
|
|
241
|
+
} else {
|
|
242
|
+
try {
|
|
243
|
+
o.call();
|
|
244
|
+
} catch (v) {
|
|
245
|
+
n = v;
|
|
246
|
+
}
|
|
247
|
+
e.call(o.prototype);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
try {
|
|
251
|
+
throw Error();
|
|
252
|
+
} catch (v) {
|
|
253
|
+
n = v;
|
|
254
|
+
}
|
|
255
|
+
e();
|
|
256
|
+
}
|
|
257
|
+
} catch (v) {
|
|
258
|
+
if (v && n && typeof v.stack == "string") {
|
|
259
|
+
for (var a = v.stack.split(`
|
|
260
|
+
`), d = n.stack.split(`
|
|
261
|
+
`), s = a.length - 1, c = d.length - 1; s >= 1 && c >= 0 && a[s] !== d[c]; )
|
|
262
|
+
c--;
|
|
263
|
+
for (; s >= 1 && c >= 0; s--, c--)
|
|
264
|
+
if (a[s] !== d[c]) {
|
|
265
|
+
if (s !== 1 || c !== 1)
|
|
266
|
+
do
|
|
267
|
+
if (s--, c--, c < 0 || a[s] !== d[c]) {
|
|
268
|
+
var g = `
|
|
269
|
+
` + a[s].replace(" at new ", " at ");
|
|
270
|
+
return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, g), g;
|
|
271
|
+
}
|
|
272
|
+
while (s >= 1 && c >= 0);
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} finally {
|
|
277
|
+
B = !1, N.current = u, Le(), Error.prepareStackTrace = i;
|
|
278
|
+
}
|
|
279
|
+
var F = e ? e.displayName || e.name : "", C = F ? L(F) : "";
|
|
280
|
+
return typeof e == "function" && V.set(e, C), C;
|
|
281
|
+
}
|
|
282
|
+
function Me(e, r, t) {
|
|
283
|
+
return le(e, !1);
|
|
284
|
+
}
|
|
285
|
+
function Ue(e) {
|
|
286
|
+
var r = e.prototype;
|
|
287
|
+
return !!(r && r.isReactComponent);
|
|
288
|
+
}
|
|
289
|
+
function M(e, r, t) {
|
|
290
|
+
if (e == null)
|
|
291
|
+
return "";
|
|
292
|
+
if (typeof e == "function")
|
|
293
|
+
return le(e, Ue(e));
|
|
294
|
+
if (typeof e == "string")
|
|
295
|
+
return L(e);
|
|
296
|
+
switch (e) {
|
|
297
|
+
case w:
|
|
298
|
+
return L("Suspense");
|
|
299
|
+
case p:
|
|
300
|
+
return L("SuspenseList");
|
|
301
|
+
}
|
|
302
|
+
if (typeof e == "object")
|
|
303
|
+
switch (e.$$typeof) {
|
|
304
|
+
case l:
|
|
305
|
+
return Me(e.render);
|
|
306
|
+
case E:
|
|
307
|
+
return M(e.type, r, t);
|
|
308
|
+
case O: {
|
|
309
|
+
var n = e, i = n._payload, u = n._init;
|
|
310
|
+
try {
|
|
311
|
+
return M(u(i), r, t);
|
|
312
|
+
} catch {
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return "";
|
|
317
|
+
}
|
|
318
|
+
var I = Object.prototype.hasOwnProperty, ce = {}, fe = k.ReactDebugCurrentFrame;
|
|
319
|
+
function U(e) {
|
|
320
|
+
if (e) {
|
|
321
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
322
|
+
fe.setExtraStackFrame(t);
|
|
323
|
+
} else
|
|
324
|
+
fe.setExtraStackFrame(null);
|
|
325
|
+
}
|
|
326
|
+
function Ne(e, r, t, n, i) {
|
|
327
|
+
{
|
|
328
|
+
var u = Function.call.bind(I);
|
|
329
|
+
for (var o in e)
|
|
330
|
+
if (u(e, o)) {
|
|
331
|
+
var a = void 0;
|
|
332
|
+
try {
|
|
333
|
+
if (typeof e[o] != "function") {
|
|
334
|
+
var d = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
335
|
+
throw d.name = "Invariant Violation", d;
|
|
336
|
+
}
|
|
337
|
+
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
338
|
+
} catch (s) {
|
|
339
|
+
a = s;
|
|
340
|
+
}
|
|
341
|
+
a && !(a instanceof Error) && (U(i), f("%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, o, typeof a), U(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, U(i), f("Failed %s type: %s", t, a.message), U(null));
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
var ze = Array.isArray;
|
|
346
|
+
function J(e) {
|
|
347
|
+
return ze(e);
|
|
348
|
+
}
|
|
349
|
+
function Be(e) {
|
|
350
|
+
{
|
|
351
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
352
|
+
return t;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
function Je(e) {
|
|
356
|
+
try {
|
|
357
|
+
return de(e), !1;
|
|
358
|
+
} catch {
|
|
359
|
+
return !0;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function de(e) {
|
|
363
|
+
return "" + e;
|
|
364
|
+
}
|
|
365
|
+
function ve(e) {
|
|
366
|
+
if (Je(e))
|
|
367
|
+
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), de(e);
|
|
368
|
+
}
|
|
369
|
+
var pe = k.ReactCurrentOwner, Ke = {
|
|
370
|
+
key: !0,
|
|
371
|
+
ref: !0,
|
|
372
|
+
__self: !0,
|
|
373
|
+
__source: !0
|
|
374
|
+
}, ge, he;
|
|
375
|
+
function Xe(e) {
|
|
376
|
+
if (I.call(e, "ref")) {
|
|
377
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
378
|
+
if (r && r.isReactWarning)
|
|
379
|
+
return !1;
|
|
380
|
+
}
|
|
381
|
+
return e.ref !== void 0;
|
|
382
|
+
}
|
|
383
|
+
function qe(e) {
|
|
384
|
+
if (I.call(e, "key")) {
|
|
385
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
386
|
+
if (r && r.isReactWarning)
|
|
387
|
+
return !1;
|
|
388
|
+
}
|
|
389
|
+
return e.key !== void 0;
|
|
390
|
+
}
|
|
391
|
+
function Ge(e, r) {
|
|
392
|
+
typeof e.ref == "string" && pe.current;
|
|
393
|
+
}
|
|
394
|
+
function He(e, r) {
|
|
395
|
+
{
|
|
396
|
+
var t = function() {
|
|
397
|
+
ge || (ge = !0, f("%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));
|
|
398
|
+
};
|
|
399
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
400
|
+
get: t,
|
|
401
|
+
configurable: !0
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function Ze(e, r) {
|
|
406
|
+
{
|
|
407
|
+
var t = function() {
|
|
408
|
+
he || (he = !0, f("%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));
|
|
409
|
+
};
|
|
410
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
411
|
+
get: t,
|
|
412
|
+
configurable: !0
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
var Qe = function(e, r, t, n, i, u, o) {
|
|
417
|
+
var a = {
|
|
418
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
419
|
+
$$typeof: P,
|
|
420
|
+
// Built-in properties that belong on the element
|
|
421
|
+
type: e,
|
|
422
|
+
key: r,
|
|
423
|
+
ref: t,
|
|
424
|
+
props: o,
|
|
425
|
+
// Record the component responsible for creating this element.
|
|
426
|
+
_owner: u
|
|
427
|
+
};
|
|
428
|
+
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
429
|
+
configurable: !1,
|
|
430
|
+
enumerable: !1,
|
|
431
|
+
writable: !0,
|
|
432
|
+
value: !1
|
|
433
|
+
}), Object.defineProperty(a, "_self", {
|
|
434
|
+
configurable: !1,
|
|
435
|
+
enumerable: !1,
|
|
436
|
+
writable: !1,
|
|
437
|
+
value: n
|
|
438
|
+
}), Object.defineProperty(a, "_source", {
|
|
439
|
+
configurable: !1,
|
|
440
|
+
enumerable: !1,
|
|
441
|
+
writable: !1,
|
|
442
|
+
value: i
|
|
443
|
+
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
444
|
+
};
|
|
445
|
+
function er(e, r, t, n, i) {
|
|
446
|
+
{
|
|
447
|
+
var u, o = {}, a = null, d = null;
|
|
448
|
+
t !== void 0 && (ve(t), a = "" + t), qe(r) && (ve(r.key), a = "" + r.key), Xe(r) && (d = r.ref, Ge(r, i));
|
|
449
|
+
for (u in r)
|
|
450
|
+
I.call(r, u) && !Ke.hasOwnProperty(u) && (o[u] = r[u]);
|
|
451
|
+
if (e && e.defaultProps) {
|
|
452
|
+
var s = e.defaultProps;
|
|
453
|
+
for (u in s)
|
|
454
|
+
o[u] === void 0 && (o[u] = s[u]);
|
|
455
|
+
}
|
|
456
|
+
if (a || d) {
|
|
457
|
+
var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
458
|
+
a && He(o, c), d && Ze(o, c);
|
|
459
|
+
}
|
|
460
|
+
return Qe(e, a, d, i, n, pe.current, o);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
var K = k.ReactCurrentOwner, be = k.ReactDebugCurrentFrame;
|
|
464
|
+
function D(e) {
|
|
465
|
+
if (e) {
|
|
466
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
467
|
+
be.setExtraStackFrame(t);
|
|
468
|
+
} else
|
|
469
|
+
be.setExtraStackFrame(null);
|
|
470
|
+
}
|
|
471
|
+
var X;
|
|
472
|
+
X = !1;
|
|
473
|
+
function q(e) {
|
|
474
|
+
return typeof e == "object" && e !== null && e.$$typeof === P;
|
|
475
|
+
}
|
|
476
|
+
function ye() {
|
|
477
|
+
{
|
|
478
|
+
if (K.current) {
|
|
479
|
+
var e = T(K.current.type);
|
|
480
|
+
if (e)
|
|
481
|
+
return `
|
|
482
|
+
|
|
483
|
+
Check the render method of \`` + e + "`.";
|
|
484
|
+
}
|
|
485
|
+
return "";
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
function rr(e) {
|
|
489
|
+
return "";
|
|
490
|
+
}
|
|
491
|
+
var Ee = {};
|
|
492
|
+
function tr(e) {
|
|
493
|
+
{
|
|
494
|
+
var r = ye();
|
|
495
|
+
if (!r) {
|
|
496
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
497
|
+
t && (r = `
|
|
498
|
+
|
|
499
|
+
Check the top-level render call using <` + t + ">.");
|
|
500
|
+
}
|
|
501
|
+
return r;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
function Re(e, r) {
|
|
505
|
+
{
|
|
506
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
507
|
+
return;
|
|
508
|
+
e._store.validated = !0;
|
|
509
|
+
var t = tr(r);
|
|
510
|
+
if (Ee[t])
|
|
511
|
+
return;
|
|
512
|
+
Ee[t] = !0;
|
|
513
|
+
var n = "";
|
|
514
|
+
e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + T(e._owner.type) + "."), D(e), f('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), D(null);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function _e(e, r) {
|
|
518
|
+
{
|
|
519
|
+
if (typeof e != "object")
|
|
520
|
+
return;
|
|
521
|
+
if (J(e))
|
|
522
|
+
for (var t = 0; t < e.length; t++) {
|
|
523
|
+
var n = e[t];
|
|
524
|
+
q(n) && Re(n, r);
|
|
525
|
+
}
|
|
526
|
+
else if (q(e))
|
|
527
|
+
e._store && (e._store.validated = !0);
|
|
528
|
+
else if (e) {
|
|
529
|
+
var i = Pe(e);
|
|
530
|
+
if (typeof i == "function" && i !== e.entries)
|
|
531
|
+
for (var u = i.call(e), o; !(o = u.next()).done; )
|
|
532
|
+
q(o.value) && Re(o.value, r);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function nr(e) {
|
|
537
|
+
{
|
|
538
|
+
var r = e.type;
|
|
539
|
+
if (r == null || typeof r == "string")
|
|
540
|
+
return;
|
|
541
|
+
var t;
|
|
542
|
+
if (typeof r == "function")
|
|
543
|
+
t = r.propTypes;
|
|
544
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
545
|
+
// Inner props are checked in the reconciler.
|
|
546
|
+
r.$$typeof === E))
|
|
547
|
+
t = r.propTypes;
|
|
548
|
+
else
|
|
549
|
+
return;
|
|
550
|
+
if (t) {
|
|
551
|
+
var n = T(r);
|
|
552
|
+
Ne(t, e.props, "prop", n, e);
|
|
553
|
+
} else if (r.PropTypes !== void 0 && !X) {
|
|
554
|
+
X = !0;
|
|
555
|
+
var i = T(r);
|
|
556
|
+
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
557
|
+
}
|
|
558
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
function ar(e) {
|
|
562
|
+
{
|
|
563
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
564
|
+
var n = r[t];
|
|
565
|
+
if (n !== "children" && n !== "key") {
|
|
566
|
+
D(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
e.ref !== null && (D(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
var me = {};
|
|
574
|
+
function Te(e, r, t, n, i, u) {
|
|
575
|
+
{
|
|
576
|
+
var o = We(e);
|
|
577
|
+
if (!o) {
|
|
578
|
+
var a = "";
|
|
579
|
+
(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.");
|
|
580
|
+
var d = rr();
|
|
581
|
+
d ? a += d : a += ye();
|
|
582
|
+
var s;
|
|
583
|
+
e === null ? s = "null" : J(e) ? s = "array" : e !== void 0 && e.$$typeof === P ? (s = "<" + (T(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
|
|
584
|
+
}
|
|
585
|
+
var c = er(e, r, t, i, u);
|
|
586
|
+
if (c == null)
|
|
587
|
+
return c;
|
|
588
|
+
if (o) {
|
|
589
|
+
var g = r.children;
|
|
590
|
+
if (g !== void 0)
|
|
591
|
+
if (n)
|
|
592
|
+
if (J(g)) {
|
|
593
|
+
for (var F = 0; F < g.length; F++)
|
|
594
|
+
_e(g[F], e);
|
|
595
|
+
Object.freeze && Object.freeze(g);
|
|
596
|
+
} else
|
|
597
|
+
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
598
|
+
else
|
|
599
|
+
_e(g, e);
|
|
600
|
+
}
|
|
601
|
+
if (I.call(r, "key")) {
|
|
602
|
+
var C = T(e), v = Object.keys(r).filter(function(cr) {
|
|
603
|
+
return cr !== "key";
|
|
604
|
+
}), G = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
605
|
+
if (!me[C + G]) {
|
|
606
|
+
var lr = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}";
|
|
607
|
+
f(`A props object containing a "key" prop is being spread into JSX:
|
|
608
|
+
let props = %s;
|
|
609
|
+
<%s {...props} />
|
|
610
|
+
React keys must be passed directly to JSX without using spread:
|
|
611
|
+
let props = %s;
|
|
612
|
+
<%s key={someKey} {...props} />`, G, C, lr, C), me[C + G] = !0;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
return e === R ? ar(c) : nr(c), c;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
function or(e, r, t) {
|
|
619
|
+
return Te(e, r, t, !0);
|
|
620
|
+
}
|
|
621
|
+
function ir(e, r, t) {
|
|
622
|
+
return Te(e, r, t, !1);
|
|
623
|
+
}
|
|
624
|
+
var ur = ir, sr = or;
|
|
625
|
+
$.Fragment = R, $.jsx = ur, $.jsxs = sr;
|
|
626
|
+
}()), $;
|
|
627
|
+
}
|
|
628
|
+
process.env.NODE_ENV === "production" ? H.exports = vr() : H.exports = pr();
|
|
629
|
+
var h = H.exports;
|
|
630
|
+
const br = ({ xml: x, logoUrl: P }) => {
|
|
631
|
+
var m, b;
|
|
632
|
+
const [y, R] = xe(null), [_, S] = xe("");
|
|
633
|
+
return fr(() => {
|
|
634
|
+
if (x)
|
|
635
|
+
try {
|
|
636
|
+
const l = dr(x);
|
|
637
|
+
R(l), S("");
|
|
638
|
+
} catch (l) {
|
|
639
|
+
S(l.message || "Error al procesar el XML"), console.error(l);
|
|
640
|
+
}
|
|
641
|
+
}, [x]), /* @__PURE__ */ h.jsxs("div", { style: { padding: "16px", border: "1px solid #ccc", borderRadius: "4px", backgroundColor: "#fff" }, children: [
|
|
642
|
+
/* @__PURE__ */ h.jsx("h3", { style: { margin: "0 0 8px 0", fontSize: "18px", fontWeight: "bold" }, children: "Visor XML (React)" }),
|
|
643
|
+
_ && /* @__PURE__ */ h.jsx("div", { style: { color: "red", fontWeight: "bold" }, children: _ }),
|
|
644
|
+
y && !_ && /* @__PURE__ */ h.jsxs("div", { style: { fontSize: "14px" }, children: [
|
|
645
|
+
/* @__PURE__ */ h.jsxs("p", { children: [
|
|
646
|
+
/* @__PURE__ */ h.jsx("strong", { children: "Clave de Acceso:" }),
|
|
647
|
+
" ",
|
|
648
|
+
y.accessKey
|
|
649
|
+
] }),
|
|
650
|
+
/* @__PURE__ */ h.jsxs("p", { children: [
|
|
651
|
+
/* @__PURE__ */ h.jsx("strong", { children: "Fecha de Emisión:" }),
|
|
652
|
+
" ",
|
|
653
|
+
y.emissionDate
|
|
654
|
+
] }),
|
|
655
|
+
/* @__PURE__ */ h.jsxs("p", { children: [
|
|
656
|
+
/* @__PURE__ */ h.jsx("strong", { children: "RUC Emisor:" }),
|
|
657
|
+
" ",
|
|
658
|
+
(m = y.infoTributaria) == null ? void 0 : m.ruc
|
|
659
|
+
] }),
|
|
660
|
+
/* @__PURE__ */ h.jsxs("p", { children: [
|
|
661
|
+
/* @__PURE__ */ h.jsx("strong", { children: "Razón Social:" }),
|
|
662
|
+
" ",
|
|
663
|
+
(b = y.infoTributaria) == null ? void 0 : b.razonSocial
|
|
664
|
+
] })
|
|
665
|
+
] })
|
|
666
|
+
] });
|
|
667
|
+
};
|
|
668
|
+
export {
|
|
669
|
+
br as VisorXml
|
|
670
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sri-xml-viewer/react",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "React viewer components for SRI Ecuador XML electronic vouchers",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
20
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@sri-xml-viewer/core": "^1.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/react": "^18.0.0",
|
|
27
|
+
"@types/react-dom": "^18.0.0",
|
|
28
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
29
|
+
"react": "^18.2.0",
|
|
30
|
+
"react-dom": "^18.2.0",
|
|
31
|
+
"typescript": "^5.0.0",
|
|
32
|
+
"vite": "^5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "vite build"
|
|
36
|
+
}
|
|
37
|
+
}
|