@myinterview/widget-react 1.1.64 → 1.1.65-development-e68c11b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config/index.d.ts +0 -1
- package/dist/cjs/config/local.env.d.ts +0 -1
- package/dist/cjs/config/prod.env.d.ts +0 -1
- package/dist/cjs/config/staging.env.d.ts +0 -1
- package/dist/cjs/index.js +21 -472
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/configInterface.d.ts +0 -1
- package/dist/esm/config/index.d.ts +0 -1
- package/dist/esm/config/local.env.d.ts +0 -1
- package/dist/esm/config/prod.env.d.ts +0 -1
- package/dist/esm/config/staging.env.d.ts +0 -1
- package/dist/esm/index.js +21 -472
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/package.json +1 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1324,435 +1324,6 @@ object-assign
|
|
|
1324
1324
|
@license MIT
|
|
1325
1325
|
*/function Ea(){if(pa)return fa;pa=1;return fa="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Sa(){return $a?ya:($a=1,ya=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Oa=Pa();oa.exports=function(){if(va)return ga;va=1;var e=Pa(),t=function(){if(sa)return ua;sa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}return ua=function(){try{if(!Object.assign)return !1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return !1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return !1;var r={};return "abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e;})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return !1}}()?Object.assign:function(d,o){for(var a,i,l=r(d),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(l[u]=a[u]);if(e){i=e(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]]);}}return l},ua}(),n=Ea(),r=Sa(),d=function(){if(ma)return ha;ma=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ea(),n={},r=Sa();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};}function d(d,o,a,i,l){if("production"!==process.env.NODE_ENV)for(var c in d)if(r(d,c)){var u;try{if("function"!=typeof d[c]){var s=Error((i||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}u=d[c](o,c,i,a,null,t);}catch(e){u=e;}if(!u||u instanceof Error||e((i||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var f=l?l():"";e("Failed "+a+" type: "+u.message+(null!=f?f:""));}}}return d.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={});},ha=d}(),o=function(){};function a(){return null}return "production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ga=function(i,l){var c="function"==typeof Symbol&&Symbol.iterator,u="<<anonymous>>",s={array:$("array"),bigint:$("bigint"),bool:$("boolean"),func:$("function"),number:$("number"),object:$("object"),string:$("string"),symbol:$("symbol"),any:y(a),arrayOf:function(e){return y((function(t,r,d,o,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+d+"` has invalid PropType notation inside arrayOf.");var i=t[r];if(!Array.isArray(i))return new p("Invalid "+o+" `"+a+"` of type `"+g(i)+"` supplied to `"+d+"`, expected an array.");for(var l=0;l<i.length;l++){var c=e(i,l,d,o,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:y((function(e,t,n,r,d){var o=e[t];return i(o)?null:new p("Invalid "+r+" `"+d+"` of type `"+g(o)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:y((function(t,n,r,d,o){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+d+" `"+o+"` of type `"+g(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return y((function(t,n,r,d,o){if(!(t[n]instanceof e)){var a=e.name||u;return new p("Invalid "+d+" `"+o+"` of type `"+((i=t[n]).constructor&&i.constructor.name?i.constructor.name:u)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var i;return null}))},node:y((function(e,t,n,r,d){return m(e[t])?null:new p("Invalid "+r+" `"+d+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return y((function(t,d,o,a,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[d],c=g(l);if("object"!==c)return new p("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var u in l)if(r(l,u)){var s=e(l,u,o,a,i+"."+u,n);if(s instanceof Error)return s}return null}))},oneOf:function(e){if(!Array.isArray(e))return "production"!==process.env.NODE_ENV&&o(arguments.length>1?"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]).":"Invalid argument supplied to oneOf, expected an array."),a;function t(t,n,r,d,o){for(var a=t[n],i=0;i<e.length;i++)if(f(a,e[i]))return null;var l=JSON.stringify(e,(function(e,t){return "symbol"===v(t)?String(t):t}));return new p("Invalid "+d+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}return y(t)},oneOfType:function(e){if(!Array.isArray(e))return "production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var d=e[t];if("function"!=typeof d)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(d)+" at index "+t+"."),a}return y((function(t,d,o,a,i){for(var l=[],c=0;c<e.length;c++){var u=(0, e[c])(t,d,o,a,i,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType);}return new p("Invalid "+a+" `"+i+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return y((function(t,r,d,o,a){var i=t[r],l=g(i);if("object"!==l)return new p("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+d+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return h(d,o,a,c,v(u));var s=u(i,c,d,o,a+"."+c,n);if(s)return s}return null}))},exact:function(e){return y((function(d,o,a,i,l){var c=d[o],u=g(c);if("object"!==u)return new p("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var s=t({},d[o],e);for(var f in s){var y=e[f];if(r(e,f)&&"function"!=typeof y)return h(a,i,l,f,v(y));if(!y)return new p("Invalid "+i+" `"+l+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(d[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var $=y(c,f,a,i,l+"."+f,n);if($)return $}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack="";}function y(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function d(d,a,i,c,s,f,y){if(c=c||u,f=f||i,y!==n){if(l){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",$}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=c+":"+i;!t[h]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. 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."),t[h]=!0,r++);}}return null==a[i]?d?null===a[i]?new p("The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,i,c,s,f)}var a=d.bind(null,!1);return a.isRequired=d.bind(null,!0),a}function $(e){return y((function(t,n,r,d,o,a){var i=t[n];return g(i)!==e?new p("Invalid "+d+" `"+o+"` of type `"+v(i)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,n,r,d){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+d+"`.")}function m(e){switch(typeof e){case"number":case"string":case"undefined":return !0;case"boolean":return !e;case"object":if(Array.isArray(e))return e.every(m);if(null===e||i(e))return !0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return !1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!m(n.value))return !1}else for(;!(n=r.next()).done;){var d=n.value;if(d&&!m(d[1]))return !1}return !0;default:return !1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return "symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return ""+e;var t=g(e);if("object"===t){if(e instanceof Date)return "date";if(e instanceof RegExp)return "regexp"}return t}function b(e){var t=v(e);switch(t){case"array":case"object":return "an "+t;case"boolean":case"date":case"regexp":return "a "+t;default:return t}}return p.prototype=Error.prototype,s.checkPropTypes=d,s.resetWarningCache=d.resetWarningCache,s.PropTypes=s,s},ga}()(Oa.isElement,!0);}else oa.exports=function(){if(wa)return ba;wa=1;var e=Ea();function t(){}function n(){}return n.resetWarningCache=t,ba=function(){function r(t,n,r,d,o,a){if(a!==e){var i=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 i.name="Invariant Violation",i}}function d(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:d,element:r,elementType:r,instanceOf:d,node:r,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();Object.defineProperty(da,"__esModule",{value:!0}),da.defaultProps=da.propTypes=void 0;var Aa,ka=(Aa=oa.exports)&&Aa.__esModule?Aa:{default:Aa};var Ma=ka.default.string,ja=ka.default.bool,_a$2=ka.default.number,xa=ka.default.array,Ta=ka.default.oneOfType,Ra=ka.default.shape,La=ka.default.object,Da=ka.default.func,Na=ka.default.node,Ia={url:Ta([Ma,xa,La]),playing:ja,loop:ja,controls:ja,volume:_a$2,muted:ja,playbackRate:_a$2,width:Ta([Ma,_a$2]),height:Ta([Ma,_a$2]),style:La,progressInterval:_a$2,playsinline:ja,pip:ja,stopOnUnmount:ja,light:Ta([ja,Ma,La]),playIcon:Na,previewTabIndex:_a$2,fallback:Na,oEmbedUrl:Ma,wrapper:Ta([Ma,Da,Ra({render:Da.isRequired})]),config:Ra({soundcloud:Ra({options:La}),youtube:Ra({playerVars:La,embedOptions:La,onUnstarted:Da}),facebook:Ra({appId:Ma,version:Ma,playerId:Ma,attributes:La}),dailymotion:Ra({params:La}),vimeo:Ra({playerOptions:La,title:Ma}),file:Ra({attributes:La,tracks:xa,forceVideo:ja,forceAudio:ja,forceHLS:ja,forceSafariHLS:ja,forceDisableHls:ja,forceDASH:ja,forceFLV:ja,hlsOptions:La,hlsVersion:Ma,dashVersion:Ma,flvVersion:Ma}),wistia:Ra({options:La,playerId:Ma,customControls:xa}),mixcloud:Ra({options:La}),twitch:Ra({options:La,playerId:Ma}),vidyard:Ra({options:La})}),onReady:Da,onStart:Da,onPlay:Da,onPause:Da,onBuffer:Da,onBufferEnd:Da,onEnded:Da,onError:Da,onDuration:Da,onSeek:Da,onPlaybackRateChange:Da,onPlaybackQualityChange:Da,onProgress:Da,onClickPreview:Da,onEnablePIP:Da,onDisablePIP:Da};da.propTypes=Ia;var Ba=function(){},Va={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Ba},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Ba,onStart:Ba,onPlay:Ba,onPause:Ba,onBuffer:Ba,onBufferEnd:Ba,onEnded:Ba,onError:Ba,onDuration:Ba,onSeek:Ba,onPlaybackRateChange:Ba,onPlaybackQualityChange:Ba,onProgress:Ba,onClickPreview:Ba,onEnablePIP:Ba,onDisablePIP:Ba};da.defaultProps=Va;var Ha={};!function(t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return {default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=d?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o];}r.default=e,t&&t.set(e,r);return r}(React__default["default"]),d=function(e){return e&&e.__esModule?e:{default:e}}(ra),o=da,a=hd;function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},l.apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var n,r=$(e);if(t){var d=$(this).constructor;n=Reflect.construct(r,arguments,d);}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return !t||"object"!==n(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t);}(p,e);var t,n,i=f(p);function p(){var e;c(this,p);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(y(e=i.call.apply(i,[this].concat(n))),"mounted",!1),h(y(e),"isReady",!1),h(y(e),"isPlaying",!1),h(y(e),"isLoading",!0),h(y(e),"loadOnReady",null),h(y(e),"startOnPlay",!0),h(y(e),"seekOnPlay",null),h(y(e),"onDurationCalled",!1),h(y(e),"handlePlayerMount",(function(t){e.player||(e.player=t,e.player.load(e.props.url)),e.progress();})),h(y(e),"getInternalPlayer",(function(t){return e.player?e.player[t]:null})),h(y(e),"progress",(function(){if(e.props.url&&e.player&&e.isReady){var t=e.getCurrentTime()||0,n=e.getSecondsLoaded(),r=e.getDuration();if(r){var d={playedSeconds:t,played:t/r};null!==n&&(d.loadedSeconds=n,d.loaded=n/r),d.playedSeconds===e.prevPlayed&&d.loadedSeconds===e.prevLoaded||e.props.onProgress(d),e.prevPlayed=d.playedSeconds,e.prevLoaded=d.loadedSeconds;}}e.progressTimeout=setTimeout(e.progress,e.props.progressFrequency||e.props.progressInterval);})),h(y(e),"handleReady",(function(){if(e.mounted){e.isReady=!0,e.isLoading=!1;var t=e.props,n=t.onReady,r=t.playing,d=t.volume,o=t.muted;n(),o||null===d||e.player.setVolume(d),e.loadOnReady?(e.player.load(e.loadOnReady,!0),e.loadOnReady=null):r&&e.player.play(),e.handleDurationCheck();}})),h(y(e),"handlePlay",(function(){e.isPlaying=!0,e.isLoading=!1;var t=e.props,n=t.onStart,r=t.onPlay,d=t.playbackRate;e.startOnPlay&&(e.player.setPlaybackRate&&1!==d&&e.player.setPlaybackRate(d),n(),e.startOnPlay=!1),r(),e.seekOnPlay&&(e.seekTo(e.seekOnPlay),e.seekOnPlay=null),e.handleDurationCheck();})),h(y(e),"handlePause",(function(t){e.isPlaying=!1,e.isLoading||e.props.onPause(t);})),h(y(e),"handleEnded",(function(){var t=e.props,n=t.activePlayer,r=t.loop,d=t.onEnded;n.loopOnEnded&&r&&e.seekTo(0),r||(e.isPlaying=!1,d());})),h(y(e),"handleError",(function(){var t;e.isLoading=!1,(t=e.props).onError.apply(t,arguments);})),h(y(e),"handleDurationCheck",(function(){clearTimeout(e.durationCheckTimeout);var t=e.getDuration();t?e.onDurationCalled||(e.props.onDuration(t),e.onDurationCalled=!0):e.durationCheckTimeout=setTimeout(e.handleDurationCheck,100);})),h(y(e),"handleLoaded",(function(){e.isLoading=!1;})),e}return t=p,n=[{key:"componentDidMount",value:function(){this.mounted=!0;}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1;}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.player){var n=this.props,r=n.url,o=n.playing,i=n.volume,l=n.muted,c=n.playbackRate,u=n.pip,s=n.loop,f=n.activePlayer,p=n.disableDeferredLoading;if(!(0, d.default)(e.url,r)){if(this.isLoading&&!f.forceLoad&&!p&&!(0, a.isMediaStream)(r))return console.warn("ReactPlayer: the attempt to load ".concat(r," is being deferred until the player has loaded")),void(this.loadOnReady=r);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady);}e.playing||!o||this.isPlaying||this.player.play(),e.playing&&!o&&this.isPlaying&&this.player.pause(),!e.pip&&u&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!u&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==i&&null!==i&&this.player.setVolume(i),e.muted!==l&&(l?this.player.mute():(this.player.unmute(),null!==i&&setTimeout((function(){return t.player.setVolume(i)})))),e.playbackRate!==c&&this.player.setPlaybackRate&&this.player.setPlaybackRate(c),e.loop!==s&&this.player.setLoop&&this.player.setLoop(s);}}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(e,t,n){var r=this;if(this.isReady){if(t?"fraction"===t:e>0&&e<1){var d=this.player.getDuration();return d?void this.player.seekTo(d*e,n):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e,n);}else 0!==e&&(this.seekOnPlay=e,setTimeout((function(){r.seekOnPlay=null;}),5e3));}},{key:"render",value:function(){var e=this.props.activePlayer;return e?r.default.createElement(e,l({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}],n&&u(t.prototype,n),p}(r.Component);t.default=m,h(m,"displayName","Player"),h(m,"propTypes",o.propTypes),h(m,"defaultProps",o.defaultProps);}(Ha);var Ua,za={};function Ga(){return Ua||(Ua=1,function(t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return {default:e};var t=d();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a];}r.default=e,t&&t.set(e,r);return r}(React__default["default"]);function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r);}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){y(e,t,n[t]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t));}));}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var n,r=p(e);if(t){var d=p(this).constructor;n=Reflect.construct(r,arguments,d);}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return !t||"object"!==n(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $="64px",h={},m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t);}(s,e);var t,n,o=u(s);function s(){var e;i(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(f(e=o.call.apply(o,[this].concat(n))),"mounted",!1),y(f(e),"state",{image:null}),y(f(e),"handleKeyPress",(function(t){"Enter"!==t.key&&" "!==t.key||e.props.onClick();})),e}return t=s,n=[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props);}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.url,r=t.light;e.url===n&&e.light===r||this.fetchImage(this.props);}},{key:"componentWillUnmount",value:function(){this.mounted=!1;}},{key:"fetchImage",value:function(e){var t=this,n=e.url,d=e.light,o=e.oEmbedUrl;if(!r.default.isValidElement(d))if("string"!=typeof d){if(!h[n])return this.setState({image:null}),window.fetch(o.replace("{url}",n)).then((function(e){return e.json()})).then((function(e){if(e.thumbnail_url&&t.mounted){var r=e.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");t.setState({image:r}),h[n]=r;}}));this.setState({image:h[n]});}else this.setState({image:d});}},{key:"render",value:function(){var e=this.props,t=e.light,n=e.onClick,d=e.playIcon,o=e.previewTabIndex,i=this.state.image,l=r.default.isValidElement(t),c={display:"flex",alignItems:"center",justifyContent:"center"},u={preview:a({width:"100%",height:"100%",backgroundImage:i&&!l?"url(".concat(i,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},c),shadow:a({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:$,width:$,height:$,position:l?"absolute":void 0},c),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},s=r.default.createElement("div",{style:u.shadow,className:"react-player__shadow"},r.default.createElement("div",{style:u.playIcon,className:"react-player__play-icon"}));return r.default.createElement("div",{style:u.preview,className:"react-player__preview",onClick:n,tabIndex:o,onKeyPress:this.handleKeyPress},l?t:null,d||s)}}],n&&l(t.prototype,n),s}(r.Component);t.default=m;}(za)),za}Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.createReactPlayer=void 0;var Fa=yi(React__default["default"]),Za=qa(Ad),Qa=qa(Yo),Ka=qa(ra),Wa=da,Ya=hd,Ja=qa(Ha);function qa(e){return e&&e.__esModule?e:{default:e}}function Xa(e){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(e)}function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r);}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach((function(t){fi(e,t,n[t]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t));}));}return e}function ni(){return ni=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},ni.apply(this,arguments)}function ri(e){return function(e){if(Array.isArray(e))return di(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ai(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function ii(e,t){return ii=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ii(e,t)}function li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var n,r=si(e);if(t){var d=si(this).constructor;n=Reflect.construct(r,arguments,d);}else n=r.apply(this,arguments);return ci(this,n)}}function ci(e,t){return !t||"object"!==Xa(t)&&"function"!=typeof t?ui(e):t}function ui(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function si(e){return si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},si(e)}function fi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return pi=function(){return e},e}function yi(e){if(e&&e.__esModule)return e;if(null===e||"object"!==Xa(e)&&"function"!=typeof e)return {default:e};var t=pi();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)){var o=r?Object.getOwnPropertyDescriptor(e,d):null;o&&(o.get||o.set)?Object.defineProperty(n,d,o):n[d]=e[d];}return n.default=e,t&&t.set(e,n),n}var $i=(0, Fa.lazy)((function(){return Promise.resolve().then((function(){return yi(Ga())}))})),hi="undefined"!=typeof window&&window.document,mi=void 0!==m&&m.window&&m.window.document,gi=Object.keys(Wa.propTypes),vi=hi||mi?Fa.Suspense:function(){return null},bi=[];Zo.createReactPlayer=function(e,t){var n,r;return r=n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ii(e,t);}(i,Fa.Component);var r,d,a=li(i);function i(){var n;oi(this,i);for(var r=arguments.length,d=new Array(r),o=0;o<r;o++)d[o]=arguments[o];return fi(ui(n=a.call.apply(a,[this].concat(d))),"state",{showPreview:!!n.props.light}),fi(ui(n),"references",{wrapper:function(e){n.wrapper=e;},player:function(e){n.player=e;}}),fi(ui(n),"handleClickPreview",(function(e){n.setState({showPreview:!1}),n.props.onClickPreview(e);})),fi(ui(n),"showPreview",(function(){n.setState({showPreview:!0});})),fi(ui(n),"getDuration",(function(){return n.player?n.player.getDuration():null})),fi(ui(n),"getCurrentTime",(function(){return n.player?n.player.getCurrentTime():null})),fi(ui(n),"getSecondsLoaded",(function(){return n.player?n.player.getSecondsLoaded():null})),fi(ui(n),"getInternalPlayer",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null})),fi(ui(n),"seekTo",(function(e,t,r){if(!n.player)return null;n.player.seekTo(e,t,r);})),fi(ui(n),"handleReady",(function(){n.props.onReady(ui(n));})),fi(ui(n),"getActivePlayer",(0, Qa.default)((function(n){for(var r=0,d=[].concat(bi,ri(e));r<d.length;r++){var o=d[r];if(o.canPlay(n))return o}return t||null}))),fi(ui(n),"getConfig",(0, Qa.default)((function(e,t){var r=n.props.config;return Za.default.all([Wa.defaultProps.config,Wa.defaultProps.config[t]||{},r,r[t]||{}])}))),fi(ui(n),"getAttributes",(0, Qa.default)((function(e){return (0, Ya.omit)(n.props,gi)}))),fi(ui(n),"renderActivePlayer",(function(e){if(!e)return null;var t=n.getActivePlayer(e);if(!t)return null;var r=n.getConfig(e,t.key);return Fa.default.createElement(Ja.default,ni({},n.props,{key:t.key,ref:n.references.player,config:r,activePlayer:t.lazyPlayer||t,onReady:n.handleReady}))})),n}return r=i,d=[{key:"shouldComponentUpdate",value:function(e,t){return !(0, Ka.default)(this.props,e)||!(0, Ka.default)(this.state,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props.light;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1});}},{key:"renderPreview",value:function(e){if(!e)return null;var t=this.props,n=t.light,r=t.playIcon,d=t.previewTabIndex,o=t.oEmbedUrl;return Fa.default.createElement($i,{url:e,light:n,playIcon:r,previewTabIndex:d,oEmbedUrl:o,onClick:this.handleClickPreview})}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,d=e.height,o=e.fallback,a=e.wrapper,i=this.state.showPreview,l=this.getAttributes(t),c="string"==typeof a?this.references.wrapper:void 0;return Fa.default.createElement(a,ni({ref:c,style:ti(ti({},n),{},{width:r,height:d})},l),Fa.default.createElement(vi,{fallback:o},i?this.renderPreview(t):this.renderActivePlayer(t)))}}],d&&ai(r.prototype,d),i}(),fi(n,"displayName","ReactPlayer"),fi(n,"propTypes",Wa.propTypes),fi(n,"defaultProps",Wa.defaultProps),fi(n,"addCustomPlayer",(function(e){bi.push(e);})),fi(n,"removeCustomPlayers",(function(){bi.length=0;})),fi(n,"canPlay",(function(t){for(var n=0,r=[].concat(bi,ri(e));n<r.length;n++){if(r[n].canPlay(t))return !0}return !1})),fi(n,"canEnablePIP",(function(t){for(var n=0,r=[].concat(bi,ri(e));n<r.length;n++){var d=r[n];if(d.canEnablePIP&&d.canEnablePIP(t))return !0}return !1})),r},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(e){return e&&e.__esModule?e:{default:e}}($d),n=Zo;var r=t.default[t.default.length-1],d=(0, n.createReactPlayer)(t.default,r);e.default=d;}(yd);g(yd);const Ri=()=>React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"Logo",x:"0px",y:"0px",viewBox:"0 0 900.2 269.3",xmlSpace:"preserve"},React__default["default"].createElement("g",null,React__default["default"].createElement("g",null,React__default["default"].createElement("g",null,React__default["default"].createElement("path",{fill:"currentColor",d:"M116.6,30.4v79.3h79.3V30.4H116.6z M163.9,97.4c0-19.7-16.1-35.8-35.8-35.8V44c20.1,0,37.7,11.2,46.8,27.7 c4.2,7.6,6.6,16.4,6.6,25.7H163.9z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M26.9,109.8h79.3V30.5H26.9V109.8z M40,44l53.4,0v17.6H57.6v35.7H40V44z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M26.9,199.6h79.3v-79.3H26.9V199.6z M40,133.5h17.6v53.4H40V133.5z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M116.6,199.6h79.3v-79.3h-79.3V199.6z M145.7,133.5c0,19.7,16,35.8,35.8,35.8v17.6 c-29.4,0-53.4-23.9-53.4-53.4H145.7z"})),React__default["default"].createElement("g",null,React__default["default"].createElement("g",null,React__default["default"].createElement("path",{fill:"currentColor",d:"M725,185.4c-6.5,0-12.7-2.5-17.3-7.2c-4.6-4.6-7.2-10.8-7.2-17.3h0v-2.4l0,0h0c0-6.5,2.5-12.7,7.2-17.3 c4.6-4.6,10.8-7.2,17.3-7.2c6.5,0,12.7,2.5,17.3,7.2l11.4-11.4c-7.7-7.7-17.9-11.9-28.7-11.9c-10.9,0-21.1,4.2-28.7,11.9 c-7.7,7.7-11.9,17.9-11.9,28.7h0l0,0v2.4h0c0,10.9,4.2,21.1,11.9,28.7c7.7,7.7,17.9,11.9,28.7,11.9c10.9,0,21.1-4.2,28.7-11.9 l-11.4-11.4C737.7,182.8,731.5,185.4,725,185.4z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M463.2,160.8L463.2,160.8c0,13.5-11,24.5-24.5,24.5c-13.5,0-24.5-11-24.5-24.5h0l0,0 c0-13.5,11-24.5,24.5-24.5h9.3v-16.1h-9.3c-22.4,0-40.6,18.2-40.6,40.6l0,0h0c0,22.4,18.2,40.6,40.6,40.6 c9.2,0,17.7-3.1,24.5-8.2v6.5h16.1V91h-16.1V160.8z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M343,120.2c-22.4,0-40.6,18.2-40.6,40.6l0,0h0c0,22.4,18.2,40.6,40.6,40.6v0l0,0h3.9v-16.1H343l0,0 c-13.5,0-24.5-11-24.5-24.5h0l0,0c0-13.5,11-24.5,24.5-24.5h23.3v63.4h16.1v-79.5L343,120.2z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M632,117.8c-22.4,0-40.6,18.2-40.6,40.6h0l0,0v41.2h16.1v-41.2l0,0h0c0-13.5,11-24.5,24.5-24.5 c13.5,0,24.5,11,24.5,24.5v41.1h16.1v-41.1C672.6,136.1,654.4,117.8,632,117.8z"}),React__default["default"].createElement("polygon",{fill:"currentColor",points:"246.6,199.6 262.8,199.6 262.8,136.4 295.8,136.4 295.8,120.2 246.6,120.2 "}),React__default["default"].createElement("path",{fill:"currentColor",d:"M535.9,120.2c-22.4,0-40.6,18.2-40.6,40.6l0,0h0c0,22.4,18.2,40.6,40.6,40.6v0l0,0h3.9v-16.1h-3.9l0,0 c-13.5,0-24.5-11-24.5-24.5l0,0c0-13.5,11-24.5,24.5-24.5h23.3v63.4h16.1v-79.5L535.9,120.2z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M826.9,120.2v77.1c0,14.1-11.5,25.6-25.6,25.6v15.9c22.9,0,41.8-18.6,41.8-41.6v-77.1H826.9z"}),React__default["default"].createElement("path",{fill:"currentColor",d:"M809,201.4v-16.1l-5.2,0c-13.5,0-24.5-11-24.5-24.5h0v-40.6h-16.1v40.6l0,0c0,22.4,18.2,40.6,40.6,40.6 L809,201.4z"})))),React__default["default"].createElement("g",null,React__default["default"].createElement("path",{fill:"currentColor",d:"M873.3,128.3c0,4.4-3.6,7.7-7.9,7.7c-4.3,0-7.9-3.3-7.9-7.7c0-4.4,3.6-7.7,7.9-7.7 C869.7,120.7,873.3,124,873.3,128.3z M871.8,128.3c0-3.5-2.9-6.3-6.4-6.3c-3.4,0-6.4,2.7-6.4,6.3c0,3.5,2.9,6.3,6.4,6.3 C868.9,134.6,871.8,131.9,871.8,128.3z M866.7,129.3l2.1,2.6h-1.5l-2-2.5h-1.5v2.5h-1.1v-7.4h3.1c1.6,0,2.7,1,2.7,2.5 C868.6,128.2,867.9,129,866.7,129.3z M863.9,128.3h1.9c0.9,0,1.6-0.5,1.6-1.4c0-0.8-0.7-1.4-1.6-1.4h-1.9V128.3z"}))));
|
|
1326
1326
|
|
|
1327
|
-
function _extends$1() {
|
|
1328
|
-
_extends$1 = Object.assign || function (target) {
|
|
1329
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1330
|
-
var source = arguments[i];
|
|
1331
|
-
|
|
1332
|
-
for (var key in source) {
|
|
1333
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1334
|
-
target[key] = source[key];
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
return target;
|
|
1340
|
-
};
|
|
1341
|
-
|
|
1342
|
-
return _extends$1.apply(this, arguments);
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1346
|
-
if (source == null) return {};
|
|
1347
|
-
var target = {};
|
|
1348
|
-
var sourceKeys = Object.keys(source);
|
|
1349
|
-
var key, i;
|
|
1350
|
-
|
|
1351
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1352
|
-
key = sourceKeys[i];
|
|
1353
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1354
|
-
target[key] = source[key];
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
return target;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* Logs messages in the console with a corresponding urgency
|
|
1362
|
-
*
|
|
1363
|
-
* @param level the urgency of the message
|
|
1364
|
-
* @param message the message to log in the console
|
|
1365
|
-
*/
|
|
1366
|
-
var log$3 = function log(level, message) {
|
|
1367
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1368
|
-
var packageName = '[react-use-intercom]';
|
|
1369
|
-
|
|
1370
|
-
switch (level) {
|
|
1371
|
-
case 'info':
|
|
1372
|
-
console.log(packageName + " " + message);
|
|
1373
|
-
break;
|
|
1374
|
-
|
|
1375
|
-
case 'warn':
|
|
1376
|
-
console.warn(packageName + " " + message);
|
|
1377
|
-
break;
|
|
1378
|
-
|
|
1379
|
-
case 'error':
|
|
1380
|
-
console.error(packageName + " " + message);
|
|
1381
|
-
break;
|
|
1382
|
-
|
|
1383
|
-
default:
|
|
1384
|
-
console.log(packageName + " " + message);
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
};
|
|
1388
|
-
|
|
1389
|
-
var isSSR = typeof window === 'undefined';
|
|
1390
|
-
/**
|
|
1391
|
-
* Removes object entries where the value equals to `undefined`
|
|
1392
|
-
*
|
|
1393
|
-
* @param obj
|
|
1394
|
-
*/
|
|
1395
|
-
|
|
1396
|
-
var removeUndefined = function removeUndefined(obj) {
|
|
1397
|
-
Object.keys(obj).forEach(function (key) {
|
|
1398
|
-
if (obj[key] && typeof obj[key] === 'object') removeUndefined(obj[key]);else if (obj[key] === undefined) delete obj[key];
|
|
1399
|
-
});
|
|
1400
|
-
return obj;
|
|
1401
|
-
};
|
|
1402
|
-
|
|
1403
|
-
/**
|
|
1404
|
-
* Safely exposes `window.Intercom` and passes the arguments to the instance
|
|
1405
|
-
*
|
|
1406
|
-
* @param method method passed to the `window.Intercom` instance
|
|
1407
|
-
* @param args arguments passed to the `window.Intercom` instance
|
|
1408
|
-
*
|
|
1409
|
-
* @see {@link https://developers.intercom.com/installing-intercom/docs/intercom-javascript}
|
|
1410
|
-
*/
|
|
1411
|
-
|
|
1412
|
-
var IntercomAPI = function IntercomAPI(method) {
|
|
1413
|
-
if (!isSSR && window.Intercom) {
|
|
1414
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1415
|
-
args[_key - 1] = arguments[_key];
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
return window.Intercom.apply(null, [method].concat(args));
|
|
1419
|
-
} else {
|
|
1420
|
-
log$3('error', method + " Intercom instance is not initalized yet");
|
|
1421
|
-
}
|
|
1422
|
-
};
|
|
1423
|
-
|
|
1424
|
-
var IntercomContext = /*#__PURE__*/React.createContext(undefined);
|
|
1425
|
-
|
|
1426
|
-
// @ts-nocheck
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* Snippet to initialize the Intercom instance
|
|
1430
|
-
*
|
|
1431
|
-
* @param appId - Intercom app id
|
|
1432
|
-
* @param [timeout=0] - Amount of milliseconds that the initialization should be delayed, defaults to 0
|
|
1433
|
-
*
|
|
1434
|
-
* @see {@link https://developers.intercom.com/installing-intercom/docs/basic-javascript}
|
|
1435
|
-
*/
|
|
1436
|
-
var initialize = function initialize(appId, timeout) {
|
|
1437
|
-
if (timeout === void 0) {
|
|
1438
|
-
timeout = 0;
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
var w = window;
|
|
1442
|
-
var ic = w.Intercom;
|
|
1443
|
-
|
|
1444
|
-
if (typeof ic === 'function') {
|
|
1445
|
-
ic('reattach_activator');
|
|
1446
|
-
ic('update', w.intercomSettings);
|
|
1447
|
-
} else {
|
|
1448
|
-
var d = document;
|
|
1449
|
-
|
|
1450
|
-
var i = function i() {
|
|
1451
|
-
i.c(arguments);
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
|
-
i.q = [];
|
|
1455
|
-
|
|
1456
|
-
i.c = function (args) {
|
|
1457
|
-
i.q.push(args);
|
|
1458
|
-
};
|
|
1459
|
-
|
|
1460
|
-
w.Intercom = i;
|
|
1461
|
-
|
|
1462
|
-
var l = function l() {
|
|
1463
|
-
setTimeout(function () {
|
|
1464
|
-
var s = d.createElement('script');
|
|
1465
|
-
s.type = 'text/javascript';
|
|
1466
|
-
s.async = true;
|
|
1467
|
-
s.src = 'https://widget.intercom.io/widget/' + appId;
|
|
1468
|
-
var x = d.getElementsByTagName('script')[0];
|
|
1469
|
-
x.parentNode.insertBefore(s, x);
|
|
1470
|
-
}, timeout);
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1473
|
-
if (document.readyState === 'complete') {
|
|
1474
|
-
l();
|
|
1475
|
-
} else if (w.attachEvent) {
|
|
1476
|
-
w.attachEvent('onload', l);
|
|
1477
|
-
} else {
|
|
1478
|
-
w.addEventListener('load', l, false);
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
};
|
|
1482
|
-
|
|
1483
|
-
var mapMessengerAttributesToRawMessengerAttributes = function mapMessengerAttributesToRawMessengerAttributes(attributes) {
|
|
1484
|
-
return {
|
|
1485
|
-
custom_launcher_selector: attributes.customLauncherSelector,
|
|
1486
|
-
alignment: attributes.alignment,
|
|
1487
|
-
vertical_padding: attributes.verticalPadding,
|
|
1488
|
-
horizontal_padding: attributes.horizontalPadding,
|
|
1489
|
-
hide_default_launcher: attributes.hideDefaultLauncher,
|
|
1490
|
-
session_duration: attributes.sessionDuration,
|
|
1491
|
-
action_color: attributes.actionColor,
|
|
1492
|
-
background_color: attributes.backgroundColor
|
|
1493
|
-
};
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
|
-
var mapDataAttributesCompanyToRawDataAttributesCompany = function mapDataAttributesCompanyToRawDataAttributesCompany(attributes) {
|
|
1497
|
-
return _extends$1({
|
|
1498
|
-
company_id: attributes.companyId,
|
|
1499
|
-
name: attributes.name,
|
|
1500
|
-
created_at: attributes.createdAt,
|
|
1501
|
-
plan: attributes.plan,
|
|
1502
|
-
monthly_spend: attributes.monthlySpend,
|
|
1503
|
-
user_count: attributes.userCount,
|
|
1504
|
-
size: attributes.size,
|
|
1505
|
-
website: attributes.website,
|
|
1506
|
-
industry: attributes.industry
|
|
1507
|
-
}, attributes.customAttributes);
|
|
1508
|
-
};
|
|
1509
|
-
|
|
1510
|
-
var mapDataAttributesAvatarToRawDataAttributesAvatar = function mapDataAttributesAvatarToRawDataAttributesAvatar(attributes) {
|
|
1511
|
-
return {
|
|
1512
|
-
type: attributes.type,
|
|
1513
|
-
image_url: attributes.imageUrl
|
|
1514
|
-
};
|
|
1515
|
-
};
|
|
1516
|
-
|
|
1517
|
-
var mapDataAttributesToRawDataAttributes = function mapDataAttributesToRawDataAttributes(attributes) {
|
|
1518
|
-
var _attributes$companies;
|
|
1519
|
-
|
|
1520
|
-
return _extends$1({
|
|
1521
|
-
email: attributes.email,
|
|
1522
|
-
user_id: attributes.userId,
|
|
1523
|
-
created_at: attributes.createdAt,
|
|
1524
|
-
name: attributes.name,
|
|
1525
|
-
phone: attributes.phone,
|
|
1526
|
-
last_request_at: attributes.lastRequestAt,
|
|
1527
|
-
unsubscribed_from_emails: attributes.unsubscribedFromEmails,
|
|
1528
|
-
language_override: attributes.languageOverride,
|
|
1529
|
-
utm_campaign: attributes.utmCampaign,
|
|
1530
|
-
utm_content: attributes.utmContent,
|
|
1531
|
-
utm_medium: attributes.utmMedium,
|
|
1532
|
-
utm_source: attributes.utmSource,
|
|
1533
|
-
utm_term: attributes.utmTerm,
|
|
1534
|
-
avatar: attributes.avatar && mapDataAttributesAvatarToRawDataAttributesAvatar(attributes.avatar),
|
|
1535
|
-
user_hash: attributes.userHash,
|
|
1536
|
-
company: attributes.company && mapDataAttributesCompanyToRawDataAttributesCompany(attributes.company),
|
|
1537
|
-
companies: (_attributes$companies = attributes.companies) == null ? void 0 : _attributes$companies.map(mapDataAttributesCompanyToRawDataAttributesCompany)
|
|
1538
|
-
}, attributes.customAttributes);
|
|
1539
|
-
};
|
|
1540
|
-
var mapIntercomPropsToRawIntercomProps = function mapIntercomPropsToRawIntercomProps(props) {
|
|
1541
|
-
return removeUndefined(_extends$1({}, mapMessengerAttributesToRawMessengerAttributes(props), mapDataAttributesToRawDataAttributes(props)));
|
|
1542
|
-
};
|
|
1543
|
-
|
|
1544
|
-
var IntercomProvider = function IntercomProvider(_ref) {
|
|
1545
|
-
var appId = _ref.appId,
|
|
1546
|
-
_ref$autoBoot = _ref.autoBoot,
|
|
1547
|
-
autoBoot = _ref$autoBoot === void 0 ? false : _ref$autoBoot,
|
|
1548
|
-
autoBootProps = _ref.autoBootProps,
|
|
1549
|
-
children = _ref.children,
|
|
1550
|
-
onHide = _ref.onHide,
|
|
1551
|
-
onShow = _ref.onShow,
|
|
1552
|
-
onUnreadCountChange = _ref.onUnreadCountChange,
|
|
1553
|
-
_ref$shouldInitialize = _ref.shouldInitialize,
|
|
1554
|
-
shouldInitialize = _ref$shouldInitialize === void 0 ? !isSSR : _ref$shouldInitialize,
|
|
1555
|
-
apiBase = _ref.apiBase,
|
|
1556
|
-
initializeDelay = _ref.initializeDelay,
|
|
1557
|
-
rest = _objectWithoutPropertiesLoose(_ref, ["appId", "autoBoot", "autoBootProps", "children", "onHide", "onShow", "onUnreadCountChange", "shouldInitialize", "apiBase", "initializeDelay"]);
|
|
1558
|
-
|
|
1559
|
-
var isBooted = React.useRef(false);
|
|
1560
|
-
var isInitialized = React.useRef(false);
|
|
1561
|
-
|
|
1562
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1563
|
-
// Allow data-x attributes, see https://github.com/devrnt/react-use-intercom/issues/478
|
|
1564
|
-
var invalidPropKeys = Object.keys(rest).filter(function (key) {
|
|
1565
|
-
return !key.startsWith('data-');
|
|
1566
|
-
});
|
|
1567
|
-
|
|
1568
|
-
if (invalidPropKeys.length > 0) {
|
|
1569
|
-
log$3('warn', ['some invalid props were passed to IntercomProvider. ', "Please check following props: " + invalidPropKeys.join(', ') + "."].join(''));
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
var boot = React.useCallback(function (props) {
|
|
1574
|
-
if (!window.Intercom && !shouldInitialize) {
|
|
1575
|
-
log$3('warn', 'Intercom instance is not initialized because `shouldInitialize` is set to `false` in `IntercomProvider`');
|
|
1576
|
-
return;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
if (isBooted.current) {
|
|
1580
|
-
return;
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
var metaData = _extends$1({
|
|
1584
|
-
app_id: appId
|
|
1585
|
-
}, apiBase && {
|
|
1586
|
-
api_base: apiBase
|
|
1587
|
-
}, props && mapIntercomPropsToRawIntercomProps(props));
|
|
1588
|
-
|
|
1589
|
-
window.intercomSettings = metaData;
|
|
1590
|
-
IntercomAPI('boot', metaData);
|
|
1591
|
-
isBooted.current = true;
|
|
1592
|
-
}, [apiBase, appId, shouldInitialize]);
|
|
1593
|
-
|
|
1594
|
-
var _React$useState = React.useState(false),
|
|
1595
|
-
isOpen = _React$useState[0],
|
|
1596
|
-
setIsOpen = _React$useState[1];
|
|
1597
|
-
|
|
1598
|
-
var onHideWrapper = React.useCallback(function () {
|
|
1599
|
-
setIsOpen(false);
|
|
1600
|
-
if (onHide) onHide();
|
|
1601
|
-
}, [onHide, setIsOpen]);
|
|
1602
|
-
var onShowWrapper = React.useCallback(function () {
|
|
1603
|
-
setIsOpen(true);
|
|
1604
|
-
if (onShow) onShow();
|
|
1605
|
-
}, [onShow, setIsOpen]);
|
|
1606
|
-
|
|
1607
|
-
if (!isSSR && shouldInitialize && !isInitialized.current) {
|
|
1608
|
-
initialize(appId, initializeDelay); // attach listeners
|
|
1609
|
-
|
|
1610
|
-
IntercomAPI('onHide', onHideWrapper);
|
|
1611
|
-
IntercomAPI('onShow', onShowWrapper);
|
|
1612
|
-
if (onUnreadCountChange) IntercomAPI('onUnreadCountChange', onUnreadCountChange);
|
|
1613
|
-
|
|
1614
|
-
if (autoBoot) {
|
|
1615
|
-
boot(autoBootProps);
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
isInitialized.current = true;
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
var ensureIntercom = React.useCallback(function (functionName, callback) {
|
|
1622
|
-
if (functionName === void 0) {
|
|
1623
|
-
functionName = 'A function';
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
if (!window.Intercom && !shouldInitialize) {
|
|
1627
|
-
log$3('warn', 'Intercom instance is not initialized because `shouldInitialize` is set to `false` in `IntercomProvider`');
|
|
1628
|
-
return;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
if (!isBooted.current) {
|
|
1632
|
-
log$3('warn', ["'" + functionName + "' was called but Intercom has not booted yet. ", "Please call 'boot' before calling '" + functionName + "' or ", "set 'autoBoot' to true in the IntercomProvider."].join(''));
|
|
1633
|
-
return;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
return callback();
|
|
1637
|
-
}, [shouldInitialize]);
|
|
1638
|
-
var shutdown = React.useCallback(function () {
|
|
1639
|
-
if (!isBooted.current) return;
|
|
1640
|
-
IntercomAPI('shutdown');
|
|
1641
|
-
delete window.intercomSettings;
|
|
1642
|
-
isBooted.current = false;
|
|
1643
|
-
}, []);
|
|
1644
|
-
var hardShutdown = React.useCallback(function () {
|
|
1645
|
-
if (!isBooted.current) return;
|
|
1646
|
-
IntercomAPI('shutdown');
|
|
1647
|
-
delete window.Intercom;
|
|
1648
|
-
delete window.intercomSettings;
|
|
1649
|
-
isBooted.current = false;
|
|
1650
|
-
}, []);
|
|
1651
|
-
var refresh = React.useCallback(function () {
|
|
1652
|
-
ensureIntercom('update', function () {
|
|
1653
|
-
var lastRequestedAt = new Date().getTime();
|
|
1654
|
-
IntercomAPI('update', {
|
|
1655
|
-
last_requested_at: lastRequestedAt
|
|
1656
|
-
});
|
|
1657
|
-
});
|
|
1658
|
-
}, [ensureIntercom]);
|
|
1659
|
-
var update = React.useCallback(function (props) {
|
|
1660
|
-
ensureIntercom('update', function () {
|
|
1661
|
-
if (!props) {
|
|
1662
|
-
refresh();
|
|
1663
|
-
return;
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
var rawProps = mapIntercomPropsToRawIntercomProps(props);
|
|
1667
|
-
window.intercomSettings = _extends$1({}, window.intercomSettings, rawProps);
|
|
1668
|
-
IntercomAPI('update', rawProps);
|
|
1669
|
-
});
|
|
1670
|
-
}, [ensureIntercom, refresh]);
|
|
1671
|
-
var hide = React.useCallback(function () {
|
|
1672
|
-
ensureIntercom('hide', function () {
|
|
1673
|
-
IntercomAPI('hide');
|
|
1674
|
-
});
|
|
1675
|
-
}, [ensureIntercom]);
|
|
1676
|
-
var show = React.useCallback(function () {
|
|
1677
|
-
ensureIntercom('show', function () {
|
|
1678
|
-
return IntercomAPI('show');
|
|
1679
|
-
});
|
|
1680
|
-
}, [ensureIntercom]);
|
|
1681
|
-
var showMessages = React.useCallback(function () {
|
|
1682
|
-
ensureIntercom('showMessages', function () {
|
|
1683
|
-
IntercomAPI('showMessages');
|
|
1684
|
-
});
|
|
1685
|
-
}, [ensureIntercom]);
|
|
1686
|
-
var showNewMessages = React.useCallback(function (message) {
|
|
1687
|
-
ensureIntercom('showNewMessage', function () {
|
|
1688
|
-
if (!message) {
|
|
1689
|
-
IntercomAPI('showNewMessage');
|
|
1690
|
-
} else {
|
|
1691
|
-
IntercomAPI('showNewMessage', message);
|
|
1692
|
-
}
|
|
1693
|
-
});
|
|
1694
|
-
}, [ensureIntercom]);
|
|
1695
|
-
var getVisitorId = React.useCallback(function () {
|
|
1696
|
-
return ensureIntercom('getVisitorId', function () {
|
|
1697
|
-
return IntercomAPI('getVisitorId');
|
|
1698
|
-
});
|
|
1699
|
-
}, [ensureIntercom]);
|
|
1700
|
-
var startTour = React.useCallback(function (tourId) {
|
|
1701
|
-
ensureIntercom('startTour', function () {
|
|
1702
|
-
IntercomAPI('startTour', tourId);
|
|
1703
|
-
});
|
|
1704
|
-
}, [ensureIntercom]);
|
|
1705
|
-
var trackEvent = React.useCallback(function (event, metaData) {
|
|
1706
|
-
ensureIntercom('trackEvent', function () {
|
|
1707
|
-
if (metaData) {
|
|
1708
|
-
IntercomAPI('trackEvent', event, metaData);
|
|
1709
|
-
} else {
|
|
1710
|
-
IntercomAPI('trackEvent', event);
|
|
1711
|
-
}
|
|
1712
|
-
});
|
|
1713
|
-
}, [ensureIntercom]);
|
|
1714
|
-
var showArticle = React.useCallback(function (articleId) {
|
|
1715
|
-
return ensureIntercom('showArticle', function () {
|
|
1716
|
-
IntercomAPI('showArticle', articleId);
|
|
1717
|
-
});
|
|
1718
|
-
}, [ensureIntercom]);
|
|
1719
|
-
var providerValue = React.useMemo(function () {
|
|
1720
|
-
return {
|
|
1721
|
-
boot: boot,
|
|
1722
|
-
shutdown: shutdown,
|
|
1723
|
-
hardShutdown: hardShutdown,
|
|
1724
|
-
update: update,
|
|
1725
|
-
hide: hide,
|
|
1726
|
-
show: show,
|
|
1727
|
-
isOpen: isOpen,
|
|
1728
|
-
showMessages: showMessages,
|
|
1729
|
-
showNewMessages: showNewMessages,
|
|
1730
|
-
getVisitorId: getVisitorId,
|
|
1731
|
-
startTour: startTour,
|
|
1732
|
-
trackEvent: trackEvent,
|
|
1733
|
-
showArticle: showArticle
|
|
1734
|
-
};
|
|
1735
|
-
}, [boot, shutdown, hardShutdown, update, hide, show, isOpen, showMessages, showNewMessages, getVisitorId, startTour, trackEvent, showArticle]);
|
|
1736
|
-
return React.createElement(IntercomContext.Provider, {
|
|
1737
|
-
value: providerValue
|
|
1738
|
-
}, children);
|
|
1739
|
-
};
|
|
1740
|
-
var useIntercomContext = function useIntercomContext() {
|
|
1741
|
-
var context = React.useContext(IntercomContext);
|
|
1742
|
-
|
|
1743
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1744
|
-
if (context === undefined) {
|
|
1745
|
-
throw new Error('`useIntercom` must be used within `IntercomProvider`.');
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
return context;
|
|
1750
|
-
};
|
|
1751
|
-
|
|
1752
|
-
var useIntercom = function useIntercom() {
|
|
1753
|
-
return useIntercomContext();
|
|
1754
|
-
};
|
|
1755
|
-
|
|
1756
1327
|
/**
|
|
1757
1328
|
*
|
|
1758
1329
|
* detectIncognito v1.0.0 - (c) 2022 Joe Rutkowski <Joe@dreggle.com> (https://github.com/Joe12387/detectIncognito)
|
|
@@ -35448,19 +35019,16 @@ function getActiveTransaction(hub = getCurrentHub()) {
|
|
|
35448
35019
|
const local_config = {
|
|
35449
35020
|
// serverUrl: 'https://api-video-staging.myinterview.com',
|
|
35450
35021
|
serverUrl: 'https://api-video-dev.myinterview.com',
|
|
35451
|
-
INTERCOM_APP_ID: 'w75vea5o',
|
|
35452
35022
|
SENTRY_DSN: 'https://a49d1d55605640f4890f9534766f0ea8@o79324.ingest.sentry.io/6579209',
|
|
35453
35023
|
};
|
|
35454
35024
|
|
|
35455
35025
|
const staging_config = {
|
|
35456
35026
|
serverUrl: 'https://api-video-staging.myinterview.com',
|
|
35457
|
-
INTERCOM_APP_ID: 'pzs0slby',
|
|
35458
35027
|
SENTRY_DSN: 'https://a49d1d55605640f4890f9534766f0ea8@o79324.ingest.sentry.io/6579209',
|
|
35459
35028
|
};
|
|
35460
35029
|
|
|
35461
35030
|
const prod_config = {
|
|
35462
35031
|
serverUrl: 'https://api-video.myinterview.com',
|
|
35463
|
-
INTERCOM_APP_ID: 'pzs0slby',
|
|
35464
35032
|
SENTRY_DSN: 'https://a49d1d55605640f4890f9534766f0ea8@o79324.ingest.sentry.io/6579209',
|
|
35465
35033
|
};
|
|
35466
35034
|
|
|
@@ -35468,7 +35036,7 @@ const prod_config = {
|
|
|
35468
35036
|
const config$1 = (configEnv) => {
|
|
35469
35037
|
let env = configEnv;
|
|
35470
35038
|
try {
|
|
35471
|
-
env !== null && env !== void 0 ? env : (env = "
|
|
35039
|
+
env !== null && env !== void 0 ? env : (env = "staging");
|
|
35472
35040
|
}
|
|
35473
35041
|
catch (_a) { }
|
|
35474
35042
|
switch (env) {
|
|
@@ -35487,8 +35055,8 @@ const configGenerator = () => {
|
|
|
35487
35055
|
let environment;
|
|
35488
35056
|
let release;
|
|
35489
35057
|
try {
|
|
35490
|
-
environment !== null && environment !== void 0 ? environment : (environment = "
|
|
35491
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
35058
|
+
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
35059
|
+
release !== null && release !== void 0 ? release : (release = "1.1.65");
|
|
35492
35060
|
}
|
|
35493
35061
|
catch (_a) {
|
|
35494
35062
|
console.error('sentry configGenerator error');
|
|
@@ -55714,7 +55282,6 @@ const MinimizeButton = ({ onClick }) => (React__default["default"].createElement
|
|
|
55714
55282
|
const isRtl = (language = 'en') => ['he', 'ar'].includes(language);
|
|
55715
55283
|
|
|
55716
55284
|
const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMinimized, onMinimize }) => {
|
|
55717
|
-
const { boot, shutdown, update } = useIntercom();
|
|
55718
55285
|
const viewsRef = React.useRef(null);
|
|
55719
55286
|
const videoRef = React.useRef(null);
|
|
55720
55287
|
const [machine, send] = useMachine(() => accWidgetMachine.withContext(Object.assign(Object.assign({}, accWidgetMachine.context), { widgetConfig, videoRef })));
|
|
@@ -55742,17 +55309,11 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
55742
55309
|
(_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-widget-background-height', 'calc(40vh - 100px)');
|
|
55743
55310
|
window.addEventListener('beforeunload', handleReload);
|
|
55744
55311
|
window.addEventListener('keydown', handleEscape);
|
|
55745
|
-
if (config.hideIntercom === false) {
|
|
55746
|
-
boot({
|
|
55747
|
-
customAttributes: { is_new_widget: true },
|
|
55748
|
-
});
|
|
55749
|
-
}
|
|
55750
55312
|
window.addEventListener('touchstart', () => false, { passive: false });
|
|
55751
55313
|
return () => {
|
|
55752
55314
|
window.removeEventListener('beforeunload', handleReload);
|
|
55753
55315
|
window.removeEventListener('touchstart', () => false);
|
|
55754
55316
|
window.removeEventListener('keydown', handleEscape);
|
|
55755
|
-
shutdown();
|
|
55756
55317
|
};
|
|
55757
55318
|
}, []);
|
|
55758
55319
|
React.useEffect(() => {
|
|
@@ -55783,17 +55344,6 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
55783
55344
|
}
|
|
55784
55345
|
}, [machine.done]);
|
|
55785
55346
|
React.useEffect(() => {
|
|
55786
|
-
if (config.hideIntercom === false) {
|
|
55787
|
-
update({
|
|
55788
|
-
customAttributes: {
|
|
55789
|
-
apiKey: candidate === null || candidate === void 0 ? void 0 : candidate.apiKey,
|
|
55790
|
-
company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id,
|
|
55791
|
-
name: candidate === null || candidate === void 0 ? void 0 : candidate.username,
|
|
55792
|
-
email: candidate === null || candidate === void 0 ? void 0 : candidate.email,
|
|
55793
|
-
},
|
|
55794
|
-
alignment: isRtl(job === null || job === void 0 ? void 0 : job.language) ? 'left' : 'right',
|
|
55795
|
-
});
|
|
55796
|
-
}
|
|
55797
55347
|
SentryHub.configureScope((scope) => {
|
|
55798
55348
|
scope.setTags(Object.assign({ company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id, email: candidate.email }, (isIphone && { iphoneModel: getIPhoneModel() })));
|
|
55799
55349
|
});
|
|
@@ -55961,7 +55511,7 @@ const FOCUSABLE_SELECTORS = Object.freeze([
|
|
|
55961
55511
|
'a[href]', 'button:not([disabled]):not([tabindex="-1"])', 'textarea', 'input', 'select', '[tabindex]:not([tabindex="-1"])',
|
|
55962
55512
|
]);
|
|
55963
55513
|
const Widget = React.forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
55964
|
-
const widget_version = "1.1.
|
|
55514
|
+
const widget_version = "1.1.65";
|
|
55965
55515
|
const [isWidgetOpen, setIsWidgetOpen] = React.useState(false);
|
|
55966
55516
|
const [isWidgetMinimized, setIsWidgetMinimized] = React.useState(false);
|
|
55967
55517
|
const [isIncognitoMode, setIsIncognitoMode] = React.useState(false);
|
|
@@ -56122,24 +55672,23 @@ const Widget = React.forwardRef(({ candidate, job, video, config, disabled = fal
|
|
|
56122
55672
|
isCustomStyleProvided && children,
|
|
56123
55673
|
customStyleUrls,
|
|
56124
55674
|
React__default["default"].createElement(ErrorBoundary, null,
|
|
56125
|
-
React__default["default"].createElement(
|
|
56126
|
-
React__default["default"].createElement(
|
|
56127
|
-
|
|
56128
|
-
|
|
56129
|
-
React__default["default"].createElement("div", { className: "myinterview-
|
|
56130
|
-
|
|
56131
|
-
|
|
56132
|
-
|
|
56133
|
-
|
|
56134
|
-
|
|
56135
|
-
|
|
56136
|
-
|
|
56137
|
-
|
|
56138
|
-
|
|
56139
|
-
|
|
56140
|
-
|
|
56141
|
-
|
|
56142
|
-
}, setShouldShowWaterMark: setShouldShowWaterMark, isWidgetMinimized: isWidgetMinimized, onMinimize: onMinimize }))))))))));
|
|
55675
|
+
React__default["default"].createElement("div", { className: "myinterview-widget", ref: mainRef },
|
|
55676
|
+
React__default["default"].createElement(P, { ref: buttonRef, className: "myinterview-widget__button myinterview-text--P1-S", onClick: openWidget, disabled: disabled, style: buttonStyle, "aria-label": "Open interview widget" }, buttonText),
|
|
55677
|
+
isWidgetOpen && (React__default["default"].createElement("div", { className: layoutClassNames, role: "dialog", "aria-modal": "true", "aria-labelledby": "myinterview-widget-main-content" },
|
|
55678
|
+
React__default["default"].createElement("div", { className: "myinterview-widget__background full" },
|
|
55679
|
+
shouldShowWaterMark && (React__default["default"].createElement("div", { className: "myinterview-widget__watermark color--white" },
|
|
55680
|
+
React__default["default"].createElement("span", null, "Powered By"),
|
|
55681
|
+
React__default["default"].createElement(Ri, null))),
|
|
55682
|
+
React__default["default"].createElement("div", { className: "myinterview-widget__background-dots" })),
|
|
55683
|
+
isMobile && React__default["default"].createElement(RotateScreen, null),
|
|
55684
|
+
(!isSupportedDevice || isIncognitoMode) && React__default["default"].createElement(UnsupportedModal, { messageType: !isSupportedIosDevice ? 'IOS' : !isSupportedDevice ? 'BROWSER' : 'INCOGNITO' }),
|
|
55685
|
+
isSupportedDevice && (React__default["default"].createElement("main", { className: wrapperClassNames, id: "myinterview-widget-main-content", role: "main", tabIndex: -1 },
|
|
55686
|
+
React__default["default"].createElement(Main, { myinterviewRef: myinterviewRef, widgetConfig: {
|
|
55687
|
+
config: Object.assign(Object.assign({}, config), { onFinish: onInterviewCompleted, onError, practiceQuestions: convertQuestions(config.practiceQuestions) }),
|
|
55688
|
+
job: Object.assign(Object.assign({}, job), { questions: convertQuestions(job.questions) }),
|
|
55689
|
+
video: Object.assign(Object.assign({}, video), { referrer: (video === null || video === void 0 ? void 0 : video.referrer) || window.location.href, widget_version }),
|
|
55690
|
+
candidate,
|
|
55691
|
+
}, setShouldShowWaterMark: setShouldShowWaterMark, isWidgetMinimized: isWidgetMinimized, onMinimize: onMinimize })))))))));
|
|
56143
55692
|
});
|
|
56144
55693
|
|
|
56145
55694
|
exports.Widget = Widget;
|