UNPKG

25.5 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@inlightmedia/react-zendesk-chat"]=e():t["@inlightmedia/react-zendesk-chat"]=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=14)}([function(t,e,n){t.exports=n(4)()},function(t,e,n){"use strict";t.exports=n(2)},function(t,e,n){"use strict";
2/** @license React v16.9.0
3 * react.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 r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,s=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,h=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,d=o?Symbol.for("react.lazy"):60116;o&&Symbol.for("react.fundamental"),o&&Symbol.for("react.responder");var v="function"==typeof Symbol&&Symbol.iterator;function b(t){for(var e=t.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return t.message="Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",t}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w={};function O(t,e,n){this.props=t,this.context=e,this.refs=w,this.updater=n||g}function j(){}function x(t,e,n){this.props=t,this.context=e,this.refs=w,this.updater=n||g}O.prototype.isReactComponent={},O.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw b(Error(85));this.updater.enqueueSetState(this,t,e,"setState")},O.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},j.prototype=O.prototype;var C=x.prototype=new j;C.constructor=x,r(C,O.prototype),C.isPureReactComponent=!0;var S={current:null},_={suspense:null},k={current:null},P=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function $(t,e,n){var r=void 0,o={},s=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(s=""+e.key),e)P.call(e,r)&&!E.hasOwnProperty(r)&&(o[r]=e[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:s,ref:a,props:o,_owner:k.current}}function I(t){return"object"==typeof t&&null!==t&&t.$$typeof===i}var R=/\/+/g,A=[];function T(t,e,n,r){if(A.length){var o=A.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function q(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>A.length&&A.push(t)}function U(t,e,n){return null==t?0:function t(e,n,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var u=!1;if(null===e)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case s:u=!0}}if(u)return r(o,e,""===n?"."+z(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=n+z(a=e[c],c);u+=t(a,l,r,o)}else if(l=null===e||"object"!=typeof e?null:"function"==typeof(l=v&&e[v]||e["@@iterator"])?l:null,"function"==typeof l)for(e=l.call(e),c=0;!(a=e.next()).done;)u+=t(a=a.value,l=n+z(a,c++),r,o);else if("object"===a)throw r=""+e,b(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,"");return u}(t,"",e,n)}function z(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function N(t,e){t.func.call(t.context,e,t.count++)}function D(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?L(t,r,n,function(t){return t}):null!=t&&(I(t)&&(t=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(R,"$&/")+"/")+n)),r.push(t))}function L(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(R,"$&/")+"/"),U(t,D,e=T(e,i,r,o)),q(e)}function F(){var t=S.current;if(null===t)throw b(Error(321));return t}var M={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return L(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;U(t,N,e=T(null,null,e,n)),q(e)},count:function(t){return U(t,function(){return null},null)},toArray:function(t){var e=[];return L(t,e,null,function(t){return t}),e},only:function(t){if(!I(t))throw b(Error(143));return t}},createRef:function(){return{current:null}},Component:O,PureComponent:x,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:h,render:t}},lazy:function(t){return{$$typeof:d,_ctor:t,_status:-1,_result:null}},memo:function(t,e){return{$$typeof:m,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return F().useCallback(t,e)},useContext:function(t,e){return F().useContext(t,e)},useEffect:function(t,e){return F().useEffect(t,e)},useImperativeHandle:function(t,e,n){return F().useImperativeHandle(t,e,n)},useDebugValue:function(){},useLayoutEffect:function(t,e){return F().useLayoutEffect(t,e)},useMemo:function(t,e){return F().useMemo(t,e)},useReducer:function(t,e,n){return F().useReducer(t,e,n)},useRef:function(t){return F().useRef(t)},useState:function(t){return F().useState(t)},Fragment:a,Profiler:c,StrictMode:u,Suspense:p,unstable_SuspenseList:y,createElement:$,cloneElement:function(t,e,n){if(null==t)throw b(Error(267),t);var o=void 0,s=r({},t.props),a=t.key,u=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(u=e.ref,c=k.current),void 0!==e.key&&(a=""+e.key);var l=void 0;for(o in t.type&&t.type.defaultProps&&(l=t.type.defaultProps),e)P.call(e,o)&&!E.hasOwnProperty(o)&&(s[o]=void 0===e[o]&&void 0!==l?l[o]:e[o])}if(1===(o=arguments.length-2))s.children=n;else if(1<o){l=Array(o);for(var f=0;f<o;f++)l[f]=arguments[f+2];s.children=l}return{$$typeof:i,type:t.type,key:a,ref:u,props:s,_owner:c}},createFactory:function(t){var e=$.bind(null,t);return e.type=t,e},isValidElement:I,version:"16.9.0",unstable_withSuspenseConfig:function(t,e){var n=_.suspense;_.suspense=void 0===e?null:e;try{t()}finally{_.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:S,ReactCurrentBatchConfig:_,ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r}},B={default:M},H=B&&M||B;t.exports=H.default||H},function(t,e,n){"use strict";
10/*
11object-assign
12(c) Sindre Sorhus
13@license MIT
14*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=s(t),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){a=r(n);for(var f=0;f<a.length;f++)i.call(n,a[f])&&(u[a[f]]=n[a[f]])}}return u}},function(t,e,n){"use strict";var r=n(5);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){var a=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 a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(7),o=n(10);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=g,e.resolve=function(t,e){return g(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?g(t,!1,!0).resolveObject(e):e},e.format=function(t){o.isString(t)&&(t=g(t));return t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(11);function g(t,e,n){if(t&&o.isObject(t)&&t instanceof i)return t;var r=new i;return r.parse(t,e,n),r}i.prototype.parse=function(t,e,n){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var g=t=c.join(a);if(g=g.trim(),!n&&1===t.split("#").length){var w=u.exec(g);if(w)return this.path=g,this.href=g,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?b.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var O=s.exec(g);if(O){var j=(O=O[0]).toLowerCase();this.protocol=j,g=g.substr(O.length)}if(n||O||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===g.substr(0,2);!x||O&&d[O]||(g=g.substr(2),this.slashes=!0)}if(!d[O]&&(x||O&&!v[O])){for(var C,S,_=-1,k=0;k<h.length;k++){-1!==(P=g.indexOf(h[k]))&&(-1===_||P<_)&&(_=P)}-1!==(S=-1===_?g.lastIndexOf("@"):g.lastIndexOf("@",_))&&(C=g.slice(0,S),g=g.slice(S+1),this.auth=decodeURIComponent(C)),_=-1;for(k=0;k<f.length;k++){var P;-1!==(P=g.indexOf(f[k]))&&(-1===_||P<_)&&(_=P)}-1===_&&(_=g.length),this.host=g.slice(0,_),g=g.slice(_),this.parseHost(),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E)for(var $=this.hostname.split(/\./),I=(k=0,$.length);k<I;k++){var R=$[k];if(R&&!R.match(p)){for(var A="",T=0,q=R.length;T<q;T++)R.charCodeAt(T)>127?A+="x":A+=R[T];if(!A.match(p)){var U=$.slice(0,k),z=$.slice(k+1),N=R.match(y);N&&(U.push(N[1]),z.unshift(N[2])),z.length&&(g="/"+z.join(".")+g),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),E||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+D,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!m[j])for(k=0,I=l.length;k<I;k++){var F=l[k];if(-1!==g.indexOf(F)){var M=encodeURIComponent(F);M===F&&(M=escape(F)),g=g.split(F).join(M)}}var B=g.indexOf("#");-1!==B&&(this.hash=g.substr(B),g=g.slice(0,B));var H=g.indexOf("?");if(-1!==H?(this.search=g.substr(H),this.query=g.substr(H+1),e&&(this.query=b.parse(this.query)),g=g.slice(0,H)):e&&(this.search="",this.query={}),g&&(this.pathname=g),v[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var G=this.search||"";this.path=D+G}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,s="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+r},i.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(o.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var n=new i,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=t[l])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!v[t.protocol]){for(var f=Object.keys(t),h=0;h<f.length;h++){var p=f[h];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||d[t.protocol])n.pathname=t.pathname;else{for(var y=(t.pathname||"").split("/");y.length&&!(t.host=y.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==y[0]&&y.unshift(""),y.length<2&&y.unshift(""),n.pathname=y.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",b=n.search||"";n.path=m+b}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),O=w||g||n.host&&t.pathname,j=O,x=n.pathname&&n.pathname.split("/")||[],C=(y=t.pathname&&t.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===y[0]?y[0]=t.host:y.unshift(t.host)),t.host=null),O=O&&(""===y[0]||""===x[0])),w)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=y;else if(y.length)x||(x=[]),x.pop(),x=x.concat(y),n.search=t.search,n.query=t.query;else if(!o.isNullOrUndefined(t.search)){if(C)n.hostname=n.host=x.shift(),(E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=E.shift(),n.host=n.hostname=E.shift());return n.search=t.search,n.query=t.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=x.slice(-1)[0],_=(n.host||t.host||x.length>1)&&("."===S||".."===S)||""===S,k=0,P=x.length;P>=0;P--)"."===(S=x[P])?x.splice(P,1):".."===S?(x.splice(P,1),k++):k&&(x.splice(P,1),k--);if(!O&&!j)for(;k--;k)x.unshift("..");!O||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),_&&"/"!==x.join("/").substr(-1)&&x.push("");var E,$=""===x[0]||x[0]&&"/"===x[0].charAt(0);C&&(n.hostname=n.host=$?"":x.length?x.shift():"",(E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=E.shift(),n.host=n.hostname=E.shift()));return(O=O||n.host&&x.length)&&!$&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){(function(t,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=36,l=1,f=26,h=38,p=700,y=72,m=128,d="-",v=/^xn--/,b=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=c-l,j=Math.floor,x=String.fromCharCode;function C(t){throw new RangeError(w[t])}function S(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function _(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+S((t=t.replace(g,".")).split("."),e).join(".")}function k(t){for(var e,n,r=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function P(t){return S(t,function(t){var e="";return t>65535&&(e+=x((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=x(t)}).join("")}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function $(t,e,n){var r=0;for(t=n?j(t/p):t>>1,t+=j(t/e);t>O*f>>1;r+=c)t=j(t/O);return j(r+(O+1)*t/(t+h))}function I(t){var e,n,r,o,i,s,a,h,p,v,b,g=[],w=t.length,O=0,x=m,S=y;for((n=t.lastIndexOf(d))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&C("not-basic"),g.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<w;){for(i=O,s=1,a=c;o>=w&&C("invalid-input"),((h=(b=t.charCodeAt(o++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:c)>=c||h>j((u-O)/s))&&C("overflow"),O+=h*s,!(h<(p=a<=S?l:a>=S+f?f:a-S));a+=c)s>j(u/(v=c-p))&&C("overflow"),s*=v;S=$(O-i,e=g.length+1,0==i),j(O/e)>u-x&&C("overflow"),x+=j(O/e),O%=e,g.splice(O++,0,x)}return P(g)}function R(t){var e,n,r,o,i,s,a,h,p,v,b,g,w,O,S,_=[];for(g=(t=k(t)).length,e=m,n=0,i=y,s=0;s<g;++s)(b=t[s])<128&&_.push(x(b));for(r=o=_.length,o&&_.push(d);r<g;){for(a=u,s=0;s<g;++s)(b=t[s])>=e&&b<a&&(a=b);for(a-e>j((u-n)/(w=r+1))&&C("overflow"),n+=(a-e)*w,e=a,s=0;s<g;++s)if((b=t[s])<e&&++n>u&&C("overflow"),b==e){for(h=n,p=c;!(h<(v=p<=i?l:p>=i+f?f:p-i));p+=c)S=h-v,O=c-v,_.push(x(E(v+S%O,0))),h=j(S/O);_.push(x(E(h,0))),i=$(n,w,r==o),n=0,++r}++n,++e}return _.join("")}a={version:"1.4.1",ucs2:{decode:k,encode:P},decode:I,encode:R,toASCII:function(t){return _(t,function(t){return b.test(t)?"xn--"+R(t):t})},toUnicode:function(t){return _(t,function(t){return v.test(t)?I(t.slice(4).toLowerCase()):t})}},void 0===(o=function(){return a}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(8)(t),n(9))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(12),e.encode=e.stringify=n(13)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,i){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,y,m=t[l].replace(a,"%20"),d=m.indexOf(n);d>=0?(f=m.substr(0,d),h=m.substr(d+1)):(f=m,h=""),p=decodeURIComponent(f),y=decodeURIComponent(h),r(s,p)?o(s[p])?s[p].push(y):s[p]=[s[p],y]:s[p]=y}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),function(s){var a=encodeURIComponent(r(s))+n;return o(t[s])?i(t[s],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[s]))}).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n(0),i=n.n(o);n(6);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?l(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=!("undefined"==typeof window||!window.document||!window.document.createElement),y=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),h(l(n=u(this,c(e).call(this,t))),"setChatLanguage",function(t){window.$zopim(function(){window.$zopim.livechat.setLanguage(t)})}),h(l(n),"setTitleText",function(t){window.$zopim(function(){window.$zopim.livechat.window.setTitle(t)})}),h(l(n),"setPreChatGreeting",function(t){window.$zopim(function(){window.$zopim.livechat.prechatForm.setGreetings(t)})}),h(l(n),"setBadgeText",function(t){window.$zopim(function(){window.$zopim.livechat.badge.setText(t)})});var r=t.appID;t.onError,t.language,t.title,t.preChatGreeting,t.badgeText;if(!r)throw console.error("Error: Have you forgotten to pass in hte appID prop?"),new Error("Error: Cannot initialize the ZenDesk Chat Component. Have you forgotten to pass in the appID prop?");return p?n:(console.error("Error: Could not initialize Zendesk react. The DOM is not ready."),u(n))}var n,o,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(e,r["Component"]),n=e,(o=[{key:"componentDidMount",value:function(){var t=this,e=this.props,n=e.appID,r=e.onError,o=e.language,i=e.title,s=e.preChatGreeting,a=e.badgeText;window.$zopim||document.getElementsByClassName("zopim")[0]||function(t,e,n){return new Promise(function(e,o){var i=window.$zopim=function(t){i._.push(t)},s=i.s=t.createElement("script"),a=t.getElementsByTagName("script")[0];i.set=function(t){i.set._.push(t)},i._=[],i.set._=[],s.async=!0,s.setAttribute("charset","utf-8"),s.src="https://v2.zopim.com/?"+n,i.t=+new Date,s.type="text/javascript",a.parentNode.insertBefore(s,a),s.onload=function(){e()},s.onerror=function(t){r&&r(t),o(new Error("Zopim API load error."))}})}(document,0,n).then(function(){o&&t.setChatLanguage(o),i&&t.setTitleText(i),s&&t.setPreChatGreeting(s),a&&t.setBadgeText(a),delete window.$zopim}).catch(function(t){console.log(t),r&&r(t)})}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillUnmount",value:function(){if(!p||!window.$zopim)return!1;delete window.$zopim}},{key:"render",value:function(){return!1}}])&&a(n.prototype,o),i&&a(n,i),e}();h(y,"propTypes",{appID:i.a.string.isRequired,language:i.a.string,title:i.a.string,preChatGreeting:i.a.string,badgeText:i.a.string,onError:i.a.func});var m=y;e.default=m}])});
\No newline at end of file