@customerglu/react-web-sdk
Version:
This React Component allows developers to integrate with CustomerGlu Gamification Platform easily
50 lines (47 loc) • 31.3 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Te=require("react");function Wr(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Le={exports:{}},he={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var tr;function Lr(){if(tr)return he;tr=1;var o=Te,j=Symbol.for("react.element"),S=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,E=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function O(d,p,P){var c,g={},$=null,F=null;P!==void 0&&($=""+P),p.key!==void 0&&($=""+p.key),p.ref!==void 0&&(F=p.ref);for(c in p)s.call(p,c)&&!l.hasOwnProperty(c)&&(g[c]=p[c]);if(d&&d.defaultProps)for(c in p=d.defaultProps,p)g[c]===void 0&&(g[c]=p[c]);return{$$typeof:j,type:d,key:$,ref:F,props:g,_owner:E.current}}return he.Fragment=S,he.jsx=O,he.jsxs=O,he}var Ee={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var nr;function qr(){return nr||(nr=1,process.env.NODE_ENV!=="production"&&function(){var o=Te,j=Symbol.for("react.element"),S=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),N=Symbol.iterator,M="@@iterator";function V(e){if(e===null||typeof e!="object")return null;var r=N&&e[N]||e[M];return typeof r=="function"?r:null}var U=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),f=1;f<r;f++)a[f-1]=arguments[f];z("error",e,a)}}function z(e,r,a){{var f=U.ReactDebugCurrentFrame,A=f.getStackAddendum();A!==""&&(r+="%s",a=a.concat([A]));var D=a.map(function(w){return String(w)});D.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,D)}}var L=!1,i=!1,re=!1,ve=!1,pe=!1,ie;ie=Symbol.for("react.module.reference");function ye(e){return!!(typeof e=="string"||typeof e=="function"||e===s||e===l||pe||e===E||e===P||e===c||ve||e===F||L||i||re||typeof e=="object"&&e!==null&&(e.$$typeof===$||e.$$typeof===g||e.$$typeof===O||e.$$typeof===d||e.$$typeof===p||e.$$typeof===ie||e.getModuleId!==void 0))}function ue(e,r,a){var f=e.displayName;if(f)return f;var A=r.displayName||r.name||"";return A!==""?a+"("+A+")":a}function se(e){return e.displayName||"Context"}function J(e){if(e==null)return null;if(typeof e.tag=="number"&&Y("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 s:return"Fragment";case S:return"Portal";case l:return"Profiler";case E:return"StrictMode";case P:return"Suspense";case c:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var r=e;return se(r)+".Consumer";case O:var a=e;return se(a._context)+".Provider";case p:return ue(e,e.render,"ForwardRef");case g:var f=e.displayName||null;return f!==null?f:J(e.type)||"Memo";case $:{var A=e,D=A._payload,w=A._init;try{return J(w(D))}catch{return null}}}return null}var K=Object.assign,te=0,H,ee,ne,ce,t,u,h;function b(){}b.__reactDisabledLog=!0;function v(){{if(te===0){H=console.log,ee=console.info,ne=console.warn,ce=console.error,t=console.group,u=console.groupCollapsed,h=console.groupEnd;var e={configurable:!0,enumerable:!0,value:b,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}te++}}function C(){{if(te--,te===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},e,{value:H}),info:K({},e,{value:ee}),warn:K({},e,{value:ne}),error:K({},e,{value:ce}),group:K({},e,{value:t}),groupCollapsed:K({},e,{value:u}),groupEnd:K({},e,{value:h})})}te<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=U.ReactCurrentDispatcher,m;function T(e,r,a){{if(m===void 0)try{throw Error()}catch(A){var f=A.stack.trim().match(/\n( *(at )?)/);m=f&&f[1]||""}return`
`+m+e}}var x=!1,_;{var G=typeof WeakMap=="function"?WeakMap:Map;_=new G}function n(e,r){if(!e||x)return"";{var a=_.get(e);if(a!==void 0)return a}var f;x=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=y.current,y.current=null,v();try{if(r){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(X){f=X}Reflect.construct(e,[],w)}else{try{w.call()}catch(X){f=X}e.call(w.prototype)}}else{try{throw Error()}catch(X){f=X}e()}}catch(X){if(X&&f&&typeof X.stack=="string"){for(var R=X.stack.split(`
`),B=f.stack.split(`
`),W=R.length-1,q=B.length-1;W>=1&&q>=0&&R[W]!==B[q];)q--;for(;W>=1&&q>=0;W--,q--)if(R[W]!==B[q]){if(W!==1||q!==1)do if(W--,q--,q<0||R[W]!==B[q]){var Q=`
`+R[W].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),typeof e=="function"&&_.set(e,Q),Q}while(W>=1&&q>=0);break}}}finally{x=!1,y.current=D,C(),Error.prepareStackTrace=A}var de=e?e.displayName||e.name:"",oe=de?T(de):"";return typeof e=="function"&&_.set(e,oe),oe}function Z(e,r,a){return n(e,!1)}function fe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ae(e,r,a){if(e==null)return"";if(typeof e=="function")return n(e,fe(e));if(typeof e=="string")return T(e);switch(e){case P:return T("Suspense");case c:return T("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Z(e.render);case g:return ae(e.type,r,a);case $:{var f=e,A=f._payload,D=f._init;try{return ae(D(A),r,a)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,ze={},Ve=U.ReactDebugCurrentFrame;function _e(e){if(e){var r=e._owner,a=ae(e.type,e._source,r?r.type:null);Ve.setExtraStackFrame(a)}else Ve.setExtraStackFrame(null)}function br(e,r,a,f,A){{var D=Function.call.bind(me);for(var w in e)if(D(e,w)){var R=void 0;try{if(typeof e[w]!="function"){var B=Error((f||"React class")+": "+a+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw B.name="Invariant Violation",B}R=e[w](r,w,f,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(W){R=W}R&&!(R instanceof Error)&&(_e(A),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",f||"React class",a,w,typeof R),_e(null)),R instanceof Error&&!(R.message in ze)&&(ze[R.message]=!0,_e(A),Y("Failed %s type: %s",a,R.message),_e(null))}}}var hr=Array.isArray;function Pe(e){return hr(e)}function Er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function gr(e){try{return Ne(e),!1}catch{return!0}}function Ne(e){return""+e}function Ge(e){if(gr(e))return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Er(e)),Ne(e)}var be=U.ReactCurrentOwner,Tr={key:!0,ref:!0,__self:!0,__source:!0},Be,Je,Ce;Ce={};function _r(e){if(me.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Rr(e){if(me.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Sr(e,r){if(typeof e.ref=="string"&&be.current&&r&&be.current.stateNode!==r){var a=J(be.current.type);Ce[a]||(Y('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',J(be.current.type),e.ref),Ce[a]=!0)}}function Or(e,r){{var a=function(){Be||(Be=!0,Y("%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))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Pr(e,r){{var a=function(){Je||(Je=!0,Y("%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))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var Cr=function(e,r,a,f,A,D,w){var R={$$typeof:j,type:e,key:r,ref:a,props:w,_owner:D};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function wr(e,r,a,f,A){{var D,w={},R=null,B=null;a!==void 0&&(Ge(a),R=""+a),Rr(r)&&(Ge(r.key),R=""+r.key),_r(r)&&(B=r.ref,Sr(r,A));for(D in r)me.call(r,D)&&!Tr.hasOwnProperty(D)&&(w[D]=r[D]);if(e&&e.defaultProps){var W=e.defaultProps;for(D in W)w[D]===void 0&&(w[D]=W[D])}if(R||B){var q=typeof e=="function"?e.displayName||e.name||"Unknown":e;R&&Or(w,q),B&&Pr(w,q)}return Cr(e,R,B,A,f,be.current,w)}}var we=U.ReactCurrentOwner,Ke=U.ReactDebugCurrentFrame;function le(e){if(e){var r=e._owner,a=ae(e.type,e._source,r?r.type:null);Ke.setExtraStackFrame(a)}else Ke.setExtraStackFrame(null)}var xe;xe=!1;function je(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}function Xe(){{if(we.current){var e=J(we.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function xr(e){return""}var He={};function jr(e){{var r=Xe();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
Check the top-level render call using <`+a+">.")}return r}}function Ze(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=jr(r);if(He[a])return;He[a]=!0;var f="";e&&e._owner&&e._owner!==we.current&&(f=" It was passed a child from "+J(e._owner.type)+"."),le(e),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,f),le(null)}}function Qe(e,r){{if(typeof e!="object")return;if(Pe(e))for(var a=0;a<e.length;a++){var f=e[a];je(f)&&Ze(f,r)}else if(je(e))e._store&&(e._store.validated=!0);else if(e){var A=V(e);if(typeof A=="function"&&A!==e.entries)for(var D=A.call(e),w;!(w=D.next()).done;)je(w.value)&&Ze(w.value,r)}}}function Ar(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===g))a=r.propTypes;else return;if(a){var f=J(r);br(a,e.props,"prop",f,e)}else if(r.PropTypes!==void 0&&!xe){xe=!0;var A=J(r);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kr(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var f=r[a];if(f!=="children"&&f!=="key"){le(e),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),le(null);break}}e.ref!==null&&(le(e),Y("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}var er={};function rr(e,r,a,f,A,D){{var w=ye(e);if(!w){var R="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(R+=" 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 B=xr();B?R+=B:R+=Xe();var W;e===null?W="null":Pe(e)?W="array":e!==void 0&&e.$$typeof===j?(W="<"+(J(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):W=typeof e,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",W,R)}var q=wr(e,r,a,A,D);if(q==null)return q;if(w){var Q=r.children;if(Q!==void 0)if(f)if(Pe(Q)){for(var de=0;de<Q.length;de++)Qe(Q[de],e);Object.freeze&&Object.freeze(Q)}else Y("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 Qe(Q,e)}if(me.call(r,"key")){var oe=J(e),X=Object.keys(r).filter(function(Yr){return Yr!=="key"}),Ae=X.length>0?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}";if(!er[oe+Ae]){var Fr=X.length>0?"{"+X.join(": ..., ")+": ...}":"{}";Y(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,Ae,oe,Fr,oe),er[oe+Ae]=!0}}return e===s?kr(q):Ar(q),q}}function Ir(e,r,a){return rr(e,r,a,!0)}function $r(e,r,a){return rr(e,r,a,!1)}var Dr=$r,Mr=Ir;Ee.Fragment=s,Ee.jsx=Dr,Ee.jsxs=Mr}()),Ee}process.env.NODE_ENV==="production"?Le.exports=Lr():Le.exports=qr();var Re=Le.exports,qe={exports:{}},Se={exports:{}},k={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ar;function Ur(){if(ar)return k;ar=1;var o=typeof Symbol=="function"&&Symbol.for,j=o?Symbol.for("react.element"):60103,S=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,E=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,O=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,P=o?Symbol.for("react.concurrent_mode"):60111,c=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,$=o?Symbol.for("react.suspense_list"):60120,F=o?Symbol.for("react.memo"):60115,N=o?Symbol.for("react.lazy"):60116,M=o?Symbol.for("react.block"):60121,V=o?Symbol.for("react.fundamental"):60117,U=o?Symbol.for("react.responder"):60118,Y=o?Symbol.for("react.scope"):60119;function z(i){if(typeof i=="object"&&i!==null){var re=i.$$typeof;switch(re){case j:switch(i=i.type,i){case p:case P:case s:case l:case E:case g:return i;default:switch(i=i&&i.$$typeof,i){case d:case c:case N:case F:case O:return i;default:return re}}case S:return re}}}function L(i){return z(i)===P}return k.AsyncMode=p,k.ConcurrentMode=P,k.ContextConsumer=d,k.ContextProvider=O,k.Element=j,k.ForwardRef=c,k.Fragment=s,k.Lazy=N,k.Memo=F,k.Portal=S,k.Profiler=l,k.StrictMode=E,k.Suspense=g,k.isAsyncMode=function(i){return L(i)||z(i)===p},k.isConcurrentMode=L,k.isContextConsumer=function(i){return z(i)===d},k.isContextProvider=function(i){return z(i)===O},k.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===j},k.isForwardRef=function(i){return z(i)===c},k.isFragment=function(i){return z(i)===s},k.isLazy=function(i){return z(i)===N},k.isMemo=function(i){return z(i)===F},k.isPortal=function(i){return z(i)===S},k.isProfiler=function(i){return z(i)===l},k.isStrictMode=function(i){return z(i)===E},k.isSuspense=function(i){return z(i)===g},k.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===s||i===P||i===l||i===E||i===g||i===$||typeof i=="object"&&i!==null&&(i.$$typeof===N||i.$$typeof===F||i.$$typeof===O||i.$$typeof===d||i.$$typeof===c||i.$$typeof===V||i.$$typeof===U||i.$$typeof===Y||i.$$typeof===M)},k.typeOf=z,k}var I={};/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var or;function zr(){return or||(or=1,process.env.NODE_ENV!=="production"&&function(){var o=typeof Symbol=="function"&&Symbol.for,j=o?Symbol.for("react.element"):60103,S=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,E=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,O=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,P=o?Symbol.for("react.concurrent_mode"):60111,c=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,$=o?Symbol.for("react.suspense_list"):60120,F=o?Symbol.for("react.memo"):60115,N=o?Symbol.for("react.lazy"):60116,M=o?Symbol.for("react.block"):60121,V=o?Symbol.for("react.fundamental"):60117,U=o?Symbol.for("react.responder"):60118,Y=o?Symbol.for("react.scope"):60119;function z(n){return typeof n=="string"||typeof n=="function"||n===s||n===P||n===l||n===E||n===g||n===$||typeof n=="object"&&n!==null&&(n.$$typeof===N||n.$$typeof===F||n.$$typeof===O||n.$$typeof===d||n.$$typeof===c||n.$$typeof===V||n.$$typeof===U||n.$$typeof===Y||n.$$typeof===M)}function L(n){if(typeof n=="object"&&n!==null){var Z=n.$$typeof;switch(Z){case j:var fe=n.type;switch(fe){case p:case P:case s:case l:case E:case g:return fe;default:var ae=fe&&fe.$$typeof;switch(ae){case d:case c:case N:case F:case O:return ae;default:return Z}}case S:return Z}}}var i=p,re=P,ve=d,pe=O,ie=j,ye=c,ue=s,se=N,J=F,K=S,te=l,H=E,ee=g,ne=!1;function ce(n){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),t(n)||L(n)===p}function t(n){return L(n)===P}function u(n){return L(n)===d}function h(n){return L(n)===O}function b(n){return typeof n=="object"&&n!==null&&n.$$typeof===j}function v(n){return L(n)===c}function C(n){return L(n)===s}function y(n){return L(n)===N}function m(n){return L(n)===F}function T(n){return L(n)===S}function x(n){return L(n)===l}function _(n){return L(n)===E}function G(n){return L(n)===g}I.AsyncMode=i,I.ConcurrentMode=re,I.ContextConsumer=ve,I.ContextProvider=pe,I.Element=ie,I.ForwardRef=ye,I.Fragment=ue,I.Lazy=se,I.Memo=J,I.Portal=K,I.Profiler=te,I.StrictMode=H,I.Suspense=ee,I.isAsyncMode=ce,I.isConcurrentMode=t,I.isContextConsumer=u,I.isContextProvider=h,I.isElement=b,I.isForwardRef=v,I.isFragment=C,I.isLazy=y,I.isMemo=m,I.isPortal=T,I.isProfiler=x,I.isStrictMode=_,I.isSuspense=G,I.isValidElementType=z,I.typeOf=L}()),I}var ir;function pr(){return ir||(ir=1,process.env.NODE_ENV==="production"?Se.exports=Ur():Se.exports=zr()),Se.exports}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var ke,ur;function Vr(){if(ur)return ke;ur=1;var o=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;function s(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function E(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var O={},d=0;d<10;d++)O["_"+String.fromCharCode(d)]=d;var p=Object.getOwnPropertyNames(O).map(function(c){return O[c]});if(p.join("")!=="0123456789")return!1;var P={};return"abcdefghijklmnopqrst".split("").forEach(function(c){P[c]=c}),Object.keys(Object.assign({},P)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ke=E()?Object.assign:function(l,O){for(var d,p=s(l),P,c=1;c<arguments.length;c++){d=Object(arguments[c]);for(var g in d)j.call(d,g)&&(p[g]=d[g]);if(o){P=o(d);for(var $=0;$<P.length;$++)S.call(d,P[$])&&(p[P[$]]=d[P[$]])}}return p},ke}var Ie,sr;function Ue(){if(sr)return Ie;sr=1;var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ie=o,Ie}var $e,cr;function yr(){return cr||(cr=1,$e=Function.call.bind(Object.prototype.hasOwnProperty)),$e}var De,fr;function Nr(){if(fr)return De;fr=1;var o=function(){};if(process.env.NODE_ENV!=="production"){var j=Ue(),S={},s=yr();o=function(l){var O="Warning: "+l;typeof console<"u"&&console.error(O);try{throw new Error(O)}catch{}}}function E(l,O,d,p,P){if(process.env.NODE_ENV!=="production"){for(var c in l)if(s(l,c)){var g;try{if(typeof l[c]!="function"){var $=Error((p||"React class")+": "+d+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}g=l[c](O,c,p,d,null,j)}catch(N){g=N}if(g&&!(g instanceof Error)&&o((p||"React class")+": type specification of "+d+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in S)){S[g.message]=!0;var F=P?P():"";o("Failed "+d+" type: "+g.message+(F??""))}}}}return E.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(S={})},De=E,De}var Me,lr;function Gr(){if(lr)return Me;lr=1;var o=pr(),j=Vr(),S=Ue(),s=yr(),E=Nr(),l=function(){};process.env.NODE_ENV!=="production"&&(l=function(d){var p="Warning: "+d;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function O(){return null}return Me=function(d,p){var P=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function g(t){var u=t&&(P&&t[P]||t[c]);if(typeof u=="function")return u}var $="<<anonymous>>",F={array:U("array"),bigint:U("bigint"),bool:U("boolean"),func:U("function"),number:U("number"),object:U("object"),string:U("string"),symbol:U("symbol"),any:Y(),arrayOf:z,element:L(),elementType:i(),instanceOf:re,node:ye(),objectOf:pe,oneOf:ve,oneOfType:ie,shape:se,exact:J};function N(t,u){return t===u?t!==0||1/t===1/u:t!==t&&u!==u}function M(t,u){this.message=t,this.data=u&&typeof u=="object"?u:{},this.stack=""}M.prototype=Error.prototype;function V(t){if(process.env.NODE_ENV!=="production")var u={},h=0;function b(C,y,m,T,x,_,G){if(T=T||$,_=_||m,G!==S){if(p){var n=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw n.name="Invariant Violation",n}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=T+":"+m;!u[Z]&&h<3&&(l("You are manually calling a React.PropTypes validation function for the `"+_+"` prop on `"+T+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),u[Z]=!0,h++)}}return y[m]==null?C?y[m]===null?new M("The "+x+" `"+_+"` is marked as required "+("in `"+T+"`, but its value is `null`.")):new M("The "+x+" `"+_+"` is marked as required in "+("`"+T+"`, but its value is `undefined`.")):null:t(y,m,T,x,_)}var v=b.bind(null,!1);return v.isRequired=b.bind(null,!0),v}function U(t){function u(h,b,v,C,y,m){var T=h[b],x=H(T);if(x!==t){var _=ee(T);return new M("Invalid "+C+" `"+y+"` of type "+("`"+_+"` supplied to `"+v+"`, expected ")+("`"+t+"`."),{expectedType:t})}return null}return V(u)}function Y(){return V(O)}function z(t){function u(h,b,v,C,y){if(typeof t!="function")return new M("Property `"+y+"` of component `"+v+"` has invalid PropType notation inside arrayOf.");var m=h[b];if(!Array.isArray(m)){var T=H(m);return new M("Invalid "+C+" `"+y+"` of type "+("`"+T+"` supplied to `"+v+"`, expected an array."))}for(var x=0;x<m.length;x++){var _=t(m,x,v,C,y+"["+x+"]",S);if(_ instanceof Error)return _}return null}return V(u)}function L(){function t(u,h,b,v,C){var y=u[h];if(!d(y)){var m=H(y);return new M("Invalid "+v+" `"+C+"` of type "+("`"+m+"` supplied to `"+b+"`, expected a single ReactElement."))}return null}return V(t)}function i(){function t(u,h,b,v,C){var y=u[h];if(!o.isValidElementType(y)){var m=H(y);return new M("Invalid "+v+" `"+C+"` of type "+("`"+m+"` supplied to `"+b+"`, expected a single ReactElement type."))}return null}return V(t)}function re(t){function u(h,b,v,C,y){if(!(h[b]instanceof t)){var m=t.name||$,T=ce(h[b]);return new M("Invalid "+C+" `"+y+"` of type "+("`"+T+"` supplied to `"+v+"`, expected ")+("instance of `"+m+"`."))}return null}return V(u)}function ve(t){if(!Array.isArray(t))return process.env.NODE_ENV!=="production"&&(arguments.length>1?l("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):l("Invalid argument supplied to oneOf, expected an array.")),O;function u(h,b,v,C,y){for(var m=h[b],T=0;T<t.length;T++)if(N(m,t[T]))return null;var x=JSON.stringify(t,function(G,n){var Z=ee(n);return Z==="symbol"?String(n):n});return new M("Invalid "+C+" `"+y+"` of value `"+String(m)+"` "+("supplied to `"+v+"`, expected one of "+x+"."))}return V(u)}function pe(t){function u(h,b,v,C,y){if(typeof t!="function")return new M("Property `"+y+"` of component `"+v+"` has invalid PropType notation inside objectOf.");var m=h[b],T=H(m);if(T!=="object")return new M("Invalid "+C+" `"+y+"` of type "+("`"+T+"` supplied to `"+v+"`, expected an object."));for(var x in m)if(s(m,x)){var _=t(m,x,v,C,y+"."+x,S);if(_ instanceof Error)return _}return null}return V(u)}function ie(t){if(!Array.isArray(t))return process.env.NODE_ENV!=="production"&&l("Invalid argument supplied to oneOfType, expected an instance of array."),O;for(var u=0;u<t.length;u++){var h=t[u];if(typeof h!="function")return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ne(h)+" at index "+u+"."),O}function b(v,C,y,m,T){for(var x=[],_=0;_<t.length;_++){var G=t[_],n=G(v,C,y,m,T,S);if(n==null)return null;n.data&&s(n.data,"expectedType")&&x.push(n.data.expectedType)}var Z=x.length>0?", expected one of type ["+x.join(", ")+"]":"";return new M("Invalid "+m+" `"+T+"` supplied to "+("`"+y+"`"+Z+"."))}return V(b)}function ye(){function t(u,h,b,v,C){return K(u[h])?null:new M("Invalid "+v+" `"+C+"` supplied to "+("`"+b+"`, expected a ReactNode."))}return V(t)}function ue(t,u,h,b,v){return new M((t||"React class")+": "+u+" type `"+h+"."+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+v+"`.")}function se(t){function u(h,b,v,C,y){var m=h[b],T=H(m);if(T!=="object")return new M("Invalid "+C+" `"+y+"` of type `"+T+"` "+("supplied to `"+v+"`, expected `object`."));for(var x in t){var _=t[x];if(typeof _!="function")return ue(v,C,y,x,ee(_));var G=_(m,x,v,C,y+"."+x,S);if(G)return G}return null}return V(u)}function J(t){function u(h,b,v,C,y){var m=h[b],T=H(m);if(T!=="object")return new M("Invalid "+C+" `"+y+"` of type `"+T+"` "+("supplied to `"+v+"`, expected `object`."));var x=j({},h[b],t);for(var _ in x){var G=t[_];if(s(t,_)&&typeof G!="function")return ue(v,C,y,_,ee(G));if(!G)return new M("Invalid "+C+" `"+y+"` key `"+_+"` supplied to `"+v+"`.\nBad object: "+JSON.stringify(h[b],null," ")+`
Valid keys: `+JSON.stringify(Object.keys(t),null," "));var n=G(m,_,v,C,y+"."+_,S);if(n)return n}return null}return V(u)}function K(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(K);if(t===null||d(t))return!0;var u=g(t);if(u){var h=u.call(t),b;if(u!==t.entries){for(;!(b=h.next()).done;)if(!K(b.value))return!1}else for(;!(b=h.next()).done;){var v=b.value;if(v&&!K(v[1]))return!1}}else return!1;return!0;default:return!1}}function te(t,u){return t==="symbol"?!0:u?u["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&u instanceof Symbol:!1}function H(t){var u=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":te(u,t)?"symbol":u}function ee(t){if(typeof t>"u"||t===null)return""+t;var u=H(t);if(u==="object"){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return u}function ne(t){var u=ee(t);switch(u){case"array":case"object":return"an "+u;case"boolean":case"date":case"regexp":return"a "+u;default:return u}}function ce(t){return!t.constructor||!t.constructor.name?$:t.constructor.name}return F.checkPropTypes=E,F.resetWarningCache=E.resetWarningCache,F.PropTypes=F,F},Me}var Fe,dr;function Br(){if(dr)return Fe;dr=1;var o=Ue();function j(){}function S(){}return S.resetWarningCache=j,Fe=function(){function s(O,d,p,P,c,g){if(g!==o){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}}s.isRequired=s;function E(){return s}var l={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:E,element:s,elementType:s,instanceOf:E,node:s,objectOf:E,oneOf:E,oneOfType:E,shape:E,exact:E,checkPropTypes:S,resetWarningCache:j};return l.PropTypes=l,l},Fe}if(process.env.NODE_ENV!=="production"){var Jr=pr(),Kr=!0;qe.exports=Gr()(Jr.isElement,Kr)}else qe.exports=Br()();var Xr=qe.exports;const ge=Wr(Xr);let Oe=null,vr=!1,Ye=!1,We=null;const Hr=o=>new Promise((j,S)=>{if(document.querySelector(`script[src="${o}"]`)){j();return}const s=document.createElement("script");s.src=o,s.async=!0,s.onload=j,s.onerror=S,document.body.appendChild(s)}),Zr=async(o,j,S,s="in")=>vr?(Oe.register(o,{userId:j,userToken:S},{}),Oe):(Ye||(Ye=!0,We=(async()=>{try{if(await Hr(s==="us"?"https://assets-us.customerglu.com/scripts/sdk/v6.0/sdk.js":s==="me"?"https://assets-me.customerglu.com/scripts/sdk/v0.0.1/sdk.js":"https://assets.customerglu.com/scripts/sdk/v5.5/sdk.js"),!window.CustomerGlu)throw new Error("CustomerGlu failed to load");return Oe=new window.CustomerGlu(o,{userId:j,userToken:S},{}),vr=!0,Oe}catch(E){throw console.error("Error initializing CustomerGlu:",E),E}finally{Ye=!1}})()),We),mr=({userId:o="",gluToken:j,children:S,region:s="in",writeKey:E=""})=>{const[l,O]=Te.useState(!0),[d,p]=Te.useState(null);return Te.useEffect(()=>{(async()=>{try{console.log("initializeCustomerGlu React Component"),await Zr(E,o,j,s),O(!1)}catch(c){p(c),O(!1)}})()},[o,j,s,E]),d?Re.jsx(Re.Fragment,{}):l?Re.jsx(Re.Fragment,{}):S};mr.propTypes={userId:ge.string,gluToken:ge.string.isRequired,children:ge.node,region:ge.oneOf(["in","us","me"]),writeKey:ge.string};exports.CustomerGluComponent=mr;