@nethesis/phone-island 0.18.4 → 0.18.5

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/App.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./node_modules/tslib/tslib.es6.js"),n=require("react"),t=require("./components/Events.js"),i=require("./components/Socket.js"),s=require("./components/WebRTC.js"),o=require("./components/Island.js"),a=require("./components/RestAPI.js"),r=require("./utils/customHooks/useEventListener.js"),c=require("./utils/genericFunctions/eventDispatch.js"),u=require("./utils/genericFunctions/localStorage.js"),d=require("./store/index.js"),l=require("./services/user.js");require("./node_modules/react-redux/es/index.js"),require("./node_modules/@fortawesome/react-fontawesome/index.es.js"),require("./node_modules/i18next/dist/esm/i18next.js"),require("./node_modules/react-tooltip/dist/react-tooltip.min.mjs.js"),require("./components/TranscriptionView/TranscriptionView.js");var p=require("./node_modules/js-base64/base64.mjs.js"),v=require("./workers/wake_up.js"),h=require("./lib/i18n.js");require("./node_modules/react-tooltip/dist/react-tooltip.min.css.js");var f=require("./lib/webrtc/messages.js"),g=require("./lib/darkTheme.js"),m=require("./utils/genericFunctions/isEmpty.js"),w=require("./utils/genericFunctions/checkConnection.js"),I=require("./utils/genericFunctions/isBackCallVisible.js"),b=require("./lib/phone/trunk.js"),D=require("./lib/phone/call.js"),E=require("./node_modules/react-redux/es/components/Provider.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),require("./node_modules/react-redux/node_modules/react-is/index.js"),require("./node_modules/react-redux/es/components/Context.js");var y=S(n),_=n.forwardRef((function(S,_){var L=S.dataConfig,k=S.showAlways,U=void 0!==k&&k,T=S.uaType,j=S.urlParamWithEvent,C=void 0!==j&&j,O=p.Base64.atob(L||"").split(":"),N=O[0],q=O[1],A=O[2],V=O[3],R=O[4],P=O[5],x=O[6],J=n.useState(!1),W=J[0],F=J[1],M=n.useState(!1),Q=M[0],z=M[1],$=n.useState(!1),H=$[0],B=$[1],G=n.useRef(0);n.useImperativeHandle(_,(function(){return{reset:function(){console.info("PhoneIsland: Performing full component reset"),F(!0)}}}),[]),n.useEffect((function(){var e=Date.now(),n=function(){if(!document.hidden){var n=Date.now(),t=n-e;setTimeout((function(){c.eventDispatch("phone-island-emergency-stop-ringtone",{})}),2e3),t>3e5&&(console.info("Tab inactive for long period, performing soft reconnection"),F(!0)),e=n}},t=new Worker(v.default,{type:"module"});return t.onmessage=function(n){"ping"===n.data&&(e=Date.now())},document.addEventListener("visibilitychange",n),function(){t.terminate(),document.removeEventListener("visibilitychange",n)}}),[]),n.useEffect((function(){H&&Q&&(F(!1),z(!1),B(!1))}),[H,Q]),n.useEffect((function(){var e=setInterval((function(){var e,n,t,i,s=d.store.getState().alerts.data,o=(null===(e=s.webrtc_down)||void 0===e?void 0:e.active)||!1,a=(null===(n=s.socket_down)||void 0===n?void 0:n.active)||!1,r=Date.now(),c=r-G.current,u=d.store.getState().webrtc.sipcall,l=d.store.getState().currentCall,p=l.accepted,v=l.outgoing,h=null===(i=null===(t=null==u?void 0:u.webrtcStuff)||void 0===t?void 0:t.pc)||void 0===i?void 0:i.iceConnectionState,f=p||v||"connected"===h||"completed"===h,g=navigator.onLine;if((o||a)&&!W&&c>1e4&&g){if(f)return void console.info("Alert detected but active call in progress - skipping automatic reload to let ICE recover",{timeSinceLastReload:Math.round(c/1e3)+"s",isWebRTCDown:o,isSocketDown:a,iceState:h,accepted:p,outgoing:v});console.info("Alert detected (webrtc_down or socket_down), triggering automatic reload",{timeSinceLastReload:Math.round(c/1e3)+"s",isWebRTCDown:o,isSocketDown:a}),G.current=r,F(!0)}}),1e3);return function(){return clearInterval(e)}}),[W]),r.useEventListener("phone-island-expand",(function(){d.store.dispatch.island.toggleIsOpen(!0),c.eventDispatch("phone-island-expanded",{})})),r.useEventListener("phone-island-compress",(function(){d.store.dispatch.island.toggleIsOpen(!1),c.eventDispatch("phone-island-compressed",{})})),r.useEventListener("phone-island-call-keypad-close",(function(){d.store.dispatch.island.setIslandView("call"),c.eventDispatch("phone-island-call-keypad-closed",{})})),r.useEventListener("phone-island-call-transfer-close",(function(){d.store.dispatch.island.setIslandView("call"),c.eventDispatch("phone-island-call-transfer-closed",{})})),r.useEventListener("phone-island-recording-close",(function(){d.store.dispatch.island.setIslandView(null),c.eventDispatch("phone-island-recording-closed",{})})),r.useEventListener("phone-island-audio-player-close",(function(){d.store.dispatch.island.setIslandView(null),c.eventDispatch("phone-island-audio-player-closed",{})})),r.useEventListener("phone-island-emergency-stop-ringtone",(function(){null===d.store.getState().island.view?(console.warn("Emergency stop ringtone triggered - phone island inactive"),d.store.dispatch.player.emergencyStopAudioPlayer(),c.eventDispatch("phone-island-emergency-stop-ringtone-completed",{})):console.log("Phone island is active, ringtone stop ignored")})),r.useEventListener("phone-island-detach",(function(e){f.detach(),c.eventDispatch("phone-island-detached",{})})),r.useEventListener("phone-island-reload-component",(function(e){(null==e?void 0:e.force)&&d.store.dispatch.island.setForceReload(!0),F(!0)})),r.useEventListener("phone-island-audio-input-change",(function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return(t=n.deviceId)&&"default"!==t?[4,te(t)]:[3,3];case 1:return e.sent()?[3,3]:(console.warn("Audio input device ".concat(t," not available, falling back to default device")),[4,ie()]);case 2:t=e.sent(),e.label=3;case 3:return u.setJSONItem("phone-island-audio-input-device",{deviceId:t}),c.eventDispatch("phone-island-audio-input-changed",{}),t!==n.deviceId&&console.info("Audio input device changed from ".concat(n.deviceId," to ").concat(t," (fallback)")),[2]}}))}))})),r.useEventListener("phone-island-video-input-change",(function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return(t=n.deviceId)&&"default"!==t?[4,se(t)]:[3,3];case 1:return e.sent()?[3,3]:(console.warn("Video input device ".concat(t," not available, falling back to default device")),[4,oe()]);case 2:t=e.sent(),e.label=3;case 3:return u.setJSONItem("phone-island-video-input-device",{deviceId:t}),c.eventDispatch("phone-island-video-input-changed",{}),t!==n.deviceId&&console.info("Video input device changed from ".concat(n.deviceId," to ").concat(t," (fallback)")),[2]}}))}))}));var K=n.useState(!0),X=K[0],Y=K[1],Z=n.useState(!0),ee=Z[0],ne=Z[1];n.useEffect((function(){X&&(h.initI18n(),e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,l.getParamUrl()];case 1:return n=e.sent(),t=(null==n?void 0:n.url)||"",i=t&&""!==t.trim(),d.store.dispatch.paramUrl.setParamUrl({url:t,onlyQueues:(null==n?void 0:n.only_queues)||!1,hasValidUrl:i}),[3,3];case 2:return s=e.sent(),console.error("Error fetching URL parameter:",s),d.store.dispatch.paramUrl.setParamUrl({url:"",onlyQueues:!1,hasValidUrl:!1}),[3,3];case 3:return[2]}}))})),Y(!1))}),[X]);var te=function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t,i;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,!1];case 1:return t=e.sent(),[2,t.filter((function(e){return"audioinput"===e.kind})).some((function(e){return e.deviceId===n}))];case 2:return i=e.sent(),console.warn("Error checking audio input device availability:",i),[2,!1];case 3:return[2]}}))}))},ie=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,"default"];case 1:return n=e.sent(),t=n.filter((function(e){return"audioinput"===e.kind})),[2,(i=t.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||t[0])?i.deviceId:"default"];case 2:return s=e.sent(),console.warn("Error getting default audio input device:",s),[2,"default"];case 3:return[2]}}))}))},se=function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t,i;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,!1];case 1:return t=e.sent(),[2,t.filter((function(e){return"videoinput"===e.kind})).some((function(e){return e.deviceId===n}))];case 2:return i=e.sent(),console.warn("Error checking video input device availability:",i),[2,!1];case 3:return[2]}}))}))},oe=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,"default"];case 1:return n=e.sent(),t=n.filter((function(e){return"videoinput"===e.kind})),[2,(i=t.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||t[0])?i.deviceId:"default"];case 2:return s=e.sent(),console.warn("Error getting default video input device:",s),[2,"default"];case 3:return[2]}}))}))};r.useEventListener("phone-island-audio-output-change",(function(n){e.__awaiter(void 0,void 0,void 0,(function(){var t,i,s,o,a,r,l,p,v;return e.__generator(this,(function(h){switch(h.label){case 0:return(null==(t=d.store.getState().player.remoteAudio)?void 0:t.current)?(i=n.deviceId)&&"default"!==i?[4,(f=i,e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,!1];case 1:return[2,e.sent().filter((function(e){return"audiooutput"===e.kind})).some((function(e){return e.deviceId===f}))];case 2:return n=e.sent(),console.warn("Error checking device availability:",n),[2,!1];case 3:return[2]}}))})))]:[3,3]:(console.warn("Remote audio element not available"),[2]);case 1:return h.sent()?[3,3]:(console.warn("Audio output device ".concat(i," not available, falling back to default device")),[4,e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,"default"];case 1:return n=e.sent(),t=n.filter((function(e){return"audiooutput"===e.kind})),[2,(i=t.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||t[0])?i.deviceId:"default"];case 2:return s=e.sent(),console.warn("Error getting default device:",s),[2,"default"];case 3:return[2]}}))}))]);case 2:i=h.sent(),u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),h.label=3;case 3:return h.trys.push([3,5,,15]),[4,t.current.setSinkId(i)];case 4:return h.sent(),console.info("Default audio output device changed successfully!"),u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),c.eventDispatch("phone-island-audio-output-changed",{}),[3,15];case 5:s=h.sent(),console.log("Direct setSinkId failed, trying with temporary stream:",s),h.label=6;case 6:return h.trys.push([6,7,,14]),o=new(window.AudioContext||window.webkitAudioContext),a=o.createOscillator(),r=o.createGain(),a.frequency.setValueAtTime(440,o.currentTime),r.gain.setValueAtTime(0,o.currentTime),a.connect(r),l=o.createMediaStreamDestination(),r.connect(l),t.current.srcObject=l.stream,a.start(),setTimeout((function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,t.current.setSinkId(i)];case 1:return e.sent(),console.info("Default audio output device changed successfully with temporary stream!"),a.stop(),o.close(),t.current.srcObject=null,u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),c.eventDispatch("phone-island-audio-output-changed",{}),[3,7];case 2:if(n=e.sent(),console.error("Final setSinkId attempt failed:",n),a.stop(),o.close(),t.current.srcObject=null,"default"===i)return[3,6];console.log("Trying fallback to default device"),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,t.current.setSinkId("default")];case 4:return e.sent(),u.setJSONItem("phone-island-audio-output-device",{deviceId:"default"}),console.info("Fallback to default audio device successful"),[3,6];case 5:return s=e.sent(),console.error("Even default device failed:",s),[3,6];case 6:return u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),c.eventDispatch("phone-island-audio-output-changed",{}),[3,7];case 7:return[2]}}))}))}),100),[3,14];case 7:if(p=h.sent(),console.error("Failed to create temporary audio stream:",p),"default"===i)return[3,12];h.label=8;case 8:return h.trys.push([8,10,,11]),[4,t.current.setSinkId("default")];case 9:return h.sent(),u.setJSONItem("phone-island-audio-output-device",{deviceId:"default"}),console.info("Emergency fallback to default audio device successful"),[3,11];case 10:return v=h.sent(),console.error("Emergency fallback to default device failed:",v),u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),[3,11];case 11:return[3,13];case 12:u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),h.label=13;case 13:return c.eventDispatch("phone-island-audio-output-changed",{}),[3,14];case 14:return[3,15];case 15:return[2]}var f}))}))})),r.useEventListener("phone-island-presence-change",(function(e){l.changeOperatorStatus(e),c.eventDispatch("phone-island-presence-changed",{})})),r.useEventListener("phone-island-view-changed",(function(e){var n=null==e?void 0:e.viewType;d.store.dispatch.island.setIslandView(n)}));var ae=d.store.getState().player.remoteAudio;n.useEffect((function(){var e;if(ee&&ae){var n=null===(e=u.getJSONItem("phone-island-audio-output-device"))||void 0===e?void 0:e.deviceId;c.eventDispatch("phone-island-audio-output-change",{deviceId:n}),ne(!1)}}),[ee,ae]),n.useEffect((function(){g.checkDarkTheme()}),[]),r.useEventListener("phone-island-theme-change",(function(e){g.setTheme(null==e?void 0:e.selectedTheme)})),r.useEventListener("phone-island-default-device-change",(function(e){d.store.dispatch.currentUser.updateCurrentDefaultDevice(null==e?void 0:e.deviceInformationObject),c.eventDispatch("phone-island-default-device-changed",{})})),r.useEventListener("phone-island-alert",(function(e){d.store.dispatch.alerts.setAlert(e.toString())})),r.useEventListener("phone-island-ringing-tone-list",(function(){var e=d.store.getState().ringtones.availableRingtones.map((function(e){return{name:e.name,displayName:e.displayName,base64Audio:e.base64Audio}}));c.eventDispatch("phone-island-ringing-tone-list-response",{ringtones:e})})),r.useEventListener("phone-island-ringing-tone-select",(function(e){(null==e?void 0:e.name)&&(u.setJSONItem("phone-island-selected-ringtone",{value:e.name}),d.store.dispatch.ringtones.setSelectedRingtone(e.name),c.eventDispatch("phone-island-ringing-tone-selected",{name:e.name}))})),r.useEventListener("phone-island-ringing-tone-output",(function(e){(null==e?void 0:e.deviceId)&&(u.setJSONItem("phone-island-ringtone-output-device",{value:e.deviceId}),d.store.dispatch.ringtones.setOutputDeviceId(e.deviceId),c.eventDispatch("phone-island-ringing-tone-output-changed",{deviceId:e.deviceId}))})),n.useEffect((function(){var e=u.getJSONItem("phone-island-selected-ringtone"),n=u.getJSONItem("phone-island-ringtone-output-device");(null==e?void 0:e.value)&&d.store.dispatch.ringtones.setSelectedRingtone(e.value),(null==n?void 0:n.value)&&d.store.dispatch.ringtones.setOutputDeviceId(n.value)}),[]),r.useEventListener("phone-island-check-connection",(function(){w.checkInternetConnection().then((function(e){e?c.eventDispatch("phone-island-internet-connected",{}):c.eventDispatch("phone-island-internet-disconnected",{})}))})),n.useEffect((function(){var e=setInterval((function(){w.checkInternetConnection().then((function(e){e?c.eventDispatch("phone-island-internet-connected",{}):c.eventDispatch("phone-island-internet-disconnected",{})}))}),5e3);return function(){return clearInterval(e)}}),[]),r.useEventListener("phone-island-main-presence",(function(e){var n,t,i,s,o=null===(n=d.store.getState().currentUser)||void 0===n?void 0:n.username,a=d.store.getState().currentUser,r=null==a?void 0:a.mainPresence;if(void 0!==o&&""!==o&&!m.isEmpty(e[o])&&void 0!==(null===(t=e[o])||void 0===t?void 0:t.mainPresence)){var u=null===(i=e[o])||void 0===i?void 0:i.mainPresence;d.store.dispatch.currentUser.updateMainPresence(null===(s=e[o])||void 0===s?void 0:s.mainPresence),"online"===u&&"online"!==r&&c.eventDispatch("phone-island-call-ended",{})}})),r.useEventListener("phone-island-call-status",(function(){var e=d.store.getState().currentCall;console.log("Call status debug informations: ",e)}));var re=function(e,n,t,i){var s=d.store.getState().paramUrl;if(null==s?void 0:s.hasValidUrl){var o=s.url||"";if(o){var a=d.store.getState().island.urlOpened,r=s.openParamUrlType;if(!a||"button"===r){var u=o;u.includes("$CALLER_NUMBER")&&e&&(u=u.replace(/\$CALLER_NUMBER/g,encodeURIComponent(e))),u.includes("$CALLER_NAME")&&n&&(u=u.replace(/\$CALLER_NAME/g,encodeURIComponent(n))),u.includes("$UNIQUEID")&&i&&(u=u.replace(/\$UNIQUEID/g,encodeURIComponent(i))),u.includes("$CALLED")&&t&&(u=u.replace(/\$CALLED/g,encodeURIComponent(t))),u.includes("{phone}")&&e&&(u=u.replace(/\{phone\}/g,encodeURIComponent(e)));var l=u.startsWith("http")?u:"https://".concat(u);if("mobile"===T||C)c.eventDispatch("phone-island-url-parameter-opened-external",{formattedUrl:l});else{var p=window.open("about:blank","_blank");p&&(p.location.href=l,d.store.dispatch.island.setUrlOpened(!0))}}}}};return r.useEventListener("phone-island-already-opened-external-page",(function(){d.store.dispatch.island.setUrlOpened(!0)})),r.useEventListener("phone-island-url-parameter-opened",(function(e){var n=d.store.getState().paramUrl;if(n.hasValidUrl&&!d.store.getState().island.urlOpened){var t=n.onlyQueues||!1,i=b.isFromTrunk(null==e?void 0:e.counterpartNum);d.store.dispatch.paramUrl.setThroughTrunk(i),"in"===(null==e?void 0:e.direction)&&(!0===t&&!0===(null==e?void 0:e.throughQueue)?re(null==e?void 0:e.counterpartNum,null==e?void 0:e.counterpartName,null==e?void 0:e.owner,null==e?void 0:e.uniqueId):!1!==t||!0!==i&&!0!==(null==e?void 0:e.throughQueue)||re(null==e?void 0:e.counterpartNum,null==e?void 0:e.counterpartName,null==e?void 0:e.owner,null==e?void 0:e.uniqueId))}})),r.useEventListener("phone-island-user-status",(function(){var e=d.store.getState().currentUser;console.log("User status debug informations: ",e)})),r.useEventListener("phone-island-all-users-status",(function(){var e=d.store.getState().users;console.log("Users status debug informations: ",e)})),r.useEventListener("phone-island-status",(function(){var e=d.store.getState().island;console.log("Phone island status debug informations: ",e)})),r.useEventListener("phone-island-webrtc-status",(function(){var e=d.store.getState().webrtc;console.log("Webrtc status debug informations: ",e)})),r.useEventListener("phone-island-player-status",(function(){var e=d.store.getState().player;console.log("Player status debug informations: ",e)})),r.useEventListener("phone-island-conference-status",(function(){var e=d.store.getState().conference;console.log("Webrtc status debug informations: ",e)})),r.useEventListener("phone-island-streaming-status",(function(){var e=d.store.getState().streaming;console.log("Streaming status debug informations: ",e)})),r.useEventListener("phone-island-paramurl-status",(function(){var e=d.store.getState().paramUrl;console.log("Paramurl status debug informations: ",e)})),r.useEventListener("phone-island-player-force-stop",(function(){d.store.dispatch.player.reset(),console.log("Audio player is interrupted")})),r.useEventListener("phone-island-stores-download",(function(){d.downloadStoresAsJSON(),c.eventDispatch("phone-island-stores-downloaded",{})})),r.useEventListener("phone-island-sideview-open",(function(){d.store.dispatch.island.toggleSideViewVisible(!0),d.store.dispatch.island.setUrlOpened(!1),c.eventDispatch("phone-island-sideview-opened",{})})),r.useEventListener("phone-island-sideview-close",(function(){d.store.dispatch.island.toggleSideViewVisible(!1),c.eventDispatch("phone-island-sideview-closed",{})})),r.useEventListener("phone-island-transcription-close",(function(){d.store.dispatch.island.toggleTranscriptionViewVisible(!1),c.eventDispatch("phone-island-stop-transcription",{}),c.eventDispatch("phone-island-transcription-closed",{})})),r.useEventListener("phone-island-transcription-open",(function(){c.eventDispatch("phone-island-start-transcription",{}),d.store.dispatch.island.toggleTranscriptionViewVisible(!0),c.eventDispatch("phone-island-transcription-opened",{})})),r.useEventListener("phone-island-transcription-close",(function(){d.store.dispatch.island.toggleTranscriptionViewVisible(!1),c.eventDispatch("phone-island-transcription-closed",{})})),r.useEventListener("phone-island-init-audio",(function(){var e=d.store.getState().currentCall,n=e.accepted,t=e.incoming,i=e.outgoing,s=e.incomingWebRTC,o=e.incomingSocket;if(n||t||i||s||o)console.log("[AUDIO-WARMUP] Skipping audio warm-up: active call in progress");else if(P&&"string"==typeof P&&0!==P.length){var a=d.store.getState().currentUser.featureCodes,r=null==a?void 0:a.audio_test,c=r&&"string"==typeof r&&r.length>0?r:"*41";console.log("[AUDIO-WARMUP] Starting audio warm-up test call",{codeToCall:c,SIP_HOST:P}),D.callNumber(c,P)}else console.warn("[AUDIO-WARMUP] Skipping audio warm-up: SIP_HOST not available",{SIP_HOST:P})})),r.useEventListener("phone-island-transcription-toggle",(function(){var e=!d.store.getState().island.transcriptionViewIsVisible;d.store.dispatch.island.toggleTranscriptionViewVisible(e),c.eventDispatch(e?"phone-island-transcription-opened":"phone-island-transcription-closed",{})})),r.useEventListener("phone-island-size-change",(function(n){var t=d.store.getState().island,i=t.sideViewIsVisible,s=t.transcriptionViewIsVisible,o=t.actionsExpanded,a=n.sizeInformation,r=e.__assign(e.__assign({},a),{right:i?"42px":"0px",top:I.isBackCallActive()?"40px":"0px",bottomTranscription:s&&o?"335px":s&&!o?"330px":"0px"});c.eventDispatch("phone-island-size-changed",{sizes:r})})),r.useEventListener("phone-island-call-ended",(function(){if("online"===d.store.getState().currentUser.mainPresence){c.eventDispatch("phone-island-size-change",{sizeInformation:{width:"0px",height:"0px"}}),c.eventDispatch("phone-island-sideview-close",{}),d.store.dispatch.island.handleResetIslandStore(),d.store.dispatch.paramUrl.setThroughTrunk(!1)}})),r.useEventListener("phone-island-conference-list-open",(function(){d.store.dispatch.island.toggleConferenceList(!0),c.eventDispatch("phone-island-conference-list-opened",{})})),r.useEventListener("phone-island-alert-removed",(function(e){var n=d.store.getState().alerts.status.activeAlertsCount,t=d.store.getState().island,i=t.view,s=t.previousView,o=d.store.getState().conference.isActive,a=d.store.getState().alerts.data,r=d.store.getState().currentCall,u=r.incoming,l=r.outgoing,p=r.accepted,v=null==e?void 0:e.type,h=r.incoming||r.outgoing||r.accepted||""!==r.conversationId;if(!(u||l||p||n>0||"player"===i||"recorder"===i||"physicalPhoneRecorder"===i||"waitingConference"===i&&o||"transfer"===i&&o||"settings"===i&&o||"settings"===i&&("recorder"===s||"player"===s)||"operatorBusy"===i&&!o)&&0===n&&(!v||a[v]&&!a[v].active)&&!h){c.eventDispatch("phone-island-size-change",{sizeInformation:{width:"0px",height:"0px"}}),c.eventDispatch("phone-island-sideview-close",{}),d.store.dispatch.island.handleResetIslandStore()}})),r.useEventListener("phone-island-conference-list-close",(function(){d.store.dispatch.island.toggleConferenceList(!1),c.eventDispatch("phone-island-conference-list-closed",{})})),r.useEventListener("phone-island-conversations",(function(e){var n,t=Object.keys(e)[0];if(t===(null===(n=d.store.getState().currentUser)||void 0===n?void 0:n.username)){var i=e[t].conversations,s=d.store.getState().paramUrl,o=d.store.getState().island.urlOpened;if(!s.hasValidUrl||o)return;if("answered"===s.openParamUrlType&&i&&Object.keys(i).length>0){var a=i[Object.keys(i)[0]];if((null==a?void 0:a.connected)&&"in"===(null==a?void 0:a.direction)){var r=s.onlyQueues||!1,c=b.isFromTrunk(a.counterpartNum);d.store.dispatch.paramUrl.setThroughTrunk(c),!0===r&&!0===(null==a?void 0:a.throughQueue)?re(a.counterpartNum,a.counterpartName,a.owner,a.uniqueId):!1!==r||!0!==c&&!0!==(null==a?void 0:a.throughQueue)||re(a.counterpartNum,a.counterpartName,a.owner,a.uniqueId)}}}})),y.default.createElement(y.default.Fragment,null,y.default.createElement(E.default,{store:d.store},y.default.createElement(s.WebRTC,{hostName:N,sipExten:V,sipSecret:R,sipHost:P,sipPort:x,reload:W,reloadedCallback:function(){return z(!0)},uaType:T},y.default.createElement(a.RestAPI,{hostName:N,username:q,authToken:A},y.default.createElement(i.Socket,{hostName:N,username:q,authToken:A,reload:W,reloadedCallback:function(){return B(!0)},uaType:T},y.default.createElement(t.Events,{sipHost:P},y.default.createElement(o.Island,{showAlways:U,uaType:T})))))))}));_.displayName="PhoneIslandComponent";var L=n.forwardRef((function(n,t){return y.default.createElement(_,e.__assign({},n,{ref:t}))}));L.displayName="PhoneIsland",exports.PhoneIsland=L;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./node_modules/tslib/tslib.es6.js"),n=require("react"),t=require("./components/Events.js"),i=require("./components/Socket.js"),s=require("./components/WebRTC.js"),a=require("./components/Island.js"),o=require("./components/RestAPI.js"),r=require("./utils/customHooks/useEventListener.js"),c=require("./utils/genericFunctions/eventDispatch.js"),u=require("./utils/genericFunctions/localStorage.js"),d=require("./store/index.js"),l=require("./services/user.js");require("./node_modules/react-redux/es/index.js"),require("./node_modules/@fortawesome/react-fontawesome/index.es.js"),require("./node_modules/i18next/dist/esm/i18next.js"),require("./node_modules/react-tooltip/dist/react-tooltip.min.mjs.js"),require("./components/TranscriptionView/TranscriptionView.js");var p=require("./node_modules/js-base64/base64.mjs.js"),v=require("./workers/wake_up.js"),h=require("./lib/i18n.js");require("./node_modules/react-tooltip/dist/react-tooltip.min.css.js");var f=require("./lib/webrtc/messages.js"),g=require("./lib/darkTheme.js"),m=require("./utils/genericFunctions/isEmpty.js"),w=require("./utils/genericFunctions/checkConnection.js"),I=require("./utils/genericFunctions/isBackCallVisible.js"),b=require("./lib/phone/trunk.js"),E=require("./lib/phone/call.js"),D=require("./node_modules/react-redux/es/components/Provider.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),require("./node_modules/react-redux/node_modules/react-is/index.js"),require("./node_modules/react-redux/es/components/Context.js");var y=S(n),_=n.forwardRef((function(S,_){var k=S.dataConfig,L=S.showAlways,U=void 0!==L&&L,T=S.uaType,j=S.urlParamWithEvent,C=void 0!==j&&j,N=p.Base64.atob(k||"").split(":"),O=N[0],A=N[1],q=N[2],R=N[3],V=N[4],P=N[5],x=N[6],J=n.useState(!1),W=J[0],F=J[1],M=n.useState(!1),Q=M[0],z=M[1],H=n.useState(!1),$=H[0],B=H[1],G=n.useRef(0);n.useImperativeHandle(_,(function(){return{reset:function(){console.info("PhoneIsland: Performing full component reset"),F(!0)}}}),[]),n.useEffect((function(){var e=Date.now(),n=function(){if(!document.hidden){var n=Date.now(),t=n-e;setTimeout((function(){c.eventDispatch("phone-island-emergency-stop-ringtone",{})}),2e3),t>3e5&&(console.info("Tab inactive for long period, performing soft reconnection"),F(!0)),e=n}},t=new Worker(v.default,{type:"module"});return t.onmessage=function(n){"ping"===n.data&&(e=Date.now())},document.addEventListener("visibilitychange",n),function(){t.terminate(),document.removeEventListener("visibilitychange",n)}}),[]),n.useEffect((function(){$&&Q&&(F(!1),z(!1),B(!1))}),[$,Q]),n.useEffect((function(){var e=setInterval((function(){var e,n,t,i,s=d.store.getState().alerts.data,a=(null===(e=s.webrtc_down)||void 0===e?void 0:e.active)||!1,o=(null===(n=s.socket_down)||void 0===n?void 0:n.active)||!1,r=Date.now(),c=r-G.current,u=d.store.getState().webrtc.sipcall,l=d.store.getState().currentCall,p=l.accepted,v=l.outgoing,h=null===(i=null===(t=null==u?void 0:u.webrtcStuff)||void 0===t?void 0:t.pc)||void 0===i?void 0:i.iceConnectionState,f=p||v||"connected"===h||"completed"===h,g=navigator.onLine;if((a||o)&&!W&&c>1e4&&g){if(f)return void console.info("Alert detected but active call in progress - skipping automatic reload to let ICE recover",{timeSinceLastReload:Math.round(c/1e3)+"s",isWebRTCDown:a,isSocketDown:o,iceState:h,accepted:p,outgoing:v});console.info("Alert detected (webrtc_down or socket_down), triggering automatic reload",{timeSinceLastReload:Math.round(c/1e3)+"s",isWebRTCDown:a,isSocketDown:o}),G.current=r,F(!0)}}),1e3);return function(){return clearInterval(e)}}),[W]),r.useEventListener("phone-island-expand",(function(){d.store.dispatch.island.toggleIsOpen(!0),c.eventDispatch("phone-island-expanded",{})})),r.useEventListener("phone-island-compress",(function(){d.store.dispatch.island.toggleIsOpen(!1),c.eventDispatch("phone-island-compressed",{})})),r.useEventListener("phone-island-call-keypad-close",(function(){d.store.dispatch.island.setIslandView("call"),c.eventDispatch("phone-island-call-keypad-closed",{})})),r.useEventListener("phone-island-call-transfer-close",(function(){d.store.dispatch.island.setIslandView("call"),c.eventDispatch("phone-island-call-transfer-closed",{})})),r.useEventListener("phone-island-recording-close",(function(){d.store.dispatch.island.setIslandView(null),c.eventDispatch("phone-island-recording-closed",{})})),r.useEventListener("phone-island-audio-player-close",(function(){d.store.dispatch.island.setIslandView(null),c.eventDispatch("phone-island-audio-player-closed",{})})),r.useEventListener("phone-island-emergency-stop-ringtone",(function(){null===d.store.getState().island.view?(console.warn("Emergency stop ringtone triggered - phone island inactive"),d.store.dispatch.player.emergencyStopAudioPlayer(),c.eventDispatch("phone-island-emergency-stop-ringtone-completed",{})):console.log("Phone island is active, ringtone stop ignored")})),r.useEventListener("phone-island-detach",(function(e){f.detach(),c.eventDispatch("phone-island-detached",{})})),r.useEventListener("phone-island-reload-component",(function(e){(null==e?void 0:e.force)&&d.store.dispatch.island.setForceReload(!0),F(!0)})),r.useEventListener("phone-island-audio-input-change",(function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return(t=n.deviceId)&&"default"!==t?[4,te(t)]:[3,3];case 1:return e.sent()?[3,3]:(console.warn("Audio input device ".concat(t," not available, falling back to default device")),[4,ie()]);case 2:t=e.sent(),e.label=3;case 3:return u.setJSONItem("phone-island-audio-input-device",{deviceId:t}),c.eventDispatch("phone-island-audio-input-changed",{}),t!==n.deviceId&&console.info("Audio input device changed from ".concat(n.deviceId," to ").concat(t," (fallback)")),[2]}}))}))})),r.useEventListener("phone-island-video-input-change",(function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return(t=n.deviceId)&&"default"!==t?[4,se(t)]:[3,3];case 1:return e.sent()?[3,3]:(console.warn("Video input device ".concat(t," not available, falling back to default device")),[4,ae()]);case 2:t=e.sent(),e.label=3;case 3:return u.setJSONItem("phone-island-video-input-device",{deviceId:t}),c.eventDispatch("phone-island-video-input-changed",{}),t!==n.deviceId&&console.info("Video input device changed from ".concat(n.deviceId," to ").concat(t," (fallback)")),[2]}}))}))}));var K=n.useState(!0),X=K[0],Y=K[1],Z=n.useState(!0),ee=Z[0],ne=Z[1];n.useEffect((function(){X&&(h.initI18n(),e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,l.getParamUrl()];case 1:return n=e.sent(),t=(null==n?void 0:n.url)||"",i=t&&""!==t.trim(),d.store.dispatch.paramUrl.setParamUrl({url:t,onlyQueues:(null==n?void 0:n.only_queues)||!1,hasValidUrl:i}),[3,3];case 2:return s=e.sent(),console.error("Error fetching URL parameter:",s),d.store.dispatch.paramUrl.setParamUrl({url:"",onlyQueues:!1,hasValidUrl:!1}),[3,3];case 3:return[2]}}))})),Y(!1))}),[X]);var te=function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t,i;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,!1];case 1:return t=e.sent(),[2,t.filter((function(e){return"audioinput"===e.kind})).some((function(e){return e.deviceId===n}))];case 2:return i=e.sent(),console.warn("Error checking audio input device availability:",i),[2,!1];case 3:return[2]}}))}))},ie=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,"default"];case 1:return n=e.sent(),t=n.filter((function(e){return"audioinput"===e.kind})),[2,(i=t.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||t[0])?i.deviceId:"default"];case 2:return s=e.sent(),console.warn("Error getting default audio input device:",s),[2,"default"];case 3:return[2]}}))}))},se=function(n){return e.__awaiter(void 0,void 0,void 0,(function(){var t,i;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,!1];case 1:return t=e.sent(),[2,t.filter((function(e){return"videoinput"===e.kind})).some((function(e){return e.deviceId===n}))];case 2:return i=e.sent(),console.warn("Error checking video input device availability:",i),[2,!1];case 3:return[2]}}))}))},ae=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,"default"];case 1:return n=e.sent(),t=n.filter((function(e){return"videoinput"===e.kind})),[2,(i=t.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||t[0])?i.deviceId:"default"];case 2:return s=e.sent(),console.warn("Error getting default video input device:",s),[2,"default"];case 3:return[2]}}))}))};r.useEventListener("phone-island-audio-output-change",(function(n){e.__awaiter(void 0,void 0,void 0,(function(){var t,i,s,a,o,r,l,p,v;return e.__generator(this,(function(h){switch(h.label){case 0:return(null==(t=d.store.getState().player.remoteAudio)?void 0:t.current)?(i=n.deviceId)&&"default"!==i?[4,(f=i,e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,!1];case 1:return[2,e.sent().filter((function(e){return"audiooutput"===e.kind})).some((function(e){return e.deviceId===f}))];case 2:return n=e.sent(),console.warn("Error checking device availability:",n),[2,!1];case 3:return[2]}}))})))]:[3,3]:(console.warn("Remote audio element not available"),[2]);case 1:return h.sent()?[3,3]:(console.warn("Audio output device ".concat(i," not available, falling back to default device")),[4,e.__awaiter(void 0,void 0,void 0,(function(){var n,t,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?[4,navigator.mediaDevices.enumerateDevices()]:[2,"default"];case 1:return n=e.sent(),t=n.filter((function(e){return"audiooutput"===e.kind})),[2,(i=t.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||t[0])?i.deviceId:"default"];case 2:return s=e.sent(),console.warn("Error getting default device:",s),[2,"default"];case 3:return[2]}}))}))]);case 2:i=h.sent(),u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),h.label=3;case 3:return h.trys.push([3,5,,15]),[4,t.current.setSinkId(i)];case 4:return h.sent(),console.info("Default audio output device changed successfully!"),u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),c.eventDispatch("phone-island-audio-output-changed",{}),[3,15];case 5:s=h.sent(),console.log("Direct setSinkId failed, trying with temporary stream:",s),h.label=6;case 6:return h.trys.push([6,7,,14]),a=new(window.AudioContext||window.webkitAudioContext),o=a.createOscillator(),r=a.createGain(),o.frequency.setValueAtTime(440,a.currentTime),r.gain.setValueAtTime(0,a.currentTime),o.connect(r),l=a.createMediaStreamDestination(),r.connect(l),t.current.srcObject=l.stream,o.start(),setTimeout((function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,t.current.setSinkId(i)];case 1:return e.sent(),console.info("Default audio output device changed successfully with temporary stream!"),o.stop(),a.close(),t.current.srcObject=null,u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),c.eventDispatch("phone-island-audio-output-changed",{}),[3,7];case 2:if(n=e.sent(),console.error("Final setSinkId attempt failed:",n),o.stop(),a.close(),t.current.srcObject=null,"default"===i)return[3,6];console.log("Trying fallback to default device"),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,t.current.setSinkId("default")];case 4:return e.sent(),u.setJSONItem("phone-island-audio-output-device",{deviceId:"default"}),console.info("Fallback to default audio device successful"),[3,6];case 5:return s=e.sent(),console.error("Even default device failed:",s),[3,6];case 6:return u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),c.eventDispatch("phone-island-audio-output-changed",{}),[3,7];case 7:return[2]}}))}))}),100),[3,14];case 7:if(p=h.sent(),console.error("Failed to create temporary audio stream:",p),"default"===i)return[3,12];h.label=8;case 8:return h.trys.push([8,10,,11]),[4,t.current.setSinkId("default")];case 9:return h.sent(),u.setJSONItem("phone-island-audio-output-device",{deviceId:"default"}),console.info("Emergency fallback to default audio device successful"),[3,11];case 10:return v=h.sent(),console.error("Emergency fallback to default device failed:",v),u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),[3,11];case 11:return[3,13];case 12:u.setJSONItem("phone-island-audio-output-device",{deviceId:i}),h.label=13;case 13:return c.eventDispatch("phone-island-audio-output-changed",{}),[3,14];case 14:return[3,15];case 15:return[2]}var f}))}))})),r.useEventListener("phone-island-presence-change",(function(e){l.changeOperatorStatus(e),c.eventDispatch("phone-island-presence-changed",{})})),r.useEventListener("phone-island-view-changed",(function(e){var n=null==e?void 0:e.viewType;d.store.dispatch.island.setIslandView(n)}));var oe=d.store.getState().player.remoteAudio;n.useEffect((function(){var e;if(ee&&oe){var n=null===(e=u.getJSONItem("phone-island-audio-output-device"))||void 0===e?void 0:e.deviceId;c.eventDispatch("phone-island-audio-output-change",{deviceId:n}),ne(!1)}}),[ee,oe]),n.useEffect((function(){g.checkDarkTheme()}),[]),r.useEventListener("phone-island-theme-change",(function(e){g.setTheme(null==e?void 0:e.selectedTheme)})),r.useEventListener("phone-island-default-device-change",(function(e){d.store.dispatch.currentUser.updateCurrentDefaultDevice(null==e?void 0:e.deviceInformationObject),c.eventDispatch("phone-island-default-device-changed",{})})),r.useEventListener("phone-island-alert",(function(e){d.store.dispatch.alerts.setAlert(e.toString())})),r.useEventListener("phone-island-ringing-tone-list",(function(){var e=d.store.getState().ringtones.availableRingtones.map((function(e){return{name:e.name,displayName:e.displayName,base64Audio:e.base64Audio}}));c.eventDispatch("phone-island-ringing-tone-list-response",{ringtones:e})})),r.useEventListener("phone-island-ringing-tone-select",(function(e){(null==e?void 0:e.name)&&(u.setJSONItem("phone-island-selected-ringtone",{value:e.name}),d.store.dispatch.ringtones.setSelectedRingtone(e.name),c.eventDispatch("phone-island-ringing-tone-selected",{name:e.name}))})),r.useEventListener("phone-island-ringing-tone-output",(function(e){(null==e?void 0:e.deviceId)&&(u.setJSONItem("phone-island-ringtone-output-device",{value:e.deviceId}),d.store.dispatch.ringtones.setOutputDeviceId(e.deviceId),c.eventDispatch("phone-island-ringing-tone-output-changed",{deviceId:e.deviceId}))})),n.useEffect((function(){var e=u.getJSONItem("phone-island-selected-ringtone"),n=u.getJSONItem("phone-island-ringtone-output-device");(null==e?void 0:e.value)&&d.store.dispatch.ringtones.setSelectedRingtone(e.value),(null==n?void 0:n.value)&&d.store.dispatch.ringtones.setOutputDeviceId(n.value)}),[]),r.useEventListener("phone-island-check-connection",(function(){w.checkInternetConnection().then((function(e){e?c.eventDispatch("phone-island-internet-connected",{}):c.eventDispatch("phone-island-internet-disconnected",{})}))})),n.useEffect((function(){var e=setInterval((function(){w.checkInternetConnection().then((function(e){e?c.eventDispatch("phone-island-internet-connected",{}):c.eventDispatch("phone-island-internet-disconnected",{})}))}),5e3);return function(){return clearInterval(e)}}),[]),r.useEventListener("phone-island-main-presence",(function(e){var n,t,i,s,a=null===(n=d.store.getState().currentUser)||void 0===n?void 0:n.username,o=d.store.getState().currentUser,r=null==o?void 0:o.mainPresence;if(void 0!==a&&""!==a&&!m.isEmpty(e[a])&&void 0!==(null===(t=e[a])||void 0===t?void 0:t.mainPresence)){var u=null===(i=e[a])||void 0===i?void 0:i.mainPresence;d.store.dispatch.currentUser.updateMainPresence(null===(s=e[a])||void 0===s?void 0:s.mainPresence),"online"===u&&"online"!==r&&c.eventDispatch("phone-island-call-ended",{})}})),r.useEventListener("phone-island-call-status",(function(){var e=d.store.getState().currentCall;console.log("Call status debug informations: ",e)}));var re=function(e,n,t,i){var s=d.store.getState().paramUrl;if(null==s?void 0:s.hasValidUrl){var a=s.url||"";if(a){var o=d.store.getState().island.urlOpened,r=s.openParamUrlType;if(!o||"button"===r){var u=a;u.includes("$CALLER_NUMBER")&&e&&(u=u.replace(/\$CALLER_NUMBER/g,encodeURIComponent(e))),u.includes("$CALLER_NAME")&&n&&(u=u.replace(/\$CALLER_NAME/g,encodeURIComponent(n))),u.includes("$UNIQUEID")&&i&&(u=u.replace(/\$UNIQUEID/g,encodeURIComponent(i))),u.includes("$CALLED")&&t&&(u=u.replace(/\$CALLED/g,encodeURIComponent(t))),u.includes("{phone}")&&e&&(u=u.replace(/\{phone\}/g,encodeURIComponent(e)));var l=u.startsWith("http")?u:"https://".concat(u);if("mobile"===T||C)c.eventDispatch("phone-island-url-parameter-opened-external",{formattedUrl:l});else{var p=window.open("about:blank","_blank");p&&(p.location.href=l,d.store.dispatch.island.setUrlOpened(!0))}}}}};return r.useEventListener("phone-island-already-opened-external-page",(function(){d.store.dispatch.island.setUrlOpened(!0)})),r.useEventListener("phone-island-url-parameter-opened",(function(e){var n=d.store.getState().paramUrl;if(n.hasValidUrl&&!d.store.getState().island.urlOpened){var t=n.onlyQueues||!1,i=b.isFromTrunk(null==e?void 0:e.counterpartNum);d.store.dispatch.paramUrl.setThroughTrunk(i),"in"===(null==e?void 0:e.direction)&&(!0===t&&!0===(null==e?void 0:e.throughQueue)?re(null==e?void 0:e.counterpartNum,null==e?void 0:e.counterpartName,null==e?void 0:e.owner,null==e?void 0:e.uniqueId):!1!==t||!0!==i&&!0!==(null==e?void 0:e.throughQueue)||re(null==e?void 0:e.counterpartNum,null==e?void 0:e.counterpartName,null==e?void 0:e.owner,null==e?void 0:e.uniqueId))}})),r.useEventListener("phone-island-user-status",(function(){var e=d.store.getState().currentUser;console.log("User status debug informations: ",e)})),r.useEventListener("phone-island-all-users-status",(function(){var e=d.store.getState().users;console.log("Users status debug informations: ",e)})),r.useEventListener("phone-island-status",(function(){var e=d.store.getState().island;console.log("Phone island status debug informations: ",e)})),r.useEventListener("phone-island-webrtc-status",(function(){var e=d.store.getState().webrtc;console.log("Webrtc status debug informations: ",e)})),r.useEventListener("phone-island-player-status",(function(){var e=d.store.getState().player;console.log("Player status debug informations: ",e)})),r.useEventListener("phone-island-conference-status",(function(){var e=d.store.getState().conference;console.log("Webrtc status debug informations: ",e)})),r.useEventListener("phone-island-streaming-status",(function(){var e=d.store.getState().streaming;console.log("Streaming status debug informations: ",e)})),r.useEventListener("phone-island-paramurl-status",(function(){var e=d.store.getState().paramUrl;console.log("Paramurl status debug informations: ",e)})),r.useEventListener("phone-island-player-force-stop",(function(){d.store.dispatch.player.reset(),console.log("Audio player is interrupted")})),r.useEventListener("phone-island-stores-download",(function(){d.downloadStoresAsJSON(),c.eventDispatch("phone-island-stores-downloaded",{})})),r.useEventListener("phone-island-sideview-open",(function(){d.store.dispatch.island.toggleSideViewVisible(!0),d.store.dispatch.island.setUrlOpened(!1),c.eventDispatch("phone-island-sideview-opened",{})})),r.useEventListener("phone-island-sideview-close",(function(){d.store.dispatch.island.toggleSideViewVisible(!1),c.eventDispatch("phone-island-sideview-closed",{})})),r.useEventListener("phone-island-transcription-close",(function(){d.store.dispatch.island.toggleTranscriptionViewVisible(!1),c.eventDispatch("phone-island-stop-transcription",{}),c.eventDispatch("phone-island-transcription-closed",{})})),r.useEventListener("phone-island-transcription-open",(function(){c.eventDispatch("phone-island-start-transcription",{}),d.store.dispatch.island.toggleTranscriptionViewVisible(!0),c.eventDispatch("phone-island-transcription-opened",{})})),r.useEventListener("phone-island-transcription-close",(function(){d.store.dispatch.island.toggleTranscriptionViewVisible(!1),c.eventDispatch("phone-island-transcription-closed",{})})),r.useEventListener("phone-island-init-audio",(function(){var e=d.store.getState().currentCall,n=e.accepted,t=e.incoming,i=e.outgoing,s=e.incomingWebRTC,a=e.incomingSocket;if(n||t||i||s||a)console.log("[AUDIO-WARMUP] Skipping audio warm-up: active call in progress");else if(P&&"string"==typeof P&&0!==P.length){var o=d.store.getState().currentUser.featureCodes,r=null==o?void 0:o.audio_test,c=r&&"string"==typeof r&&r.length>0?r:"*41";console.log("[AUDIO-WARMUP] Starting audio warm-up test call",{codeToCall:c,SIP_HOST:P}),E.callNumber(c,P)}else console.warn("[AUDIO-WARMUP] Skipping audio warm-up: SIP_HOST not available",{SIP_HOST:P})})),r.useEventListener("phone-island-transcription-toggle",(function(){var e=!d.store.getState().island.transcriptionViewIsVisible;d.store.dispatch.island.toggleTranscriptionViewVisible(e),c.eventDispatch(e?"phone-island-transcription-opened":"phone-island-transcription-closed",{})})),r.useEventListener("phone-island-size-change",(function(n){var t=d.store.getState().island,i=t.sideViewIsVisible,s=t.transcriptionViewIsVisible,a=t.actionsExpanded,o=n.sizeInformation,r=e.__assign(e.__assign({},o),{right:i?"42px":"0px",top:I.isBackCallActive()?"40px":"0px",bottomTranscription:s&&a?"335px":s&&!a?"330px":"0px"});c.eventDispatch("phone-island-size-changed",{sizes:r})})),r.useEventListener("phone-island-call-ended",(function(){if("online"===d.store.getState().currentUser.mainPresence){c.eventDispatch("phone-island-size-change",{sizeInformation:{width:"0px",height:"0px"}}),c.eventDispatch("phone-island-sideview-close",{}),d.store.dispatch.island.handleResetIslandStore(),d.store.dispatch.paramUrl.setThroughTrunk(!1)}})),r.useEventListener("phone-island-conference-list-open",(function(){d.store.dispatch.island.toggleConferenceList(!0),c.eventDispatch("phone-island-conference-list-opened",{})})),r.useEventListener("phone-island-alert-removed",(function(e){var n=d.store.getState().alerts.status.activeAlertsCount,t=d.store.getState().island,i=t.view,s=t.previousView,a=d.store.getState().conference.isActive,o=d.store.getState().alerts.data,r=d.store.getState().currentCall,u=r.incoming,l=r.outgoing,p=r.accepted,v=null==e?void 0:e.type,h=r.incoming||r.outgoing||r.accepted||""!==r.conversationId;if(!(u||l||p||n>0||"player"===i||"recorder"===i||"physicalPhoneRecorder"===i||"waitingConference"===i&&a||"transfer"===i&&a||"settings"===i&&a||"settings"===i&&("recorder"===s||"player"===s)||"operatorBusy"===i&&!a)&&0===n&&(!v||o[v]&&!o[v].active)&&!h){c.eventDispatch("phone-island-size-change",{sizeInformation:{width:"0px",height:"0px"}}),c.eventDispatch("phone-island-sideview-close",{}),d.store.dispatch.island.handleResetIslandStore()}})),r.useEventListener("phone-island-conference-list-close",(function(){d.store.dispatch.island.toggleConferenceList(!1),c.eventDispatch("phone-island-conference-list-closed",{})})),r.useEventListener("phone-island-conversations",(function(e){var n,t=Object.keys(e)[0];if(t===(null===(n=d.store.getState().currentUser)||void 0===n?void 0:n.username)){var i=e[t].conversations,s=d.store.getState().paramUrl,a=d.store.getState().island.urlOpened;if(!s.hasValidUrl||a)return;if("answered"===s.openParamUrlType&&i&&Object.keys(i).length>0){var o=i[Object.keys(i)[0]];if((null==o?void 0:o.connected)&&"in"===(null==o?void 0:o.direction)){var r=s.onlyQueues||!1,c=b.isFromTrunk(o.counterpartNum);d.store.dispatch.paramUrl.setThroughTrunk(c),!0===r&&!0===(null==o?void 0:o.throughQueue)?re(o.counterpartNum,o.counterpartName,o.owner,o.uniqueId):!1!==r||!0!==c&&!0!==(null==o?void 0:o.throughQueue)||re(o.counterpartNum,o.counterpartName,o.owner,o.uniqueId)}}}})),y.default.createElement(y.default.Fragment,null,y.default.createElement(D.default,{store:d.store},R&&""!==R.trim()?y.default.createElement(s.WebRTC,{hostName:O,sipExten:R,sipSecret:V,sipHost:P,sipPort:x,reload:W,reloadedCallback:function(){return z(!0)},uaType:T},y.default.createElement(o.RestAPI,{hostName:O,username:A,authToken:q},y.default.createElement(i.Socket,{hostName:O,username:A,authToken:q,reload:W,reloadedCallback:function(){return B(!0)},uaType:T},y.default.createElement(t.Events,{sipHost:P},y.default.createElement(a.Island,{showAlways:U,uaType:T}))))):y.default.createElement(o.RestAPI,{hostName:O,username:A,authToken:q},y.default.createElement(i.Socket,{hostName:O,username:A,authToken:q,reload:W,reloadedCallback:function(){B(!0),z(!0)},uaType:T},y.default.createElement(t.Events,{sipHost:P},y.default.createElement(a.Island,{showAlways:U,uaType:T}))))))}));_.displayName="PhoneIslandComponent";var k=n.forwardRef((function(n,t){return y.default.createElement(_,e.__assign({},n,{ref:t}))}));k.displayName="PhoneIsland",exports.PhoneIsland=k;
2
2
  //# sourceMappingURL=App.js.map
