@machinemetrics/mm-react-embeddable 1.0.2-1 → 1.0.3
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/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),J=require("prop-types"),Le=require("styled-components");var ge={exports:{}},Z={};/**
|
|
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 Ye;function wr(){if(Ye)return Z;Ye=1;var n=d,o=Symbol.for("react.element"),T=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function M(y,R,F){var b,j={},i=null,v=null;F!==void 0&&(i=""+F),R.key!==void 0&&(i=""+R.key),R.ref!==void 0&&(v=R.ref);for(b in R)c.call(R,b)&&!S.hasOwnProperty(b)&&(j[b]=R[b]);if(y&&y.defaultProps)for(b in R=y.defaultProps,R)j[b]===void 0&&(j[b]=R[b]);return{$$typeof:o,type:y,key:i,ref:v,props:j,_owner:w.current}}return Z.Fragment=T,Z.jsx=M,Z.jsxs=M,Z}var B={};/**
|
|
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 Ve;function Sr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var n=d,o=Symbol.for("react.element"),T=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),y=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),i=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),l=Symbol.iterator,E="@@iterator";function P(e){if(e===null||typeof e!="object")return null;var r=l&&e[l]||e[E];return typeof r=="function"?r:null}var m=n.__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),a=1;a<r;a++)t[a-1]=arguments[a];I("error",e,t)}}function I(e,r,t){{var a=m.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(r+="%s",t=t.concat([f]));var p=t.map(function(u){return String(u)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var D=!1,K=!1,N=!1,ae=!1,oe=!1,G;G=Symbol.for("react.module.reference");function z(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===S||oe||e===w||e===F||e===b||ae||e===v||D||K||N||typeof e=="object"&&e!==null&&(e.$$typeof===i||e.$$typeof===j||e.$$typeof===M||e.$$typeof===y||e.$$typeof===R||e.$$typeof===G||e.getModuleId!==void 0))}function Ge(e,r,t){var a=e.displayName;if(a)return a;var f=r.displayName||r.name||"";return f!==""?t+"("+f+")":t}function me(e){return e.displayName||"Context"}function A(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 c:return"Fragment";case T:return"Portal";case S:return"Profiler";case w:return"StrictMode";case F:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return me(r)+".Consumer";case M:var t=e;return me(t._context)+".Provider";case R:return Ge(e,e.render,"ForwardRef");case j:var a=e.displayName||null;return a!==null?a:A(e.type)||"Memo";case i:{var f=e,p=f._payload,u=f._init;try{return A(u(p))}catch{return null}}}return null}var $=Object.assign,Y=0,ye,Ee,he,Re,_e,we,Se;function Ce(){}Ce.__reactDisabledLog=!0;function ze(){{if(Y===0){ye=console.log,Ee=console.info,he=console.warn,Re=console.error,_e=console.group,we=console.groupCollapsed,Se=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})}Y++}}function Xe(){{if(Y--,Y===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:ye}),info:$({},e,{value:Ee}),warn:$({},e,{value:he}),error:$({},e,{value:Re}),group:$({},e,{value:_e}),groupCollapsed:$({},e,{value:we}),groupEnd:$({},e,{value:Se})})}Y<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ie=m.ReactCurrentDispatcher,se;function X(e,r,t){{if(se===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);se=a&&a[1]||""}return`
|
|
18
|
-
`+se+e}}var ue=!1,H;{var He=typeof WeakMap=="function"?WeakMap:Map;H=new He}function Te(e,r){if(!e||ue)return"";{var t=H.get(e);if(t!==void 0)return t}var a;ue=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ie.current,ie.current=null,ze();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(x){a=x}Reflect.construct(e,[],u)}else{try{u.call()}catch(x){a=x}e.call(u.prototype)}}else{try{throw Error()}catch(x){a=x}e()}}catch(x){if(x&&a&&typeof x.stack=="string"){for(var s=x.stack.split(`
|
|
19
|
-
`),O=a.stack.split(`
|
|
20
|
-
`),h=s.length-1,_=O.length-1;h>=1&&_>=0&&s[h]!==O[_];)_--;for(;h>=1&&_>=0;h--,_--)if(s[h]!==O[_]){if(h!==1||_!==1)do if(h--,_--,_<0||s[h]!==O[_]){var k=`
|
|
21
|
-
`+s[h].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,k),k}while(h>=1&&_>=0);break}}}finally{ue=!1,ie.current=p,Xe(),Error.prepareStackTrace=f}var L=e?e.displayName||e.name:"",U=L?X(L):"";return typeof e=="function"&&H.set(e,U),U}function Qe(e,r,t){return Te(e,!1)}function er(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Q(e,r,t){if(e==null)return"";if(typeof e=="function")return Te(e,er(e));if(typeof e=="string")return X(e);switch(e){case F:return X("Suspense");case b:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case R:return Qe(e.render);case j:return Q(e.type,r,t);case i:{var a=e,f=a._payload,p=a._init;try{return Q(p(f),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,Oe={},Pe=m.ReactDebugCurrentFrame;function ee(e){if(e){var r=e._owner,t=Q(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}function rr(e,r,t,a,f){{var p=Function.call.bind(V);for(var u in e)if(p(e,u)){var s=void 0;try{if(typeof e[u]!="function"){var O=Error((a||"React class")+": "+t+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}s=e[u](r,u,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){s=h}s&&!(s instanceof Error)&&(ee(f),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).",a||"React class",t,u,typeof s),ee(null)),s instanceof Error&&!(s.message in Oe)&&(Oe[s.message]=!0,ee(f),g("Failed %s type: %s",t,s.message),ee(null))}}}var tr=Array.isArray;function ce(e){return tr(e)}function nr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ar(e){try{return xe(e),!1}catch{return!0}}function xe(e){return""+e}function je(e){if(ar(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nr(e)),xe(e)}var q=m.ReactCurrentOwner,or={key:!0,ref:!0,__self:!0,__source:!0},ke,Me,le;le={};function ir(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function sr(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&q.current&&r&&q.current.stateNode!==r){var t=A(q.current.type);le[t]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(q.current.type),e.ref),le[t]=!0)}}function cr(e,r){{var t=function(){ke||(ke=!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 lr(e,r){{var t=function(){Me||(Me=!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 fr=function(e,r,t,a,f,p,u){var s={$$typeof:o,type:e,key:r,ref:t,props:u,_owner:p};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function dr(e,r,t,a,f){{var p,u={},s=null,O=null;t!==void 0&&(je(t),s=""+t),sr(r)&&(je(r.key),s=""+r.key),ir(r)&&(O=r.ref,ur(r,f));for(p in r)V.call(r,p)&&!or.hasOwnProperty(p)&&(u[p]=r[p]);if(e&&e.defaultProps){var h=e.defaultProps;for(p in h)u[p]===void 0&&(u[p]=h[p])}if(s||O){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&cr(u,_),O&&lr(u,_)}return fr(e,s,O,f,a,q.current,u)}}var fe=m.ReactCurrentOwner,Fe=m.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=Q(e.type,e._source,r?r.type:null);Fe.setExtraStackFrame(t)}else Fe.setExtraStackFrame(null)}var de;de=!1;function ve(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Ie(){{if(fe.current){var e=A(fe.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function vr(e){return""}var De={};function pr(e){{var r=Ie();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 Ae(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=pr(r);if(De[t])return;De[t]=!0;var a="";e&&e._owner&&e._owner!==fe.current&&(a=" It was passed a child from "+A(e._owner.type)+"."),W(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,a),W(null)}}function $e(e,r){{if(typeof e!="object")return;if(ce(e))for(var t=0;t<e.length;t++){var a=e[t];ve(a)&&Ae(a,r)}else if(ve(e))e._store&&(e._store.validated=!0);else if(e){var f=P(e);if(typeof f=="function"&&f!==e.entries)for(var p=f.call(e),u;!(u=p.next()).done;)ve(u.value)&&Ae(u.value,r)}}}function br(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===R||r.$$typeof===j))t=r.propTypes;else return;if(t){var a=A(r);rr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!de){de=!0;var f=A(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"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 gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){W(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),W(null);break}}e.ref!==null&&(W(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}var Ue={};function We(e,r,t,a,f,p){{var u=z(e);if(!u){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" 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 O=vr();O?s+=O:s+=Ie();var h;e===null?h="null":ce(e)?h="array":e!==void 0&&e.$$typeof===o?(h="<"+(A(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):h=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",h,s)}var _=dr(e,r,t,f,p);if(_==null)return _;if(u){var k=r.children;if(k!==void 0)if(a)if(ce(k)){for(var L=0;L<k.length;L++)$e(k[L],e);Object.freeze&&Object.freeze(k)}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 $e(k,e)}if(V.call(r,"key")){var U=A(e),x=Object.keys(r).filter(function(_r){return _r!=="key"}),pe=x.length>0?"{key: someKey, "+x.join(": ..., ")+": ...}":"{key: someKey}";if(!Ue[U+pe]){var Rr=x.length>0?"{"+x.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,pe,U,Rr,U),Ue[U+pe]=!0}}return e===c?gr(_):br(_),_}}function mr(e,r,t){return We(e,r,t,!0)}function yr(e,r,t){return We(e,r,t,!1)}var Er=yr,hr=mr;B.Fragment=c,B.jsx=Er,B.jsxs=hr}()),B}process.env.NODE_ENV==="production"?ge.exports=wr():ge.exports=Sr();var te=ge.exports;const C=[];for(let n=0;n<256;++n)C.push((n+256).toString(16).slice(1));function Cr(n,o=0){return(C[n[o+0]]+C[n[o+1]]+C[n[o+2]]+C[n[o+3]]+"-"+C[n[o+4]]+C[n[o+5]]+"-"+C[n[o+6]]+C[n[o+7]]+"-"+C[n[o+8]]+C[n[o+9]]+"-"+C[n[o+10]]+C[n[o+11]]+C[n[o+12]]+C[n[o+13]]+C[n[o+14]]+C[n[o+15]]).toLowerCase()}let be;const Tr=new Uint8Array(16);function Or(){if(!be){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");be=crypto.getRandomValues.bind(crypto)}return be(Tr)}const Pr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qe={randomUUID:Pr};function xr(n,o,T){var w;if(qe.randomUUID&&!o&&!n)return qe.randomUUID();n=n||{};const c=n.random??((w=n.rng)==null?void 0:w.call(n))??Or();if(c.length<16)throw new Error("Random bytes length must be >= 16");return c[6]=c[6]&15|64,c[8]=c[8]&63|128,Cr(c)}const ne=d.createContext(null),Ze=({children:n})=>{const[o,T]=d.useState({}),c=d.useRef({}),w=d.useRef({}),S=d.useCallback((i,v,l)=>{T(E=>({...E,[i]:{origin:v,frameRef:l}}))},[]),M=d.useCallback(i=>{T(v=>{const l={...v};return delete l[i],l})},[]);d.useEffect(()=>{const i=(l=[],E)=>{l.forEach(P=>P(E))},v=l=>{var g,I,D,K,N;if(!((g=l==null?void 0:l.data)!=null&&g.instanceId))return;const{instanceId:E,type:P}=l.data,m=c.current;if(P==="response"){const{callbackId:ae,response:oe,error:G}=l.data,z=w.current[ae];z&&z(oe,G);return}i((I=m[E])==null?void 0:I[P],l.data),i((D=m["*"])==null?void 0:D[P],l.data),i((K=m[E])==null?void 0:K["*"],l.data),i((N=m["*"])==null?void 0:N["*"],l.data)};return window.addEventListener("message",v),()=>{window.removeEventListener("message",v)}},[o]);const y=d.useCallback((i,v,l)=>{var P,m;const E=o[i];if(!E){console.warn(`Origin not set for id: ${i}. Unable to send message.`);return}(m=(P=E==null?void 0:E.frameRef)==null?void 0:P.current)!=null&&m.contentWindow&&E.frameRef.current.contentWindow.postMessage({type:v,...l,instanceId:i},E.origin)},[o]),R=d.useCallback(async(i,v,l={})=>new Promise((E,P)=>{const m=xr(),g=(I,D)=>{delete w.current[m],D?P(D):E(I)};w.current[m]=g,y(i,"request",{callbackId:m,requestType:v,data:l})}),[y]),F=d.useCallback((i,v)=>{y(i,"load-options",v)},[y]),b=d.useCallback((i,v)=>{y(i,"validate",v)},[y]),j=d.useMemo(()=>({registerFrame:S,unregisterFrame:M,sendMessage:y,sendRequest:R,loadOptions:F,validate:b,addListener:(i,v,l)=>(c.current[i]||(c.current[i]={}),c.current[i][v]||(c.current[i][v]=[]),c.current[i][v].push(l),()=>{c.current[i][v]=c.current[i][v].filter(E=>E!==l)})}),[S,M,y,R,F,b]);return te.jsx(ne.Provider,{value:j,children:n})},re={},Be=async n=>{try{const o=new URL(n).origin;if(re[o]!==void 0)return re[o];const c=await(await fetch(`${o}/mm-app-manifest.json`)).json();if(!c.version)throw new Error("Invalid manifest");return re[o]=c,c}catch{}return re[origin]=!1,!1},Je=async n=>!!await Be(n),Ke=(n,o,T)=>{const c=d.useContext(ne);if(c===null)throw new Error("useEmbeddedEffect must be used within a MMEmbeddableZoneProvider");const w=d.useRef(T);d.useEffect(()=>{w.current=T},[T]),d.useEffect(()=>{if(!(!n||!o))return c.addListener(n,o,(...S)=>w.current(...S))},[c,n,o])};Ze.propTypes={children:J.node.isRequired};const jr=Le.default||Le,kr=jr.iframe`
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
border: none;
|
|
34
|
-
visibility: ${n=>n.$isReady?"visible":"hidden"};
|
|
35
|
-
`,Ne=({id:n,src:o,path:T,onInit:c=()=>{},context:w,params:S,...M})=>{if("isConfiguring"in M)return console.error("isConfiguring must be passed via the params prop to MMEmbeddableZone"),null;if("colorMode"in w)return console.error("colorMode must be passed via the params prop to MMEmbeddableZone"),null;if("isFullScreen"in w)return console.error("isFullScreen must be passed via the params prop to MMEmbeddableZone"),null;const y=d.useRef(),[R,F]=d.useState(),[b,j]=d.useState(0),{registerFrame:i,unregisterFrame:v,sendMessage:l}=d.useContext(ne),[E,P]=d.useState(!0),[m,g]=d.useState();return d.useEffect(()=>{b&&l(n,"set-context",{context:{...w,colorMode:S.colorMode,isFullScreen:S.isFullScreen}})},[w,S.colorMode,S.isFullScreen,n,b]),d.useEffect(()=>{b&&(l(n,"set-params",{params:S}),l(n,"set-configuring",{isConfiguring:S.isConfiguring}))},[S,n,b]),d.useEffect(()=>{T!==void 0&&g(T)},[T]),d.useEffect(()=>{m===void 0||!b||l(n,"navigate",{path:m})},[m,b,n,l]),d.useEffect(()=>{if(!(!o||!n||!y))return(async()=>{const I=await Je(o);if(P(I),I){const D=new URL(o);i(n,D.origin,y),c(),F(`${D.origin}/mm-embedded-interop?id=${n}&origin=${window.location.origin}`);return}})(),()=>{v(n)}},[o,n,i,y]),Ke(n,"ready",()=>j(I=>I+1)),E?te.jsx(kr,{$isReady:b,ref:y,src:R,...M}):te.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:te.jsx("div",{style:{textAlign:"center"},children:"Application must adhere to the MM App Manifest specification to be embedded."})})};Ne.propTypes={id:J.string,src:J.string.isRequired,path:J.string,onInit:J.func};exports.MMEmbeddableZone=Ne;exports.MMEmbeddableZoneContext=ne;exports.MMEmbeddableZoneProvider=Ze;exports.getAppInfo=Be;exports.testIsEmbeddable=Je;exports.useEmbeddedEffect=Ke;
|
|
@@ -1,861 +0,0 @@
|
|
|
1
|
-
import Ze, { createContext as wr, useState as Z, useRef as oe, useCallback as Y, useEffect as A, useMemo as Tr, useContext as Ne } from "react";
|
|
2
|
-
import N from "prop-types";
|
|
3
|
-
import qe from "styled-components";
|
|
4
|
-
var ye = { exports: {} }, J = {};
|
|
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 Be;
|
|
15
|
-
function Sr() {
|
|
16
|
-
if (Be) return J;
|
|
17
|
-
Be = 1;
|
|
18
|
-
var n = Ze, o = Symbol.for("react.element"), S = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, _ = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
-
function k(m, E, F) {
|
|
20
|
-
var p, x = {}, i = null, d = null;
|
|
21
|
-
F !== void 0 && (i = "" + F), E.key !== void 0 && (i = "" + E.key), E.ref !== void 0 && (d = E.ref);
|
|
22
|
-
for (p in E) c.call(E, p) && !w.hasOwnProperty(p) && (x[p] = E[p]);
|
|
23
|
-
if (m && m.defaultProps) for (p in E = m.defaultProps, E) x[p] === void 0 && (x[p] = E[p]);
|
|
24
|
-
return { $$typeof: o, type: m, key: i, ref: d, props: x, _owner: _.current };
|
|
25
|
-
}
|
|
26
|
-
return J.Fragment = S, J.jsx = k, J.jsxs = k, J;
|
|
27
|
-
}
|
|
28
|
-
var K = {};
|
|
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 Je;
|
|
39
|
-
function Cr() {
|
|
40
|
-
return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
41
|
-
var n = Ze, o = Symbol.for("react.element"), S = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), m = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), i = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), l = Symbol.iterator, y = "@@iterator";
|
|
42
|
-
function O(e) {
|
|
43
|
-
if (e === null || typeof e != "object")
|
|
44
|
-
return null;
|
|
45
|
-
var r = l && e[l] || e[y];
|
|
46
|
-
return typeof r == "function" ? r : null;
|
|
47
|
-
}
|
|
48
|
-
var b = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
49
|
-
function g(e) {
|
|
50
|
-
{
|
|
51
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
52
|
-
t[a - 1] = arguments[a];
|
|
53
|
-
I("error", e, t);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function I(e, r, t) {
|
|
57
|
-
{
|
|
58
|
-
var a = b.ReactDebugCurrentFrame, f = a.getStackAddendum();
|
|
59
|
-
f !== "" && (r += "%s", t = t.concat([f]));
|
|
60
|
-
var v = t.map(function(u) {
|
|
61
|
-
return String(u);
|
|
62
|
-
});
|
|
63
|
-
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
var D = !1, G = !1, z = !1, ie = !1, se = !1, X;
|
|
67
|
-
X = Symbol.for("react.module.reference");
|
|
68
|
-
function H(e) {
|
|
69
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e === w || se || e === _ || e === F || e === p || ie || e === d || D || G || z || typeof e == "object" && e !== null && (e.$$typeof === i || e.$$typeof === x || e.$$typeof === k || e.$$typeof === m || e.$$typeof === E || // 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 === X || e.getModuleId !== void 0));
|
|
74
|
-
}
|
|
75
|
-
function Ge(e, r, t) {
|
|
76
|
-
var a = e.displayName;
|
|
77
|
-
if (a)
|
|
78
|
-
return a;
|
|
79
|
-
var f = r.displayName || r.name || "";
|
|
80
|
-
return f !== "" ? t + "(" + f + ")" : t;
|
|
81
|
-
}
|
|
82
|
-
function Ee(e) {
|
|
83
|
-
return e.displayName || "Context";
|
|
84
|
-
}
|
|
85
|
-
function M(e) {
|
|
86
|
-
if (e == null)
|
|
87
|
-
return null;
|
|
88
|
-
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")
|
|
89
|
-
return e.displayName || e.name || null;
|
|
90
|
-
if (typeof e == "string")
|
|
91
|
-
return e;
|
|
92
|
-
switch (e) {
|
|
93
|
-
case c:
|
|
94
|
-
return "Fragment";
|
|
95
|
-
case S:
|
|
96
|
-
return "Portal";
|
|
97
|
-
case w:
|
|
98
|
-
return "Profiler";
|
|
99
|
-
case _:
|
|
100
|
-
return "StrictMode";
|
|
101
|
-
case F:
|
|
102
|
-
return "Suspense";
|
|
103
|
-
case p:
|
|
104
|
-
return "SuspenseList";
|
|
105
|
-
}
|
|
106
|
-
if (typeof e == "object")
|
|
107
|
-
switch (e.$$typeof) {
|
|
108
|
-
case m:
|
|
109
|
-
var r = e;
|
|
110
|
-
return Ee(r) + ".Consumer";
|
|
111
|
-
case k:
|
|
112
|
-
var t = e;
|
|
113
|
-
return Ee(t._context) + ".Provider";
|
|
114
|
-
case E:
|
|
115
|
-
return Ge(e, e.render, "ForwardRef");
|
|
116
|
-
case x:
|
|
117
|
-
var a = e.displayName || null;
|
|
118
|
-
return a !== null ? a : M(e.type) || "Memo";
|
|
119
|
-
case i: {
|
|
120
|
-
var f = e, v = f._payload, u = f._init;
|
|
121
|
-
try {
|
|
122
|
-
return M(u(v));
|
|
123
|
-
} catch {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
var $ = Object.assign, V = 0, Re, _e, we, Te, Se, Ce, Oe;
|
|
131
|
-
function Pe() {
|
|
132
|
-
}
|
|
133
|
-
Pe.__reactDisabledLog = !0;
|
|
134
|
-
function ze() {
|
|
135
|
-
{
|
|
136
|
-
if (V === 0) {
|
|
137
|
-
Re = console.log, _e = console.info, we = console.warn, Te = console.error, Se = console.group, Ce = console.groupCollapsed, Oe = console.groupEnd;
|
|
138
|
-
var e = {
|
|
139
|
-
configurable: !0,
|
|
140
|
-
enumerable: !0,
|
|
141
|
-
value: Pe,
|
|
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
|
-
V++;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function Xe() {
|
|
158
|
-
{
|
|
159
|
-
if (V--, V === 0) {
|
|
160
|
-
var e = {
|
|
161
|
-
configurable: !0,
|
|
162
|
-
enumerable: !0,
|
|
163
|
-
writable: !0
|
|
164
|
-
};
|
|
165
|
-
Object.defineProperties(console, {
|
|
166
|
-
log: $({}, e, {
|
|
167
|
-
value: Re
|
|
168
|
-
}),
|
|
169
|
-
info: $({}, e, {
|
|
170
|
-
value: _e
|
|
171
|
-
}),
|
|
172
|
-
warn: $({}, e, {
|
|
173
|
-
value: we
|
|
174
|
-
}),
|
|
175
|
-
error: $({}, e, {
|
|
176
|
-
value: Te
|
|
177
|
-
}),
|
|
178
|
-
group: $({}, e, {
|
|
179
|
-
value: Se
|
|
180
|
-
}),
|
|
181
|
-
groupCollapsed: $({}, e, {
|
|
182
|
-
value: Ce
|
|
183
|
-
}),
|
|
184
|
-
groupEnd: $({}, e, {
|
|
185
|
-
value: Oe
|
|
186
|
-
})
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
V < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
var ue = b.ReactCurrentDispatcher, ce;
|
|
193
|
-
function Q(e, r, t) {
|
|
194
|
-
{
|
|
195
|
-
if (ce === void 0)
|
|
196
|
-
try {
|
|
197
|
-
throw Error();
|
|
198
|
-
} catch (f) {
|
|
199
|
-
var a = f.stack.trim().match(/\n( *(at )?)/);
|
|
200
|
-
ce = a && a[1] || "";
|
|
201
|
-
}
|
|
202
|
-
return `
|
|
203
|
-
` + ce + e;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
var le = !1, ee;
|
|
207
|
-
{
|
|
208
|
-
var He = typeof WeakMap == "function" ? WeakMap : Map;
|
|
209
|
-
ee = new He();
|
|
210
|
-
}
|
|
211
|
-
function xe(e, r) {
|
|
212
|
-
if (!e || le)
|
|
213
|
-
return "";
|
|
214
|
-
{
|
|
215
|
-
var t = ee.get(e);
|
|
216
|
-
if (t !== void 0)
|
|
217
|
-
return t;
|
|
218
|
-
}
|
|
219
|
-
var a;
|
|
220
|
-
le = !0;
|
|
221
|
-
var f = Error.prepareStackTrace;
|
|
222
|
-
Error.prepareStackTrace = void 0;
|
|
223
|
-
var v;
|
|
224
|
-
v = ue.current, ue.current = null, ze();
|
|
225
|
-
try {
|
|
226
|
-
if (r) {
|
|
227
|
-
var u = function() {
|
|
228
|
-
throw Error();
|
|
229
|
-
};
|
|
230
|
-
if (Object.defineProperty(u.prototype, "props", {
|
|
231
|
-
set: function() {
|
|
232
|
-
throw Error();
|
|
233
|
-
}
|
|
234
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
235
|
-
try {
|
|
236
|
-
Reflect.construct(u, []);
|
|
237
|
-
} catch (P) {
|
|
238
|
-
a = P;
|
|
239
|
-
}
|
|
240
|
-
Reflect.construct(e, [], u);
|
|
241
|
-
} else {
|
|
242
|
-
try {
|
|
243
|
-
u.call();
|
|
244
|
-
} catch (P) {
|
|
245
|
-
a = P;
|
|
246
|
-
}
|
|
247
|
-
e.call(u.prototype);
|
|
248
|
-
}
|
|
249
|
-
} else {
|
|
250
|
-
try {
|
|
251
|
-
throw Error();
|
|
252
|
-
} catch (P) {
|
|
253
|
-
a = P;
|
|
254
|
-
}
|
|
255
|
-
e();
|
|
256
|
-
}
|
|
257
|
-
} catch (P) {
|
|
258
|
-
if (P && a && typeof P.stack == "string") {
|
|
259
|
-
for (var s = P.stack.split(`
|
|
260
|
-
`), C = a.stack.split(`
|
|
261
|
-
`), h = s.length - 1, R = C.length - 1; h >= 1 && R >= 0 && s[h] !== C[R]; )
|
|
262
|
-
R--;
|
|
263
|
-
for (; h >= 1 && R >= 0; h--, R--)
|
|
264
|
-
if (s[h] !== C[R]) {
|
|
265
|
-
if (h !== 1 || R !== 1)
|
|
266
|
-
do
|
|
267
|
-
if (h--, R--, R < 0 || s[h] !== C[R]) {
|
|
268
|
-
var j = `
|
|
269
|
-
` + s[h].replace(" at new ", " at ");
|
|
270
|
-
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && ee.set(e, j), j;
|
|
271
|
-
}
|
|
272
|
-
while (h >= 1 && R >= 0);
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
} finally {
|
|
277
|
-
le = !1, ue.current = v, Xe(), Error.prepareStackTrace = f;
|
|
278
|
-
}
|
|
279
|
-
var L = e ? e.displayName || e.name : "", U = L ? Q(L) : "";
|
|
280
|
-
return typeof e == "function" && ee.set(e, U), U;
|
|
281
|
-
}
|
|
282
|
-
function Qe(e, r, t) {
|
|
283
|
-
return xe(e, !1);
|
|
284
|
-
}
|
|
285
|
-
function er(e) {
|
|
286
|
-
var r = e.prototype;
|
|
287
|
-
return !!(r && r.isReactComponent);
|
|
288
|
-
}
|
|
289
|
-
function re(e, r, t) {
|
|
290
|
-
if (e == null)
|
|
291
|
-
return "";
|
|
292
|
-
if (typeof e == "function")
|
|
293
|
-
return xe(e, er(e));
|
|
294
|
-
if (typeof e == "string")
|
|
295
|
-
return Q(e);
|
|
296
|
-
switch (e) {
|
|
297
|
-
case F:
|
|
298
|
-
return Q("Suspense");
|
|
299
|
-
case p:
|
|
300
|
-
return Q("SuspenseList");
|
|
301
|
-
}
|
|
302
|
-
if (typeof e == "object")
|
|
303
|
-
switch (e.$$typeof) {
|
|
304
|
-
case E:
|
|
305
|
-
return Qe(e.render);
|
|
306
|
-
case x:
|
|
307
|
-
return re(e.type, r, t);
|
|
308
|
-
case i: {
|
|
309
|
-
var a = e, f = a._payload, v = a._init;
|
|
310
|
-
try {
|
|
311
|
-
return re(v(f), r, t);
|
|
312
|
-
} catch {
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
return "";
|
|
317
|
-
}
|
|
318
|
-
var q = Object.prototype.hasOwnProperty, je = {}, ke = b.ReactDebugCurrentFrame;
|
|
319
|
-
function te(e) {
|
|
320
|
-
if (e) {
|
|
321
|
-
var r = e._owner, t = re(e.type, e._source, r ? r.type : null);
|
|
322
|
-
ke.setExtraStackFrame(t);
|
|
323
|
-
} else
|
|
324
|
-
ke.setExtraStackFrame(null);
|
|
325
|
-
}
|
|
326
|
-
function rr(e, r, t, a, f) {
|
|
327
|
-
{
|
|
328
|
-
var v = Function.call.bind(q);
|
|
329
|
-
for (var u in e)
|
|
330
|
-
if (v(e, u)) {
|
|
331
|
-
var s = void 0;
|
|
332
|
-
try {
|
|
333
|
-
if (typeof e[u] != "function") {
|
|
334
|
-
var C = Error((a || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
335
|
-
throw C.name = "Invariant Violation", C;
|
|
336
|
-
}
|
|
337
|
-
s = e[u](r, u, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
338
|
-
} catch (h) {
|
|
339
|
-
s = h;
|
|
340
|
-
}
|
|
341
|
-
s && !(s instanceof Error) && (te(f), 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).", a || "React class", t, u, typeof s), te(null)), s instanceof Error && !(s.message in je) && (je[s.message] = !0, te(f), g("Failed %s type: %s", t, s.message), te(null));
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
var tr = Array.isArray;
|
|
346
|
-
function fe(e) {
|
|
347
|
-
return tr(e);
|
|
348
|
-
}
|
|
349
|
-
function nr(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 ar(e) {
|
|
356
|
-
try {
|
|
357
|
-
return Fe(e), !1;
|
|
358
|
-
} catch {
|
|
359
|
-
return !0;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
function Fe(e) {
|
|
363
|
-
return "" + e;
|
|
364
|
-
}
|
|
365
|
-
function Ie(e) {
|
|
366
|
-
if (ar(e))
|
|
367
|
-
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Fe(e);
|
|
368
|
-
}
|
|
369
|
-
var B = b.ReactCurrentOwner, or = {
|
|
370
|
-
key: !0,
|
|
371
|
-
ref: !0,
|
|
372
|
-
__self: !0,
|
|
373
|
-
__source: !0
|
|
374
|
-
}, De, Me, de;
|
|
375
|
-
de = {};
|
|
376
|
-
function ir(e) {
|
|
377
|
-
if (q.call(e, "ref")) {
|
|
378
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
379
|
-
if (r && r.isReactWarning)
|
|
380
|
-
return !1;
|
|
381
|
-
}
|
|
382
|
-
return e.ref !== void 0;
|
|
383
|
-
}
|
|
384
|
-
function sr(e) {
|
|
385
|
-
if (q.call(e, "key")) {
|
|
386
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
387
|
-
if (r && r.isReactWarning)
|
|
388
|
-
return !1;
|
|
389
|
-
}
|
|
390
|
-
return e.key !== void 0;
|
|
391
|
-
}
|
|
392
|
-
function ur(e, r) {
|
|
393
|
-
if (typeof e.ref == "string" && B.current && r && B.current.stateNode !== r) {
|
|
394
|
-
var t = M(B.current.type);
|
|
395
|
-
de[t] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', M(B.current.type), e.ref), de[t] = !0);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
function cr(e, r) {
|
|
399
|
-
{
|
|
400
|
-
var t = function() {
|
|
401
|
-
De || (De = !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));
|
|
402
|
-
};
|
|
403
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
404
|
-
get: t,
|
|
405
|
-
configurable: !0
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
function lr(e, r) {
|
|
410
|
-
{
|
|
411
|
-
var t = function() {
|
|
412
|
-
Me || (Me = !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));
|
|
413
|
-
};
|
|
414
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
415
|
-
get: t,
|
|
416
|
-
configurable: !0
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
var fr = function(e, r, t, a, f, v, u) {
|
|
421
|
-
var s = {
|
|
422
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
423
|
-
$$typeof: o,
|
|
424
|
-
// Built-in properties that belong on the element
|
|
425
|
-
type: e,
|
|
426
|
-
key: r,
|
|
427
|
-
ref: t,
|
|
428
|
-
props: u,
|
|
429
|
-
// Record the component responsible for creating this element.
|
|
430
|
-
_owner: v
|
|
431
|
-
};
|
|
432
|
-
return s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
433
|
-
configurable: !1,
|
|
434
|
-
enumerable: !1,
|
|
435
|
-
writable: !0,
|
|
436
|
-
value: !1
|
|
437
|
-
}), Object.defineProperty(s, "_self", {
|
|
438
|
-
configurable: !1,
|
|
439
|
-
enumerable: !1,
|
|
440
|
-
writable: !1,
|
|
441
|
-
value: a
|
|
442
|
-
}), Object.defineProperty(s, "_source", {
|
|
443
|
-
configurable: !1,
|
|
444
|
-
enumerable: !1,
|
|
445
|
-
writable: !1,
|
|
446
|
-
value: f
|
|
447
|
-
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
448
|
-
};
|
|
449
|
-
function dr(e, r, t, a, f) {
|
|
450
|
-
{
|
|
451
|
-
var v, u = {}, s = null, C = null;
|
|
452
|
-
t !== void 0 && (Ie(t), s = "" + t), sr(r) && (Ie(r.key), s = "" + r.key), ir(r) && (C = r.ref, ur(r, f));
|
|
453
|
-
for (v in r)
|
|
454
|
-
q.call(r, v) && !or.hasOwnProperty(v) && (u[v] = r[v]);
|
|
455
|
-
if (e && e.defaultProps) {
|
|
456
|
-
var h = e.defaultProps;
|
|
457
|
-
for (v in h)
|
|
458
|
-
u[v] === void 0 && (u[v] = h[v]);
|
|
459
|
-
}
|
|
460
|
-
if (s || C) {
|
|
461
|
-
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
462
|
-
s && cr(u, R), C && lr(u, R);
|
|
463
|
-
}
|
|
464
|
-
return fr(e, s, C, f, a, B.current, u);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
var ve = b.ReactCurrentOwner, Ae = b.ReactDebugCurrentFrame;
|
|
468
|
-
function W(e) {
|
|
469
|
-
if (e) {
|
|
470
|
-
var r = e._owner, t = re(e.type, e._source, r ? r.type : null);
|
|
471
|
-
Ae.setExtraStackFrame(t);
|
|
472
|
-
} else
|
|
473
|
-
Ae.setExtraStackFrame(null);
|
|
474
|
-
}
|
|
475
|
-
var pe;
|
|
476
|
-
pe = !1;
|
|
477
|
-
function ge(e) {
|
|
478
|
-
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
479
|
-
}
|
|
480
|
-
function $e() {
|
|
481
|
-
{
|
|
482
|
-
if (ve.current) {
|
|
483
|
-
var e = M(ve.current.type);
|
|
484
|
-
if (e)
|
|
485
|
-
return `
|
|
486
|
-
|
|
487
|
-
Check the render method of \`` + e + "`.";
|
|
488
|
-
}
|
|
489
|
-
return "";
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
function vr(e) {
|
|
493
|
-
return "";
|
|
494
|
-
}
|
|
495
|
-
var Ue = {};
|
|
496
|
-
function pr(e) {
|
|
497
|
-
{
|
|
498
|
-
var r = $e();
|
|
499
|
-
if (!r) {
|
|
500
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
501
|
-
t && (r = `
|
|
502
|
-
|
|
503
|
-
Check the top-level render call using <` + t + ">.");
|
|
504
|
-
}
|
|
505
|
-
return r;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
function We(e, r) {
|
|
509
|
-
{
|
|
510
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
511
|
-
return;
|
|
512
|
-
e._store.validated = !0;
|
|
513
|
-
var t = pr(r);
|
|
514
|
-
if (Ue[t])
|
|
515
|
-
return;
|
|
516
|
-
Ue[t] = !0;
|
|
517
|
-
var a = "";
|
|
518
|
-
e && e._owner && e._owner !== ve.current && (a = " It was passed a child from " + M(e._owner.type) + "."), W(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, a), W(null);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
function Le(e, r) {
|
|
522
|
-
{
|
|
523
|
-
if (typeof e != "object")
|
|
524
|
-
return;
|
|
525
|
-
if (fe(e))
|
|
526
|
-
for (var t = 0; t < e.length; t++) {
|
|
527
|
-
var a = e[t];
|
|
528
|
-
ge(a) && We(a, r);
|
|
529
|
-
}
|
|
530
|
-
else if (ge(e))
|
|
531
|
-
e._store && (e._store.validated = !0);
|
|
532
|
-
else if (e) {
|
|
533
|
-
var f = O(e);
|
|
534
|
-
if (typeof f == "function" && f !== e.entries)
|
|
535
|
-
for (var v = f.call(e), u; !(u = v.next()).done; )
|
|
536
|
-
ge(u.value) && We(u.value, r);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
function gr(e) {
|
|
541
|
-
{
|
|
542
|
-
var r = e.type;
|
|
543
|
-
if (r == null || typeof r == "string")
|
|
544
|
-
return;
|
|
545
|
-
var t;
|
|
546
|
-
if (typeof r == "function")
|
|
547
|
-
t = r.propTypes;
|
|
548
|
-
else if (typeof r == "object" && (r.$$typeof === E || // Note: Memo only checks outer props here.
|
|
549
|
-
// Inner props are checked in the reconciler.
|
|
550
|
-
r.$$typeof === x))
|
|
551
|
-
t = r.propTypes;
|
|
552
|
-
else
|
|
553
|
-
return;
|
|
554
|
-
if (t) {
|
|
555
|
-
var a = M(r);
|
|
556
|
-
rr(t, e.props, "prop", a, e);
|
|
557
|
-
} else if (r.PropTypes !== void 0 && !pe) {
|
|
558
|
-
pe = !0;
|
|
559
|
-
var f = M(r);
|
|
560
|
-
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
561
|
-
}
|
|
562
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
function br(e) {
|
|
566
|
-
{
|
|
567
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
568
|
-
var a = r[t];
|
|
569
|
-
if (a !== "children" && a !== "key") {
|
|
570
|
-
W(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), W(null);
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
e.ref !== null && (W(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
var Ye = {};
|
|
578
|
-
function Ve(e, r, t, a, f, v) {
|
|
579
|
-
{
|
|
580
|
-
var u = H(e);
|
|
581
|
-
if (!u) {
|
|
582
|
-
var s = "";
|
|
583
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
584
|
-
var C = vr();
|
|
585
|
-
C ? s += C : s += $e();
|
|
586
|
-
var h;
|
|
587
|
-
e === null ? h = "null" : fe(e) ? h = "array" : e !== void 0 && e.$$typeof === o ? (h = "<" + (M(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : h = 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", h, s);
|
|
588
|
-
}
|
|
589
|
-
var R = dr(e, r, t, f, v);
|
|
590
|
-
if (R == null)
|
|
591
|
-
return R;
|
|
592
|
-
if (u) {
|
|
593
|
-
var j = r.children;
|
|
594
|
-
if (j !== void 0)
|
|
595
|
-
if (a)
|
|
596
|
-
if (fe(j)) {
|
|
597
|
-
for (var L = 0; L < j.length; L++)
|
|
598
|
-
Le(j[L], e);
|
|
599
|
-
Object.freeze && Object.freeze(j);
|
|
600
|
-
} else
|
|
601
|
-
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.");
|
|
602
|
-
else
|
|
603
|
-
Le(j, e);
|
|
604
|
-
}
|
|
605
|
-
if (q.call(r, "key")) {
|
|
606
|
-
var U = M(e), P = Object.keys(r).filter(function(_r) {
|
|
607
|
-
return _r !== "key";
|
|
608
|
-
}), be = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
609
|
-
if (!Ye[U + be]) {
|
|
610
|
-
var Rr = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
|
|
611
|
-
g(`A props object containing a "key" prop is being spread into JSX:
|
|
612
|
-
let props = %s;
|
|
613
|
-
<%s {...props} />
|
|
614
|
-
React keys must be passed directly to JSX without using spread:
|
|
615
|
-
let props = %s;
|
|
616
|
-
<%s key={someKey} {...props} />`, be, U, Rr, U), Ye[U + be] = !0;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
return e === c ? br(R) : gr(R), R;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function mr(e, r, t) {
|
|
623
|
-
return Ve(e, r, t, !0);
|
|
624
|
-
}
|
|
625
|
-
function yr(e, r, t) {
|
|
626
|
-
return Ve(e, r, t, !1);
|
|
627
|
-
}
|
|
628
|
-
var hr = yr, Er = mr;
|
|
629
|
-
K.Fragment = c, K.jsx = hr, K.jsxs = Er;
|
|
630
|
-
}()), K;
|
|
631
|
-
}
|
|
632
|
-
process.env.NODE_ENV === "production" ? ye.exports = Sr() : ye.exports = Cr();
|
|
633
|
-
var ae = ye.exports;
|
|
634
|
-
const T = [];
|
|
635
|
-
for (let n = 0; n < 256; ++n)
|
|
636
|
-
T.push((n + 256).toString(16).slice(1));
|
|
637
|
-
function Or(n, o = 0) {
|
|
638
|
-
return (T[n[o + 0]] + T[n[o + 1]] + T[n[o + 2]] + T[n[o + 3]] + "-" + T[n[o + 4]] + T[n[o + 5]] + "-" + T[n[o + 6]] + T[n[o + 7]] + "-" + T[n[o + 8]] + T[n[o + 9]] + "-" + T[n[o + 10]] + T[n[o + 11]] + T[n[o + 12]] + T[n[o + 13]] + T[n[o + 14]] + T[n[o + 15]]).toLowerCase();
|
|
639
|
-
}
|
|
640
|
-
let me;
|
|
641
|
-
const Pr = new Uint8Array(16);
|
|
642
|
-
function xr() {
|
|
643
|
-
if (!me) {
|
|
644
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
645
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
646
|
-
me = crypto.getRandomValues.bind(crypto);
|
|
647
|
-
}
|
|
648
|
-
return me(Pr);
|
|
649
|
-
}
|
|
650
|
-
const jr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ke = { randomUUID: jr };
|
|
651
|
-
function kr(n, o, S) {
|
|
652
|
-
var _;
|
|
653
|
-
if (Ke.randomUUID && !o && !n)
|
|
654
|
-
return Ke.randomUUID();
|
|
655
|
-
n = n || {};
|
|
656
|
-
const c = n.random ?? ((_ = n.rng) == null ? void 0 : _.call(n)) ?? xr();
|
|
657
|
-
if (c.length < 16)
|
|
658
|
-
throw new Error("Random bytes length must be >= 16");
|
|
659
|
-
return c[6] = c[6] & 15 | 64, c[8] = c[8] & 63 | 128, Or(c);
|
|
660
|
-
}
|
|
661
|
-
const he = wr(null), Fr = ({ children: n }) => {
|
|
662
|
-
const [o, S] = Z({}), c = oe({}), _ = oe({}), w = Y((i, d, l) => {
|
|
663
|
-
S((y) => ({ ...y, [i]: { origin: d, frameRef: l } }));
|
|
664
|
-
}, []), k = Y((i) => {
|
|
665
|
-
S((d) => {
|
|
666
|
-
const l = { ...d };
|
|
667
|
-
return delete l[i], l;
|
|
668
|
-
});
|
|
669
|
-
}, []);
|
|
670
|
-
A(() => {
|
|
671
|
-
const i = (l = [], y) => {
|
|
672
|
-
l.forEach((O) => O(y));
|
|
673
|
-
}, d = (l) => {
|
|
674
|
-
var g, I, D, G, z;
|
|
675
|
-
if (!((g = l == null ? void 0 : l.data) != null && g.instanceId))
|
|
676
|
-
return;
|
|
677
|
-
const { instanceId: y, type: O } = l.data, b = c.current;
|
|
678
|
-
if (O === "response") {
|
|
679
|
-
const { callbackId: ie, response: se, error: X } = l.data, H = _.current[ie];
|
|
680
|
-
H && H(se, X);
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
i((I = b[y]) == null ? void 0 : I[O], l.data), i((D = b["*"]) == null ? void 0 : D[O], l.data), i((G = b[y]) == null ? void 0 : G["*"], l.data), i((z = b["*"]) == null ? void 0 : z["*"], l.data);
|
|
684
|
-
};
|
|
685
|
-
return window.addEventListener("message", d), () => {
|
|
686
|
-
window.removeEventListener("message", d);
|
|
687
|
-
};
|
|
688
|
-
}, [o]);
|
|
689
|
-
const m = Y(
|
|
690
|
-
(i, d, l) => {
|
|
691
|
-
var O, b;
|
|
692
|
-
const y = o[i];
|
|
693
|
-
if (!y) {
|
|
694
|
-
console.warn(`Origin not set for id: ${i}. Unable to send message.`);
|
|
695
|
-
return;
|
|
696
|
-
}
|
|
697
|
-
(b = (O = y == null ? void 0 : y.frameRef) == null ? void 0 : O.current) != null && b.contentWindow && y.frameRef.current.contentWindow.postMessage(
|
|
698
|
-
{ type: d, ...l, instanceId: i },
|
|
699
|
-
y.origin
|
|
700
|
-
);
|
|
701
|
-
},
|
|
702
|
-
[o]
|
|
703
|
-
), E = Y(
|
|
704
|
-
async (i, d, l = {}) => new Promise((y, O) => {
|
|
705
|
-
const b = kr(), g = (I, D) => {
|
|
706
|
-
delete _.current[b], D ? O(D) : y(I);
|
|
707
|
-
};
|
|
708
|
-
_.current[b] = g, m(i, "request", { callbackId: b, requestType: d, data: l });
|
|
709
|
-
}),
|
|
710
|
-
[m]
|
|
711
|
-
), F = Y(
|
|
712
|
-
(i, d) => {
|
|
713
|
-
m(i, "load-options", d);
|
|
714
|
-
},
|
|
715
|
-
[m]
|
|
716
|
-
), p = Y(
|
|
717
|
-
(i, d) => {
|
|
718
|
-
m(i, "validate", d);
|
|
719
|
-
},
|
|
720
|
-
[m]
|
|
721
|
-
), x = Tr(
|
|
722
|
-
() => ({
|
|
723
|
-
registerFrame: w,
|
|
724
|
-
unregisterFrame: k,
|
|
725
|
-
sendMessage: m,
|
|
726
|
-
sendRequest: E,
|
|
727
|
-
loadOptions: F,
|
|
728
|
-
validate: p,
|
|
729
|
-
addListener: (i, d, l) => (c.current[i] || (c.current[i] = {}), c.current[i][d] || (c.current[i][d] = []), c.current[i][d].push(l), () => {
|
|
730
|
-
c.current[i][d] = c.current[i][d].filter((y) => y !== l);
|
|
731
|
-
})
|
|
732
|
-
}),
|
|
733
|
-
[
|
|
734
|
-
w,
|
|
735
|
-
k,
|
|
736
|
-
m,
|
|
737
|
-
E,
|
|
738
|
-
F,
|
|
739
|
-
p
|
|
740
|
-
]
|
|
741
|
-
);
|
|
742
|
-
return /* @__PURE__ */ ae.jsx(he.Provider, { value: x, children: n });
|
|
743
|
-
}, ne = {}, Ir = async (n) => {
|
|
744
|
-
try {
|
|
745
|
-
const o = new URL(n).origin;
|
|
746
|
-
if (ne[o] !== void 0)
|
|
747
|
-
return ne[o];
|
|
748
|
-
const c = await (await fetch(`${o}/mm-app-manifest.json`)).json();
|
|
749
|
-
if (!c.version)
|
|
750
|
-
throw new Error("Invalid manifest");
|
|
751
|
-
return ne[o] = c, c;
|
|
752
|
-
} catch {
|
|
753
|
-
}
|
|
754
|
-
return ne[origin] = !1, !1;
|
|
755
|
-
}, Dr = async (n) => !!await Ir(n), Mr = (n, o, S) => {
|
|
756
|
-
const c = Ne(he);
|
|
757
|
-
if (c === null)
|
|
758
|
-
throw new Error(
|
|
759
|
-
"useEmbeddedEffect must be used within a MMEmbeddableZoneProvider"
|
|
760
|
-
);
|
|
761
|
-
const _ = oe(S);
|
|
762
|
-
A(() => {
|
|
763
|
-
_.current = S;
|
|
764
|
-
}, [S]), A(() => {
|
|
765
|
-
if (!(!n || !o))
|
|
766
|
-
return c.addListener(
|
|
767
|
-
n,
|
|
768
|
-
o,
|
|
769
|
-
(...w) => _.current(...w)
|
|
770
|
-
);
|
|
771
|
-
}, [c, n, o]);
|
|
772
|
-
};
|
|
773
|
-
Fr.propTypes = {
|
|
774
|
-
children: N.node.isRequired
|
|
775
|
-
};
|
|
776
|
-
const Ar = qe.default || qe, $r = Ar.iframe`
|
|
777
|
-
width: 100%;
|
|
778
|
-
height: 100%;
|
|
779
|
-
border: none;
|
|
780
|
-
visibility: ${(n) => n.$isReady ? "visible" : "hidden"};
|
|
781
|
-
`, Ur = ({
|
|
782
|
-
id: n,
|
|
783
|
-
src: o,
|
|
784
|
-
path: S,
|
|
785
|
-
onInit: c = () => {
|
|
786
|
-
},
|
|
787
|
-
context: _,
|
|
788
|
-
params: w,
|
|
789
|
-
...k
|
|
790
|
-
}) => {
|
|
791
|
-
if ("isConfiguring" in k)
|
|
792
|
-
return console.error(
|
|
793
|
-
"isConfiguring must be passed via the params prop to MMEmbeddableZone"
|
|
794
|
-
), null;
|
|
795
|
-
if ("colorMode" in _)
|
|
796
|
-
return console.error(
|
|
797
|
-
"colorMode must be passed via the params prop to MMEmbeddableZone"
|
|
798
|
-
), null;
|
|
799
|
-
if ("isFullScreen" in _)
|
|
800
|
-
return console.error(
|
|
801
|
-
"isFullScreen must be passed via the params prop to MMEmbeddableZone"
|
|
802
|
-
), null;
|
|
803
|
-
const m = oe(), [E, F] = Z(), [p, x] = Z(0), { registerFrame: i, unregisterFrame: d, sendMessage: l } = Ne(
|
|
804
|
-
he
|
|
805
|
-
), [y, O] = Z(!0), [b, g] = Z();
|
|
806
|
-
return A(() => {
|
|
807
|
-
p && l(n, "set-context", {
|
|
808
|
-
context: {
|
|
809
|
-
..._,
|
|
810
|
-
// TODO: Remove this once everything is migrated to params
|
|
811
|
-
colorMode: w.colorMode,
|
|
812
|
-
isFullScreen: w.isFullScreen
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
|
-
}, [_, w.colorMode, w.isFullScreen, n, p]), A(() => {
|
|
816
|
-
p && (l(n, "set-params", { params: w }), l(n, "set-configuring", { isConfiguring: w.isConfiguring }));
|
|
817
|
-
}, [w, n, p]), A(() => {
|
|
818
|
-
S !== void 0 && g(S);
|
|
819
|
-
}, [S]), A(() => {
|
|
820
|
-
b === void 0 || !p || l(n, "navigate", { path: b });
|
|
821
|
-
}, [b, p, n, l]), A(() => {
|
|
822
|
-
if (!(!o || !n || !m))
|
|
823
|
-
return (async () => {
|
|
824
|
-
const I = await Dr(o);
|
|
825
|
-
if (O(I), I) {
|
|
826
|
-
const D = new URL(o);
|
|
827
|
-
i(n, D.origin, m), c(), F(
|
|
828
|
-
`${D.origin}/mm-embedded-interop?id=${n}&origin=${window.location.origin}`
|
|
829
|
-
);
|
|
830
|
-
return;
|
|
831
|
-
}
|
|
832
|
-
})(), () => {
|
|
833
|
-
d(n);
|
|
834
|
-
};
|
|
835
|
-
}, [o, n, i, m]), Mr(n, "ready", () => x((I) => I + 1)), y ? /* @__PURE__ */ ae.jsx($r, { $isReady: p, ref: m, src: E, ...k }) : /* @__PURE__ */ ae.jsx(
|
|
836
|
-
"div",
|
|
837
|
-
{
|
|
838
|
-
style: {
|
|
839
|
-
height: "100%",
|
|
840
|
-
display: "flex",
|
|
841
|
-
alignItems: "center",
|
|
842
|
-
justifyContent: "center"
|
|
843
|
-
},
|
|
844
|
-
children: /* @__PURE__ */ ae.jsx("div", { style: { textAlign: "center" }, children: "Application must adhere to the MM App Manifest specification to be embedded." })
|
|
845
|
-
}
|
|
846
|
-
);
|
|
847
|
-
};
|
|
848
|
-
Ur.propTypes = {
|
|
849
|
-
id: N.string,
|
|
850
|
-
src: N.string.isRequired,
|
|
851
|
-
path: N.string,
|
|
852
|
-
onInit: N.func
|
|
853
|
-
};
|
|
854
|
-
export {
|
|
855
|
-
Ur as MMEmbeddableZone,
|
|
856
|
-
he as MMEmbeddableZoneContext,
|
|
857
|
-
Fr as MMEmbeddableZoneProvider,
|
|
858
|
-
Ir as getAppInfo,
|
|
859
|
-
Dr as testIsEmbeddable,
|
|
860
|
-
Mr as useEmbeddedEffect
|
|
861
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
(function(P,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("prop-types"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","styled-components"],c):(P=typeof globalThis<"u"?globalThis:P||self,c(P["mm-react-embeddable"]={},P.React,P.PropTypes,P.styled))})(this,function(P,c,Z,ye){"use strict";var oe={exports:{}},B={};/**
|
|
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 he;function He(){if(he)return B;he=1;var n=c,o=Symbol.for("react.element"),T=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function I(y,R,F){var b,k={},i=null,v=null;F!==void 0&&(i=""+F),R.key!==void 0&&(i=""+R.key),R.ref!==void 0&&(v=R.ref);for(b in R)l.call(R,b)&&!C.hasOwnProperty(b)&&(k[b]=R[b]);if(y&&y.defaultProps)for(b in R=y.defaultProps,R)k[b]===void 0&&(k[b]=R[b]);return{$$typeof:o,type:y,key:i,ref:v,props:k,_owner:w.current}}return B.Fragment=T,B.jsx=I,B.jsxs=I,B}var J={};/**
|
|
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 Ee;function Qe(){return Ee||(Ee=1,process.env.NODE_ENV!=="production"&&function(){var n=c,o=Symbol.for("react.element"),T=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),y=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),i=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),f=Symbol.iterator,h="@@iterator";function j(e){if(e===null||typeof e!="object")return null;var r=f&&e[f]||e[h];return typeof r=="function"?r:null}var m=n.__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),a=1;a<r;a++)t[a-1]=arguments[a];D("error",e,t)}}function D(e,r,t){{var a=m.ReactDebugCurrentFrame,d=a.getStackAddendum();d!==""&&(r+="%s",t=t.concat([d]));var p=t.map(function(u){return String(u)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var A=!1,Q=!1,q=!1,se=!1,ue=!1,$;$=Symbol.for("react.module.reference");function ee(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===C||ue||e===w||e===F||e===b||se||e===v||A||Q||q||typeof e=="object"&&e!==null&&(e.$$typeof===i||e.$$typeof===k||e.$$typeof===I||e.$$typeof===y||e.$$typeof===R||e.$$typeof===$||e.getModuleId!==void 0))}function nr(e,r,t){var a=e.displayName;if(a)return a;var d=r.displayName||r.name||"";return d!==""?t+"("+d+")":t}function Oe(e){return e.displayName||"Context"}function U(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 l:return"Fragment";case T:return"Portal";case C:return"Profiler";case w:return"StrictMode";case F:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return Oe(r)+".Consumer";case I:var t=e;return Oe(t._context)+".Provider";case R:return nr(e,e.render,"ForwardRef");case k:var a=e.displayName||null;return a!==null?a:U(e.type)||"Memo";case i:{var d=e,p=d._payload,u=d._init;try{return U(u(p))}catch{return null}}}return null}var W=Object.assign,K=0,Pe,je,xe,ke,Me,Ie,Fe;function De(){}De.__reactDisabledLog=!0;function ar(){{if(K===0){Pe=console.log,je=console.info,xe=console.warn,ke=console.error,Me=console.group,Ie=console.groupCollapsed,Fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:De,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function or(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},e,{value:Pe}),info:W({},e,{value:je}),warn:W({},e,{value:xe}),error:W({},e,{value:ke}),group:W({},e,{value:Me}),groupCollapsed:W({},e,{value:Ie}),groupEnd:W({},e,{value:Fe})})}K<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=m.ReactCurrentDispatcher,le;function re(e,r,t){{if(le===void 0)try{throw Error()}catch(d){var a=d.stack.trim().match(/\n( *(at )?)/);le=a&&a[1]||""}return`
|
|
18
|
-
`+le+e}}var fe=!1,te;{var ir=typeof WeakMap=="function"?WeakMap:Map;te=new ir}function Ae(e,r){if(!e||fe)return"";{var t=te.get(e);if(t!==void 0)return t}var a;fe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ce.current,ce.current=null,ar();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(x){a=x}Reflect.construct(e,[],u)}else{try{u.call()}catch(x){a=x}e.call(u.prototype)}}else{try{throw Error()}catch(x){a=x}e()}}catch(x){if(x&&a&&typeof x.stack=="string"){for(var s=x.stack.split(`
|
|
19
|
-
`),O=a.stack.split(`
|
|
20
|
-
`),E=s.length-1,_=O.length-1;E>=1&&_>=0&&s[E]!==O[_];)_--;for(;E>=1&&_>=0;E--,_--)if(s[E]!==O[_]){if(E!==1||_!==1)do if(E--,_--,_<0||s[E]!==O[_]){var M=`
|
|
21
|
-
`+s[E].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),typeof e=="function"&&te.set(e,M),M}while(E>=1&&_>=0);break}}}finally{fe=!1,ce.current=p,or(),Error.prepareStackTrace=d}var V=e?e.displayName||e.name:"",L=V?re(V):"";return typeof e=="function"&&te.set(e,L),L}function sr(e,r,t){return Ae(e,!1)}function ur(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ne(e,r,t){if(e==null)return"";if(typeof e=="function")return Ae(e,ur(e));if(typeof e=="string")return re(e);switch(e){case F:return re("Suspense");case b:return re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case R:return sr(e.render);case k:return ne(e.type,r,t);case i:{var a=e,d=a._payload,p=a._init;try{return ne(p(d),r,t)}catch{}}}return""}var N=Object.prototype.hasOwnProperty,Ue={},We=m.ReactDebugCurrentFrame;function ae(e){if(e){var r=e._owner,t=ne(e.type,e._source,r?r.type:null);We.setExtraStackFrame(t)}else We.setExtraStackFrame(null)}function cr(e,r,t,a,d){{var p=Function.call.bind(N);for(var u in e)if(p(e,u)){var s=void 0;try{if(typeof e[u]!="function"){var O=Error((a||"React class")+": "+t+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}s=e[u](r,u,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){s=E}s&&!(s instanceof Error)&&(ae(d),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).",a||"React class",t,u,typeof s),ae(null)),s instanceof Error&&!(s.message in Ue)&&(Ue[s.message]=!0,ae(d),g("Failed %s type: %s",t,s.message),ae(null))}}}var lr=Array.isArray;function de(e){return lr(e)}function fr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function dr(e){try{return Le(e),!1}catch{return!0}}function Le(e){return""+e}function Ye(e){if(dr(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fr(e)),Le(e)}var G=m.ReactCurrentOwner,vr={key:!0,ref:!0,__self:!0,__source:!0},Ve,Ze,ve;ve={};function pr(e){if(N.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function br(e){if(N.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function gr(e,r){if(typeof e.ref=="string"&&G.current&&r&&G.current.stateNode!==r){var t=U(G.current.type);ve[t]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',U(G.current.type),e.ref),ve[t]=!0)}}function mr(e,r){{var t=function(){Ve||(Ve=!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 yr(e,r){{var t=function(){Ze||(Ze=!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 hr=function(e,r,t,a,d,p,u){var s={$$typeof:o,type:e,key:r,ref:t,props:u,_owner:p};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function Er(e,r,t,a,d){{var p,u={},s=null,O=null;t!==void 0&&(Ye(t),s=""+t),br(r)&&(Ye(r.key),s=""+r.key),pr(r)&&(O=r.ref,gr(r,d));for(p in r)N.call(r,p)&&!vr.hasOwnProperty(p)&&(u[p]=r[p]);if(e&&e.defaultProps){var E=e.defaultProps;for(p in E)u[p]===void 0&&(u[p]=E[p])}if(s||O){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&mr(u,_),O&&yr(u,_)}return hr(e,s,O,d,a,G.current,u)}}var pe=m.ReactCurrentOwner,Be=m.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,t=ne(e.type,e._source,r?r.type:null);Be.setExtraStackFrame(t)}else Be.setExtraStackFrame(null)}var be;be=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Je(){{if(pe.current){var e=U(pe.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function Rr(e){return""}var Ke={};function _r(e){{var r=Je();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 Ne(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=_r(r);if(Ke[t])return;Ke[t]=!0;var a="";e&&e._owner&&e._owner!==pe.current&&(a=" It was passed a child from "+U(e._owner.type)+"."),Y(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,a),Y(null)}}function Ge(e,r){{if(typeof e!="object")return;if(de(e))for(var t=0;t<e.length;t++){var a=e[t];ge(a)&&Ne(a,r)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var d=j(e);if(typeof d=="function"&&d!==e.entries)for(var p=d.call(e),u;!(u=p.next()).done;)ge(u.value)&&Ne(u.value,r)}}}function wr(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===R||r.$$typeof===k))t=r.propTypes;else return;if(t){var a=U(r);cr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!be){be=!0;var d=U(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",d||"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 Sr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){Y(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),Y(null);break}}e.ref!==null&&(Y(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}var ze={};function Xe(e,r,t,a,d,p){{var u=ee(e);if(!u){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" 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 O=Rr();O?s+=O:s+=Je();var E;e===null?E="null":de(e)?E="array":e!==void 0&&e.$$typeof===o?(E="<"+(U(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):E=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",E,s)}var _=Er(e,r,t,d,p);if(_==null)return _;if(u){var M=r.children;if(M!==void 0)if(a)if(de(M)){for(var V=0;V<M.length;V++)Ge(M[V],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 Ge(M,e)}if(N.call(r,"key")){var L=U(e),x=Object.keys(r).filter(function(xr){return xr!=="key"}),me=x.length>0?"{key: someKey, "+x.join(": ..., ")+": ...}":"{key: someKey}";if(!ze[L+me]){var jr=x.length>0?"{"+x.join(": ..., ")+": ...}":"{}";g(`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} />`,me,L,jr,L),ze[L+me]=!0}}return e===l?Sr(_):wr(_),_}}function Cr(e,r,t){return Xe(e,r,t,!0)}function Tr(e,r,t){return Xe(e,r,t,!1)}var Or=Tr,Pr=Cr;J.Fragment=l,J.jsx=Or,J.jsxs=Pr}()),J}process.env.NODE_ENV==="production"?oe.exports=He():oe.exports=Qe();var z=oe.exports;const S=[];for(let n=0;n<256;++n)S.push((n+256).toString(16).slice(1));function qe(n,o=0){return(S[n[o+0]]+S[n[o+1]]+S[n[o+2]]+S[n[o+3]]+"-"+S[n[o+4]]+S[n[o+5]]+"-"+S[n[o+6]]+S[n[o+7]]+"-"+S[n[o+8]]+S[n[o+9]]+"-"+S[n[o+10]]+S[n[o+11]]+S[n[o+12]]+S[n[o+13]]+S[n[o+14]]+S[n[o+15]]).toLowerCase()}let ie;const $e=new Uint8Array(16);function er(){if(!ie){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ie=crypto.getRandomValues.bind(crypto)}return ie($e)}const Re={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rr(n,o,T){var w;if(Re.randomUUID&&!o&&!n)return Re.randomUUID();n=n||{};const l=n.random??((w=n.rng)==null?void 0:w.call(n))??er();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,qe(l)}const X=c.createContext(null),_e=({children:n})=>{const[o,T]=c.useState({}),l=c.useRef({}),w=c.useRef({}),C=c.useCallback((i,v,f)=>{T(h=>({...h,[i]:{origin:v,frameRef:f}}))},[]),I=c.useCallback(i=>{T(v=>{const f={...v};return delete f[i],f})},[]);c.useEffect(()=>{const i=(f=[],h)=>{f.forEach(j=>j(h))},v=f=>{var g,D,A,Q,q;if(!((g=f==null?void 0:f.data)!=null&&g.instanceId))return;const{instanceId:h,type:j}=f.data,m=l.current;if(j==="response"){const{callbackId:se,response:ue,error:$}=f.data,ee=w.current[se];ee&&ee(ue,$);return}i((D=m[h])==null?void 0:D[j],f.data),i((A=m["*"])==null?void 0:A[j],f.data),i((Q=m[h])==null?void 0:Q["*"],f.data),i((q=m["*"])==null?void 0:q["*"],f.data)};return window.addEventListener("message",v),()=>{window.removeEventListener("message",v)}},[o]);const y=c.useCallback((i,v,f)=>{var j,m;const h=o[i];if(!h){console.warn(`Origin not set for id: ${i}. Unable to send message.`);return}(m=(j=h==null?void 0:h.frameRef)==null?void 0:j.current)!=null&&m.contentWindow&&h.frameRef.current.contentWindow.postMessage({type:v,...f,instanceId:i},h.origin)},[o]),R=c.useCallback(async(i,v,f={})=>new Promise((h,j)=>{const m=rr(),g=(D,A)=>{delete w.current[m],A?j(A):h(D)};w.current[m]=g,y(i,"request",{callbackId:m,requestType:v,data:f})}),[y]),F=c.useCallback((i,v)=>{y(i,"load-options",v)},[y]),b=c.useCallback((i,v)=>{y(i,"validate",v)},[y]),k=c.useMemo(()=>({registerFrame:C,unregisterFrame:I,sendMessage:y,sendRequest:R,loadOptions:F,validate:b,addListener:(i,v,f)=>(l.current[i]||(l.current[i]={}),l.current[i][v]||(l.current[i][v]=[]),l.current[i][v].push(f),()=>{l.current[i][v]=l.current[i][v].filter(h=>h!==f)})}),[C,I,y,R,F,b]);return z.jsx(X.Provider,{value:k,children:n})},H={},we=async n=>{try{const o=new URL(n).origin;if(H[o]!==void 0)return H[o];const l=await(await fetch(`${o}/mm-app-manifest.json`)).json();if(!l.version)throw new Error("Invalid manifest");return H[o]=l,l}catch{}return H[origin]=!1,!1},Se=async n=>!!await we(n),Ce=(n,o,T)=>{const l=c.useContext(X);if(l===null)throw new Error("useEmbeddedEffect must be used within a MMEmbeddableZoneProvider");const w=c.useRef(T);c.useEffect(()=>{w.current=T},[T]),c.useEffect(()=>{if(!(!n||!o))return l.addListener(n,o,(...C)=>w.current(...C))},[l,n,o])};_e.propTypes={children:Z.node.isRequired};const tr=(ye.default||ye).iframe`
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
border: none;
|
|
34
|
-
visibility: ${n=>n.$isReady?"visible":"hidden"};
|
|
35
|
-
`,Te=({id:n,src:o,path:T,onInit:l=()=>{},context:w,params:C,...I})=>{if("isConfiguring"in I)return console.error("isConfiguring must be passed via the params prop to MMEmbeddableZone"),null;if("colorMode"in w)return console.error("colorMode must be passed via the params prop to MMEmbeddableZone"),null;if("isFullScreen"in w)return console.error("isFullScreen must be passed via the params prop to MMEmbeddableZone"),null;const y=c.useRef(),[R,F]=c.useState(),[b,k]=c.useState(0),{registerFrame:i,unregisterFrame:v,sendMessage:f}=c.useContext(X),[h,j]=c.useState(!0),[m,g]=c.useState();return c.useEffect(()=>{b&&f(n,"set-context",{context:{...w,colorMode:C.colorMode,isFullScreen:C.isFullScreen}})},[w,C.colorMode,C.isFullScreen,n,b]),c.useEffect(()=>{b&&(f(n,"set-params",{params:C}),f(n,"set-configuring",{isConfiguring:C.isConfiguring}))},[C,n,b]),c.useEffect(()=>{T!==void 0&&g(T)},[T]),c.useEffect(()=>{m===void 0||!b||f(n,"navigate",{path:m})},[m,b,n,f]),c.useEffect(()=>{if(!(!o||!n||!y))return(async()=>{const D=await Se(o);if(j(D),D){const A=new URL(o);i(n,A.origin,y),l(),F(`${A.origin}/mm-embedded-interop?id=${n}&origin=${window.location.origin}`);return}})(),()=>{v(n)}},[o,n,i,y]),Ce(n,"ready",()=>k(D=>D+1)),h?z.jsx(tr,{$isReady:b,ref:y,src:R,...I}):z.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:z.jsx("div",{style:{textAlign:"center"},children:"Application must adhere to the MM App Manifest specification to be embedded."})})};Te.propTypes={id:Z.string,src:Z.string.isRequired,path:Z.string,onInit:Z.func},P.MMEmbeddableZone=Te,P.MMEmbeddableZoneContext=X,P.MMEmbeddableZoneProvider=_e,P.getAppInfo=we,P.testIsEmbeddable=Se,P.useEmbeddedEffect=Ce,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
|