package/dist/App.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sources":["../src/App.tsx"],"sourcesContent":["import React, { type FC, useState, useEffect, forwardRef, useImperativeHandle, useRef } from 'react'\nimport { Events, Socket, WebRTC, Island, RestAPI } from './components'\nimport { Provider } from 'react-redux'\nimport { store, downloadStoresAsJSON } from './store'\nimport { Base64 } from 'js-base64'\nimport wakeUpWorker from './workers/wake_up'\nimport { initI18n } from './lib/i18n'\n\nimport 'react-tooltip/dist/react-tooltip.css'\nimport { useEventListener, eventDispatch, setJSONItem, getJSONItem } from './utils'\nimport { detach } from './lib/webrtc/messages'\nimport { checkDarkTheme, setTheme } from './lib/darkTheme'\nimport { changeOperatorStatus } from './services/user'\nimport { getParamUrl } from './services/user'\nimport { isEmpty } from './utils/genericFunctions/isEmpty'\nimport { checkInternetConnection } from './utils/genericFunctions/checkConnection'\nimport { isBackCallActive } from './utils/genericFunctions/isBackCallVisible'\nimport { isFromTrunk } from './lib/user/extensions'\nimport { callNumber } from './lib/phone/call'\n\ninterface PhoneIslandProps {\n dataConfig: string\n showAlways?: boolean\n uaType: string\n urlParamWithEvent?: boolean\n}\n\ninterface DeviceInputOutputTypes {\n deviceId: string\n}\n\nexport interface PhoneIslandRef {\n reset: () => void\n}\n\nconst PhoneIslandComponent = forwardRef<PhoneIslandRef, PhoneIslandProps>(\n (\n {\n dataConfig,\n showAlways = false,\n uaType,\n urlParamWithEvent = false,\n }: PhoneIslandProps,\n ref,\n ) => {\n const CONFIG: string[] = Base64.atob(dataConfig || '').split(':')\n const HOST_NAME: string = CONFIG[0]\n const USERNAME: string = CONFIG[1]\n const AUTH_TOKEN: string = CONFIG[2]\n const SIP_EXTEN: string = CONFIG[3]\n const SIP_SECRET: string = CONFIG[4]\n const SIP_HOST: string = CONFIG[5]\n const SIP_PORT: string = CONFIG[6]\n\n // Initialize the state to manage the reload events\n const [reload, setReload] = useState<boolean>(false)\n const [reloadedWebRTC, setReloadedWebRTC] = useState<boolean>(false)\n const [reloadedSocket, setReloadedSocket] = useState<boolean>(false)\n\n // Cooldown to prevent reload loop when network is down\n const lastReloadTime = useRef<number>(0)\n const RELOAD_COOLDOWN = 10 * 1000 // 10 seconds between reload attempts\n\n // Expose reset method via imperativeHandle\n useImperativeHandle(\n ref,\n () => ({\n reset: () => {\n console.info('PhoneIsland: Performing full component reset')\n setReload(true)\n },\n }),\n [],\n )\n\n // Keepalive system to maintain tab active without heavy reload\n useEffect(() => {\n let lastActiveTime = Date.now()\n const INACTIVITY_THRESHOLD = 5 * 60 * 1000 // 5 minutes\n\n // Handle visibility change (tab becomes visible/hidden)\n const handleVisibilityChange = () => {\n if (!document.hidden) {\n const now = Date.now()\n const timeSinceLastActive = now - lastActiveTime\n // Trigger emergency stop ringtone after 2 seconds when tab becomes active again\n setTimeout(() => {\n eventDispatch('phone-island-emergency-stop-ringtone', {})\n }, 2000)\n\n // Only reload if tab was hidden for more than threshold\n if (timeSinceLastActive > INACTIVITY_THRESHOLD) {\n console.info('Tab inactive for long period, performing soft reconnection')\n setReload(true)\n }\n lastActiveTime = now\n }\n }\n\n // Lightweight worker for keepalive ping\n const worker = new Worker(wakeUpWorker, { type: 'module' })\n worker.onmessage = (event: MessageEvent<string>) => {\n if (event.data === 'ping') {\n // Simple ping to keep tab active - no action needed\n lastActiveTime = Date.now()\n }\n }\n\n // Listen for visibility changes\n document.addEventListener('visibilitychange', handleVisibilityChange)\n\n return () => {\n worker.terminate()\n document.removeEventListener('visibilitychange', handleVisibilityChange)\n }\n }, [])\n\n useEffect(() => {\n if (reloadedSocket && reloadedWebRTC) {\n setReload(false)\n setReloadedWebRTC(false)\n setReloadedSocket(false)\n }\n }, [reloadedSocket, reloadedWebRTC])\n\n // Monitor alerts and trigger automatic reload when webrtc_down or socket_down become active\n useEffect(() => {\n const checkInterval = setInterval(() => {\n const { data } = store.getState().alerts\n const isWebRTCDown = data.webrtc_down?.active || false\n const isSocketDown = data.socket_down?.active || false\n const now = Date.now()\n const timeSinceLastReload = now - lastReloadTime.current\n\n // Check if there's an active call - if so, don't reload automatically\n // WebRTC/ICE is designed to recover from brief network interruptions\n const { sipcall }: { sipcall: any } = store.getState().webrtc\n const { accepted, outgoing } = store.getState().currentCall\n const iceState = sipcall?.webrtcStuff?.pc?.iceConnectionState\n const hasActiveCall = accepted || outgoing || iceState === 'connected' || iceState === 'completed'\n\n // If either alert is active and we're not already reloading and cooldown has passed\n // Don't trigger reload if we're completely offline - wait for network to come back\n // Don't trigger reload if there's an active call - let ICE try to recover\n const isOnline = navigator.onLine\n if ((isWebRTCDown || isSocketDown) && !reload && timeSinceLastReload > RELOAD_COOLDOWN && isOnline) {\n if (hasActiveCall) {\n console.info('Alert detected but active call in progress - skipping automatic reload to let ICE recover', {\n timeSinceLastReload: Math.round(timeSinceLastReload / 1000) + 's',\n isWebRTCDown,\n isSocketDown,\n iceState,\n accepted,\n outgoing\n })\n // Don't reload - let ICE try to recover the call\n return\n }\n console.info('Alert detected (webrtc_down or socket_down), triggering automatic reload', {\n timeSinceLastReload: Math.round(timeSinceLastReload / 1000) + 's',\n isWebRTCDown,\n isSocketDown\n })\n lastReloadTime.current = now\n setReload(true)\n }\n }, 1000) // Check every second\n\n return () => clearInterval(checkInterval)\n }, [reload])\n\n useEventListener('phone-island-expand', () => {\n store.dispatch.island.toggleIsOpen(true)\n eventDispatch('phone-island-expanded', {})\n })\n useEventListener('phone-island-compress', () => {\n store.dispatch.island.toggleIsOpen(false)\n eventDispatch('phone-island-compressed', {})\n })\n\n useEventListener('phone-island-call-keypad-close', () => {\n store.dispatch.island.setIslandView('call')\n eventDispatch('phone-island-call-keypad-closed', {})\n })\n useEventListener('phone-island-call-transfer-close', () => {\n store.dispatch.island.setIslandView('call')\n eventDispatch('phone-island-call-transfer-closed', {})\n })\n useEventListener('phone-island-recording-close', () => {\n store.dispatch.island.setIslandView(null)\n eventDispatch('phone-island-recording-closed', {})\n })\n useEventListener('phone-island-audio-player-close', () => {\n store.dispatch.island.setIslandView(null)\n eventDispatch('phone-island-audio-player-closed', {})\n })\n\n useEventListener('phone-island-emergency-stop-ringtone', () => {\n const { view } = store.getState().island\n\n // If phone-island is active (view is not null), don't stop the ringtone\n if (view !== null) {\n console.log('Phone island is active, ringtone stop ignored')\n return\n }\n\n // Phone-island is not active (view is null), force stop ringtone\n console.warn('Emergency stop ringtone triggered - phone island inactive')\n store.dispatch.player.emergencyStopAudioPlayer()\n eventDispatch('phone-island-emergency-stop-ringtone-completed', {})\n })\n\n useEventListener('phone-island-detach', (data) => {\n detach()\n eventDispatch('phone-island-detached', {})\n })\n\n useEventListener('phone-island-reload-component', (data: any) => {\n if (data?.force) {\n store.dispatch.island.setForceReload(true)\n }\n setReload(true)\n })\n\n useEventListener('phone-island-audio-input-change', async (data: DeviceInputOutputTypes) => {\n let targetDeviceId = data.deviceId\n\n // Check if the requested device is available\n if (targetDeviceId && targetDeviceId !== 'default') {\n const isAvailable = await isAudioInputDeviceAvailable(targetDeviceId)\n\n if (!isAvailable) {\n console.warn(\n `Audio input device ${targetDeviceId} not available, falling back to default device`,\n )\n targetDeviceId = await getDefaultAudioInputDevice()\n }\n }\n\n // Save the final device choice\n setJSONItem('phone-island-audio-input-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-input-changed', {})\n\n if (targetDeviceId !== data.deviceId) {\n console.info(\n `Audio input device changed from ${data.deviceId} to ${targetDeviceId} (fallback)`,\n )\n }\n })\n\n useEventListener('phone-island-video-input-change', async (data: DeviceInputOutputTypes) => {\n let targetDeviceId = data.deviceId\n\n // Check if the requested device is available\n if (targetDeviceId && targetDeviceId !== 'default') {\n const isAvailable = await isVideoInputDeviceAvailable(targetDeviceId)\n\n if (!isAvailable) {\n console.warn(\n `Video input device ${targetDeviceId} not available, falling back to default device`,\n )\n targetDeviceId = await getDefaultVideoInputDevice()\n }\n }\n\n // Save the final device choice\n setJSONItem('phone-island-video-input-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-video-input-changed', {})\n\n if (targetDeviceId !== data.deviceId) {\n console.info(\n `Video input device changed from ${data.deviceId} to ${targetDeviceId} (fallback)`,\n )\n }\n })\n\n const [firstRender, setFirstRender] = useState(true)\n const [firstAudioOutputInit, setFirstAudioOutputInit] = useState(true)\n\n // Initialize application on first render\n useEffect(() => {\n const initParamUrl = async () => {\n try {\n const paramUrlResponse: any = await getParamUrl()\n const url = paramUrlResponse?.url || ''\n const isValid = url && url.trim() !== ''\n\n // Save data inside the store\n store.dispatch.paramUrl.setParamUrl({\n url: url,\n onlyQueues: paramUrlResponse?.only_queues || false,\n hasValidUrl: isValid,\n })\n } catch (error) {\n console.error('Error fetching URL parameter:', error)\n store.dispatch.paramUrl.setParamUrl({\n url: '',\n onlyQueues: false,\n hasValidUrl: false,\n })\n }\n }\n\n if (firstRender) {\n // Initialize i18n\n initI18n()\n // Initialize param URL\n initParamUrl()\n setFirstRender(false)\n }\n }, [firstRender])\n\n // Helper function to check if an audio output device is available\n const isAudioOutputDeviceAvailable = async (deviceId: string): Promise<boolean> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return false\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioOutputDevices = devices.filter((device) => device.kind === 'audiooutput')\n\n return audioOutputDevices.some((device) => device.deviceId === deviceId)\n } catch (err) {\n console.warn('Error checking device availability:', err)\n return false\n }\n }\n\n // Helper function to get default audio output device\n const getDefaultAudioOutputDevice = async (): Promise<string> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return 'default'\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioOutputDevices = devices.filter((device) => device.kind === 'audiooutput')\n\n // Find the default device (usually has deviceId 'default' or is the first one)\n const defaultDevice =\n audioOutputDevices.find(\n (device) => device.deviceId === 'default' || device.deviceId === '',\n ) || audioOutputDevices[0]\n\n return defaultDevice ? defaultDevice.deviceId : 'default'\n } catch (err) {\n console.warn('Error getting default device:', err)\n return 'default'\n }\n }\n\n // Helper function to check if an audio input device is available\n const isAudioInputDeviceAvailable = async (deviceId: string): Promise<boolean> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return false\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioInputDevices = devices.filter((device) => device.kind === 'audioinput')\n\n return audioInputDevices.some((device) => device.deviceId === deviceId)\n } catch (err) {\n console.warn('Error checking audio input device availability:', err)\n return false\n }\n }\n\n // Helper function to get default audio input device\n const getDefaultAudioInputDevice = async (): Promise<string> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return 'default'\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioInputDevices = devices.filter((device) => device.kind === 'audioinput')\n\n // Find the default device (usually has deviceId 'default' or is the first one)\n const defaultDevice =\n audioInputDevices.find(\n (device) => device.deviceId === 'default' || device.deviceId === '',\n ) || audioInputDevices[0]\n\n return defaultDevice ? defaultDevice.deviceId : 'default'\n } catch (err) {\n console.warn('Error getting default audio input device:', err)\n return 'default'\n }\n }\n\n // Helper function to check if a video input device is available\n const isVideoInputDeviceAvailable = async (deviceId: string): Promise<boolean> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return false\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const videoInputDevices = devices.filter((device) => device.kind === 'videoinput')\n\n return videoInputDevices.some((device) => device.deviceId === deviceId)\n } catch (err) {\n console.warn('Error checking video input device availability:', err)\n return false\n }\n }\n\n // Helper function to get default video input device\n const getDefaultVideoInputDevice = async (): Promise<string> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return 'default'\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const videoInputDevices = devices.filter((device) => device.kind === 'videoinput')\n\n // Find the default device (usually has deviceId 'default' or is the first one)\n const defaultDevice =\n videoInputDevices.find(\n (device) => device.deviceId === 'default' || device.deviceId === '',\n ) || videoInputDevices[0]\n\n return defaultDevice ? defaultDevice.deviceId : 'default'\n } catch (err) {\n console.warn('Error getting default video input device:', err)\n return 'default'\n }\n }\n\n useEventListener('phone-island-audio-output-change', (data: DeviceInputOutputTypes) => {\n const trySetSinkId = async () => {\n const remoteAudioElement: any = store.getState().player.remoteAudio\n\n if (!remoteAudioElement?.current) {\n console.warn('Remote audio element not available')\n return\n }\n\n let targetDeviceId = data.deviceId\n\n // Check if the requested device is available\n if (targetDeviceId && targetDeviceId !== 'default') {\n const isAvailable = await isAudioOutputDeviceAvailable(targetDeviceId)\n\n if (!isAvailable) {\n console.warn(\n `Audio output device ${targetDeviceId} not available, falling back to default device`,\n )\n targetDeviceId = await getDefaultAudioOutputDevice()\n\n // Update localStorage with the fallback device\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n }\n }\n\n try {\n // Try to set sink ID directly first (works if audio element is already active)\n await remoteAudioElement.current.setSinkId(targetDeviceId)\n console.info('Default audio output device changed successfully!')\n\n // Save device to localStorage\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-output-changed', {})\n } catch (err) {\n console.log('Direct setSinkId failed, trying with temporary stream:', err)\n\n try {\n // Create a temporary silent audio stream to activate the audio element\n const audioContext = new (window.AudioContext || (window as any).webkitAudioContext)()\n const oscillator = audioContext.createOscillator()\n const gainNode = audioContext.createGain()\n\n // Create silent audio\n oscillator.frequency.setValueAtTime(440, audioContext.currentTime)\n gainNode.gain.setValueAtTime(0, audioContext.currentTime) // Silent\n\n oscillator.connect(gainNode)\n\n // Get MediaStream from audio context\n const destination = audioContext.createMediaStreamDestination()\n gainNode.connect(destination)\n\n // Set the stream to the audio element\n remoteAudioElement.current.srcObject = destination.stream\n\n // Start the oscillator\n oscillator.start()\n\n // Try setSinkId again after a short delay\n setTimeout(async () => {\n try {\n await remoteAudioElement.current.setSinkId(targetDeviceId)\n console.info(\n 'Default audio output device changed successfully with temporary stream!',\n )\n\n // Clean up temporary stream\n oscillator.stop()\n audioContext.close()\n remoteAudioElement.current.srcObject = null\n\n // Save device to localStorage\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-output-changed', {})\n } catch (finalErr) {\n console.error('Final setSinkId attempt failed:', finalErr)\n\n // Clean up on failure\n oscillator.stop()\n audioContext.close()\n remoteAudioElement.current.srcObject = null\n\n // If original device failed and we're not already using default, try default\n if (targetDeviceId !== 'default') {\n console.log('Trying fallback to default device')\n try {\n await remoteAudioElement.current.setSinkId('default')\n setJSONItem('phone-island-audio-output-device', { deviceId: 'default' })\n console.info('Fallback to default audio device successful')\n } catch (defaultErr) {\n console.error('Even default device failed:', defaultErr)\n }\n }\n\n // Save device preference anyway for future calls\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-output-changed', {})\n }\n }, 100)\n } catch (streamErr) {\n console.error('Failed to create temporary audio stream:', streamErr)\n\n // Final fallback: try default device\n if (targetDeviceId !== 'default') {\n try {\n await remoteAudioElement.current.setSinkId('default')\n setJSONItem('phone-island-audio-output-device', { deviceId: 'default' })\n console.info('Emergency fallback to default audio device successful')\n } catch (defaultErr) {\n console.error('Emergency fallback to default device failed:', defaultErr)\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n }\n } else {\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n }\n\n eventDispatch('phone-island-audio-output-changed', {})\n }\n }\n }\n\n trySetSinkId()\n })\n\n // Listen for the operator status change\n useEventListener('phone-island-presence-change', (data: any) => {\n changeOperatorStatus(data)\n eventDispatch('phone-island-presence-changed', {})\n })\n\n useEventListener('phone-island-view-changed', (data) => {\n const viewType = data?.viewType\n store.dispatch.island.setIslandView(viewType)\n })\n\n const remoteAudioElement: any = store.getState().player.remoteAudio\n\n //get output device from localstorage\n useEffect(() => {\n if (firstAudioOutputInit && remoteAudioElement) {\n const defaultAudioOutputDevice: any = getJSONItem(\n `phone-island-audio-output-device`,\n )?.deviceId\n eventDispatch('phone-island-audio-output-change', {\n deviceId: defaultAudioOutputDevice,\n })\n setFirstAudioOutputInit(false)\n }\n }, [firstAudioOutputInit, remoteAudioElement])\n\n useEffect(() => {\n checkDarkTheme()\n }, [])\n\n useEventListener('phone-island-theme-change', (theme: any) => {\n setTheme(theme?.selectedTheme)\n })\n\n useEventListener('phone-island-default-device-change', (data) => {\n store.dispatch.currentUser.updateCurrentDefaultDevice(data?.deviceInformationObject)\n eventDispatch('phone-island-default-device-changed', {})\n })\n\n useEventListener('phone-island-alert', (alertType: any) => {\n store.dispatch.alerts.setAlert(alertType.toString())\n })\n\n // Ringtone management events\n useEventListener('phone-island-ringing-tone-list', () => {\n const ringtones = store.getState().ringtones.availableRingtones\n const ringtoneList = ringtones.map((r) => ({\n name: r.name,\n displayName: r.displayName,\n base64Audio: r.base64Audio,\n }))\n eventDispatch('phone-island-ringing-tone-list-response', { ringtones: ringtoneList })\n })\n\n useEventListener('phone-island-ringing-tone-select', (data: { name: string }) => {\n if (data?.name) {\n // Save to localStorage\n setJSONItem('phone-island-selected-ringtone', { value: data.name })\n // Update store\n store.dispatch.ringtones.setSelectedRingtone(data.name)\n eventDispatch('phone-island-ringing-tone-selected', { name: data.name })\n }\n })\n\n useEventListener('phone-island-ringing-tone-output', (data: { deviceId: string }) => {\n if (data?.deviceId) {\n // Save to localStorage\n setJSONItem('phone-island-ringtone-output-device', { value: data.deviceId })\n // Update store\n store.dispatch.ringtones.setOutputDeviceId(data.deviceId)\n eventDispatch('phone-island-ringing-tone-output-changed', { deviceId: data.deviceId })\n }\n })\n\n // Load ringtone preferences from localStorage on mount\n useEffect(() => {\n const savedRingtone = getJSONItem('phone-island-selected-ringtone')\n const savedOutputDevice = getJSONItem('phone-island-ringtone-output-device')\n\n if (savedRingtone?.value) {\n store.dispatch.ringtones.setSelectedRingtone(savedRingtone.value)\n }\n if (savedOutputDevice?.value) {\n store.dispatch.ringtones.setOutputDeviceId(savedOutputDevice.value)\n }\n }, [])\n\n // Manually check if internet connection is enabled or not\n useEventListener('phone-island-check-connection', () => {\n checkInternetConnection().then((internetIsActive) => {\n if (internetIsActive) {\n eventDispatch('phone-island-internet-connected', {})\n } else {\n eventDispatch('phone-island-internet-disconnected', {})\n }\n })\n })\n\n // Check internet connection every 5 seconds\n useEffect(() => {\n const intervalId = setInterval(() => {\n checkInternetConnection().then((internetIsActive) => {\n if (internetIsActive) {\n eventDispatch('phone-island-internet-connected', {})\n } else {\n eventDispatch('phone-island-internet-disconnected', {})\n }\n })\n }, 5000)\n\n return () => clearInterval(intervalId)\n }, [])\n\n useEventListener('phone-island-main-presence', (data: any) => {\n const currentUsernameInformation: any = store.getState().currentUser?.username\n const currentUserObject: any = store.getState().currentUser\n let mainPresenceValueBeforeUpdate = currentUserObject?.mainPresence\n if (\n currentUsernameInformation !== undefined &&\n currentUsernameInformation !== '' &&\n !isEmpty(data[currentUsernameInformation]) &&\n data[currentUsernameInformation]?.mainPresence !== undefined\n ) {\n let newMainPresenceValue = data[currentUsernameInformation]?.mainPresence\n store.dispatch.currentUser.updateMainPresence(data[currentUsernameInformation]?.mainPresence)\n let mainPresenceValueAfterUpdate = newMainPresenceValue\n if (mainPresenceValueAfterUpdate === 'online' && mainPresenceValueBeforeUpdate !== 'online') {\n eventDispatch('phone-island-call-ended', {})\n }\n }\n })\n\n useEventListener('phone-island-call-status', () => {\n const callInformation = store.getState().currentCall\n console.log('Call status debug informations: ', callInformation)\n })\n\n const openParameterizedUrl = (callerNum: any, callerName: any, called: any, uniqueId: any) => {\n const paramUrlInfo = store.getState().paramUrl\n\n if (!paramUrlInfo?.hasValidUrl) {\n return\n }\n\n const paramUrl = paramUrlInfo.url || ''\n\n if (!paramUrl) {\n return\n }\n\n const { urlOpened } = store.getState().island\n const openParamUrlType = paramUrlInfo.openParamUrlType\n\n if (urlOpened && openParamUrlType !== 'button') {\n return\n }\n\n let processedUrl = paramUrl\n\n if (processedUrl.includes('$CALLER_NUMBER') && callerNum) {\n processedUrl = processedUrl.replace(/\\$CALLER_NUMBER/g, encodeURIComponent(callerNum))\n }\n if (processedUrl.includes('$CALLER_NAME') && callerName) {\n processedUrl = processedUrl.replace(/\\$CALLER_NAME/g, encodeURIComponent(callerName))\n }\n if (processedUrl.includes('$UNIQUEID') && uniqueId) {\n processedUrl = processedUrl.replace(/\\$UNIQUEID/g, encodeURIComponent(uniqueId))\n }\n if (processedUrl.includes('$CALLED') && called) {\n processedUrl = processedUrl.replace(/\\$CALLED/g, encodeURIComponent(called))\n }\n if (processedUrl.includes('{phone}') && callerNum) {\n processedUrl = processedUrl.replace(/\\{phone\\}/g, encodeURIComponent(callerNum))\n }\n\n const formattedUrl = processedUrl.startsWith('http') ? processedUrl : `https://${processedUrl}`\n\n if (uaType !== 'mobile' && !urlParamWithEvent) {\n const newWindow = window.open('about:blank', '_blank')\n if (newWindow) {\n newWindow.location.href = formattedUrl\n store.dispatch.island.setUrlOpened(true)\n }\n } else {\n eventDispatch('phone-island-url-parameter-opened-external', { formattedUrl })\n }\n }\n\n useEventListener('phone-island-already-opened-external-page', () => {\n store.dispatch.island.setUrlOpened(true)\n })\n\n useEventListener('phone-island-url-parameter-opened', (data) => {\n const paramUrlInfo = store.getState().paramUrl\n\n if (!paramUrlInfo.hasValidUrl) {\n return\n }\n\n const { urlOpened } = store.getState().island\n if (urlOpened) {\n return\n }\n\n const onlyQueues = paramUrlInfo.onlyQueues || false\n const throughTrunk = isFromTrunk(data?.counterpartNum)\n store.dispatch.paramUrl.setThroughTrunk(throughTrunk)\n\n if (data?.direction === 'in') {\n if (onlyQueues === true && data?.throughQueue === true) {\n openParameterizedUrl(\n data?.counterpartNum,\n data?.counterpartName,\n data?.owner,\n data?.uniqueId,\n )\n } else if (onlyQueues === false && (throughTrunk === true || data?.throughQueue === true)) {\n openParameterizedUrl(\n data?.counterpartNum,\n data?.counterpartName,\n data?.owner,\n data?.uniqueId,\n )\n }\n }\n })\n\n useEventListener('phone-island-user-status', () => {\n const userInformation = store.getState().currentUser\n console.log('User status debug informations: ', userInformation)\n })\n\n useEventListener('phone-island-all-users-status', () => {\n const allUsersInformation = store.getState().users\n console.log('Users status debug informations: ', allUsersInformation)\n })\n\n useEventListener('phone-island-status', () => {\n const phoneIslandInformation = store.getState().island\n console.log('Phone island status debug informations: ', phoneIslandInformation)\n })\n\n useEventListener('phone-island-webrtc-status', () => {\n const webrtcInformation = store.getState().webrtc\n console.log('Webrtc status debug informations: ', webrtcInformation)\n })\n\n useEventListener('phone-island-player-status', () => {\n const playerInformation = store.getState().player\n console.log('Player status debug informations: ', playerInformation)\n })\n\n useEventListener('phone-island-conference-status', () => {\n const conferenceInformation = store.getState().conference\n console.log('Webrtc status debug informations: ', conferenceInformation)\n })\n\n useEventListener('phone-island-streaming-status', () => {\n const streamingInformation = store.getState().streaming\n console.log('Streaming status debug informations: ', streamingInformation)\n })\n\n useEventListener('phone-island-paramurl-status', () => {\n const paramurl = store.getState().paramUrl\n console.log('Paramurl status debug informations: ', paramurl)\n })\n\n useEventListener('phone-island-player-force-stop', () => {\n store.dispatch.player.reset()\n console.log('Audio player is interrupted')\n })\n\n // Download all stores as JSON file - for debugging and backup\n useEventListener('phone-island-stores-download', () => {\n downloadStoresAsJSON()\n eventDispatch('phone-island-stores-downloaded', {})\n })\n\n useEventListener('phone-island-sideview-open', () => {\n store.dispatch.island.toggleSideViewVisible(true)\n store.dispatch.island.setUrlOpened(false)\n eventDispatch('phone-island-sideview-opened', {})\n })\n\n useEventListener('phone-island-sideview-close', () => {\n store.dispatch.island.toggleSideViewVisible(false)\n eventDispatch('phone-island-sideview-closed', {})\n })\n\n useEventListener('phone-island-transcription-close', () => {\n store.dispatch.island.toggleTranscriptionViewVisible(false)\n eventDispatch('phone-island-stop-transcription', {})\n eventDispatch('phone-island-transcription-closed', {})\n })\n\n useEventListener('phone-island-transcription-open', () => {\n eventDispatch('phone-island-start-transcription', {})\n store.dispatch.island.toggleTranscriptionViewVisible(true)\n eventDispatch('phone-island-transcription-opened', {})\n })\n\n useEventListener('phone-island-transcription-close', () => {\n store.dispatch.island.toggleTranscriptionViewVisible(false)\n eventDispatch('phone-island-transcription-closed', {})\n })\n\n useEventListener('phone-island-init-audio', () => {\n // Check if there's an active call - don't interrupt it with audio warm-up\n const { accepted, incoming, outgoing, incomingWebRTC, incomingSocket } = store.getState().currentCall\n const hasActiveCall = accepted || incoming || outgoing || incomingWebRTC || incomingSocket\n\n if (hasActiveCall) {\n console.log('[AUDIO-WARMUP] Skipping audio warm-up: active call in progress')\n return\n }\n\n // Validate SIP_HOST before attempting call\n if (!SIP_HOST || typeof SIP_HOST !== 'string' || SIP_HOST.length === 0) {\n console.warn('[AUDIO-WARMUP] Skipping audio warm-up: SIP_HOST not available', { SIP_HOST })\n return\n }\n\n const { featureCodes } = store.getState().currentUser\n const audioTestCode = featureCodes?.audio_test\n // Always fallback to *41 if audio_test is not available\n const codeToCall = (audioTestCode && typeof audioTestCode === 'string' && audioTestCode.length > 0)\n ? audioTestCode\n : '*41'\n\n console.log('[AUDIO-WARMUP] Starting audio warm-up test call', { codeToCall, SIP_HOST })\n callNumber(codeToCall, SIP_HOST)\n })\n\n useEventListener('phone-island-transcription-toggle', () => {\n const { transcriptionViewIsVisible } = store.getState().island\n const newState = !transcriptionViewIsVisible\n store.dispatch.island.toggleTranscriptionViewVisible(newState)\n eventDispatch(\n newState ? 'phone-island-transcription-opened' : 'phone-island-transcription-closed',\n {},\n )\n })\n\n useEventListener('phone-island-size-change', (args: any) => {\n const { sideViewIsVisible, transcriptionViewIsVisible, actionsExpanded } =\n store.getState().island\n\n // Get current dimensions from args\n const { sizeInformation } = args\n\n // // Calculate extra row dimension ( side view and back call )\n const updatedSizeInformation = {\n ...sizeInformation,\n right: sideViewIsVisible ? '42px' : '0px',\n top: isBackCallActive() ? '40px' : '0px',\n bottomTranscription:\n transcriptionViewIsVisible && actionsExpanded\n ? '335px'\n : transcriptionViewIsVisible && !actionsExpanded\n ? '330px'\n : '0px',\n }\n eventDispatch('phone-island-size-changed', { sizes: updatedSizeInformation })\n })\n\n // Listen for the call end event and set the island size to 0\n useEventListener('phone-island-call-ended', () => {\n const { mainPresence } = store.getState().currentUser\n if (mainPresence === 'online') {\n const sizeInformation: any = {\n width: '0px',\n height: '0px',\n }\n eventDispatch('phone-island-size-change', { sizeInformation })\n eventDispatch('phone-island-sideview-close', {})\n store.dispatch.island.handleResetIslandStore()\n store.dispatch.paramUrl.setThroughTrunk(false)\n }\n })\n\n useEventListener('phone-island-conference-list-open', () => {\n store.dispatch.island.toggleConferenceList(true)\n eventDispatch('phone-island-conference-list-opened', {})\n })\n\n useEventListener('phone-island-alert-removed', (alertRemovedType) => {\n // Get current alerts status\n const { activeAlertsCount } = store.getState().alerts.status\n const { view, previousView } = store.getState().island\n const { isActive } = store.getState().conference\n const alertsData = store.getState().alerts.data\n const currentCall = store.getState().currentCall\n const { incoming, outgoing, accepted } = currentCall\n\n // Check if alert type was provided\n const alertType = alertRemovedType?.type\n\n // Check if user is in a call\n const isInCall =\n currentCall.incoming ||\n currentCall.outgoing ||\n currentCall.accepted ||\n currentCall.conversationId !== ''\n\n // Determine if the island should remain visible\n const shouldKeepVisible =\n incoming ||\n outgoing ||\n accepted ||\n activeAlertsCount > 0 ||\n view === 'player' ||\n view === 'recorder' ||\n view === 'physicalPhoneRecorder' ||\n (view === 'waitingConference' && isActive) ||\n (view === 'transfer' && isActive) ||\n (view === 'settings' && isActive) ||\n (view === 'settings' && (previousView === 'recorder' || previousView === 'player')) ||\n (view === 'operatorBusy' && !isActive)\n\n // Reset the island store only if:\n // 1. The island should not remain visible\n // 2. No more active alerts\n // 3. The specific alert is not active anymore\n // 4. User is not currently in a call\n if (\n !shouldKeepVisible &&\n activeAlertsCount === 0 &&\n (!alertType || (alertsData[alertType] && !alertsData[alertType].active)) &&\n !isInCall\n ) {\n const sizeInformation: any = {\n width: '0px',\n height: '0px',\n }\n eventDispatch('phone-island-size-change', { sizeInformation })\n eventDispatch('phone-island-sideview-close', {})\n store.dispatch.island.handleResetIslandStore()\n }\n })\n\n useEventListener('phone-island-conference-list-close', () => {\n store.dispatch.island.toggleConferenceList(false)\n eventDispatch('phone-island-conference-list-closed', {})\n })\n\n // Listen for conversations updates to handle 'answered' preference for parameterized URL\n useEventListener('phone-island-conversations', (data: any) => {\n // Get the current username (first key in the data object)\n const username = Object.keys(data)[0]\n const currentUsernameInformation: any = store.getState().currentUser?.username\n\n if (username === currentUsernameInformation) {\n const conversations = data[username].conversations\n const paramUrlInfo = store.getState().paramUrl\n const { urlOpened } = store.getState().island\n\n // Only proceed if URL is valid and not already opened\n if (!paramUrlInfo.hasValidUrl || urlOpened) {\n return\n }\n\n // Check if the openParamUrlType is set to 'answered'\n if (paramUrlInfo.openParamUrlType === 'answered') {\n // Check if there are any conversations\n if (conversations && Object.keys(conversations).length > 0) {\n // Get the first conversation (usually there's only one active call)\n const convId = Object.keys(conversations)[0]\n const conv = conversations[convId]\n\n // Check conditions: must be connected and incoming\n if (conv?.connected && conv?.direction === 'in') {\n const onlyQueues = paramUrlInfo.onlyQueues || false\n const calculatedThroughTrunk = isFromTrunk(conv.counterpartNum)\n // Update throughTrunk in paramUrl store\n store.dispatch.paramUrl.setThroughTrunk(calculatedThroughTrunk)\n\n // Check queue conditions based on preferences\n if (onlyQueues === true && conv?.throughQueue === true) {\n // Open URL only for queue calls when onlyQueues is true\n openParameterizedUrl(\n conv.counterpartNum,\n conv.counterpartName,\n conv.owner,\n conv.uniqueId,\n )\n } else if (\n onlyQueues === false &&\n (calculatedThroughTrunk === true || conv?.throughQueue === true)\n ) {\n // Open URL for both trunk and queue calls when onlyQueues is false\n openParameterizedUrl(\n conv.counterpartNum,\n conv.counterpartName,\n conv.owner,\n conv.uniqueId,\n )\n }\n }\n }\n }\n }\n })\n\n return (\n <>\n <Provider store={store}>\n <WebRTC\n hostName={HOST_NAME}\n sipExten={SIP_EXTEN}\n sipSecret={SIP_SECRET}\n sipHost={SIP_HOST}\n sipPort={SIP_PORT}\n reload={reload}\n reloadedCallback={() => setReloadedWebRTC(true)}\n uaType={uaType}\n >\n <RestAPI hostName={HOST_NAME} username={USERNAME} authToken={AUTH_TOKEN}>\n <Socket\n hostName={HOST_NAME}\n username={USERNAME}\n authToken={AUTH_TOKEN}\n reload={reload}\n reloadedCallback={() => setReloadedSocket(true)}\n uaType={uaType}\n >\n <Events sipHost={SIP_HOST}>\n <Island showAlways={showAlways} uaType={uaType} />\n </Events>\n </Socket>\n </RestAPI>\n </WebRTC>\n </Provider>\n </>\n )\n})\n\nPhoneIslandComponent.displayName = 'PhoneIslandComponent'\n\nexport const PhoneIsland = forwardRef<PhoneIslandRef, PhoneIslandProps>(\n (props, ref) => <PhoneIslandComponent {...props} ref={ref} />,\n)\n\nPhoneIsland.displayName = 'PhoneIsland'\n"],"names":["PhoneIslandComponent","forwardRef","_a","ref","dataConfig","_b","showAlways","uaType","_c","urlParamWithEvent","CONFIG","Base64","atob","split","HOST_NAME","USERNAME","AUTH_TOKEN","SIP_EXTEN","SIP_SECRET","SIP_HOST","SIP_PORT","_d","useState","reload","setReload","_e","reloadedWebRTC","setReloadedWebRTC","_f","reloadedSocket","setReloadedSocket","lastReloadTime","useRef","useImperativeHandle","reset","console","info","useEffect","lastActiveTime","Date","now","handleVisibilityChange","document","hidden","timeSinceLastActive","setTimeout","eventDispatch","worker","Worker","wakeUpWorker","type","onmessage","event","data","addEventListener","terminate","removeEventListener","checkInterval","setInterval","store","getState","alerts","isWebRTCDown","webrtc_down","active","isSocketDown","socket_down","timeSinceLastReload","current","sipcall","webrtc","currentCall","accepted","outgoing","iceState","webrtcStuff","pc","iceConnectionState","hasActiveCall","isOnline","navigator","onLine","Math","round","clearInterval","useEventListener","dispatch","island","toggleIsOpen","setIslandView","view","warn","player","emergencyStopAudioPlayer","log","detach","force","setForceReload","__awaiter","targetDeviceId","deviceId","isAudioInputDeviceAvailable","sent","getDefaultAudioInputDevice","setJSONItem","concat","isVideoInputDeviceAvailable","getDefaultVideoInputDevice","_g","firstRender","setFirstRender","_h","firstAudioOutputInit","setFirstAudioOutputInit","initI18n","getParamUrl","paramUrlResponse","url","isValid","trim","paramUrl","setParamUrl","onlyQueues","only_queues","hasValidUrl","error","error_1","mediaDevices","enumerateDevices","devices","filter","device","kind","some","err_3","audioInputDevices","defaultDevice","find","err_4","err_5","videoInputDevices","err_6","remoteAudioElement","remoteAudio","err_1","audioOutputDevices","err_2","setSinkId","err_7","audioContext_1","window","AudioContext","webkitAudioContext","oscillator_1","createOscillator","gainNode","createGain","frequency","setValueAtTime","currentTime","gain","connect","destination","createMediaStreamDestination","srcObject","stream","start","stop","close","finalErr_1","defaultErr_2","streamErr_1","defaultErr_1","changeOperatorStatus","viewType","defaultAudioOutputDevice","getJSONItem","checkDarkTheme","theme","setTheme","selectedTheme","currentUser","updateCurrentDefaultDevice","deviceInformationObject","alertType","setAlert","toString","ringtoneList","ringtones","availableRingtones","map","r","name","displayName","base64Audio","value","setSelectedRingtone","setOutputDeviceId","savedRingtone","savedOutputDevice","checkInternetConnection","then","internetIsActive","intervalId","currentUsernameInformation","username","currentUserObject","mainPresenceValueBeforeUpdate","mainPresence","undefined","isEmpty","newMainPresenceValue","updateMainPresence","callInformation","openParameterizedUrl","callerNum","callerName","called","uniqueId","paramUrlInfo","urlOpened","openParamUrlType","processedUrl","includes","replace","encodeURIComponent","formattedUrl","startsWith","newWindow","open","location","href","setUrlOpened","throughTrunk","isFromTrunk","counterpartNum","setThroughTrunk","direction","throughQueue","counterpartName","owner","userInformation","allUsersInformation","users","phoneIslandInformation","webrtcInformation","playerInformation","conferenceInformation","conference","streamingInformation","streaming","paramurl","downloadStoresAsJSON","toggleSideViewVisible","toggleTranscriptionViewVisible","incoming","incomingWebRTC","incomingSocket","length","featureCodes","audioTestCode","audio_test","codeToCall","callNumber","newState","transcriptionViewIsVisible","args","sideViewIsVisible","actionsExpanded","sizeInformation","updatedSizeInformation","__assign","right","top","isBackCallActive","bottomTranscription","sizes","width","height","handleResetIslandStore","toggleConferenceList","alertRemovedType","activeAlertsCount","status","previousView","isActive","alertsData","isInCall","conversationId","Object","keys","conversations","conv","connected","calculatedThroughTrunk","React","createElement","Fragment","Provider","WebRTC","hostName","sipExten","sipSecret","sipHost","sipPort","reloadedCallback","RestAPI","authToken","Socket","Events","Island","PhoneIsland","props"],"mappings":"6qDAmCMA,EAAuBC,EAAUA,YACrC,SACEC,EAMAC,GALE,IAAAC,eACAC,EAAAH,EAAAI,WAAAA,cAAkBD,EAClBE,WACAC,EAAAN,EAAAO,kBAAAA,OAAiB,IAAAD,GAAQA,EAIrBE,EAAmBC,EAAMA,OAACC,KAAKR,GAAc,IAAIS,MAAM,KACvDC,EAAoBJ,EAAO,GAC3BK,EAAmBL,EAAO,GAC1BM,EAAqBN,EAAO,GAC5BO,EAAoBP,EAAO,GAC3BQ,EAAqBR,EAAO,GAC5BS,EAAmBT,EAAO,GAC1BU,EAAmBV,EAAO,GAG1BW,EAAsBC,EAAAA,UAAkB,GAAvCC,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAClBI,EAAsCH,EAAAA,UAAkB,GAAvDI,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAAsCN,EAAAA,UAAkB,GAAvDO,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAGlCG,EAAiBC,SAAe,GAItCC,sBACE9B,GACA,WAAM,MAAC,CACL+B,MAAO,WACLC,QAAQC,KAAK,gDACbZ,GAAU,EACX,EAJG,GAMN,IAIJa,EAAAA,WAAU,WACR,IAAIC,EAAiBC,KAAKC,MAIpBC,EAAyB,WAC7B,IAAKC,SAASC,OAAQ,CACpB,IAAMH,EAAMD,KAAKC,MACXI,EAAsBJ,EAAMF,EAElCO,YAAW,WACPC,gBAAc,uCAAwC,CAAA,EACvD,GAAE,KAGDF,EAbqB,MAcvBT,QAAQC,KAAK,8DACbZ,GAAU,IAEZc,EAAiBE,CAClB,CACH,EAGMO,EAAS,I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BiM,YAAc,uBAEtB,IAAAsH,EAActT,EAAUA,YACnC,SAACuT,EAAOrT,GAAQ,OAAAoS,wBAACvS,EAAoB+Q,EAAAA,SAAA,CAAA,EAAKyC,EAAK,CAAErT,IAAKA,QAGxDoT,EAAYtH,YAAc"}
1
+ {"version":3,"file":"App.js","sources":["../src/App.tsx"],"sourcesContent":["import React, { type FC, useState, useEffect, forwardRef, useImperativeHandle, useRef } from 'react'\nimport { Events, Socket, WebRTC, Island, RestAPI } from './components'\nimport { Provider } from 'react-redux'\nimport { store, downloadStoresAsJSON } from './store'\nimport { Base64 } from 'js-base64'\nimport wakeUpWorker from './workers/wake_up'\nimport { initI18n } from './lib/i18n'\n\nimport 'react-tooltip/dist/react-tooltip.css'\nimport { useEventListener, eventDispatch, setJSONItem, getJSONItem } from './utils'\nimport { detach } from './lib/webrtc/messages'\nimport { checkDarkTheme, setTheme } from './lib/darkTheme'\nimport { changeOperatorStatus } from './services/user'\nimport { getParamUrl } from './services/user'\nimport { isEmpty } from './utils/genericFunctions/isEmpty'\nimport { checkInternetConnection } from './utils/genericFunctions/checkConnection'\nimport { isBackCallActive } from './utils/genericFunctions/isBackCallVisible'\nimport { isFromTrunk } from './lib/user/extensions'\nimport { callNumber } from './lib/phone/call'\n\ninterface PhoneIslandProps {\n dataConfig: string\n showAlways?: boolean\n uaType: string\n urlParamWithEvent?: boolean\n}\n\ninterface DeviceInputOutputTypes {\n deviceId: string\n}\n\nexport interface PhoneIslandRef {\n reset: () => void\n}\n\nconst PhoneIslandComponent = forwardRef<PhoneIslandRef, PhoneIslandProps>(\n (\n {\n dataConfig,\n showAlways = false,\n uaType,\n urlParamWithEvent = false,\n }: PhoneIslandProps,\n ref,\n ) => {\n const CONFIG: string[] = Base64.atob(dataConfig || '').split(':')\n const HOST_NAME: string = CONFIG[0]\n const USERNAME: string = CONFIG[1]\n const AUTH_TOKEN: string = CONFIG[2]\n const SIP_EXTEN: string = CONFIG[3]\n const SIP_SECRET: string = CONFIG[4]\n const SIP_HOST: string = CONFIG[5]\n const SIP_PORT: string = CONFIG[6]\n\n // Initialize the state to manage the reload events\n const [reload, setReload] = useState<boolean>(false)\n const [reloadedWebRTC, setReloadedWebRTC] = useState<boolean>(false)\n const [reloadedSocket, setReloadedSocket] = useState<boolean>(false)\n\n // Cooldown to prevent reload loop when network is down\n const lastReloadTime = useRef<number>(0)\n const RELOAD_COOLDOWN = 10 * 1000 // 10 seconds between reload attempts\n\n // Expose reset method via imperativeHandle\n useImperativeHandle(\n ref,\n () => ({\n reset: () => {\n console.info('PhoneIsland: Performing full component reset')\n setReload(true)\n },\n }),\n [],\n )\n\n // Keepalive system to maintain tab active without heavy reload\n useEffect(() => {\n let lastActiveTime = Date.now()\n const INACTIVITY_THRESHOLD = 5 * 60 * 1000 // 5 minutes\n\n // Handle visibility change (tab becomes visible/hidden)\n const handleVisibilityChange = () => {\n if (!document.hidden) {\n const now = Date.now()\n const timeSinceLastActive = now - lastActiveTime\n // Trigger emergency stop ringtone after 2 seconds when tab becomes active again\n setTimeout(() => {\n eventDispatch('phone-island-emergency-stop-ringtone', {})\n }, 2000)\n\n // Only reload if tab was hidden for more than threshold\n if (timeSinceLastActive > INACTIVITY_THRESHOLD) {\n console.info('Tab inactive for long period, performing soft reconnection')\n setReload(true)\n }\n lastActiveTime = now\n }\n }\n\n // Lightweight worker for keepalive ping\n const worker = new Worker(wakeUpWorker, { type: 'module' })\n worker.onmessage = (event: MessageEvent<string>) => {\n if (event.data === 'ping') {\n // Simple ping to keep tab active - no action needed\n lastActiveTime = Date.now()\n }\n }\n\n // Listen for visibility changes\n document.addEventListener('visibilitychange', handleVisibilityChange)\n\n return () => {\n worker.terminate()\n document.removeEventListener('visibilitychange', handleVisibilityChange)\n }\n }, [])\n\n useEffect(() => {\n if (reloadedSocket && reloadedWebRTC) {\n setReload(false)\n setReloadedWebRTC(false)\n setReloadedSocket(false)\n }\n }, [reloadedSocket, reloadedWebRTC])\n\n // Monitor alerts and trigger automatic reload when webrtc_down or socket_down become active\n useEffect(() => {\n const checkInterval = setInterval(() => {\n const { data } = store.getState().alerts\n const isWebRTCDown = data.webrtc_down?.active || false\n const isSocketDown = data.socket_down?.active || false\n const now = Date.now()\n const timeSinceLastReload = now - lastReloadTime.current\n\n // Check if there's an active call - if so, don't reload automatically\n // WebRTC/ICE is designed to recover from brief network interruptions\n const { sipcall }: { sipcall: any } = store.getState().webrtc\n const { accepted, outgoing } = store.getState().currentCall\n const iceState = sipcall?.webrtcStuff?.pc?.iceConnectionState\n const hasActiveCall = accepted || outgoing || iceState === 'connected' || iceState === 'completed'\n\n // If either alert is active and we're not already reloading and cooldown has passed\n // Don't trigger reload if we're completely offline - wait for network to come back\n // Don't trigger reload if there's an active call - let ICE try to recover\n const isOnline = navigator.onLine\n if ((isWebRTCDown || isSocketDown) && !reload && timeSinceLastReload > RELOAD_COOLDOWN && isOnline) {\n if (hasActiveCall) {\n console.info('Alert detected but active call in progress - skipping automatic reload to let ICE recover', {\n timeSinceLastReload: Math.round(timeSinceLastReload / 1000) + 's',\n isWebRTCDown,\n isSocketDown,\n iceState,\n accepted,\n outgoing\n })\n // Don't reload - let ICE try to recover the call\n return\n }\n console.info('Alert detected (webrtc_down or socket_down), triggering automatic reload', {\n timeSinceLastReload: Math.round(timeSinceLastReload / 1000) + 's',\n isWebRTCDown,\n isSocketDown\n })\n lastReloadTime.current = now\n setReload(true)\n }\n }, 1000) // Check every second\n\n return () => clearInterval(checkInterval)\n }, [reload])\n\n useEventListener('phone-island-expand', () => {\n store.dispatch.island.toggleIsOpen(true)\n eventDispatch('phone-island-expanded', {})\n })\n useEventListener('phone-island-compress', () => {\n store.dispatch.island.toggleIsOpen(false)\n eventDispatch('phone-island-compressed', {})\n })\n\n useEventListener('phone-island-call-keypad-close', () => {\n store.dispatch.island.setIslandView('call')\n eventDispatch('phone-island-call-keypad-closed', {})\n })\n useEventListener('phone-island-call-transfer-close', () => {\n store.dispatch.island.setIslandView('call')\n eventDispatch('phone-island-call-transfer-closed', {})\n })\n useEventListener('phone-island-recording-close', () => {\n store.dispatch.island.setIslandView(null)\n eventDispatch('phone-island-recording-closed', {})\n })\n useEventListener('phone-island-audio-player-close', () => {\n store.dispatch.island.setIslandView(null)\n eventDispatch('phone-island-audio-player-closed', {})\n })\n\n useEventListener('phone-island-emergency-stop-ringtone', () => {\n const { view } = store.getState().island\n\n // If phone-island is active (view is not null), don't stop the ringtone\n if (view !== null) {\n console.log('Phone island is active, ringtone stop ignored')\n return\n }\n\n // Phone-island is not active (view is null), force stop ringtone\n console.warn('Emergency stop ringtone triggered - phone island inactive')\n store.dispatch.player.emergencyStopAudioPlayer()\n eventDispatch('phone-island-emergency-stop-ringtone-completed', {})\n })\n\n useEventListener('phone-island-detach', (data) => {\n detach()\n eventDispatch('phone-island-detached', {})\n })\n\n useEventListener('phone-island-reload-component', (data: any) => {\n if (data?.force) {\n store.dispatch.island.setForceReload(true)\n }\n setReload(true)\n })\n\n useEventListener('phone-island-audio-input-change', async (data: DeviceInputOutputTypes) => {\n let targetDeviceId = data.deviceId\n\n // Check if the requested device is available\n if (targetDeviceId && targetDeviceId !== 'default') {\n const isAvailable = await isAudioInputDeviceAvailable(targetDeviceId)\n\n if (!isAvailable) {\n console.warn(\n `Audio input device ${targetDeviceId} not available, falling back to default device`,\n )\n targetDeviceId = await getDefaultAudioInputDevice()\n }\n }\n\n // Save the final device choice\n setJSONItem('phone-island-audio-input-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-input-changed', {})\n\n if (targetDeviceId !== data.deviceId) {\n console.info(\n `Audio input device changed from ${data.deviceId} to ${targetDeviceId} (fallback)`,\n )\n }\n })\n\n useEventListener('phone-island-video-input-change', async (data: DeviceInputOutputTypes) => {\n let targetDeviceId = data.deviceId\n\n // Check if the requested device is available\n if (targetDeviceId && targetDeviceId !== 'default') {\n const isAvailable = await isVideoInputDeviceAvailable(targetDeviceId)\n\n if (!isAvailable) {\n console.warn(\n `Video input device ${targetDeviceId} not available, falling back to default device`,\n )\n targetDeviceId = await getDefaultVideoInputDevice()\n }\n }\n\n // Save the final device choice\n setJSONItem('phone-island-video-input-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-video-input-changed', {})\n\n if (targetDeviceId !== data.deviceId) {\n console.info(\n `Video input device changed from ${data.deviceId} to ${targetDeviceId} (fallback)`,\n )\n }\n })\n\n const [firstRender, setFirstRender] = useState(true)\n const [firstAudioOutputInit, setFirstAudioOutputInit] = useState(true)\n\n // Initialize application on first render\n useEffect(() => {\n const initParamUrl = async () => {\n try {\n const paramUrlResponse: any = await getParamUrl()\n const url = paramUrlResponse?.url || ''\n const isValid = url && url.trim() !== ''\n\n // Save data inside the store\n store.dispatch.paramUrl.setParamUrl({\n url: url,\n onlyQueues: paramUrlResponse?.only_queues || false,\n hasValidUrl: isValid,\n })\n } catch (error) {\n console.error('Error fetching URL parameter:', error)\n store.dispatch.paramUrl.setParamUrl({\n url: '',\n onlyQueues: false,\n hasValidUrl: false,\n })\n }\n }\n\n if (firstRender) {\n // Initialize i18n\n initI18n()\n // Initialize param URL\n initParamUrl()\n setFirstRender(false)\n }\n }, [firstRender])\n\n // Helper function to check if an audio output device is available\n const isAudioOutputDeviceAvailable = async (deviceId: string): Promise<boolean> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return false\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioOutputDevices = devices.filter((device) => device.kind === 'audiooutput')\n\n return audioOutputDevices.some((device) => device.deviceId === deviceId)\n } catch (err) {\n console.warn('Error checking device availability:', err)\n return false\n }\n }\n\n // Helper function to get default audio output device\n const getDefaultAudioOutputDevice = async (): Promise<string> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return 'default'\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioOutputDevices = devices.filter((device) => device.kind === 'audiooutput')\n\n // Find the default device (usually has deviceId 'default' or is the first one)\n const defaultDevice =\n audioOutputDevices.find(\n (device) => device.deviceId === 'default' || device.deviceId === '',\n ) || audioOutputDevices[0]\n\n return defaultDevice ? defaultDevice.deviceId : 'default'\n } catch (err) {\n console.warn('Error getting default device:', err)\n return 'default'\n }\n }\n\n // Helper function to check if an audio input device is available\n const isAudioInputDeviceAvailable = async (deviceId: string): Promise<boolean> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return false\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioInputDevices = devices.filter((device) => device.kind === 'audioinput')\n\n return audioInputDevices.some((device) => device.deviceId === deviceId)\n } catch (err) {\n console.warn('Error checking audio input device availability:', err)\n return false\n }\n }\n\n // Helper function to get default audio input device\n const getDefaultAudioInputDevice = async (): Promise<string> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return 'default'\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const audioInputDevices = devices.filter((device) => device.kind === 'audioinput')\n\n // Find the default device (usually has deviceId 'default' or is the first one)\n const defaultDevice =\n audioInputDevices.find(\n (device) => device.deviceId === 'default' || device.deviceId === '',\n ) || audioInputDevices[0]\n\n return defaultDevice ? defaultDevice.deviceId : 'default'\n } catch (err) {\n console.warn('Error getting default audio input device:', err)\n return 'default'\n }\n }\n\n // Helper function to check if a video input device is available\n const isVideoInputDeviceAvailable = async (deviceId: string): Promise<boolean> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return false\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const videoInputDevices = devices.filter((device) => device.kind === 'videoinput')\n\n return videoInputDevices.some((device) => device.deviceId === deviceId)\n } catch (err) {\n console.warn('Error checking video input device availability:', err)\n return false\n }\n }\n\n // Helper function to get default video input device\n const getDefaultVideoInputDevice = async (): Promise<string> => {\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n return 'default'\n }\n\n const devices = await navigator.mediaDevices.enumerateDevices()\n const videoInputDevices = devices.filter((device) => device.kind === 'videoinput')\n\n // Find the default device (usually has deviceId 'default' or is the first one)\n const defaultDevice =\n videoInputDevices.find(\n (device) => device.deviceId === 'default' || device.deviceId === '',\n ) || videoInputDevices[0]\n\n return defaultDevice ? defaultDevice.deviceId : 'default'\n } catch (err) {\n console.warn('Error getting default video input device:', err)\n return 'default'\n }\n }\n\n useEventListener('phone-island-audio-output-change', (data: DeviceInputOutputTypes) => {\n const trySetSinkId = async () => {\n const remoteAudioElement: any = store.getState().player.remoteAudio\n\n if (!remoteAudioElement?.current) {\n console.warn('Remote audio element not available')\n return\n }\n\n let targetDeviceId = data.deviceId\n\n // Check if the requested device is available\n if (targetDeviceId && targetDeviceId !== 'default') {\n const isAvailable = await isAudioOutputDeviceAvailable(targetDeviceId)\n\n if (!isAvailable) {\n console.warn(\n `Audio output device ${targetDeviceId} not available, falling back to default device`,\n )\n targetDeviceId = await getDefaultAudioOutputDevice()\n\n // Update localStorage with the fallback device\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n }\n }\n\n try {\n // Try to set sink ID directly first (works if audio element is already active)\n await remoteAudioElement.current.setSinkId(targetDeviceId)\n console.info('Default audio output device changed successfully!')\n\n // Save device to localStorage\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-output-changed', {})\n } catch (err) {\n console.log('Direct setSinkId failed, trying with temporary stream:', err)\n\n try {\n // Create a temporary silent audio stream to activate the audio element\n const audioContext = new (window.AudioContext || (window as any).webkitAudioContext)()\n const oscillator = audioContext.createOscillator()\n const gainNode = audioContext.createGain()\n\n // Create silent audio\n oscillator.frequency.setValueAtTime(440, audioContext.currentTime)\n gainNode.gain.setValueAtTime(0, audioContext.currentTime) // Silent\n\n oscillator.connect(gainNode)\n\n // Get MediaStream from audio context\n const destination = audioContext.createMediaStreamDestination()\n gainNode.connect(destination)\n\n // Set the stream to the audio element\n remoteAudioElement.current.srcObject = destination.stream\n\n // Start the oscillator\n oscillator.start()\n\n // Try setSinkId again after a short delay\n setTimeout(async () => {\n try {\n await remoteAudioElement.current.setSinkId(targetDeviceId)\n console.info(\n 'Default audio output device changed successfully with temporary stream!',\n )\n\n // Clean up temporary stream\n oscillator.stop()\n audioContext.close()\n remoteAudioElement.current.srcObject = null\n\n // Save device to localStorage\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-output-changed', {})\n } catch (finalErr) {\n console.error('Final setSinkId attempt failed:', finalErr)\n\n // Clean up on failure\n oscillator.stop()\n audioContext.close()\n remoteAudioElement.current.srcObject = null\n\n // If original device failed and we're not already using default, try default\n if (targetDeviceId !== 'default') {\n console.log('Trying fallback to default device')\n try {\n await remoteAudioElement.current.setSinkId('default')\n setJSONItem('phone-island-audio-output-device', { deviceId: 'default' })\n console.info('Fallback to default audio device successful')\n } catch (defaultErr) {\n console.error('Even default device failed:', defaultErr)\n }\n }\n\n // Save device preference anyway for future calls\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n eventDispatch('phone-island-audio-output-changed', {})\n }\n }, 100)\n } catch (streamErr) {\n console.error('Failed to create temporary audio stream:', streamErr)\n\n // Final fallback: try default device\n if (targetDeviceId !== 'default') {\n try {\n await remoteAudioElement.current.setSinkId('default')\n setJSONItem('phone-island-audio-output-device', { deviceId: 'default' })\n console.info('Emergency fallback to default audio device successful')\n } catch (defaultErr) {\n console.error('Emergency fallback to default device failed:', defaultErr)\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n }\n } else {\n setJSONItem('phone-island-audio-output-device', { deviceId: targetDeviceId })\n }\n\n eventDispatch('phone-island-audio-output-changed', {})\n }\n }\n }\n\n trySetSinkId()\n })\n\n // Listen for the operator status change\n useEventListener('phone-island-presence-change', (data: any) => {\n changeOperatorStatus(data)\n eventDispatch('phone-island-presence-changed', {})\n })\n\n useEventListener('phone-island-view-changed', (data) => {\n const viewType = data?.viewType\n store.dispatch.island.setIslandView(viewType)\n })\n\n const remoteAudioElement: any = store.getState().player.remoteAudio\n\n //get output device from localstorage\n useEffect(() => {\n if (firstAudioOutputInit && remoteAudioElement) {\n const defaultAudioOutputDevice: any = getJSONItem(\n `phone-island-audio-output-device`,\n )?.deviceId\n eventDispatch('phone-island-audio-output-change', {\n deviceId: defaultAudioOutputDevice,\n })\n setFirstAudioOutputInit(false)\n }\n }, [firstAudioOutputInit, remoteAudioElement])\n\n useEffect(() => {\n checkDarkTheme()\n }, [])\n\n useEventListener('phone-island-theme-change', (theme: any) => {\n setTheme(theme?.selectedTheme)\n })\n\n useEventListener('phone-island-default-device-change', (data) => {\n store.dispatch.currentUser.updateCurrentDefaultDevice(data?.deviceInformationObject)\n eventDispatch('phone-island-default-device-changed', {})\n })\n\n useEventListener('phone-island-alert', (alertType: any) => {\n store.dispatch.alerts.setAlert(alertType.toString())\n })\n\n // Ringtone management events\n useEventListener('phone-island-ringing-tone-list', () => {\n const ringtones = store.getState().ringtones.availableRingtones\n const ringtoneList = ringtones.map((r) => ({\n name: r.name,\n displayName: r.displayName,\n base64Audio: r.base64Audio,\n }))\n eventDispatch('phone-island-ringing-tone-list-response', { ringtones: ringtoneList })\n })\n\n useEventListener('phone-island-ringing-tone-select', (data: { name: string }) => {\n if (data?.name) {\n // Save to localStorage\n setJSONItem('phone-island-selected-ringtone', { value: data.name })\n // Update store\n store.dispatch.ringtones.setSelectedRingtone(data.name)\n eventDispatch('phone-island-ringing-tone-selected', { name: data.name })\n }\n })\n\n useEventListener('phone-island-ringing-tone-output', (data: { deviceId: string }) => {\n if (data?.deviceId) {\n // Save to localStorage\n setJSONItem('phone-island-ringtone-output-device', { value: data.deviceId })\n // Update store\n store.dispatch.ringtones.setOutputDeviceId(data.deviceId)\n eventDispatch('phone-island-ringing-tone-output-changed', { deviceId: data.deviceId })\n }\n })\n\n // Load ringtone preferences from localStorage on mount\n useEffect(() => {\n const savedRingtone = getJSONItem('phone-island-selected-ringtone')\n const savedOutputDevice = getJSONItem('phone-island-ringtone-output-device')\n\n if (savedRingtone?.value) {\n store.dispatch.ringtones.setSelectedRingtone(savedRingtone.value)\n }\n if (savedOutputDevice?.value) {\n store.dispatch.ringtones.setOutputDeviceId(savedOutputDevice.value)\n }\n }, [])\n\n // Manually check if internet connection is enabled or not\n useEventListener('phone-island-check-connection', () => {\n checkInternetConnection().then((internetIsActive) => {\n if (internetIsActive) {\n eventDispatch('phone-island-internet-connected', {})\n } else {\n eventDispatch('phone-island-internet-disconnected', {})\n }\n })\n })\n\n // Check internet connection every 5 seconds\n useEffect(() => {\n const intervalId = setInterval(() => {\n checkInternetConnection().then((internetIsActive) => {\n if (internetIsActive) {\n eventDispatch('phone-island-internet-connected', {})\n } else {\n eventDispatch('phone-island-internet-disconnected', {})\n }\n })\n }, 5000)\n\n return () => clearInterval(intervalId)\n }, [])\n\n useEventListener('phone-island-main-presence', (data: any) => {\n const currentUsernameInformation: any = store.getState().currentUser?.username\n const currentUserObject: any = store.getState().currentUser\n let mainPresenceValueBeforeUpdate = currentUserObject?.mainPresence\n if (\n currentUsernameInformation !== undefined &&\n currentUsernameInformation !== '' &&\n !isEmpty(data[currentUsernameInformation]) &&\n data[currentUsernameInformation]?.mainPresence !== undefined\n ) {\n let newMainPresenceValue = data[currentUsernameInformation]?.mainPresence\n store.dispatch.currentUser.updateMainPresence(data[currentUsernameInformation]?.mainPresence)\n let mainPresenceValueAfterUpdate = newMainPresenceValue\n if (mainPresenceValueAfterUpdate === 'online' && mainPresenceValueBeforeUpdate !== 'online') {\n eventDispatch('phone-island-call-ended', {})\n }\n }\n })\n\n useEventListener('phone-island-call-status', () => {\n const callInformation = store.getState().currentCall\n console.log('Call status debug informations: ', callInformation)\n })\n\n const openParameterizedUrl = (callerNum: any, callerName: any, called: any, uniqueId: any) => {\n const paramUrlInfo = store.getState().paramUrl\n\n if (!paramUrlInfo?.hasValidUrl) {\n return\n }\n\n const paramUrl = paramUrlInfo.url || ''\n\n if (!paramUrl) {\n return\n }\n\n const { urlOpened } = store.getState().island\n const openParamUrlType = paramUrlInfo.openParamUrlType\n\n if (urlOpened && openParamUrlType !== 'button') {\n return\n }\n\n let processedUrl = paramUrl\n\n if (processedUrl.includes('$CALLER_NUMBER') && callerNum) {\n processedUrl = processedUrl.replace(/\\$CALLER_NUMBER/g, encodeURIComponent(callerNum))\n }\n if (processedUrl.includes('$CALLER_NAME') && callerName) {\n processedUrl = processedUrl.replace(/\\$CALLER_NAME/g, encodeURIComponent(callerName))\n }\n if (processedUrl.includes('$UNIQUEID') && uniqueId) {\n processedUrl = processedUrl.replace(/\\$UNIQUEID/g, encodeURIComponent(uniqueId))\n }\n if (processedUrl.includes('$CALLED') && called) {\n processedUrl = processedUrl.replace(/\\$CALLED/g, encodeURIComponent(called))\n }\n if (processedUrl.includes('{phone}') && callerNum) {\n processedUrl = processedUrl.replace(/\\{phone\\}/g, encodeURIComponent(callerNum))\n }\n\n const formattedUrl = processedUrl.startsWith('http') ? processedUrl : `https://${processedUrl}`\n\n if (uaType !== 'mobile' && !urlParamWithEvent) {\n const newWindow = window.open('about:blank', '_blank')\n if (newWindow) {\n newWindow.location.href = formattedUrl\n store.dispatch.island.setUrlOpened(true)\n }\n } else {\n eventDispatch('phone-island-url-parameter-opened-external', { formattedUrl })\n }\n }\n\n useEventListener('phone-island-already-opened-external-page', () => {\n store.dispatch.island.setUrlOpened(true)\n })\n\n useEventListener('phone-island-url-parameter-opened', (data) => {\n const paramUrlInfo = store.getState().paramUrl\n\n if (!paramUrlInfo.hasValidUrl) {\n return\n }\n\n const { urlOpened } = store.getState().island\n if (urlOpened) {\n return\n }\n\n const onlyQueues = paramUrlInfo.onlyQueues || false\n const throughTrunk = isFromTrunk(data?.counterpartNum)\n store.dispatch.paramUrl.setThroughTrunk(throughTrunk)\n\n if (data?.direction === 'in') {\n if (onlyQueues === true && data?.throughQueue === true) {\n openParameterizedUrl(\n data?.counterpartNum,\n data?.counterpartName,\n data?.owner,\n data?.uniqueId,\n )\n } else if (onlyQueues === false && (throughTrunk === true || data?.throughQueue === true)) {\n openParameterizedUrl(\n data?.counterpartNum,\n data?.counterpartName,\n data?.owner,\n data?.uniqueId,\n )\n }\n }\n })\n\n useEventListener('phone-island-user-status', () => {\n const userInformation = store.getState().currentUser\n console.log('User status debug informations: ', userInformation)\n })\n\n useEventListener('phone-island-all-users-status', () => {\n const allUsersInformation = store.getState().users\n console.log('Users status debug informations: ', allUsersInformation)\n })\n\n useEventListener('phone-island-status', () => {\n const phoneIslandInformation = store.getState().island\n console.log('Phone island status debug informations: ', phoneIslandInformation)\n })\n\n useEventListener('phone-island-webrtc-status', () => {\n const webrtcInformation = store.getState().webrtc\n console.log('Webrtc status debug informations: ', webrtcInformation)\n })\n\n useEventListener('phone-island-player-status', () => {\n const playerInformation = store.getState().player\n console.log('Player status debug informations: ', playerInformation)\n })\n\n useEventListener('phone-island-conference-status', () => {\n const conferenceInformation = store.getState().conference\n console.log('Webrtc status debug informations: ', conferenceInformation)\n })\n\n useEventListener('phone-island-streaming-status', () => {\n const streamingInformation = store.getState().streaming\n console.log('Streaming status debug informations: ', streamingInformation)\n })\n\n useEventListener('phone-island-paramurl-status', () => {\n const paramurl = store.getState().paramUrl\n console.log('Paramurl status debug informations: ', paramurl)\n })\n\n useEventListener('phone-island-player-force-stop', () => {\n store.dispatch.player.reset()\n console.log('Audio player is interrupted')\n })\n\n // Download all stores as JSON file - for debugging and backup\n useEventListener('phone-island-stores-download', () => {\n downloadStoresAsJSON()\n eventDispatch('phone-island-stores-downloaded', {})\n })\n\n useEventListener('phone-island-sideview-open', () => {\n store.dispatch.island.toggleSideViewVisible(true)\n store.dispatch.island.setUrlOpened(false)\n eventDispatch('phone-island-sideview-opened', {})\n })\n\n useEventListener('phone-island-sideview-close', () => {\n store.dispatch.island.toggleSideViewVisible(false)\n eventDispatch('phone-island-sideview-closed', {})\n })\n\n useEventListener('phone-island-transcription-close', () => {\n store.dispatch.island.toggleTranscriptionViewVisible(false)\n eventDispatch('phone-island-stop-transcription', {})\n eventDispatch('phone-island-transcription-closed', {})\n })\n\n useEventListener('phone-island-transcription-open', () => {\n eventDispatch('phone-island-start-transcription', {})\n store.dispatch.island.toggleTranscriptionViewVisible(true)\n eventDispatch('phone-island-transcription-opened', {})\n })\n\n useEventListener('phone-island-transcription-close', () => {\n store.dispatch.island.toggleTranscriptionViewVisible(false)\n eventDispatch('phone-island-transcription-closed', {})\n })\n\n useEventListener('phone-island-init-audio', () => {\n // Check if there's an active call - don't interrupt it with audio warm-up\n const { accepted, incoming, outgoing, incomingWebRTC, incomingSocket } = store.getState().currentCall\n const hasActiveCall = accepted || incoming || outgoing || incomingWebRTC || incomingSocket\n\n if (hasActiveCall) {\n console.log('[AUDIO-WARMUP] Skipping audio warm-up: active call in progress')\n return\n }\n\n // Validate SIP_HOST before attempting call\n if (!SIP_HOST || typeof SIP_HOST !== 'string' || SIP_HOST.length === 0) {\n console.warn('[AUDIO-WARMUP] Skipping audio warm-up: SIP_HOST not available', { SIP_HOST })\n return\n }\n\n const { featureCodes } = store.getState().currentUser\n const audioTestCode = featureCodes?.audio_test\n // Always fallback to *41 if audio_test is not available\n const codeToCall = (audioTestCode && typeof audioTestCode === 'string' && audioTestCode.length > 0)\n ? audioTestCode\n : '*41'\n\n console.log('[AUDIO-WARMUP] Starting audio warm-up test call', { codeToCall, SIP_HOST })\n callNumber(codeToCall, SIP_HOST)\n })\n\n useEventListener('phone-island-transcription-toggle', () => {\n const { transcriptionViewIsVisible } = store.getState().island\n const newState = !transcriptionViewIsVisible\n store.dispatch.island.toggleTranscriptionViewVisible(newState)\n eventDispatch(\n newState ? 'phone-island-transcription-opened' : 'phone-island-transcription-closed',\n {},\n )\n })\n\n useEventListener('phone-island-size-change', (args: any) => {\n const { sideViewIsVisible, transcriptionViewIsVisible, actionsExpanded } =\n store.getState().island\n\n // Get current dimensions from args\n const { sizeInformation } = args\n\n // // Calculate extra row dimension ( side view and back call )\n const updatedSizeInformation = {\n ...sizeInformation,\n right: sideViewIsVisible ? '42px' : '0px',\n top: isBackCallActive() ? '40px' : '0px',\n bottomTranscription:\n transcriptionViewIsVisible && actionsExpanded\n ? '335px'\n : transcriptionViewIsVisible && !actionsExpanded\n ? '330px'\n : '0px',\n }\n eventDispatch('phone-island-size-changed', { sizes: updatedSizeInformation })\n })\n\n // Listen for the call end event and set the island size to 0\n useEventListener('phone-island-call-ended', () => {\n const { mainPresence } = store.getState().currentUser\n if (mainPresence === 'online') {\n const sizeInformation: any = {\n width: '0px',\n height: '0px',\n }\n eventDispatch('phone-island-size-change', { sizeInformation })\n eventDispatch('phone-island-sideview-close', {})\n store.dispatch.island.handleResetIslandStore()\n store.dispatch.paramUrl.setThroughTrunk(false)\n }\n })\n\n useEventListener('phone-island-conference-list-open', () => {\n store.dispatch.island.toggleConferenceList(true)\n eventDispatch('phone-island-conference-list-opened', {})\n })\n\n useEventListener('phone-island-alert-removed', (alertRemovedType) => {\n // Get current alerts status\n const { activeAlertsCount } = store.getState().alerts.status\n const { view, previousView } = store.getState().island\n const { isActive } = store.getState().conference\n const alertsData = store.getState().alerts.data\n const currentCall = store.getState().currentCall\n const { incoming, outgoing, accepted } = currentCall\n\n // Check if alert type was provided\n const alertType = alertRemovedType?.type\n\n // Check if user is in a call\n const isInCall =\n currentCall.incoming ||\n currentCall.outgoing ||\n currentCall.accepted ||\n currentCall.conversationId !== ''\n\n // Determine if the island should remain visible\n const shouldKeepVisible =\n incoming ||\n outgoing ||\n accepted ||\n activeAlertsCount > 0 ||\n view === 'player' ||\n view === 'recorder' ||\n view === 'physicalPhoneRecorder' ||\n (view === 'waitingConference' && isActive) ||\n (view === 'transfer' && isActive) ||\n (view === 'settings' && isActive) ||\n (view === 'settings' && (previousView === 'recorder' || previousView === 'player')) ||\n (view === 'operatorBusy' && !isActive)\n\n // Reset the island store only if:\n // 1. The island should not remain visible\n // 2. No more active alerts\n // 3. The specific alert is not active anymore\n // 4. User is not currently in a call\n if (\n !shouldKeepVisible &&\n activeAlertsCount === 0 &&\n (!alertType || (alertsData[alertType] && !alertsData[alertType].active)) &&\n !isInCall\n ) {\n const sizeInformation: any = {\n width: '0px',\n height: '0px',\n }\n eventDispatch('phone-island-size-change', { sizeInformation })\n eventDispatch('phone-island-sideview-close', {})\n store.dispatch.island.handleResetIslandStore()\n }\n })\n\n useEventListener('phone-island-conference-list-close', () => {\n store.dispatch.island.toggleConferenceList(false)\n eventDispatch('phone-island-conference-list-closed', {})\n })\n\n // Listen for conversations updates to handle 'answered' preference for parameterized URL\n useEventListener('phone-island-conversations', (data: any) => {\n // Get the current username (first key in the data object)\n const username = Object.keys(data)[0]\n const currentUsernameInformation: any = store.getState().currentUser?.username\n\n if (username === currentUsernameInformation) {\n const conversations = data[username].conversations\n const paramUrlInfo = store.getState().paramUrl\n const { urlOpened } = store.getState().island\n\n // Only proceed if URL is valid and not already opened\n if (!paramUrlInfo.hasValidUrl || urlOpened) {\n return\n }\n\n // Check if the openParamUrlType is set to 'answered'\n if (paramUrlInfo.openParamUrlType === 'answered') {\n // Check if there are any conversations\n if (conversations && Object.keys(conversations).length > 0) {\n // Get the first conversation (usually there's only one active call)\n const convId = Object.keys(conversations)[0]\n const conv = conversations[convId]\n\n // Check conditions: must be connected and incoming\n if (conv?.connected && conv?.direction === 'in') {\n const onlyQueues = paramUrlInfo.onlyQueues || false\n const calculatedThroughTrunk = isFromTrunk(conv.counterpartNum)\n // Update throughTrunk in paramUrl store\n store.dispatch.paramUrl.setThroughTrunk(calculatedThroughTrunk)\n\n // Check queue conditions based on preferences\n if (onlyQueues === true && conv?.throughQueue === true) {\n // Open URL only for queue calls when onlyQueues is true\n openParameterizedUrl(\n conv.counterpartNum,\n conv.counterpartName,\n conv.owner,\n conv.uniqueId,\n )\n } else if (\n onlyQueues === false &&\n (calculatedThroughTrunk === true || conv?.throughQueue === true)\n ) {\n // Open URL for both trunk and queue calls when onlyQueues is false\n openParameterizedUrl(\n conv.counterpartNum,\n conv.counterpartName,\n conv.owner,\n conv.uniqueId,\n )\n }\n }\n }\n }\n }\n })\n\n return (\n <>\n <Provider store={store}>\n {SIP_EXTEN && SIP_EXTEN.trim() !== '' ? (\n // Full stack with WebRTC when SIP extension is provided\n <WebRTC\n hostName={HOST_NAME}\n sipExten={SIP_EXTEN}\n sipSecret={SIP_SECRET}\n sipHost={SIP_HOST}\n sipPort={SIP_PORT}\n reload={reload}\n reloadedCallback={() => setReloadedWebRTC(true)}\n uaType={uaType}\n >\n <RestAPI hostName={HOST_NAME} username={USERNAME} authToken={AUTH_TOKEN}>\n <Socket\n hostName={HOST_NAME}\n username={USERNAME}\n authToken={AUTH_TOKEN}\n reload={reload}\n reloadedCallback={() => setReloadedSocket(true)}\n uaType={uaType}\n >\n <Events sipHost={SIP_HOST}>\n <Island showAlways={showAlways} uaType={uaType} />\n </Events>\n </Socket>\n </RestAPI>\n </WebRTC>\n ) : (\n // Minimal stack without WebRTC when no SIP extension\n <RestAPI hostName={HOST_NAME} username={USERNAME} authToken={AUTH_TOKEN}>\n <Socket\n hostName={HOST_NAME}\n username={USERNAME}\n authToken={AUTH_TOKEN}\n reload={reload}\n reloadedCallback={() => {\n setReloadedSocket(true)\n setReloadedWebRTC(true)\n }}\n uaType={uaType}\n >\n <Events sipHost={SIP_HOST}>\n <Island showAlways={showAlways} uaType={uaType} />\n </Events>\n </Socket>\n </RestAPI>\n )}\n </Provider>\n </>\n )\n})\n\nPhoneIslandComponent.displayName = 'PhoneIslandComponent'\n\nexport const PhoneIsland = forwardRef<PhoneIslandRef, PhoneIslandProps>(\n (props, ref) => <PhoneIslandComponent {...props} ref={ref} />,\n)\n\nPhoneIsland.displayName = 'PhoneIsland'\n"],"names":["PhoneIslandComponent","forwardRef","_a","ref","dataConfig","_b","showAlways","uaType","_c","urlParamWithEvent","CONFIG","Base64","atob","split","HOST_NAME","USERNAME","AUTH_TOKEN","SIP_EXTEN","SIP_SECRET","SIP_HOST","SIP_PORT","_d","useState","reload","setReload","_e","reloadedWebRTC","setReloadedWebRTC","_f","reloadedSocket","setReloadedSocket","lastReloadTime","useRef","useImperativeHandle","reset","console","info","useEffect","lastActiveTime","Date","now","handleVisibilityChange","document","hidden","timeSinceLastActive","setTimeout","eventDispatch","worker","Worker","wakeUpWorker","type","onmessage","event","data","addEventListener","terminate","removeEventListener","checkInterval","setInterval","store","getState","alerts","isWebRTCDown","webrtc_down","active","isSocketDown","socket_down","timeSinceLastReload","current","sipcall","webrtc","currentCall","accepted","outgoing","iceState","webrtcStuff","pc","iceConnectionState","hasActiveCall","isOnline","navigator","onLine","Math","round","clearInterval","useEventListener","dispatch","island","toggleIsOpen","setIslandView","view","warn","player","emergencyStopAudioPlayer","log","detach","force","setForceReload","__awaiter","targetDeviceId","deviceId","isAudioInputDeviceAvailable","sent","getDefaultAudioInputDevice","setJSONItem","concat","isVideoInputDeviceAvailable","getDefaultVideoInputDevice","_g","firstRender","setFirstRender","_h","firstAudioOutputInit","setFirstAudioOutputInit","initI18n","getParamUrl","paramUrlResponse","url","isValid","trim","paramUrl","setParamUrl","onlyQueues","only_queues","hasValidUrl","error","error_1","mediaDevices","enumerateDevices","devices","filter","device","kind","some","err_3","audioInputDevices","defaultDevice","find","err_4","err_5","videoInputDevices","err_6","remoteAudioElement","remoteAudio","err_1","audioOutputDevices","err_2","setSinkId","err_7","audioContext_1","window","AudioContext","webkitAudioContext","oscillator_1","createOscillator","gainNode","createGain","frequency","setValueAtTime","currentTime","gain","connect","destination","createMediaStreamDestination","srcObject","stream","start","stop","close","finalErr_1","defaultErr_2","streamErr_1","defaultErr_1","changeOperatorStatus","viewType","defaultAudioOutputDevice","getJSONItem","checkDarkTheme","theme","setTheme","selectedTheme","currentUser","updateCurrentDefaultDevice","deviceInformationObject","alertType","setAlert","toString","ringtoneList","ringtones","availableRingtones","map","r","name","displayName","base64Audio","value","setSelectedRingtone","setOutputDeviceId","savedRingtone","savedOutputDevice","checkInternetConnection","then","internetIsActive","intervalId","currentUsernameInformation","username","currentUserObject","mainPresenceValueBeforeUpdate","mainPresence","undefined","isEmpty","newMainPresenceValue","updateMainPresence","callInformation","openParameterizedUrl","callerNum","callerName","called","uniqueId","paramUrlInfo","urlOpened","openParamUrlType","processedUrl","includes","replace","encodeURIComponent","formattedUrl","startsWith","newWindow","open","location","href","setUrlOpened","throughTrunk","isFromTrunk","counterpartNum","setThroughTrunk","direction","throughQueue","counterpartName","owner","userInformation","allUsersInformation","users","phoneIslandInformation","webrtcInformation","playerInformation","conferenceInformation","conference","streamingInformation","streaming","paramurl","downloadStoresAsJSON","toggleSideViewVisible","toggleTranscriptionViewVisible","incoming","incomingWebRTC","incomingSocket","length","featureCodes","audioTestCode","audio_test","codeToCall","callNumber","newState","transcriptionViewIsVisible","args","sideViewIsVisible","actionsExpanded","sizeInformation","updatedSizeInformation","__assign","right","top","isBackCallActive","bottomTranscription","sizes","width","height","handleResetIslandStore","toggleConferenceList","alertRemovedType","activeAlertsCount","status","previousView","isActive","alertsData","isInCall","conversationId","Object","keys","conversations","conv","connected","calculatedThroughTrunk","React","createElement","Fragment","Provider","WebRTC","hostName","sipExten","sipSecret","sipHost","sipPort","reloadedCallback","RestAPI","authToken","Socket","Events","Island","PhoneIsland","props"],"mappings":"6qDAmCMA,EAAuBC,EAAUA,YACrC,SACEC,EAMAC,GALE,IAAAC,eACAC,EAAAH,EAAAI,WAAAA,cAAkBD,EAClBE,WACAC,EAAAN,EAAAO,kBAAAA,OAAiB,IAAAD,GAAQA,EAIrBE,EAAmBC,EAAMA,OAACC,KAAKR,GAAc,IAAIS,MAAM,KACvDC,EAAoBJ,EAAO,GAC3BK,EAAmBL,EAAO,GAC1BM,EAAqBN,EAAO,GAC5BO,EAAoBP,EAAO,GAC3BQ,EAAqBR,EAAO,GAC5BS,EAAmBT,EAAO,GAC1BU,EAAmBV,EAAO,GAG1BW,EAAsBC,EAAAA,UAAkB,GAAvCC,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAClBI,EAAsCH,EAAAA,UAAkB,GAAvDI,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAAsCN,E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W5R,EACX6R,QAAS5R,EACT6R,QAAS5R,EACTG,OAAQA,EACR0R,iBAAkB,WAAM,OAAAtR,GAAkB,IAC1CpB,OAAQA,GAERgS,UAAAC,cAACU,EAAOA,QAAA,CAACN,SAAU9R,EAAW+L,SAAU9L,EAAUoS,UAAWnS,GAC3DuR,UAAAC,cAACY,EAAAA,OAAM,CACLR,SAAU9R,EACV+L,SAAU9L,EACVoS,UAAWnS,EACXO,OAAQA,EACR0R,iBAAkB,WAAM,OAAAnR,GAAkB,EAAlB,EACxBvB,OAAQA,GAERgS,EAAAA,QAAAC,cAACa,EAAAA,OAAM,CAACN,QAAS5R,GACfoR,UAAAC,cAACc,EAAMA,OAAC,CAAAhT,WAAYA,EAAYC,OAAQA,QAOhDgS,UAAAC,cAACU,EAAOA,QAAA,CAACN,SAAU9R,EAAW+L,SAAU9L,EAAUoS,UAAWnS,GAC3DuR,EAAAA,QAAAC,cAACY,EAAAA,OACC,CAAAR,SAAU9R,EACV+L,SAAU9L,EACVoS,UAAWnS,EACXO,OAAQA,EACR0R,iBAAkB,WAChBnR,GAAkB,GAClBH,GAAkB,IAEpBpB,OAAQA,GAERgS,EAAAA,QAAAC,cAACa,EAAAA,OAAM,CAACN,QAAS5R,GACfoR,EAAAA,QAAAC,cAACc,SAAO,CAAAhT,WAAYA,EAAYC,OAAQA,QAQxD,IAEAP,EAAqBiM,YAAc,uBAEtB,IAAAsH,EAActT,EAAUA,YACnC,SAACuT,EAAOrT,GAAQ,OAAAoS,wBAACvS,EAAoB+Q,EAAAA,SAAA,CAAA,EAAKyC,EAAK,CAAErT,IAAKA,QAGxDoT,EAAYtH,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../memoize/dist/emotion-memoize.esm.js"),t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=e.default((function(e){return t.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));exports.default=r;
2
+ //# sourceMappingURL=emotion-is-prop-valid.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emotion-is-prop-valid.esm.js","sources":["../../../../../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"],"sourcesContent":["import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n"],"names":["reactPropsRegex","isPropValid","memoize","prop","test","charCodeAt"],"mappings":"+HAGIA,EAAkB,gjIAElBC,EAA6BC,EAAAA,SAAQ,SAAUC,GACjD,OAAOH,EAAgBI,KAAKD,IAAgC,MAAvBA,EAAKE,WAAW,IAE3B,MAAvBF,EAAKE,WAAW,IAEhBF,EAAKE,WAAW,GAAK,EAC1B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emotion-memoize.esm.js","sources":["../../../../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"],"sourcesContent":["function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n"],"names":["fn","cache","Object","create","arg","undefined"],"mappings":"oFAAA,SAAiBA,GACf,IAAIC,EAAQC,OAAOC,OAAO,MAC1B,OAAO,SAAUC,GAEf,YADmBC,IAAfJ,EAAMG,KAAoBH,EAAMG,GAAOJ,EAAGI,IACvCH,EAAMG,GAEjB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../react-is/index.js");var e=require("react"),t=require("../../@emotion/stylis/dist/stylis.browser.esm.js"),n=require("../../@emotion/unitless/dist/unitless.cjs.js"),r=require("../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"),o=require("../../hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),s=require("../../../_virtual/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function u(){return(u=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}).apply(this,arguments)}var c=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},l=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!s.exports.typeOf(e)},d=Object.freeze([]),p=Object.freeze({});function h(e){return"function"==typeof e}function f(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function m(e){return e&&"string"==typeof e.styledComponentId}var y="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",v="undefined"!=typeof window&&"HTMLElement"in window,g=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),S="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function w(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(w.apply(void 0,[S[e]].concat(n)).trim())}var E=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&b(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,u=t.length;a<u;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),_=new Map,C=new Map,N=1,A=function(e){if(_.has(e))return _.get(e);for(;C.has(N);)N++;var t=N++;return"production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&b(16,""+t),_.set(e,t),C.set(t,e),t},I=function(e){return C.get(e)},P=function(e,t){t>=N&&(N=t+1),_.set(e,t),C.set(t,e)},R="style["+y+'][data-styled-version="5.3.6"]',j=new RegExp("^"+y+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),D=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},O=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(j);if(a){var u=0|parseInt(a[1],10),c=a[2];0!==u&&(P(c,u),D(e,c,a[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(i)}}},x=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(y))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(y,"active"),r.setAttribute("data-styled-version","5.3.6");var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},T=function(){function e(e){var t=this.element=x(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}b(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),k=function(){function e(e){var t=this.element=x(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),V=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),z=v,B={isServer:!v,useCSSOMInjection:!g},q=function(){function e(e,t,n){void 0===e&&(e=p),void 0===t&&(t={}),this.options=u({},B,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&v&&z&&(z=!1,function(e){for(var t=document.querySelectorAll(R),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(y)&&(O(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return A(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(u({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new V(o):r?new T(o):new k(o),new E(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(A(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(A(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(A(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=I(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var u=y+".g"+o+'[id="'+s+'"]',c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+a+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),F=/(a)(d)/gi,L=function(e){return String.fromCharCode(e+(e>25?39:97))};function M(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=L(t%52)+n;return(L(t%52)+n).replace(F,"$1-$2")}var G=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return G(5381,e)};var $=Y("5.3.6"),H=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(h(n)&&!m(n))return!1}return!0}(e),this.componentId=t,this.baseHash=G($,t),this.baseStyle=n,q.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=ie(this.rules,e,t,n).join(""),i=M(G(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var u=this.rules.length,c=G(this.baseHash,n.hash),l="",d=0;d<u;d++){var p=this.rules[d];if("string"==typeof p)l+=p,"production"!==process.env.NODE_ENV&&(c=G(c,p+d));else if(p){var h=ie(p,e,t,n),f=Array.isArray(h)?h.join(""):h;c=G(c,f+d),l+=f}}if(l){var m=M(c>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(" ")},e}(),U=/^\s*\/\/.*$/gm,W=[":","[",".","#"];var Z=a.default.createContext();Z.Consumer;var J=a.default.createContext(),X=(J.Consumer,new q),K=function(e){var n,r,o,s,i=void 0===e?p:e,a=i.options,u=void 0===a?p:a,c=i.plugins,l=void 0===c?d:c,h=new t.default(u),f=[],m=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,s,i,a,u,c,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),y=function(e,t,o){return 0===t&&-1!==W.indexOf(o[r.length])||o.match(s)?e:"."+n};function v(e,t,i,a){void 0===a&&(a="&");var u=e.replace(U,""),c=t&&i?i+" "+t+" { "+u+" }":u;return n=a,r=t,o=new RegExp("\\"+r+"\\b","g"),s=new RegExp("(\\"+r+"\\b){2,}"),h(i||!t?"":t,c)}return h.use([].concat(l,[function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(r)>0&&(n[0]=n[0].replace(o,y))},m,function(e){if(-2===e){var t=f;return f=[],t}}])),v.hash=l.length?l.reduce((function(e,t){return t.name||b(15),G(e,t.name)}),5381).toString():"",v}();var Q=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=K);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return b(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=K),this.name+e.hash},e}(),ee=/([A-Z])/,te=/([A-Z])/g,ne=/^ms-/,re=function(e){return"-"+e.toLowerCase()};function oe(e){return ee.test(e)?e.replace(te,re).replace(ne,"-ms-"):e}var se=function(e){return null==e||!1===e||""===e};function ie(e,t,r,o){if(Array.isArray(e)){for(var i,a=[],u=0,c=e.length;u<c;u+=1)""!==(i=ie(e[u],t,r,o))&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));return a}if(se(e))return"";if(m(e))return"."+e.styledComponentId;if(h(e)){if("function"!=typeof(p=e)||p.prototype&&p.prototype.isReactComponent||!t)return e;var d=e(t);return"production"!==process.env.NODE_ENV&&s.exports.isElement(d)&&console.warn(f(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),ie(d,t,r,o)}var p;return e instanceof Q?r?(e.inject(r,o),e.getName(o)):e:l(e)?function e(t,r){var o,s,i=[];for(var a in t)t.hasOwnProperty(a)&&!se(t[a])&&(Array.isArray(t[a])&&t[a].isCss||h(t[a])?i.push(oe(a)+":",t[a],";"):l(t[a])?i.push.apply(i,e(t[a],a)):i.push(oe(a)+": "+(o=a,(null==(s=t[a])||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in n.default?String(s).trim():s+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString()}var ae=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ue(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return h(e)||l(e)?ae(ie(c(d,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ae(ie(c(e,n)))}var ce=/invalid hook call/i,le=new Set,de=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,pe=/(^-|-$)/g;function he(e){return e.replace(de,"-").replace(pe,"")}function fe(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var me=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ye=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ve(e,t,n){var r=e[n];me(t)&&me(r)?ge(r,t):e[n]=t}function ge(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(me(i))for(var a in i)ye(a)&&ve(e,i[a],a)}return e}var Se=a.default.createContext();Se.Consumer;var we={};function be(t,n,s){var i=m(t),c=!fe(t),l=n.attrs,y=void 0===l?d:l,v=n.componentId,g=void 0===v?function(e,t){var n="string"!=typeof e?"sc":he(e);we[n]=(we[n]||0)+1;var r=n+"-"+function(e){return M(Y(e)>>>0)}("5.3.6"+n+we[n]);return t?t+"-"+r:r}(n.displayName,n.parentComponentId):v,S=n.displayName,w=void 0===S?function(e){return fe(e)?"styled."+e:"Styled("+f(e)+")"}(t):S,b=n.displayName&&n.componentId?he(n.displayName)+"-"+n.componentId:n.componentId||g,E=i&&t.attrs?Array.prototype.concat(t.attrs,y).filter(Boolean):y,_=n.shouldForwardProp;i&&t.shouldForwardProp&&(_=n.shouldForwardProp?function(e,r,o){return t.shouldForwardProp(e,r,o)&&n.shouldForwardProp(e,r,o)}:t.shouldForwardProp);var C,N=new H(s,b,i?t.componentStyle:void 0),A=N.isStatic&&0===y.length,I=function(t,n){return function(t,n,o,s){var i=t.attrs,a=t.componentStyle,c=t.defaultProps,l=t.foldedComponentIds,d=t.shouldForwardProp,f=t.styledComponentId,m=t.target;"production"!==process.env.NODE_ENV&&e.useDebugValue(f);var y=function(e,t,n){void 0===e&&(e=p);var r=u({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in h(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t]})),[r,o]}(function(e,t,n){return void 0===n&&(n=p),e.theme!==n.theme&&e.theme||t||n.theme}(n,e.useContext(Se),c)||p,n,i),v=y[0],g=y[1],S=function(t,n,r,o){var s=e.useContext(Z)||X,i=e.useContext(J)||K,a=n?t.generateAndInjectStyles(p,s,i):t.generateAndInjectStyles(r,s,i);return"production"!==process.env.NODE_ENV&&e.useDebugValue(a),"production"!==process.env.NODE_ENV&&!n&&o&&o(a),a}(a,s,v,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),w=o,b=g.$as||n.$as||g.as||n.as||m,E=fe(b),_=g!==n?u({},n,{},g):n,C={};for(var N in _)"$"!==N[0]&&"as"!==N&&("forwardedAs"===N?C.as=_[N]:(d?d(N,r.default,b):!E||r.default(N))&&(C[N]=_[N]));return n.style&&g.style!==n.style&&(C.style=u({},n.style,{},g.style)),C.className=Array.prototype.concat(l,f,S!==f?S:null,n.className,g.className).filter(Boolean).join(" "),C.ref=w,e.createElement(b,C)}(C,t,n,A)};return I.displayName=w,(C=a.default.forwardRef(I)).attrs=E,C.componentStyle=N,C.displayName=w,C.shouldForwardProp=_,C.foldedComponentIds=i?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):d,C.styledComponentId=b,C.target=i?t.target:t,C.withComponent=function(e){var t=n.componentId,r=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(n,["componentId"]),o=t&&t+"-"+(fe(e)?e:he(f(e)));return be(e,u({},r,{attrs:E,componentId:o}),s)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?ge({},t.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(function(t,n){if("production"!==process.env.NODE_ENV){var r="The component "+t+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",o=console.error;try{var s=!0;console.error=function(e){if(ce.test(e))s=!1,le.delete(r);else{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.apply(void 0,[e].concat(n))}},e.useRef(),s&&!le.has(r)&&(console.warn(r),le.add(r))}catch(t){ce.test(t.message)&&le.delete(r)}finally{console.error=o}}}(w,b),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+s+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(w,b)),C.toString=function(){return"."+C.styledComponentId},c&&o.default(C,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var Ee=function(e){return function e(t,n,r){if(void 0===r&&(r=p),!s.exports.isValidElementType(n))return b(1,String(n));var o=function(){return t(n,r,ue.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,u({},r,{},o))},o.attrs=function(o){return e(t,n,u({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(be,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ee[e]=Ee(e)})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1),exports.StyleSheetContext=Z,exports.ThemeContext=Se,exports.css=ue,exports.default=Ee,exports.isStyledComponent=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../react-is/index.js");var e=require("react"),t=require("../../@emotion/stylis/dist/stylis.browser.esm.js"),n=require("../../@emotion/unitless/dist/unitless.cjs.js"),r=require("../../@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"),o=require("../../hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),s=require("../../../_virtual/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function u(){return(u=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}).apply(this,arguments)}var c=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},l=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!s.exports.typeOf(e)},d=Object.freeze([]),p=Object.freeze({});function h(e){return"function"==typeof e}function f(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function m(e){return e&&"string"==typeof e.styledComponentId}var y="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",v="undefined"!=typeof window&&"HTMLElement"in window,g=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV)),S="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function w(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(w.apply(void 0,[S[e]].concat(n)).trim())}var E=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&b(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,u=t.length;a<u;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),_=new Map,C=new Map,A=1,N=function(e){if(_.has(e))return _.get(e);for(;C.has(A);)A++;var t=A++;return"production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&b(16,""+t),_.set(e,t),C.set(t,e),t},I=function(e){return C.get(e)},P=function(e,t){t>=A&&(A=t+1),_.set(e,t),C.set(t,e)},j="style["+y+'][data-styled-version="5.3.11"]',R=new RegExp("^"+y+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),x=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},O=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(R);if(a){var u=0|parseInt(a[1],10),c=a[2];0!==u&&(P(c,u),x(e,c,a[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(i)}}},D=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(y))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(y,"active"),r.setAttribute("data-styled-version","5.3.11");var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},T=function(){function e(e){var t=this.element=D(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}b(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),k=function(){function e(e){var t=this.element=D(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),z=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),B=v,V={isServer:!v,useCSSOMInjection:!g},q=function(){function e(e,t,n){void 0===e&&(e=p),void 0===t&&(t={}),this.options=u({},V,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&v&&B&&(B=!1,function(e){for(var t=document.querySelectorAll(j),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(y)&&(O(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return N(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(u({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new z(o):r?new T(o):new k(o),new E(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(N(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(N(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(N(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=I(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var u=y+".g"+o+'[id="'+s+'"]',c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+a+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),F=/(a)(d)/gi,L=function(e){return String.fromCharCode(e+(e>25?39:97))};function M(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=L(t%52)+n;return(L(t%52)+n).replace(F,"$1-$2")}var G=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return G(5381,e)};var $=Y("5.3.11"),H=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(h(n)&&!m(n))return!1}return!0}(e),this.componentId=t,this.baseHash=G($,t),this.baseStyle=n,q.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=ie(this.rules,e,t,n).join(""),i=M(G(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var u=this.rules.length,c=G(this.baseHash,n.hash),l="",d=0;d<u;d++){var p=this.rules[d];if("string"==typeof p)l+=p,"production"!==process.env.NODE_ENV&&(c=G(c,p+d));else if(p){var h=ie(p,e,t,n),f=Array.isArray(h)?h.join(""):h;c=G(c,f+d),l+=f}}if(l){var m=M(c>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(" ")},e}(),U=/^\s*\/\/.*$/gm,W=[":","[",".","#"];var Z=a.default.createContext();Z.Consumer;var J=a.default.createContext(),X=(J.Consumer,new q),K=function(e){var n,r,o,s,i=void 0===e?p:e,a=i.options,u=void 0===a?p:a,c=i.plugins,l=void 0===c?d:c,h=new t.default(u),f=[],m=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,s,i,a,u,c,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),y=function(e,t,o){return 0===t&&-1!==W.indexOf(o[r.length])||o.match(s)?e:"."+n};function v(e,t,i,a){void 0===a&&(a="&");var u=e.replace(U,""),c=t&&i?i+" "+t+" { "+u+" }":u;return n=a,r=t,o=new RegExp("\\"+r+"\\b","g"),s=new RegExp("(\\"+r+"\\b){2,}"),h(i||!t?"":t,c)}return h.use([].concat(l,[function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(r)>0&&(n[0]=n[0].replace(o,y))},m,function(e){if(-2===e){var t=f;return f=[],t}}])),v.hash=l.length?l.reduce((function(e,t){return t.name||b(15),G(e,t.name)}),5381).toString():"",v}();var Q=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=K);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return b(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=K),this.name+e.hash},e}(),ee=/([A-Z])/,te=/([A-Z])/g,ne=/^ms-/,re=function(e){return"-"+e.toLowerCase()};function oe(e){return ee.test(e)?e.replace(te,re).replace(ne,"-ms-"):e}var se=function(e){return null==e||!1===e||""===e};function ie(e,t,r,o){if(Array.isArray(e)){for(var i,a=[],u=0,c=e.length;u<c;u+=1)""!==(i=ie(e[u],t,r,o))&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));return a}if(se(e))return"";if(m(e))return"."+e.styledComponentId;if(h(e)){if("function"!=typeof(p=e)||p.prototype&&p.prototype.isReactComponent||!t)return e;var d=e(t);return"production"!==process.env.NODE_ENV&&s.exports.isElement(d)&&console.warn(f(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),ie(d,t,r,o)}var p;return e instanceof Q?r?(e.inject(r,o),e.getName(o)):e:l(e)?function e(t,r){var o,s,i=[];for(var a in t)t.hasOwnProperty(a)&&!se(t[a])&&(Array.isArray(t[a])&&t[a].isCss||h(t[a])?i.push(oe(a)+":",t[a],";"):l(t[a])?i.push.apply(i,e(t[a],a)):i.push(oe(a)+": "+(o=a,(null==(s=t[a])||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in n.default||o.startsWith("--")?String(s).trim():s+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString()}var ae=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ue(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return h(e)||l(e)?ae(ie(c(d,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ae(ie(c(e,n)))}var ce=/invalid hook call/i,le=new Set,de=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,pe=/(^-|-$)/g;function he(e){return e.replace(de,"-").replace(pe,"")}function fe(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var me=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ye=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ve(e,t,n){var r=e[n];me(t)&&me(r)?ge(r,t):e[n]=t}function ge(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(me(i))for(var a in i)ye(a)&&ve(e,i[a],a)}return e}var Se=a.default.createContext();Se.Consumer;var we={};function be(t,n,s){var i=m(t),c=!fe(t),l=n.attrs,y=void 0===l?d:l,v=n.componentId,g=void 0===v?function(e,t){var n="string"!=typeof e?"sc":he(e);we[n]=(we[n]||0)+1;var r=n+"-"+function(e){return M(Y(e)>>>0)}("5.3.11"+n+we[n]);return t?t+"-"+r:r}(n.displayName,n.parentComponentId):v,S=n.displayName,w=void 0===S?function(e){return fe(e)?"styled."+e:"Styled("+f(e)+")"}(t):S,b=n.displayName&&n.componentId?he(n.displayName)+"-"+n.componentId:n.componentId||g,E=i&&t.attrs?Array.prototype.concat(t.attrs,y).filter(Boolean):y,_=n.shouldForwardProp;i&&t.shouldForwardProp&&(_=n.shouldForwardProp?function(e,r,o){return t.shouldForwardProp(e,r,o)&&n.shouldForwardProp(e,r,o)}:t.shouldForwardProp);var C,A=new H(s,b,i?t.componentStyle:void 0),N=A.isStatic&&0===y.length,I=function(t,n){return function(t,n,o,s){var i=t.attrs,a=t.componentStyle,c=t.defaultProps,l=t.foldedComponentIds,d=t.shouldForwardProp,f=t.styledComponentId,m=t.target,y=function(e,t,n){void 0===e&&(e=p);var r=u({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in h(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t]})),[r,o]}(function(e,t,n){return void 0===n&&(n=p),e.theme!==n.theme&&e.theme||t||n.theme}(n,e.useContext(Se),c)||p,n,i),v=y[0],g=y[1],S=function(t,n,r,o){var s=e.useContext(Z)||X,i=e.useContext(J)||K,a=n?t.generateAndInjectStyles(p,s,i):t.generateAndInjectStyles(r,s,i);return"production"!==process.env.NODE_ENV&&!n&&o&&o(a),a}(a,s,v,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),w=o,b=g.$as||n.$as||g.as||n.as||m,E=fe(b),_=g!==n?u({},n,{},g):n,C={};for(var A in _)"$"!==A[0]&&"as"!==A&&("forwardedAs"===A?C.as=_[A]:(d?d(A,r.default,b):!E||r.default(A))&&(C[A]=_[A]));return n.style&&g.style!==n.style&&(C.style=u({},n.style,{},g.style)),C.className=Array.prototype.concat(l,f,S!==f?S:null,n.className,g.className).filter(Boolean).join(" "),C.ref=w,e.createElement(b,C)}(C,t,n,N)};return I.displayName=w,(C=a.default.forwardRef(I)).attrs=E,C.componentStyle=A,C.displayName=w,C.shouldForwardProp=_,C.foldedComponentIds=i?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):d,C.styledComponentId=b,C.target=i?t.target:t,C.withComponent=function(e){var t=n.componentId,r=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(n,["componentId"]),o=t&&t+"-"+(fe(e)?e:he(f(e)));return be(e,u({},r,{attrs:E,componentId:o}),s)},Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?ge({},t.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(function(t,n){if("production"!==process.env.NODE_ENV){var r="The component "+t+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",o=console.error;try{var s=!0;console.error=function(e){if(ce.test(e))s=!1,le.delete(r);else{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.apply(void 0,[e].concat(n))}},e.useRef(),s&&!le.has(r)&&(console.warn(r),le.add(r))}catch(t){ce.test(t.message)&&le.delete(r)}finally{console.error=o}}}(w,b),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+s+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(w,b)),Object.defineProperty(C,"toString",{value:function(){return"."+C.styledComponentId}}),c&&o.default(C,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var Ee=function(e){return function e(t,n,r){if(void 0===r&&(r=p),!s.exports.isValidElementType(n))return b(1,String(n));var o=function(){return t(n,r,ue.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,u({},r,{},o))},o.attrs=function(o){return e(t,n,u({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(be,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ee[e]=Ee(e)})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1),exports.StyleSheetContext=Z,exports.ThemeContext=Se,exports.css=ue,exports.default=Ee,exports.isStyledComponent=m;
2
2
  //# sourceMappingURL=styled-components.browser.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled-components.browser.esm.js","sources":["../../../../node_modules/styled-components/dist/styled-components.browser.esm.js"],"sourcesContent":["import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useDebugValue as l,useLayoutEffect as d}from\"react\";import h from\"shallowequal\";import p from\"@emotion/stylis\";import f from\"@emotion/unitless\";import m from\"@emotion/is-prop-valid\";import y from\"hoist-non-react-statics\";function v(){return(v=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}).apply(this,arguments)}var g=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},S=function(t){return null!==t&&\"object\"==typeof t&&\"[object Object]\"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!e(t)},w=Object.freeze([]),E=Object.freeze({});function b(e){return\"function\"==typeof e}function _(e){return\"production\"!==process.env.NODE_ENV&&\"string\"==typeof e&&e||e.displayName||e.name||\"Component\"}function N(e){return e&&\"string\"==typeof e.styledComponentId}var A=\"undefined\"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||\"data-styled\",C=\"5.3.6\",I=\"undefined\"!=typeof window&&\"HTMLElement\"in window,P=Boolean(\"boolean\"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&\"\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY?\"false\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&\"\"!==process.env.SC_DISABLE_SPEEDY?\"false\"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:\"production\"!==process.env.NODE_ENV),O={},R=\"production\"!==process.env.NODE_ENV?{1:\"Cannot create styled-component for component: %s.\\n\\n\",2:\"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",3:\"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",4:\"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n\",5:\"The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n\",6:\"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",7:'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document `<head>`\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function D(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw\"production\"===process.env.NODE_ENV?new Error(\"An error occurred. See https://git.io/JUIaE#\"+e+\" for more information.\"+(n.length>0?\" Args: \"+n.join(\", \"):\"\")):new Error(D.apply(void 0,[R[e]].concat(n)).trim())}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t=\"\";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+\"/*!sc*/\\n\";return t},e}(),x=new Map,k=new Map,V=1,B=function(e){if(x.has(e))return x.get(e);for(;k.has(V);)V++;var t=V++;return\"production\"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&j(16,\"\"+t),x.set(e,t),k.set(t,e),t},z=function(e){return k.get(e)},M=function(e,t){t>=V&&(V=t+1),x.set(e,t),k.set(t,e)},G=\"style[\"+A+'][data-styled-version=\"5.3.6\"]',L=new RegExp(\"^\"+A+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),F=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},Y=function(e,t){for(var n=(t.textContent||\"\").split(\"/*!sc*/\\n\"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(L);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(M(u,c),F(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},q=function(){return\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:null},H=function(e){var t=document.head,n=e||t,r=document.createElement(\"style\"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(A,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.6\");var i=q();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},$=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}j(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&\"string\"==typeof t.cssText?t.cssText:\"\"},e}(),W=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:\"\"},e}(),U=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:\"\"},e}(),J=I,X={isServer:!I,useCSSOMInjection:!P},Z=function(){function e(e,t,n){void 0===e&&(e=E),void 0===t&&(t={}),this.options=v({},X,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&I&&J&&(J=!1,function(e){for(var t=document.querySelectorAll(G),n=0,r=t.length;n<r;n++){var o=t[n];o&&\"active\"!==o.getAttribute(A)&&(Y(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return B(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(v({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new U(o):r?new $(o):new W(o),new T(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(B(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(B(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(B(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r=\"\",o=0;o<n;o++){var s=z(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=A+\".g\"+o+'[id=\"'+s+'\"]',u=\"\";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),K=/(a)(d)/gi,Q=function(e){return String.fromCharCode(e+(e>25?39:97))};function ee(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=Q(t%52)+n;return(Q(t%52)+n).replace(K,\"$1-$2\")}var te=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ne=function(e){return te(5381,e)};function re(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(b(n)&&!N(n))return!1}return!0}var oe=ne(\"5.3.6\"),se=function(){function e(e,t,n){this.rules=e,this.staticRulesId=\"\",this.isStatic=\"production\"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&re(e),this.componentId=t,this.baseHash=te(oe,t),this.baseStyle=n,Z.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=Ne(this.rules,e,t,n).join(\"\"),i=ee(te(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=te(this.baseHash,n.hash),l=\"\",d=0;d<c;d++){var h=this.rules[d];if(\"string\"==typeof h)l+=h,\"production\"!==process.env.NODE_ENV&&(u=te(u,h+d));else if(h){var p=Ne(h,e,t,n),f=Array.isArray(p)?p.join(\"\"):p;u=te(u,f+d),l+=f}}if(l){var m=ee(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),ie=/^\\s*\\/\\/.*$/gm,ae=[\":\",\"[\",\".\",\"#\"];function ce(e){var t,n,r,o,s=void 0===e?E:e,i=s.options,a=void 0===i?E:i,c=s.plugins,u=void 0===c?w:c,l=new p(a),d=[],h=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ae.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(ie,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),te(e,t.name)}),5381).toString():\"\",m}var ue=r.createContext(),le=ue.Consumer,de=r.createContext(),he=(de.Consumer,new Z),pe=ce();function fe(){return s(ue)||he}function me(){return s(de)||pe}function ye(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=fe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ce({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){h(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ue.Provider,{value:u},r.createElement(de.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=pe),this.name+e.hash},e}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(e){return\"-\"+e.toLowerCase()};function be(e){return ge.test(e)?e.replace(Se,Ee).replace(we,\"-ms-\"):e}var _e=function(e){return null==e||!1===e||\"\"===e};function Ne(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)\"\"!==(s=Ne(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}if(_e(e))return\"\";if(N(e))return\".\"+e.styledComponentId;if(b(e)){if(\"function\"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n)return e;var u=e(n);return\"production\"!==process.env.NODE_ENV&&t(u)&&console.warn(_(e)+\" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\"),Ne(u,n,r,o)}var l;return e instanceof ve?r?(e.inject(r,o),e.getName(o)):e:S(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!_e(t[i])&&(Array.isArray(t[i])&&t[i].isCss||b(t[i])?s.push(be(i)+\":\",t[i],\";\"):S(t[i])?s.push.apply(s,e(t[i],i)):s.push(be(i)+\": \"+(r=i,null==(o=t[i])||\"boolean\"==typeof o||\"\"===o?\"\":\"number\"!=typeof o||0===o||r in f?String(o).trim():o+\"px\")+\";\"));return n?[n+\" {\"].concat(s,[\"}\"]):s}(e):e.toString()}var Ae=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return b(e)||S(e)?Ae(Ne(g(w,[e].concat(n)))):0===n.length&&1===e.length&&\"string\"==typeof e[0]?e:Ae(Ne(g(e,n)))}var Ie=/invalid hook call/i,Pe=new Set,Oe=function(e,t){if(\"production\"!==process.env.NODE_ENV){var n=\"The component \"+e+(t?' with the id of \"'+t+'\"':\"\")+\" has been created dynamically.\\nYou may see this warning because you've called styled inside another component.\\nTo resolve this only create new StyledComponents outside of any render method and function component.\",r=console.error;try{var o=!0;console.error=function(e){if(Ie.test(e))o=!1,Pe.delete(n);else{for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];r.apply(void 0,[e].concat(s))}},c(),o&&!Pe.has(n)&&(console.warn(n),Pe.add(n))}catch(e){Ie.test(e.message)&&Pe.delete(n)}finally{console.error=r}}},Re=function(e,t,n){return void 0===n&&(n=E),e.theme!==n.theme&&e.theme||t||n.theme},De=/[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(e){return e.replace(De,\"-\").replace(je,\"\")}var xe=function(e){return ee(ne(e)>>>0)};function ke(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Ve=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Be=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function ze(e,t,n){var r=e[n];Ve(t)&&Ve(r)?Me(r,t):e[n]=t}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(Ve(i))for(var a in i)Be(a)&&ze(e,i[a],a)}return e}var Ge=r.createContext(),Le=Ge.Consumer;function Fe(e){var t=s(Ge),n=i((function(){return function(e,t){if(!e)return j(14);if(b(e)){var n=e(t);return\"production\"===process.env.NODE_ENV||null!==n&&!Array.isArray(n)&&\"object\"==typeof n?n:j(7)}return Array.isArray(e)||\"object\"!=typeof e?j(8):t?v({},t,{},e):e}(e.theme,t)}),[e.theme,t]);return e.children?r.createElement(Ge.Provider,{value:n},e.children):null}var Ye={};function qe(e,t,n){var o=N(e),i=!ke(e),a=t.attrs,c=void 0===a?w:a,d=t.componentId,h=void 0===d?function(e,t){var n=\"string\"!=typeof e?\"sc\":Te(e);Ye[n]=(Ye[n]||0)+1;var r=n+\"-\"+xe(\"5.3.6\"+n+Ye[n]);return t?t+\"-\"+r:r}(t.displayName,t.parentComponentId):d,p=t.displayName,f=void 0===p?function(e){return ke(e)?\"styled.\"+e:\"Styled(\"+_(e)+\")\"}(e):p,g=t.displayName&&t.componentId?Te(t.displayName)+\"-\"+t.componentId:t.componentId||h,S=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,A=t.shouldForwardProp;o&&e.shouldForwardProp&&(A=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var C,I=new se(n,g,o?e.componentStyle:void 0),P=I.isStatic&&0===c.length,O=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,d=e.shouldForwardProp,h=e.styledComponentId,p=e.target;\"production\"!==process.env.NODE_ENV&&l(h);var f=function(e,t,n){void 0===e&&(e=E);var r=v({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in b(i)&&(i=i(r)),i)r[t]=o[t]=\"className\"===t?(n=o[t],s=i[t],n&&s?n+\" \"+s:n||s):i[t]})),[r,o]}(Re(t,s(Ge),a)||E,t,o),y=f[0],g=f[1],S=function(e,t,n,r){var o=fe(),s=me(),i=t?e.generateAndInjectStyles(E,o,s):e.generateAndInjectStyles(n,o,s);return\"production\"!==process.env.NODE_ENV&&l(i),\"production\"!==process.env.NODE_ENV&&!t&&r&&r(i),i}(i,r,y,\"production\"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),w=n,_=g.$as||t.$as||g.as||t.as||p,N=ke(_),A=g!==t?v({},t,{},g):t,C={};for(var I in A)\"$\"!==I[0]&&\"as\"!==I&&(\"forwardedAs\"===I?C.as=A[I]:(d?d(I,m,_):!N||m(I))&&(C[I]=A[I]));return t.style&&g.style!==t.style&&(C.style=v({},t.style,{},g.style)),C.className=Array.prototype.concat(c,h,S!==h?S:null,t.className,g.className).filter(Boolean).join(\" \"),C.ref=w,u(_,C)}(C,e,t,P)};return O.displayName=f,(C=r.forwardRef(O)).attrs=S,C.componentStyle=I,C.displayName=f,C.shouldForwardProp=A,C.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):w,C.styledComponentId=g,C.target=o?e.target:e,C.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(ke(e)?e:Te(_(e)));return qe(e,v({},o,{attrs:S,componentId:s}),n)},Object.defineProperty(C,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?Me({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Oe(f,g),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n <Component />\"),r=!0,n={}}}}(f,g)),C.toString=function(){return\".\"+C.styledComponentId},i&&y(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var He=function(e){return function e(t,r,o){if(void 0===o&&(o=E),!n(r))return j(1,String(r));var s=function(){return t(r,o,Ce.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,v({},o,{},n))},s.attrs=function(n){return e(t,r,v({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(qe,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){He[e]=He(e)}));var $e=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=re(e),Z.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(Ne(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Z.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function We(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=Ce.apply(void 0,[e].concat(n)),a=\"sc-global-\"+xe(JSON.stringify(i)),u=new $e(i,a);function l(e){var t=fe(),n=me(),o=s(Ge),l=c(t.allocateGSInstance(a)).current;return\"production\"!==process.env.NODE_ENV&&r.Children.count(e.children)&&console.warn(\"The global style component \"+a+\" was given child JSX. createGlobalStyle does not render children.\"),\"production\"!==process.env.NODE_ENV&&i.some((function(e){return\"string\"==typeof e&&-1!==e.indexOf(\"@import\")}))&&console.warn(\"Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app.\"),t.server&&h(l,e,t,o,n),d((function(){if(!t.server)return h(l,e,t,o,n),function(){return u.removeStyles(l,t)}}),[l,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,O,n,o);else{var s=v({},t,{theme:Re(t,r,l.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Oe(a),r.memo(l)}function Ue(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Ce.apply(void 0,[e].concat(n)).join(\"\"),s=xe(o);return new ve(s,o)}var Je=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return\"\";var n=q();return\"<style \"+[n&&'nonce=\"'+n+'\"',A+'=\"true\"','data-styled-version=\"5.3.6\"'].filter(Boolean).join(\" \")+\">\"+t+\"</style>\"},this.getStyleTags=function(){return e.sealed?j(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return j(2);var n=((t={})[A]=\"\",t[\"data-styled-version\"]=\"5.3.6\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=q();return o&&(n.nonce=o),[r.createElement(\"style\",v({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new Z({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?j(2):r.createElement(ye,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return j(3)},e}(),Xe=function(e){var t=r.forwardRef((function(t,n){var o=s(Ge),i=e.defaultProps,a=Re(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+_(e)+'\"'),r.createElement(e,v({},t,{theme:a,ref:n}))}));return y(t,e),t.displayName=\"WithTheme(\"+_(e)+\")\",t},Ze=function(){return s(Ge)},Ke={StyleSheet:Z,masterSheet:he};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default He;export{Je as ServerStyleSheet,le as StyleSheetConsumer,ue as StyleSheetContext,ye as StyleSheetManager,Le as ThemeConsumer,Ge as ThemeContext,Fe as ThemeProvider,Ke as __PRIVATE__,We as createGlobalStyle,Ce as css,N as isStyledComponent,Ue as keyframes,Ze as useTheme,C as version,Xe as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n"],"names":["g","e","t","n","r","o","length","push","S"],"mappings":"quBAGA,IAAAA,EAAA,SACEC,EACAC,GAAA,IAAA,IAEMC,EAAS,CAACF,EAAQ,IAEfG,EAAI,EAAGC,EAAMH,EAAeI,OAAQF,EAAIC,EAAKD,GAAK,EACzDD,EAAOI,KAAKL,EAAeE,GAAIH,EAAQG,EAAI,IAAA,OAGtCD,CAAA,EAAAK,EAAA"}
1
+ {"version":3,"file":"styled-components.browser.esm.js","sources":["../../../../node_modules/styled-components/dist/styled-components.browser.esm.js"],"sourcesContent":["import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useLayoutEffect as l}from\"react\";import d from\"shallowequal\";import h from\"@emotion/stylis\";import p from\"@emotion/unitless\";import f from\"@emotion/is-prop-valid\";import m from\"hoist-non-react-statics\";function y(){return(y=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}).apply(this,arguments)}var v=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},g=function(t){return null!==t&&\"object\"==typeof t&&\"[object Object]\"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!e(t)},S=Object.freeze([]),w=Object.freeze({});function E(e){return\"function\"==typeof e}function b(e){return\"production\"!==process.env.NODE_ENV&&\"string\"==typeof e&&e||e.displayName||e.name||\"Component\"}function _(e){return e&&\"string\"==typeof e.styledComponentId}var N=\"undefined\"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||\"data-styled\",A=\"5.3.11\",C=\"undefined\"!=typeof window&&\"HTMLElement\"in window,I=Boolean(\"boolean\"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&\"\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY?\"false\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&\"\"!==process.env.SC_DISABLE_SPEEDY?\"false\"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:\"production\"!==process.env.NODE_ENV)),P={},O=\"production\"!==process.env.NODE_ENV?{1:\"Cannot create styled-component for component: %s.\\n\\n\",2:\"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",3:\"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",4:\"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n\",5:\"The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n\",6:\"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",7:'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document `<head>`\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw\"production\"===process.env.NODE_ENV?new Error(\"An error occurred. See https://git.io/JUIaE#\"+e+\" for more information.\"+(n.length>0?\" Args: \"+n.join(\", \"):\"\")):new Error(R.apply(void 0,[O[e]].concat(n)).trim())}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t=\"\";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+\"/*!sc*/\\n\";return t},e}(),T=new Map,x=new Map,k=1,V=function(e){if(T.has(e))return T.get(e);for(;x.has(k);)k++;var t=k++;return\"production\"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&D(16,\"\"+t),T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M=\"style[\"+N+'][data-styled-version=\"5.3.11\"]',G=new RegExp(\"^\"+N+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),L=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},F=function(e,t){for(var n=(t.textContent||\"\").split(\"/*!sc*/\\n\"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(G);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(z(u,c),L(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},Y=function(){return\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:null},q=function(e){var t=document.head,n=e||t,r=document.createElement(\"style\"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.11\");var i=Y();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}D(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&\"string\"==typeof t.cssText?t.cssText:\"\"},e}(),$=function(){function e(e){var t=this.element=q(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:\"\"},e}(),W=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:\"\"},e}(),U=C,J={isServer:!C,useCSSOMInjection:!I},X=function(){function e(e,t,n){void 0===e&&(e=w),void 0===t&&(t={}),this.options=y({},J,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&C&&U&&(U=!1,function(e){for(var t=document.querySelectorAll(M),n=0,r=t.length;n<r;n++){var o=t[n];o&&\"active\"!==o.getAttribute(N)&&(F(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return V(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(y({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new W(o):r?new H(o):new $(o),new j(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(V(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(V(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(V(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r=\"\",o=0;o<n;o++){var s=B(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=N+\".g\"+o+'[id=\"'+s+'\"]',u=\"\";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,\"$1-$2\")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(E(n)&&!_(n))return!1}return!0}var re=te(\"5.3.11\"),oe=function(){function e(e,t,n){this.rules=e,this.staticRulesId=\"\",this.isStatic=\"production\"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&ne(e),this.componentId=t,this.baseHash=ee(re,t),this.baseStyle=n,X.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=_e(this.rules,e,t,n).join(\"\"),i=Q(ee(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l=\"\",d=0;d<c;d++){var h=this.rules[d];if(\"string\"==typeof h)l+=h,\"production\"!==process.env.NODE_ENV&&(u=ee(u,h+d));else if(h){var p=_e(h,e,t,n),f=Array.isArray(p)?p.join(\"\"):p;u=ee(u,f+d),l+=f}}if(l){var m=Q(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),se=/^\\s*\\/\\/.*$/gm,ie=[\":\",\"[\",\".\",\"#\"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new h(a),d=[],p=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(se,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():\"\",m}var ce=r.createContext(),ue=ce.Consumer,le=r.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return s(ce)||de}function fe(){return s(le)||he}function me(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){d(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ce.Provider,{value:u},r.createElement(le.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return\"-\"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,\"-ms-\"):e}var be=function(e){return null==e||!1===e||\"\"===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)\"\"!==(s=_e(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}if(be(e))return\"\";if(_(e))return\".\"+e.styledComponentId;if(E(e)){if(\"function\"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n)return e;var u=e(n);return\"production\"!==process.env.NODE_ENV&&t(u)&&console.warn(b(e)+\" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\"),_e(u,n,r,o)}var l;return e instanceof ye?r?(e.inject(r,o),e.getName(o)):e:g(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!be(t[i])&&(Array.isArray(t[i])&&t[i].isCss||E(t[i])?s.push(Ee(i)+\":\",t[i],\";\"):g(t[i])?s.push.apply(s,e(t[i],i)):s.push(Ee(i)+\": \"+(r=i,null==(o=t[i])||\"boolean\"==typeof o||\"\"===o?\"\":\"number\"!=typeof o||0===o||r in p||r.startsWith(\"--\")?String(o).trim():o+\"px\")+\";\"));return n?[n+\" {\"].concat(s,[\"}\"]):s}(e):e.toString()}var Ne=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return E(e)||g(e)?Ne(_e(v(S,[e].concat(n)))):0===n.length&&1===e.length&&\"string\"==typeof e[0]?e:Ne(_e(v(e,n)))}var Ce=/invalid hook call/i,Ie=new Set,Pe=function(e,t){if(\"production\"!==process.env.NODE_ENV){var n=\"The component \"+e+(t?' with the id of \"'+t+'\"':\"\")+\" has been created dynamically.\\nYou may see this warning because you've called styled inside another component.\\nTo resolve this only create new StyledComponents outside of any render method and function component.\",r=console.error;try{var o=!0;console.error=function(e){if(Ce.test(e))o=!1,Ie.delete(n);else{for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];r.apply(void 0,[e].concat(s))}},c(),o&&!Ie.has(n)&&(console.warn(n),Ie.add(n))}catch(e){Ce.test(e.message)&&Ie.delete(n)}finally{console.error=r}}},Oe=function(e,t,n){return void 0===n&&(n=w),e.theme!==n.theme&&e.theme||t||n.theme},Re=/[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,\"-\").replace(De,\"\")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var ke=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(ke(i))for(var a in i)Ve(a)&&Be(e,i[a],a)}return e}var Me=r.createContext(),Ge=Me.Consumer;function Le(e){var t=s(Me),n=i((function(){return function(e,t){if(!e)return D(14);if(E(e)){var n=e(t);return\"production\"===process.env.NODE_ENV||null!==n&&!Array.isArray(n)&&\"object\"==typeof n?n:D(7)}return Array.isArray(e)||\"object\"!=typeof e?D(8):t?y({},t,{},e):e}(e.theme,t)}),[e.theme,t]);return e.children?r.createElement(Me.Provider,{value:n},e.children):null}var Fe={};function Ye(e,t,n){var o=_(e),i=!xe(e),a=t.attrs,c=void 0===a?S:a,l=t.componentId,d=void 0===l?function(e,t){var n=\"string\"!=typeof e?\"sc\":je(e);Fe[n]=(Fe[n]||0)+1;var r=n+\"-\"+Te(\"5.3.11\"+n+Fe[n]);return t?t+\"-\"+r:r}(t.displayName,t.parentComponentId):l,h=t.displayName,p=void 0===h?function(e){return xe(e)?\"styled.\"+e:\"Styled(\"+b(e)+\")\"}(e):h,v=t.displayName&&t.componentId?je(t.displayName)+\"-\"+t.componentId:t.componentId||d,g=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,N=t.shouldForwardProp;o&&e.shouldForwardProp&&(N=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var A,C=new oe(n,v,o?e.componentStyle:void 0),I=C.isStatic&&0===c.length,P=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,h=e.target,p=function(e,t,n){void 0===e&&(e=w);var r=y({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in E(i)&&(i=i(r)),i)r[t]=o[t]=\"className\"===t?(n=o[t],s=i[t],n&&s?n+\" \"+s:n||s):i[t]})),[r,o]}(Oe(t,s(Me),a)||w,t,o),m=p[0],v=p[1],g=function(e,t,n,r){var o=pe(),s=fe(),i=t?e.generateAndInjectStyles(w,o,s):e.generateAndInjectStyles(n,o,s);return\"production\"!==process.env.NODE_ENV&&!t&&r&&r(i),i}(i,r,m,\"production\"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),S=n,b=v.$as||t.$as||v.as||t.as||h,_=xe(b),N=v!==t?y({},t,{},v):t,A={};for(var C in N)\"$\"!==C[0]&&\"as\"!==C&&(\"forwardedAs\"===C?A.as=N[C]:(l?l(C,f,b):!_||f(C))&&(A[C]=N[C]));return t.style&&v.style!==t.style&&(A.style=y({},t.style,{},v.style)),A.className=Array.prototype.concat(c,d,g!==d?g:null,t.className,v.className).filter(Boolean).join(\" \"),A.ref=S,u(b,A)}(A,e,t,I)};return P.displayName=p,(A=r.forwardRef(P)).attrs=g,A.componentStyle=C,A.displayName=p,A.shouldForwardProp=N,A.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):S,A.styledComponentId=v,A.target=o?e.target:e,A.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Pe(p,v),A.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n <Component />\"),r=!0,n={}}}}(p,v)),Object.defineProperty(A,\"toString\",{value:function(){return\".\"+A.styledComponentId}}),i&&m(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!n(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=Ae.apply(void 0,[e].concat(n)),a=\"sc-global-\"+Te(JSON.stringify(i)),u=new He(i,a);function d(e){var t=pe(),n=fe(),o=s(Me),d=c(t.allocateGSInstance(a)).current;return\"production\"!==process.env.NODE_ENV&&r.Children.count(e.children)&&console.warn(\"The global style component \"+a+\" was given child JSX. createGlobalStyle does not render children.\"),\"production\"!==process.env.NODE_ENV&&i.some((function(e){return\"string\"==typeof e&&-1!==e.indexOf(\"@import\")}))&&console.warn(\"Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app.\"),t.server&&h(d,e,t,o,n),l((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Pe(a),r.memo(d)}function We(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Ae.apply(void 0,[e].concat(n)).join(\"\"),s=Te(o);return new ye(s,o)}var Ue=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return\"\";var n=Y();return\"<style \"+[n&&'nonce=\"'+n+'\"',N+'=\"true\"','data-styled-version=\"5.3.11\"'].filter(Boolean).join(\" \")+\">\"+t+\"</style>\"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]=\"\",t[\"data-styled-version\"]=\"5.3.11\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[r.createElement(\"style\",y({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):r.createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=r.forwardRef((function(t,n){var o=s(Me),i=e.defaultProps,a=Oe(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+b(e)+'\"'),r.createElement(e,y({},t,{theme:a,ref:n}))}));return m(t,e),t.displayName=\"WithTheme(\"+b(e)+\")\",t},Xe=function(){return s(Me)},Ze={StyleSheet:X,masterSheet:de};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default qe;export{Ue as ServerStyleSheet,ue as StyleSheetConsumer,ce as StyleSheetContext,me as StyleSheetManager,Ge as ThemeConsumer,Me as ThemeContext,Le as ThemeProvider,Ze as __PRIVATE__,$e as createGlobalStyle,Ae as css,_ as isStyledComponent,We as keyframes,Xe as useTheme,A as version,Je as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n"],"names":["v","e","t","n","r","o","length","push","g"],"mappings":"2tBAGA,IAAAA,EAAA,SACEC,EACAC,GAAA,IAAA,IAEMC,EAAS,CAACF,EAAQ,IAEfG,EAAI,EAAGC,EAAMH,EAAeI,OAAQF,EAAIC,EAAKD,GAAK,EACzDD,EAAOI,KAAKL,EAAeE,GAAIH,EAAQG,EAAI,IAAA,OAGtCD,CAAA,EAAAK,EAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="@nethesis/phone-island",s="Nethesis",t="0.18.4",r="NethVoice CTI Phone Island",i=["nethserver","nethesis","nethvoice","phone","island"],o="https://github.com/nethesis/phone-island#readme",n="https://github.com/nethesis/dev/issues",p={type:"git",url:"https://github.com/nethesis/phone-island.git"},l=["dist"],a="dist/index.js",d="dist/index.d.ts",c={access:"public"},u={main:!1,types:!1,default:{distDir:"./dist-widget"}},m={"@fortawesome/free-solid-svg-icons":"^6.2.1","@fortawesome/react-fontawesome":"^0.2.0","@headlessui/react":"^2.2.8","@nethesis/nethesis-light-svg-icons":"github:nethesis/Font-Awesome#ns-light","@nethesis/nethesis-solid-svg-icons":"github:nethesis/Font-Awesome#ns-solid","@rematch/core":"^2.2.0","@rematch/immer":"^2.1.3","@rematch/select":"^3.1.2","@swc/helpers":"^0.4.12","@testing-library/jest-dom":"^5.11.4","@testing-library/user-event":"^12.1.10","framer-motion":"^12.0.0",i18next:"^22.4.9","i18next-browser-languagedetector":"^7.0.1","i18next-http-backend":"^2.1.1","js-base64":"^3.7.3",lodash:"^4.17.21","mic-check":"^1.1.0",react:"^18.2.0","react-dom":"^18.2.0","react-i18next":"^12.1.5","react-moment":"^1.1.2","react-redux":"^8.0.5","react-scripts":"^5.0.1","react-tooltip":"^5.28.0","socket.io-client":"^4.5.3","styled-components":"^5.3.6","webrtc-adapter":"^9.0.1"},b={start:"react-scripts start",dev:"storybook dev -p 6006",test:"react-scripts test",watch:"rollup -w -c","watch:css":"npx tailwindcss -o ./dist/index.css --watch",build:"rm -rf ./dist && npm run build:css && rollup -c","build:css":"NODE_ENV=production npx tailwindcss -o ./dist/index.css --minify","build:win":"del /s /q dist && npm run build:wincss && rollup -c --configPlugin typescript","build:wincss":"set NODE_ENV=production npx tailwindcss -o ./dist/index.css --minify","build:widget":"rm -rf ./dist-widget && parcel build ./src/index.widget.tsx --no-source-maps","serve:widget":"rm -rf ./widget-example/static/* && cp -rf ./dist-widget/* ./widget-example/static && npx http-server ./widget-example -o -c-1","build-storybook":"storybook build -s public",release:"npm publish","release:widget":"np patch",format:"prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc",bump:"node bump-version.js","build-pack":"npm run bump && npm run build && npm pack","build-pack:win":"npm run bump && npm run build:win && npm pack","publish:minor":"npm version minor --allow-same-version -m v%s --force","publish:major":"npm version major --allow-same-version -m v%s --force","publish:patch":"npm version patch --allow-same-version -m v%s --force",preversion:"rm -rf dist-widget && npm run build:widget && git add dist-widget/index.widget.js dist-widget/index.widget.css && git commit -m 'chore(widget): release for jsDelivr'",postversion:"git push origin main --tags","revert-bump":"node revert-bump.js"},g={production:[">0.2%","not dead","not op_mini all"],development:["last 1 chrome version","last 1 firefox version","last 1 safari version"]},h={"@babel/core":"^7.20.2","@babel/preset-env":"^7.20.2","@parcel/transformer-typescript-types":"^2.8.0","@rollup/plugin-babel":"^6.0.2","@rollup/plugin-commonjs":"^23.0.2","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.0.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^9.0.2","@storybook/addon-actions":"7.6.21","@storybook/addon-essentials":"7.6.20","@storybook/addon-interactions":"7.6.20","@storybook/addon-links":"7.6.21","@storybook/node-logger":"7.6.20","@storybook/preset-create-react-app":"7.6.21","@storybook/react":"7.6.20","@storybook/react-webpack5":"^7.6.20","@storybook/testing-library":"^0.0.13","@testing-library/react":"^13.4.0","@types/audioworklet":"^0.0.92","@types/jest":"^29.2.2","@types/react":"^18.0.26","@types/react-dom":"^18.0.9","@types/styled-components":"^5.1.26",autoprefixer:"^10.4.20",babel:"^6.23.0","babel-plugin-named-exports-order":"^0.0.2",buffer:"^5.7.1","css-loader":"^7.1.2","eslint-plugin-storybook":"^0.9.0",np:"^7.6.2",parcel:"^2.0.0",postcss:"^8.4.49","postcss-loader":"^8.1.1",prettier:"^2.8.0","prop-types":"^15.8.1",rollup:"^2.79.1","rollup-plugin-generate-package-json":"^3.2.0","rollup-plugin-postcss":"^4.0.2",storybook:"^7.6.20","style-loader":"^4.0.0","tailwind-scrollbar":"^3.1.0",tailwindcss:"^3.4.16",typescript:"^4.8.4","webm-duration-fix":"^1.0.4",webpack:"^5.74.0"},w={"nth-check":"^2.0.1"},x="GPL-3.0-or-later",y={name:e,author:s,version:t,description:r,keywords:i,homepage:o,bugs:n,repository:p,private:!1,files:l,main:a,types:d,publishConfig:c,targets:u,dependencies:m,scripts:b,browserslist:g,devDependencies:h,overrides:w,license:x};exports.author=s,exports.browserslist=g,exports.bugs=n,exports.default=y,exports.dependencies=m,exports.description=r,exports.devDependencies=h,exports.files=l,exports.homepage=o,exports.keywords=i,exports.license=x,exports.main=a,exports.name=e,exports.overrides=w,exports.publishConfig=c,exports.repository=p,exports.scripts=b,exports.targets=u,exports.types=d,exports.version=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="@nethesis/phone-island",s="Nethesis",t="0.18.5",r="NethVoice CTI Phone Island",i=["nethserver","nethesis","nethvoice","phone","island"],o="https://github.com/nethesis/phone-island#readme",n="https://github.com/nethesis/dev/issues",p={type:"git",url:"https://github.com/nethesis/phone-island.git"},l=["dist"],a="dist/index.js",d="dist/index.d.ts",c={access:"public"},u={main:!1,types:!1,default:{distDir:"./dist-widget"}},m={"@fortawesome/free-solid-svg-icons":"^6.2.1","@fortawesome/react-fontawesome":"^0.2.0","@headlessui/react":"^2.2.8","@nethesis/nethesis-light-svg-icons":"github:nethesis/Font-Awesome#ns-light","@nethesis/nethesis-solid-svg-icons":"github:nethesis/Font-Awesome#ns-solid","@rematch/core":"^2.2.0","@rematch/immer":"^2.1.3","@rematch/select":"^3.1.2","@swc/helpers":"^0.4.12","@testing-library/jest-dom":"^5.11.4","@testing-library/user-event":"^12.1.10","framer-motion":"^12.0.0",i18next:"^22.4.9","i18next-browser-languagedetector":"^7.0.1","i18next-http-backend":"^2.1.1","js-base64":"^3.7.3",lodash:"^4.17.21","mic-check":"^1.1.0",react:"^18.2.0","react-dom":"^18.2.0","react-i18next":"^12.1.5","react-moment":"^1.1.2","react-redux":"^8.0.5","react-scripts":"^5.0.1","react-tooltip":"^5.28.0","socket.io-client":"^4.5.3","styled-components":"^5.3.6","webrtc-adapter":"^9.0.1"},b={start:"react-scripts start",dev:"storybook dev -p 6006",test:"react-scripts test",watch:"rollup -w -c","watch:css":"npx tailwindcss -o ./dist/index.css --watch",build:"rm -rf ./dist && npm run build:css && rollup -c","build:css":"NODE_ENV=production npx tailwindcss -o ./dist/index.css --minify","build:win":"del /s /q dist && npm run build:wincss && rollup -c --configPlugin typescript","build:wincss":"set NODE_ENV=production npx tailwindcss -o ./dist/index.css --minify","build:widget":"rm -rf ./dist-widget && parcel build ./src/index.widget.tsx --no-source-maps","serve:widget":"rm -rf ./widget-example/static/* && cp -rf ./dist-widget/* ./widget-example/static && npx http-server ./widget-example -o -c-1","build-storybook":"storybook build -s public",release:"npm publish","release:widget":"np patch",format:"prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc",bump:"node bump-version.js","build-pack":"npm run bump && npm run build && npm pack","build-pack:win":"npm run bump && npm run build:win && npm pack","publish:minor":"npm version minor --allow-same-version -m v%s --force","publish:major":"npm version major --allow-same-version -m v%s --force","publish:patch":"npm version patch --allow-same-version -m v%s --force",preversion:"rm -rf dist-widget && npm run build:widget && git add dist-widget/index.widget.js dist-widget/index.widget.css && git commit -m 'chore(widget): release for jsDelivr'",postversion:"git push origin main --tags","revert-bump":"node revert-bump.js"},g={production:[">0.2%","not dead","not op_mini all"],development:["last 1 chrome version","last 1 firefox version","last 1 safari version"]},h={"@babel/core":"^7.20.2","@babel/preset-env":"^7.20.2","@parcel/transformer-typescript-types":"^2.8.0","@rollup/plugin-babel":"^6.0.2","@rollup/plugin-commonjs":"^23.0.2","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.0.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^9.0.2","@storybook/addon-actions":"7.6.21","@storybook/addon-essentials":"7.6.20","@storybook/addon-interactions":"7.6.20","@storybook/addon-links":"7.6.21","@storybook/node-logger":"7.6.20","@storybook/preset-create-react-app":"7.6.21","@storybook/react":"7.6.20","@storybook/react-webpack5":"^7.6.20","@storybook/testing-library":"^0.0.13","@testing-library/react":"^13.4.0","@types/audioworklet":"^0.0.94","@types/jest":"^29.2.2","@types/react":"^18.0.26","@types/react-dom":"^18.0.9","@types/styled-components":"^5.1.26",autoprefixer:"^10.4.20",babel:"^6.23.0","babel-plugin-named-exports-order":"^0.0.2",buffer:"^5.7.1","css-loader":"^7.1.2","eslint-plugin-storybook":"^0.9.0",np:"^7.6.2",parcel:"^2.0.0",postcss:"^8.4.49","postcss-loader":"^8.1.1",prettier:"^2.8.0","prop-types":"^15.8.1",rollup:"^2.79.1","rollup-plugin-generate-package-json":"^3.2.0","rollup-plugin-postcss":"^4.0.2",storybook:"^7.6.20","style-loader":"^4.0.0","tailwind-scrollbar":"^3.1.0",tailwindcss:"^3.4.16",typescript:"^4.8.4","webm-duration-fix":"^1.0.4",webpack:"^5.74.0"},w={"nth-check":"^2.0.1"},x="GPL-3.0-or-later",y={name:e,author:s,version:t,description:r,keywords:i,homepage:o,bugs:n,repository:p,private:!1,files:l,main:a,types:d,publishConfig:c,targets:u,dependencies:m,scripts:b,browserslist:g,devDependencies:h,overrides:w,license:x};exports.author=s,exports.browserslist=g,exports.bugs=n,exports.default=y,exports.dependencies=m,exports.description=r,exports.devDependencies=h,exports.files=l,exports.homepage=o,exports.keywords=i,exports.license=x,exports.main=a,exports.name=e,exports.overrides=w,exports.publishConfig=c,exports.repository=p,exports.scripts=b,exports.targets=u,exports.types=d,exports.version=t;
2
2
  //# sourceMappingURL=package.json.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nethesis/phone-island",
3
3
  "author": "Nethesis",
4
- "version": "0.18.4",
4
+ "version": "0.18.5",
5
5
  "description": "NethVoice CTI Phone Island",
6
6
  "keywords": [
7
7
  "nethserver",
@@ -120,7 +120,7 @@
120
120
  "@storybook/react-webpack5": "^7.6.20",
121
121
  "@storybook/testing-library": "^0.0.13",
122
122
  "@testing-library/react": "^13.4.0",
123
- "@types/audioworklet": "^0.0.92",
123
+ "@types/audioworklet": "^0.0.94",
124
124
  "@types/jest": "^29.2.2",
125
125
  "@types/react": "^18.0.26",
126
126
  "@types/react-dom": "^18.0.9",
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../memoize/dist/emotion-memoize.esm.js"),t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=e.default((function(e){return t.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));exports.default=r;
2
- //# sourceMappingURL=emotion-is-prop-valid.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emotion-is-prop-valid.esm.js","sources":["../../../../../../../node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"],"sourcesContent":["import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default isPropValid;\n"],"names":["reactPropsRegex","isPropValid","memoize","prop","test","charCodeAt"],"mappings":"+HAEIA,EAAkB,o9HAElBC,EAA6BC,EAAAA,SAAQ,SAAUC,GACjD,OAAOH,EAAgBI,KAAKD,IAAgC,MAAvBA,EAAKE,WAAW,IAE3B,MAAvBF,EAAKE,WAAW,IAEhBF,EAAKE,WAAW,GAAK,EAC1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"emotion-memoize.esm.js","sources":["../../../../../../../node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"],"sourcesContent":["function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n"],"names":["fn","cache","Object","create","arg","undefined"],"mappings":"oFAAA,SAAiBA,GACf,IAAIC,EAAQC,OAAOC,OAAO,MAC1B,OAAO,SAAUC,GAEf,YADmBC,IAAfJ,EAAMG,KAAoBH,EAAMG,GAAOJ,EAAGI,IACvCH,EAAMG,GAEjB"}